[Matroska-cvs] [matroska] r1290 - in trunk/DvdMenuXtractor/dmx: .
libdvdread libdvdread/dvdread libdvdread/src libdvdread/win32
smssms at matroska.org
smssms at matroska.org
Sat Mar 10 22:45:09 CET 2007
Author: smssms
Date: 2007-03-11 00:41:34 +0300 (Sun, 11 Mar 2007)
New Revision: 1290
Added:
trunk/DvdMenuXtractor/dmx/libdvdread/
trunk/DvdMenuXtractor/dmx/libdvdread/AUTHORS
trunk/DvdMenuXtractor/dmx/libdvdread/COPYING
trunk/DvdMenuXtractor/dmx/libdvdread/ChangeLog
trunk/DvdMenuXtractor/dmx/libdvdread/INSTALL
trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.am
trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.in
trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.vs
trunk/DvdMenuXtractor/dmx/libdvdread/NEWS
trunk/DvdMenuXtractor/dmx/libdvdread/README
trunk/DvdMenuXtractor/dmx/libdvdread/TODO
trunk/DvdMenuXtractor/dmx/libdvdread/acinclude.m4
trunk/DvdMenuXtractor/dmx/libdvdread/aclocal.m4
trunk/DvdMenuXtractor/dmx/libdvdread/bootstrap
trunk/DvdMenuXtractor/dmx/libdvdread/config.guess
trunk/DvdMenuXtractor/dmx/libdvdread/config.h.in
trunk/DvdMenuXtractor/dmx/libdvdread/config.sub
trunk/DvdMenuXtractor/dmx/libdvdread/configure
trunk/DvdMenuXtractor/dmx/libdvdread/configure.in
trunk/DvdMenuXtractor/dmx/libdvdread/depcomp
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/Makefile.am
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/Makefile.in
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/bswap.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/cmd_print.c
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/cmd_print.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_input.c
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_input.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_reader.c
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_reader.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_udf.c
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_udf.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvdread.proj
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvdread_internal.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_print.c
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_print.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_read.c
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_read.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_types.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/md5.c
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/md5.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_print.c
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_print.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_read.c
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_read.h
trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_types.h
trunk/DvdMenuXtractor/dmx/libdvdread/install-sh
trunk/DvdMenuXtractor/dmx/libdvdread/libdvdread.proj
trunk/DvdMenuXtractor/dmx/libdvdread/ltmain.sh
trunk/DvdMenuXtractor/dmx/libdvdread/makefile.vc
trunk/DvdMenuXtractor/dmx/libdvdread/missing
trunk/DvdMenuXtractor/dmx/libdvdread/mkinstalldirs
trunk/DvdMenuXtractor/dmx/libdvdread/src/
trunk/DvdMenuXtractor/dmx/libdvdread/src/Makefile.am
trunk/DvdMenuXtractor/dmx/libdvdread/src/Makefile.in
trunk/DvdMenuXtractor/dmx/libdvdread/src/disc_id.c
trunk/DvdMenuXtractor/dmx/libdvdread/src/filestat.c
trunk/DvdMenuXtractor/dmx/libdvdread/src/ifo_dump.c
trunk/DvdMenuXtractor/dmx/libdvdread/src/play_title.c
trunk/DvdMenuXtractor/dmx/libdvdread/src/src.proj
trunk/DvdMenuXtractor/dmx/libdvdread/src/title_info.c
trunk/DvdMenuXtractor/dmx/libdvdread/win32/
trunk/DvdMenuXtractor/dmx/libdvdread/win32/config.h
trunk/DvdMenuXtractor/dmx/libdvdread/win32/dirent.c
trunk/DvdMenuXtractor/dmx/libdvdread/win32/dirent.h
trunk/DvdMenuXtractor/dmx/libdvdread/win32/inttypes.h
trunk/DvdMenuXtractor/dmx/libdvdread/win32/posix.h
trunk/DvdMenuXtractor/dmx/libdvdread/win32/stdint.h
trunk/DvdMenuXtractor/dmx/libdvdread/win32/win32.proj
Log:
Added: trunk/DvdMenuXtractor/dmx/libdvdread/AUTHORS
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/AUTHORS 2007-03-10 21:38:29 UTC =
(rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/AUTHORS 2007-03-10 21:41:34 UTC =
(rev 1290)
@@ -0,0 +1,7 @@
+
+This code is Copyright (C) 2000, 2001 by:
+Bj=F6rn Englund <d4bjorn at dtek.chalmers.se>,
+H=E5kan Hjort <d95hjort at dtek.chalmers.se>,
+Billy Biggs <vektor at dumbterm.net>,
+Christian Wolff <scarabaeus at convergence.de> =20
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/COPYING
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/COPYING 2007-03-10 21:38:29 UTC =
(rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/COPYING 2007-03-10 21:41:34 UTC =
(rev 1290)
@@ -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.
+=0C
+ 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.)
+=0C
+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.
+=0C
+ 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.
+=0C
+ 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 version=
s
+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 condition=
s
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number o=
f
+this License, you may choose any version ever published by the Free Soft=
ware
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the autho=
r
+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 an=
d
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRAN=
TY
+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 EXPRESS=
ED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK A=
S
+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 WRIT=
ING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGE=
S,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARIS=
ING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITE=
D
+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 OTH=
ER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+=0C
+ 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 ter=
ms.
+
+ 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.
+
+ <one line to give the program's name and a brief idea of what it doe=
s.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public 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 `sho=
w 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 appropri=
ate
+parts of the General Public License. Of course, the commands you use ma=
y
+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 Hacke=
r.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program i=
nto
+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.
Added: trunk/DvdMenuXtractor/dmx/libdvdread/ChangeLog
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/ChangeLog 2007-03-10 21:38:29 UT=
C (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/ChangeLog 2007-03-10 21:41:34 UT=
C (rev 1290)
@@ -0,0 +1,558 @@
+2003-02-22 23:28 hjort
+
+ * NEWS: Update NEWS for 0.9.4.
+
+2003-02-22 22:42 hjort
+
+ * configure.in: Version 0.9.4.
+
+2003-02-16 18:53 norpan
+
+ * libdvdread.spec: spec file (moved from oglespecs)
+
+2003-02-13 23:34 hjort
+
+ * dvdread/dvd_reader.c: If environment variable DVDREAD_NOKEYS is
+ set then skip the 'retrive all keys' step at start up.
+
+2003-02-13 23:10 hjort
+
+ * configure.in, dvdread/Makefile.am, dvdread/dvd_reader.h: Bump
+ version number, bump libtool so version, add DVDREAD_VERSION
+ define. use $host not $target in the configure script.
+
+2003-02-13 23:09 hjort
+
+ * dvdread/ifo_print.c: More detailed printing of PGC.PG Playback
+ Mode and TT_SRPT.Playback Type.
+
+2003-02-13 23:06 hjort
+
+ * dvdread/: dvd_input.c, dvd_input.h, dvd_reader.c, dvd_udf.c:
+ Change names of fuctions not intended to be visible outside the
+ library, so that they are not matched by the (DVD.*|ifo.*|nav.*)
+ regex.
+
+2003-02-11 21:06 hjort
+
+ * dvdread/: dvd_reader.c, dvd_reader.h: The volsetid char arrays
+ should be unsigned.
+
+2003-01-31 22:03 hjort
+
+ * dvdread/dvd_reader.c: Bugfix, init dvd->css_title in Open.
+
+2003-01-26 02:47 hjort
+
+ * dvdread/dvd_reader.c: Ooops.
+
+2003-01-25 20:59 hjort
+
+ * dvdread/: dvd_reader.c, dvd_reader.h: DVDDiscID, add sanity
+ checks, fix coding style, add comments.
+
+2003-01-22 13:25 bjorn
+
+ * dvdread/: dvd_reader.c, dvd_reader.h, dvd_udf.c, dvd_udf.h: fixed
+ some warnings and changed some variables to unsigned
+
+2003-01-22 01:27 bjorn
+
+ * dvdread/: dvd_reader.c, dvd_reader.h, dvd_udf.c, dvd_udf.h: Added
+ DVDUDFVolumeInfo and DVDISOVolumeInfo. Implemented caching for
+ part of the udf filesystem when read from a device.
+
+2003-01-22 01:25 bjorn
+
+ * src/ifo_dump.c: removed an unused variable
+
+2003-01-17 22:31 hjort
+
+ * TODO, configure.in, dvdread/ifo_read.c, dvdread/ifo_types.h: Add
+ commets, make PLT_MAIT table have level 1 first in the array not
+ last.
+
+2003-01-16 16:48 norpan
+
+ * dvdread/dvd_reader.c: Seems like DVDReadBlocks tries to decrypt,
+ which of course is not needed for ifo files. Back to using
+ DVDReadBytes.
+
+2003-01-13 15:18 norpan
+
+ * dvdread/Makefile.am: only export function names (in the so file)
+ that starts with DVD, ifo, or nav
+
+2003-01-12 10:33 norpan
+
+ * src/disc_id.c: lower case for disc id
+
+2003-01-12 10:33 norpan
+
+ * dvdread/dvd_reader.c: fixed bug, DVDDiscID now reads all of the
+ ifo file, and gives the same result as "cat *.ifo | md5sum -" in
+ the video_ts directory
+
+2003-01-12 01:49 norpan
+
+ * src/: .cvsignore, Makefile.am, disc_id.c: Added disc_id program,
+ to report disc id of a dvd
+
+2003-01-12 01:49 norpan
+
+ * dvdread/: Makefile.am, dvd_reader.c, dvd_reader.h: added
+ implementation of DVDDiscID
+
+2003-01-12 01:46 norpan
+
+ * dvdread/: md5.c, md5.h: md5 implementation (from textutils 2.1)
+
+2003-01-06 21:13 hjort
+
+ * dvdread/dvd_reader.c, dvdread/dvd_udf.c, dvdread/ifo_print.c,
+ dvdread/ifo_read.c, dvdread/nav_print.c, dvdread/nav_read.c,
+ src/play_title.c, src/title_info.c: Make config.h be included first
+ in all c files. Update copyright years.
+
+2003-01-06 20:57 hjort
+
+ * src/ifo_dump.c: Don't use getopt.
+
+2003-01-06 20:36 hjort
+
+ * dvdread/: ifo_print.c, ifo_read.c: Read and print Parental
+ Management Information Table.
+
+2003-01-06 20:33 hjort
+
+ * dvdread/: ifo_print.c, ifo_read.c: Read, keep around and print
+ the extra offset tables. Add some checking to the multichannel
+ audio attributes.
+
+2003-01-06 20:07 hjort
+
+ * dvdread/ifo_types.h: Add MultiChannel Extension, correct Parental
+ Management Information and add some fields to keep various offset
+ tables around (req by Olaf Beck).
+
+2003-01-06 19:42 hjort
+
+ * dvdread/ifo_read.c: Oops, remember to byte swap the TMAP data,
+ since it's in bigendian format.
+
+2003-01-06 19:18 hjort
+
+ * dvdread/ifo_print.c: Remove unused level argument that we earier
+ used for controlling logging.
+
+2003-01-06 19:18 hjort
+
+ * configure.in: Change the configure help text s that it's clear
+ that the path argument to --with-libdvdcss is optional.
+
+2003-01-06 18:36 hjort
+
+ * bootstrap, configure.in: Correct the use of build tools and the
+ testing of the --enable-warnings flag.
+
+2003-01-02 21:13 hjort
+
+ * dvdread/nav_types.h: Add some comments.
+
+2002-12-31 00:49 hjort
+
+ * dvdread/nav_read.c: Argh, unbreak navRead_PCI for little endian
+ systems.
+
+2002-12-29 01:06 hjort
+
+ * configure.in, dvdread/Makefile.am, dvdread/dvd_input.c,
+ dvdread/dvd_input.h, src/Makefile.am: Add --with-libdvdcss which if
+ given makes us link to libdvdcss rather than trying to dlopen it at
+ runtime.
+
+2002-12-28 00:57 hjort
+
+ * dvdread/: ifo_print.c, ifo_types.h: Add application mode/info
+ fields to the audio attributes.
+
+2002-12-28 00:35 hjort
+
+ * dvdread/: ifo_print.c, ifo_types.h: More cleanups of the
+ attribute code.
+
+2002-12-27 23:56 hjort
+
+ * dvdread/: ifo_print.c, ifo_read.c, ifo_types.h: Add some more
+ fields to the video/subpicture attributes and the pgci_lu struct.=20
+ Only touches things that where previously zero and/or unknown.
+
+2002-12-27 23:16 hjort
+
+ * configure.in: Change the behaviour of adding all the extra waring
+ flags to default to off.
+
+2002-12-27 23:14 hjort
+
+ * dvdread/ifo_types.h: Convert all // comments to /* .. */ ones.
+
+2002-12-27 22:58 hjort
+
+ * configure.in, dvdread/dvd_udf.c, dvdread/ifo_print.c,
+ dvdread/ifo_read.c, dvdread/nav_print.c, dvdread/nav_read.c: Remove
+ the last uses of assert.h from dvdread/. Update comments in
+ configure.in.
+
+2002-12-24 18:01 hjort
+
+ * dvdread/dvd_reader.c: Opps, you shouldn't compare intergers with
+ NULL, thanks harm.
+
+2002-12-15 18:50 hjort
+
+ * configure.in, dvdread/nav_read.c, dvdread/nav_types.h: Fix
+ problem with alignment for Sun's Forte compiler. Now you can use
+ either Forte or GCC to compile libdvdread.
+
+2002-12-15 18:00 bjorn
+
+ * dvdread/: Makefile.am, dvdread_internal.h, ifo_read.c,
+ nav_read.c: changed asserts to fprintfs
+
+2002-12-15 16:40 hjort
+
+ * .cvsignore: Update.
+
+2002-12-15 00:53 hjort
+
+ * dvdread/: ifo_read.c, ifo_read.h: The first play PGC structure is
+ only optional.
+
+2002-12-15 00:47 hjort
+
+ * configure.in, dvdread/bswap.h: Add support for FreeBSD endian
+ swap functions.
+
+2002-11-18 21:20 hjort
+
+ * dvdread/dvd_reader.c: Add some argument checking to the
+ functions.
+
+2002-08-18 17:19 hjort
+
+ * dvdread/: ifo_print.c, ifo_print.h, ifo_read.c, ifo_read.h,
+ ifo_types.h: Add types for VTS_TMAPT. Add read/parse functions for
+ VTS_TMAPT. Add printing functions for VTS_TMAPT.
+
+2002-08-15 19:40 hjort
+
+ * bootstrap, acinclude.m4, configure.in: Check for inttypes.h, if
+ not found create a file with default choices.
+
+2002-08-11 18:50 hjort
+
+ * dvdread/nav_types.h: Update doxygen comments.
+
+2002-08-02 14:09 hjort
+
+ * dvdread/: dvd_input.c, dvd_input.h: Declare the function pointers
+ extern in the header file so there doesn't end up beeing more than
+ one instance.
+
+2002-07-26 23:27 hjort
+
+ * dvdread/: dvd_reader.h, nav_print.h, nav_read.h: More doxygen
+ comments.
+
+2002-07-12 21:44 hjort
+
+ * dvdread/dvd_reader.h: Big Doxygen documentation update.
+
+2002-07-12 20:38 hjort
+
+ * INSTALL: Newer version of the auto* tools.
+
+2002-07-11 23:48 hjort
+
+ * dvdread/ifo_read.c: Make DVDFileSeek_ inline and try opening .BUP
+ if .IFO fails.
+
+2002-07-11 23:40 hjort
+
+ * dvdread/dvd_reader.c: Don't segfault when trying to read past the
+ end of a file in Path mode. Fix DVDReadBlocksPath so to not read
+ an extra block at the end.
+
+2002-07-11 23:38 hjort
+
+ * dvdread/: dvd_input.c, dvd_input.h, dvd_reader.c: Remove the
+ flags argument to DVDinput_seek function. Update all calls.=20
+ Change the calles that did tha key seach to instead use
+ DVDinput_title.
+
+2002-07-11 20:07 hjort
+
+ * dvdread/Makefile.am, src/Makefile.am: Fix so that one can build
+ outside the source tree.
+
+2002-05-26 00:45 d95hjort
+
+ * NEWS: Update.
+
+2002-05-25 23:50 d95hjort
+
+ * configure.in: Bump version for release. Fix reveresed
+ comparison.
+
+2002-05-25 22:09 d95hjort
+
+ * dvdread/Makefile.am: Bump the library revision for the pending
+ release.
+
+2002-05-25 22:09 d95hjort
+
+ * dvdread/dvd_udf.c: Bug fix. Make sure that the UDF code get all
+ the blocks it asks for (this is to avoid some spurious failiurs).
+
+2002-05-25 22:07 d95hjort
+
+ * dvdread/dvd_reader.c: More bug fixes from the big change. Add
+ code to keep track of the current title key, calling DVDCSS_title
+ to change when needed. Add more comments. Add Mac OS X / Darwin
+ support.
+
+2002-05-25 21:58 d95hjort
+
+ * configure.in: Add Mac OS X / Dawin support, general cleanups and
+ remove the arch specific (and general) optimization flags.
+
+2002-05-25 21:43 d95hjort
+
+ * dvdread/: dvd_input.c, dvd_input.h: Mark some things const.
+
+2002-05-25 21:41 d95hjort
+
+ * dvdread/ifo_print.c: Mark two local functions as static.
+
+2002-05-25 21:38 d95hjort
+
+ * dvdread/ifo_read.c: Improve error messages and fix a ineffectual
+ assert.
+
+2002-04-22 17:42 d95hjort
+
+ * .cvsignore, configure.in, dvdread/Makefile.am,
+ dvdread/dvd_input.c, dvdread/dvd_input.h, dvdread/dvd_reader.c,
+ dvdread/dvdcss.h: Update to use new dvd_input abstraction layer.=20
+ Can now use libdvdcss also for files on normal filsystem (non UDF
+ DVD image).
+
+2002-04-20 23:14 d95hjort
+
+ * dvdread/nav_types.h: Doxygen markup.
+
+2002-04-07 20:17 d95hjort
+
+ * dvdread/: nav_print.h, nav_read.h: More doxygen fixes.
+
+2002-04-07 19:51 d95hjort
+
+ * dvdread/bswap.h, dvdread/dvd_reader.c, dvdread/dvd_reader.h,
+ dvdread/dvd_udf.c, dvdread/dvd_udf.h, dvdread/ifo_print.h,
+ dvdread/ifo_read.h, dvdread/ifo_types.h, dvdread/nav_print.h,
+ dvdread/nav_read.c, dvdread/nav_read.h, dvdread/nav_types.h,
+ src/ifo_dump.c, src/play_title.c, src/title_info.c: Fix doxygen
+ errors in the copyright headers.
+
+2002-04-07 19:17 d95hjort
+
+ * dvdread/: dvd_reader.c, dvd_reader.h, dvd_udf.h, ifo_print.c,
+ ifo_print.h, ifo_read.c, ifo_read.h, ifo_types.h, nav_print.c,
+ nav_print.h, nav_read.c, nav_types.h: Fix copyright headers, adress
+ and years.
+
+2002-04-07 01:15 d95hjort
+
+ * Makefile.am: Add a newline.
+
+2002-04-07 01:14 d95hjort
+
+ * dvdread/ifo_print.c: Some small changes to what is printed for
+ video and audio attributes.
+
+2002-04-07 01:08 d95hjort
+
+ * dvdread/dvd_reader.h: Comments formating.
+
+2002-04-07 01:08 d95hjort
+
+ * dvdread/: ifo_read.c, ifo_read.h: Up the limit on the number of
+ commands that might be pressent in a PGC to 255. It seems that
+ First Play PGC might be optional, at lest some DVDs are masterd
+ this way. Close open comment.
+
+2001-11-29 19:03 hh
+
+ * dvdread/: bswap.h, dvd_reader.c, dvd_reader.h, dvd_udf.c,
+ dvd_udf.h, ifo_print.h, ifo_read.h, ifo_types.h, nav_print.h,
+ nav_read.h, nav_types.h: Fixes from Marc Espie: Move include guards
+ to teh very start of the files. Remove prameter names form
+ prototypes.
+
+2001-11-28 20:16 hh
+
+ * dvdread/: ifo_print.c, ifo_read.c: Handle mastering error on
+ Enemy of the State region 2 (de).
+
+2001-10-15 20:16 hh
+
+ * NEWS, configure.in, dvdread/bswap.h, dvdread/dvd_reader.c,
+ dvdread/ifo_read.c: Bump version to 0.9.2 for release (2001-10-11).
+ Add support for BSD/OS. Make sure that the raw device is used on
+ all BSD variants for the CSS ioctls to work correctly. Small bug
+ fix for access to mounted DVD via soft-links and a malloc/free
+ mistake. Increase an assert level for pgcn numbers in the part of
+ title list.
+
+2001-09-28 20:25 hh
+
+ * dvdread/ifo_read.c: Allow Titles with 0 PTTs. Allow a ptt_srpt
+ with an empty title. Allow empty Cell Address tables. Allow an
+ empty VOBU Address Map. This is to get "Magic Knight Rayearth:
+ Daybreak" to work, it might be master wrong. Hard to se how a VTS
+ without any PGCs, Cells or VOBUs can be correct.
+
+2001-09-28 20:11 hh
+
+ * dvdread/: bswap.h, dvd_reader.c: Add NetBSD support. Change the
+ code to use /dev/rcd* rather than /dev/cd* for all *BSD, this is
+ apparently needed to use the CSS ioctls. Extend bswap with NetBSD
+ header.
+
+2001-09-18 03:53 hh
+
+ * dvdread/Makefile.am, dvdread/bswap.h, dvdread/dvd_reader.c,
+ dvdread/ifo_read.c, NEWS, configure.in: Change the way the endian
+ swaps are defined and make sure Solaris x86 works. Fix from
+ Juergen Keil for a bug that caused libdvdread to close random fds.=20
+ Update the limit on the number of pgcs in the pgcit to 10000.
+ Correct bug in 0.9.0 that made using a DVD located on a normal
+ filsystem impossible. Bump the version in confgure.in to 0.9.1 and
+ the library revision number for the release.
+
+2001-09-18 02:36 hh
+
+ * Makefile.am, NEWS, configure.in, dvdread/Makefile.am,
+ dvdread/dvd_reader.c, dvdread/dvd_reader.h, dvdread/dvdcss.h,
+ dvdread/ifo_read.c, src/play_title.c: Include the bootstrap script
+ in the dist. Change the package name to libdvdread (was dvdread).=20
+ Use stat64 so that using an image file of a DVD should work.=20
+ Change some more types in the interface to use int rather than
+ int32_t, also some internal changes of types. Make it crack the
+ keys for all titles when opening the first as to not pause later
+ during playback. Make sure to use the raw device name for access
+ under Solaris as using the CSS calls does not work on the block
+ device. Make sure to get an absolute path for the directory name
+ used to search the mount table with. Update/correct some error
+ messages. This is what was released as libdvdread-0.9.0.
+
+2001-09-02 23:45 hh
+
+ * dvdread/Makefile.am, dvdread/dvd_udf.c, dvdread/dvd_udf.h,
+ src/play_title.c: Add some header files to the dependencies of
+ libdvdread so that they are included in the dist. Change the types
+ of UDFFindFile. Update the partiotion handling in the UDF code.=20
+ Correct play_title for the new incterface (expect blocks not bytes
+ read).
+
+2001-08-28 21:40 hh
+
+ * dvdread/ifo_read.c: Do not assume a pgci_ut has been
+ read/allocated. Check ponter before dereferring it to free
+ sub-componets.
+
+2001-08-28 21:34 hh
+
+ * dvdread/dvd_udf.c: Handle files with length 0. It faild and
+ reported the location and size of the director that a file was
+ located in if it didn't have any block allocated for it content.
+
+2001-08-27 02:13 vektor
+
+ * dvdread/: dvd_reader.c, dvd_reader.h: - Added a GetFileSize
+ style call.
+ - Made the close calls a bit more robust.
+ - Removed an annoying printf.
+
+2001-08-22 23:59 hh
+
+ * NEWS, configure.in, dvdread/Makefile.am, dvdread/dvd_reader.c,
+ dvdread/dvd_reader.h, dvdread/dvd_udf.c, dvdread/ifo_print.c,
+ dvdread/ifo_read.c, dvdread/nav_print.c, dvdread/nav_read.c,
+ dvdread/nav_read.h, src/play_title.c: Some API changes, sorry for
+ this, but now the interface nolonger has any reference to off64_t.=20
+ Remove unused length parameter to the nav functions. Return blocks
+ read rather than bytes read for the DVDReadBlocks function. Added
+ switch to enable lots of gcc waring flags. Correct lots of warnings
+ discoverd by the new flags.
+
+2001-08-18 01:22 hh
+
+ * README, configure.in, dvdread/dvd_reader.c, dvdread/dvd_reader.h:
+ Change _all_ occurrences of libcss to libdvdcss this time.
+
+2001-08-02 02:09 hh
+
+ * dvdread/dvdcss.h: Add the libdvdcss's header file so we compile
+ without it beeing installed.
+
+2001-08-02 02:05 hh
+
+ * TODO, configure.in, dvdread/Makefile.am, dvdread/bswap.h,
+ dvdread/dvd_reader.c, dvdread/dvd_reader.h, dvdread/dvd_udf.c,
+ dvdread/dvd_udf.h, dvdread/ifo_print.c, dvdread/ifo_read.c,
+ src/Makefile.am: Changed to use libdvdcss (from the VideoLAN guys)
+ by vektor. FreeBSD fixes from Marc van Woerkom and OpenBSD fixes
+ from Bj=F6rn Sandell. Small configure fixes to work better on *BSD
+ and other systems. Fix src/Makefile.am thinko/typo. Convert
+ dvd_udf to use uint[8|16|32]_t types.
+
+2001-08-02 01:27 hh
+
+ * AUTHORS: Give credit to Christian Wolff
+ <scarabaeus at convergence.de> for the UDF code.
+
+2001-06-25 04:32 hh
+
+ * .cvsignore, AUTHORS, COPYING, ChangeLog, Makefile.am, INSTALL,
+ NEWS, README, TODO, acinclude.m4, bootstrap, configure.in,
+ dvdread/.cvsignore, dvdread/Makefile.am, dvdread/bswap.h,
+ dvdread/dvd_reader.c, dvdread/dvd_reader.h, dvdread/dvd_udf.c,
+ dvdread/dvd_udf.h, dvdread/ifo_print.c, dvdread/ifo_print.h,
+ dvdread/ifo_read.c, dvdread/ifo_read.h, dvdread/ifo_types.h,
+ dvdread/nav_print.c, dvdread/nav_print.h, dvdread/nav_read.c,
+ dvdread/nav_read.h, dvdread/nav_types.h, src/.cvsignore,
+ src/Makefile.am, src/ifo_dump.c, src/play_title.c,
+ src/title_info.c: Initial revision
+
+2001-06-25 04:32 hh
+
+ * .cvsignore, AUTHORS, COPYING, ChangeLog, Makefile.am, INSTALL,
+ NEWS, README, TODO, acinclude.m4, bootstrap, configure.in,
+ dvdread/.cvsignore, dvdread/Makefile.am, dvdread/bswap.h,
+ dvdread/dvd_reader.c, dvdread/dvd_reader.h, dvdread/dvd_udf.c,
+ dvdread/dvd_udf.h, dvdread/ifo_print.c, dvdread/ifo_print.h,
+ dvdread/ifo_read.c, dvdread/ifo_read.h, dvdread/ifo_types.h,
+ dvdread/nav_print.c, dvdread/nav_print.h, dvdread/nav_read.c,
+ dvdread/nav_read.h, dvdread/nav_types.h, src/.cvsignore,
+ src/Makefile.am, src/ifo_dump.c, src/play_title.c,
+ src/title_info.c: libdvdread provides a simple foundation for
+ reading DVD-Video discs and images.
+=09
+ It offers DVD applications:
+=09
+ 1. A simple abstraction for reading the files on a DVD =20
+ (dvd_reader.h). 2. A simple library for parsing the information
+ (IFO) files (ifo_read.h/ifo_types.h). 3. A simple library for
+ parsing the navigation (NAV) packets (nav_read.h/nav_types.h).
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/INSTALL
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/INSTALL 2007-03-10 21:38:29 UTC =
(rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/INSTALL 2007-03-10 21:41:34 UTC =
(rev 1290)
@@ -0,0 +1,229 @@
+Copyright 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
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
+ 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=3Dconfig.cache' or simply `-C') that save=
s
+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
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
+ 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=3Dc89 CFLAGS=3D-O2 LIBS=3D-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
+ 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
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
+ 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=3DPATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=3DPATH', 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=3DPATH' to specify different values for particula=
r
+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=3DPREFIX' or `--program-suffix=3DSUFFIX'.
+
+Optional Features
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
+ 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=3DDIR' and
+`--x-libraries=3DDIR' to specify their locations.
+
+Specifying the System Type
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
+
+ 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=3DTYPE' 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=3DTYPE' 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=3DTYPE'.
+
+Sharing Defaults
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
+ 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
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
+ 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=3Dvalue'. For example:
+
+ ./configure CC=3D/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
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
+ `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=3DFILE'
+ 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=3Dconfig.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=3DDIR'
+ 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.
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.am 2007-03-10 21:38:29 =
UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.am 2007-03-10 21:41:34 =
UTC (rev 1290)
@@ -0,0 +1,4 @@
+
+SUBDIRS =3D dvdread src
+
+EXTRA_DIST =3D bootstrap
Added: trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.in 2007-03-10 21:38:29 =
UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.in 2007-03-10 21:41:34 =
UTC (rev 1290)
@@ -0,0 +1,441 @@
+# Makefile.in generated by automake 1.6.2 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# 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.
+
+ at SET_MAKE@
+SHELL =3D @SHELL@
+
+srcdir =3D @srcdir@
+top_srcdir =3D @top_srcdir@
+VPATH =3D @srcdir@
+prefix =3D @prefix@
+exec_prefix =3D @exec_prefix@
+
+bindir =3D @bindir@
+sbindir =3D @sbindir@
+libexecdir =3D @libexecdir@
+datadir =3D @datadir@
+sysconfdir =3D @sysconfdir@
+sharedstatedir =3D @sharedstatedir@
+localstatedir =3D @localstatedir@
+libdir =3D @libdir@
+infodir =3D @infodir@
+mandir =3D @mandir@
+includedir =3D @includedir@
+oldincludedir =3D /usr/include
+pkgdatadir =3D $(datadir)/@PACKAGE@
+pkglibdir =3D $(libdir)/@PACKAGE@
+pkgincludedir =3D $(includedir)/@PACKAGE@
+top_builddir =3D .
+
+ACLOCAL =3D @ACLOCAL@
+AUTOCONF =3D @AUTOCONF@
+AUTOMAKE =3D @AUTOMAKE@
+AUTOHEADER =3D @AUTOHEADER@
+
+am__cd =3D CDPATH=3D"$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL =3D @INSTALL@
+INSTALL_PROGRAM =3D @INSTALL_PROGRAM@
+INSTALL_DATA =3D @INSTALL_DATA@
+install_sh_DATA =3D $(install_sh) -c -m 644
+install_sh_PROGRAM =3D $(install_sh) -c
+install_sh_SCRIPT =3D $(install_sh) -c
+INSTALL_SCRIPT =3D @INSTALL_SCRIPT@
+INSTALL_HEADER =3D $(INSTALL_DATA)
+transform =3D @program_transform_name@
+NORMAL_INSTALL =3D :
+PRE_INSTALL =3D :
+POST_INSTALL =3D :
+NORMAL_UNINSTALL =3D :
+PRE_UNINSTALL =3D :
+POST_UNINSTALL =3D :
+host_alias =3D @host_alias@
+host_triplet =3D @host@
+
+EXEEXT =3D @EXEEXT@
+OBJEXT =3D @OBJEXT@
+PATH_SEPARATOR =3D @PATH_SEPARATOR@
+AMTAR =3D @AMTAR@
+AS =3D @AS@
+AWK =3D @AWK@
+CC =3D @CC@
+CSS_CFLAGS =3D @CSS_CFLAGS@
+CSS_LIBS =3D @CSS_LIBS@
+DEPDIR =3D @DEPDIR@
+DLLTOOL =3D @DLLTOOL@
+DL_LIBS =3D @DL_LIBS@
+ECHO =3D @ECHO@
+INSTALL_STRIP_PROGRAM =3D @INSTALL_STRIP_PROGRAM@
+LIBTOOL =3D @LIBTOOL@
+LN_S =3D @LN_S@
+MAINT =3D @MAINT@
+OBJDUMP =3D @OBJDUMP@
+PACKAGE =3D @PACKAGE@
+RANLIB =3D @RANLIB@
+STRIP =3D @STRIP@
+VERSION =3D @VERSION@
+am__include =3D @am__include@
+am__quote =3D @am__quote@
+install_sh =3D @install_sh@
+
+SUBDIRS =3D dvdread src
+
+EXTRA_DIST =3D bootstrap
+subdir =3D .
+ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4
+mkinstalldirs =3D $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER =3D config.h
+CONFIG_CLEAN_FILES =3D
+DIST_SOURCES =3D
+
+RECURSIVE_TARGETS =3D info-recursive dvi-recursive install-info-recursiv=
e \
+ uninstall-info-recursive all-recursive install-data-recursive \
+ install-exec-recursive installdirs-recursive install-recursive \
+ uninstall-recursive check-recursive installcheck-recursive
+DIST_COMMON =3D README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
+ Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess \
+ config.h.in config.sub configure configure.in depcomp \
+ install-sh ltmain.sh missing mkinstalldirs
+DIST_SUBDIRS =3D $(SUBDIRS)
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+
+am__CONFIG_DISTCLEAN_FILES =3D config.status config.cache config.log
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)=
/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/=
config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
+
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPEN=
DENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACL=
OCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) 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@ $(top_srcdir)/configure.in=
$(ACLOCAL_M4)=20
+ cd $(top_srcdir) && $(AUTOHEADER)
+ touch $(srcdir)/config.h.in
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# 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 `ma=
ke');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @set fnord $$MAKEFLAGS; amf=3D$$2; \
+ dot_seen=3Dno; \
+ target=3D`echo $@ | sed s/-recursive//`; \
+ list=3D'$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" =3D "."; then \
+ dot_seen=3Dyes; \
+ local_target=3D"$$target-am"; \
+ else \
+ local_target=3D"$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=3D*) exit 1;; *k*) fail=3Dyes;; *) exit 1;; esa=
c; \
+ done; \
+ if test "$$dot_seen" =3D "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $$MAKEFLAGS; amf=3D$$2; \
+ dot_seen=3Dno; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list=3D'$(DIST_SUBDIRS)' ;; \
+ *) list=3D'$(SUBDIRS)' ;; \
+ esac; \
+ rev=3D''; for subdir in $$list; do \
+ if test "$$subdir" =3D "."; then :; else \
+ rev=3D"$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev=3D"$$rev ."; \
+ target=3D`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" =3D "."; then \
+ local_target=3D"$$target-am"; \
+ else \
+ local_target=3D"$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=3D*) exit 1;; *k*) fail=3Dyes;; *) exit 1;; esa=
c; \
+ done && test -z "$$fail"
+tags-recursive:
+ list=3D'$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" =3D . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags=
); \
+ done
+
+ETAGS =3D etags
+ETAGSFLAGS =3D
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list=3D'$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=3D`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] =3D 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCI=
ES) \
+ $(TAGS_FILES) $(LISP)
+ tags=3D; \
+ here=3D`pwd`; \
+ list=3D'$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" =3D .; then :; else \
+ test -f $$subdir/TAGS && tags=3D"$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list=3D'$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=3D`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] =3D 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=3D`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+DISTFILES =3D $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir =3D .
+distdir =3D $(PACKAGE)-$(VERSION)
+
+am__remove_distdir =3D \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+
+GZIP_ENV =3D --best
+distcleancheck_listfiles =3D find . -type f -print
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ @list=3D'$(DISTFILES)'; for file in $$list; do \
+ if test -f $$file || test -d $$file; then d=3D.; else d=3D$(srcdir); =
fi; \
+ dir=3D`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" !=3D "$$file" && test "$$dir" !=3D "."; then \
+ dir=3D"/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=3D''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d !=3D $(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=3D'$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" =3D .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir=3D"$(top_distdir)" \
+ distdir=3D../$(distdir)/$$subdir \
+ 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 $(SHELL) $(install_sh) -c -m a+r {} {} \=
; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=3D$(GZIP_ENV) gzip -c >$(distdir).tar=
.gz
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=3D$(GZIP_ENV) gzip -c >$(distdir).tar=
.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. The=
n
+# it guarantees that the distribution is self-contained by making anothe=
r
+# tarfile.
+distcheck: dist
+ $(am__remove_distdir)
+ GZIP=3D$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/=3Dbuild
+ mkdir $(distdir)/=3Dinst
+ chmod a-w $(distdir)
+ dc_install_base=3D`$(am__cd) $(distdir)/=3Dinst && pwd` \
+ && cd $(distdir)/=3Dbuild \
+ && ../configure --srcdir=3D.. --prefix=3D$$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 \
+ && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ find $$dc_install_base -type f -print ; \
+ exit 1; } >&2 ) \
+ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
+ && rm -f $(distdir).tar.gz \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @echo "$(distdir).tar.gz is ready for distribution" | \
+ sed 'h;s/./=3D/g;p;x;p;x'
+distcleancheck: distclean
+ if test '$(srcdir)' =3D . ; 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 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=3D"$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=3D-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=3DSTRIPPROG=3D'$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+distclean-am: clean-am distclean-generic distclean-hdr distclean-libtool=
\
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf autom4te.cache
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
+ clean-generic clean-libtool clean-recursive dist dist-all \
+ dist-gzip distcheck distclean distclean-generic distclean-hdr \
+ distclean-libtool distclean-recursive distclean-tags \
+ distcleancheck distdir dvi dvi-am dvi-recursive info info-am \
+ info-recursive install install-am install-data install-data-am \
+ install-data-recursive install-exec install-exec-am \
+ install-exec-recursive install-info install-info-am \
+ install-info-recursive install-man install-recursive \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am installdirs-recursive maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive mostlyclean \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
+ tags tags-recursive uninstall uninstall-am uninstall-info-am \
+ uninstall-info-recursive uninstall-recursive
+
+# 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:
Added: trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.vs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.vs 2007-03-10 21:38:29 =
UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/Makefile.vs 2007-03-10 21:41:34 =
UTC (rev 1290)
@@ -0,0 +1,23 @@
+all: dmxwizard
+
+disc_id:
+ @devenv.exe dvdread.sln /build "Release Unicode|Win32" /project "disc_i=
d" /out "dvdread.log"
+
+filestat:
+ @devenv.exe dvdread.sln /build "Release Unicode|Win32" /project "filest=
at" /out "dvdread.log"
+
+ifo_dump:
+ @devenv.exe dvdread.sln /build "Release Unicode|Win32" /project "ifo_du=
mp" /out "dvdread.log"
+
+play_title:
+ @devenv.exe dvdread.sln /build "Release Unicode|Win32" /project "play_t=
itle" /out "dvdread.log"
+
+title_info:
+ @devenv.exe dvdread.sln /build "Release Unicode|Win32" /project "title_=
info" /out "dvdread.log"
+
+dvdread:
+ @devenv.exe dvdread.sln /build "Release Unicode|Win32" /project "dvdrea=
d" /out "dvdread.log"
+
+clean:
+ @rm -rf ../../build/vs_2005/
+ @rm -rf ../../release/vs_2005/
Added: trunk/DvdMenuXtractor/dmx/libdvdread/NEWS
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/NEWS 2007-03-10 21:38:29 UTC (re=
v 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/NEWS 2007-03-10 21:41:34 UTC (re=
v 1290)
@@ -0,0 +1,46 @@
+Version 0.9.4
+ Environment variable DVDREAD_NOKEYS can be used to turn off reading al=
l key.
+ Only export the functions in the public interface.
+ New functions DVDDiscID, DVDUDFVolumeInfo and DVDISOVolumeInfo.
+ Can optionally link with libdvdcss instead of trying to dlopen it.
+ Several data structures now have more fields that where unknown earlie=
r.
+ Compilable with Sun's Forte compiler.
+ Remove all asserts, now just print an error message and continues.
+ Use swap functions in FreeBSD 5.
+ Add types, read and print functions for VTS_TMAPT (Time map table).
+ Add Multichannel Extension, correct PLT_MAIT (Parental Management) inf=
o.
+ More Doxygen markup and comments.
+ Fix a seg fault and key issue for access to DVDs as a collection of fi=
les.
+ Build fixes.
+
+Version 0.9.3
+ Support for MacOS X/Darwin have been added.
+ Ported to use libdvdcss2 (1.2.0 and later).
+ Can now use libdvdcss to also decrypt files on a normal filsystem.
+ A bit more tolerant of incorrectly mastered DVDs.
+ Build robustness fixes from Mark Espie.
+ Added some Doxygen markup and comments.
+
+Version 0.9.2
+ Add support for BSD/OS. Make sure that the raw device is used on all
+ BSD variants for the CSS ioctls to work correctly. Small bug fix for
+ access to mounted DVD via soft-links and a malloc/free mistake.
+ Increase an assert level for pgcn numbers in the part of title list.
+ =20
+Version 0.9.1
+ Change the way the endian swaps are defined and make sure Solaris x86 =
works.
+ Fix from Juergen Keil for a bug that caused libdvdread to close random=
fds.
+ Update the limit on the number of pgcs in the pgcit to 10000.
+ Correct bug in 0.9.0 that made using a DVD located on a normal filsyst=
em
+ impossible.
+
+Version 0.9.0
+ API breakage, new types to not be influenced by differing off_t types=20
+ and DVDReadBlocks now returns blocks read not bytes read.
+ Changed to use libdvdcss (from VideoLAN).
+ Add support for finding the raw devices of a DVD on Solaris.
+ FreeBSD fixes from Marc van Woerkom and OpenBSD fixes from Bj=F6rn San=
dell.
+ Configure fixes to work better on *BSD and other systems.
+
+Version 0.8.0
+ Initial public release.
Added: trunk/DvdMenuXtractor/dmx/libdvdread/README
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/README 2007-03-10 21:38:29 UTC (=
rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/README 2007-03-10 21:41:34 UTC (=
rev 1290)
@@ -0,0 +1,21 @@
+
+libdvdread
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
+libdvdread provides a simple foundation for reading DVD-Video images.
+It offers DVD applications:
+
+1. A simple abstraction for reading the files on a DVD image
+ (dvd_reader.h).
+2. A simple library for parsing the information (IFO) files
+ (ifo_read.h/ifo_types.h).
+3. A simple library for parsing the navigation (NAV) packets
+ (nav_read.h/nav_types.h).
+
+This allows application designers to access some of the more advanced
+features of the DVD format.
+
+libdvdread currently uses libdl to dynamically probe for libdvdcss at
+runtime. If libdvdcss is found, then it will be used to decrypt the
+encrypted sections of a DVD.
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/TODO
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/TODO 2007-03-10 21:38:29 UTC (re=
v 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/TODO 2007-03-10 21:41:34 UTC (re=
v 1290)
@@ -0,0 +1,7 @@
+
+* we don't have any functions for reading / printing TXT_MGI
+* rename zero_1 and add bitfields / macro constants in pgcit_srpt
+ - done, are any of the other pgci_t pgci_ut_t pgci_lu_t affected?
+* if an encrypted block is being read and libdvdcss is unavailable,
+ we should probably return 0 to help it fail.
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/acinclude.m4
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/acinclude.m4 2007-03-10 21:38:29=
UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/acinclude.m4 2007-03-10 21:41:34=
UTC (rev 1290)
@@ -0,0 +1,94 @@
+dnl AC_C_ATTRIBUTE_PACKED
+dnl set ATTRIBUTE_PACKED if this is supported
+AC_DEFUN([AC_C_ATTRIBUTE_PACKED],
+ [AC_CACHE_CHECK([__attribute__ ((packed)) support],
+ [ac_cv_c_attribute_packed],
+ [AC_TRY_COMPILE([],
+ [static struct { int a; } __attribute__ ((packed)) c =3D {0};],
+ [ac_cv_c_attribute_packed=3Dyes],
+ [ac_cv_c_attribute_packed=3Dno])
+ ])
+ if test x"$ac_cv_c_attribute_packed" =3D x"yes"; then
+ ATTRIBUTE_PACKED=3D"__attribute__ ((packed))"
+ fi])
+
+
+dnl The following AC macros are from mpeg2dec.
+dnl Written by Michel Lespinasse <walken at zoy.org>
+
+dnl AC_C_ATTRIBUTE_ALIGNED
+dnl define ATTRIBUTE_ALIGNED_MAX to the maximum alignment if this is sup=
ported
+AC_DEFUN([AC_C_ATTRIBUTE_ALIGNED],
+ [AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
+ [ac_cv_c_attribute_aligned],
+ [ac_cv_c_attribute_aligned=3D0
+ for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
+ AC_TRY_COMPILE([],
+ [static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) =3D =
0; return c;],
+ [ac_cv_c_attribute_aligned=3D$ac_cv_c_attr_align_try])
+ done])
+ if test x"$ac_cv_c_attribute_aligned" !=3D x"0"; then
+ AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
+ [$ac_cv_c_attribute_aligned],[maximum supported data alignment])
+ fi])
+
+dnl AC_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
+dnl check if $CC supports a given set of cflags
+AC_DEFUN([AC_TRY_CFLAGS],
+ [AC_MSG_CHECKING([if $CC supports $1 flags])
+ SAVE_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$1"
+ AC_TRY_COMPILE([],[],[ac_cv_try_cflags_ok=3Dyes],[ac_cv_try_cflags_o=
k=3Dno])
+ CFLAGS=3D"$SAVE_CFLAGS"
+ AC_MSG_RESULT([$ac_cv_try_cflags_ok])
+ if test x"$ac_cv_try_cflags_ok" =3D x"yes"; then
+ ifelse([$2],[],[:],[$2])
+ else
+ ifelse([$3],[],[:],[$3])
+ fi])
+
+dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY)
+dnl generate a default inttypes.h if the header file does not exist alre=
ady
+dnl Written by: Michel Lespinasse <walken at zoy.org>
+AC_DEFUN([AC_CHECK_GENERATE_INTTYPES],
+ [rm -f $1/inttypes.h
+ AC_CHECK_HEADER([inttypes.h],[],
+ [AC_CHECK_SIZEOF([char])
+ AC_CHECK_SIZEOF([short])
+ AC_CHECK_SIZEOF([int])
+ AC_CHECK_SIZEOF([long long])
+ if test x"$ac_cv_sizeof_char" !=3D x"1" -o \
+ x"$ac_cv_sizeof_short" !=3D x"2" -o \
+ x"$ac_cv_sizeof_int" !=3D x"4" -o \
+ x"$ac_cv_sizeof_long_long" !=3D x"8"; then
+ AC_MSG_ERROR([can not build a default inttypes.h])
+ fi
+ cat >$1/inttypes.h << EOF
+/* default inttypes.h for people who do not have it on their system */
+
+#ifndef _INTTYPES_H
+#define _INTTYPES_H
+#if (!defined __int8_t_defined) && (!defined __BIT_TYPES_DEFINED__)
+#define __int8_t_defined
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed int int32_t;
+typedef signed long long int64_t;
+#endif
+#if (!defined _LINUX_TYPES_H)
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long uint64_t;
+#endif
+#endif
+EOF
+ ])])
+
+dnl AC_COMPILE_CHECK_SIZEOF (TYPE SUPPOSED-SIZE)
+dnl abort if the given type does not have the supposed size
+AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
+ [AC_MSG_CHECKING(that size of $1 is $2)
+ AC_TRY_COMPILE([],[switch (0) case 0: case (sizeof ($1) =3D=3D $2):;=
],[],
+ [AC_MSG_ERROR([can not build a default inttypes.h])])
+ AC_MSG_RESULT([yes])])
Added: trunk/DvdMenuXtractor/dmx/libdvdread/aclocal.m4
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/aclocal.m4 2007-03-10 21:38:29 U=
TC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/aclocal.m4 2007-03-10 21:41:34 U=
TC (rev 1290)
@@ -0,0 +1,4460 @@
+# aclocal.m4 generated automatically by aclocal 1.6.2 -*- Autoconf -*-
+
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# 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.
+
+dnl AC_C_ATTRIBUTE_PACKED
+dnl set ATTRIBUTE_PACKED if this is supported
+AC_DEFUN([AC_C_ATTRIBUTE_PACKED],
+ [AC_CACHE_CHECK([__attribute__ ((packed)) support],
+ [ac_cv_c_attribute_packed],
+ [AC_TRY_COMPILE([],
+ [static struct { int a; } __attribute__ ((packed)) c =3D {0};],
+ [ac_cv_c_attribute_packed=3Dyes],
+ [ac_cv_c_attribute_packed=3Dno])
+ ])
+ if test x"$ac_cv_c_attribute_packed" =3D x"yes"; then
+ ATTRIBUTE_PACKED=3D"__attribute__ ((packed))"
+ fi])
+
+
+dnl The following AC macros are from mpeg2dec.
+dnl Written by Michel Lespinasse <walken at zoy.org>
+
+dnl AC_C_ATTRIBUTE_ALIGNED
+dnl define ATTRIBUTE_ALIGNED_MAX to the maximum alignment if this is sup=
ported
+AC_DEFUN([AC_C_ATTRIBUTE_ALIGNED],
+ [AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
+ [ac_cv_c_attribute_aligned],
+ [ac_cv_c_attribute_aligned=3D0
+ for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
+ AC_TRY_COMPILE([],
+ [static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) =3D =
0; return c;],
+ [ac_cv_c_attribute_aligned=3D$ac_cv_c_attr_align_try])
+ done])
+ if test x"$ac_cv_c_attribute_aligned" !=3D x"0"; then
+ AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
+ [$ac_cv_c_attribute_aligned],[maximum supported data alignment])
+ fi])
+
+dnl AC_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS])
+dnl check if $CC supports a given set of cflags
+AC_DEFUN([AC_TRY_CFLAGS],
+ [AC_MSG_CHECKING([if $CC supports $1 flags])
+ SAVE_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$1"
+ AC_TRY_COMPILE([],[],[ac_cv_try_cflags_ok=3Dyes],[ac_cv_try_cflags_o=
k=3Dno])
+ CFLAGS=3D"$SAVE_CFLAGS"
+ AC_MSG_RESULT([$ac_cv_try_cflags_ok])
+ if test x"$ac_cv_try_cflags_ok" =3D x"yes"; then
+ ifelse([$2],[],[:],[$2])
+ else
+ ifelse([$3],[],[:],[$3])
+ fi])
+
+dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY)
+dnl generate a default inttypes.h if the header file does not exist alre=
ady
+dnl Written by: Michel Lespinasse <walken at zoy.org>
+AC_DEFUN([AC_CHECK_GENERATE_INTTYPES],
+ [rm -f $1/inttypes.h
+ AC_CHECK_HEADER([inttypes.h],[],
+ [AC_CHECK_SIZEOF([char])
+ AC_CHECK_SIZEOF([short])
+ AC_CHECK_SIZEOF([int])
+ AC_CHECK_SIZEOF([long long])
+ if test x"$ac_cv_sizeof_char" !=3D x"1" -o \
+ x"$ac_cv_sizeof_short" !=3D x"2" -o \
+ x"$ac_cv_sizeof_int" !=3D x"4" -o \
+ x"$ac_cv_sizeof_long_long" !=3D x"8"; then
+ AC_MSG_ERROR([can not build a default inttypes.h])
+ fi
+ cat >$1/inttypes.h << EOF
+/* default inttypes.h for people who do not have it on their system */
+
+#ifndef _INTTYPES_H
+#define _INTTYPES_H
+#if (!defined __int8_t_defined) && (!defined __BIT_TYPES_DEFINED__)
+#define __int8_t_defined
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed int int32_t;
+typedef signed long long int64_t;
+#endif
+#if (!defined _LINUX_TYPES_H)
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long uint64_t;
+#endif
+#endif
+EOF
+ ])])
+
+dnl AC_COMPILE_CHECK_SIZEOF (TYPE SUPPOSED-SIZE)
+dnl abort if the given type does not have the supposed size
+AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
+ [AC_MSG_CHECKING(that size of $1 is $2)
+ AC_TRY_COMPILE([],[switch (0) case 0: case (sizeof ($1) =3D=3D $2):;=
],[],
+ [AC_MSG_ERROR([can not build a default inttypes.h])])
+ AC_MSG_RESULT([yes])])
+
+# Do all the work for Automake. -*- Autoconf =
-*-
+
+# 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.
+
+# Copyright 1996, 1997, 1998, 1999, 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.
+
+# serial 8
+
+# 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...
+
+
+AC_PREREQ([2.52])
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# 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_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" !=3D "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean=
" there first])
+fi
+
+# 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
+ 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])])d=
nl
+
+# 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_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# 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
+
+_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)])])d=
nl
+AC_PROVIDE_IFELSE([AC_PROG_][CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_][CXX],
+ defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])]=
)dnl
+])
+])
+
+# Copyright 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
+
+# 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.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version=3D"1.6"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.6.2])])
+
+# Helper functions for option handling. -*- Autoconf =
-*-
+
+# Copyright 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.
+
+# serial 2
+
+# _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 o=
ption.
+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.
+#
+
+# Copyright 1996, 1997, 2000, 2001 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.
+
+# serial 3
+
+# 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 "$[*]" =3D "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" !=3D "X $srcdir/configure conftest.file" \
+ && test "$[*]" !=3D "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 bro=
ken
+alias in your environment])
+ fi
+
+ test "$[2]" =3D 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)])
+
+# -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 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.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=3D${$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
+test x"${MISSING+set}" =3D xset || MISSING=3D"\${SHELL} $am_aux_dir/miss=
ing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run=3D"$MISSING --run "
+else
+ am_missing_run=3D
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 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.
+
+# 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=3D'\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\=
)"`
+# and then we would define $MISSING as
+# MISSING=3D"\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, becaus=
e
+# 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.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=3D`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 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.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=3D${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 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.
+
+# 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 =3D yes, because it might be `maybe'=
.
+if test "$cross_compiling" !=3D no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM=3D"\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# serial 4 -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001 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.
+
+
+# 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=3D"$CC" am_compiler_list=3D],
+ [$1], CXX, [depcc=3D"$CXX" am_compiler_list=3D],
+ [$1], OBJC, [depcc=3D"$OBJC" am_compiler_list=3D'gcc3 gcc'],
+ [$1], GCJ, [depcc=3D"$GCJ" am_compiler_list=3D'gcc3 gcc'],
+ [depcc=3D"$$1" am_compiler_list=3D])
+
+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
+
+ am_cv_$1_dependencies_compiler_type=3Dnone
+ if test "$am_compiler_list" =3D ""; then
+ am_compiler_list=3D`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./dep=
comp`
+ fi
+ for depmode in $am_compiler_list; do
+ # 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.
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
+ echo "${am__include} ${am__quote}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" =3D 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=3D$depmode \
+ source=3Dconftest.c object=3Dconftest.o \
+ depfile=3Dconftest.Po tmpdepfile=3Dconftest.TPo \
+ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>=
&1 &&
+ grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ am_cv_$1_dependencies_compiler_type=3D$depmode
+ break
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=3Dnone
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=3D$am_cv_$1_dependencies_compiler_type])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+ DEPDIR=3D.deps
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ DEPDIR=3D_deps
+fi
+rmdir .deps 2>/dev/null
+AC_SUBST([DEPDIR])
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors=
])
+if test "x$enable_dependency_tracking" !=3D xno; then
+ am_depcomp=3D"$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH=3D'\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" !=3D xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright 1999, 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.
+
+#serial 2
+
+# _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=3D`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.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=3D`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ grep '^DEP_FILES *=3D *[[^ @%:@]]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=3D`sed -n -e '/^DEPDIR =3D / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=3D`sed -n -e '/^U =3D / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # 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 -e '
+ /^DEP_FILES =3D .*\\\\$/ {
+ s/^DEP_FILES =3D //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES =3D / s/^DEP_FILES =3D //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=3D`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" !=3D x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir"])
+])
+
+# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf=
-*-
+
+# This program is free software; you can redistribute 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.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=3D${MAKE-make}
+cat > confinc << 'END'
+doit:
+ @echo done
+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=3D"#"
+am__quote=3D
+_am_result=3Dnone
+# 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 | fgrep -v 'ing directory'`=
" =3D "done"; then
+ am__include=3Dinclude
+ am__quote=3D
+ _am_result=3DGNU
+fi
+# Now try BSD make style include.
+if test "$am__include" =3D "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" =3D "done"; then
+ am__include=3D.include
+ am__quote=3D"\""
+ _am_result=3DBSD
+ fi
+fi
+AC_SUBST(am__include)
+AC_SUBST(am__quote)
+AC_MSG_RESULT($_am_result)
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL -*- Autoco=
nf -*-
+
+# Copyright 1997, 2000, 2001 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.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=3D
+ $1_FALSE=3D'#'
+else
+ $1_TRUE=3D'#'
+ $1_FALSE=3D
+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])])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoco=
nf -*-
+
+# Copyright 1996, 1997, 2000, 2001 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.
+
+AC_PREREQ([2.52])
+
+# serial 6
+
+# 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. We must strip everything past the first ":",
+# and everything past the last "/".
+
+# _AM_DIRNAME(PATH)
+# -----------------
+# Like AS_DIRNAME, only do it during macro expansion
+AC_DEFUN([_AM_DIRNAME],
+ [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
+ m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
+ m4_if(regexp([$1], [^/.*]), -1,
+ [.],
+ patsubst([$1], [^\(/\).*], [\1])),
+ patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
+ patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
+])# _AM_DIRNAME
+
+
+# The stamp files are numbered to have different names.
+# We could number them on a directory basis, but that's additional
+# complications, let's have a unique counter.
+m4_define([_AM_STAMP_Count], [0])
+
+
+# _AM_STAMP(HEADER)
+# -----------------
+# The name of the stamp file for HEADER.
+AC_DEFUN([_AM_STAMP],
+[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
+AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
+ [:.*])))/stamp-h[]_AM_STAMP_Count])
+
+
+# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
+# ------------------------------------------------------------
+# We used to try to get a real timestamp in stamp-h. But the fear is th=
at
+# that will cause unnecessary cvs conflicts.
+AC_DEFUN([_AM_CONFIG_HEADER],
+[# Add the stamp file to the list of files AC keeps track of,
+# along with our hook.
+AC_CONFIG_HEADERS([$1],
+ [# update the timestamp
+echo 'timestamp for $1' >"_AM_STAMP([$1])"
+$2],
+ [$3])
+])# _AM_CONFIG_HEADER
+
+
+# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
+# --------------------------------------------------------------
+AC_DEFUN([AM_CONFIG_HEADER],
+[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
+])# AM_CONFIG_HEADER
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# Copyright 1996, 1998, 2000, 2001 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.
+
+# serial 1
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Make=
files])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode enable make rules and dependencies not usefu=
l
+ (and sometimes confusing) to the casual instal=
ler],
+ USE_MAINTAINER_MODE=3D$enableval,
+ USE_MAINTAINER_MODE=3Dno)
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE =3D yes])
+ MAINT=3D$MAINTAINER_MODE_TRUE
+ AC_SUBST(MAINT)dnl
+]
+)
+
+# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
+
+# serial 46 AC_PROG_LIBTOOL
+
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=3D"$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL=3D'$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])
+
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.13)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
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+
+_LT_AC_PROG_ECHO_BACKSLASH
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" =3D '$MAGIC_CMD'; then
+ AC_PATH_MAGIC
+ fi
+ ;;
+esac
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=3Dyes, enable_dlopen=
=3Dno)
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=3Dyes, enable_win32_dll=3Dno)
+
+AC_ARG_ENABLE(libtool-lock,
+ [ --disable-libtool-lock avoid locking (might break parallel builds)=
])
+test "x$enable_libtool_lock" !=3D xno && enable_libtool_lock=3Dyes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD=3D"${LD-ld} -32"
+ ;;
+ *N32*)
+ LD=3D"${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD=3D"${LD-ld} -64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_be=
lf,
+ [AC_LANG_SAVE
+ AC_LANG_C
+ AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=3Dyes],[lt_cv_cc_needs_belf=3D=
no])
+ AC_LANG_RESTORE])
+ if test x"$lt_cv_cc_needs_belf" !=3D x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS=3D"$SAVE_CFLAGS"
+ fi
+ ;;
+
+ifdef([AC_PROVIDE_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)
+
+ # recent cygwin and mingw systems supply a stub DllMain which the user
+ # can override, but on older systems we have to supply one
+ AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need=
_dllmain,
+ [AC_TRY_LINK([],
+ [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*=
);
+ DllMain (0, 0, 0);],
+ [lt_cv_need_dllmain=3Dno],[lt_cv_need_dllmain=3Dyes])])
+
+ case $host/$CC in
+ *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
+ # old mingw systems require "-dll" to link a DLL, while more recent =
ones
+ # require "-mdll"
+ SAVE_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$CFLAGS -mdll"
+ AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
+ [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=3D-mdll],[lt_cv_cc_dll_s=
witch=3D-dll])])
+ CFLAGS=3D"$SAVE_CFLAGS" ;;
+ *-*-cygwin* | *-*-pw32*)
+ # cygwin systems need to pass --dll to the linker, and not link
+ # crt.o which will require a WinMain at 16 definition.
+ lt_cv_cc_dll_switch=3D"-Wl,--dll -nostartfiles" ;;
+ esac
+ ;;
+ ])
+esac
+
+_LT_AC_LTCONFIG_HACK
+
+])
+
+# AC_LIBTOOL_HEADER_ASSERT
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
+[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
+ [lt_cv_func_assert_works],
+ [case $host in
+ *-*-solaris*)
+ if test "$GCC" =3D yes && test "$with_gnu_ld" !=3D yes; then
+ case `$CC --version 2>/dev/null` in
+ [[12]].*) lt_cv_func_assert_works=3Dno ;;
+ *) lt_cv_func_assert_works=3Dyes ;;
+ esac
+ fi
+ ;;
+ esac])
+
+if test "x$lt_cv_func_assert_works" =3D xyes; then
+ AC_CHECK_HEADERS(assert.h)
+fi
+])# AC_LIBTOOL_HEADER_ASSERT
+
+# _LT_AC_CHECK_DLFCN
+# --------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)
+])# _LT_AC_CHECK_DLFCN
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol fro=
m nm.
+AC_MSG_CHECKING([command to parse $NM output])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
+
+# 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=3D'[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat=3D'\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm=3D'\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_global_symbol_to_cdecl=3D"sed -n -e 's/^. .* \(.*\)$/extern char \=
1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_global_symbol_to_c_name_address=3D"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=3D'[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode=3D'[[ABCDGISTW]]'
+ ;;
+hpux*) # Its linker distinguishes data from code symbols
+ lt_cv_global_symbol_to_cdecl=3D"sed -n -e 's/^T .* \(.*\)$/extern char=
\1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+ lt_cv_global_symbol_to_c_name_address=3D"sed -n -e 's/^: \([[^ ]]*\) $=
/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$=
/ {\"\2\", (lt_ptr) \&\2},/p'"
+ ;;
+irix*)
+ symcode=3D'[[BCDEGRST]]'
+ ;;
+solaris* | sysv5*)
+ symcode=3D'[[BDT]]'
+ ;;
+sysv4)
+ symcode=3D'[[DFNSTU]]'
+ ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=3D
+case $host_os in
+mingw*)
+ opt_cr=3D`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+ symcode=3D'[[ABCDGISTW]]'
+fi
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Write the raw and C identifiers.
+lt_cv_sys_global_symbol_pipe=3D"sed -n -e 's/^.*[[ ]]\($symcode$symcode=
*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=3Dno
+ rm -f conftest*
+ cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var=3D'a';nm_test_func();return(0);}
+EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=3Dconftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pi=
pe \> $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 egrep ' nm_test_var$' "$nlist" >/dev/null; then
+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
+
+ cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr address;
+}
+lt_preloaded_symbols[[]] =3D
+{
+EOF
+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/"=
< "$nlist" >> conftest.$ac_ext
+ cat <<\EOF >> conftest.$ac_ext
+ {0, (lt_ptr) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ save_LIBS=3D"$LIBS"
+ save_CFLAGS=3D"$CFLAGS"
+ LIBS=3D"conftstm.$ac_objext"
+ CFLAGS=3D"$CFLAGS$no_builtin_flag"
+ if AC_TRY_EVAL(ac_link) && test -s conftest; then
+ pipe_works=3Dyes
+ fi
+ LIBS=3D"$save_LIBS"
+ CFLAGS=3D"$save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
+ fi
+ else
+ echo "$progname: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" =3D yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=3D
+ fi
+done
+])
+global_symbol_pipe=3D"$lt_cv_sys_global_symbol_pipe"
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ global_symbol_to_cdecl=3D
+ global_symbol_to_c_name_address=3D
+else
+ global_symbol_to_cdecl=3D"$lt_cv_global_symbol_to_cdecl"
+ global_symbol_to_c_name_address=3D"$lt_cv_global_symbol_to_c_name_addr=
ess"
+fi
+if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c=
_name_address";
+then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
+# ---------------------------------
+AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
+[# Find the correct PATH separator. Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" !=3D Xset; then
+ UNAME=3D${UNAME-`uname 2>/dev/null`}
+ case X$UNAME in
+ *-DOS) lt_cv_sys_path_separator=3D';' ;;
+ *) lt_cv_sys_path_separator=3D':' ;;
+ esac
+ PATH_SEPARATOR=3D$lt_cv_sys_path_separator
+fi
+])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
+
+# _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],
+[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
+
+# Check that we are running under the correct shell.
+SHELL=3D${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=3D`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+ ;;
+esac
+
+echo=3D${ECHO-echo}
+if test "X[$]1" =3D X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X[$]1" =3D X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" =3D 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" =3D X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" =3D Xset; then CDPATH=3D:; export CDPATH; fi
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" !=3D 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=3D"`eval $cmd`") 2>/dev/null &&
+ echo_test_string=3D"`eval $cmd`" &&
+ (test "X$echo_test_string" =3D "X$echo_test_string") 2>/dev/null
+ then
+ break
+ fi
+ done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" =3D 'X\t' &&
+ echo_testing_string=3D`($echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" =3D "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.
+
+ IFS=3D"${IFS=3D }"; save_ifs=3D"$IFS"; IFS=3D$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" =3D 'X\t' &&
+ echo_testing_string=3D`($dir/echo "$echo_test_string") 2>/dev/nul=
l` &&
+ test "X$echo_testing_string" =3D "X$echo_test_string"; then
+ echo=3D"$dir/echo"
+ break
+ fi
+ done
+ IFS=3D"$save_ifs"
+
+ if test "X$echo" =3D Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`(print -r '\t') 2>/dev/null`" =3D 'X\t' &&
+ echo_testing_string=3D`(print -r "$echo_test_string") 2>/dev/null=
` &&
+ test "X$echo_testing_string" =3D "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ echo=3D'print -r'
+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+ test "X$CONFIG_SHELL" !=3D X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=3D/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ else
+ # Try using printf.
+ echo=3D'printf %s\n'
+ if test "X`($echo '\t') 2>/dev/null`" =3D 'X\t' &&
+ echo_testing_string=3D`($echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" =3D "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=3D`($ORIGINAL_CONFIG_SHELL "[$]0" --fallb=
ack-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" =3D 'X\t' &&
+ echo_testing_string=3D`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-ech=
o "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" =3D "X$echo_test_string"; then
+ CONFIG_SHELL=3D$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL=3D"$CONFIG_SHELL"
+ export SHELL
+ echo=3D"$CONFIG_SHELL [$]0 --fallback-echo"
+ elif echo_testing_string=3D`($CONFIG_SHELL "[$]0" --fallback-echo =
'\t') 2>/dev/null` &&
+ test "X$echo_testing_string" =3D 'X\t' &&
+ echo_testing_string=3D`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_=
test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" =3D "X$echo_test_string"; then
+ echo=3D"$CONFIG_SHELL [$]0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=3D:
+
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"=
' 'sed 50q "[$]0"'; do
+ if (test "X$echo_test_string" =3D "X`eval $cmd`") 2>/dev/null
+ then
+ break
+ fi
+ prev=3D"$cmd"
+ done
+
+ if test "$prev" !=3D 'sed 50q "[$]0"'; then
+ echo_test_string=3D`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=3Decho
+ 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=3D$echo
+if test "X$ECHO" =3D "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+ ECHO=3D"$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+AC_DIVERT_POP
+])# _LT_AC_PROG_ECHO_BACKSLASH
+
+# _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],
+[if test "$cross_compiling" =3D yes; then :
+ [$4]
+else
+ AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+ lt_dlunknown=3D0; lt_dlno_uscore=3D1; lt_dlneed_uscore=3D2
+ lt_status=3D$lt_dlunknown
+ cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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=3D42;}
+int main ()
+{
+ void *self =3D dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status =3D $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status =3D $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status =3D $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+
+ exit (status);
+}]
+EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; t=
hen
+ (./conftest; exit; ) 2>/dev/null
+ lt_status=3D$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_unknown|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],
+[if test "x$enable_dlopen" !=3D xyes; then
+ enable_dlopen=3Dunknown
+ enable_dlopen_self=3Dunknown
+ enable_dlopen_self_static=3Dunknown
+else
+ lt_cv_dlopen=3Dno
+ lt_cv_dlopen_libs=3D
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen=3D"load_add_on"
+ lt_cv_dlopen_libs=3D
+ lt_cv_dlopen_self=3Dyes
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ lt_cv_dlopen=3D"LoadLibrary"
+ lt_cv_dlopen_libs=3D
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen=3D"shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen=3D"shl_load" lt_cv_dlopen_libs=3D"-dld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen=3D"dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen=3D"dlopen" lt_cv_dlopen_libs=3D"-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen=3D"dlopen" lt_cv_dlopen_libs=3D"-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen=3D"dld_link" lt_cv_dlopen_libs=3D"-dld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" !=3D xno; then
+ enable_dlopen=3Dyes
+ else
+ enable_dlopen=3Dno
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=3D"$CPPFLAGS"
+ AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+ test "x$ac_cv_header_dlfcn_h" =3D xyes && CPPFLAGS=3D"$CPPFLAGS -DHA=
VE_DLFCN_H"
+
+ save_LDFLAGS=3D"$LDFLAGS"
+ eval LDFLAGS=3D\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS=3D"$LIBS"
+ LIBS=3D"$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=3Dyes, lt_cv_dlopen_self=3Dyes,
+ lt_cv_dlopen_self=3Dno, lt_cv_dlopen_self=3Dcross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" =3D xyes; then
+ LDFLAGS=3D"$LDFLAGS $link_static_flag"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen its=
elf],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_AC_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=3Dyes, lt_cv_dlopen_self_static=3Dyes,
+ lt_cv_dlopen_self_static=3Dno, lt_cv_dlopen_self_static=3Dcross)
+ ])
+ fi
+
+ CPPFLAGS=3D"$save_CPPFLAGS"
+ LDFLAGS=3D"$save_LDFLAGS"
+ LIBS=3D"$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=3D$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=3Dunknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=3D$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=3Dunknown ;;
+ esac
+fi
+])# AC_LIBTOOL_DLOPEN_SELF
+
+AC_DEFUN([_LT_AC_LTCONFIG_HACK],
+[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed=3D'sed -e s/^X//'
+sed_quote_subst=3D's/\([[\\"\\`$\\\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst=3D's/\([[\\"\\`\\\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst=3D's/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Constants:
+rm=3D"rm -f"
+
+# Global variables:
+default_ofile=3Dlibtool
+can_build_shared=3Dyes
+
+# All known linkers require a `.a' archive for static linking (except M$=
VC,
+# which needs '.lib').
+libext=3Da
+ltmain=3D"$ac_aux_dir/ltmain.sh"
+ofile=3D"$default_ofile"
+with_gnu_ld=3D"$lt_cv_prog_gnu_ld"
+need_locks=3D"$enable_libtool_lock"
+
+old_CC=3D"$CC"
+old_CFLAGS=3D"$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=3Dar
+test -z "$AR_FLAGS" && AR_FLAGS=3Dcru
+test -z "$AS" && AS=3Das
+test -z "$CC" && CC=3Dcc
+test -z "$DLLTOOL" && DLLTOOL=3Ddlltool
+test -z "$LD" && LD=3Dld
+test -z "$LN_S" && LN_S=3D"ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=3Dfile
+test -z "$NM" && NM=3Dnm
+test -z "$OBJDUMP" && OBJDUMP=3Dobjdump
+test -z "$RANLIB" && RANLIB=3D:
+test -z "$STRIP" && STRIP=3D:
+test -z "$ac_objext" && ac_objext=3Do
+
+if test x"$host" !=3D x"$build"; then
+ ac_tool_prefix=3D${host_alias}-
+else
+ ac_tool_prefix=3D
+fi
+
+# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+case $host_os in
+linux-gnu*) ;;
+linux*) host=3D`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+esac
+
+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 proble=
ms
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" !=3D Xset; then
+ COLLECT_NAMES=3D
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Determine commands to create old-style static archives.
+old_archive_cmds=3D'$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds=3D'chmod 644 $oldlib'
+old_postuninstall_cmds=3D
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds=3D"\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+ ;;
+ *)
+ old_postinstall_cmds=3D"\$RANLIB \$oldlib~$old_postinstall_cmds"
+ ;;
+ esac
+ old_archive_cmds=3D"$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+# Allow CC to be a program name with arguments.
+set dummy $CC
+compiler=3D"[$]2"
+
+AC_MSG_CHECKING([for objdir])
+rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ objdir=3D.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ objdir=3D_libs
+fi
+rmdir .libs 2>/dev/null
+AC_MSG_RESULT($objdir)
+
+
+AC_ARG_WITH(pic,
+[ --with-pic try to use only PIC/non-PIC objects [default=3D=
use both]],
+pic_mode=3D"$withval", pic_mode=3Ddefault)
+test -z "$pic_mode" && pic_mode=3Ddefault
+
+# We assume here that the value for lt_cv_prog_cc_pic will not be cached
+# in isolation, and that seeing it set (from the cache) indicates that
+# the associated values are set (in the cache) correctly too.
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+AC_CACHE_VAL(lt_cv_prog_cc_pic,
+[ lt_cv_prog_cc_pic=3D
+ lt_cv_prog_cc_shlib=3D
+ lt_cv_prog_cc_wl=3D
+ lt_cv_prog_cc_static=3D
+ lt_cv_prog_cc_no_builtin=3D
+ lt_cv_prog_cc_can_build_shared=3D$can_build_shared
+
+ if test "$GCC" =3D yes; then
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ lt_cv_prog_cc_static=3D'-static'
+
+ case $host_os in
+ aix*)
+ # Below there is a dirty hack to force normal static linking with =
-ldl
+ # The problem is because libdl dynamically linked with both libc a=
nd
+ # libC (AIX C++ library), which obviously doesn't included in libr=
aries
+ # list by gcc. This cause undefined symbols with -static flags.
+ # This hack allows C programs to be linked with "-static -ldl", bu=
t
+ # not sure about C++ programs.
+ lt_cv_prog_cc_static=3D"$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-=
lC"
+ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, bu=
t
+ # adding the `-m68020' flag to GCC prevents building anything bett=
er,
+ # like `-m68040'.
+ lt_cv_prog_cc_pic=3D'-m68020 -resident32 -malways-restore-a4'
+ ;;
+ beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_cv_prog_cc_pic=3D'-fno-common'
+ ;;
+ cygwin* | mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is bein=
g
+ # built for inclusion in a dll (and should export symbols for exam=
ple).
+ lt_cv_prog_cc_pic=3D'-DDLL_EXPORT'
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_cv_prog_cc_pic=3D-Kconform_pic
+ fi
+ ;;
+ *)
+ lt_cv_prog_cc_pic=3D'-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for PIC flags for the system compiler.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ # All AIX code is PIC.
+ if test "$host_cpu" =3D ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ else
+ lt_cv_prog_cc_static=3D'-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ # Is there a better lt_cv_prog_cc_static that works with the bundl=
ed CC?
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ lt_cv_prog_cc_static=3D"${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}a=
rchive"
+ lt_cv_prog_cc_pic=3D'+Z'
+ ;;
+
+ irix5* | irix6*)
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ lt_cv_prog_cc_static=3D'-non_shared'
+ # PIC (with -KPIC) is the default.
+ ;;
+
+ cygwin* | mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is bein=
g
+ # built for inclusion in a dll (and should export symbols for exam=
ple).
+ lt_cv_prog_cc_pic=3D'-DDLL_EXPORT'
+ ;;
+
+ newsos6)
+ lt_cv_prog_cc_pic=3D'-KPIC'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ # All OSF/1 code is PIC.
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ lt_cv_prog_cc_static=3D'-non_shared'
+ ;;
+
+ sco3.2v5*)
+ lt_cv_prog_cc_pic=3D'-Kpic'
+ lt_cv_prog_cc_static=3D'-dn'
+ lt_cv_prog_cc_shlib=3D'-belf'
+ ;;
+
+ solaris*)
+ lt_cv_prog_cc_pic=3D'-KPIC'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ ;;
+
+ sunos4*)
+ lt_cv_prog_cc_pic=3D'-PIC'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ lt_cv_prog_cc_wl=3D'-Qoption ld '
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ lt_cv_prog_cc_pic=3D'-KPIC'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ if test "x$host_vendor" =3D xsni; then
+ lt_cv_prog_cc_wl=3D'-LD'
+ else
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ fi
+ ;;
+
+ uts4*)
+ lt_cv_prog_cc_pic=3D'-pic'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_cv_prog_cc_pic=3D'-Kconform_pic'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ fi
+ ;;
+
+ *)
+ lt_cv_prog_cc_can_build_shared=3Dno
+ ;;
+ esac
+ fi
+])
+if test -z "$lt_cv_prog_cc_pic"; then
+ AC_MSG_RESULT([none])
+else
+ AC_MSG_RESULT([$lt_cv_prog_cc_pic])
+
+ # Check to make sure the pic_flag actually works.
+ AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
+ AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
+ save_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$CFLAGS $lt_cv_prog_cc_pic -DPIC"
+ AC_TRY_COMPILE([], [], [dnl
+ case $host_os in
+ hpux9* | hpux10* | hpux11*)
+ # On HP-UX, both CC and GCC only warn that PIC is supported... then
+ # they create non-PIC objects. So, if there were any warnings, we
+ # assume that PIC is not supported.
+ if test -s conftest.err; then
+ lt_cv_prog_cc_pic_works=3Dno
+ else
+ lt_cv_prog_cc_pic_works=3Dyes
+ fi
+ ;;
+ *)
+ lt_cv_prog_cc_pic_works=3Dyes
+ ;;
+ esac
+ ], [dnl
+ lt_cv_prog_cc_pic_works=3Dno
+ ])
+ CFLAGS=3D"$save_CFLAGS"
+ ])
+
+ if test "X$lt_cv_prog_cc_pic_works" =3D Xno; then
+ lt_cv_prog_cc_pic=3D
+ lt_cv_prog_cc_can_build_shared=3Dno
+ else
+ lt_cv_prog_cc_pic=3D" $lt_cv_prog_cc_pic"
+ fi
+
+ AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
+fi
+
+# Check for any special shared library compilation flags.
+if test -n "$lt_cv_prog_cc_shlib"; then
+ AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared l=
ibraries])
+ if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[=
[ ]]" >/dev/null; then :
+ else
+ AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env vari=
able and reconfigure])
+ lt_cv_prog_cc_can_build_shared=3Dno
+ fi
+fi
+
+AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
+AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
+ lt_cv_prog_cc_static_works=3Dno
+ save_LDFLAGS=3D"$LDFLAGS"
+ LDFLAGS=3D"$LDFLAGS $lt_cv_prog_cc_static"
+ AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=3Dyes])
+ LDFLAGS=3D"$save_LDFLAGS"
+])
+
+# Belt *and* braces to stop my trousers falling down:
+test "X$lt_cv_prog_cc_static_works" =3D Xno && lt_cv_prog_cc_static=3D
+AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
+
+pic_flag=3D"$lt_cv_prog_cc_pic"
+special_shlib_compile_flags=3D"$lt_cv_prog_cc_shlib"
+wl=3D"$lt_cv_prog_cc_wl"
+link_static_flag=3D"$lt_cv_prog_cc_static"
+no_builtin_flag=3D"$lt_cv_prog_cc_no_builtin"
+can_build_shared=3D"$lt_cv_prog_cc_can_build_shared"
+
+
+# Check to see if options -o and -c are simultaneously supported by comp=
iler
+AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
+AC_CACHE_VAL([lt_cv_compiler_c_o], [
+$rm -r conftest 2>/dev/null
+mkdir conftest
+cd conftest
+echo "int some_variable =3D 0;" > conftest.$ac_ext
+mkdir out
+# According to Tom Tromey, Ian Lance Taylor reported there are C compile=
rs
+# that will create temporary files in the current directory regardless o=
f
+# the output directory. Thus, making CWD read-only will cause this test
+# to fail, enabling locking or at least warning the user not to do paral=
lel
+# builds.
+chmod -w .
+save_CFLAGS=3D"$CFLAGS"
+CFLAGS=3D"$CFLAGS -o out/conftest2.$ac_objext"
+compiler_c_o=3Dno
+if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_co=
mpile) 2>out/conftest.err; } && 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
+ if test -s out/conftest.err; then
+ lt_cv_compiler_c_o=3Dno
+ else
+ lt_cv_compiler_c_o=3Dyes
+ fi
+else
+ # Append any errors to the config.log.
+ cat out/conftest.err 1>&AC_FD_CC
+ lt_cv_compiler_c_o=3Dno
+fi
+CFLAGS=3D"$save_CFLAGS"
+chmod u+w .
+$rm conftest* out/*
+rmdir out
+cd ..
+rmdir conftest
+$rm -r conftest 2>/dev/null
+])
+compiler_c_o=3D$lt_cv_compiler_c_o
+AC_MSG_RESULT([$compiler_c_o])
+
+if test x"$compiler_c_o" =3D x"yes"; then
+ # Check to see if we can write to a .lo
+ AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
+ AC_CACHE_VAL([lt_cv_compiler_o_lo], [
+ lt_cv_compiler_o_lo=3Dno
+ save_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$CFLAGS -c -o conftest.lo"
+ save_objext=3D"$ac_objext"
+ ac_objext=3Dlo
+ AC_TRY_COMPILE([], [int some_variable =3D 0;], [dnl
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ lt_cv_compiler_o_lo=3Dno
+ else
+ lt_cv_compiler_o_lo=3Dyes
+ fi
+ ])
+ ac_objext=3D"$save_objext"
+ CFLAGS=3D"$save_CFLAGS"
+ ])
+ compiler_o_lo=3D$lt_cv_compiler_o_lo
+ AC_MSG_RESULT([$compiler_o_lo])
+else
+ compiler_o_lo=3Dno
+fi
+
+# Check to see if we can do hard links to lock some files if needed
+hard_links=3D"nottested"
+if test "$compiler_c_o" =3D no && test "$need_locks" !=3D 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=3Dyes
+ $rm conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=3Dno
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=3Dno
+ ln conftest.a conftest.b 2>/dev/null && hard_links=3Dno
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" =3D no; then
+ AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be =
unsafe])
+ need_locks=3Dwarn
+ fi
+else
+ need_locks=3Dno
+fi
+
+if test "$GCC" =3D yes; then
+ # Check to see if options -fno-rtti -fno-exceptions are supported by c=
ompiler
+ AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
+ echo "int some_variable =3D 0;" > conftest.$ac_ext
+ save_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
+ compiler_rtti_exceptions=3Dno
+ AC_TRY_COMPILE([], [int some_variable =3D 0;], [dnl
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ compiler_rtti_exceptions=3Dno
+ else
+ compiler_rtti_exceptions=3Dyes
+ fi
+ ])
+ CFLAGS=3D"$save_CFLAGS"
+ AC_MSG_RESULT([$compiler_rtti_exceptions])
+
+ if test "$compiler_rtti_exceptions" =3D "yes"; then
+ no_builtin_flag=3D' -fno-builtin -fno-rtti -fno-exceptions'
+ else
+ no_builtin_flag=3D' -fno-builtin'
+ fi
+fi
+
+# See if the linker supports building shared libraries.
+AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
+
+allow_undefined_flag=3D
+no_undefined_flag=3D
+need_lib_prefix=3Dunknown
+need_version=3Dunknown
+# when you set need_version to no, make sure it does not cause -set_vers=
ion
+# flags to be left without arguments
+archive_cmds=3D
+archive_expsym_cmds=3D
+old_archive_from_new_cmds=3D
+old_archive_from_expsyms_cmds=3D
+export_dynamic_flag_spec=3D
+whole_archive_flag_spec=3D
+thread_safe_flag_spec=3D
+hardcode_into_libs=3Dno
+hardcode_libdir_flag_spec=3D
+hardcode_libdir_separator=3D
+hardcode_direct=3Dno
+hardcode_minus_L=3Dno
+hardcode_shlibpath_var=3Dunsupported
+runpath_var=3D
+link_all_deplibs=3Dunknown
+always_export_symbols=3Dno
+export_symbols_cmds=3D'$NM $libobjs $convenience | $global_symbol_pipe |=
sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+# include_expsyms should be a list of space-separated symbols to be *alw=
ays*
+# included in the symbol list
+include_expsyms=3D
+# exclude_expsyms can be an egrep regular expression of symbols to exclu=
de
+# it will be wrapped by ` (' and `)$', so one must not match beginning o=
r
+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `=
bc',
+# as well as any symbol that contains `d'.
+exclude_expsyms=3D"_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=3D
+
+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" !=3D yes; then
+ with_gnu_ld=3Dno
+ fi
+ ;;
+openbsd*)
+ with_gnu_ld=3Dno
+ ;;
+esac
+
+ld_shlibs=3Dyes
+if test "$with_gnu_ld" =3D yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc=3D'${wl}'
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX, the GNU linker is very broken
+ # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
+ ld_shlibs=3Dno
+ cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+ ;;
+
+ amigaos*)
+ archive_cmds=3D'$rm $output_objdir/a2ixlibrary.data~$echo "#define N=
AME $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" >> $ou=
tput_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd=
$output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_minus_L=3Dyes
+
+ # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> 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 use
+ # them.
+ ld_shlibs=3Dno
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null;=
then
+ allow_undefined_flag=3Dunsupported
+ # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds=3D'$CC -nostart $libobjs $deplibs $compiler_flags ${w=
l}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=3Dno
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ allow_undefined_flag=3Dunsupported
+ always_export_symbols=3Dyes
+
+ extract_expsyms_cmds=3D'test -f $output_objdir/impgen.c || \
+ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c end=
s here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impg=
en.c~
+ test -f $output_objdir/impgen.exe || (cd $output_objdir && \
+ if test "x$HOST_CC" !=3D "x" ; then $HOST_CC -o impgen impgen.c ; =
\
+ else $CC -o impgen impgen.c ; fi)~
+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
+
+ old_archive_from_expsyms_cmds=3D'$DLLTOOL --as=3D$AS --dllname $sona=
me --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
+
+ # cygwin and mingw dlls have different entry points and sets of symb=
ols
+ # to exclude.
+ # FIXME: what about values for MSVC?
+ dll_entry=3D__cygwin_dll_entry at 12
+ dll_exclude_symbols=3DDllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncyg=
win_dll_entry at 12~
+ case $host_os in
+ mingw*)
+ # mingw values
+ dll_entry=3D_DllMainCRTStartup at 12
+ dll_exclude_symbols=3DDllMain at 12,DllMainCRTStartup at 12,DllEntryPoin=
t at 12~
+ ;;
+ esac
+
+ # mingw and cygwin differ, and it's simplest to just exclude the uni=
on
+ # of the two symbol sets.
+ dll_exclude_symbols=3DDllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncyg=
win_dll_entry at 12,DllMainCRTStartup at 12,DllEntryPoint at 12
+
+ # recent cygwin and mingw systems supply a stub DllMain which the us=
er
+ # can override, but on older systems we have to supply one (in ltdll=
.c)
+ if test "x$lt_cv_need_dllmain" =3D "xyes"; then
+ ltdll_obj=3D'$output_objdir/$soname-ltdll.'"$ac_objext "
+ ltdll_cmds=3D'test -f $output_objdir/$soname-ltdll.c || sed -e "/^=
# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^#=
//; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
+ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir &=
& $CC -c $soname-ltdll.c)~'
+ else
+ ltdll_obj=3D
+ ltdll_cmds=3D
+ fi
+
+ # Extract the symbol export list from an `--export-all' def file,
+ # then regenerate the def file from the symbol export list, so that
+ # the compiled dll only exports the symbol export list.
+ # Be careful not to strip the DATA tag left be newer dlltools.
+ export_symbols_cmds=3D"$ltdll_cmds"'
+ $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --o=
utput-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
+ sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $outp=
ut_objdir/$soname-def > $export_symbols'
+
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is.
+ # If DATA tags from a recent dlltool are present, honour them!
+ archive_expsym_cmds=3D'if test "x`head -1 $export_symbols`" =3D xEXP=
ORTS; then
+ cp $export_symbols $output_objdir/$soname-def;
+ else
+ echo EXPORTS > $output_objdir/$soname-def;
+ _lt_hint=3D1;
+ cat $export_symbols | while read symbol; do
+ set dummy \$symbol;
+ case \[$]# in
+ 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+ *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname=
-def;;
+ esac;
+ _lt_hint=3D`expr 1 + \$_lt_hint`;
+ done;
+ fi~
+ '"$ltdll_cmds"'
+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_swi=
tch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $=
deplibs $compiler_flags~
+ $DLLTOOL --as=3D$AS --dllname $soname --exclude-symbols '$dll_excl=
ude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/=
$soname-base --output-exp $output_objdir/$soname-exp~
+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$so=
name-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$so=
name '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+ $DLLTOOL --as=3D$AS --dllname $soname --exclude-symbols '$dll_excl=
ude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/=
$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output=
_objdir/$libname.dll.a~
+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll=
_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler=
_flags'
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds=3D'$LD -Bshareable $libobjs $deplibs $linker_flags -o=
$lib'
+ wlarc=3D
+ else
+ archive_cmds=3D'$CC -shared -nodefaultlibs $libobjs $deplibs $comp=
iler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=3D'$CC -shared -nodefaultlibs $libobjs $deplib=
s $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$e=
xport_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=3Dno
+ cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/nul=
l; then
+ archive_cmds=3D'$CC -shared $libobjs $deplibs $compiler_flags ${wl=
}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=3D'$CC -shared $libobjs $deplibs $compiler_fla=
gs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -=
o $lib'
+ else
+ ld_shlibs=3Dno
+ fi
+ ;;
+
+ sunos4*)
+ archive_cmds=3D'$LD -assert pure-text -Bshareable -o $lib $libobjs $=
deplibs $linker_flags'
+ wlarc=3D
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null;=
then
+ archive_cmds=3D'$CC -shared $libobjs $deplibs $compiler_flags ${wl=
}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=3D'$CC -shared $libobjs $deplibs $compiler_fla=
gs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -=
o $lib'
+ else
+ ld_shlibs=3Dno
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" =3D yes; then
+ runpath_var=3DLD_RUN_PATH
+ hardcode_libdir_flag_spec=3D'${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec=3D'${wl}--export-dynamic'
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # dlltool doesn't understand --whole-archive et. al.
+ whole_archive_flag_spec=3D
+ ;;
+ *)
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec=3D"$wlarc"'--whole-archive$convenience '"$wlarc=
"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=3D
+ fi
+ ;;
+ esac
+ fi
+else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=3Dunsupported
+ always_export_symbols=3Dyes
+ archive_expsym_cmds=3D'$LD -o $output_objdir/$soname $libobjs $depli=
bs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $l=
ib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=3Dyes
+ if test "$GCC" =3D yes && test -z "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=3Dunsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" =3D ia64; then
+ # On IA64, the linker does run time linking by default, so we don'=
t
+ # have to do anything special.
+ aix_use_runtimelinking=3Dno
+ exp_sym_flag=3D'-Bexport'
+ no_entry_flag=3D""
+ else
+ aix_use_runtimelinking=3Dno
+
+ # 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 =3D "-brtl" || test $ld_flag =3D "-Wl,-brtl"); then
+ aix_use_runtimelinking=3Dyes
+ break
+ fi
+ done
+ esac
+
+ exp_sym_flag=3D'-bexport'
+ no_entry_flag=3D'-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a librar=
y
+ # 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.
+
+ hardcode_direct=3Dyes
+ archive_cmds=3D''
+ hardcode_libdir_separator=3D':'
+ if test "$GCC" =3D yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ collect2name=3D`${CC} -print-prog-name=3Dcollect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=3Dyes
+ else
+ # We have old collect2
+ hardcode_direct=3Dunsupported
+ # 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=3Dyes
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_libdir_separator=3D
+ fi
+ esac
+
+ shared_flag=3D'-shared'
+ else
+ # not using gcc
+ if test "$host_cpu" =3D ia64; then
+ shared_flag=3D'${wl}-G'
+ else
+ if test "$aix_use_runtimelinking" =3D yes; then
+ shared_flag=3D'${wl}-G'
+ else
+ shared_flag=3D'${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall can do strange things, so it is better to
+ # generate a list of symbols to export.
+ always_export_symbols=3Dyes
+ if test "$aix_use_runtimelinking" =3D 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=3D'-berok'
+ hardcode_libdir_flag_spec=3D'${wl}-blibpath:$libdir:/usr/lib:/lib'
+ archive_expsym_cmds=3D"\$CC"' -o $output_objdir/$soname $libobjs $=
deplibs $compiler_flags `if test "x${allow_undefined_flag}" !=3D "x"; the=
n echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag=
\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" =3D ia64; then
+ hardcode_libdir_flag_spec=3D'${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag=3D"-z nodefs"
+ archive_expsym_cmds=3D"\$CC $shared_flag"' -o $output_objdir/$soname ${=
wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_fla=
g} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ hardcode_libdir_flag_spec=3D'${wl}-bnolibpath ${wl}-blibpath:$libdir:/u=
sr/lib:/lib'
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag=3D'${wl}-berok'
+ # This is a bit strange, but is similar to how AIX traditionally builds
+ # it's shared libraries.
+ archive_expsym_cmds=3D"\$CC $shared_flag"' -o $output_objdir/$soname $l=
ibobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry=
_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$=
release.a $objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ archive_cmds=3D'$rm $output_objdir/a2ixlibrary.data~$echo "#define N=
AME $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" >> $ou=
tput_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd=
$output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_minus_L=3Dyes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=3Dno
+ ;;
+
+ 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=3D' '
+ allow_undefined_flag=3Dunsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=3Dlib
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds=3D'$CC -o $lib $libobjs $compiler_flags `echo "$deplibs=
" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=3D'
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds=3D'true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds=3D'lib /OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path=3D'`cygpath -w "$srcfile"`'
+ ;;
+
+ darwin* | rhapsody*)
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ allow_undefined_flag=3D'-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ allow_undefined_flag=3D'-flat_namespace -undefined suppress'
+ ;;
+ esac
+ # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+ # yet detect zsh echo's removal of \ escapes.
+ archive_cmds=3D'$nonopt $(test "x$module" =3D xyes && echo -bundle |=
| echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linke=
r_flags -install_name $rpath/$soname $verstring'
+ # We need to add '_' to the symbols in $export_symbols first
+ #archive_expsym_cmds=3D"$archive_cmds"' && strip -s $export_symbols'
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ whole_archive_flag_spec=3D'-all_load $convenience'
+ ;;
+
+ freebsd1*)
+ ld_shlibs=3Dno
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ construct=
or
+ # support. Future versions do this automatically, but an explicit c++=
rt0.o
+ # does not break anything, and helps significantly (at the cost of a l=
ittle
+ # extra space).
+ freebsd2.2*)
+ archive_cmds=3D'$LD -Bshareable -o $lib $libobjs $deplibs $linker_fl=
ags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec=3D'-R$libdir'
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds=3D'$LD -Bshareable -o $lib $libobjs $deplibs $linker_fl=
ags'
+ hardcode_direct=3Dyes
+ hardcode_minus_L=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd*)
+ archive_cmds=3D'$CC -shared -o $lib $libobjs $deplibs $compiler_flag=
s'
+ hardcode_libdir_flag_spec=3D'-R$libdir'
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ case $host_os in
+ hpux9*) archive_cmds=3D'$rm $output_objdir/$soname~$LD -b +b $instal=
l_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $=
output_objdir/$soname =3D $lib || mv $output_objdir/$soname $lib' ;;
+ *) archive_cmds=3D'$LD -b +h $soname +b $install_libdir -o $lib $lib=
objs $deplibs $linker_flags' ;;
+ esac
+ hardcode_libdir_flag_spec=3D'${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=3D:
+ hardcode_direct=3Dyes
+ hardcode_minus_L=3Dyes # Not in the search PATH, but as the default
+ # location of the library.
+ export_dynamic_flag_spec=3D'${wl}-E'
+ ;;
+
+ irix5* | irix6*)
+ if test "$GCC" =3D yes; then
+ archive_cmds=3D'$CC -shared $libobjs $deplibs $compiler_flags ${wl=
}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${w=
l}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o=
$lib'
+ else
+ archive_cmds=3D'$LD -shared $libobjs $deplibs $linker_flags -sonam=
e $soname `test -n "$verstring" && echo -set_version $verstring` -update_=
registry ${output_objdir}/so_locations -o $lib'
+ fi
+ hardcode_libdir_flag_spec=3D'${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=3D:
+ link_all_deplibs=3Dyes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds=3D'$LD -Bshareable -o $lib $libobjs $deplibs $linker_=
flags' # a.out
+ else
+ archive_cmds=3D'$LD -shared -o $lib $libobjs $deplibs $linker_flag=
s' # ELF
+ fi
+ hardcode_libdir_flag_spec=3D'-R$libdir'
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ newsos6)
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linker_=
flags'
+ hardcode_direct=3Dyes
+ hardcode_libdir_flag_spec=3D'${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=3D:
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ openbsd*)
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host=
_os-$host_cpu" =3D "openbsd2.8-powerpc"; then
+ archive_cmds=3D'$CC -shared $pic_flag -o $lib $libobjs $deplibs $l=
inker_flags'
+ hardcode_libdir_flag_spec=3D'${wl}-rpath,$libdir'
+ export_dynamic_flag_spec=3D'${wl}-E'
+ else
+ case "$host_os" in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ archive_cmds=3D'$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags=
'
+ hardcode_libdir_flag_spec=3D'-R$libdir'
+ ;;
+ *)
+ archive_cmds=3D'$CC -shared $pic_flag -o $lib $libobjs $deplibs =
$linker_flags'
+ hardcode_libdir_flag_spec=3D'${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_minus_L=3Dyes
+ allow_undefined_flag=3Dunsupported
+ archive_cmds=3D'$echo "LIBRARY $libname INITINSTANCE" > $output_objd=
ir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libna=
me.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=3D'emximp -o $output_objdir/$libname.a $ou=
tput_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" =3D yes; then
+ allow_undefined_flag=3D' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds=3D'$CC -shared${allow_undefined_flag} $libobjs $depli=
bs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && ech=
o ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_=
objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=3D' -expect_unresolved \*'
+ archive_cmds=3D'$LD -shared${allow_undefined_flag} $libobjs $depli=
bs $linker_flags -soname $soname `test -n "$verstring" && echo -set_versi=
on $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ hardcode_libdir_flag_spec=3D'${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=3D:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" =3D yes; then
+ allow_undefined_flag=3D' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds=3D'$CC -shared${allow_undefined_flag} $libobjs $depli=
bs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstr=
ing" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${w=
l}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec=3D'${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=3D' -expect_unresolved \*'
+ archive_cmds=3D'$LD -shared${allow_undefined_flag} $libobjs $depli=
bs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set=
_version $verstring` -update_registry ${output_objdir}/so_locations -o $l=
ib'
+ archive_expsym_cmds=3D'for i in `cat $export_symbols`; do printf "=
-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidd=
en">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $=
libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_versi=
on $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.e=
xp'
+
+ #Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec=3D'-rpath $libdir'
+ fi
+ hardcode_libdir_separator=3D:
+ ;;
+
+ sco3.2v5*)
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linker_=
flags'
+ hardcode_shlibpath_var=3Dno
+ runpath_var=3DLD_RUN_PATH
+ hardcode_runpath_var=3Dyes
+ export_dynamic_flag_spec=3D'${wl}-Bexport'
+ ;;
+
+ solaris*)
+ # gcc --version < 3.0 without binutils cannot create self contained
+ # shared libraries reliably, requiring libgcc.a to resolve some of
+ # the object symbols generated in some cases. Libraries that use
+ # assert need libgcc.a to resolve __eprintf, for example. Linking
+ # a copy of libgcc.a into every shared library to guarantee resolvin=
g
+ # such symbols causes other problems: According to Tim Van Holder
+ # <tim.van.holder at pandora.be>, C++ libraries end up with a separate
+ # (to the application) exception stack for one thing.
+ no_undefined_flag=3D' -z defs'
+ if test "$GCC" =3D yes; then
+ case `$CC --version 2>/dev/null` in
+ [[12]].*)
+ cat <<EOF 1>&2
+
+*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
+*** create self contained shared libraries on Solaris systems, without
+*** introducing a dependency on libgcc.a. Therefore, libtool is disabli=
ng
+*** -no-undefined support, which will at least allow you to build shared
+*** libraries. However, you may find that when you link such libraries
+*** into an application without using GCC, you have to manually add
+*** \`gcc --print-libgcc-file-name\` to the link command. We urge you t=
o
+*** upgrade to a newer version of GCC. Another option is to rebuild you=
r
+*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
+
+EOF
+ no_undefined_flag=3D
+ ;;
+ esac
+ fi
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds=3D'$LD -G${allow_undefined_flag} -h $soname -o $lib $li=
bobjs $deplibs $linker_flags'
+ archive_expsym_cmds=3D'$echo "{ global:" > $lib.exp~cat $export_symb=
ols | 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'
+ hardcode_libdir_flag_spec=3D'-R$libdir'
+ hardcode_shlibpath_var=3Dno
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec=3D'-z allextract$convenience -z defaultext=
ract' ;;
+ esac
+ link_all_deplibs=3Dyes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" =3D 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=3D'$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $=
compiler_flags'
+ else
+ archive_cmds=3D'$LD -assert pure-text -Bstatic -o $lib $libobjs $d=
eplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_direct=3Dyes
+ hardcode_minus_L=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ sysv4)
+ if test "x$host_vendor" =3D xsno; then
+ archive_cmds=3D'$LD -G -Bsymbolic -h $soname -o $lib $libobjs $dep=
libs $linker_flags'
+ hardcode_direct=3Dyes # is this really true???
+ else
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linke=
r_flags'
+ hardcode_direct=3Dno #Motorola manual says yes, but my tests say t=
hey lie
+ fi
+ runpath_var=3D'LD_RUN_PATH'
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ sysv4.3*)
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linker_=
flags'
+ hardcode_shlibpath_var=3Dno
+ export_dynamic_flag_spec=3D'-Bexport'
+ ;;
+
+ sysv5*)
+ no_undefined_flag=3D' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds=3D'$LD -G${allow_undefined_flag} -h $soname -o $lib $li=
bobjs $deplibs $linker_flags'
+ archive_expsym_cmds=3D'$echo "{ global:" > $lib.exp~cat $export_symb=
ols | 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'
+ hardcode_libdir_flag_spec=3D
+ hardcode_shlibpath_var=3Dno
+ runpath_var=3D'LD_RUN_PATH'
+ ;;
+
+ uts4*)
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linker_=
flags'
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ dgux*)
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linker_=
flags'
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linke=
r_flags'
+ hardcode_shlibpath_var=3Dno
+ runpath_var=3DLD_RUN_PATH
+ hardcode_runpath_var=3Dyes
+ ld_shlibs=3Dyes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ archive_cmds=3D'$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=3Dyes
+ hardcode_minus_L=3Dno
+ hardcode_shlibpath_var=3Dno
+ hardcode_runpath_var=3Dyes
+ runpath_var=3DLD_RUN_PATH
+ ;;
+
+ sysv5uw7* | unixware7*)
+ no_undefined_flag=3D'${wl}-z ${wl}text'
+ if test "$GCC" =3D yes; then
+ archive_cmds=3D'$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs =
$deplibs $compiler_flags'
+ else
+ archive_cmds=3D'$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $depl=
ibs $compiler_flags'
+ fi
+ runpath_var=3D'LD_RUN_PATH'
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ *)
+ ld_shlibs=3Dno
+ ;;
+ esac
+fi
+AC_MSG_RESULT([$ld_shlibs])
+test "$ld_shlibs" =3D no && can_build_shared=3Dno
+
+# Check hardcoding attributes.
+AC_MSG_CHECKING([how to hardcode library paths into programs])
+hardcode_action=3D
+if test -n "$hardcode_libdir_flag_spec" || \
+ test -n "$runpath_var"; then
+
+ # We can hardcode non-existant directories.
+ if test "$hardcode_direct" !=3D 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 "$hardcode_shlibpath_var" !=3D no &&
+ test "$hardcode_minus_L" !=3D no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=3Drelink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting di=
rs.
+ hardcode_action=3Dimmediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=3Dunsupported
+fi
+AC_MSG_RESULT([$hardcode_action])
+
+striplib=3D
+old_striplib=3D
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; the=
n
+ test -z "$old_striplib" && old_striplib=3D"$STRIP --strip-debug"
+ test -z "$striplib" && striplib=3D"$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+
+reload_cmds=3D'$LD$reload_flag -o $output$reload_objs'
+test -z "$deplibs_check_method" && deplibs_check_method=3Dunknown
+
+# PORTME Fill in your ld.so characteristics
+AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=3D
+libname_spec=3D'lib$name'
+soname_spec=3D
+postinstall_cmds=3D
+postuninstall_cmds=3D
+finish_cmds=3D
+finish_eval=3D
+shlibpath_var=3D
+shlibpath_overrides_runpath=3Dunknown
+version_type=3Dnone
+dynamic_linker=3D"$host_os ld.so"
+sys_lib_dlsearch_path_spec=3D"/lib /usr/lib"
+sys_lib_search_path_spec=3D"/lib /usr/lib /usr/local/lib"
+
+case $host_os in
+aix3*)
+ version_type=3Dlinux
+ library_names_spec=3D'${libname}${release}.so$versuffix $libname.a'
+ shlibpath_var=3DLIBPATH
+
+ # AIX has no versioning support, so we append a major version to the n=
ame.
+ soname_spec=3D'${libname}${release}.so$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=3Dlinux
+ if test "$host_cpu" =3D ia64; then
+ # AIX 5 supports IA64
+ library_names_spec=3D'${libname}${release}.so$major ${libname}${rele=
ase}.so$versuffix $libname.so'
+ shlibpath_var=3DLD_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__ =3D=3D 2 && __GNUC_MINOR__ >=3D=
97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+ :
+ else
+ can_build_shared=3Dno
+ 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" =3D yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}=
${release}.so$major $libname.so'
+ 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=3D'${libname}${release}.a $libname.a'
+ soname_spec=3D'${libname}${release}.so$major'
+ fi
+ shlibpath_var=3DLIBPATH
+ fi
+ ;;
+
+amigaos*)
+ library_names_spec=3D'$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval=3D'for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do lib=
name=3D`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\'=
'`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $L=
N_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}=
_ixlibrary.a) || exit 1; done'
+ ;;
+
+beos*)
+ library_names_spec=3D'${libname}.so'
+ dynamic_linker=3D"$host_os ld.so"
+ shlibpath_var=3DLIBRARY_PATH
+ ;;
+
+bsdi4*)
+ version_type=3Dlinux
+ need_version=3Dno
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ finish_cmds=3D'PATH=3D"\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ sys_lib_search_path_spec=3D"/shlib /usr/lib /usr/X11/lib /usr/contrib/=
lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=3D"/shlib /usr/lib /usr/local/lib"
+ export_dynamic_flag_spec=3D-rdynamic
+ # 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=3Dwindows
+ need_version=3Dno
+ need_lib_prefix=3Dno
+ case $GCC,$host_os in
+ yes,cygwin*)
+ library_names_spec=3D'$libname.dll.a'
+ soname_spec=3D'`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${relea=
se} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
+ postinstall_cmds=3D'dlpath=3D`bash 2>&1 -c '\''. $dir/${file}i;echo =
\$dlname'\''`~
+ dldir=3D$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog .libs/$dlname \$dldir/$dlname'
+ postuninstall_cmds=3D'dldll=3D`bash 2>&1 -c '\''. $file; echo \$dlna=
me'\''`~
+ dlpath=3D$dir/\$dldll~
+ $rm \$dlpath'
+ ;;
+ yes,mingw*)
+ library_names_spec=3D'${libname}`echo ${release} | sed -e 's/[[.]]/-=
/g'`${versuffix}.dll'
+ sys_lib_search_path_spec=3D`$CC -print-search-dirs | grep "^librarie=
s:" | sed -e "s/^libraries://" -e "s/;/ /g"`
+ ;;
+ yes,pw32*)
+ library_names_spec=3D'`echo ${libname} | sed -e 's/^lib/pw/'``echo $=
{release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
+ ;;
+ *)
+ library_names_spec=3D'${libname}`echo ${release} | sed -e 's/[[.]]/-=
/g'`${versuffix}.dll $libname.lib'
+ ;;
+ esac
+ dynamic_linker=3D'Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is =
in
+ shlibpath_var=3DPATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker=3D"$host_os dyld"
+ version_type=3Ddarwin
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+ # yet detect zsh echo's removal of \ escapes.
+ library_names_spec=3D'${libname}${release}${versuffix}.$(test .$module=
=3D .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .=
$module =3D .yes && echo so || echo dylib) ${libname}.$(test .$module =3D=
.yes && echo so || echo dylib)'
+ soname_spec=3D'${libname}${release}${major}.$(test .$module =3D .yes &=
& echo so || echo dylib)'
+ shlibpath_overrides_runpath=3Dyes
+ shlibpath_var=3DDYLD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=3Dno
+ ;;
+
+freebsd*)
+ objformat=3D`test -x /usr/bin/objformat && /usr/bin/objformat || echo =
aout`
+ version_type=3Dfreebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}=
${release}.so $libname.so'
+ need_version=3Dno
+ need_lib_prefix=3Dno
+ ;;
+ freebsd-*)
+ library_names_spec=3D'${libname}${release}.so$versuffix $libname.s=
o$versuffix'
+ need_version=3Dyes
+ ;;
+ esac
+ shlibpath_var=3DLD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=3Dyes
+ ;;
+ *)
+ shlibpath_overrides_runpath=3Dno
+ hardcode_into_libs=3Dyes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=3Dlinux
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so${major} ${libname}.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ hardcode_into_libs=3Dyes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refu=
ses to
+ # link against other versions.
+ dynamic_linker=3D"$host_os dld.sl"
+ version_type=3Dsunos
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ shlibpath_var=3DSHLIB_PATH
+ shlibpath_overrides_runpath=3Dno # +s is required to enable SHLIB_PATH
+ library_names_spec=3D'${libname}${release}.sl$versuffix ${libname}${re=
lease}.sl$major $libname.sl'
+ soname_spec=3D'${libname}${release}.sl$major'
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds=3D'chmod 555 $lib'
+ ;;
+
+irix5* | irix6*)
+ version_type=3Dirix
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ soname_spec=3D'${libname}${release}.so$major'
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major ${libname}${release}.so $libname.so'
+ case $host_os in
+ irix5*)
+ libsuff=3D shlibsuff=3D
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 ") libsuff=3D shlibsuff=3D libmagic=3D32-bit;;
+ *-n32|*"-n32 ") libsuff=3D32 shlibsuff=3DN32 libmagic=3DN32;;
+ *-64|*"-64 ") libsuff=3D64 shlibsuff=3D64 libmagic=3D64-bit;;
+ *) libsuff=3D shlibsuff=3D libmagic=3Dnever-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=3DLD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=3Dno
+ sys_lib_search_path_spec=3D"/usr/lib${libsuff} /lib${libsuff} /usr/loc=
al/lib${libsuff}"
+ sys_lib_dlsearch_path_spec=3D"/usr/lib${libsuff} /lib${libsuff}"
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+ dynamic_linker=3Dno
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ version_type=3Dlinux
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ finish_cmds=3D'PATH=3D"\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ shlibpath_overrides_runpath=3Dno
+ # 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=3Dyes
+
+ # 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=3D'GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=3Dsunos
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}.s=
o$versuffix'
+ finish_cmds=3D'PATH=3D"\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker=3D'NetBSD (a.out) ld.so'
+ else
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${=
release}.so$major ${libname}${release}.so ${libname}.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ dynamic_linker=3D'NetBSD ld.elf_so'
+ fi
+ shlibpath_var=3DLD_LIBRARY_PATH
+ shlibpath_overrides_runpath=3Dyes
+ hardcode_into_libs=3Dyes
+ ;;
+
+newsos6)
+ version_type=3Dlinux
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ shlibpath_overrides_runpath=3Dyes
+ ;;
+
+openbsd*)
+ version_type=3Dsunos
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_o=
s-$host_cpu" =3D "openbsd2.8-powerpc"; then
+ case "$host_os" in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=3Dno
+ ;;
+ *)
+ shlibpath_overrides_runpath=3Dyes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=3Dyes
+ fi
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}.so$=
versuffix'
+ finish_cmds=3D'PATH=3D"\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ ;;
+
+os2*)
+ libname_spec=3D'$name'
+ need_lib_prefix=3Dno
+ library_names_spec=3D'$libname.dll $libname.a'
+ dynamic_linker=3D'OS/2 ld.exe'
+ shlibpath_var=3DLIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=3Dosf
+ need_version=3Dno
+ soname_spec=3D'${libname}${release}.so'
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so $libname.so'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ sys_lib_search_path_spec=3D"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc=
/usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec=3D"$sys_lib_search_path_spec"
+ ;;
+
+sco3.2v5*)
+ version_type=3Dosf
+ soname_spec=3D'${libname}${release}.so$major'
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ ;;
+
+solaris*)
+ version_type=3Dlinux
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ shlibpath_overrides_runpath=3Dyes
+ hardcode_into_libs=3Dyes
+ # ldd complains unless libraries are executable
+ postinstall_cmds=3D'chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=3Dsunos
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}.so$=
versuffix'
+ finish_cmds=3D'PATH=3D"\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ shlibpath_overrides_runpath=3Dyes
+ if test "$with_gnu_ld" =3D yes; then
+ need_lib_prefix=3Dno
+ fi
+ need_version=3Dyes
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ version_type=3Dlinux
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=3Dno
+ ;;
+ motorola)
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ shlibpath_overrides_runpath=3Dno
+ sys_lib_search_path_spec=3D'/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+uts4*)
+ version_type=3Dlinux
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ ;;
+
+dgux*)
+ version_type=3Dlinux
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=3Dlinux
+ library_names_spec=3D'$libname.so.$versuffix $libname.so.$major $lib=
name.so'
+ soname_spec=3D'$libname.so.$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ fi
+ ;;
+
+*)
+ dynamic_linker=3Dno
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" =3D no && can_build_shared=3Dno
+
+# Report the final consequences.
+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" =3D "no" && enable_shared=3Dno
+
+# 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" =3D yes && enable_static=3Dno
+ if test -n "$RANLIB"; then
+ archive_cmds=3D"$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds=3D'$RANLIB $lib'
+ fi
+ ;;
+
+aix4*)
+ if test "$host_cpu" !=3D ia64 && test "$aix_use_runtimelinking" =3D no=
; then
+ test "$enable_shared" =3D yes && enable_static=3Dno
+ 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" =3D yes || enable_static=3Dyes
+AC_MSG_RESULT([$enable_static])
+
+if test "$hardcode_action" =3D relink; then
+ # Fast installation is not supported
+ enable_fast_install=3Dno
+elif test "$shlibpath_overrides_runpath" =3D yes ||
+ test "$enable_shared" =3D no; then
+ # Fast installation is not necessary
+ enable_fast_install=3Dneedless
+fi
+
+variables_saved_for_relink=3D"PATH $shlibpath_var $runpath_var"
+if test "$GCC" =3D yes; then
+ variables_saved_for_relink=3D"$variables_saved_for_relink GCC_EXEC_PRE=
FIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+AC_LIBTOOL_DLOPEN_SELF
+
+if test "$enable_shared" =3D yes && test "$GCC" =3D 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.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
+ [$rm conftest*
+ echo 'static int dummy;' > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile); then
+ soname=3Dconftest
+ lib=3Dconftest
+ libobjs=3Dconftest.$ac_objext
+ deplibs=3D
+ wl=3D$lt_cv_prog_cc_wl
+ compiler_flags=3D-v
+ linker_flags=3D-v
+ verstring=3D
+ output_objdir=3D.
+ libname=3Dconftest
+ save_allow_undefined_flag=3D$allow_undefined_flag
+ allow_undefined_flag=3D
+ if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2=
\>\&1)
+ then
+ lt_cv_archive_cmds_need_lc=3Dno
+ else
+ lt_cv_archive_cmds_need_lc=3Dyes
+ fi
+ allow_undefined_flag=3D$save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi])
+ AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
+ ;;
+ esac
+fi
+need_lc=3D${lt_cv_archive_cmds_need_lc-yes}
+
+# The second 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
+ :
+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.
+ test -f Makefile && make "$ltmain"
+fi
+
+if test -f "$ltmain"; then
+ trap "$rm \"${ofile}T\"; exit 1" 1 2 15
+ $rm -f "${ofile}T"
+
+ echo creating $ofile
+
+ # Now quote all the things that may contain metacharacters while being
+ # careful not to overquote the AC_SUBSTed values. We take copies of t=
he
+ # variables and quote the copies for generation of the libtool script.
+ for var in echo old_CC old_CFLAGS \
+ AR AR_FLAGS CC LD LN_S NM SHELL \
+ reload_flag reload_cmds wl \
+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \
+ library_names_spec soname_spec \
+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cm=
ds \
+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_=
cmds \
+ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmd=
s \
+ old_striplib striplib file_magic_cmd export_symbols_cmds \
+ deplibs_check_method allow_undefined_flag no_undefined_flag \
+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
+ global_symbol_to_c_name_address \
+ hardcode_libdir_flag_spec hardcode_libdir_separator \
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsym=
s; do
+
+ case $var in
+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
+ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ # Double-quote double-evaled strings.
+ eval "lt_$var=3D\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_qu=
ote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "lt_$var=3D\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote=
_subst\"\`\\\""
+ ;;
+ esac
+ done
+
+ cat <<__EOF__ > "${ofile}T"
+#! $SHELL
+
+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-buildi=
ng 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-2000 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 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., 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.
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -=
n.
+Xsed=3D"sed -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" =3D Xset; then CDPATH=3D:; export CDPATH; fi
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | s=
ed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=3D$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=3D$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=3D$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=3D$need_lc
+
+# Whether or not to optimize for fast installation.
+fast_install=3D$enable_fast_install
+
+# The host system.
+host_alias=3D$host_alias
+host=3D$host
+
+# An echo program that does not interpret backslashes.
+echo=3D$lt_echo
+
+# The archiver.
+AR=3D$lt_AR
+AR_FLAGS=3D$lt_AR_FLAGS
+
+# The default C compiler.
+CC=3D$lt_CC
+
+# Is the compiler the GNU C compiler?
+with_gcc=3D$GCC
+
+# The linker used to build libraries.
+LD=3D$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=3D$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=3D$lt_NM
+
+# A symbol stripping program
+STRIP=3D$STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=3D$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL=3D"$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP=3D"$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS=3D"$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=3D$objdir
+
+# How to create reloadable object files.
+reload_flag=3D$lt_reload_flag
+reload_cmds=3D$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=3D$lt_wl
+
+# Object file suffix (normally "o").
+objext=3D"$ac_objext"
+
+# Old archive suffix (normally "a").
+libext=3D"$libext"
+
+# Executable file suffix (normally "").
+exeext=3D"$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=3D$lt_pic_flag
+pic_mode=3D$pic_mode
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=3D$lt_compiler_c_o
+
+# Can we write directly to a .lo ?
+compiler_o_lo=3D$lt_compiler_o_lo
+
+# Must we lock files when doing compilation ?
+need_locks=3D$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=3D$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=3D$need_version
+
+# Whether dlopen is supported.
+dlopen_support=3D$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=3D$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=3D$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=3D$lt_link_static_flag
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=3D$lt_no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=3D$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=3D$lt_whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=3D$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=3D$version_type
+
+# Format of library name prefix.
+libname_spec=3D$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=3D$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=3D$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=3D$lt_RANLIB
+old_archive_cmds=3D$lt_old_archive_cmds
+old_postinstall_cmds=3D$lt_old_postinstall_cmds
+old_postuninstall_cmds=3D$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=3D$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archi=
ve.
+old_archive_from_expsyms_cmds=3D$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=3D$lt_archive_cmds
+archive_expsym_cmds=3D$lt_archive_expsym_cmds
+postinstall_cmds=3D$lt_postinstall_cmds
+postuninstall_cmds=3D$lt_postuninstall_cmds
+
+# Commands to strip libraries.
+old_striplib=3D$lt_old_striplib
+striplib=3D$lt_striplib
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=3D$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method =3D=3D file_magic.
+file_magic_cmd=3D$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=3D$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=3D$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=3D$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown=
.
+finish_eval=3D$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names=
.
+global_symbol_pipe=3D$lt_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=3D$lt_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=3D$lt_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=3D$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=3D$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=3D$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=3D$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=3D$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=3D$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=3D$lt_hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into t=
he
+# resulting binary.
+hardcode_direct=3D$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into t=
he
+# resulting binary.
+hardcode_minus_L=3D$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=3DDIR during linking hardcodes DIR i=
nto
+# the resulting binary.
+hardcode_shlibpath_var=3D$hardcode_shlibpath_var
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink=3D"$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency librari=
es.
+link_all_deplibs=3D$link_all_deplibs
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=3D$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=3D$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=3D"$fix_srcfile_path"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=3D$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=3D$lt_export_symbols_cmds
+
+# The commands to extract the exported symbol list from a shared archive=
.
+extract_expsyms_cmds=3D$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=3D$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=3D$lt_include_expsyms
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+ case $host_os in
+ aix3*)
+ cat <<\EOF >> "${ofile}T"
+
+# 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}" !=3D Xset; then
+ COLLECT_NAMES=3D
+ export COLLECT_NAMES
+fi
+EOF
+ ;;
+ esac
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2*)
+ cat <<'EOF' >> "${ofile}T"
+ # This is a source program that is used to create dlls on Windows
+ # Don't remove nor modify the starting and closing comments
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #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 <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+# __hDllInstance_base =3D hInst;
+# return TRUE;
+# }
+# /* ltdll.c ends here */
+ # This is a source program that is used to create import libraries
+ # on Windows for dlls which lack them. Don't remove nor modify the
+ # starting and closing comments
+# /* impgen.c starts here */
+# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
+#
+# This file is part of GNU libtool.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public 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 <stdio.h> /* for printf() */
+# #include <unistd.h> /* for open(), lseek(), read() */
+# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
+# #include <string.h> /* for strdup() */
+#
+# /* O_BINARY isn't required (or even defined sometimes) under Unix */
+# #ifndef O_BINARY
+# #define O_BINARY 0
+# #endif
+#
+# static unsigned int
+# pe_get16 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[2];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 2);
+# return b[0] + (b[1]<<8);
+# }
+#
+# static unsigned int
+# pe_get32 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[4];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 4);
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# static unsigned int
+# pe_as32 (ptr)
+# void *ptr;
+# {
+# unsigned char *b =3D ptr;
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# int
+# main (argc, argv)
+# int argc;
+# char *argv[];
+# {
+# int dll;
+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+# unsigned long export_rva, export_size, nsections, secptr, expptr;
+# unsigned long name_rvas, nexp;
+# unsigned char *expdata, *erva;
+# char *filename, *dll_name;
+#
+# filename =3D argv[1];
+#
+# dll =3D open(filename, O_RDONLY|O_BINARY);
+# if (dll < 1)
+# return 1;
+#
+# dll_name =3D filename;
+#
+# for (i=3D0; filename[i]; i++)
+# if (filename[i] =3D=3D '/' || filename[i] =3D=3D '\\' || filename[i]=
=3D=3D ':')
+# dll_name =3D filename + i +1;
+#
+# pe_header_offset =3D pe_get32 (dll, 0x3c);
+# opthdr_ofs =3D pe_header_offset + 4 + 20;
+# num_entries =3D pe_get32 (dll, opthdr_ofs + 92);
+#
+# if (num_entries < 1) /* no exports */
+# return 1;
+#
+# export_rva =3D pe_get32 (dll, opthdr_ofs + 96);
+# export_size =3D pe_get32 (dll, opthdr_ofs + 100);
+# nsections =3D pe_get16 (dll, pe_header_offset + 4 +2);
+# secptr =3D (pe_header_offset + 4 + 20 +
+# pe_get16 (dll, pe_header_offset + 4 + 16));
+#
+# expptr =3D 0;
+# for (i =3D 0; i < nsections; i++)
+# {
+# char sname[8];
+# unsigned long secptr1 =3D secptr + 40 * i;
+# unsigned long vaddr =3D pe_get32 (dll, secptr1 + 12);
+# unsigned long vsize =3D pe_get32 (dll, secptr1 + 16);
+# unsigned long fptr =3D pe_get32 (dll, secptr1 + 20);
+# lseek(dll, secptr1, SEEK_SET);
+# read(dll, sname, 8);
+# if (vaddr <=3D export_rva && vaddr+vsize > export_rva)
+# {
+# expptr =3D fptr + (export_rva - vaddr);
+# if (export_rva + export_size > vaddr + vsize)
+# export_size =3D vsize - (export_rva - vaddr);
+# break;
+# }
+# }
+#
+# expdata =3D (unsigned char*)malloc(export_size);
+# lseek (dll, expptr, SEEK_SET);
+# read (dll, expdata, export_size);
+# erva =3D expdata - export_rva;
+#
+# nexp =3D pe_as32 (expdata+24);
+# name_rvas =3D pe_as32 (expdata+32);
+#
+# printf ("EXPORTS\n");
+# for (i =3D 0; i<nexp; i++)
+# {
+# unsigned long name_rva =3D pe_as32 (erva+name_rvas+i*4);
+# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+# }
+#
+# return 0;
+# }
+# /* impgen.c ends here */
+
+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" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
+
+ mv -f "${ofile}T" "$ofile" || \
+ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
+ chmod +x "$ofile"
+fi
+
+])# _LT_AC_LTCONFIG_HACK
+
+# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
+
+# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll'=
s
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
+
+# AC_ENABLE_SHARED - implement the --enable-shared flag
+# Usage: AC_ENABLE_SHARED[(DEFAULT)]
+# Where 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,
+changequote(<<, >>)dnl
+<< --enable-shared[=3DPKGS] build shared libraries [default=3D>>AC_ENA=
BLE_SHARED_DEFAULT],
+changequote([, ])dnl
+[p=3D${PACKAGE-default}
+case $enableval in
+yes) enable_shared=3Dyes ;;
+no) enable_shared=3Dno ;;
+*)
+ enable_shared=3Dno
+ # Look at the argument we got. We use all the common list separators.
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D"${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" =3D "X$p"; then
+ enable_shared=3Dyes
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+ ;;
+esac],
+enable_shared=3DAC_ENABLE_SHARED_DEFAULT)dnl
+])
+
+# 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_ENABLE_STATIC - implement the --enable-static flag
+# Usage: AC_ENABLE_STATIC[(DEFAULT)]
+# Where 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,
+changequote(<<, >>)dnl
+<< --enable-static[=3DPKGS] build static libraries [default=3D>>AC_ENA=
BLE_STATIC_DEFAULT],
+changequote([, ])dnl
+[p=3D${PACKAGE-default}
+case $enableval in
+yes) enable_static=3Dyes ;;
+no) enable_static=3Dno ;;
+*)
+ enable_static=3Dno
+ # Look at the argument we got. We use all the common list separators.
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D"${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" =3D "X$p"; then
+ enable_static=3Dyes
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+ ;;
+esac],
+enable_static=3DAC_ENABLE_STATIC_DEFAULT)dnl
+])
+
+# 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_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
+# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
+# Where 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,
+changequote(<<, >>)dnl
+<< --enable-fast-install[=3DPKGS] optimize for fast installation [defa=
ult=3D>>AC_ENABLE_FAST_INSTALL_DEFAULT],
+changequote([, ])dnl
+[p=3D${PACKAGE-default}
+case $enableval in
+yes) enable_fast_install=3Dyes ;;
+no) enable_fast_install=3Dno ;;
+*)
+ enable_fast_install=3Dno
+ # Look at the argument we got. We use all the common list separators.
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D"${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" =3D "X$p"; then
+ enable_fast_install=3Dyes
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+ ;;
+esac],
+enable_fast_install=3DAC_ENABLE_FAST_INSTALL_DEFAULT)dnl
+])
+
+# 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_LIBTOOL_PICMODE - implement the --with-pic flag
+# Usage: AC_LIBTOOL_PICMODE[(MODE)]
+# Where 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=3Difelse($#,1,$1,default)])
+
+
+# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared l=
ibrary
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+ /*)
+ lt_cv_path_MAGIC_CMD=3D"$MAGIC_CMD" # Let the user override the test w=
ith a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD=3D"$MAGIC_CMD" # Let the user override the test w=
ith a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD=3D"$MAGIC_CMD"
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D":"
+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=3D"ifelse([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=3D.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD=3D"$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=3D"`expr \"$deplibs_check_method\" : \"file_magic \(=
.*\)\"`"
+ MAGIC_CMD=3D"$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 <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+ MAGIC_CMD=3D"$ac_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD=3D"$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+])
+
+
+# AC_PATH_MAGIC - find a file program which can recognise a shared libra=
ry
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
+AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$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)
+ else
+ MAGIC_CMD=3D:
+ fi
+fi
+])
+
+
+# AC_PROG_LD - find the path to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=3D=
no]],
+test "$withval" =3D no || with_gnu_ld=3Dyes, with_gnu_ld=3Dno)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
+ac_prog=3Dld
+if test "$GCC" =3D yes; then
+ # Check if gcc -print-prog-name=3Dld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=3D`($CC -print-prog-name=3Dld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=3D`($CC -print-prog-name=3Dld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
+ re_direlt=3D'/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=3D`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=3D`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=3D"$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=3Dld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=3Dunknown
+ ;;
+ esac
+elif test "$with_gnu_ld" =3D 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
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=3D.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext=
"; then
+ lt_cv_path_LD=3D"$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version=
,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' >=
/dev/null; then
+ test "$with_gnu_ld" !=3D no && break
+ else
+ test "$with_gnu_ld" !=3D yes && break
+ fi
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+else
+ lt_cv_path_LD=3D"$LD" # Let the user override the test with a path.
+fi])
+LD=3D"$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])
+
+# AC_PROG_LD_GNU -
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only acce=
pt -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ lt_cv_prog_gnu_ld=3Dyes
+else
+ lt_cv_prog_gnu_ld=3Dno
+fi])
+with_gnu_ld=3D$lt_cv_prog_gnu_ld
+])
+
+# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload=
_flag,
+[lt_cv_ld_reload_flag=3D'-r'])
+reload_flag=3D$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=3D" $reload_flag"
+])
+
+# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependant libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd=3D'$MAGIC_CMD'
+lt_cv_file_magic_test_file=3D
+lt_cv_deplibs_check_method=3D'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 egrep 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=3Dpass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+bsdi4*)
+ lt_cv_deplibs_check_method=3D'file_magic ELF [[0-9]][[0-9]]*-bit [[ML]=
]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd=3D'/usr/bin/file -L'
+ lt_cv_file_magic_test_file=3D/shlib/libc.so
+ ;;
+
+cygwin* | mingw* | pw32*)
+ lt_cv_deplibs_check_method=3D'file_magic file format pei*-i386(.*archi=
tecture: i386)?'
+ lt_cv_file_magic_cmd=3D'$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=3D'file_magic Mach-O dynamically linked sha=
red library'
+ lt_cv_file_magic_cmd=3D'/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ lt_cv_file_magic_test_file=3D`echo /System/Library/Frameworks/System=
.framework/Versions/*/System | head -1`
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file=3D'/usr/lib/libSystem.dylib'
+ ;;
+ esac
+ ;;
+
+freebsd*)
+ 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=3D'file_magic (FreeBSD|OpenBSD)/i[[3-9]=
]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=3D/usr/bin/file
+ lt_cv_file_magic_test_file=3D`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=3Dpass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+hpux10.20*|hpux11*)
+ lt_cv_deplibs_check_method=3D'file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RI=
SC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_cmd=3D/usr/bin/file
+ lt_cv_file_magic_test_file=3D/usr/lib/libc.sl
+ ;;
+
+irix5* | irix6*)
+ case $host_os in
+ irix5*)
+ # this will be overridden with pass_all, but let us keep it just in =
case
+ lt_cv_deplibs_check_method=3D"file_magic ELF 32-bit MSB dynamic lib =
MIPS - version 1"
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 ") libmagic=3D32-bit;;
+ *-n32|*"-n32 ") libmagic=3DN32;;
+ *-64|*"-64 ") libmagic=3D64-bit;;
+ *) libmagic=3Dnever-match;;
+ esac
+ # this will be overridden with pass_all, but let us keep it just in =
case
+ lt_cv_deplibs_check_method=3D"file_magic ELF ${libmagic} MSB mips-[[=
1234]] dynamic lib MIPS - version 1"
+ ;;
+ esac
+ lt_cv_file_magic_test_file=3D`echo /lib${libsuff}/libc.so*`
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ case $host_cpu in
+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
+ lt_cv_deplibs_check_method=3Dpass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ lt_cv_deplibs_check_method=3D'file_magic ELF [[0-9]][[0-9]]*-bit [[L=
M]]SB (shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=3D`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method=3D'match_pattern /lib[[^/\.]]+\.so\.[[0-9=
]]+\.[[0-9]]+$'
+ else
+ lt_cv_deplibs_check_method=3D'match_pattern /lib[[^/\.]]+\.so$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method=3D'file_magic ELF [[0-9]][[0-9]]*-bit [[ML]=
]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=3D/usr/bin/file
+ lt_cv_file_magic_test_file=3D/usr/lib/libnls.so
+ ;;
+
+openbsd*)
+ lt_cv_file_magic_cmd=3D/usr/bin/file
+ lt_cv_file_magic_test_file=3D`echo /usr/lib/libc.so.*`
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_o=
s-$host_cpu" =3D "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method=3D'file_magic ELF [[0-9]][[0-9]]*-bit [[L=
M]]SB shared object'
+ else
+ lt_cv_deplibs_check_method=3D'file_magic OpenBSD.* shared library'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ # this will be overridden with pass_all, but let us keep it just in ca=
se
+ lt_cv_deplibs_check_method=3D'file_magic COFF format alpha shared libr=
ary'
+ lt_cv_file_magic_test_file=3D/shlib/libc.so
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=3Dpass_all
+ lt_cv_file_magic_test_file=3D/lib/libc.so
+ ;;
+
+sysv5uw[[78]]* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method=3D'file_magic ELF [[0-9]][[0-9]]*-bit [[M=
L]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=3D`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd=3D'/bin/file'
+ lt_cv_deplibs_check_method=3D'file_magic ELF [[0-9]][[0-9]]*-bit [[L=
M]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd=3D'/bin/file'
+ lt_cv_deplibs_check_method=3D"file_magic ELF [[0-9]][[0-9]]*-bit [[L=
M]]SB dynamic lib"
+ lt_cv_file_magic_test_file=3D/lib/libc.so
+ ;;
+ esac
+ ;;
+esac
+])
+file_magic_cmd=3D$lt_cv_file_magic_cmd
+deplibs_check_method=3D$lt_cv_deplibs_check_method
+])
+
+
+# AC_PROG_NM - find the path to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
+AC_MSG_CHECKING([for BSD-compatible nm])
+AC_CACHE_VAL(lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM=3D"$NM"
+else
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ test -z "$ac_dir" && ac_dir=3D.
+ tmp_nm=3D$ac_dir/${ac_tool_prefix}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 say=
s:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/n=
ull|Invalid file or object type)' >/dev/null; then
+ lt_cv_path_NM=3D"$tmp_nm -B"
+ break
+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/n=
ull >/dev/null; then
+ lt_cv_path_NM=3D"$tmp_nm -p"
+ break
+ else
+ lt_cv_path_NM=3D${lt_cv_path_NM=3D"$tmp_nm"} # keep the first match, bu=
t
+ continue # so that we can try to find one that supports BSD flags
+ fi
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=3Dnm
+fi])
+NM=3D"$lt_cv_path_NM"
+AC_MSG_RESULT([$NM])
+])
+
+# AC_CHECK_LIBM - check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=3D
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32*)
+ # These system don't have libm
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=3D"-lmw")
+ AC_CHECK_LIB(m, main, LIBM=3D"$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, main, LIBM=3D"-lm")
+ ;;
+esac
+])
+
+# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl convenience library and INCLTDL to the include flags for
+# the libltdl header and adds --enable-ltdl-convenience to the
+# configure arguments. Note that LIBLTDL and INCLTDL are not
+# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
+# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
+# with '${top_builddir}/' and INCLTDL 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=3Dyes
+ ac_configure_args=3D"$ac_configure_args --enable-ltdl-convenience"=
;;
+ esac
+ LIBLTDL=3D'${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+ INCLTDL=3D'-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+])
+
+# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
+# the libltdl installable library and INCLTDL to the include flags for
+# the libltdl header and adds --enable-ltdl-install to the configure
+# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
+# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
+# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
+# be prefixed with '${top_builddir}/' and INCLTDL 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.
+# 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, main,
+ [test x"$enable_ltdl_install" !=3D xyes && enable_ltdl_install=3Dno],
+ [if test x"$enable_ltdl_install" =3D xno; then
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
+ else
+ enable_ltdl_install=3Dyes
+ fi
+ ])
+ if test x"$enable_ltdl_install" =3D x"yes"; then
+ ac_configure_args=3D"$ac_configure_args --enable-ltdl-install"
+ LIBLTDL=3D'${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+ INCLTDL=3D'-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+ else
+ ac_configure_args=3D"$ac_configure_args --enable-ltdl-install=3Dno"
+ LIBLTDL=3D"-lltdl"
+ INCLTDL=3D
+ fi
+])
+
+# 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])
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/bootstrap
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/bootstrap 2007-03-10 21:38:29 UT=
C (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/bootstrap 2007-03-10 21:41:34 UT=
C (rev 1290)
@@ -0,0 +1,11 @@
+#! /bin/sh
+set -x
+
+libtoolize --force --copy
+aclocal
+autoheader
+#add --include-deps if you want to bootstrap with any other compiler tha=
n gcc
+#automake --add-missing --copy --include-deps
+automake --add-missing --force --copy
+autoconf
+rm -f config.cache
Added: trunk/DvdMenuXtractor/dmx/libdvdread/config.guess
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/config.guess 2007-03-10 21:38:29=
UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/config.guess 2007-03-10 21:41:34=
UTC (rev 1290)
@@ -0,0 +1,1325 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002 Free Software Foundation, Inc.
+
+timestamp=3D'2002-05-29'
+
+# 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., 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.
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>. 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=3D`echo "$0" | sed -e 's,.*/,,'`
+
+usage=3D"\
+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 <config-patches at gnu.org>."
+
+version=3D"\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+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 PURPO=
SE."
+
+help=3D"
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# !=3D 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+
+dummy=3Ddummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+set_cc_for_build=3D'case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int dummy(){}" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
+ if test $? =3D 0 ; then
+ CC_FOR_BUILD=3D"$c"; break ;
+ fi ;
+ done ;
+ rm -f $dummy.c $dummy.o $dummy.rel ;
+ if test x"$CC_FOR_BUILD" =3D x ; then
+ CC_FOR_BUILD=3Dno_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=3D$CC ;;
+ ,*,*) CC_FOR_BUILD=3D$HOST_CC ;;
+esac'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD univ=
erse.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=3D$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=3D`(uname -m) 2>/dev/null` || UNAME_MACHINE=3Dunknown
+UNAME_RELEASE=3D`(uname -r) 2>/dev/null` || UNAME_RELEASE=3Dunknown
+UNAME_SYSTEM=3D`(uname -s) 2>/dev/null` || UNAME_SYSTEM=3Dunknown
+UNAME_VERSION=3D`(uname -v) 2>/dev/null` || UNAME_VERSION=3Dunknown
+
+# 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=3D"sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=3D`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=3Darmeb-unknown ;;
+ arm*) machine=3Darm-unknown ;;
+ sh3el) machine=3Dshl-unknown ;;
+ sh3eb) machine=3Dsh-unknown ;;
+ *) machine=3D${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 (netbsdao=
ut).
+ # Return netbsd for either. FIX?
+ os=3Dnetbsd
+ else
+ os=3Dnetbsdelf
+ fi
+ ;;
+ *)
+ os=3Dnetbsd
+ ;;
+ esac
+ # The OS release
+ release=3D`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # 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 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE =3D "V4.0"; then
+ UNAME_RELEASE=3D`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # 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.
+ cat <<EOF >$dummy.s
+ .data
+\$Lformat:
+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
+
+ .text
+ .globl main
+ .align 4
+ .ent main
+main:
+ .frame \$30,16,\$26,0
+ ldgp \$29,0(\$27)
+ .prologue 1
+ .long 0x47e03d80 # implver \$0
+ lda \$2,-1
+ .long 0x47e20c21 # amask \$2,\$1
+ lda \$16,\$Lformat
+ mov \$0,\$17
+ not \$1,\$18
+ jsr \$26,printf
+ ldgp \$29,0(\$26)
+ mov 0,\$16
+ jsr \$26,exit
+ .end main
+EOF
+ eval $set_cc_for_build
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" =3D 0 ; then
+ case `./$dummy` in
+ 0-0)
+ UNAME_MACHINE=3D"alpha"
+ ;;
+ 1-0)
+ UNAME_MACHINE=3D"alphaev5"
+ ;;
+ 1-1)
+ UNAME_MACHINE=3D"alphaev56"
+ ;;
+ 1-101)
+ UNAME_MACHINE=3D"alphapca56"
+ ;;
+ 2-303)
+ UNAME_MACHINE=3D"alphaev6"
+ ;;
+ 2-307)
+ UNAME_MACHINE=3D"alphaev67"
+ ;;
+ 2-1307)
+ UNAME_MACHINE=3D"alphaev68"
+ ;;
+ esac
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]/=
/' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ 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 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit 0;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" =3D att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ 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 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=3D`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 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=3D`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/d=
ev/null`
+ test "x${UNAME_RELEASE}" =3D "x" && UNAME_RELEASE=3D3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ # 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 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* 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 $dummy.c -o $dummy \
+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` =
\
+ && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit 0 ;;
+ Night_Hawk:*:*:PowerMAX_OS)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=3D`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR =3D mc88100 ] || [ $UNAME_PROCESSOR =3D mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x =3D m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x =3D 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 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????: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 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=3D`/usr/bin/oslevel`
+ else
+ IBM_REV=3D${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *: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 <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy =
&& exit 0
+ rm -f $dummy.c $dummy
+ echo rs6000-ibm-aix3.2.5
+ 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 0 ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=3D`/usr/sbin/lsdev -C -c processor -S available | sed 1q | a=
wk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; =
then
+ IBM_ARCH=3Drs6000
+ else
+ IBM_ARCH=3Dpowerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=3D`/usr/bin/oslevel`
+ else
+ IBM_REV=3D${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=3D`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=3Dm68000 ;;
+ 9000/[34]?? ) HP_ARCH=3Dm68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=3D`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=3D`/usr/bin/getconf SC_KERNEL_BITS 2>=
/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH=3D"hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=3D"hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH=3D"hppa2.0n" ;;
+ 64) HP_ARCH=3D"hppa2.0w" ;;
+ '') HP_ARCH=3D"hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" =3D "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits =3D sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu =3D 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=3D $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARC=
H=3D`./$dummy`
+ if test -z "$HP_ARCH"; then HP_ARCH=3Dhppa; fi
+ rm -f $dummy.c $dummy
+ fi ;;
+ esac
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=3D`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu =3D 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 $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy &=
& exit 0
+ rm -f $dummy.c $dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ 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 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3D:*:*:*)
+ echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=3D`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijk=
lmnopqrstuvwxyz'`
+ FUJITSU_SYS=3D`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcde=
fghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=3D`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[=
-(].*//'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit 0 ;;
+ x86:Interix*:3*)
+ echo i386-pc-interix3
+ exit 0 ;;
+ 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 i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//=
'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UN=
AME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit 0 ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ 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) || def=
ined(MIPSEL)
+ CPU=3Dmipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || def=
ined(MIPSEB)
+ CPU=3Dmips
+ #else
+ CPU=3D
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=3D`
+ rm -f $dummy.c
+ test x"${CPU}" !=3D x && echo "${CPU}-pc-linux-gnu" && exit 0
+ ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit 0 ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit 0 ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=3Dalphaev5 ;;
+ EV56) UNAME_MACHINE=3Dalphaev56 ;;
+ PCA56) UNAME_MACHINE=3Dalphapca56 ;;
+ PCA57) UNAME_MACHINE=3Dalphapca56 ;;
+ EV6) UNAME_MACHINE=3Dalphaev6 ;;
+ EV67) UNAME_MACHINE=3Dalphaev67 ;;
+ EV68*) UNAME_MACHINE=3Dalphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" =3D 0 ; then LIBC=3D"libc1" ; else LIBC=3D"" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ 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 0 ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit 0 ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit 0 ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit 0 ;;
+ 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=3DC to ensure ld outputs messages in English.
+ ld_supported_targets=3D`cd /; LC_ALL=3DC ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE=3D"${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0 ;; =09
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0 ;;
+ "")
+ # 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 0 ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >=3D 2
+ LIBC=3Dgnu
+ # else
+ LIBC=3Dgnulibc1
+ # endif
+ # else
+ LIBC=3Dgnulibc1
+ # endif
+ #else
+ #ifdef __INTEL_COMPILER
+ LIBC=3Dgnu
+ #else
+ LIBC=3Dgnuaout
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=3D`
+ rm -f $dummy.c
+ test x"${LIBC}" !=3D x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && e=
xit 0
+ test x"${TENTATIVE}" !=3D x && echo "${TENTATIVE}" && exit 0
+ ;;
+ 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 0 ;;
+ 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 0 ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=3D`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 0 ;;
+ i*86:*:5:[78]*)
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=3Di486 ;;
+ *Pentium) UNAME_MACHINE=3Di586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=3Di686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAM=
E_VERSION}
+ exit 0 ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=3D`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=3D`(/bin/uname -X|grep Release|sed -e 's/.*=3D //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=3Di486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=3Di586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=3Di686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=3Di686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing a=
bout
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ 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 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*: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)
+ OS_REL=3D''
+ test -r /etc/.relid \
+ && OS_REL=3D.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.reli=
d`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0=
*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=3D`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel at ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes at openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf at swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ *:VOS:*:*)
+ # From Paul.Green at stratus.com.
+ echo hppa1.1-stratus-vos
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ 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 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Darwin:*:*)
+ echo `uname -p`-apple-darwin${UNAME_RELEASE}
+ exit 0 ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=3D`uname -p`
+ if test "$UNAME_PROCESSOR" =3D "x86"; then
+ UNAME_PROCESSOR=3Di386
+ UNAME_MACHINE=3Dpc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit 0 ;;
+ NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit 0 ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit 0 ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit 0 ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit 0 ;;
+ *: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" =3D "386"; then
+ UNAME_MACHINE=3Di386
+ else
+ UNAME_MACHINE=3D"$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit 0 ;;
+ 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 0 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit 0 ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit 0 ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit 0 ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit 0 ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit 0 ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+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 <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#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 <sys/param.h>
+ 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"); 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=3D`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/de=
v/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) =3D=3D 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) =3D=3D 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 <sys/param.h>
+# if defined (BSD)
+# if BSD =3D=3D 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD =3D=3D 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 $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy=
.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# 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 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp =3D $timestamp
+
+uname -m =3D `(uname -m) 2>/dev/null || echo unknown`
+uname -r =3D `(uname -r) 2>/dev/null || echo unknown`
+uname -s =3D `(uname -s) 2>/dev/null || echo unknown`
+uname -v =3D `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p =3D `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X =3D `(/bin/uname -X) 2>/dev/null`
+
+hostinfo =3D `(hostinfo) 2>/dev/null`
+/bin/universe =3D `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k =3D `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch =3D `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel =3D `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo =3D `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE =3D ${UNAME_MACHINE}
+UNAME_RELEASE =3D ${UNAME_RELEASE}
+UNAME_SYSTEM =3D ${UNAME_SYSTEM}
+UNAME_VERSION =3D ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp=3D'"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Added: trunk/DvdMenuXtractor/dmx/libdvdread/config.h.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/config.h.in 2007-03-10 21:38:29 =
UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/config.h.in 2007-03-10 21:41:34 =
UTC (rev 1290)
@@ -0,0 +1,108 @@
+/* config.h.in. Generated from configure.in by autoheader. */
+
+/* Define to 1 if you have the <byteswap.h> header file. */
+#undef HAVE_BYTESWAP_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <dvdcss/dvdcss.h> header file. */
+#undef HAVE_DVDCSS_DVDCSS_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/bswap.h> header file. */
+#undef HAVE_SYS_BSWAP_H
+
+/* Define to 1 if you have the <sys/endian.h> header file. */
+#undef HAVE_SYS_ENDIAN_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be se=
nt. */
+#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
+
+/* The size of a `char', as computed by sizeof. */
+#undef SIZEOF_CHAR
+
+/* The size of a `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of a `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
+/* The size of a `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* 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
+
+/* Have a Mac OS X system */
+#undef __DARWIN__
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. =
*/
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/config.sub
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/config.sub 2007-03-10 21:38:29 U=
TC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/config.sub 2007-03-10 21:41:34 U=
TC (rev 1290)
@@ -0,0 +1,1443 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002 Free Software Foundation, Inc.
+
+timestamp=3D'2002-05-28'
+
+# 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., 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.
+
+# Please send patches to <config-patches at gnu.org>. 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 co=
de 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=3D`echo "$0" | sed -e 's,.*/,,'`
+
+usage=3D"\
+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 <config-patches at gnu.org>."
+
+version=3D"\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+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 PURPO=
SE."
+
+help=3D"
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # 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 0;;
+
+ * )
+ 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 a=
ny).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=3D`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-n=
ova*)
+ os=3D-$maybe_os
+ basic_machine=3D`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=3D`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine !=3D $1 ]
+ then os=3D`echo $1 | sed 's/.*-/-/'`
+ else os=3D; 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)
+ os=3D
+ basic_machine=3D$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=3D
+ basic_machine=3D$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=3D-vxworks
+ basic_machine=3D$1
+ ;;
+ -chorusos*)
+ os=3D-chorusos
+ basic_machine=3D$1
+ ;;
+ -chorusrdb)
+ os=3D-chorusrdb
+ basic_machine=3D$1
+ ;;
+ -hiux*)
+ os=3D-hiuxwe2
+ ;;
+ -sco5)
+ os=3D-sco3.2v5
+ basic_machine=3D`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=3D-sco3.2v4
+ basic_machine=3D`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=3D`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=3D`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=3D`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=3D-sco3.2v2
+ basic_machine=3D`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=3D`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=3D-isc2.2
+ basic_machine=3D`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=3Dclipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=3D`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=3D-lynxos
+ ;;
+ -ptx*)
+ basic_machine=3D`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=3D`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=3D-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=3Dm68k-atari
+ os=3D-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] \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | m32r | m68000 | m68k | m88k | mcore \
+ | mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el | mips64vr4300 \
+ | mips64vr4300el | mips64vr5000 | mips64vr5000el \
+ | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
+ | mipsisa32 | mipsisa64 \
+ | mn10200 | mn10300 \
+ | ns16k | ns32k \
+ | openrisc | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9=
b \
+ | strongarm \
+ | tahoe | thumb | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=3D$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=3D$basic_machine-unknown
+ os=3D-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+
+ # 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=3D$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not reco=
gnized 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-* \
+ | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c54x-* \
+ | clipper-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | m32r-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | mcore-* \
+ | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+ | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
+ | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | 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=3Di386-unknown
+ os=3D-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=3Dm68000-att
+ ;;
+ 3b*)
+ basic_machine=3Dwe32k-att
+ ;;
+ a29khif)
+ basic_machine=3Da29k-amd
+ os=3D-udi
+ ;;
+ adobe68k)
+ basic_machine=3Dm68010-adobe
+ os=3D-scout
+ ;;
+ alliant | fx80)
+ basic_machine=3Dfx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=3Dm68k-altos
+ ;;
+ am29k)
+ basic_machine=3Da29k-none
+ os=3D-bsd
+ ;;
+ amdahl)
+ basic_machine=3D580-amdahl
+ os=3D-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=3Dm68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=3Dm68k-unknown
+ os=3D-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=3Dm68k-unknown
+ os=3D-sysv4
+ ;;
+ apollo68)
+ basic_machine=3Dm68k-apollo
+ os=3D-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=3Dm68k-apollo
+ os=3D-bsd
+ ;;
+ aux)
+ basic_machine=3Dm68k-apple
+ os=3D-aux
+ ;;
+ balance)
+ basic_machine=3Dns32k-sequent
+ os=3D-dynix
+ ;;
+ c90)
+ basic_machine=3Dc90-cray
+ os=3D-unicos
+ ;;
+ convex-c1)
+ basic_machine=3Dc1-convex
+ os=3D-bsd
+ ;;
+ convex-c2)
+ basic_machine=3Dc2-convex
+ os=3D-bsd
+ ;;
+ convex-c32)
+ basic_machine=3Dc32-convex
+ os=3D-bsd
+ ;;
+ convex-c34)
+ basic_machine=3Dc34-convex
+ os=3D-bsd
+ ;;
+ convex-c38)
+ basic_machine=3Dc38-convex
+ os=3D-bsd
+ ;;
+ cray | j90)
+ basic_machine=3Dj90-cray
+ os=3D-unicos
+ ;;
+ crds | unos)
+ basic_machine=3Dm68k-crds
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=3Dcris-axis
+ ;;
+ da30 | da30-*)
+ basic_machine=3Dm68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstat=
n)
+ basic_machine=3Dmips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=3Dpdp10-dec
+ os=3D-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=3Dpdp10-dec
+ os=3D-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=3Dm68k-motorola
+ ;;
+ delta88)
+ basic_machine=3Dm88k-motorola
+ os=3D-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=3Drs6000-bull
+ os=3D-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=3Dm68k-bull
+ os=3D-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=3Da29k-amd
+ os=3D-ebmon
+ ;;
+ elxsi)
+ basic_machine=3Delxsi-elxsi
+ os=3D-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=3Dns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=3Dm68k-ericsson
+ os=3D-ose
+ ;;
+ fx2800)
+ basic_machine=3Di860-alliant
+ ;;
+ genix)
+ basic_machine=3Dns32k-ns
+ ;;
+ gmicro)
+ basic_machine=3Dtron-gmicro
+ os=3D-sysv
+ ;;
+ go32)
+ basic_machine=3Di386-pc
+ os=3D-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=3Dhppa1.1-hitachi
+ os=3D-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=3Dh8300-hitachi
+ os=3D-hms
+ ;;
+ h8300xray)
+ basic_machine=3Dh8300-hitachi
+ os=3D-xray
+ ;;
+ h8500hms)
+ basic_machine=3Dh8500-hitachi
+ os=3D-hms
+ ;;
+ harris)
+ basic_machine=3Dm88k-harris
+ os=3D-sysv3
+ ;;
+ hp300-*)
+ basic_machine=3Dm68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=3Dm68k-hp
+ os=3D-bsd
+ ;;
+ hp300hpux)
+ basic_machine=3Dm68k-hp
+ os=3D-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=3Dhppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=3Dm68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=3Dm68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=3Dhppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=3Dhppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=3Dhppa1.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=3Dhppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=3Dhppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=3Dhppa1.0-hp
+ ;;
+ hppa-next)
+ os=3D-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=3Dhppa1.1-hp
+ os=3D-osf
+ ;;
+ hppro)
+ basic_machine=3Dhppa1.1-hp
+ os=3D-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=3Di370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=3D`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=3D-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=3D`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=3D-sysv4
+ ;;
+ i*86v)
+ basic_machine=3D`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=3D-sysv
+ ;;
+ i*86sol2)
+ basic_machine=3D`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=3D-solaris2
+ ;;
+ i386mach)
+ basic_machine=3Di386-mach
+ os=3D-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=3Di386-unknown
+ os=3D-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=3Dmips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=3D-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=3Dm68k-isi
+ os=3D-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=3Dm88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=3Dmips-mips
+ os=3D-sysv
+ ;;
+ merlin)
+ basic_machine=3Dns32k-utek
+ os=3D-sysv
+ ;;
+ mingw32)
+ basic_machine=3Di386-pc
+ os=3D-mingw32
+ ;;
+ miniframe)
+ basic_machine=3Dm68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=3Dm68k-atari
+ os=3D-mint
+ ;;
+ mips3*-*)
+ basic_machine=3D`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=3D`echo $basic_machine | sed -e 's/mips3/mips64/'`-unkno=
wn
+ ;;
+ mmix*)
+ basic_machine=3Dmmix-knuth
+ os=3D-mmixware
+ ;;
+ monitor)
+ basic_machine=3Dm68k-rom68k
+ os=3D-coff
+ ;;
+ morphos)
+ basic_machine=3Dpowerpc-unknown
+ os=3D-morphos
+ ;;
+ msdos)
+ basic_machine=3Di386-pc
+ os=3D-msdos
+ ;;
+ mvs)
+ basic_machine=3Di370-ibm
+ os=3D-mvs
+ ;;
+ ncr3000)
+ basic_machine=3Di486-ncr
+ os=3D-sysv4
+ ;;
+ netbsd386)
+ basic_machine=3Di386-unknown
+ os=3D-netbsd
+ ;;
+ netwinder)
+ basic_machine=3Darmv4l-rebel
+ os=3D-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=3Dm68k-sony
+ os=3D-newsos
+ ;;
+ news1000)
+ basic_machine=3Dm68030-sony
+ os=3D-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=3Dmips-sony
+ os=3D-newsos
+ ;;
+ necv70)
+ basic_machine=3Dv70-nec
+ os=3D-sysv
+ ;;
+ next | m*-next )
+ basic_machine=3Dm68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=3D-nextstep2
+ ;;
+ *)
+ os=3D-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=3Dm68k-harris
+ os=3D-cxux
+ ;;
+ nh[45]000)
+ basic_machine=3Dm88k-harris
+ os=3D-cxux
+ ;;
+ nindy960)
+ basic_machine=3Di960-intel
+ os=3D-nindy
+ ;;
+ mon960)
+ basic_machine=3Di960-intel
+ os=3D-mon960
+ ;;
+ nonstopux)
+ basic_machine=3Dmips-compaq
+ os=3D-nonstopux
+ ;;
+ np1)
+ basic_machine=3Dnp1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=3Dnsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=3Dhppa1.1-oki
+ os=3D-proelf
+ ;;
+ or32 | or32-*)
+ basic_machine=3Dor32-unknown
+ os=3D-coff
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=3Dm68000-ericsson
+ os=3D-ose
+ ;;
+ os68k)
+ basic_machine=3Dm68k-none
+ os=3D-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=3Dhppa1.1-hitachi
+ os=3D-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=3Di860-intel
+ os=3D-osf
+ ;;
+ pbd)
+ basic_machine=3Dsparc-tti
+ ;;
+ pbb)
+ basic_machine=3Dm68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=3Dns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=3Di586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon)
+ basic_machine=3Di686-pc
+ ;;
+ pentiumii | pentium2)
+ basic_machine=3Di686-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=3Di586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=3Di686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-*)
+ basic_machine=3Di686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=3Dpn-gould
+ ;;
+ power) basic_machine=3Dpower-ibm
+ ;;
+ ppc) basic_machine=3Dpowerpc-unknown
+ ;;
+ ppc-*) basic_machine=3Dpowerpc-`echo $basic_machine | sed 's/^[^-]*-//'=
`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=3Dpowerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=3Dpowerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=3Dpowerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=3Dpowerpc64-`echo $basic_machine | sed 's/^[^-]*=
-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=3Dpowerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=3Dpowerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=3Di386-ibm
+ ;;
+ pw32)
+ basic_machine=3Di586-unknown
+ os=3D-pw32
+ ;;
+ rom68k)
+ basic_machine=3Dm68k-rom68k
+ os=3D-coff
+ ;;
+ rm[46]00)
+ basic_machine=3Dmips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=3Dromp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=3Ds390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=3Ds390x-ibm
+ ;;
+ sa29200)
+ basic_machine=3Da29k-amd
+ os=3D-udi
+ ;;
+ sequent)
+ basic_machine=3Di386-sequent
+ ;;
+ sh)
+ basic_machine=3Dsh-hitachi
+ os=3D-hms
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=3Dsparclite-wrs
+ os=3D-vxworks
+ ;;
+ sps7)
+ basic_machine=3Dm68k-bull
+ os=3D-sysv2
+ ;;
+ spur)
+ basic_machine=3Dspur-unknown
+ ;;
+ st2000)
+ basic_machine=3Dm68k-tandem
+ ;;
+ stratus)
+ basic_machine=3Di860-stratus
+ os=3D-sysv4
+ ;;
+ sun2)
+ basic_machine=3Dm68000-sun
+ ;;
+ sun2os3)
+ basic_machine=3Dm68000-sun
+ os=3D-sunos3
+ ;;
+ sun2os4)
+ basic_machine=3Dm68000-sun
+ os=3D-sunos4
+ ;;
+ sun3os3)
+ basic_machine=3Dm68k-sun
+ os=3D-sunos3
+ ;;
+ sun3os4)
+ basic_machine=3Dm68k-sun
+ os=3D-sunos4
+ ;;
+ sun4os3)
+ basic_machine=3Dsparc-sun
+ os=3D-sunos3
+ ;;
+ sun4os4)
+ basic_machine=3Dsparc-sun
+ os=3D-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=3Dsparc-sun
+ os=3D-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=3Dm68k-sun
+ ;;
+ sun4)
+ basic_machine=3Dsparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=3Di386-sun
+ ;;
+ sv1)
+ basic_machine=3Dsv1-cray
+ os=3D-unicos
+ ;;
+ symmetry)
+ basic_machine=3Di386-sequent
+ os=3D-dynix
+ ;;
+ t3d)
+ basic_machine=3Dalpha-cray
+ os=3D-unicos
+ ;;
+ t3e)
+ basic_machine=3Dalphaev5-cray
+ os=3D-unicos
+ ;;
+ t90)
+ basic_machine=3Dt90-cray
+ os=3D-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=3Dtic54x-unknown
+ os=3D-coff
+ ;;
+ tx39)
+ basic_machine=3Dmipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=3Dmipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=3Dpdp10-xkl
+ os=3D-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=3Dm68k-ncr
+ ;;
+ udi29k)
+ basic_machine=3Da29k-amd
+ os=3D-udi
+ ;;
+ ultra3)
+ basic_machine=3Da29k-nyu
+ os=3D-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=3Dv810-nec
+ os=3D-none
+ ;;
+ vaxv)
+ basic_machine=3Dvax-dec
+ os=3D-sysv
+ ;;
+ vms)
+ basic_machine=3Dvax-dec
+ os=3D-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=3Df301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=3Di960-wrs
+ os=3D-vxworks
+ ;;
+ vxworks68)
+ basic_machine=3Dm68k-wrs
+ os=3D-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=3Da29k-wrs
+ os=3D-vxworks
+ ;;
+ w65*)
+ basic_machine=3Dw65-wdc
+ os=3D-none
+ ;;
+ w89k-*)
+ basic_machine=3Dhppa1.1-winbond
+ os=3D-proelf
+ ;;
+ windows32)
+ basic_machine=3Di386-pc
+ os=3D-windows32-msvcrt
+ ;;
+ xps | xps100)
+ basic_machine=3Dxps100-honeywell
+ ;;
+ ymp)
+ basic_machine=3Dymp-cray
+ os=3D-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=3Dz8k-unknown
+ os=3D-sim
+ ;;
+ none)
+ basic_machine=3Dnone-none
+ os=3D-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is i=
n
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=3Dhppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=3Dhppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=3Dhppa1.1-oki
+ ;;
+ romp)
+ basic_machine=3Dromp-ibm
+ ;;
+ rs6000)
+ basic_machine=3Drs6000-ibm
+ ;;
+ vax)
+ basic_machine=3Dvax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=3Dpdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=3Dpdp11-dec
+ ;;
+ we32k)
+ basic_machine=3Dwe32k-att
+ ;;
+ sh3 | sh4 | sh3eb | sh4eb)
+ basic_machine=3Dsh-unknown
+ ;;
+ sh64)
+ basic_machine=3Dsh64-unknown
+ ;;
+ sparc | sparcv9 | sparcv9b)
+ basic_machine=3Dsparc-sun
+ ;;
+ cydra)
+ basic_machine=3Dcydra-cydrome
+ ;;
+ orion)
+ basic_machine=3Dorion-highlevel
+ ;;
+ orion105)
+ basic_machine=3Dclipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=3Dm68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=3Dpowerpc-apple
+ ;;
+ c4x*)
+ basic_machine=3Dc4x-none
+ os=3D-coff
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not reco=
gnized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=3D`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=3D`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" !=3D 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=3D`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=3D-solaris2
+ ;;
+ -svr4*)
+ os=3D-sysv4
+ ;;
+ -unixware*)
+ os=3D-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=3D`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* | -netbsd* | -openbsd* | -freebsd* | -riscix*=
\
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oab=
i* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -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* | -pow=
ermax*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=3D-nto$os
+ ;;
+ esac
+ ;;
+ -nto*)
+ os=3D-nto-qnx
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=3D`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux*)
+ os=3D`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=3D`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=3D`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=3D-openedition
+ ;;
+ -wince*)
+ os=3D-wince
+ ;;
+ -osfrose*)
+ os=3D-osfrose
+ ;;
+ -osf*)
+ os=3D-osf
+ ;;
+ -utek*)
+ os=3D-bsd
+ ;;
+ -dynix*)
+ os=3D-bsd
+ ;;
+ -acis*)
+ os=3D-aos
+ ;;
+ -atheos*)
+ os=3D-atheos
+ ;;
+ -386bsd)
+ os=3D-bsd
+ ;;
+ -ctix* | -uts*)
+ os=3D-sysv
+ ;;
+ -nova*)
+ os=3D-rtmk-nova
+ ;;
+ -ns2 )
+ os=3D-nextstep2
+ ;;
+ -nsk*)
+ os=3D-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=3D`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=3D-sysv4
+ ;;
+ -triton*)
+ os=3D-sysv3
+ ;;
+ -oss*)
+ os=3D-sysv3
+ ;;
+ -svr4)
+ os=3D-sysv4
+ ;;
+ -svr3)
+ os=3D-sysv3
+ ;;
+ -sysvr4)
+ os=3D-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=3D-ose
+ ;;
+ -es1800*)
+ os=3D-ose
+ ;;
+ -xenix)
+ os=3D-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=3D-mint
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=3D`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 ma=
chines.
+# 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 mach=
ine.
+
+# 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
+ *-acorn)
+ os=3D-riscix1.2
+ ;;
+ arm*-rebel)
+ os=3D-linux
+ ;;
+ arm*-semi)
+ os=3D-aout
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=3D-tops20
+ ;;
+ pdp11-*)
+ os=3D-none
+ ;;
+ *-dec | vax-*)
+ os=3D-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=3D-domain
+ ;;
+ i386-sun)
+ os=3D-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=3D-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=3D-sunos4
+ ;;
+ m68*-cisco)
+ os=3D-aout
+ ;;
+ mips*-cisco)
+ os=3D-elf
+ ;;
+ mips*-*)
+ os=3D-elf
+ ;;
+ or32-*)
+ os=3D-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=3D-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=3D-sunos4.1.1
+ ;;
+ *-be)
+ os=3D-beos
+ ;;
+ *-ibm)
+ os=3D-aix
+ ;;
+ *-wec)
+ os=3D-proelf
+ ;;
+ *-winbond)
+ os=3D-proelf
+ ;;
+ *-oki)
+ os=3D-proelf
+ ;;
+ *-hp)
+ os=3D-hpux
+ ;;
+ *-hitachi)
+ os=3D-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=3D-sysv
+ ;;
+ *-cbm)
+ os=3D-amigaos
+ ;;
+ *-dg)
+ os=3D-dgux
+ ;;
+ *-dolphin)
+ os=3D-sysv3
+ ;;
+ m68k-ccur)
+ os=3D-rtu
+ ;;
+ m88k-omron*)
+ os=3D-luna
+ ;;
+ *-next )
+ os=3D-nextstep
+ ;;
+ *-sequent)
+ os=3D-ptx
+ ;;
+ *-crds)
+ os=3D-unos
+ ;;
+ *-ns)
+ os=3D-genix
+ ;;
+ i370-*)
+ os=3D-mvs
+ ;;
+ *-next)
+ os=3D-nextstep3
+ ;;
+ *-gould)
+ os=3D-sysv
+ ;;
+ *-highlevel)
+ os=3D-bsd
+ ;;
+ *-encore)
+ os=3D-bsd
+ ;;
+ *-sgi)
+ os=3D-irix
+ ;;
+ *-siemens)
+ os=3D-sysv4
+ ;;
+ *-masscomp)
+ os=3D-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=3D-uxpv
+ ;;
+ *-rom68k)
+ os=3D-coff
+ ;;
+ *-*bug)
+ os=3D-coff
+ ;;
+ *-apple)
+ os=3D-macos
+ ;;
+ *-atari*)
+ os=3D-mint
+ ;;
+ *)
+ os=3D-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but no=
t the
+# manufacturer. We pick the logical manufacturer.
+vendor=3Dunknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=3Dacorn
+ ;;
+ -sunos*)
+ vendor=3Dsun
+ ;;
+ -aix*)
+ vendor=3Dibm
+ ;;
+ -beos*)
+ vendor=3Dbe
+ ;;
+ -hpux*)
+ vendor=3Dhp
+ ;;
+ -mpeix*)
+ vendor=3Dhp
+ ;;
+ -hiux*)
+ vendor=3Dhitachi
+ ;;
+ -unos*)
+ vendor=3Dcrds
+ ;;
+ -dgux*)
+ vendor=3Ddg
+ ;;
+ -luna*)
+ vendor=3Domron
+ ;;
+ -genix*)
+ vendor=3Dns
+ ;;
+ -mvs* | -opened*)
+ vendor=3Dibm
+ ;;
+ -ptx*)
+ vendor=3Dsequent
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=3Dwrs
+ ;;
+ -aux*)
+ vendor=3Dapple
+ ;;
+ -hms*)
+ vendor=3Dhitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=3Dapple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=3Datari
+ ;;
+ -vos*)
+ vendor=3Dstratus
+ ;;
+ esac
+ basic_machine=3D`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp=3D'"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Added: trunk/DvdMenuXtractor/dmx/libdvdread/configure
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/configure 2007-03-10 21:38:29 UT=
C (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/configure 2007-03-10 21:41:34 UT=
C (rev 1290)
@@ -0,0 +1,11459 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.53.
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Find the correct PATH separator. Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" !=3D Xset; then
+ UNAME=3D${UNAME-`uname 2>/dev/null`}
+ case X$UNAME in
+ *-DOS) lt_cv_sys_path_separator=3D';' ;;
+ *) lt_cv_sys_path_separator=3D':' ;;
+ esac
+ PATH_SEPARATOR=3D$lt_cv_sys_path_separator
+fi
+
+
+# Check that we are running under the correct shell.
+SHELL=3D${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=3D`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+echo=3D${ECHO-echo}
+if test "X$1" =3D X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" =3D X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" =3D 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" =3D X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+
+EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" =3D Xset; then CDPATH=3D:; export CDPATH; fi
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" !=3D 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=3D"`eval $cmd`") 2>/dev/null &&
+ echo_test_string=3D"`eval $cmd`" &&
+ (test "X$echo_test_string" =3D "X$echo_test_string") 2>/dev/null
+ then
+ break
+ fi
+ done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" =3D 'X\t' &&
+ echo_testing_string=3D`($echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" =3D "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.
+
+ IFS=3D"${IFS=3D }"; save_ifs=3D"$IFS"; IFS=3D$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" =3D 'X\t' &&
+ echo_testing_string=3D`($dir/echo "$echo_test_string") 2>/dev/nul=
l` &&
+ test "X$echo_testing_string" =3D "X$echo_test_string"; then
+ echo=3D"$dir/echo"
+ break
+ fi
+ done
+ IFS=3D"$save_ifs"
+
+ if test "X$echo" =3D Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`(print -r '\t') 2>/dev/null`" =3D 'X\t' &&
+ echo_testing_string=3D`(print -r "$echo_test_string") 2>/dev/null=
` &&
+ test "X$echo_testing_string" =3D "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ echo=3D'print -r'
+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+ test "X$CONFIG_SHELL" !=3D X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=3D/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ echo=3D'printf %s\n'
+ if test "X`($echo '\t') 2>/dev/null`" =3D 'X\t' &&
+ echo_testing_string=3D`($echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" =3D "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=3D`($ORIGINAL_CONFIG_SHELL "$0" --fallbac=
k-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" =3D 'X\t' &&
+ echo_testing_string=3D`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo =
"$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" =3D "X$echo_test_string"; then
+ CONFIG_SHELL=3D$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL=3D"$CONFIG_SHELL"
+ export SHELL
+ echo=3D"$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=3D`($CONFIG_SHELL "$0" --fallback-echo '\=
t') 2>/dev/null` &&
+ test "X$echo_testing_string" =3D 'X\t' &&
+ echo_testing_string=3D`($CONFIG_SHELL "$0" --fallback-echo "$echo_te=
st_string") 2>/dev/null` &&
+ test "X$echo_testing_string" =3D "X$echo_test_string"; then
+ echo=3D"$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=3D:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed=
50q "$0"'; do
+ if (test "X$echo_test_string" =3D "X`eval $cmd`") 2>/dev/null
+ then
+ break
+ fi
+ prev=3D"$cmd"
+ done
+
+ if test "$prev" !=3D 'sed 50q "$0"'; then
+ echo_test_string=3D`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=3Decho
+ 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=3D$echo
+if test "X$ECHO" =3D "X$CONFIG_SHELL $0 --fallback-echo"; then
+ ECHO=3D"$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=3Dexpr
+else
+ as_expr=3Dfalse
+fi
+
+
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=3D:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; th=
en
+ set -o posix
+fi
+
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=3DFOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=3Dunset
+else
+ as_unset=3Dfalse
+fi
+
+(set +x; test -n "`(LANG=3DC; export LANG) 2>&1`") &&
+ { $as_unset LANG || test "${LANG+set}" !=3D set; } ||
+ { LANG=3DC; export LANG; }
+(set +x; test -n "`(LC_ALL=3DC; export LC_ALL) 2>&1`") &&
+ { $as_unset LC_ALL || test "${LC_ALL+set}" !=3D set; } ||
+ { LC_ALL=3DC; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=3DC; export LC_TIME) 2>&1`") &&
+ { $as_unset LC_TIME || test "${LC_TIME+set}" !=3D set; } ||
+ { LC_TIME=3DC; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=3DC; export LC_CTYPE) 2>&1`") &&
+ { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" !=3D set; } ||
+ { LC_CTYPE=3DC; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=3DC; export LANGUAGE) 2>&1`") &&
+ { $as_unset LANGUAGE || test "${LANGUAGE+set}" !=3D set; } ||
+ { LANGUAGE=3DC; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=3DC; export LC_COLLATE) 2>&1`") &&
+ { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" !=3D set; } ||
+ { LC_COLLATE=3DC; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=3DC; export LC_NUMERIC) 2>&1`") &&
+ { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" !=3D set; } ||
+ { LC_NUMERIC=3DC; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=3DC; export LC_MESSAGES) 2>&1`") &&
+ { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" !=3D set; } ||
+ { LC_MESSAGES=3DC; export LC_MESSAGES; }
+
+
+# Name of the executable.
+as_me=3D`(basename "$0") 2>/dev/null ||
+$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'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters=3D'abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS=3D'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=3D$as_cr_letters$as_cr_LETTERS
+as_cr_digits=3D'0123456789'
+as_cr_alnum=3D$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" !=3D set; then
+ echo "#! /bin/sh" >conftest.sh
+ echo "exit 0" >>conftest.sh
+ chmod +x conftest.sh
+ if (PATH=3D".;."; conftest.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=3D';'
+ else
+ PATH_SEPARATOR=3D:
+ fi
+ rm -f conftest.sh
+fi
+
+
+ as_lineno_1=3D$LINENO
+ as_lineno_2=3D$LINENO
+ as_lineno_3=3D`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" !=3D "x$as_lineno_2" &&
+ test "x$as_lineno_3" =3D "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=3D$0 ;;
+ *) as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ test -r "$as_dir/$0" && as_myself=3D$as_dir/$0 && break
+done
+
+ ;;
+ 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" =3D x; then
+ as_myself=3D$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute pa=
th" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=3D$LINENO
+ as_lineno_2=3D$LINENO
+ as_lineno_3=3D`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" !=3D "x$as_lineno_2" &&
+ test "x$as_lineno_3" =3D "x$as_lineno_2" ') 2>/dev/null; then
+ CONFIG_SHELL=3D$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # 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 before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=3D', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=3D' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\=
2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POS=
IX 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 sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N=3D ECHO_C=3D'
+' ECHO_T=3D' ' ;;
+ *c*,* ) ECHO_N=3D-n ECHO_C=3D ECHO_T=3D ;;
+ *) ECHO_N=3D ECHO_C=3D'\c' ECHO_T=3D ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=3Dexpr
+else
+ as_expr=3Dfalse
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more gen=
eric
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s=3D'cp -p'
+ else
+ as_ln_s=3D'ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=3Dln
+else
+ as_ln_s=3D'cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p=3D"test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp=3D"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=3D"sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl=3D'
+'
+IFS=3D" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" !=3D set || { CDPATH=3D$PATH_SE=
PARATOR; export CDPATH; }
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=3D`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=3D/usr/local
+cross_compiling=3Dno
+subdirs=3D
+MFLAGS=3D
+MAKEFLAGS=3D
+SHELL=3D${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=3D38}
+
+# Identity of this package.
+PACKAGE_NAME=3D
+PACKAGE_TARNAME=3D
+PACKAGE_VERSION=3D
+PACKAGE_STRING=3D
+PACKAGE_BUGREPORT=3D
+
+ac_unique_file=3D"dvdread/dvd_reader.c"
+# Factoring default headers for most tests.
+ac_includes_default=3D"\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+
+# Initialize some variables set by options.
+ac_init_help=3D
+ac_init_version=3Dfalse
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=3D/dev/null
+exec_prefix=3DNONE
+no_create=3D
+no_recursion=3D
+prefix=3DNONE
+program_prefix=3DNONE
+program_suffix=3DNONE
+program_transform_name=3Ds,x,x,
+silent=3D
+site=3D
+srcdir=3D
+verbose=3D
+x_includes=3DNONE
+x_libraries=3DNONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=3D/fo=
o"
+# 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.
+bindir=3D'${exec_prefix}/bin'
+sbindir=3D'${exec_prefix}/sbin'
+libexecdir=3D'${exec_prefix}/libexec'
+datadir=3D'${prefix}/share'
+sysconfdir=3D'${prefix}/etc'
+sharedstatedir=3D'${prefix}/com'
+localstatedir=3D'${prefix}/var'
+libdir=3D'${exec_prefix}/lib'
+includedir=3D'${prefix}/include'
+oldincludedir=3D'/usr/include'
+infodir=3D'${prefix}/info'
+mandir=3D'${prefix}/man'
+
+ac_prev=3D
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=3D\$ac_option"
+ ac_prev=3D
+ continue
+ fi
+
+ ac_optarg=3D`expr "x$ac_option" : 'x[^=3D]*=3D\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose ty=
pos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=3Dbindir ;;
+ -bindir=3D* | --bindir=3D* | --bindi=3D* | --bind=3D* | --bin=3D* | --=
bi=3D*)
+ bindir=3D$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=3Dbuild_alias ;;
+ -build=3D* | --build=3D* | --buil=3D* | --bui=3D* | --bu=3D*)
+ build_alias=3D$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=3Dcache_file ;;
+ -cache-file=3D* | --cache-file=3D* | --cache-fil=3D* | --cache-fi=3D* =
\
+ | --cache-f=3D* | --cache-=3D* | --cache=3D* | --cach=3D* | --cac=3D* =
| --ca=3D* | --c=3D*)
+ cache_file=3D$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=3Dconfig.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=3Ddatadir ;;
+ -datadir=3D* | --datadir=3D* | --datadi=3D* | --datad=3D* | --data=3D*=
| --dat=3D* \
+ | --da=3D*)
+ datadir=3D$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=3D`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=3D`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=3Dno" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=3D`expr "x$ac_option" : 'x-*enable-\([^=3D]*\)'`
+ # 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=3D`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=3D*) ac_optarg=3D`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=3Dyes ;;
+ esac
+ eval "enable_$ac_feature=3D'$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=3Dexec_prefix ;;
+ -exec-prefix=3D* | --exec_prefix=3D* | --exec-prefix=3D* | --exec-pref=
i=3D* \
+ | --exec-pref=3D* | --exec-pre=3D* | --exec-pr=3D* | --exec-p=3D* | --=
exec-=3D* \
+ | --exec=3D* | --exe=3D* | --ex=3D*)
+ exec_prefix=3D$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=3Dyes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=3Dlong ;;
+ -help=3Dr* | --help=3Dr* | --hel=3Dr* | --he=3Dr* | -hr*)
+ ac_init_help=3Drecursive ;;
+ -help=3Ds* | --help=3Ds* | --hel=3Ds* | --he=3Ds* | -hs*)
+ ac_init_help=3Dshort ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=3Dhost_alias ;;
+ -host=3D* | --host=3D* | --hos=3D* | --ho=3D*)
+ host_alias=3D$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=3Dincludedir ;;
+ -includedir=3D* | --includedir=3D* | --includedi=3D* | --included=3D* =
| --include=3D* \
+ | --includ=3D* | --inclu=3D* | --incl=3D* | --inc=3D*)
+ includedir=3D$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=3Dinfodir ;;
+ -infodir=3D* | --infodir=3D* | --infodi=3D* | --infod=3D* | --info=3D*=
| --inf=3D*)
+ infodir=3D$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=3Dlibdir ;;
+ -libdir=3D* | --libdir=3D* | --libdi=3D* | --libd=3D*)
+ libdir=3D$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=3Dlibexecdir ;;
+ -libexecdir=3D* | --libexecdir=3D* | --libexecdi=3D* | --libexecd=3D* =
| --libexec=3D* \
+ | --libexe=3D* | --libex=3D* | --libe=3D*)
+ libexecdir=3D$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=3Dlocalstatedir ;;
+ -localstatedir=3D* | --localstatedir=3D* | --localstatedi=3D* | --loca=
lstated=3D* \
+ | --localstate=3D* | --localstat=3D* | --localsta=3D* | --localst=3D* =
\
+ | --locals=3D* | --local=3D* | --loca=3D* | --loc=3D* | --lo=3D*)
+ localstatedir=3D$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=3Dmandir ;;
+ -mandir=3D* | --mandir=3D* | --mandi=3D* | --mand=3D* | --man=3D* | --=
ma=3D* | --m=3D*)
+ mandir=3D$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=3Dno ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=3Dyes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=3Dyes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=3Doldincludedir ;;
+ -oldincludedir=3D* | --oldincludedir=3D* | --oldincludedi=3D* | --oldi=
ncluded=3D* \
+ | --oldinclude=3D* | --oldinclud=3D* | --oldinclu=3D* | --oldincl=3D* =
| --oldinc=3D* \
+ | --oldin=3D* | --oldi=3D* | --old=3D* | --ol=3D* | --o=3D*)
+ oldincludedir=3D$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=3Dprefix ;;
+ -prefix=3D* | --prefix=3D* | --prefi=3D* | --pref=3D* | --pre=3D* | --=
pr=3D* | --p=3D*)
+ prefix=3D$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref =
\
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=3Dprogram_prefix ;;
+ -program-prefix=3D* | --program-prefix=3D* | --program-prefi=3D* \
+ | --program-pref=3D* | --program-pre=3D* | --program-pr=3D* | --progra=
m-p=3D*)
+ program_prefix=3D$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff =
\
+ | --program-suf | --program-su | --program-s)
+ ac_prev=3Dprogram_suffix ;;
+ -program-suffix=3D* | --program-suffix=3D* | --program-suffi=3D* \
+ | --program-suff=3D* | --program-suf=3D* | --program-su=3D* | --progra=
m-s=3D*)
+ program_suffix=3D$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=3Dprogram_transform_name ;;
+ -program-transform-name=3D* | --program-transform-name=3D* \
+ | --program-transform-nam=3D* | --program-transform-na=3D* \
+ | --program-transform-n=3D* | --program-transform-=3D* \
+ | --program-transform=3D* | --program-transfor=3D* \
+ | --program-transfo=3D* | --program-transf=3D* \
+ | --program-trans=3D* | --program-tran=3D* \
+ | --progr-tra=3D* | --program-tr=3D* | --program-t=3D*)
+ program_transform_name=3D$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=3Dyes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=3Dsbindir ;;
+ -sbindir=3D* | --sbindir=3D* | --sbindi=3D* | --sbind=3D* | --sbin=3D*=
\
+ | --sbi=3D* | --sb=3D*)
+ sbindir=3D$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=3Dsharedstatedir ;;
+ -sharedstatedir=3D* | --sharedstatedir=3D* | --sharedstatedi=3D* \
+ | --sharedstated=3D* | --sharedstate=3D* | --sharedstat=3D* | --shared=
sta=3D* \
+ | --sharedst=3D* | --shareds=3D* | --shared=3D* | --share=3D* | --shar=
=3D* \
+ | --sha=3D* | --sh=3D*)
+ sharedstatedir=3D$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=3Dsite ;;
+ -site=3D* | --site=3D* | --sit=3D*)
+ site=3D$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=3Dsrcdir ;;
+ -srcdir=3D* | --srcdir=3D* | --srcdi=3D* | --srcd=3D* | --src=3D* | --=
sr=3D*)
+ srcdir=3D$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=3Dsysconfdir ;;
+ -sysconfdir=3D* | --sysconfdir=3D* | --sysconfdi=3D* | --sysconfd=3D* =
| --sysconf=3D* \
+ | --syscon=3D* | --sysco=3D* | --sysc=3D* | --sys=3D* | --sy=3D*)
+ sysconfdir=3D$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=3Dtarget_alias ;;
+ -target=3D* | --target=3D* | --targe=3D* | --targ=3D* | --tar=3D* | --=
ta=3D* | --t=3D*)
+ target_alias=3D$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=3Dyes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=3D: ;;
+
+ -with-* | --with-*)
+ ac_package=3D`expr "x$ac_option" : 'x-*with-\([^=3D]*\)'`
+ # 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=3D`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=3D*) ac_optarg=3D`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=3Dyes ;;
+ esac
+ eval "with_$ac_package=3D'$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=3D`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=3D`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=3Dno" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=3Dyes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=3Dx_includes ;;
+ -x-includes=3D* | --x-includes=3D* | --x-include=3D* | --x-includ=3D* =
| --x-inclu=3D* \
+ | --x-incl=3D* | --x-inc=3D* | --x-in=3D* | --x-i=3D*)
+ x_includes=3D$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=3Dx_libraries ;;
+ -x-libraries=3D* | --x-libraries=3D* | --x-librarie=3D* | --x-librari=3D=
* \
+ | --x-librar=3D* | --x-libra=3D* | --x-libr=3D* | --x-lib=3D* | --x-li=
=3D* | --x-l=3D*)
+ x_libraries=3D$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=3D*)
+ ac_envvar=3D`expr "x$ac_option" : 'x\([^=3D]*\)=3D'`
+ # 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; }; }
+ ac_optarg=3D`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar=3D'$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=3D$ac_option} ${host_alias=3D$ac_option} ${target_al=
ias=3D$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=3D--`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 paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=3D$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for -=
-$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedi=
r \
+ localstatedir libdir includedir oldincludedir infodir mand=
ir
+do
+ eval ac_val=3D$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for -=
-$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+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=3D$build_alias
+host=3D$host_alias
+target=3D$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" !=3D x; then
+ if test "x$build_alias" =3D x; then
+ cross_compiling=3Dmaybe
+ 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" !=3D "x$host_alias"; then
+ cross_compiling=3Dyes
+ fi
+fi
+
+ac_tool_prefix=3D
+test -n "$host_alias" && ac_tool_prefix=3D$host_alias-
+
+test "$silent" =3D yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=3Dyes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=3D`(dirname "$0") 2>/dev/null ||
+$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=3D$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=3D..
+ fi
+else
+ ac_srcdir_defaulted=3Dno
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" =3D yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_=
confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $src=
dir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+srcdir=3D`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=3D${build_alias+set}
+ac_env_build_alias_value=3D$build_alias
+ac_cv_env_build_alias_set=3D${build_alias+set}
+ac_cv_env_build_alias_value=3D$build_alias
+ac_env_host_alias_set=3D${host_alias+set}
+ac_env_host_alias_value=3D$host_alias
+ac_cv_env_host_alias_set=3D${host_alias+set}
+ac_cv_env_host_alias_value=3D$host_alias
+ac_env_target_alias_set=3D${target_alias+set}
+ac_env_target_alias_value=3D$target_alias
+ac_cv_env_target_alias_set=3D${target_alias+set}
+ac_cv_env_target_alias_value=3D$target_alias
+ac_env_CC_set=3D${CC+set}
+ac_env_CC_value=3D$CC
+ac_cv_env_CC_set=3D${CC+set}
+ac_cv_env_CC_value=3D$CC
+ac_env_CFLAGS_set=3D${CFLAGS+set}
+ac_env_CFLAGS_value=3D$CFLAGS
+ac_cv_env_CFLAGS_set=3D${CFLAGS+set}
+ac_cv_env_CFLAGS_value=3D$CFLAGS
+ac_env_LDFLAGS_set=3D${LDFLAGS+set}
+ac_env_LDFLAGS_value=3D$LDFLAGS
+ac_cv_env_LDFLAGS_set=3D${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=3D$LDFLAGS
+ac_env_CPPFLAGS_set=3D${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=3D$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=3D${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=3D$CPPFLAGS
+ac_env_CPP_set=3D${CPP+set}
+ac_env_CPP_value=3D$CPP
+ac_cv_env_CPP_set=3D${CPP+set}
+ac_cv_env_CPP_value=3D$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" =3D "long"; then
+ # Omit some internal or obsolete options to make the list less imposin=
g.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=3DVALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=3DVALUE. 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=3Dshort display options specific to this package
+ --help=3Drecursive display the short help of all the included p=
ackages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=3DFILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=3Dconfig.cache'
+ -n, --no-create do not create output files
+ --srcdir=3DDIR find the sources in DIR [configure dir or \`=
..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=3DPREFIX install architecture-independent files in PR=
EFIX
+ [$ac_default_prefix]
+ --exec-prefix=3DEPREFIX install architecture-dependent files in EPRE=
FIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can speci=
fy
+an installation prefix other than \`$ac_default_prefix' using \`--prefix=
',
+for instance \`--prefix=3D\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=3DDIR user executables [EPREFIX/bin]
+ --sbindir=3DDIR system admin executables [EPREFIX/sbin]
+ --libexecdir=3DDIR program executables [EPREFIX/libexec]
+ --datadir=3DDIR read-only architecture-independent data [PREF=
IX/share]
+ --sysconfdir=3DDIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=3DDIR modifiable architecture-independent data [PRE=
FIX/com]
+ --localstatedir=3DDIR modifiable single-machine data [PREFIX/var]
+ --libdir=3DDIR object code libraries [EPREFIX/lib]
+ --includedir=3DDIR C header files [PREFIX/include]
+ --oldincludedir=3DDIR C header files for non-gcc [/usr/include]
+ --infodir=3DDIR info documentation [PREFIX/info]
+ --mandir=3DDIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=3DPREFIX prepend PREFIX to installed progr=
am names
+ --program-suffix=3DSUFFIX append SUFFIX to installed progra=
m names
+ --program-transform-name=3DPROGRAM run sed PROGRAM on installed prog=
ram names
+
+System types:
+ --build=3DBUILD configure for building on BUILD [guessed]
+ --host=3DHOST cross-compile to build programs to run on HOST [BU=
ILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATU=
RE=3Dno)
+ --enable-FEATURE[=3DARG] include FEATURE [ARG=3Dyes]
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual instal=
ler
+ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors
+ --enable-shared=3DPKGS build shared libraries default=3Dyes
+ --enable-static=3DPKGS build static libraries default=3Dyes
+ --enable-fast-install=3DPKGS optimize for fast installation default=3D=
yes
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-warnings enable -Wall and treat warnings as errors
+ --enable-pedantic enable various extra warnings for gcc
+
+Optional Packages:
+ --with-PACKAGE[=3DARG] use PACKAGE [ARG=3Dyes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=3Dn=
o)
+ --with-gnu-ld assume the C compiler uses GNU ld default=3Dno
+ --with-pic try to use only PIC/non-PIC objects default=3D=
use both
+ --with-libdvdcss=3DPATH force linking against libdvdcss
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to he=
lp
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" =3D "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=3D`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" =3D x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=3D.
+
+if test "$ac_dir" !=3D .; then
+ ac_dir_suffix=3D/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=3D`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix=3D ac_top_builddir=3D
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=3D.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=3D.
+ else
+ ac_top_srcdir=3D`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=3D$srcdir$ac_dir_suffix;
+ ac_top_srcdir=3D$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=3D$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=3D$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo ca=
n be
+# absolute.
+ac_abs_builddir=3D`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=3D`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=3D`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=3D`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=3Drecursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=3Drecursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir"=
>&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+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 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.53. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname =3D `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m =3D `(uname -m) 2>/dev/null || echo unknown`
+uname -r =3D `(uname -r) 2>/dev/null || echo unknown`
+uname -s =3D `(uname -s) 2>/dev/null || echo unknown`
+uname -v =3D `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p =3D `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X =3D `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch =3D `(/bin/arch) 2>/dev/null || echo=
unknown`
+/usr/bin/arch -k =3D `(/usr/bin/arch -k) 2>/dev/null || echo=
unknown`
+/usr/convex/getsysinfo =3D `(/usr/convex/getsysinfo) 2>/dev/null || echo=
unknown`
+hostinfo =3D `(hostinfo) 2>/dev/null || echo=
unknown`
+/bin/machine =3D `(/bin/machine) 2>/dev/null || echo=
unknown`
+/usr/bin/oslevel =3D `(/usr/bin/oslevel) 2>/dev/null || echo=
unknown`
+/bin/universe =3D `(/bin/universe) 2>/dev/null || echo=
unknown`
+
+_ASUNAME
+
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ echo "PATH: $as_dir"
+done
+
+} >&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.
+# Also quote any args containing shell meta-characters.
+ac_configure_args=3D
+ac_sep=3D
+for ac_arg
+do
+ case $ac_arg in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n ) continue ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=3D`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args=3D"$ac_configure_args$ac_sep'$ac_arg'"
+ ac_sep=3D" " ;;
+ esac
+ # Get rid of the leading space.
+done
+
+# 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: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=3D$?
+ # 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 valu=
es,
+{
+ (set) 2>&1 |
+ case `(ac_space=3D'"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=3D\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=3D\\(.*\\)/\\1=3D'"=
'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=3D\\(.*\\)/\\1=3D=
\\2/p"
+ ;;
+ esac;
+}
+ echo
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h
+ echo
+ fi
+ test "$ac_signal" !=3D 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal=3D'$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=3D0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a ne=
wline.
+echo >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 -z "$CONFIG_SITE"; then
+ if test "x$prefix" !=3D xNONE; then
+ CONFIG_SITE=3D"$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE=3D"$ac_default_prefix/share/config.site $ac_default_pref=
ix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; 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 sam=
e
+# value.
+ac_cache_corrupted=3Dfalse
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=3D.*/\1/p'`; do
+ eval ac_old_set=3D\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=3D\$ac_env_${ac_var}_set
+ eval ac_old_val=3D"\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val=3D"\$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 previou=
s run" >&2;}
+ ac_cache_corrupted=3D: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previ=
ous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=3D: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" !=3D "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=3D:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" =3D set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=3D$ac_var=3D`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` =
;;
+ *) ac_arg=3D$ac_var=3D$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args=3D"$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromi=
se 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 $ca=
che_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=3Dc
+ac_cpp=3D'$CPP $CPPFLAGS'
+ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest=
.$ac_ext $LIBS >&5'
+ac_compiler_gnu=3D$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+am__api_version=3D"1.6"
+ac_aux_dir=3D
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=3D$ac_dir
+ ac_install_sh=3D"$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=3D$ac_dir
+ ac_install_sh=3D"$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=3D$ac_dir
+ ac_install_sh=3D"$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 $sr=
cdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess=3D"$SHELL $ac_aux_dir/config.guess"
+ac_config_sub=3D"$SHELL $ac_aux_dir/config.sub"
+ac_configure=3D"$SHELL $ac_aux_dir/configure" # This should be Cygnus co=
nfigure.
+
+# 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=
"
+# ./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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog =3D 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 =3D 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 u=
se.
+ :
+ else
+ ac_cv_path_install=3D"$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" =3D set; then
+ INSTALL=3D$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=3D$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=3D'${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT=3D'${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA=3D'${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 "$*" =3D "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" !=3D "X $srcdir/configure conftest.file" \
+ && test "$*" !=3D "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 br=
oken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" =3D conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than dis=
tributed 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" !=3D NONE &&
+ program_transform_name=3D"s,^,$program_prefix,;$program_transform_name=
"
+# Use a double $ so make ignores it.
+test "$program_suffix" !=3D NONE &&
+ program_transform_name=3D"s,\$,$program_suffix,;$program_transform_nam=
e"
+# 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=3D`echo $program_transform_name | sed -f conftest=
.sed`
+rm conftest.sed
+
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=3D`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" =3D xset || MISSING=3D"\${SHELL} $am_aux_dir/miss=
ing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run=3D"$MISSING --run "
+else
+ am_missing_run=3D
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missi=
ng" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name wi=
th args.
+set dummy $ac_prog; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK=3D"$AWK" # Let the user override the test.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK=3D"$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=3D$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 dummy ${MAKE-make}; ac_make=3D`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" =3D set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp=3D"${MAKE}"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse =
us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=3D`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=3Dyes
+else
+ eval ac_cv_prog_make_${ac_make}_set=3Dno
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" =3D yes"; the=
n
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=3D
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE=3D"MAKE=3D${MAKE-make}"
+fi
+
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" !=3D "`pwd`" &&
+ 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 dis=
tclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Define the identity of the package.
+ PACKAGE=3Dlibdvdread
+ VERSION=3D0.9.4
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=3D${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=3D${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=3D${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=3D${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=3D${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=3D${AMTAR-"${am_missing_run}tar"}
+
+install_sh=3D${install_sh-"$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" !=3D no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a p=
rogram name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP=3D"$STRIP" # Let the user override the test.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP=3D"${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=3D$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=3D$STRIP
+ # Extract the first word of "strip", so it can be a program name with =
args.
+set dummy strip; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP=3D"$ac_ct_STRIP" # Let the user override the te=
st.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP=3D"strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=3D":"
+fi
+fi
+ac_ct_STRIP=3D$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
+
+ STRIP=3D$ac_ct_STRIP
+else
+ STRIP=3D"$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM=3D"\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
+
+
+# Add the stamp file to the list of files AC keeps track of,
+# along with our hook.
+ac_config_headers=3D"$ac_config_headers config.h"
+
+
+
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific por=
tions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of=
Makefiles... $ECHO_C" >&6
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mod=
e was given.
+if test "${enable_maintainer_mode+set}" =3D set; then
+ enableval=3D"$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=3D$enableval
+else
+ USE_MAINTAINER_MODE=3Dno
+fi;
+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
+
+
+if test $USE_MAINTAINER_MODE =3D yes; then
+ MAINTAINER_MODE_TRUE=3D
+ MAINTAINER_MODE_FALSE=3D'#'
+else
+ MAINTAINER_MODE_TRUE=3D'#'
+ MAINTAINER_MODE_FALSE=3D
+fi
+
+ MAINT=3D$MAINTAINER_MODE_TRUE
+
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=3D$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=3D`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must spe=
cify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;=
}
+ { (exit 1); exit 1; }; }
+ac_cv_build=3D`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias fai=
led" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_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
+build=3D$ac_cv_build
+build_cpu=3D`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/=
'`
+build_vendor=3D`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/=
\2/'`
+build_os=3D`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'=
`
+
+
+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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=3D$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=3D$ac_cv_build_alias
+ac_cv_host=3D`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias fail=
ed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=3D$ac_cv_host
+host_cpu=3D`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=3D`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2=
/'`
+host_os=3D`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+ac_ext=3Dc
+ac_cpp=3D'$CPP $CPPFLAGS'
+ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest=
.$ac_ext $LIBS >&5'
+ac_compiler_gnu=3D$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 pro=
gram name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC=3D"$CC" # Let the user override the test.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC=3D"${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=3D$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=3D$CC
+ # Extract the first word of "gcc", so it can be a program name with ar=
gs.
+set dummy gcc; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC=3D"$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC=3D"gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=3D$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
+
+ CC=3D$ac_ct_CC
+else
+ CC=3D"$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 prog=
ram name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC=3D"$CC" # Let the user override the test.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC=3D"${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=3D$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=3D$CC
+ # Extract the first word of "cc", so it can be a program name with arg=
s.
+set dummy cc; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC=3D"$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC=3D"cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=3D$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
+
+ CC=3D$ac_ct_CC
+else
+ CC=3D"$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with arg=
s.
+set dummy cc; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC=3D"$CC" # Let the user override the test.
+else
+ ac_prog_rejected=3Dno
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" =3D "/usr/ucb/cc"; then
+ ac_prog_rejected=3Dyes
+ continue
+ fi
+ ac_cv_prog_CC=3D"cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected =3D 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 $# !=3D 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
+ set dummy "$as_dir/$ac_word" ${1+"$@"}
+ shift
+ ac_cv_prog_CC=3D"$@"
+ fi
+fi
+fi
+fi
+CC=3D$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
+ 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=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC=3D"$CC" # Let the user override the test.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC=3D"$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=3D$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=3D$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name wi=
th args.
+set dummy $ac_prog; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC=3D"$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC=3D"$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=3D$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
+
+ CC=3D$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compil=
er found in \$PATH" >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=3D`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\""=
) >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=3D$ac_clean_files
+ac_clean_files=3D"$ac_clean_files a.out a.exe"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuitio=
n
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=3D`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT =3D no' in a Makef=
ile.
+ac_cv_exeext=3D
+for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
+ ls a.out conftest 2>/dev/null;
+ ls a.* conftest.* 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;=
;
+ a.out ) # We found the default executable, but exeext=3D'' is most
+ # certainly right.
+ break;;
+ *.* ) ac_cv_exeext=3D`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >=
&5
+echo "$as_me: error: C compiler cannot create executables" >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=3D$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check 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" !=3D yes; then
+ if { ac_try=3D'./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=3Dno
+ else
+ if test "$cross_compiling" =3D maybe; then
+ cross_compiling=3Dyes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&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
+ac_clean_files=3D$ac_clean_files_save
+# Check 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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observabl=
e)
+# 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 `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/nul=
l`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.* ) ac_cv_exeext=3D`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables:=
cannot compile and link" >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compil=
e and link" >&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=3D$ac_cv_exeext
+ac_exeext=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/nul=
l`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *) ac_cv_objext=3D`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: =
cannot compile" >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compi=
le" >&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=3D$ac_cv_objext
+ac_objext=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=3Dno
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=3D$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=3D`test $ac_compiler_gnu =3D yes && echo yes`
+ac_test_CFLAGS=3D${CFLAGS+set}
+ac_save_CFLAGS=3D$CFLAGS
+CFLAGS=3D"-g"
+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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cc_g=3Dno
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+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" =3D set; then
+ CFLAGS=3D$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g =3D yes; then
+ if test "$GCC" =3D yes; then
+ CFLAGS=3D"-g -O2"
+ else
+ CFLAGS=3D"-g"
+ fi
+else
+ if test "$GCC" =3D yes; then
+ CFLAGS=3D"-O2"
+ else
+ CFLAGS=3D
+ fi
+fi
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_declaration
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=3Dc
+ac_cpp=3D'$CPP $CPPFLAGS'
+ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest=
.$ac_ext $LIBS >&5'
+ac_compiler_gnu=3D$ac_cv_c_compiler_gnu
+rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+ DEPDIR=3D.deps
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ DEPDIR=3D_deps
+fi
+rmdir .deps 2>/dev/null
+
+
+ac_config_commands=3D"$ac_config_commands depfiles"
+
+
+am_make=3D${MAKE-make}
+cat > confinc << 'END'
+doit:
+ @echo done
+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=3D"#"
+am__quote=3D
+_am_result=3Dnone
+# 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 | fgrep -v 'ing directory'`=
" =3D "done"; then
+ am__include=3Dinclude
+ am__quote=3D
+ _am_result=3DGNU
+fi
+# Now try BSD make style include.
+if test "$am__include" =3D "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" =3D "done"; then
+ am__include=3D.include
+ am__quote=3D"\""
+ _am_result=3DBSD
+ 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 or --disable-dependency-tra=
cking was given.
+if test "${enable_dependency_tracking+set}" =3D set; then
+ enableval=3D"$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" !=3D xno; then
+ am_depcomp=3D"$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH=3D'\'
+fi
+
+
+if test "x$enable_dependency_tracking" !=3D xno; then
+ AMDEP_TRUE=3D
+ AMDEP_FALSE=3D'#'
+else
+ AMDEP_TRUE=3D'#'
+ AMDEP_FALSE=3D
+fi
+
+
+
+
+depcc=3D"$CC" am_compiler_list=3D
+
+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}" =3D 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
+
+ am_cv_CC_dependencies_compiler_type=3Dnone
+ if test "$am_compiler_list" =3D ""; then
+ am_compiler_list=3D`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depco=
mp`
+ fi
+ for depmode in $am_compiler_list; do
+ # 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.
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
+ echo "${am__include} ${am__quote}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" =3D 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=3D$depmode \
+ source=3Dconftest.c object=3Dconftest.o \
+ depfile=3Dconftest.Po tmpdepfile=3Dconftest.TPo \
+ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>=
&1 &&
+ grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ am_cv_CC_dependencies_compiler_type=3D$depmode
+ break
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=3Dnone
+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=3Ddepmode=3D$am_cv_CC_dependencies_compiler_type
+
+
+
+ac_ext=3Dc
+ac_cpp=3D'$CPP $CPPFLAGS'
+ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest=
.$ac_ext $LIBS >&5'
+ac_compiler_gnu=3D$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=3D
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" =3D 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=3Dfalse
+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.
+ # 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
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <assert.h>
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=3D$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=3D$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=3D
+ fi
+else
+ ac_cpp_err=3Dyes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+ cat 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 non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=3D$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=3D$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=3D
+ fi
+else
+ ac_cpp_err=3Dyes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=3D:
+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=3D$CPP
+
+fi
+ CPP=3D$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=3D$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=3Dfalse
+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.
+ # 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
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <assert.h>
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=3D$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=3D$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=3D
+ fi
+else
+ ac_cpp_err=3Dyes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+ cat 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 non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=3D$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=3D$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=3D
+ fi
+else
+ ac_cpp_err=3Dyes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=3D:
+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" >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=3Dc
+ac_cpp=3D'$CPP $CPPFLAGS'
+ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest=
.$ac_ext $LIBS >&5'
+ac_compiler_gnu=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=3D$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=3D$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=3D
+ fi
+else
+ ac_cpp_err=3Dyes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_stdc=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_header_stdc=3Dno
+fi
+rm -f conftest.err conftest.$ac_ext
+
+if test $ac_cv_header_stdc =3D yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=3Dno
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc =3D yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=3Dno
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc =3D yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" =3D yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#if ((' ' & 0x0FF) =3D=3D 0x020)
+# define ISLOWER(c) ('a' <=3D (c) && (c) <=3D 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) (('a' <=3D (c) && (c) <=3D 'i') \
+ || ('j' <=3D (c) && (c) <=3D 'r') \
+ || ('s' <=3D (c) && (c) <=3D 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i =3D 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) !=3D TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } && { ac_try=3D'./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $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
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ac_cv_header_stdc=3Dno
+fi
+rm -f core core.* *.core 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 =3D yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+case x"$host_os" in
+ xdarwin*)
+ CFLAGS=3D"${CFLAGS} -no-cpp-precomp"
+
+cat >>confdefs.h <<\_ACEOF
+#define __DARWIN__ 1
+_ACEOF
+
+ ;;
+ x*)
+ ;;
+esac
+
+if test x"$GCC" !=3D x"yes"; then
+ case x"$host" in
+ xsparc-sun-solaris*)
+ OPT_CFLAGS=3D"$CFLAGS -xCC -xmemalign"
+ echo "$as_me:$LINENO: checking if $CC supports $OPT_CFLAGS flags=
" >&5
+echo $ECHO_N "checking if $CC supports $OPT_CFLAGS flags... $ECHO_C" >&6
+ SAVE_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$OPT_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_try_cflags_ok=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_try_cflags_ok=3Dno
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=3D"$SAVE_CFLAGS"
+ echo "$as_me:$LINENO: result: $ac_cv_try_cflags_ok" >&5
+echo "${ECHO_T}$ac_cv_try_cflags_ok" >&6
+ if test x"$ac_cv_try_cflags_ok" =3D x"yes"; then
+ CFLAGS=3D$OPT_CFLAGS
+ else
+ :
+ fi
+ ;;
+ esac
+fi
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" =3D set; then
+ enableval=3D"$enable_shared"
+ p=3D${PACKAGE-default}
+case $enableval in
+yes) enable_shared=3Dyes ;;
+no) enable_shared=3Dno ;;
+*)
+ enable_shared=3Dno
+ # Look at the argument we got. We use all the common list separators.
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D"${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" =3D "X$p"; then
+ enable_shared=3Dyes
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+ ;;
+esac
+else
+ enable_shared=3Dyes
+fi;
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" =3D set; then
+ enableval=3D"$enable_static"
+ p=3D${PACKAGE-default}
+case $enableval in
+yes) enable_static=3Dyes ;;
+no) enable_static=3Dno ;;
+*)
+ enable_static=3Dno
+ # Look at the argument we got. We use all the common list separators.
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D"${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" =3D "X$p"; then
+ enable_static=3Dyes
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+ ;;
+esac
+else
+ enable_static=3Dyes
+fi;
+# Check whether --enable-fast-install or --disable-fast-install was give=
n.
+if test "${enable_fast_install+set}" =3D set; then
+ enableval=3D"$enable_fast_install"
+ p=3D${PACKAGE-default}
+case $enableval in
+yes) enable_fast_install=3Dyes ;;
+no) enable_fast_install=3Dno ;;
+*)
+ enable_fast_install=3Dno
+ # Look at the argument we got. We use all the common list separators.
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D"${IFS}:,"
+ for pkg in $enableval; do
+ if test "X$pkg" =3D "X$p"; then
+ enable_fast_install=3Dyes
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+ ;;
+esac
+else
+ enable_fast_install=3Dyes
+fi;
+# Find the correct PATH separator. Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" !=3D Xset; then
+ UNAME=3D${UNAME-`uname 2>/dev/null`}
+ case X$UNAME in
+ *-DOS) lt_cv_sys_path_separator=3D';' ;;
+ *) lt_cv_sys_path_separator=3D':' ;;
+ esac
+ PATH_SEPARATOR=3D$lt_cv_sys_path_separator
+fi
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" =3D set; then
+ withval=3D"$with_gnu_ld"
+ test "$withval" =3D no || with_gnu_ld=3Dyes
+else
+ with_gnu_ld=3Dno
+fi;
+ac_prog=3Dld
+if test "$GCC" =3D yes; then
+ # Check if gcc -print-prog-name=3Dld gives a path.
+ echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=3D`($CC -print-prog-name=3Dld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=3D`($CC -print-prog-name=3Dld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt=3D'/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=3D`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=3D`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=3D"$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=3Dld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=3Dunknown
+ ;;
+ esac
+elif test "$with_gnu_ld" =3D 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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$LD"; then
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=3D.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext=
"; then
+ lt_cv_path_LD=3D"$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version=
,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' >=
/dev/null; then
+ test "$with_gnu_ld" !=3D no && break
+ else
+ test "$with_gnu_ld" !=3D yes && break
+ fi
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+else
+ lt_cv_path_LD=3D"$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD=3D"$lt_cv_path_LD"
+if test -n "$LD"; then
+ echo "$as_me:$LINENO: result: $LD" >&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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only acc=
ept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ lt_cv_prog_gnu_ld=3Dyes
+else
+ lt_cv_prog_gnu_ld=3Dno
+fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_ld_reload_flag=3D'-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=3D$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=3D" $reload_flag"
+
+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}" =3D 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=3D"$NM"
+else
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ test -z "$ac_dir" && ac_dir=3D.
+ tmp_nm=3D$ac_dir/${ac_tool_prefix}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 say=
s:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/n=
ull|Invalid file or object type)' >/dev/null; then
+ lt_cv_path_NM=3D"$tmp_nm -B"
+ break
+ elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/n=
ull >/dev/null; then
+ lt_cv_path_NM=3D"$tmp_nm -p"
+ break
+ else
+ lt_cv_path_NM=3D${lt_cv_path_NM=3D"$tmp_nm"} # keep the first match, bu=
t
+ continue # so that we can try to find one that supports BSD flags
+ fi
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=3Dnm
+fi
+fi
+
+NM=3D"$lt_cv_path_NM"
+echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=3D$as_ln_s
+if test "$LN_S" =3D "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 recognise dependant libraries" >&5
+echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" =
>&6
+if test "${lt_cv_deplibs_check_method+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_file_magic_cmd=3D'$MAGIC_CMD'
+lt_cv_file_magic_test_file=3D
+lt_cv_deplibs_check_method=3D'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 egrep 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=3Dpass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+bsdi4*)
+ lt_cv_deplibs_check_method=3D'file_magic ELF [0-9][0-9]*-bit [ML]SB (s=
hared object|dynamic lib)'
+ lt_cv_file_magic_cmd=3D'/usr/bin/file -L'
+ lt_cv_file_magic_test_file=3D/shlib/libc.so
+ ;;
+
+cygwin* | mingw* | pw32*)
+ lt_cv_deplibs_check_method=3D'file_magic file format pei*-i386(.*archi=
tecture: i386)?'
+ lt_cv_file_magic_cmd=3D'$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=3D'file_magic Mach-O dynamically linked sha=
red library'
+ lt_cv_file_magic_cmd=3D'/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.[012])
+ lt_cv_file_magic_test_file=3D`echo /System/Library/Frameworks/System=
.framework/Versions/*/System | head -1`
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file=3D'/usr/lib/libSystem.dylib'
+ ;;
+ esac
+ ;;
+
+freebsd*)
+ 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=3D'file_magic (FreeBSD|OpenBSD)/i[3-9]8=
6 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=3D/usr/bin/file
+ lt_cv_file_magic_test_file=3D`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=3Dpass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+hpux10.20*|hpux11*)
+ lt_cv_deplibs_check_method=3D'file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9=
].[0-9]) shared library'
+ lt_cv_file_magic_cmd=3D/usr/bin/file
+ lt_cv_file_magic_test_file=3D/usr/lib/libc.sl
+ ;;
+
+irix5* | irix6*)
+ case $host_os in
+ irix5*)
+ # this will be overridden with pass_all, but let us keep it just in =
case
+ lt_cv_deplibs_check_method=3D"file_magic ELF 32-bit MSB dynamic lib =
MIPS - version 1"
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 ") libmagic=3D32-bit;;
+ *-n32|*"-n32 ") libmagic=3DN32;;
+ *-64|*"-64 ") libmagic=3D64-bit;;
+ *) libmagic=3Dnever-match;;
+ esac
+ # this will be overridden with pass_all, but let us keep it just in =
case
+ lt_cv_deplibs_check_method=3D"file_magic ELF ${libmagic} MSB mips-[1=
234] dynamic lib MIPS - version 1"
+ ;;
+ esac
+ lt_cv_file_magic_test_file=3D`echo /lib${libsuff}/libc.so*`
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ case $host_cpu in
+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
+ lt_cv_deplibs_check_method=3Dpass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ lt_cv_deplibs_check_method=3D'file_magic ELF [0-9][0-9]*-bit [LM]SB =
(shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=3D`echo /lib/libc.so* /lib/libc-*.so`
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method=3D'match_pattern /lib[^/\.]+\.so\.[0-9]+\=
.[0-9]+$'
+ else
+ lt_cv_deplibs_check_method=3D'match_pattern /lib[^/\.]+\.so$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method=3D'file_magic ELF [0-9][0-9]*-bit [ML]SB (e=
xecutable|dynamic lib)'
+ lt_cv_file_magic_cmd=3D/usr/bin/file
+ lt_cv_file_magic_test_file=3D/usr/lib/libnls.so
+ ;;
+
+openbsd*)
+ lt_cv_file_magic_cmd=3D/usr/bin/file
+ lt_cv_file_magic_test_file=3D`echo /usr/lib/libc.so.*`
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_o=
s-$host_cpu" =3D "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method=3D'file_magic ELF [0-9][0-9]*-bit [LM]SB =
shared object'
+ else
+ lt_cv_deplibs_check_method=3D'file_magic OpenBSD.* shared library'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ # this will be overridden with pass_all, but let us keep it just in ca=
se
+ lt_cv_deplibs_check_method=3D'file_magic COFF format alpha shared libr=
ary'
+ lt_cv_file_magic_test_file=3D/shlib/libc.so
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=3Dpass_all
+ lt_cv_file_magic_test_file=3D/lib/libc.so
+ ;;
+
+sysv5uw[78]* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method=3D'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=3D`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=3Dpass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd=3D'/bin/file'
+ lt_cv_deplibs_check_method=3D'file_magic ELF [0-9][0-9]*-bit [LM]SB =
(shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd=3D'/bin/file'
+ lt_cv_deplibs_check_method=3D"file_magic ELF [0-9][0-9]*-bit [LM]SB =
dynamic lib"
+ lt_cv_file_magic_test_file=3D/lib/libc.so
+ ;;
+ esac
+ ;;
+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=3D$lt_cv_file_magic_cmd
+deplibs_check_method=3D$lt_cv_deplibs_check_method
+
+
+
+
+
+
+
+# Check for command to grab the raw symbol name followed by C symbol fro=
m nm.
+echo "$as_me:$LINENO: checking command to parse $NM output" >&5
+echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" =3D 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=3D'[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat=3D'\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm=3D'\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_global_symbol_to_cdecl=3D"sed -n -e 's/^. .* \(.*\)$/extern char \=
1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_global_symbol_to_c_name_address=3D"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=3D'[BCDT]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode=3D'[ABCDGISTW]'
+ ;;
+hpux*) # Its linker distinguishes data from code symbols
+ lt_cv_global_symbol_to_cdecl=3D"sed -n -e 's/^T .* \(.*\)$/extern char=
\1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+ lt_cv_global_symbol_to_c_name_address=3D"sed -n -e 's/^: \([^ ]*\) $/ =
{\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"=
\2\", (lt_ptr) \&\2},/p'"
+ ;;
+irix*)
+ symcode=3D'[BCDEGRST]'
+ ;;
+solaris* | sysv5*)
+ symcode=3D'[BDT]'
+ ;;
+sysv4)
+ symcode=3D'[DFNSTU]'
+ ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=3D
+case $host_os in
+mingw*)
+ opt_cr=3D`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
+ symcode=3D'[ABCDGISTW]'
+fi
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Write the raw and C identifiers.
+lt_cv_sys_global_symbol_pipe=3D"sed -n -e 's/^.*[ ]\($symcode$symcode*\=
)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=3Dno
+ rm -f conftest*
+ cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var=3D'a';nm_test_func();return(0);}
+EOF
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; then
+ # Now try to grab the symbols.
+ nlist=3Dconftest.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 \> $nli=
st) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $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 egrep ' nm_test_var$' "$nlist" >/dev/null; then
+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
+
+ cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr address;
+}
+lt_preloaded_symbols[] =3D
+{
+EOF
+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/"=
< "$nlist" >> conftest.$ac_ext
+ cat <<\EOF >> conftest.$ac_ext
+ {0, (lt_ptr) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ save_LIBS=3D"$LIBS"
+ save_CFLAGS=3D"$CFLAGS"
+ LIBS=3D"conftstm.$ac_objext"
+ CFLAGS=3D"$CFLAGS$no_builtin_flag"
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } && test -s conftest; then
+ pipe_works=3Dyes
+ fi
+ LIBS=3D"$save_LIBS"
+ CFLAGS=3D"$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" =3D yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=3D
+ fi
+done
+
+fi
+
+global_symbol_pipe=3D"$lt_cv_sys_global_symbol_pipe"
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ global_symbol_to_cdecl=3D
+ global_symbol_to_c_name_address=3D
+else
+ global_symbol_to_cdecl=3D"$lt_cv_global_symbol_to_cdecl"
+ global_symbol_to_c_name_address=3D"$lt_cv_global_symbol_to_c_name_addr=
ess"
+fi
+if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c=
_name_address";
+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
+
+# 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 strin=
gs.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=3D`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 eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=3Dyes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=3Dno"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` =3D 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=3D`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=3Dno
+fi
+rm -f 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
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=3D$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=3D$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=3D
+ fi
+else
+ ac_cpp_err=3Dyes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=3Dno
+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 in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compile=
r, 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 pre=
processor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's re=
sult" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be c=
ompiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prere=
quisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite header=
s?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the pre=
processor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's re=
sult" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=3D$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` =3D yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" =3D '$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MAGIC_CMD in
+ /*)
+ lt_cv_path_MAGIC_CMD=3D"$MAGIC_CMD" # Let the user override the test w=
ith a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD=3D"$MAGIC_CMD" # Let the user override the test w=
ith a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD=3D"$MAGIC_CMD"
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D":"
+ ac_dummy=3D"/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=3D.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD=3D"$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=3D"`expr \"$deplibs_check_method\" : \"file_magic \(=
.*\)\"`"
+ MAGIC_CMD=3D"$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 <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+ MAGIC_CMD=3D"$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD=3D"$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MAGIC_CMD in
+ /*)
+ lt_cv_path_MAGIC_CMD=3D"$MAGIC_CMD" # Let the user override the test w=
ith a path.
+ ;;
+ ?:/*)
+ lt_cv_path_MAGIC_CMD=3D"$MAGIC_CMD" # Let the user override the test w=
ith a dos path.
+ ;;
+ *)
+ ac_save_MAGIC_CMD=3D"$MAGIC_CMD"
+ IFS=3D"${IFS=3D }"; ac_save_ifs=3D"$IFS"; IFS=3D":"
+ ac_dummy=3D"/usr/bin:$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=3D.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD=3D"$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=3D"`expr \"$deplibs_check_method\" : \"file_magic \(=
.*\)\"`"
+ MAGIC_CMD=3D"$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 <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=3D"$ac_save_ifs"
+ MAGIC_CMD=3D"$ac_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD=3D"$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=3D:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+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=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB=3D"$RANLIB" # Let the user override the test.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB=3D"${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=3D$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=3D$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with=
args.
+set dummy ranlib; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB=3D"$ac_ct_RANLIB" # Let the user override the =
test.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB=3D"ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=3D":"
+fi
+fi
+ac_ct_RANLIB=3D$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
+
+ RANLIB=3D$ac_ct_RANLIB
+else
+ RANLIB=3D"$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 p=
rogram name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP=3D"$STRIP" # Let the user override the test.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP=3D"${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=3D$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=3D$STRIP
+ # Extract the first word of "strip", so it can be a program name with =
args.
+set dummy strip; ac_word=3D$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP=3D"$ac_ct_STRIP" # Let the user override the te=
st.
+else
+as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP=3D"strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=3D":"
+fi
+fi
+ac_ct_STRIP=3D$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
+
+ STRIP=3D$ac_ct_STRIP
+else
+ STRIP=3D"$ac_cv_prog_STRIP"
+fi
+
+
+enable_dlopen=3Dno
+enable_win32_dll=3Dno
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was give=
n.
+if test "${enable_libtool_lock+set}" =3D set; then
+ enableval=3D"$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" !=3D xno && enable_libtool_lock=3Dyes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 4259 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD=3D"${LD-ld} -32"
+ ;;
+ *N32*)
+ LD=3D"${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD=3D"${LD-ld} -64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=3Dc
+ac_cpp=3D'$CPP $CPPFLAGS'
+ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest=
.$ac_ext $LIBS >&5'
+ac_compiler_gnu=3D$ac_cv_c_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ lt_cv_cc_needs_belf=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+lt_cv_cc_needs_belf=3Dno
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ ac_ext=3Dc
+ac_cpp=3D'$CPP $CPPFLAGS'
+ac_compile=3D'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link=3D'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest=
.$ac_ext $LIBS >&5'
+ac_compiler_gnu=3D$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" !=3D x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS=3D"$SAVE_CFLAGS"
+ fi
+ ;;
+
+
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed=3D'sed -e s/^X//'
+sed_quote_subst=3D's/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst=3D's/\([\\"\\`\\\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst=3D's/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Constants:
+rm=3D"rm -f"
+
+# Global variables:
+default_ofile=3Dlibtool
+can_build_shared=3Dyes
+
+# All known linkers require a `.a' archive for static linking (except M$=
VC,
+# which needs '.lib').
+libext=3Da
+ltmain=3D"$ac_aux_dir/ltmain.sh"
+ofile=3D"$default_ofile"
+with_gnu_ld=3D"$lt_cv_prog_gnu_ld"
+need_locks=3D"$enable_libtool_lock"
+
+old_CC=3D"$CC"
+old_CFLAGS=3D"$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=3Dar
+test -z "$AR_FLAGS" && AR_FLAGS=3Dcru
+test -z "$AS" && AS=3Das
+test -z "$CC" && CC=3Dcc
+test -z "$DLLTOOL" && DLLTOOL=3Ddlltool
+test -z "$LD" && LD=3Dld
+test -z "$LN_S" && LN_S=3D"ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=3Dfile
+test -z "$NM" && NM=3Dnm
+test -z "$OBJDUMP" && OBJDUMP=3Dobjdump
+test -z "$RANLIB" && RANLIB=3D:
+test -z "$STRIP" && STRIP=3D:
+test -z "$ac_objext" && ac_objext=3Do
+
+if test x"$host" !=3D x"$build"; then
+ ac_tool_prefix=3D${host_alias}-
+else
+ ac_tool_prefix=3D
+fi
+
+# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+case $host_os in
+linux-gnu*) ;;
+linux*) host=3D`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+esac
+
+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 proble=
ms
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" !=3D Xset; then
+ COLLECT_NAMES=3D
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Determine commands to create old-style static archives.
+old_archive_cmds=3D'$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds=3D'chmod 644 $oldlib'
+old_postuninstall_cmds=3D
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds=3D"\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+ ;;
+ *)
+ old_postinstall_cmds=3D"\$RANLIB \$oldlib~$old_postinstall_cmds"
+ ;;
+ esac
+ old_archive_cmds=3D"$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+# Allow CC to be a program name with arguments.
+set dummy $CC
+compiler=3D"$2"
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ objdir=3D.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ objdir=3D_libs
+fi
+rmdir .libs 2>/dev/null
+echo "$as_me:$LINENO: result: $objdir" >&5
+echo "${ECHO_T}$objdir" >&6
+
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" =3D set; then
+ withval=3D"$with_pic"
+ pic_mode=3D"$withval"
+else
+ pic_mode=3Ddefault
+fi;
+test -z "$pic_mode" && pic_mode=3Ddefault
+
+# We assume here that the value for lt_cv_prog_cc_pic will not be cached
+# in isolation, and that seeing it set (from the cache) indicates that
+# the associated values are set (in the cache) correctly too.
+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 "${lt_cv_prog_cc_pic+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_cc_pic=3D
+ lt_cv_prog_cc_shlib=3D
+ lt_cv_prog_cc_wl=3D
+ lt_cv_prog_cc_static=3D
+ lt_cv_prog_cc_no_builtin=3D
+ lt_cv_prog_cc_can_build_shared=3D$can_build_shared
+
+ if test "$GCC" =3D yes; then
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ lt_cv_prog_cc_static=3D'-static'
+
+ case $host_os in
+ aix*)
+ # Below there is a dirty hack to force normal static linking with =
-ldl
+ # The problem is because libdl dynamically linked with both libc a=
nd
+ # libC (AIX C++ library), which obviously doesn't included in libr=
aries
+ # list by gcc. This cause undefined symbols with -static flags.
+ # This hack allows C programs to be linked with "-static -ldl", bu=
t
+ # not sure about C++ programs.
+ lt_cv_prog_cc_static=3D"$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-=
lC"
+ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, bu=
t
+ # adding the `-m68020' flag to GCC prevents building anything bett=
er,
+ # like `-m68040'.
+ lt_cv_prog_cc_pic=3D'-m68020 -resident32 -malways-restore-a4'
+ ;;
+ beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_cv_prog_cc_pic=3D'-fno-common'
+ ;;
+ cygwin* | mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is bein=
g
+ # built for inclusion in a dll (and should export symbols for exam=
ple).
+ lt_cv_prog_cc_pic=3D'-DDLL_EXPORT'
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_cv_prog_cc_pic=3D-Kconform_pic
+ fi
+ ;;
+ *)
+ lt_cv_prog_cc_pic=3D'-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for PIC flags for the system compiler.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ # All AIX code is PIC.
+ if test "$host_cpu" =3D ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ else
+ lt_cv_prog_cc_static=3D'-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ # Is there a better lt_cv_prog_cc_static that works with the bundl=
ed CC?
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ lt_cv_prog_cc_static=3D"${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}a=
rchive"
+ lt_cv_prog_cc_pic=3D'+Z'
+ ;;
+
+ irix5* | irix6*)
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ lt_cv_prog_cc_static=3D'-non_shared'
+ # PIC (with -KPIC) is the default.
+ ;;
+
+ cygwin* | mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is bein=
g
+ # built for inclusion in a dll (and should export symbols for exam=
ple).
+ lt_cv_prog_cc_pic=3D'-DDLL_EXPORT'
+ ;;
+
+ newsos6)
+ lt_cv_prog_cc_pic=3D'-KPIC'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ # All OSF/1 code is PIC.
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ lt_cv_prog_cc_static=3D'-non_shared'
+ ;;
+
+ sco3.2v5*)
+ lt_cv_prog_cc_pic=3D'-Kpic'
+ lt_cv_prog_cc_static=3D'-dn'
+ lt_cv_prog_cc_shlib=3D'-belf'
+ ;;
+
+ solaris*)
+ lt_cv_prog_cc_pic=3D'-KPIC'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ ;;
+
+ sunos4*)
+ lt_cv_prog_cc_pic=3D'-PIC'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ lt_cv_prog_cc_wl=3D'-Qoption ld '
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ lt_cv_prog_cc_pic=3D'-KPIC'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ if test "x$host_vendor" =3D xsni; then
+ lt_cv_prog_cc_wl=3D'-LD'
+ else
+ lt_cv_prog_cc_wl=3D'-Wl,'
+ fi
+ ;;
+
+ uts4*)
+ lt_cv_prog_cc_pic=3D'-pic'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_cv_prog_cc_pic=3D'-Kconform_pic'
+ lt_cv_prog_cc_static=3D'-Bstatic'
+ fi
+ ;;
+
+ *)
+ lt_cv_prog_cc_can_build_shared=3Dno
+ ;;
+ esac
+ fi
+
+fi
+
+if test -z "$lt_cv_prog_cc_pic"; then
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+else
+ echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5
+echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6
+
+ # Check to make sure the pic_flag actually works.
+ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pi=
c works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works...=
$ECHO_C" >&6
+ if test "${lt_cv_prog_cc_pic_works+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ save_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$CFLAGS $lt_cv_prog_cc_pic -DPIC"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ case $host_os in
+ hpux9* | hpux10* | hpux11*)
+ # On HP-UX, both CC and GCC only warn that PIC is supported... then
+ # they create non-PIC objects. So, if there were any warnings, we
+ # assume that PIC is not supported.
+ if test -s conftest.err; then
+ lt_cv_prog_cc_pic_works=3Dno
+ else
+ lt_cv_prog_cc_pic_works=3Dyes
+ fi
+ ;;
+ *)
+ lt_cv_prog_cc_pic_works=3Dyes
+ ;;
+ esac
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ lt_cv_prog_cc_pic_works=3Dno
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=3D"$save_CFLAGS"
+
+fi
+
+
+ if test "X$lt_cv_prog_cc_pic_works" =3D Xno; then
+ lt_cv_prog_cc_pic=3D
+ lt_cv_prog_cc_can_build_shared=3Dno
+ else
+ lt_cv_prog_cc_pic=3D" $lt_cv_prog_cc_pic"
+ fi
+
+ echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5
+echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
+fi
+
+# Check for any special shared library compilation flags.
+if test -n "$lt_cv_prog_cc_shlib"; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shli=
b' to build shared libraries" >&5
+echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build =
shared libraries" >&2;}
+ if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ =
]" >/dev/null; then :
+ else
+ { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the C=
C or CFLAGS env variable and reconfigure" >&5
+echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS e=
nv variable and reconfigure" >&2;}
+ lt_cv_prog_cc_can_build_shared=3Dno
+ fi
+fi
+
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_s=
tatic works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static wo=
rks... $ECHO_C" >&6
+if test "${lt_cv_prog_cc_static_works+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_cc_static_works=3Dno
+ save_LDFLAGS=3D"$LDFLAGS"
+ LDFLAGS=3D"$LDFLAGS $lt_cv_prog_cc_static"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ lt_cv_prog_cc_static_works=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=3D"$save_LDFLAGS"
+
+fi
+
+
+# Belt *and* braces to stop my trousers falling down:
+test "X$lt_cv_prog_cc_static_works" =3D Xno && lt_cv_prog_cc_static=3D
+echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5
+echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6
+
+pic_flag=3D"$lt_cv_prog_cc_pic"
+special_shlib_compile_flags=3D"$lt_cv_prog_cc_shlib"
+wl=3D"$lt_cv_prog_cc_wl"
+link_static_flag=3D"$lt_cv_prog_cc_static"
+no_builtin_flag=3D"$lt_cv_prog_cc_no_builtin"
+can_build_shared=3D"$lt_cv_prog_cc_can_build_shared"
+
+
+# Check to see if options -o and -c are simultaneously supported by comp=
iler
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_obje=
xt" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $E=
CHO_C" >&6
+if test "${lt_cv_compiler_c_o+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+$rm -r conftest 2>/dev/null
+mkdir conftest
+cd conftest
+echo "int some_variable =3D 0;" > conftest.$ac_ext
+mkdir out
+# According to Tom Tromey, Ian Lance Taylor reported there are C compile=
rs
+# that will create temporary files in the current directory regardless o=
f
+# the output directory. Thus, making CWD read-only will cause this test
+# to fail, enabling locking or at least warning the user not to do paral=
lel
+# builds.
+chmod -w .
+save_CFLAGS=3D"$CFLAGS"
+CFLAGS=3D"$CFLAGS -o out/conftest2.$ac_objext"
+compiler_c_o=3Dno
+if { (eval echo configure:4795: \"$ac_compile\") 1>&5; (eval $ac_compile=
) 2>out/conftest.err; } && 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
+ if test -s out/conftest.err; then
+ lt_cv_compiler_c_o=3Dno
+ else
+ lt_cv_compiler_c_o=3Dyes
+ fi
+else
+ # Append any errors to the config.log.
+ cat out/conftest.err 1>&5
+ lt_cv_compiler_c_o=3Dno
+fi
+CFLAGS=3D"$save_CFLAGS"
+chmod u+w .
+$rm conftest* out/*
+rmdir out
+cd ..
+rmdir conftest
+$rm -r conftest 2>/dev/null
+
+fi
+
+compiler_c_o=3D$lt_cv_compiler_c_o
+echo "$as_me:$LINENO: result: $compiler_c_o" >&5
+echo "${ECHO_T}$compiler_c_o" >&6
+
+if test x"$compiler_c_o" =3D x"yes"; then
+ # Check to see if we can write to a .lo
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&=
5
+echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >=
&6
+ if test "${lt_cv_compiler_o_lo+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ lt_cv_compiler_o_lo=3Dno
+ save_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$CFLAGS -c -o conftest.lo"
+ save_objext=3D"$ac_objext"
+ ac_objext=3Dlo
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+int some_variable =3D 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # The compiler can only warn and ignore the option if not recogniz=
ed
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ lt_cv_compiler_o_lo=3Dno
+ else
+ lt_cv_compiler_o_lo=3Dyes
+ fi
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_objext=3D"$save_objext"
+ CFLAGS=3D"$save_CFLAGS"
+
+fi
+
+ compiler_o_lo=3D$lt_cv_compiler_o_lo
+ echo "$as_me:$LINENO: result: $compiler_o_lo" >&5
+echo "${ECHO_T}$compiler_o_lo" >&6
+else
+ compiler_o_lo=3Dno
+fi
+
+# Check to see if we can do hard links to lock some files if needed
+hard_links=3D"nottested"
+if test "$compiler_c_o" =3D no && test "$need_locks" !=3D 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=3Dyes
+ $rm conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=3Dno
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=3Dno
+ ln conftest.a conftest.b 2>/dev/null && hard_links=3Dno
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" =3D no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', s=
o \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' m=
ay be unsafe" >&2;}
+ need_locks=3Dwarn
+ fi
+else
+ need_locks=3Dno
+fi
+
+if test "$GCC" =3D yes; then
+ # Check to see if options -fno-rtti -fno-exceptions are supported by c=
ompiler
+ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-ex=
ceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions..=
. $ECHO_C" >&6
+ echo "int some_variable =3D 0;" > conftest.$ac_ext
+ save_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
+ compiler_rtti_exceptions=3Dno
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+int some_variable =3D 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # The compiler can only warn and ignore the option if not recogniz=
ed
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ compiler_rtti_exceptions=3Dno
+ else
+ compiler_rtti_exceptions=3Dyes
+ fi
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=3D"$save_CFLAGS"
+ echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$compiler_rtti_exceptions" >&6
+
+ if test "$compiler_rtti_exceptions" =3D "yes"; then
+ no_builtin_flag=3D' -fno-builtin -fno-rtti -fno-exceptions'
+ else
+ no_builtin_flag=3D' -fno-builtin'
+ fi
+fi
+
+# See if the linker supports building shared libraries.
+echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared =
libraries" >&5
+echo $ECHO_N "checking whether the linker ($LD) supports shared librarie=
s... $ECHO_C" >&6
+
+allow_undefined_flag=3D
+no_undefined_flag=3D
+need_lib_prefix=3Dunknown
+need_version=3Dunknown
+# when you set need_version to no, make sure it does not cause -set_vers=
ion
+# flags to be left without arguments
+archive_cmds=3D
+archive_expsym_cmds=3D
+old_archive_from_new_cmds=3D
+old_archive_from_expsyms_cmds=3D
+export_dynamic_flag_spec=3D
+whole_archive_flag_spec=3D
+thread_safe_flag_spec=3D
+hardcode_into_libs=3Dno
+hardcode_libdir_flag_spec=3D
+hardcode_libdir_separator=3D
+hardcode_direct=3Dno
+hardcode_minus_L=3Dno
+hardcode_shlibpath_var=3Dunsupported
+runpath_var=3D
+link_all_deplibs=3Dunknown
+always_export_symbols=3Dno
+export_symbols_cmds=3D'$NM $libobjs $convenience | $global_symbol_pipe |=
sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
+# include_expsyms should be a list of space-separated symbols to be *alw=
ays*
+# included in the symbol list
+include_expsyms=3D
+# exclude_expsyms can be an egrep regular expression of symbols to exclu=
de
+# it will be wrapped by ` (' and `)$', so one must not match beginning o=
r
+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `=
bc',
+# as well as any symbol that contains `d'.
+exclude_expsyms=3D"_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=3D
+
+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" !=3D yes; then
+ with_gnu_ld=3Dno
+ fi
+ ;;
+openbsd*)
+ with_gnu_ld=3Dno
+ ;;
+esac
+
+ld_shlibs=3Dyes
+if test "$with_gnu_ld" =3D yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc=3D'${wl}'
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX, the GNU linker is very broken
+ # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
+ ld_shlibs=3Dno
+ cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+ ;;
+
+ amigaos*)
+ archive_cmds=3D'$rm $output_objdir/a2ixlibrary.data~$echo "#define N=
AME $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" >> $ou=
tput_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd=
$output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_minus_L=3Dyes
+
+ # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> 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 use
+ # them.
+ ld_shlibs=3Dno
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null;=
then
+ allow_undefined_flag=3Dunsupported
+ # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds=3D'$CC -nostart $libobjs $deplibs $compiler_flags ${w=
l}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=3Dno
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ allow_undefined_flag=3Dunsupported
+ always_export_symbols=3Dyes
+
+ extract_expsyms_cmds=3D'test -f $output_objdir/impgen.c || \
+ sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c end=
s here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impg=
en.c~
+ test -f $output_objdir/impgen.exe || (cd $output_objdir && \
+ if test "x$HOST_CC" !=3D "x" ; then $HOST_CC -o impgen impgen.c ; =
\
+ else $CC -o impgen impgen.c ; fi)~
+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
+
+ old_archive_from_expsyms_cmds=3D'$DLLTOOL --as=3D$AS --dllname $sona=
me --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
+
+ # cygwin and mingw dlls have different entry points and sets of symb=
ols
+ # to exclude.
+ # FIXME: what about values for MSVC?
+ dll_entry=3D__cygwin_dll_entry at 12
+ dll_exclude_symbols=3DDllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncyg=
win_dll_entry at 12~
+ case $host_os in
+ mingw*)
+ # mingw values
+ dll_entry=3D_DllMainCRTStartup at 12
+ dll_exclude_symbols=3DDllMain at 12,DllMainCRTStartup at 12,DllEntryPoin=
t at 12~
+ ;;
+ esac
+
+ # mingw and cygwin differ, and it's simplest to just exclude the uni=
on
+ # of the two symbol sets.
+ dll_exclude_symbols=3DDllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncyg=
win_dll_entry at 12,DllMainCRTStartup at 12,DllEntryPoint at 12
+
+ # recent cygwin and mingw systems supply a stub DllMain which the us=
er
+ # can override, but on older systems we have to supply one (in ltdll=
.c)
+ if test "x$lt_cv_need_dllmain" =3D "xyes"; then
+ ltdll_obj=3D'$output_objdir/$soname-ltdll.'"$ac_objext "
+ ltdll_cmds=3D'test -f $output_objdir/$soname-ltdll.c || sed -e "/^=
# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^#=
//; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
+ test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir &=
& $CC -c $soname-ltdll.c)~'
+ else
+ ltdll_obj=3D
+ ltdll_cmds=3D
+ fi
+
+ # Extract the symbol export list from an `--export-all' def file,
+ # then regenerate the def file from the symbol export list, so that
+ # the compiled dll only exports the symbol export list.
+ # Be careful not to strip the DATA tag left be newer dlltools.
+ export_symbols_cmds=3D"$ltdll_cmds"'
+ $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --o=
utput-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
+ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output=
_objdir/$soname-def > $export_symbols'
+
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is.
+ # If DATA tags from a recent dlltool are present, honour them!
+ archive_expsym_cmds=3D'if test "x`head -1 $export_symbols`" =3D xEXP=
ORTS; then
+ cp $export_symbols $output_objdir/$soname-def;
+ else
+ echo EXPORTS > $output_objdir/$soname-def;
+ _lt_hint=3D1;
+ cat $export_symbols | while read symbol; do
+ set dummy \$symbol;
+ case \$# in
+ 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+ *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def=
;;
+ esac;
+ _lt_hint=3D`expr 1 + \$_lt_hint`;
+ done;
+ fi~
+ '"$ltdll_cmds"'
+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_swi=
tch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $=
deplibs $compiler_flags~
+ $DLLTOOL --as=3D$AS --dllname $soname --exclude-symbols '$dll_excl=
ude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/=
$soname-base --output-exp $output_objdir/$soname-exp~
+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$so=
name-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$so=
name '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+ $DLLTOOL --as=3D$AS --dllname $soname --exclude-symbols '$dll_excl=
ude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/=
$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output=
_objdir/$libname.dll.a~
+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll=
_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler=
_flags'
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds=3D'$LD -Bshareable $libobjs $deplibs $linker_flags -o=
$lib'
+ wlarc=3D
+ else
+ archive_cmds=3D'$CC -shared -nodefaultlibs $libobjs $deplibs $comp=
iler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=3D'$CC -shared -nodefaultlibs $libobjs $deplib=
s $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$e=
xport_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=3Dno
+ cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/nul=
l; then
+ archive_cmds=3D'$CC -shared $libobjs $deplibs $compiler_flags ${wl=
}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=3D'$CC -shared $libobjs $deplibs $compiler_fla=
gs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -=
o $lib'
+ else
+ ld_shlibs=3Dno
+ fi
+ ;;
+
+ sunos4*)
+ archive_cmds=3D'$LD -assert pure-text -Bshareable -o $lib $libobjs $=
deplibs $linker_flags'
+ wlarc=3D
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null;=
then
+ archive_cmds=3D'$CC -shared $libobjs $deplibs $compiler_flags ${wl=
}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=3D'$CC -shared $libobjs $deplibs $compiler_fla=
gs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -=
o $lib'
+ else
+ ld_shlibs=3Dno
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" =3D yes; then
+ runpath_var=3DLD_RUN_PATH
+ hardcode_libdir_flag_spec=3D'${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec=3D'${wl}--export-dynamic'
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # dlltool doesn't understand --whole-archive et. al.
+ whole_archive_flag_spec=3D
+ ;;
+ *)
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec=3D"$wlarc"'--whole-archive$convenience '"$wlarc=
"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=3D
+ fi
+ ;;
+ esac
+ fi
+else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=3Dunsupported
+ always_export_symbols=3Dyes
+ archive_expsym_cmds=3D'$LD -o $output_objdir/$soname $libobjs $depli=
bs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $l=
ib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=3Dyes
+ if test "$GCC" =3D yes && test -z "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=3Dunsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" =3D ia64; then
+ # On IA64, the linker does run time linking by default, so we don'=
t
+ # have to do anything special.
+ aix_use_runtimelinking=3Dno
+ exp_sym_flag=3D'-Bexport'
+ no_entry_flag=3D""
+ else
+ aix_use_runtimelinking=3Dno
+
+ # 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 =3D "-brtl" || test $ld_flag =3D "-Wl,-brtl"); then
+ aix_use_runtimelinking=3Dyes
+ break
+ fi
+ done
+ esac
+
+ exp_sym_flag=3D'-bexport'
+ no_entry_flag=3D'-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a librar=
y
+ # 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.
+
+ hardcode_direct=3Dyes
+ archive_cmds=3D''
+ hardcode_libdir_separator=3D':'
+ if test "$GCC" =3D yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=3D`${CC} -print-prog-name=3Dcollect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=3Dyes
+ else
+ # We have old collect2
+ hardcode_direct=3Dunsupported
+ # 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=3Dyes
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_libdir_separator=3D
+ fi
+ esac
+
+ shared_flag=3D'-shared'
+ else
+ # not using gcc
+ if test "$host_cpu" =3D ia64; then
+ shared_flag=3D'${wl}-G'
+ else
+ if test "$aix_use_runtimelinking" =3D yes; then
+ shared_flag=3D'${wl}-G'
+ else
+ shared_flag=3D'${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall can do strange things, so it is better to
+ # generate a list of symbols to export.
+ always_export_symbols=3Dyes
+ if test "$aix_use_runtimelinking" =3D 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=3D'-berok'
+ hardcode_libdir_flag_spec=3D'${wl}-blibpath:$libdir:/usr/lib:/lib'
+ archive_expsym_cmds=3D"\$CC"' -o $output_objdir/$soname $libobjs $=
deplibs $compiler_flags `if test "x${allow_undefined_flag}" !=3D "x"; the=
n echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag=
\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" =3D ia64; then
+ hardcode_libdir_flag_spec=3D'${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag=3D"-z nodefs"
+ archive_expsym_cmds=3D"\$CC $shared_flag"' -o $output_objdir/$soname ${=
wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_fla=
g} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ hardcode_libdir_flag_spec=3D'${wl}-bnolibpath ${wl}-blibpath:$libdir:/u=
sr/lib:/lib'
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag=3D'${wl}-berok'
+ # This is a bit strange, but is similar to how AIX traditionally builds
+ # it's shared libraries.
+ archive_expsym_cmds=3D"\$CC $shared_flag"' -o $output_objdir/$soname $l=
ibobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry=
_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$=
release.a $objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ archive_cmds=3D'$rm $output_objdir/a2ixlibrary.data~$echo "#define N=
AME $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" >> $ou=
tput_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd=
$output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_minus_L=3Dyes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=3Dno
+ ;;
+
+ 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=3D' '
+ allow_undefined_flag=3Dunsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=3Dlib
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds=3D'$CC -o $lib $libobjs $compiler_flags `echo "$deplibs=
" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=3D'
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds=3D'true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds=3D'lib /OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path=3D'`cygpath -w "$srcfile"`'
+ ;;
+
+ darwin* | rhapsody*)
+ case "$host_os" in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag=3D'-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ allow_undefined_flag=3D'-flat_namespace -undefined suppress'
+ ;;
+ esac
+ # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+ # yet detect zsh echo's removal of \ escapes.
+ archive_cmds=3D'$nonopt $(test "x$module" =3D xyes && echo -bundle |=
| echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linke=
r_flags -install_name $rpath/$soname $verstring'
+ # We need to add '_' to the symbols in $export_symbols first
+ #archive_expsym_cmds=3D"$archive_cmds"' && strip -s $export_symbols'
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ whole_archive_flag_spec=3D'-all_load $convenience'
+ ;;
+
+ freebsd1*)
+ ld_shlibs=3Dno
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ construct=
or
+ # support. Future versions do this automatically, but an explicit c++=
rt0.o
+ # does not break anything, and helps significantly (at the cost of a l=
ittle
+ # extra space).
+ freebsd2.2*)
+ archive_cmds=3D'$LD -Bshareable -o $lib $libobjs $deplibs $linker_fl=
ags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec=3D'-R$libdir'
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds=3D'$LD -Bshareable -o $lib $libobjs $deplibs $linker_fl=
ags'
+ hardcode_direct=3Dyes
+ hardcode_minus_L=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd*)
+ archive_cmds=3D'$CC -shared -o $lib $libobjs $deplibs $compiler_flag=
s'
+ hardcode_libdir_flag_spec=3D'-R$libdir'
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ case $host_os in
+ hpux9*) archive_cmds=3D'$rm $output_objdir/$soname~$LD -b +b $instal=
l_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $=
output_objdir/$soname =3D $lib || mv $output_objdir/$soname $lib' ;;
+ *) archive_cmds=3D'$LD -b +h $soname +b $install_libdir -o $lib $lib=
objs $deplibs $linker_flags' ;;
+ esac
+ hardcode_libdir_flag_spec=3D'${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=3D:
+ hardcode_direct=3Dyes
+ hardcode_minus_L=3Dyes # Not in the search PATH, but as the default
+ # location of the library.
+ export_dynamic_flag_spec=3D'${wl}-E'
+ ;;
+
+ irix5* | irix6*)
+ if test "$GCC" =3D yes; then
+ archive_cmds=3D'$CC -shared $libobjs $deplibs $compiler_flags ${wl=
}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${w=
l}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o=
$lib'
+ else
+ archive_cmds=3D'$LD -shared $libobjs $deplibs $linker_flags -sonam=
e $soname `test -n "$verstring" && echo -set_version $verstring` -update_=
registry ${output_objdir}/so_locations -o $lib'
+ fi
+ hardcode_libdir_flag_spec=3D'${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=3D:
+ link_all_deplibs=3Dyes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds=3D'$LD -Bshareable -o $lib $libobjs $deplibs $linker_=
flags' # a.out
+ else
+ archive_cmds=3D'$LD -shared -o $lib $libobjs $deplibs $linker_flag=
s' # ELF
+ fi
+ hardcode_libdir_flag_spec=3D'-R$libdir'
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ newsos6)
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linker_=
flags'
+ hardcode_direct=3Dyes
+ hardcode_libdir_flag_spec=3D'${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=3D:
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ openbsd*)
+ hardcode_direct=3Dyes
+ hardcode_shlibpath_var=3Dno
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host=
_os-$host_cpu" =3D "openbsd2.8-powerpc"; then
+ archive_cmds=3D'$CC -shared $pic_flag -o $lib $libobjs $deplibs $l=
inker_flags'
+ hardcode_libdir_flag_spec=3D'${wl}-rpath,$libdir'
+ export_dynamic_flag_spec=3D'${wl}-E'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds=3D'$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags=
'
+ hardcode_libdir_flag_spec=3D'-R$libdir'
+ ;;
+ *)
+ archive_cmds=3D'$CC -shared $pic_flag -o $lib $libobjs $deplibs =
$linker_flags'
+ hardcode_libdir_flag_spec=3D'${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_minus_L=3Dyes
+ allow_undefined_flag=3Dunsupported
+ archive_cmds=3D'$echo "LIBRARY $libname INITINSTANCE" > $output_objd=
ir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libna=
me.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=3D'emximp -o $output_objdir/$libname.a $ou=
tput_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" =3D yes; then
+ allow_undefined_flag=3D' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds=3D'$CC -shared${allow_undefined_flag} $libobjs $depli=
bs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && ech=
o ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_=
objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=3D' -expect_unresolved \*'
+ archive_cmds=3D'$LD -shared${allow_undefined_flag} $libobjs $depli=
bs $linker_flags -soname $soname `test -n "$verstring" && echo -set_versi=
on $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ hardcode_libdir_flag_spec=3D'${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=3D:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" =3D yes; then
+ allow_undefined_flag=3D' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds=3D'$CC -shared${allow_undefined_flag} $libobjs $depli=
bs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstr=
ing" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${w=
l}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec=3D'${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=3D' -expect_unresolved \*'
+ archive_cmds=3D'$LD -shared${allow_undefined_flag} $libobjs $depli=
bs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set=
_version $verstring` -update_registry ${output_objdir}/so_locations -o $l=
ib'
+ archive_expsym_cmds=3D'for i in `cat $export_symbols`; do printf "=
-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidd=
en">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $=
libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_versi=
on $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.e=
xp'
+
+ #Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec=3D'-rpath $libdir'
+ fi
+ hardcode_libdir_separator=3D:
+ ;;
+
+ sco3.2v5*)
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linker_=
flags'
+ hardcode_shlibpath_var=3Dno
+ runpath_var=3DLD_RUN_PATH
+ hardcode_runpath_var=3Dyes
+ export_dynamic_flag_spec=3D'${wl}-Bexport'
+ ;;
+
+ solaris*)
+ # gcc --version < 3.0 without binutils cannot create self contained
+ # shared libraries reliably, requiring libgcc.a to resolve some of
+ # the object symbols generated in some cases. Libraries that use
+ # assert need libgcc.a to resolve __eprintf, for example. Linking
+ # a copy of libgcc.a into every shared library to guarantee resolvin=
g
+ # such symbols causes other problems: According to Tim Van Holder
+ # <tim.van.holder at pandora.be>, C++ libraries end up with a separate
+ # (to the application) exception stack for one thing.
+ no_undefined_flag=3D' -z defs'
+ if test "$GCC" =3D yes; then
+ case `$CC --version 2>/dev/null` in
+ [12].*)
+ cat <<EOF 1>&2
+
+*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
+*** create self contained shared libraries on Solaris systems, without
+*** introducing a dependency on libgcc.a. Therefore, libtool is disabli=
ng
+*** -no-undefined support, which will at least allow you to build shared
+*** libraries. However, you may find that when you link such libraries
+*** into an application without using GCC, you have to manually add
+*** \`gcc --print-libgcc-file-name\` to the link command. We urge you t=
o
+*** upgrade to a newer version of GCC. Another option is to rebuild you=
r
+*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
+
+EOF
+ no_undefined_flag=3D
+ ;;
+ esac
+ fi
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds=3D'$LD -G${allow_undefined_flag} -h $soname -o $lib $li=
bobjs $deplibs $linker_flags'
+ archive_expsym_cmds=3D'$echo "{ global:" > $lib.exp~cat $export_symb=
ols | 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'
+ hardcode_libdir_flag_spec=3D'-R$libdir'
+ hardcode_shlibpath_var=3Dno
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec=3D'-z allextract$convenience -z defaultext=
ract' ;;
+ esac
+ link_all_deplibs=3Dyes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" =3D 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=3D'$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $=
compiler_flags'
+ else
+ archive_cmds=3D'$LD -assert pure-text -Bstatic -o $lib $libobjs $d=
eplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_direct=3Dyes
+ hardcode_minus_L=3Dyes
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ sysv4)
+ if test "x$host_vendor" =3D xsno; then
+ archive_cmds=3D'$LD -G -Bsymbolic -h $soname -o $lib $libobjs $dep=
libs $linker_flags'
+ hardcode_direct=3Dyes # is this really true???
+ else
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linke=
r_flags'
+ hardcode_direct=3Dno #Motorola manual says yes, but my tests say t=
hey lie
+ fi
+ runpath_var=3D'LD_RUN_PATH'
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ sysv4.3*)
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linker_=
flags'
+ hardcode_shlibpath_var=3Dno
+ export_dynamic_flag_spec=3D'-Bexport'
+ ;;
+
+ sysv5*)
+ no_undefined_flag=3D' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds=3D'$LD -G${allow_undefined_flag} -h $soname -o $lib $li=
bobjs $deplibs $linker_flags'
+ archive_expsym_cmds=3D'$echo "{ global:" > $lib.exp~cat $export_symb=
ols | 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'
+ hardcode_libdir_flag_spec=3D
+ hardcode_shlibpath_var=3Dno
+ runpath_var=3D'LD_RUN_PATH'
+ ;;
+
+ uts4*)
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linker_=
flags'
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ dgux*)
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linker_=
flags'
+ hardcode_libdir_flag_spec=3D'-L$libdir'
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds=3D'$LD -G -h $soname -o $lib $libobjs $deplibs $linke=
r_flags'
+ hardcode_shlibpath_var=3Dno
+ runpath_var=3DLD_RUN_PATH
+ hardcode_runpath_var=3Dyes
+ ld_shlibs=3Dyes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ archive_cmds=3D'$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=3Dyes
+ hardcode_minus_L=3Dno
+ hardcode_shlibpath_var=3Dno
+ hardcode_runpath_var=3Dyes
+ runpath_var=3DLD_RUN_PATH
+ ;;
+
+ sysv5uw7* | unixware7*)
+ no_undefined_flag=3D'${wl}-z ${wl}text'
+ if test "$GCC" =3D yes; then
+ archive_cmds=3D'$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs =
$deplibs $compiler_flags'
+ else
+ archive_cmds=3D'$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $depl=
ibs $compiler_flags'
+ fi
+ runpath_var=3D'LD_RUN_PATH'
+ hardcode_shlibpath_var=3Dno
+ ;;
+
+ *)
+ ld_shlibs=3Dno
+ ;;
+ esac
+fi
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" =3D no && can_build_shared=3Dno
+
+# Check hardcoding attributes.
+echo "$as_me:$LINENO: checking how to hardcode library paths into progra=
ms" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $E=
CHO_C" >&6
+hardcode_action=3D
+if test -n "$hardcode_libdir_flag_spec" || \
+ test -n "$runpath_var"; then
+
+ # We can hardcode non-existant directories.
+ if test "$hardcode_direct" !=3D 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 "$hardcode_shlibpath_var" !=3D no &&
+ test "$hardcode_minus_L" !=3D no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=3Drelink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting di=
rs.
+ hardcode_action=3Dimmediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=3Dunsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+striplib=3D
+old_striplib=3D
+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; the=
n
+ test -z "$old_striplib" && old_striplib=3D"$STRIP --strip-debug"
+ test -z "$striplib" && striplib=3D"$STRIP --strip-unneeded"
+ 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
+
+reload_cmds=3D'$LD$reload_flag -o $output$reload_objs'
+test -z "$deplibs_check_method" && deplibs_check_method=3Dunknown
+
+# PORTME Fill in your ld.so characteristics
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+library_names_spec=3D
+libname_spec=3D'lib$name'
+soname_spec=3D
+postinstall_cmds=3D
+postuninstall_cmds=3D
+finish_cmds=3D
+finish_eval=3D
+shlibpath_var=3D
+shlibpath_overrides_runpath=3Dunknown
+version_type=3Dnone
+dynamic_linker=3D"$host_os ld.so"
+sys_lib_dlsearch_path_spec=3D"/lib /usr/lib"
+sys_lib_search_path_spec=3D"/lib /usr/lib /usr/local/lib"
+
+case $host_os in
+aix3*)
+ version_type=3Dlinux
+ library_names_spec=3D'${libname}${release}.so$versuffix $libname.a'
+ shlibpath_var=3DLIBPATH
+
+ # AIX has no versioning support, so we append a major version to the n=
ame.
+ soname_spec=3D'${libname}${release}.so$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=3Dlinux
+ if test "$host_cpu" =3D ia64; then
+ # AIX 5 supports IA64
+ library_names_spec=3D'${libname}${release}.so$major ${libname}${rele=
ase}.so$versuffix $libname.so'
+ shlibpath_var=3DLD_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__ =3D=3D 2 && __GNUC_MINOR__ >=3D=
97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+ :
+ else
+ can_build_shared=3Dno
+ 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" =3D yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}=
${release}.so$major $libname.so'
+ 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=3D'${libname}${release}.a $libname.a'
+ soname_spec=3D'${libname}${release}.so$major'
+ fi
+ shlibpath_var=3DLIBPATH
+ fi
+ ;;
+
+amigaos*)
+ library_names_spec=3D'$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval=3D'for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do lib=
name=3D`$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}_i=
xlibrary.a) || exit 1; done'
+ ;;
+
+beos*)
+ library_names_spec=3D'${libname}.so'
+ dynamic_linker=3D"$host_os ld.so"
+ shlibpath_var=3DLIBRARY_PATH
+ ;;
+
+bsdi4*)
+ version_type=3Dlinux
+ need_version=3Dno
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ finish_cmds=3D'PATH=3D"\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ sys_lib_search_path_spec=3D"/shlib /usr/lib /usr/X11/lib /usr/contrib/=
lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=3D"/shlib /usr/lib /usr/local/lib"
+ export_dynamic_flag_spec=3D-rdynamic
+ # 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=3Dwindows
+ need_version=3Dno
+ need_lib_prefix=3Dno
+ case $GCC,$host_os in
+ yes,cygwin*)
+ library_names_spec=3D'$libname.dll.a'
+ soname_spec=3D'`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${relea=
se} | sed -e 's/[.]/-/g'`${versuffix}.dll'
+ postinstall_cmds=3D'dlpath=3D`bash 2>&1 -c '\''. $dir/${file}i;echo =
\$dlname'\''`~
+ dldir=3D$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog .libs/$dlname \$dldir/$dlname'
+ postuninstall_cmds=3D'dldll=3D`bash 2>&1 -c '\''. $file; echo \$dlna=
me'\''`~
+ dlpath=3D$dir/\$dldll~
+ $rm \$dlpath'
+ ;;
+ yes,mingw*)
+ library_names_spec=3D'${libname}`echo ${release} | sed -e 's/[.]/-/g=
'`${versuffix}.dll'
+ sys_lib_search_path_spec=3D`$CC -print-search-dirs | grep "^librarie=
s:" | sed -e "s/^libraries://" -e "s/;/ /g"`
+ ;;
+ yes,pw32*)
+ library_names_spec=3D'`echo ${libname} | sed -e 's/^lib/pw/'``echo $=
{release} | sed -e 's/./-/g'`${versuffix}.dll'
+ ;;
+ *)
+ library_names_spec=3D'${libname}`echo ${release} | sed -e 's/[.]/-/g=
'`${versuffix}.dll $libname.lib'
+ ;;
+ esac
+ dynamic_linker=3D'Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is =
in
+ shlibpath_var=3DPATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker=3D"$host_os dyld"
+ version_type=3Ddarwin
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+ # yet detect zsh echo's removal of \ escapes.
+ library_names_spec=3D'${libname}${release}${versuffix}.$(test .$module=
=3D .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .=
$module =3D .yes && echo so || echo dylib) ${libname}.$(test .$module =3D=
.yes && echo so || echo dylib)'
+ soname_spec=3D'${libname}${release}${major}.$(test .$module =3D .yes &=
& echo so || echo dylib)'
+ shlibpath_overrides_runpath=3Dyes
+ shlibpath_var=3DDYLD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=3Dno
+ ;;
+
+freebsd*)
+ objformat=3D`test -x /usr/bin/objformat && /usr/bin/objformat || echo =
aout`
+ version_type=3Dfreebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}=
${release}.so $libname.so'
+ need_version=3Dno
+ need_lib_prefix=3Dno
+ ;;
+ freebsd-*)
+ library_names_spec=3D'${libname}${release}.so$versuffix $libname.s=
o$versuffix'
+ need_version=3Dyes
+ ;;
+ esac
+ shlibpath_var=3DLD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=3Dyes
+ ;;
+ *)
+ shlibpath_overrides_runpath=3Dno
+ hardcode_into_libs=3Dyes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=3Dlinux
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so${major} ${libname}.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ hardcode_into_libs=3Dyes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refu=
ses to
+ # link against other versions.
+ dynamic_linker=3D"$host_os dld.sl"
+ version_type=3Dsunos
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ shlibpath_var=3DSHLIB_PATH
+ shlibpath_overrides_runpath=3Dno # +s is required to enable SHLIB_PATH
+ library_names_spec=3D'${libname}${release}.sl$versuffix ${libname}${re=
lease}.sl$major $libname.sl'
+ soname_spec=3D'${libname}${release}.sl$major'
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds=3D'chmod 555 $lib'
+ ;;
+
+irix5* | irix6*)
+ version_type=3Dirix
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ soname_spec=3D'${libname}${release}.so$major'
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major ${libname}${release}.so $libname.so'
+ case $host_os in
+ irix5*)
+ libsuff=3D shlibsuff=3D
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 ") libsuff=3D shlibsuff=3D libmagic=3D32-bit;;
+ *-n32|*"-n32 ") libsuff=3D32 shlibsuff=3DN32 libmagic=3DN32;;
+ *-64|*"-64 ") libsuff=3D64 shlibsuff=3D64 libmagic=3D64-bit;;
+ *) libsuff=3D shlibsuff=3D libmagic=3Dnever-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=3DLD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=3Dno
+ sys_lib_search_path_spec=3D"/usr/lib${libsuff} /lib${libsuff} /usr/loc=
al/lib${libsuff}"
+ sys_lib_dlsearch_path_spec=3D"/usr/lib${libsuff} /lib${libsuff}"
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+ dynamic_linker=3Dno
+ ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+ version_type=3Dlinux
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ finish_cmds=3D'PATH=3D"\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ shlibpath_overrides_runpath=3Dno
+ # 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=3Dyes
+
+ # 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=3D'GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=3Dsunos
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}.s=
o$versuffix'
+ finish_cmds=3D'PATH=3D"\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker=3D'NetBSD (a.out) ld.so'
+ else
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${=
release}.so$major ${libname}${release}.so ${libname}.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ dynamic_linker=3D'NetBSD ld.elf_so'
+ fi
+ shlibpath_var=3DLD_LIBRARY_PATH
+ shlibpath_overrides_runpath=3Dyes
+ hardcode_into_libs=3Dyes
+ ;;
+
+newsos6)
+ version_type=3Dlinux
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ shlibpath_overrides_runpath=3Dyes
+ ;;
+
+openbsd*)
+ version_type=3Dsunos
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_o=
s-$host_cpu" =3D "openbsd2.8-powerpc"; then
+ case "$host_os" in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=3Dno
+ ;;
+ *)
+ shlibpath_overrides_runpath=3Dyes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=3Dyes
+ fi
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}.so$=
versuffix'
+ finish_cmds=3D'PATH=3D"\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ ;;
+
+os2*)
+ libname_spec=3D'$name'
+ need_lib_prefix=3Dno
+ library_names_spec=3D'$libname.dll $libname.a'
+ dynamic_linker=3D'OS/2 ld.exe'
+ shlibpath_var=3DLIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=3Dosf
+ need_version=3Dno
+ soname_spec=3D'${libname}${release}.so'
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so $libname.so'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ sys_lib_search_path_spec=3D"/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc=
/usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec=3D"$sys_lib_search_path_spec"
+ ;;
+
+sco3.2v5*)
+ version_type=3Dosf
+ soname_spec=3D'${libname}${release}.so$major'
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ ;;
+
+solaris*)
+ version_type=3Dlinux
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ shlibpath_overrides_runpath=3Dyes
+ hardcode_into_libs=3Dyes
+ # ldd complains unless libraries are executable
+ postinstall_cmds=3D'chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=3Dsunos
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}.so$=
versuffix'
+ finish_cmds=3D'PATH=3D"\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ shlibpath_overrides_runpath=3Dyes
+ if test "$with_gnu_ld" =3D yes; then
+ need_lib_prefix=3Dno
+ fi
+ need_version=3Dyes
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ version_type=3Dlinux
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=3Dno
+ ;;
+ motorola)
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ shlibpath_overrides_runpath=3Dno
+ sys_lib_search_path_spec=3D'/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+uts4*)
+ version_type=3Dlinux
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ ;;
+
+dgux*)
+ version_type=3Dlinux
+ need_lib_prefix=3Dno
+ need_version=3Dno
+ library_names_spec=3D'${libname}${release}.so$versuffix ${libname}${re=
lease}.so$major $libname.so'
+ soname_spec=3D'${libname}${release}.so$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=3Dlinux
+ library_names_spec=3D'$libname.so.$versuffix $libname.so.$major $lib=
name.so'
+ soname_spec=3D'$libname.so.$major'
+ shlibpath_var=3DLD_LIBRARY_PATH
+ fi
+ ;;
+
+*)
+ dynamic_linker=3Dno
+ ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" =3D no && can_build_shared=3Dno
+
+# Report the final consequences.
+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" =3D "no" && enable_shared=3Dno
+
+# 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" =3D yes && enable_static=3Dno
+ if test -n "$RANLIB"; then
+ archive_cmds=3D"$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds=3D'$RANLIB $lib'
+ fi
+ ;;
+
+aix4*)
+ if test "$host_cpu" !=3D ia64 && test "$aix_use_runtimelinking" =3D no=
; then
+ test "$enable_shared" =3D yes && enable_static=3Dno
+ 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" =3D yes || enable_static=3Dyes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+if test "$hardcode_action" =3D relink; then
+ # Fast installation is not supported
+ enable_fast_install=3Dno
+elif test "$shlibpath_overrides_runpath" =3D yes ||
+ test "$enable_shared" =3D no; then
+ # Fast installation is not necessary
+ enable_fast_install=3Dneedless
+fi
+
+variables_saved_for_relink=3D"PATH $shlibpath_var $runpath_var"
+if test "$GCC" =3D yes; then
+ variables_saved_for_relink=3D"$variables_saved_for_relink GCC_EXEC_PRE=
FIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "x$enable_dlopen" !=3D xyes; then
+ enable_dlopen=3Dunknown
+ enable_dlopen_self=3Dunknown
+ enable_dlopen_self_static=3Dunknown
+else
+ lt_cv_dlopen=3Dno
+ lt_cv_dlopen_libs=3D
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen=3D"load_add_on"
+ lt_cv_dlopen_libs=3D
+ lt_cv_dlopen_self=3Dyes
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ lt_cv_dlopen=3D"LoadLibrary"
+ lt_cv_dlopen_libs=3D
+ ;;
+
+ *)
+ 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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shl_load (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* 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
+#else
+f =3D shl_load;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_shl_load=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_shl_load=3Dno
+fi
+rm -f conftest.$ac_objext 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 =3D yes; then
+ lt_cv_dlopen=3D"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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=3D$LIBS
+LIBS=3D"-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_shl_load=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dld_shl_load=3Dno
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=3D$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 =3D yes; then
+ lt_cv_dlopen=3D"shl_load" lt_cv_dlopen_libs=3D"-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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* 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
+#else
+f =3D dlopen;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_dlopen=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_dlopen=3Dno
+fi
+rm -f conftest.$ac_objext 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 =3D yes; then
+ lt_cv_dlopen=3D"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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=3D$LIBS
+LIBS=3D"-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dl_dlopen=3Dno
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=3D$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 =3D yes; then
+ lt_cv_dlopen=3D"dlopen" lt_cv_dlopen_libs=3D"-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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=3D$LIBS
+LIBS=3D"-lsvld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_svld_dlopen=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_svld_dlopen=3Dno
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=3D$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 =3D yes; then
+ lt_cv_dlopen=3D"dlopen" lt_cv_dlopen_libs=3D"-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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=3D$LIBS
+LIBS=3D"-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_dld_link=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dld_dld_link=3Dno
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=3D$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 =3D yes; then
+ lt_cv_dlopen=3D"dld_link" lt_cv_dlopen_libs=3D"-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" !=3D xno; then
+ enable_dlopen=3Dyes
+ else
+ enable_dlopen=3Dno
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=3D"$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" =3D xyes && CPPFLAGS=3D"$CPPFLAGS =
-DHAVE_DLFCN_H"
+
+ save_LDFLAGS=3D"$LDFLAGS"
+ eval LDFLAGS=3D\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS=3D"$LIBS"
+ LIBS=3D"$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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" =3D yes; then :
+ lt_cv_dlopen_self=3Dcross
+else
+ lt_dlunknown=3D0; lt_dlno_uscore=3D1; lt_dlneed_uscore=3D2
+ lt_status=3D$lt_dlunknown
+ cat > conftest.$ac_ext <<EOF
+#line 6588 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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=3D42;}
+int main ()
+{
+ void *self =3D dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status =3D $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status =3D $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status =3D $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+
+ exit (status);
+}
+EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) 2>/dev/null
+ lt_status=3D$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=3Dyes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=3Dyes ;;
+ x$lt_unknown|x*) lt_cv_dlopen_self=3Dno ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=3Dno
+ 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" =3D xyes; then
+ LDFLAGS=3D"$LDFLAGS $link_static_flag"
+ 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 it=
self... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" =3D yes; then :
+ lt_cv_dlopen_self_static=3Dcross
+else
+ lt_dlunknown=3D0; lt_dlno_uscore=3D1; lt_dlneed_uscore=3D2
+ lt_status=3D$lt_dlunknown
+ cat > conftest.$ac_ext <<EOF
+#line 6686 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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=3D42;}
+int main ()
+{
+ void *self =3D dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status =3D $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status =3D $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status =3D $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+
+ exit (status);
+}
+EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) 2>/dev/null
+ lt_status=3D$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=3Dyes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=3Dyes ;;
+ x$lt_unknown|x*) lt_cv_dlopen_self_static=3Dno ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=3Dno
+ 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=3D"$save_CPPFLAGS"
+ LDFLAGS=3D"$save_LDFLAGS"
+ LIBS=3D"$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=3D$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=3Dunknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=3D$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=3Dunknown ;;
+ esac
+fi
+
+
+if test "$enable_shared" =3D yes && test "$GCC" =3D 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 link=
ed in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $EC=
HO_C" >&6
+ if test "${lt_cv_archive_cmds_need_lc+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ $rm conftest*
+ echo 'static int dummy;' > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; then
+ soname=3Dconftest
+ lib=3Dconftest
+ libobjs=3Dconftest.$ac_objext
+ deplibs=3D
+ wl=3D$lt_cv_prog_cc_wl
+ compiler_flags=3D-v
+ linker_flags=3D-v
+ verstring=3D
+ output_objdir=3D.
+ libname=3Dconftest
+ save_allow_undefined_flag=3D$allow_undefined_flag
+ allow_undefined_flag=3D
+ 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=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }
+ then
+ lt_cv_archive_cmds_need_lc=3Dno
+ else
+ lt_cv_archive_cmds_need_lc=3Dyes
+ fi
+ allow_undefined_flag=3D$save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+fi
+
+ echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
+echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
+ ;;
+ esac
+fi
+need_lc=3D${lt_cv_archive_cmds_need_lc-yes}
+
+# The second 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
+ :
+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.
+ test -f Makefile && make "$ltmain"
+fi
+
+if test -f "$ltmain"; then
+ trap "$rm \"${ofile}T\"; exit 1" 1 2 15
+ $rm -f "${ofile}T"
+
+ echo creating $ofile
+
+ # Now quote all the things that may contain metacharacters while being
+ # careful not to overquote the AC_SUBSTed values. We take copies of t=
he
+ # variables and quote the copies for generation of the libtool script.
+ for var in echo old_CC old_CFLAGS \
+ AR AR_FLAGS CC LD LN_S NM SHELL \
+ reload_flag reload_cmds wl \
+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \
+ library_names_spec soname_spec \
+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cm=
ds \
+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_=
cmds \
+ postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmd=
s \
+ old_striplib striplib file_magic_cmd export_symbols_cmds \
+ deplibs_check_method allow_undefined_flag no_undefined_flag \
+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
+ global_symbol_to_c_name_address \
+ hardcode_libdir_flag_spec hardcode_libdir_separator \
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsym=
s; do
+
+ case $var in
+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
+ extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ # Double-quote double-evaled strings.
+ eval "lt_$var=3D\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_qu=
ote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "lt_$var=3D\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote=
_subst\"\`\\\""
+ ;;
+ esac
+ done
+
+ cat <<__EOF__ > "${ofile}T"
+#! $SHELL
+
+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-buildi=
ng 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-2000 Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 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., 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.
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -=
n.
+Xsed=3D"sed -e s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" =3D Xset; then CDPATH=3D:; export CDPATH; fi
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | s=
ed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=3D$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=3D$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=3D$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=3D$need_lc
+
+# Whether or not to optimize for fast installation.
+fast_install=3D$enable_fast_install
+
+# The host system.
+host_alias=3D$host_alias
+host=3D$host
+
+# An echo program that does not interpret backslashes.
+echo=3D$lt_echo
+
+# The archiver.
+AR=3D$lt_AR
+AR_FLAGS=3D$lt_AR_FLAGS
+
+# The default C compiler.
+CC=3D$lt_CC
+
+# Is the compiler the GNU C compiler?
+with_gcc=3D$GCC
+
+# The linker used to build libraries.
+LD=3D$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=3D$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=3D$lt_NM
+
+# A symbol stripping program
+STRIP=3D$STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=3D$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL=3D"$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP=3D"$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS=3D"$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=3D$objdir
+
+# How to create reloadable object files.
+reload_flag=3D$lt_reload_flag
+reload_cmds=3D$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=3D$lt_wl
+
+# Object file suffix (normally "o").
+objext=3D"$ac_objext"
+
+# Old archive suffix (normally "a").
+libext=3D"$libext"
+
+# Executable file suffix (normally "").
+exeext=3D"$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=3D$lt_pic_flag
+pic_mode=3D$pic_mode
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=3D$lt_compiler_c_o
+
+# Can we write directly to a .lo ?
+compiler_o_lo=3D$lt_compiler_o_lo
+
+# Must we lock files when doing compilation ?
+need_locks=3D$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=3D$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=3D$need_version
+
+# Whether dlopen is supported.
+dlopen_support=3D$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=3D$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=3D$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=3D$lt_link_static_flag
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=3D$lt_no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=3D$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=3D$lt_whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=3D$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=3D$version_type
+
+# Format of library name prefix.
+libname_spec=3D$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=3D$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=3D$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=3D$lt_RANLIB
+old_archive_cmds=3D$lt_old_archive_cmds
+old_postinstall_cmds=3D$lt_old_postinstall_cmds
+old_postuninstall_cmds=3D$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=3D$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archi=
ve.
+old_archive_from_expsyms_cmds=3D$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=3D$lt_archive_cmds
+archive_expsym_cmds=3D$lt_archive_expsym_cmds
+postinstall_cmds=3D$lt_postinstall_cmds
+postuninstall_cmds=3D$lt_postuninstall_cmds
+
+# Commands to strip libraries.
+old_striplib=3D$lt_old_striplib
+striplib=3D$lt_striplib
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=3D$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method =3D=3D file_magic.
+file_magic_cmd=3D$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=3D$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=3D$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=3D$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown=
.
+finish_eval=3D$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names=
.
+global_symbol_pipe=3D$lt_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=3D$lt_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=3D$lt_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=3D$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=3D$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=3D$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=3D$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=3D$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=3D$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=3D$lt_hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into t=
he
+# resulting binary.
+hardcode_direct=3D$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into t=
he
+# resulting binary.
+hardcode_minus_L=3D$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=3DDIR during linking hardcodes DIR i=
nto
+# the resulting binary.
+hardcode_shlibpath_var=3D$hardcode_shlibpath_var
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink=3D"$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency librari=
es.
+link_all_deplibs=3D$link_all_deplibs
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=3D$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=3D$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=3D"$fix_srcfile_path"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=3D$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=3D$lt_export_symbols_cmds
+
+# The commands to extract the exported symbol list from a shared archive=
.
+extract_expsyms_cmds=3D$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=3D$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=3D$lt_include_expsyms
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+ case $host_os in
+ aix3*)
+ cat <<\EOF >> "${ofile}T"
+
+# 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}" !=3D Xset; then
+ COLLECT_NAMES=3D
+ export COLLECT_NAMES
+fi
+EOF
+ ;;
+ esac
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2*)
+ cat <<'EOF' >> "${ofile}T"
+ # This is a source program that is used to create dlls on Windows
+ # Don't remove nor modify the starting and closing comments
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #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 <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+# __hDllInstance_base =3D hInst;
+# return TRUE;
+# }
+# /* ltdll.c ends here */
+ # This is a source program that is used to create import libraries
+ # on Windows for dlls which lack them. Don't remove nor modify the
+ # starting and closing comments
+# /* impgen.c starts here */
+# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
+#
+# This file is part of GNU libtool.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public 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 <stdio.h> /* for printf() */
+# #include <unistd.h> /* for open(), lseek(), read() */
+# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
+# #include <string.h> /* for strdup() */
+#
+# /* O_BINARY isn't required (or even defined sometimes) under Unix */
+# #ifndef O_BINARY
+# #define O_BINARY 0
+# #endif
+#
+# static unsigned int
+# pe_get16 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[2];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 2);
+# return b[0] + (b[1]<<8);
+# }
+#
+# static unsigned int
+# pe_get32 (fd, offset)
+# int fd;
+# int offset;
+# {
+# unsigned char b[4];
+# lseek (fd, offset, SEEK_SET);
+# read (fd, b, 4);
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# static unsigned int
+# pe_as32 (ptr)
+# void *ptr;
+# {
+# unsigned char *b =3D ptr;
+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
+# }
+#
+# int
+# main (argc, argv)
+# int argc;
+# char *argv[];
+# {
+# int dll;
+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
+# unsigned long export_rva, export_size, nsections, secptr, expptr;
+# unsigned long name_rvas, nexp;
+# unsigned char *expdata, *erva;
+# char *filename, *dll_name;
+#
+# filename =3D argv[1];
+#
+# dll =3D open(filename, O_RDONLY|O_BINARY);
+# if (dll < 1)
+# return 1;
+#
+# dll_name =3D filename;
+#
+# for (i=3D0; filename[i]; i++)
+# if (filename[i] =3D=3D '/' || filename[i] =3D=3D '\\' || filename[i]=
=3D=3D ':')
+# dll_name =3D filename + i +1;
+#
+# pe_header_offset =3D pe_get32 (dll, 0x3c);
+# opthdr_ofs =3D pe_header_offset + 4 + 20;
+# num_entries =3D pe_get32 (dll, opthdr_ofs + 92);
+#
+# if (num_entries < 1) /* no exports */
+# return 1;
+#
+# export_rva =3D pe_get32 (dll, opthdr_ofs + 96);
+# export_size =3D pe_get32 (dll, opthdr_ofs + 100);
+# nsections =3D pe_get16 (dll, pe_header_offset + 4 +2);
+# secptr =3D (pe_header_offset + 4 + 20 +
+# pe_get16 (dll, pe_header_offset + 4 + 16));
+#
+# expptr =3D 0;
+# for (i =3D 0; i < nsections; i++)
+# {
+# char sname[8];
+# unsigned long secptr1 =3D secptr + 40 * i;
+# unsigned long vaddr =3D pe_get32 (dll, secptr1 + 12);
+# unsigned long vsize =3D pe_get32 (dll, secptr1 + 16);
+# unsigned long fptr =3D pe_get32 (dll, secptr1 + 20);
+# lseek(dll, secptr1, SEEK_SET);
+# read(dll, sname, 8);
+# if (vaddr <=3D export_rva && vaddr+vsize > export_rva)
+# {
+# expptr =3D fptr + (export_rva - vaddr);
+# if (export_rva + export_size > vaddr + vsize)
+# export_size =3D vsize - (export_rva - vaddr);
+# break;
+# }
+# }
+#
+# expdata =3D (unsigned char*)malloc(export_size);
+# lseek (dll, expptr, SEEK_SET);
+# read (dll, expdata, export_size);
+# erva =3D expdata - export_rva;
+#
+# nexp =3D pe_as32 (expdata+24);
+# name_rvas =3D pe_as32 (expdata+32);
+#
+# printf ("EXPORTS\n");
+# for (i =3D 0; i<nexp; i++)
+# {
+# unsigned long name_rva =3D pe_as32 (erva+name_rvas+i*4);
+# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
+# }
+#
+# return 0;
+# }
+# /* impgen.c ends here */
+
+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" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
+
+ mv -f "${ofile}T" "$ofile" || \
+ (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
+ chmod +x "$ofile"
+fi
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=3D"$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL=3D'$(SHELL) $(top_builddir)/libtool'
+
+# Prevent multiple expansion
+
+
+
+link_dvdcss=3Dno
+dvdcss_path=3D""
+
+# Check whether --with-libdvdcss or --without-libdvdcss was given.
+if test "${with_libdvdcss+set}" =3D set; then
+ withval=3D"$with_libdvdcss"
+ if test x"$withval" !=3D xno; then
+ link_dvdcss=3Dyes
+ fi
+ if test x"$withval" !=3D xyes; then
+ dvdcss_path=3D$withval
+ fi
+fi;
+
+if test x"$link_dvdcss" !=3D xyes; then
+ echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* 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
+#else
+f =3D dlopen;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_dlopen=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_dlopen=3Dno
+fi
+rm -f conftest.$ac_objext 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 =3D yes; then
+ DL_LIBS=3D""
+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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=3D$LIBS
+LIBS=3D"-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dl_dlopen=3Dno
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=3D$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 =3D yes; then
+ DL_LIBS=3D-ldl
+else
+ { { echo "$as_me:$LINENO: error: You need libdl (dlopen)" >&5
+echo "$as_me: error: You need libdl (dlopen)" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+fi
+
+else
+ if test -z "$dvdcss_path"; then
+ echo "$as_me:$LINENO: checking for dvdcss_interface_2 in -ldvdcss" >=
&5
+echo $ECHO_N "checking for dvdcss_interface_2 in -ldvdcss... $ECHO_C" >&=
6
+if test "${ac_cv_lib_dvdcss_dvdcss_interface_2+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=3D$LIBS
+LIBS=3D"-ldvdcss $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dvdcss_interface_2 ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dvdcss_interface_2 ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dvdcss_dvdcss_interface_2=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dvdcss_dvdcss_interface_2=3Dno
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=3D$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dvdcss_dvdcss_interface_2" >&5
+echo "${ECHO_T}$ac_cv_lib_dvdcss_dvdcss_interface_2" >&6
+if test $ac_cv_lib_dvdcss_dvdcss_interface_2 =3D yes; then
+ CSS_LIBS=3D-ldvdcss
+else
+ { { echo "$as_me:$LINENO: error: You need libdvdcss.so.2 or later" >&5
+echo "$as_me: error: You need libdvdcss.so.2 or later" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+for ac_header in dvdcss/dvdcss.h
+do
+as_ac_Header=3D`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=3Dno
+fi
+rm -f 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
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=3D$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=3D$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=3D
+ fi
+else
+ ac_cpp_err=3Dyes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=3Dno
+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 in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compile=
r, 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 pre=
processor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's re=
sult" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be c=
ompiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prere=
quisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite header=
s?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the pre=
processor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's re=
sult" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=3D$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` =3D yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ { { echo "$as_me:$LINENO: error: You need libdvdcss (dvdcss.h)" >&5
+echo "$as_me: error: You need libdvdcss (dvdcss.h)" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+done
+
+ else
+ saved_CFLAGS=3D$CFLAGS
+ CFLAGS=3D"$CFLAGS -L$dvdcss_path/lib"
+ echo "$as_me:$LINENO: checking for dvdcss_interface_2 in -ldvdcss" >=
&5
+echo $ECHO_N "checking for dvdcss_interface_2 in -ldvdcss... $ECHO_C" >&=
6
+if test "${ac_cv_lib_dvdcss_dvdcss_interface_2+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=3D$LIBS
+LIBS=3D"-ldvdcss $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dvdcss_interface_2 ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dvdcss_interface_2 ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dvdcss_dvdcss_interface_2=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dvdcss_dvdcss_interface_2=3Dno
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=3D$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dvdcss_dvdcss_interface_2" >&5
+echo "${ECHO_T}$ac_cv_lib_dvdcss_dvdcss_interface_2" >&6
+if test $ac_cv_lib_dvdcss_dvdcss_interface_2 =3D yes; then
+ CSS_LIBS=3D"-L$dvdcss_path/lib -R$dvdcss_path/lib -ldvdcss"
+ CSS_CFLAGS=3D-I$dvdcss_path/include
+else
+ { { echo "$as_me:$LINENO: error: You need libdvdcss.so.2 or later" >&5
+echo "$as_me: error: You need libdvdcss.so.2 or later" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+ CFLAGS=3D$saved_CFLAGS
+ saved_CPPFLAGS=3D$CPPFLAGS
+ CPPFLAGS=3D"-w $CPPFLAGS -I$dvdcss_path/include"
+
+for ac_header in dvdcss/dvdcss.h
+do
+as_ac_Header=3D`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=3Dno
+fi
+rm -f 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
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=3D$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=3D$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=3D
+ fi
+else
+ ac_cpp_err=3Dyes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=3Dno
+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 in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compile=
r, 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 pre=
processor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's re=
sult" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be c=
ompiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prere=
quisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite header=
s?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the pre=
processor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's re=
sult" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=3D$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` =3D yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ { { echo "$as_me:$LINENO: error: You need libdvdcss (dvdcss.h)" >&5
+echo "$as_me: error: You need libdvdcss (dvdcss.h)" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+done
+
+ CPPFLAGS=3D$saved_CPPFLAGS
+ fi
+fi
+
+
+
+
+
+rm -f ./inttypes.h
+ if test "${ac_cv_header_inttypes_h+set}" =3D set; then
+ echo "$as_me:$LINENO: checking for inttypes.h" >&5
+echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
+if test "${ac_cv_header_inttypes_h+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_inttypes_h" >&5
+echo "${ECHO_T}$ac_cv_header_inttypes_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking inttypes.h usability" >&5
+echo $ECHO_N "checking inttypes.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <inttypes.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=3Dno
+fi
+rm -f 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 inttypes.h presence" >&5
+echo $ECHO_N "checking inttypes.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <inttypes.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=3D$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=3D$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=3D
+ fi
+else
+ ac_cpp_err=3Dyes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=3Dno
+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 in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: inttypes.h: accepted by the compile=
r, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: inttypes.h: accepted by the compiler, rejected by=
the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: inttypes.h: proceeding with the pre=
processor's result" >&5
+echo "$as_me: WARNING: inttypes.h: proceeding with the preprocessor's re=
sult" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: inttypes.h: present but cannot be c=
ompiled" >&5
+echo "$as_me: WARNING: inttypes.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: inttypes.h: check for missing prere=
quisite headers?" >&5
+echo "$as_me: WARNING: inttypes.h: check for missing prerequisite header=
s?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: inttypes.h: proceeding with the pre=
processor's result" >&5
+echo "$as_me: WARNING: inttypes.h: proceeding with the preprocessor's re=
sult" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for inttypes.h" >&5
+echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
+if test "${ac_cv_header_inttypes_h+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_inttypes_h=3D$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_inttypes_h" >&5
+echo "${ECHO_T}$ac_cv_header_inttypes_h" >&6
+
+fi
+if test $ac_cv_header_inttypes_h =3D yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for char" >&5
+echo $ECHO_N "checking for char... $ECHO_C" >&6
+if test "${ac_cv_type_char+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((char *) 0)
+ return 0;
+if (sizeof (char))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_char=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_char=3Dno
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
+echo "${ECHO_T}$ac_cv_type_char" >&6
+
+echo "$as_me:$LINENO: checking size of char" >&5
+echo $ECHO_N "checking size of char... $ECHO_C" >&6
+if test "${ac_cv_sizeof_char+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_char" =3D yes; then
+ # The cast to unsigned long 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)) >=3D 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" =3D yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) >=3D 0)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=3D0 ac_mid=3D0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) <=3D $ac_mid)]=
;
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo=3D ac_hi=3D
+ break
+ fi
+ ac_mid=3D`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D-1 ac_mid=3D-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) >=3D $ac_mid)]=
;
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=3D$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=3D`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo=3D ac_hi=3D
+ break
+ fi
+ ac_mid=3D`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D ac_hi=3D
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" !=3D "x$ac_hi"; do
+ ac_mid=3D`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) <=3D $ac_mid)]=
;
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_char=3D$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >=
&5
+echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" =3D yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross c=
ompiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;=
}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+long longval () { return (long) (sizeof (char)); }
+unsigned long ulongval () { return (long) (sizeof (char)); }
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ FILE *f =3D fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (char))) < 0)
+ {
+ long i =3D longval ();
+ if (i !=3D ((long) (sizeof (char))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i =3D ulongval ();
+ if (i !=3D ((long) (sizeof (char))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) !=3D 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } && { ac_try=3D'./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_char=3D`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5
+echo "$as_me: error: cannot compute sizeof (char), 77" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest=
.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_char=3D0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
+echo "${ECHO_T}$ac_cv_sizeof_char" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHAR $ac_cv_sizeof_char
+_ACEOF
+
+
+ echo "$as_me:$LINENO: checking for short" >&5
+echo $ECHO_N "checking for short... $ECHO_C" >&6
+if test "${ac_cv_type_short+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((short *) 0)
+ return 0;
+if (sizeof (short))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_short=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_short=3Dno
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
+echo "${ECHO_T}$ac_cv_type_short" >&6
+
+echo "$as_me:$LINENO: checking size of short" >&5
+echo $ECHO_N "checking size of short... $ECHO_C" >&6
+if test "${ac_cv_sizeof_short+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_short" =3D yes; then
+ # The cast to unsigned long 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)) >=3D 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" =3D yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) >=3D 0)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=3D0 ac_mid=3D0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) <=3D $ac_mid)=
];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo=3D ac_hi=3D
+ break
+ fi
+ ac_mid=3D`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D-1 ac_mid=3D-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) >=3D $ac_mid)=
];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=3D$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=3D`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo=3D ac_hi=3D
+ break
+ fi
+ ac_mid=3D`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D ac_hi=3D
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" !=3D "x$ac_hi"; do
+ ac_mid=3D`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) <=3D $ac_mid)=
];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_short=3D$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" =
>&5
+echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" =3D yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross c=
ompiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;=
}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+long longval () { return (long) (sizeof (short)); }
+unsigned long ulongval () { return (long) (sizeof (short)); }
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ FILE *f =3D fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (short))) < 0)
+ {
+ long i =3D longval ();
+ if (i !=3D ((long) (sizeof (short))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i =3D ulongval ();
+ if (i !=3D ((long) (sizeof (short))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) !=3D 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } && { ac_try=3D'./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_short=3D`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5
+echo "$as_me: error: cannot compute sizeof (short), 77" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest=
.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_short=3D0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
+echo "${ECHO_T}$ac_cv_sizeof_short" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+ echo "$as_me:$LINENO: checking for int" >&5
+echo $ECHO_N "checking for int... $ECHO_C" >&6
+if test "${ac_cv_type_int+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((int *) 0)
+ return 0;
+if (sizeof (int))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_int=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_int=3Dno
+fi
+rm -f 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
+
+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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_int" =3D yes; then
+ # The cast to unsigned long 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)) >=3D 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" =3D yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) >=3D 0)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=3D0 ac_mid=3D0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) <=3D $ac_mid)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo=3D ac_hi=3D
+ break
+ fi
+ ac_mid=3D`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D-1 ac_mid=3D-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) >=3D $ac_mid)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=3D$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=3D`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo=3D ac_hi=3D
+ break
+ fi
+ ac_mid=3D`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D ac_hi=3D
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" !=3D "x$ac_hi"; do
+ ac_mid=3D`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) <=3D $ac_mid)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_int=3D$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&=
5
+echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" =3D yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross c=
ompiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;=
}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+long longval () { return (long) (sizeof (int)); }
+unsigned long ulongval () { return (long) (sizeof (int)); }
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ FILE *f =3D fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (int))) < 0)
+ {
+ long i =3D longval ();
+ if (i !=3D ((long) (sizeof (int))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i =3D ulongval ();
+ if (i !=3D ((long) (sizeof (int))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) !=3D 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } && { ac_try=3D'./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_int=3D`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
+echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest=
.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_int=3D0
+fi
+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 long" >&5
+echo $ECHO_N "checking for long long... $ECHO_C" >&6
+if test "${ac_cv_type_long_long+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((long long *) 0)
+ return 0;
+if (sizeof (long long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long_long=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_long_long=3Dno
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
+echo "${ECHO_T}$ac_cv_type_long_long" >&6
+
+echo "$as_me:$LINENO: checking size of long long" >&5
+echo $ECHO_N "checking size of long long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long_long+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long_long" =3D yes; then
+ # The cast to unsigned long 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)) >=3D 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" =3D yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long))) >=3D 0)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=3D0 ac_mid=3D0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long))) <=3D $ac_=
mid)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo=3D ac_hi=3D
+ break
+ fi
+ ac_mid=3D`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D-1 ac_mid=3D-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long))) >=3D $ac_=
mid)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=3D$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_hi=3D`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo=3D ac_hi=3D
+ break
+ fi
+ ac_mid=3D`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D ac_hi=3D
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" !=3D "x$ac_hi"; do
+ ac_mid=3D`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long))) <=3D $ac_=
mid)];
+test_array [0] =3D 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=3D$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_lo=3D`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long_long=3D$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), =
77" >&5
+echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" =3D yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross c=
ompiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;=
}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+long longval () { return (long) (sizeof (long long)); }
+unsigned long ulongval () { return (long) (sizeof (long long)); }
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ FILE *f =3D fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long long))) < 0)
+ {
+ long i =3D longval ();
+ if (i !=3D ((long) (sizeof (long long))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i =3D ulongval ();
+ if (i !=3D ((long) (sizeof (long long))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) !=3D 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } && { ac_try=3D'./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long_long=3D`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" =
>&5
+echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest=
.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long_long=3D0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+_ACEOF
+
+
+ if test x"$ac_cv_sizeof_char" !=3D x"1" -o \
+ x"$ac_cv_sizeof_short" !=3D x"2" -o \
+ x"$ac_cv_sizeof_int" !=3D x"4" -o \
+ x"$ac_cv_sizeof_long_long" !=3D x"8"; then
+ { { echo "$as_me:$LINENO: error: can not build a default int=
types.h" >&5
+echo "$as_me: error: can not build a default inttypes.h" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ cat >./inttypes.h << EOF
+/* default inttypes.h for people who do not have it on their system */
+
+#ifndef _INTTYPES_H
+#define _INTTYPES_H
+#if (!defined __int8_t_defined) && (!defined __BIT_TYPES_DEFINED__)
+#define __int8_t_defined
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed int int32_t;
+typedef signed long long int64_t;
+#endif
+#if (!defined _LINUX_TYPES_H)
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long uint64_t;
+#endif
+#endif
+EOF
+
+fi
+
+
+
+
+
+
+
+
+for ac_header in byteswap.h sys/bswap.h sys/endian.h sys/param.h limits.=
h
+do
+as_ac_Header=3D`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=3Dno
+fi
+rm -f 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
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=3D$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=3D$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=3D
+ fi
+else
+ ac_cpp_err=3Dyes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=3Dno
+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 in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compile=
r, 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 pre=
processor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's re=
sult" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be c=
ompiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prere=
quisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite header=
s?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the pre=
processor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's re=
sult" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" =3D set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=3D$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` =3D yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+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}" =3D 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
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+#if BYTE_ORDER !=3D BIG_ENDIAN
+ not big endian
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_bigendian=3Dno
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+# It does not; compile a test program.
+if test "$cross_compiling" =3D yes; then
+ # try to guess the endianess by grep'ing values into an object file
+ ac_cv_c_bigendian=3Dunknown
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+short ascii_mm[] =3D { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0=
};
+short ascii_ii[] =3D { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0=
};
+void _ascii () { char *s =3D (char *) ascii_mm; s =3D (char *) ascii_ii;=
}
+short ebcdic_ii[] =3D { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, =
0 };
+short ebcdic_mm[] =3D { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, =
0 };
+void _ebcdic () { char *s =3D (char *) ebcdic_mm; s =3D (char *) ebcdic_=
ii; }
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=3Dyes
+fi
+if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" =3D unknown; then
+ ac_cv_c_bigendian=3Dno
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=3Dunknown
+ fi
+fi
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+int
+main ()
+{
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l =3D 1;
+ exit (u.c[sizeof (long) - 1] =3D=3D 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } && { ac_try=3D'./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=3Dno
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ac_cv_c_bigendian=3Dyes
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest=
.$ac_ext
+fi
+fi
+rm -f 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 endianess
+presetting ac_cv_c_bigendian=3Dno (or yes) will help" >&5
+echo "$as_me: error: unknown endianess
+presetting ac_cv_c_bigendian=3Dno (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=3Dno
+ac_save_CC=3D$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* 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 =3D g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+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;
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+return f (e, argv, 0) !=3D argv[0] || f (e, argv, 1) !=3D argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=3Dansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=3Dansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D=
__EXTENSIONS__"
+do
+ CC=3D"$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=3D$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=3D$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC=3D"$CC $ac_cv_prog_cc_stdc" ;;
+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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero =3D {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 =3D "string";
+ ccp =3D &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p =3D (char**) ccp;
+ ccp =3D (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s =3D 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ =3D 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.=
*/
+ int x[] =3D {25, 17};
+ const int *foo =3D &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p =3D 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 lvalu=
e. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j =3D 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo =3D 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_const=3Dno
+fi
+rm -f 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 =3D 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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_c_inline=3Dno
+for ac_kw in inline __inline__ __inline; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#ifndef __cplusplus
+static $ac_kw int static_foo () {return 0; }
+$ac_kw int foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_inline=3D$ac_kw; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+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) ;;
+ no)
+cat >>confdefs.h <<\_ACEOF
+#define inline
+_ACEOF
+ ;;
+ *) cat >>confdefs.h <<_ACEOF
+#define inline $ac_cv_c_inline
+_ACEOF
+ ;;
+esac
+
+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}" =3D set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((size_t *) 0)
+ return 0;
+if (sizeof (size_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_size_t=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_size_t=3Dno
+fi
+rm -f 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
+if test $ac_cv_type_size_t =3D yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned
+_ACEOF
+
+fi
+
+
+CFLAGS=3D"-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 $CFLAGS"
+
+# Check whether --enable-warnings or --disable-warnings was given.
+if test "${enable_warnings+set}" =3D set; then
+ enableval=3D"$enable_warnings"
+
+fi;
+if test x"$enable_warnings" =3D xyes; then
+ if test x"$GCC" =3D xyes; then
+ OPT_CFLAGS=3D"-Wall -Werror $CFLAGS"
+ echo "$as_me:$LINENO: checking if $CC supports $OPT_CFLAGS flags" >&5
+echo $ECHO_N "checking if $CC supports $OPT_CFLAGS flags... $ECHO_C" >&6
+ SAVE_CFLAGS=3D"$CFLAGS"
+ CFLAGS=3D"$OPT_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try=3D'test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=3D$?
+ echo "$as_me:$LINENO: \$? =3D $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_try_cflags_ok=3Dyes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_try_cflags_ok=3Dno
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=3D"$SAVE_CFLAGS"
+ echo "$as_me:$LINENO: result: $ac_cv_try_cflags_ok" >&5
+echo "${ECHO_T}$ac_cv_try_cflags_ok" >&6
+ if test x"$ac_cv_try_cflags_ok" =3D x"yes"; then
+ CFLAGS=3D$OPT_CFLAGS
+ else
+ :
+ fi
+ fi
+fi
+
+# Check whether --enable-pedantic or --disable-pedantic was given.
+if test "${enable_pedantic+set}" =3D set; then
+ enableval=3D"$enable_pedantic"
+
+fi;
+if test x"$enable_pedantic" =3D xyes; then
+ if test x"$GCC" =3D xyes; then
+ CFLAGS=3D"$CFLAGS -pedantic -Wall -W -Waggregate-return -Wbad-function=
-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -=
Wformat -Wid-clash-30 -Wimplicit -Wimplicit-function-delcaration -Wimplic=
it-int -Wlong-long -Wmain -Wmissing-declarations -Wmissing-prototypes -Wn=
ested-externs -Wno-import -Wno-parentheses -Wparentheses -Wpointer-arith =
-Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototyp=
es -Wswitch -Wtrigraphs -Wunused -Wwrite-strings"
+ fi
+fi
+
+ac_config_files=3D"$ac_config_files Makefile src/Makefile dvdread/Makefi=
le"
+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 overriden 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, don't put newlines in cache variables' values.
+# 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.
+{
+ (set) 2>&1 |
+ case `(ac_space=3D' '; set | grep ac_space) 2>&1` in
+ *ac_space=3D\ *)
+ # `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]*\\)=3D\\(.*\\)/\\1=3D'\=
\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quote=
s.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=3D\\(.*\\)/\\1=3D=
\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=3D]*\)=3D\(.*[{}].*\)$/test "${\1+set}" =3D set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=3D]*\)=3D\(.*\)$/\1=3D${\1=3D\2}/
+ : end' >>confcache
+if cmp -s $cache_file confcache; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" !=3D "x/dev/null" && echo "updating cache $cache=
_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" =3D xNONE && prefix=3D$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" =3D xNONE && exec_prefix=3D'${prefix}'
+
+# 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" =3D x.; then
+ ac_vpsub=3D'/^[ ]*VPATH[ ]*=3D/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=3D]*=3D[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=3D]*=3D[ ]*$//;
+}'
+fi
+
+DEFS=3D-DHAVE_CONFIG_H
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE=
}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was n=
ever 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 defin=
ed.
+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
+
+: ${CONFIG_STATUS=3D./config.status}
+ac_clean_files_save=3D$ac_clean_files
+ac_clean_files=3D"$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=3Dfalse
+SHELL=3D\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=3D:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; th=
en
+ set -o posix
+fi
+
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=3DFOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=3Dunset
+else
+ as_unset=3Dfalse
+fi
+
+(set +x; test -n "`(LANG=3DC; export LANG) 2>&1`") &&
+ { $as_unset LANG || test "${LANG+set}" !=3D set; } ||
+ { LANG=3DC; export LANG; }
+(set +x; test -n "`(LC_ALL=3DC; export LC_ALL) 2>&1`") &&
+ { $as_unset LC_ALL || test "${LC_ALL+set}" !=3D set; } ||
+ { LC_ALL=3DC; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=3DC; export LC_TIME) 2>&1`") &&
+ { $as_unset LC_TIME || test "${LC_TIME+set}" !=3D set; } ||
+ { LC_TIME=3DC; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=3DC; export LC_CTYPE) 2>&1`") &&
+ { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" !=3D set; } ||
+ { LC_CTYPE=3DC; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=3DC; export LANGUAGE) 2>&1`") &&
+ { $as_unset LANGUAGE || test "${LANGUAGE+set}" !=3D set; } ||
+ { LANGUAGE=3DC; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=3DC; export LC_COLLATE) 2>&1`") &&
+ { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" !=3D set; } ||
+ { LC_COLLATE=3DC; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=3DC; export LC_NUMERIC) 2>&1`") &&
+ { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" !=3D set; } ||
+ { LC_NUMERIC=3DC; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=3DC; export LC_MESSAGES) 2>&1`") &&
+ { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" !=3D set; } ||
+ { LC_MESSAGES=3DC; export LC_MESSAGES; }
+
+
+# Name of the executable.
+as_me=3D`(basename "$0") 2>/dev/null ||
+$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'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters=3D'abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS=3D'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=3D$as_cr_letters$as_cr_LETTERS
+as_cr_digits=3D'0123456789'
+as_cr_alnum=3D$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" !=3D set; then
+ echo "#! /bin/sh" >conftest.sh
+ echo "exit 0" >>conftest.sh
+ chmod +x conftest.sh
+ if (PATH=3D".;."; conftest.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=3D';'
+ else
+ PATH_SEPARATOR=3D:
+ fi
+ rm -f conftest.sh
+fi
+
+
+ as_lineno_1=3D$LINENO
+ as_lineno_2=3D$LINENO
+ as_lineno_3=3D`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" !=3D "x$as_lineno_2" &&
+ test "x$as_lineno_3" =3D "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=3D$0 ;;
+ *) as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ test -r "$as_dir/$0" && as_myself=3D$as_dir/$0 && break
+done
+
+ ;;
+ 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" =3D x; then
+ as_myself=3D$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an a=
bsolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&=
2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=3D$as_save_IFS
+ test -z "$as_dir" && as_dir=3D.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=3D$LINENO
+ as_lineno_2=3D$LINENO
+ as_lineno_3=3D`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" !=3D "x$as_lineno_2" &&
+ test "x$as_lineno_3" =3D "x$as_lineno_2" ') 2>/dev/null; then
+ CONFIG_SHELL=3D$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # 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 before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=3D', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=3D' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\=
2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun =
with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX she=
ll" >&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 sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N=3D ECHO_C=3D'
+' ECHO_T=3D' ' ;;
+ *c*,* ) ECHO_N=3D-n ECHO_C=3D ECHO_T=3D ;;
+ *) ECHO_N=3D ECHO_C=3D'\c' ECHO_T=3D ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=3Dexpr
+else
+ as_expr=3Dfalse
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more gen=
eric
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s=3D'cp -p'
+ else
+ as_ln_s=3D'ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=3Dln
+else
+ as_ln_s=3D'cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p=3D"test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp=3D"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=3D"sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl=3D'
+'
+IFS=3D" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" !=3D set || { CDPATH=3D$PATH_SE=
PARATOR; export CDPATH; }
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.53. Invocation command line was
+
+ CONFIG_FILES =3D $CONFIG_FILES
+ CONFIG_HEADERS =3D $CONFIG_HEADERS
+ CONFIG_LINKS =3D $CONFIG_LINKS
+ CONFIG_COMMANDS =3D $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=3D\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=3D\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=3D\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=3D\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage=3D"\
+\`$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, then exit
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=3DFILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=3DFILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version=3D"\\
+config.status
+configured by $0, generated by GNU Autoconf 2.53,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g=
'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=3D$srcdir
+INSTALL=3D"$INSTALL"
+_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=3D:
+while test $# !=3D 0
+do
+ case $1 in
+ --*=3D*)
+ ac_option=3D`expr "x$1" : 'x\([^=3D]*\)=3D'`
+ ac_optarg=3D`expr "x$1" : 'x[^=3D]*=3D\(.*\)'`
+ shift
+ set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+ shift
+ ;;
+ -*);;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_need_defaults=3Dfalse;;
+ esac
+
+ case $1 in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --=
r)
+ echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recu=
rsion"
+ exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+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 0 ;;
+ --debug | --d* | -d )
+ debug=3D: ;;
+ --file | --fil | --fi | --f )
+ shift
+ CONFIG_FILES=3D"$CONFIG_FILES $1"
+ ac_need_defaults=3Dfalse;;
+ --header | --heade | --head | --hea )
+ shift
+ CONFIG_HEADERS=3D"$CONFIG_HEADERS $1"
+ ac_need_defaults=3Dfalse;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets=3D"$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE=3D"$AMDEP_TRUE" ac_aux_dir=3D"$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES=3D"$CONFIG_FILES Makefile" ;;
+ "src/Makefile" ) CONFIG_FILES=3D"$CONFIG_FILES src/Makefile" ;;
+ "dvdread/Makefile" ) CONFIG_FILES=3D"$CONFIG_FILES dvdread/Makefile" ;=
;
+ "depfiles" ) CONFIG_COMMANDS=3D"$CONFIG_COMMANDS depfiles" ;;
+ "config.h" ) CONFIG_HEADERS=3D"$CONFIG_HEADERS config.h" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_targe=
t" >&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 instanti=
ate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremel=
y
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" =3D set || CONFIG_FILES=3D$config_files
+ test "${CONFIG_HEADERS+set}" =3D set || CONFIG_HEADERS=3D$config_heade=
rs
+ test "${CONFIG_COMMANDS+set}" =3D set || CONFIG_COMMANDS=3D$config_com=
mands
+fi
+
+# Create a temporary directory, and hook for its removal unless debuggin=
g.
+$debug ||
+{
+ trap 'exit_status=3D$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=3D/tmp}
+{
+ tmp=3D`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=3D$TMPDIR/cs$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# 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
+ # Protect against being on the right side of a sed subst in config.sta=
tus.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g=
;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at PACKAGE@,$PACKAGE,;t t
+s, at VERSION@,$VERSION,;t t
+s, at ACLOCAL@,$ACLOCAL,;t t
+s, at AUTOCONF@,$AUTOCONF,;t t
+s, at AUTOMAKE@,$AUTOMAKE,;t t
+s, at AUTOHEADER@,$AUTOHEADER,;t t
+s, at MAKEINFO@,$MAKEINFO,;t t
+s, at AMTAR@,$AMTAR,;t t
+s, at install_sh@,$install_sh,;t t
+s, at STRIP@,$STRIP,;t t
+s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s, at AWK@,$AWK,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s, at MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s, at MAINT@,$MAINT,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at DEPDIR@,$DEPDIR,;t t
+s, at am__include@,$am__include,;t t
+s, at am__quote@,$am__quote,;t t
+s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s, at CCDEPMODE@,$CCDEPMODE,;t t
+s, at CPP@,$CPP,;t t
+s, at LN_S@,$LN_S,;t t
+s, at ECHO@,$ECHO,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at LIBTOOL@,$LIBTOOL,;t t
+s, at DL_LIBS@,$DL_LIBS,;t t
+s, at CSS_LIBS@,$CSS_LIBS,;t t
+s, at CSS_CFLAGS@,$CSS_CFLAGS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=3D48
+ ac_sed_frag=3D1 # Number of current file.
+ ac_beg=3D1 # First line for current file.
+ ac_end=3D$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=3D:
+ ac_sed_cmds=3D
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=3Dfalse
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_se=
d_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=3D"sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds=3D"$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=3D`expr $ac_sed_frag + 1`
+ ac_beg=3D$ac_end
+ ac_end=3D`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=3Dcat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" =3D x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile=3D"outfile=
.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=3D`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=3D`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=3D`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=3D`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=3D$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=3D`(dirname "$ac_file") 2>/dev/null ||
+$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'`
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=3D;;
+ *) as_incr_dir=3D.;;
+esac
+as_dummy=3D"$ac_dir"
+for as_mkdir_dir in `IFS=3D'/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=3D$as_mkdir_dir ;;
+ *)
+ as_incr_dir=3D$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" ||
+ mkdir "$as_incr_dir" ||
+ { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+done; }
+
+ ac_builddir=3D.
+
+if test "$ac_dir" !=3D .; then
+ ac_dir_suffix=3D/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=3D`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix=3D ac_top_builddir=3D
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=3D.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=3D.
+ else
+ ac_top_srcdir=3D`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=3D$srcdir$ac_dir_suffix;
+ ac_top_srcdir=3D$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=3D$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=3D$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo ca=
n be
+# absolute.
+ac_abs_builddir=3D`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=3D`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=3D`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=3D`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=3D$INSTALL ;;
+ *) ac_INSTALL=3D$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" !=3D x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # 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. */
+ if test x"$ac_file" =3D x-; then
+ configure_input=3D
+ else
+ configure_input=3D"$ac_file. "
+ fi
+ configure_input=3D$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=3D`IFS=3D:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=3D:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find in=
put file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" =
>&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" !=3D x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", whe=
re
+# NAME is the cpp macro being defined and VALUE is the value it is being=
given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA=3D's,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB=3D'[ ].*$,\1#\2'
+ac_dC=3D' '
+ac_dD=3D',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VA=
LUE".
+ac_uA=3D's,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB=3D'$,\1#\2define\3'
+ac_uC=3D' '
+ac_uD=3D',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" =3D x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile=3D"outfile=
.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=3D`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=3D`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=3D`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=3D`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=3D$ac_file.in ;;
+ esac
+
+ test x"$ac_file" !=3D x- && { echo "$as_me:$LINENO: creating $ac_file"=
>&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=3D`IFS=3D:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=3D:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find in=
put file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" =
>&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmar=
e.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${=
ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_=
dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments. This is necessary, fo=
r
+# example, in the case of _POSIX_SOURCE, which is predefined and require=
d
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG=
_STATUS
+echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFI=
G_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG=
_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # egrep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # 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. */
+ if test x"$ac_file" =3D x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
+ else
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" !=3D x-; then
+ if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=3D`(dirname "$ac_file") 2>/dev/null ||
+$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'`
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=3D;;
+ *) as_incr_dir=3D.;;
+esac
+as_dummy=3D"$ac_dir"
+for as_mkdir_dir in `IFS=3D'/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=3D$as_mkdir_dir ;;
+ *)
+ as_incr_dir=3D$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" ||
+ mkdir "$as_incr_dir" ||
+ { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+done; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+ # Run the commands associated with the file.
+ case $ac_file in
+ config.h ) # update the timestamp
+echo 'timestamp for config.h' >"./stamp-h1"
+ ;;
+ esac
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" =3D x: && continu=
e
+ ac_dest=3D`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=3D`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=3D`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=3D.
+
+if test "$ac_dir" !=3D .; then
+ ac_dir_suffix=3D/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=3D`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix=3D ac_top_builddir=3D
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=3D.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=3D.
+ else
+ ac_top_srcdir=3D`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=3D$srcdir$ac_dir_suffix;
+ ac_top_srcdir=3D$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=3D$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=3D$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo ca=
n be
+# absolute.
+ac_abs_builddir=3D`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=3D`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=3D`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=3D`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ depfiles ) test x"$AMDEP_TRUE" !=3D x"" || for mf in $CONFIG_FILES; =
do
+ # Strip MF so we end up with the name of the file.
+ mf=3D`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.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ dirpart=3D`(dirname "$mf") 2>/dev/null ||
+$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
+ grep '^DEP_FILES *=3D *[^ #]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=3D`sed -n -e '/^DEPDIR =3D / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=3D`sed -n -e '/^U =3D / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # 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 -e '
+ /^DEP_FILES =3D .*\\\\$/ {
+ s/^DEP_FILES =3D //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES =3D / s/^DEP_FILES =3D //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=3D`(dirname "$file") 2>/dev/null ||
+$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'`
+ { case $dirpart/$fdir in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=3D;;
+ *) as_incr_dir=3D.;;
+esac
+as_dummy=3D$dirpart/$fdir
+for as_mkdir_dir in `IFS=3D'/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=3D$as_mkdir_dir ;;
+ *)
+ as_incr_dir=3D$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" ||
+ mkdir "$as_incr_dir" ||
+ { { echo "$as_me:$LINENO: error: cannot create $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+done; }
+
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=3D$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" !=3D yes; then
+ ac_cs_success=3D:
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS || ac_cs_success=3Dfalse
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? =3D 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/configure.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/configure.in 2007-03-10 21:38:29=
UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/configure.in 2007-03-10 21:41:34=
UTC (rev 1290)
@@ -0,0 +1,154 @@
+AC_INIT(dvdread/dvd_reader.c)
+AM_INIT_AUTOMAKE(libdvdread, 0.9.4)
+AM_CONFIG_HEADER(config.h)
+AM_MAINTAINER_MODE
+AC_CANONICAL_HOST
+
+AC_PROG_CC
+AC_STDC_HEADERS
+
+dnl
+dnl Check the operating system
+dnl
+case x"$host_os" in
+ xdarwin*)
+ CFLAGS=3D"${CFLAGS} -no-cpp-precomp"
+ AC_DEFINE(__DARWIN__, 1, Have a Mac OS X system)
+ ;;
+ x*)
+ ;;
+esac
+
+dnl
+dnl non-gcc flags - we probably need exact configuration triplets here.
+dnl
+if test x"$GCC" !=3D x"yes"; then
+ case x"$host" in
+ xsparc-sun-solaris*)
+dnl #pragma pack(1) doesn't seem to change Fortes oppinion about what it
+dnl can assume about packing when accessing things of the types that whe=
re
+dnl declared within region of #pragma pack(1), so we are forced to use t=
he
+dnl *big hammer* and tell it that it can't make any assumptions at all f=
or
+dnl anyting anywhere... to bad really. Even worse, code using the libdv=
dread
+dnl headers for ifo and/or nav structures must be compiled in the same w=
ay ;(
+ OPT_CFLAGS=3D"$CFLAGS -xCC -xmemalign"
+ AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=3D$OPT_CFLAGS])
+dnl AC_MSG_ERROR(You must use GCC to compile this code)
+ ;;
+ esac
+fi
+
+dnl
+dnl Checks for libtool - this must be done after we set cflags (abi issu=
es)
+dnl
+AM_PROG_LIBTOOL
+
+dnl
+dnl We use dlopen for libdvdcss access by default but if --with-libdvdcs=
s
+dnl is given we link with it instead.
+dnl
+link_dvdcss=3Dno
+dvdcss_path=3D""
+AC_ARG_WITH([libdvdcss],
+ [ --with-libdvdcss[=3DPATH] force linking against libdvdcss],
+ [if test x"$withval" !=3D xno; then
+ link_dvdcss=3Dyes
+ fi
+ if test x"$withval" !=3D xyes; then
+ dvdcss_path=3D$withval
+ fi])
+
+if test x"$link_dvdcss" !=3D xyes; then
+dnl dlopen libdvdcss
+ AC_CHECK_FUNC(dlopen,=20
+ [ DL_LIBS=3D"" ],=20
+ AC_CHECK_LIB(dl, dlopen,=20
+ [ DL_LIBS=3D-ldl ],=20
+ AC_MSG_ERROR(You need libdl (dlopen))
+ )
+ )
+else
+dnl link with libdvdcss
+ if test -z "$dvdcss_path"; then
+ AC_CHECK_LIB(dvdcss, dvdcss_interface_2,=20
+ [ CSS_LIBS=3D-ldvdcss ],=20
+ AC_MSG_ERROR(You need libdvdcss.so.2 or later)
+ )
+ AC_CHECK_HEADERS(dvdcss/dvdcss.h,=20
+ [ ],
+ AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
+ )
+ else
+ saved_CFLAGS=3D$CFLAGS
+ CFLAGS=3D"$CFLAGS -L$dvdcss_path/lib"
+ AC_CHECK_LIB(dvdcss, dvdcss_interface_2,=20
+ [ CSS_LIBS=3D"-L$dvdcss_path/lib -R$dvdcss_path/lib -ldvdcss"=20
+ CSS_CFLAGS=3D-I$dvdcss_path/include ],=20
+ AC_MSG_ERROR(You need libdvdcss.so.2 or later)
+ )
+ CFLAGS=3D$saved_CFLAGS
+ dnl -w added to shutup GCC3.1's cpp warning about -I/usr/local
+ saved_CPPFLAGS=3D$CPPFLAGS
+ CPPFLAGS=3D"-w $CPPFLAGS -I$dvdcss_path/include"
+ AC_CHECK_HEADERS(dvdcss/dvdcss.h,=20
+ [ ],
+ AC_MSG_ERROR(You need libdvdcss (dvdcss.h))
+ )
+ CPPFLAGS=3D$saved_CPPFLAGS
+ fi
+fi
+
+AC_SUBST(DL_LIBS)
+AC_SUBST(CSS_LIBS)
+AC_SUBST(CSS_CFLAGS)
+
+dnl=20
+dnl Check for inttype.h, if not present on the system generate one in ".=
".
+dnl
+AC_CHECK_GENERATE_INTTYPES(.)
+
+dnl
+dnl Checks for header files.
+dnl
+AC_CHECK_HEADERS([byteswap.h sys/bswap.h sys/endian.h sys/param.h limits=
.h])
+
+
+AC_C_BIGENDIAN
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_SIZE_T
+
+dnl
+dnl Linux and Solaris needs this to make lseek and others be 64 bit
+dnl
+CFLAGS=3D"-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 $CFLAGS"
+
+dnl
+dnl It's nice to have clean code...
+dnl
+AC_ARG_ENABLE([warnings],
+ [ --enable-warnings enable -Wall and treat warnings as errors=
])
+if test x"$enable_warnings" =3D xyes; then
+ if test x"$GCC" =3D xyes; then
+ OPT_CFLAGS=3D"-Wall -Werror $CFLAGS"
+ AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=3D$OPT_CFLAGS])
+ fi
+fi
+
+dnl
+dnl It's good to be paranoid ;-)
+dnl
+AC_ARG_ENABLE([pedantic],
+ [ --enable-pedantic enable various extra warnings for gcc])
+if test x"$enable_pedantic" =3D xyes; then
+ if test x"$GCC" =3D xyes; then
+ dnl -Wtraditional is not included here!
+ CFLAGS=3D"$CFLAGS -pedantic -Wall -W -Waggregate-return -Wbad-function-=
cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -W=
format -Wid-clash-30 -Wimplicit -Wimplicit-function-delcaration -Wimplici=
t-int -Wlong-long -Wmain -Wmissing-declarations -Wmissing-prototypes -Wne=
sted-externs -Wno-import -Wno-parentheses -Wparentheses -Wpointer-arith -=
Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototype=
s -Wswitch -Wtrigraphs -Wunused -Wwrite-strings"
+ fi
+fi
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+dvdread/Makefile
+])
Added: trunk/DvdMenuXtractor/dmx/libdvdread/depcomp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/depcomp 2007-03-10 21:38:29 UTC =
(rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/depcomp 2007-03-10 21:41:34 UTC =
(rev 1290)
@@ -0,0 +1,423 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 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 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 <oliva at dcc.unicamp.br>.
+
+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
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+ base=3D`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+ dir=3D`echo "$object" | sed 's,/.*$,/,'`
+ if test "$dir" =3D "$object"; then
+ dir=3D
+ fi
+ # FIXME: should be _deps on DOS.
+ depfile=3D"$dir.deps/$base"
+fi
+
+tmpdepfile=3D${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" =3D hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=3D-M
+ depmode=3Dgcc
+fi
+
+if test "$depmode" =3D dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=3D-xM
+ depmode=3Ddashmstdout
+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.
+ "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+ stat=3D$?
+ 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=3D-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=3D$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=3DABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive lett=
ers.
+ 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/$/ :/' >> "$depf=
ile"
+ 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" =3D yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=3D$?
+ 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. 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.
+ stripped=3D`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+ tmpdepfile=3D"$stripped.u"
+ outname=3D"$stripped.o"
+ if test "$libtool" =3D yes; then
+ "$@" -Wc,-M
+ else
+ "$@" -M
+ fi
+
+ stat=3D$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^$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"
+ ;;
+
+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=3D`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" =3D "x$object" && dir=3D
+ base=3D`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$/=
/'`
+
+ if test "$libtool" =3D yes; then
+ tmpdepfile1=3D"$dir.libs/$base.lo.d"
+ tmpdepfile2=3D"$dir.libs/$base.d"
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=3D"$dir$base.o.d"
+ tmpdepfile2=3D"$dir$base.d"
+ "$@" -MD
+ fi
+
+ stat=3D$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile1"; then
+ tmpdepfile=3D"$tmpdepfile1"
+ else
+ tmpdepfile=3D"$tmpdepfile2"
+ fi
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a space and a tab in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$de=
pfile"
+ 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 proprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" =3D yes; then
+ while test $1 !=3D '--mode=3Dcompile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'. We will use -o /dev/null later,
+ # however we can't do the remplacement now because
+ # `-o $object' might simply not be used
+ IFS=3D" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=3D-M
+ "$@" -o /dev/null $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/$/ :/' >> "$depf=
ile"
+ 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 $?
+ # X makedepend
+ shift
+ cleared=3Dno
+ for arg in "$@"; do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=3Dyes ;;
+ esac
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ -*)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=3D"`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/$/ :/' >> "$depf=
ile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" =3D yes; then
+ while test $1 !=3D '--mode=3Dcompile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=3D" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n '/^# [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 proprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ "$@" || exit $?
+ IFS=3D" "
+ 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
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/Makefile.am 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/Makefile.am 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,14 @@
+INCLUDES =3D -I$(top_srcdir) @CSS_CFLAGS@
+
+lib_LTLIBRARIES =3D libdvdread.la
+libdvdread_la_SOURCES =3D dvd_input.c dvd_reader.c dvd_udf.c ifo_read.c =
\
+ ifo_print.c nav_read.c nav_print.c bswap.h dvd_udf.h dvd_input.h \
+ dvdread_internal.h cmd_print.c \
+ md5.c md5.h
+libdvdread_la_LIBADD =3D @DL_LIBS@ @CSS_LIBS@
+libdvdread_la_LDFLAGS =3D -version-info 5:1:2 -export-symbols-regex "(DV=
D.*|ifo.*|nav.*|cmd.*)"
+
+pkgincludedir =3D $(includedir)/dvdread
+
+pkginclude_HEADERS =3D dvd_reader.h ifo_types.h ifo_read.h \
+ ifo_print.h nav_types.h nav_read.h nav_print.h cmd_print.h
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/Makefile.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/Makefile.in 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/Makefile.in 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,498 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+ at SET_MAKE@
+
+
+srcdir =3D @srcdir@
+top_srcdir =3D @top_srcdir@
+VPATH =3D @srcdir@
+pkgdatadir =3D $(datadir)/@PACKAGE@
+pkglibdir =3D $(libdir)/@PACKAGE@
+top_builddir =3D ..
+am__cd =3D CDPATH=3D"$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL =3D @INSTALL@
+install_sh_DATA =3D $(install_sh) -c -m 644
+install_sh_PROGRAM =3D $(install_sh) -c
+install_sh_SCRIPT =3D $(install_sh) -c
+INSTALL_HEADER =3D $(INSTALL_DATA)
+transform =3D $(program_transform_name)
+NORMAL_INSTALL =3D :
+PRE_INSTALL =3D :
+POST_INSTALL =3D :
+NORMAL_UNINSTALL =3D :
+PRE_UNINSTALL =3D :
+POST_UNINSTALL =3D :
+build_triplet =3D @build@
+host_triplet =3D @host@
+subdir =3D dvdread
+DIST_COMMON =3D $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps =3D $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps =3D $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) =
\
+ $(ACLOCAL_M4)
+mkinstalldirs =3D $(install_sh) -d
+CONFIG_HEADER =3D $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =3D
+am__vpath_adj_setup =3D srcdirstrip=3D`echo "$(srcdir)" | sed 's|.|.|g'`=
;
+am__vpath_adj =3D case $$p in \
+ $(srcdir)/*) f=3D`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=3D$$p;; \
+ esac;
+am__strip_dir =3D `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs =3D "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"
+libLTLIBRARIES_INSTALL =3D $(INSTALL)
+LTLIBRARIES =3D $(lib_LTLIBRARIES)
+libdvdread_la_DEPENDENCIES =3D
+am_libdvdread_la_OBJECTS =3D dvd_input.lo dvd_reader.lo dvd_udf.lo \
+ ifo_read.lo ifo_print.lo nav_read.lo nav_print.lo cmd_print.lo \
+ md5.lo
+libdvdread_la_OBJECTS =3D $(am_libdvdread_la_OBJECTS)
+DEFAULT_INCLUDES =3D -I. -I$(srcdir) -I$(top_builddir)
+depcomp =3D $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe =3D depfiles
+COMPILE =3D $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS)=
\
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE =3D $(LIBTOOL) --tag=3DCC --mode=3Dcompile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD =3D $(CC)
+LINK =3D $(LIBTOOL) --tag=3DCC --mode=3Dlink $(CCLD) $(AM_CFLAGS) $(CFLA=
GS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES =3D $(libdvdread_la_SOURCES)
+DIST_SOURCES =3D $(libdvdread_la_SOURCES)
+pkgincludeHEADERS_INSTALL =3D $(INSTALL_HEADER)
+HEADERS =3D $(pkginclude_HEADERS)
+ETAGS =3D etags
+CTAGS =3D ctags
+DISTFILES =3D $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgincludedir =3D $(includedir)/dvdread
+ACLOCAL =3D @ACLOCAL@
+AMDEP_FALSE =3D @AMDEP_FALSE@
+AMDEP_TRUE =3D @AMDEP_TRUE@
+AMTAR =3D @AMTAR@
+AR =3D @AR@
+AUTOCONF =3D @AUTOCONF@
+AUTOHEADER =3D @AUTOHEADER@
+AUTOMAKE =3D @AUTOMAKE@
+AWK =3D @AWK@
+CC =3D @CC@
+CCDEPMODE =3D @CCDEPMODE@
+CFLAGS =3D @CFLAGS@
+CPP =3D @CPP@
+CPPFLAGS =3D @CPPFLAGS@
+CSS_CFLAGS =3D @CSS_CFLAGS@
+CSS_LIBS =3D @CSS_LIBS@
+CXX =3D @CXX@
+CXXCPP =3D @CXXCPP@
+CXXDEPMODE =3D @CXXDEPMODE@
+CXXFLAGS =3D @CXXFLAGS@
+CYGPATH_W =3D @CYGPATH_W@
+DEFS =3D @DEFS@
+DEPDIR =3D @DEPDIR@
+DL_LIBS =3D @DL_LIBS@
+ECHO =3D @ECHO@
+ECHO_C =3D @ECHO_C@
+ECHO_N =3D @ECHO_N@
+ECHO_T =3D @ECHO_T@
+EGREP =3D @EGREP@
+EXEEXT =3D @EXEEXT@
+F77 =3D @F77@
+FFLAGS =3D @FFLAGS@
+INSTALL_DATA =3D @INSTALL_DATA@
+INSTALL_PROGRAM =3D @INSTALL_PROGRAM@
+INSTALL_SCRIPT =3D @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM =3D @INSTALL_STRIP_PROGRAM@
+LDFLAGS =3D @LDFLAGS@
+LIBOBJS =3D @LIBOBJS@
+LIBS =3D @LIBS@
+LIBTOOL =3D @LIBTOOL@
+LN_S =3D @LN_S@
+LTLIBOBJS =3D @LTLIBOBJS@
+MAINT =3D @MAINT@
+MAINTAINER_MODE_FALSE =3D @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE =3D @MAINTAINER_MODE_TRUE@
+MAKEINFO =3D @MAKEINFO@
+OBJEXT =3D @OBJEXT@
+PACKAGE =3D @PACKAGE@
+PACKAGE_BUGREPORT =3D @PACKAGE_BUGREPORT@
+PACKAGE_NAME =3D @PACKAGE_NAME@
+PACKAGE_STRING =3D @PACKAGE_STRING@
+PACKAGE_TARNAME =3D @PACKAGE_TARNAME@
+PACKAGE_VERSION =3D @PACKAGE_VERSION@
+PATH_SEPARATOR =3D @PATH_SEPARATOR@
+RANLIB =3D @RANLIB@
+SET_MAKE =3D @SET_MAKE@
+SHELL =3D @SHELL@
+STRIP =3D @STRIP@
+VERSION =3D @VERSION@
+ac_ct_AR =3D @ac_ct_AR@
+ac_ct_CC =3D @ac_ct_CC@
+ac_ct_CXX =3D @ac_ct_CXX@
+ac_ct_F77 =3D @ac_ct_F77@
+ac_ct_RANLIB =3D @ac_ct_RANLIB@
+ac_ct_STRIP =3D @ac_ct_STRIP@
+am__fastdepCC_FALSE =3D @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE =3D @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE =3D @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE =3D @am__fastdepCXX_TRUE@
+am__include =3D @am__include@
+am__leading_dot =3D @am__leading_dot@
+am__quote =3D @am__quote@
+am__tar =3D @am__tar@
+am__untar =3D @am__untar@
+bindir =3D @bindir@
+build =3D @build@
+build_alias =3D @build_alias@
+build_cpu =3D @build_cpu@
+build_os =3D @build_os@
+build_vendor =3D @build_vendor@
+datadir =3D @datadir@
+exec_prefix =3D @exec_prefix@
+host =3D @host@
+host_alias =3D @host_alias@
+host_cpu =3D @host_cpu@
+host_os =3D @host_os@
+host_vendor =3D @host_vendor@
+includedir =3D @includedir@
+infodir =3D @infodir@
+install_sh =3D @install_sh@
+libdir =3D @libdir@
+libexecdir =3D @libexecdir@
+localstatedir =3D @localstatedir@
+mandir =3D @mandir@
+mkdir_p =3D @mkdir_p@
+oldincludedir =3D @oldincludedir@
+prefix =3D @prefix@
+program_transform_name =3D @program_transform_name@
+sbindir =3D @sbindir@
+sharedstatedir =3D @sharedstatedir@
+sysconfdir =3D @sysconfdir@
+target_alias =3D @target_alias@
+INCLUDES =3D -I$(top_srcdir) @CSS_CFLAGS@
+lib_LTLIBRARIES =3D libdvdread.la
+libdvdread_la_SOURCES =3D dvd_input.c dvd_reader.c dvd_udf.c ifo_read.c =
\
+ ifo_print.c nav_read.c nav_print.c bswap.h dvd_udf.h dvd_input.h \
+ dvdread_internal.h cmd_print.c \
+ md5.c md5.h
+
+libdvdread_la_LIBADD =3D @DL_LIBS@ @CSS_LIBS@
+libdvdread_la_LDFLAGS =3D -version-info 5:1:2 -export-symbols-regex "(DV=
D.*|ifo.*|nav.*|cmd.*)"
+pkginclude_HEADERS =3D dvd_reader.h ifo_types.h ifo_read.h \
+ ifo_print.h nav_types.h nav_read.h nav_print.h cmd_print.h
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(a=
m__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 dvdread/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu dvdread/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__d=
epfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_D=
EPENDENCIES)
+ 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=3D'$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=3D$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=3Dinstall $(libLTLIBRARIES_INSTALL) $(INST=
ALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=3Dinstall $(libLTLIBRARIES_INSTALL) $(INSTALL_STR=
IP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @set -x; list=3D'$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=3D$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=3Duninstall rm -f '$(DESTDIR)$(libdir)/$$p'"=
; \
+ $(LIBTOOL) --mode=3Duninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list=3D'$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir=3D"`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" !=3D "$$p" || dir=3D.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libdvdread.la: $(libdvdread_la_OBJECTS) $(libdvdread_la_DEPENDENCIES)=20
+ $(LINK) -rpath $(libdir) $(libdvdread_la_LDFLAGS) $(libdvdread_la_OBJEC=
TS) $(libdvdread_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cmd_print.Plo at am__quote=
@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dvd_input.Plo at am__quote=
@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dvd_reader.Plo at am__quot=
e@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dvd_udf.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ifo_print.Plo at am__quote=
@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ifo_read.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/md5.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nav_print.Plo at am__quote=
@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nav_read.Plo at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo"=
-c -o $@ $<; \
+ at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; el=
se rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source=3D'$<' object=3D'$@' libtool=3D=
no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=3D$(DEPDIR) $(CCDEPMODE) $(depc=
omp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo"=
-c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; el=
se rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source=3D'$<' object=3D'$@' libtool=3D=
no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=3D$(DEPDIR) $(CCDEPMODE) $(depc=
omp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tp=
o" -c -o $@ $<; \
+ at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; e=
lse rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source=3D'$<' object=3D'$@' libtool=3D=
yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=3D$(DEPDIR) $(CCDEPMODE) $(depc=
omp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+install-pkgincludeHEADERS: $(pkginclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
+ @list=3D'$(pkginclude_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=3D; else d=3D"$(srcdir)/"; fi; \
+ f=3D$(am__strip_dir) \
+ echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincluded=
ir)/$$f'"; \
+ $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f=
"; \
+ done
+
+uninstall-pkgincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list=3D'$(pkginclude_HEADERS)'; for p in $$list; do \
+ f=3D$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list=3D'$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=3D`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] =3D 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=3D; \
+ here=3D`pwd`; \
+ list=3D'$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=3D`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] =3D 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=3D$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=3D; \
+ here=3D`pwd`; \
+ list=3D'$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=3D`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] =3D 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=3D`$(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=3D`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=3D`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list=3D'$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=3D`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=3D`echo "$$file" | sed "s|^$$topsrcdirstrip/|=
$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=3D.; else d=3D$(srcdir); =
fi; \
+ dir=3D`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" !=3D "$$file" && test "$$dir" !=3D "."; then \
+ dir=3D"/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=3D''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d !=3D $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(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=3D"$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM=3D"$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=3D=
-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=3DSTRIPPROG=3D'$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgincludeHEADERS
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+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-info-am uninstall-libLTLIBRARIES \
+ uninstall-pkgincludeHEADERS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pkgincludeHEADERS \
+ 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-info-am 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:
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/bswap.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/bswap.h 2007-03-10 21:38=
:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/bswap.h 2007-03-10 21:41=
:34 UTC (rev 1290)
@@ -0,0 +1,126 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef BSWAP_H_INCLUDED
+#define BSWAP_H_INCLUDED
+
+/*
+ * Copyright (C) 2000, 2001 Billy Biggs <vektor at dumbterm.net>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 U=
SA
+ */
+
+#if defined(WORDS_BIGENDIAN)
+/* All bigendian systems are fine, just ignore the swaps. */ =20
+#define B2N_16(x) (void)(x)
+#define B2N_32(x) (void)(x)
+#define B2N_64(x) (void)(x)
+
+#else=20
+
+/* For __FreeBSD_version */
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
+
+#if defined(__linux__)
+#include <byteswap.h>
+#define B2N_16(x) x =3D bswap_16(x)
+#define B2N_32(x) x =3D bswap_32(x)
+#define B2N_64(x) x =3D bswap_64(x)
+
+#elif defined(__NetBSD__)
+#include <sys/endian.h>
+#define B2N_16(x) BE16TOH(x)
+#define B2N_32(x) BE32TOH(x)
+#define B2N_64(x) BE64TOH(x)
+
+#elif defined(__OpenBSD__)
+#include <sys/endian.h>
+#define B2N_16(x) x =3D swap16(x)
+#define B2N_32(x) x =3D swap32(x)
+#define B2N_64(x) x =3D swap64(x)
+
+#elif defined(__FreeBSD__) && __FreeBSD_version >=3D 470000
+#include <sys/endian.h>
+#define B2N_16(x) x =3D be16toh(x)
+#define B2N_32(x) x =3D be32toh(x)
+#if __FreeBSD_version >=3D 500000
+#define B2N_64(x) x =3D be64toh(x)
+#else
+#define B2N_64(x) \
+ x =3D ((((x) & 0xff00000000000000) >> 56) | \
+ (((x) & 0x00ff000000000000) >> 40) | \
+ (((x) & 0x0000ff0000000000) >> 24) | \
+ (((x) & 0x000000ff00000000) >> 8) | \
+ (((x) & 0x00000000ff000000) << 8) | \
+ (((x) & 0x0000000000ff0000) << 24) | \
+ (((x) & 0x000000000000ff00) << 40) | \
+ (((x) & 0x00000000000000ff) << 56))
+#endif /* _FreeBSD_version >=3D 500000 */
+
+#elif defined(__DragonFly__)
+#include <sys/endian.h>
+#define B2N_16(x) x =3D be16toh(x)
+#define B2N_32(x) x =3D be32toh(x)
+#define B2N_64(x) x =3D be64toh(x)
+
+
+#elif defined(__APPLE__) || defined(__DARWIN__)
+#include <libkern/OSByteOrder.h>
+#define B2N_16(x) x =3D OSSwapBigToHostConstInt16(x)
+#define B2N_32(x) x =3D OSSwapBigToHostConstInt32(x)
+#define B2N_64(x) x =3D OSSwapBigToHostConstInt64(x)
+
+#else
+#if defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defin=
ed(WIN64) || defined(WIN32) || defined(__BEOS__) || defined(__INTERIX)
+/* These systems don't have swap macros */
+#else
+/* If there isn't a header provided with your system with this functiona=
lity
+ * add the relevant || define( ) to the list above.
+ */
+#warning "You should add endian swap macros for your system"
+#endif
+
+/* This is a slow but portable implementation, it has multiple evaluatio=
n=20
+ * problems so beware.
+ * Old FreeBSD's and Solaris don't have <byteswap.h> or any other such=20
+ * functionality!=20
+ */
+
+#define B2N_16(x) \
+ x =3D ((((x) & 0xff00) >> 8) | \
+ (((x) & 0x00ff) << 8))
+#define B2N_32(x) \
+ x =3D ((((x) & 0xff000000) >> 24) | \
+ (((x) & 0x00ff0000) >> 8) | \
+ (((x) & 0x0000ff00) << 8) | \
+ (((x) & 0x000000ff) << 24))
+#define B2N_64(x) \
+ x =3D ((((x) & 0xff00000000000000) >> 56) | \
+ (((x) & 0x00ff000000000000) >> 40) | \
+ (((x) & 0x0000ff0000000000) >> 24) | \
+ (((x) & 0x000000ff00000000) >> 8) | \
+ (((x) & 0x00000000ff000000) << 8) | \
+ (((x) & 0x0000000000ff0000) << 24) | \
+ (((x) & 0x000000000000ff00) << 40) | \
+ (((x) & 0x00000000000000ff) << 56))
+
+
+
+#endif
+
+#endif /* WORDS_BIGENDIAN */
+
+#endif /* BSWAP_H_INCLUDED */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/cmd_print.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/cmd_print.c 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/cmd_print.c 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,550 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (C) 2000, 2001, 2002, 2003 Martin Norb=E4ck, H=E5kan Hjort
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,=20
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 "config.h"
+
+#include <stdio.h>
+#include <ctype.h>
+
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#include "cmd_print.h"
+
+
+typedef struct
+{
+ uint8_t bits[8];
+ uint8_t examined[8];
+} cmd_t;
+
+
+static const char *cmp_op_table[] =3D {
+ NULL, "&", "=3D=3D", "!=3D", ">=3D", ">", "<=3D", "<"
+};
+static const char *set_op_table[] =3D {
+ NULL, "=3D", "<->", "+=3D", "-=3D", "*=3D", "/=3D", "%=3D", "rnd", "&=3D=
", "|=3D", "^=3D"
+};
+
+static const char *link_table[] =3D {
+ "LinkNoLink", "LinkTopC", "LinkNextC", "LinkPrevC",
+ NULL, "LinkTopPG", "LinkNextPG", "LinkPrevPG",
+ NULL, "LinkTopPGC", "LinkNextPGC", "LinkPrevPGC",
+ "LinkGoUpPGC", "LinkTailPGC", NULL, NULL,
+ "RSM"
+};
+
+static const char *system_reg_table[] =3D {
+ "Menu Description Language Code",
+ "Audio Stream Number",
+ "Sub-picture Stream Number",
+ "Angle Number",
+ "Title Track Number",
+ "VTS Title Track Number",
+ "VTS PGC Number",
+ "PTT Number for One_Sequential_PGC_Title",
+ "Highlighted Button Number",
+ "Navigation Timer",
+ "Title PGC Number for Navigation Timer",
+ "Audio Mixing Mode for Karaoke",
+ "Country Code for Parental Management",
+ "Parental Level",
+ "Player Configurations for Video",
+ "Player Configurations for Audio",
+ "Initial Language Code for Audio",
+ "Initial Language Code Extension for Audio",
+ "Initial Language Code for Sub-picture",
+ "Initial Language Code Extension for Sub-picture",
+ "Player Regional Code",
+ "Reserved 21",
+ "Reserved 22",
+ "Reserved 23"
+};
+
+static const char *system_reg_abbr_table[] =3D {
+ NULL,
+ "ASTN",
+ "SPSTN",
+ "AGLN",
+ "TTN",
+ "VTS_TTN",
+ "TT_PGCN",
+ "PTTN",
+ "HL_BTNN",
+ "NVTMR",
+ "NV_PGCN",
+ NULL,
+ "CC_PLT",
+ "PLT",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+};
+ =20
+
+
+static unsigned int bits(cmd_t *cmd, int byte, int bit, int count) {
+ unsigned int val =3D 0;
+ unsigned int bit_mask;
+ =20
+ while(count--) {
+ if(bit > 7) {
+ bit =3D 0;
+ byte++;
+ }
+ bit_mask =3D 0x01 << (7-bit);
+ val <<=3D 1;
+ if((cmd->bits[byte]) & bit_mask)
+ val |=3D 1;
+ cmd->examined[byte] |=3D bit_mask;
+ bit++;
+ }
+ return val;
+}
+
+
+static void print_system_reg(unsigned int reg) {
+ if(reg < sizeof(system_reg_abbr_table) / sizeof(char *))
+ fprintf(stdout, system_reg_table[reg]);
+ else
+ fprintf(stdout, " WARNING: Unknown system register ");
+}
+
+static void print_reg(unsigned int reg) {
+ if(reg & 0x80)
+ print_system_reg(reg & 0x7f);
+ else
+ if(reg < 16)
+ fprintf(stdout, "g[%u]", reg);
+ else
+ fprintf(stdout, " WARNING: Unknown general register ");
+}
+
+static void print_cmp_op(unsigned int op) {
+ if(op < sizeof(cmp_op_table) / sizeof(char *) && cmp_op_table[op] !=3D=
NULL)
+ fprintf(stdout, " %s ", cmp_op_table[op]);
+ else
+ fprintf(stdout, " WARNING: Unknown compare op ");
+}
+
+static void print_set_op(unsigned int op) {
+ if(op < sizeof(set_op_table) / sizeof(char *) && set_op_table[op] !=3D=
NULL)
+ fprintf(stdout, " %s ", set_op_table[op]);
+ else
+ fprintf(stdout, " WARNING: Unknown set op ");
+}
+
+static void print_reg_or_data(cmd_t *cmd, unsigned int immediate, int by=
te) {
+ if(immediate) {
+ int i =3D bits(cmd,byte,0,16);
+ =20
+ fprintf(stdout, "0x%x", i);
+ if(isprint(i & 0xff) && isprint((i>>8) & 0xff))
+ fprintf(stdout, " (\"%c%c\")", (char)((i>>8) & 0xff), (char)(i & 0=
xff));
+ } else {
+ print_reg(bits(cmd,byte + 1,0,8));
+ }
+}
+
+static void print_reg_or_data_2(cmd_t *cmd, unsigned int immediate, int =
byte) {
+ if(immediate)
+ fprintf(stdout, "0x%x", bits(cmd,byte,1,7));
+ else
+ fprintf(stdout, "g[%u]", bits(cmd,byte,4,4));
+}
+
+static void print_if_version_1(cmd_t *cmd) {
+ unsigned int op =3D bits(cmd,1,1,3);
+ =20
+ if(op) {
+ fprintf(stdout, "if (");
+ print_reg(bits(cmd,3,0,8));
+ print_cmp_op(op);
+ print_reg_or_data(cmd,bits(cmd,1,0,1), 4);
+ fprintf(stdout, ") ");
+ }
+}
+
+static void print_if_version_2(cmd_t *cmd) {
+ unsigned int op =3D bits(cmd,1,1,3);
+ =20
+ if(op) {
+ fprintf(stdout, "if (");
+ print_reg(bits(cmd,6,0,8));
+ print_cmp_op(op);
+ print_reg(bits(cmd,7,0,8));
+ fprintf(stdout, ") ");
+ }
+}
+
+static void print_if_version_3(cmd_t *cmd) {
+ unsigned int op =3D bits(cmd,1,1,3);
+ =20
+ if(op) {
+ fprintf(stdout, "if (");
+ print_reg(bits(cmd,2,0,8));
+ print_cmp_op(op);
+ print_reg_or_data(cmd,bits(cmd,1,0,1), 6);
+ fprintf(stdout, ") ");
+ }
+}
+
+static void print_if_version_4(cmd_t *cmd) {
+ unsigned int op =3D bits(cmd,1,1,3);
+ =20
+ if(op) {
+ fprintf(stdout, "if (");
+ print_reg(bits(cmd,1,4,4));
+ print_cmp_op(op);
+ print_reg_or_data(cmd,bits(cmd,1,0,1), 4);
+ fprintf(stdout, ") ");
+ }
+}
+
+static void print_if_version_5(cmd_t *cmd) {
+ unsigned int op =3D bits(cmd,1,1,3);
+ =20
+ if(op) {
+ fprintf(stdout, "if (");
+ print_reg(bits(cmd,4,0,8));
+ print_cmp_op(op);
+ print_reg(bits(cmd,5,0,8));
+ fprintf(stdout, ") ");
+ }
+}
+
+static void print_special_instruction(cmd_t *cmd) {
+ unsigned int op =3D bits(cmd,1,4,4);
+ =20
+ switch(op) {
+ case 0: // NOP
+ fprintf(stdout, "Nop");
+ break;
+ case 1: // Goto line
+ fprintf(stdout, "Goto %u", bits(cmd,7,0,8));
+ break;
+ case 2: // Break
+ fprintf(stdout, "Break");
+ break;
+ case 3: // Parental level
+ fprintf(stdout, "SetTmpPML %u, Goto %u",=20
+ bits(cmd,6,4,4), bits(cmd,7,0,8));
+ break;
+ default:
+ fprintf(stdout, "WARNING: Unknown special instruction (%u)",=20
+ bits(cmd,1,4,4));
+ }
+}
+
+static void print_linksub_instruction(cmd_t *cmd) {
+ unsigned int linkop =3D bits(cmd,7,3,5);
+ unsigned int button =3D bits(cmd,6,0,6);
+ =20
+ if(linkop < sizeof(link_table)/sizeof(char *) && link_table[linkop] !=3D=
NULL)
+ fprintf(stdout, "%s (button %u)", link_table[linkop], button);
+ else
+ fprintf(stdout, "WARNING: Unknown linksub instruction (%u)", linkop)=
;
+}
+
+static void print_link_instruction(cmd_t *cmd, int optional) {
+ unsigned int op =3D bits(cmd,1,4,4);
+ =20
+ if(optional && op)
+ fprintf(stdout, ", ");
+ =20
+ switch(op) {
+ case 0:
+ if(!optional)
+ fprintf(stdout, "WARNING: NOP (link)!");
+ break;
+ case 1:
+ print_linksub_instruction(cmd);
+ break;
+ case 4:
+ fprintf(stdout, "LinkPGCN %u", bits(cmd,6,1,15));
+ break;
+ case 5:
+ fprintf(stdout, "LinkPTT %u (button %u)",=20
+ bits(cmd,6,6,10), bits(cmd,6,0,6));
+ break;
+ case 6:
+ fprintf(stdout, "LinkPGN %u (button %u)",=20
+ bits(cmd,7,1,7), bits(cmd,6,0,6));
+ break;
+ case 7:
+ fprintf(stdout, "LinkCN %u (button %u)",=20
+ bits(cmd,7,0,8), bits(cmd,6,0,6));
+ break;
+ default:
+ fprintf(stdout, "WARNING: Unknown link instruction");
+ }
+}
+
+static void print_jump_instruction(cmd_t *cmd) {
+ switch(bits(cmd,1,4,4)) {
+ case 1:
+ fprintf(stdout, "Exit");
+ break;
+ case 2:
+ fprintf(stdout, "JumpTT %u", bits(cmd,5,1,7));
+ break;
+ case 3:
+ fprintf(stdout, "JumpVTS_TT %u", bits(cmd,5,1,7));
+ break;
+ case 5:
+ fprintf(stdout, "JumpVTS_PTT %u:%u", bits(cmd,5,1,7), bits(cmd,2,6,1=
0));
+ break;
+ case 6:
+ switch(bits(cmd,5,0,2)) {
+ case 0:
+ fprintf(stdout, "JumpSS FP");
+ break;
+ case 1:
+ fprintf(stdout, "JumpSS VMGM (menu %u)", bits(cmd,5,4,4));
+ break;
+ case 2:
+ fprintf(stdout, "JumpSS VTSM (vts %u, title %u, menu %u)",=20
+ bits(cmd,4,0,8), bits(cmd,3,0,8), bits(cmd,5,4,4));
+ break;
+ case 3:
+ fprintf(stdout, "JumpSS VMGM (pgc %u)", bits(cmd,2,1,15));
+ break;
+ }
+ break;
+ case 8:
+ switch(bits(cmd,5,0,2)) {
+ case 0:
+ fprintf(stdout, "CallSS FP (rsm_cell %u)",
+ bits(cmd,4,0,8));
+ break;
+ case 1:
+ fprintf(stdout, "CallSS VMGM (menu %u, rsm_cell %u)",
+ bits(cmd,5,4,4), bits(cmd,4,0,8));
+ break;
+ case 2:
+ fprintf(stdout, "CallSS VTSM (menu %u, rsm_cell %u)",
+ bits(cmd,5,4,4), bits(cmd,4,0,8));
+ break;
+ case 3:
+ fprintf(stdout, "CallSS VMGM (pgc %u, rsm_cell %u)",=20
+ bits(cmd,2,1,15), bits(cmd,4,0,8));
+ break;
+ }
+ break;
+ default:
+ fprintf(stdout, "WARNING: Unknown Jump/Call instruction");
+ }
+}
+
+static void print_system_set(cmd_t *cmd) {
+ int i;
+ =20
+ switch(bits(cmd,0,4,4)) {
+ case 1: // Set system reg 1 &| 2 &| 3 (Audio, Subp. Angle)
+ for(i =3D 1; i <=3D 3; i++) {
+ if(bits(cmd,2+i,0,1)) {
+ print_system_reg((unsigned int)i);
+ fprintf(stdout, " =3D ");
+ print_reg_or_data_2(cmd,bits(cmd,0,3,1), 2 + i);
+ fprintf(stdout, " ");
+ }
+ }
+ break;
+ case 2: // Set system reg 9 & 10 (Navigation timer, Title PGC number)
+ print_system_reg(9);
+ fprintf(stdout, " =3D ");
+ print_reg_or_data(cmd,bits(cmd,0,3,1), 2);
+ fprintf(stdout, " ");
+ print_system_reg(10);
+ fprintf(stdout, " =3D %u", bits(cmd,5,0,8)); // ??
+ break;
+ case 3: // Mode: Counter / Register + Set
+ fprintf(stdout, "SetMode ");
+ if(bits(cmd,5,0,1))
+ fprintf(stdout, "Counter ");
+ else
+ fprintf(stdout, "Register ");
+ print_reg(bits(cmd,5,4,4));
+ print_set_op(0x1); // '=3D'
+ print_reg_or_data(cmd,bits(cmd,0,3,1), 2);
+ break;
+ case 6: // Set system reg 8 (Highlighted button)
+ print_system_reg(8);
+ if(bits(cmd,0,3,1)) // immediate
+ fprintf(stdout, " =3D 0x%x (button no %u)",=20
+ bits(cmd,4,0,16), bits(cmd,4,0,6));
+ else
+ fprintf(stdout, " =3D g[%u]", bits(cmd,5,4,4));
+ break;
+ default:
+ fprintf(stdout, "WARNING: Unknown system set instruction (%u)",=20
+ bits(cmd,0,4,4));
+ }
+}
+
+static void print_set_version_1(cmd_t *cmd) {
+ unsigned int set_op =3D bits(cmd,0,4,4);
+ =20
+ if(set_op) {
+ print_reg(bits(cmd,3,0,8));
+ print_set_op(set_op);
+ print_reg_or_data(cmd,bits(cmd,0,3,1), 4);
+ } else {
+ fprintf(stdout, "NOP");
+ }
+}
+
+static void print_set_version_2(cmd_t *cmd) {
+ unsigned int set_op =3D bits(cmd,0,4,4);
+ =20
+ if(set_op) {
+ print_reg(bits(cmd,1,4,4));
+ print_set_op(set_op);
+ print_reg_or_data(cmd,bits(cmd,0,3,1), 2);
+ } else {
+ fprintf(stdout, "NOP");
+ }
+}
+
+static void print_set_version_3(cmd_t *cmd) {
+ unsigned int set_op =3D bits(cmd,0,4,4);
+ =20
+ if(set_op) {
+ print_reg(bits(cmd,1,4,4));
+ print_set_op(set_op);
+ if(bits(cmd,0,3,1)) { // print_reg_or_data
+ unsigned int i =3D bits(cmd,2,0,16);
+ =20
+ fprintf(stdout, "0x%x", i);
+ if(isprint(i & 0xff) && isprint((i>>8) & 0xff))
+ fprintf(stdout, " (\"%c%c\")",=20
+ (char)((i>>8) & 0xff), (char)(i & 0xff));
+ } else {
+ print_reg(bits(cmd,2,0,8));
+ }
+ } else {
+ fprintf(stdout, "NOP");
+ }
+}
+
+static void print_command(cmd_t *cmd) {
+ switch(bits(cmd,0,0,3)) { /* three first bits */
+ case 0: // Special instructions
+ print_if_version_1(cmd);
+ print_special_instruction(cmd);
+ break;
+ case 1: // Jump/Call or Link instructions
+ if(bits(cmd,0,3,1)) {
+ print_if_version_2(cmd);
+ print_jump_instruction(cmd);
+ } else {
+ print_if_version_1(cmd);
+ print_link_instruction(cmd,0); // must be pressent
+ }
+ break;
+ case 2: // Set System Parameters instructions
+ print_if_version_2(cmd);
+ print_system_set(cmd);
+ print_link_instruction(cmd,1); // either 'if' or 'link'
+ break;
+ case 3: // Set General Parameters instructions
+ print_if_version_3(cmd);
+ print_set_version_1(cmd);
+ print_link_instruction(cmd,1); // either 'if' or 'link'
+ break;
+ case 4: // Set, Compare -> LinkSub instructions
+ print_set_version_2(cmd);
+ fprintf(stdout, ", ");
+ print_if_version_4(cmd);
+ print_linksub_instruction(cmd);
+ break;
+ case 5: // Compare -> (Set and LinkSub) instructions
+ if(bits(cmd,0,3,1))
+ print_if_version_5(cmd);
+ else
+ print_if_version_1(cmd);
+ fprintf(stdout, "{ ");
+ print_set_version_3(cmd);
+ fprintf(stdout, ", ");
+ print_linksub_instruction(cmd);
+ fprintf(stdout, " }");
+ break;
+ case 6: // Compare -> Set, always LinkSub instructions
+ if(bits(cmd,0,3,1))
+ print_if_version_5(cmd);
+ else
+ print_if_version_1(cmd);
+ fprintf(stdout, "{ ");
+ print_set_version_3(cmd);
+ fprintf(stdout, " } ");
+ print_linksub_instruction(cmd);
+ break;
+ default:
+ fprintf(stdout, "WARNING: Unknown instruction type (%i)",=20
+ bits(cmd,0,0,3));
+ }
+}
+
+void cmdPrint_mnemonic(vm_cmd_t *command) {
+ int i, extra_bits;
+ cmd_t cmd;
+ =20
+ for(i =3D 0; i < 8; i++) {
+ cmd.bits[i] =3D command->bytes[i];
+ cmd.examined[i] =3D 0;
+ }
+
+ print_command(&cmd);
+ =20
+ // Check if there still are bits set that were not examined
+ extra_bits =3D 0;
+ for(i =3D 0; i < 8; i++)
+ if(cmd.bits[i] & ~ cmd.examined[i]) {
+ extra_bits =3D 1;
+ break;
+ }
+ if(extra_bits) {
+ fprintf(stdout, " [WARNING, unknown bits:");
+ for(i =3D 0; i < 8; i++)
+ fprintf(stdout, " %02x", cmd.bits[i] & ~ cmd.examined[i]);
+ fprintf(stdout, "]");
+ }
+}
+
+void cmdPrint_CMD(int row, vm_cmd_t *command) {
+ int i;
+
+ fprintf(stdout, "(%03d) ", row + 1);
+ for(i =3D 0; i < 8; i++)
+ fprintf(stdout, "%02x ", command->bytes[i]);
+ fprintf(stdout, "| ");
+
+ cmdPrint_mnemonic(command);
+ fprintf(stdout, "\n");
+}
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/cmd_print.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/cmd_print.h 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/cmd_print.h 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,51 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef CMD_PRINT_H_INCLUDED
+#define CMD_PRINT_H_INCLUDED
+
+/*
+ * Copyright (C) 2000, 2001, 2002, 2003 Martin Norb=E4ck, H=E5kan Hjort
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,=20
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 <dvdread/ifo_types.h>
+
+/**
+ * Pretty printing of the DVD commands (vm instructions).
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ =20
+/**
+ * Prints a text representation of the commands to stdout.
+ *
+ * @param command Pointer to the DVD command to be printed.
+ */
+void cmdPrint_mnemonic(vm_cmd_t *command);
+ =20
+/**
+ * Prints row, then a hex dump of the command followed by the text
+ * representation of the commands, as given by cmdPrint_mnemonic to
+ * stdout.
+ *
+ * @param command Pointer to the DVD command to be printed. */
+void cmdPrint_CMD(int row, vm_cmd_t *command);
+
+#ifdef __cplusplus
+};
+#endif
+#endif /* CMD_PRINT_H_INCLUDED */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_input.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_input.c 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_input.c 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,428 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (C) 2002 Samuel Hocevar <sam at zoy.org>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *=20
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU 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=
.
+ */
+
+#include "config.h"
+
+#if defined(WIN32) || defined(WIN64)
+#include "posix.h"
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#define __USE_GNU /* to get O_DIRECT in linux */
+#include <fcntl.h>
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#if defined(WIN32) || defined(WIN64)
+#include <io.h> // for open(), close(), etc..
+#include <share.h>
+#endif
+
+#include "dvd_reader.h"
+#include "dvd_input.h"
+
+#include "dvdread_internal.h"
+
+/* The function pointers that is the exported interface of this file. */
+dvd_input_t (*dvdinput_open) (const char *);
+int (*dvdinput_close) (dvd_input_t);
+int (*dvdinput_seek) (dvd_input_t, int);
+int (*dvdinput_title) (dvd_input_t, int);=20
+/**
+ * pointer must be aligned to 2048 bytes
+ * if reading from a raw/O_DIRECT file
+ */
+int (*dvdinput_read) (dvd_input_t, void *, int, int);
+
+char * (*dvdinput_error) (dvd_input_t);
+
+#ifdef HAVE_DVDCSS_DVDCSS_H
+/* linking to libdvdcss */
+#include <dvdcss/dvdcss.h>
+#define DVDcss_open(a) dvdcss_open((char*)(a))
+#define DVDcss_close dvdcss_close
+#define DVDcss_seek dvdcss_seek
+#define DVDcss_title dvdcss_title
+#define DVDcss_read dvdcss_read
+#define DVDcss_error dvdcss_error
+#else
+/* dlopening libdvdcss */
+#if defined(HAVE_DLFCN_H)
+#include <dlfcn.h>
+#endif
+typedef struct dvdcss_s *dvdcss_handle;
+static dvdcss_handle (*DVDcss_open) (const char *);
+static int (*DVDcss_close) (dvdcss_handle);
+static int (*DVDcss_seek) (dvdcss_handle, int, int);
+static int (*DVDcss_title) (dvdcss_handle, int);=20
+static int (*DVDcss_read) (dvdcss_handle, void *, int, int);
+static char * (*DVDcss_error) (dvdcss_handle);
+#endif
+
+/* The DVDinput handle, add stuff here for new input methods. */
+struct dvd_input_s {
+ /* libdvdcss handle */
+ dvdcss_handle dvdcss;
+ =20
+ /* dummy file input */
+ int fd;
+};
+
+
+/**
+ * initialize and open a DVD device or file.
+ */
+static dvd_input_t css_open(const char *target)
+{
+ dvd_input_t dev;
+ =20
+ /* Allocate the handle structure */
+ dev =3D (dvd_input_t) malloc(sizeof(struct dvd_input_s));
+ if(dev =3D=3D NULL) {
+ /* malloc has set errno to ENOMEM */
+ return NULL;
+ }
+ =20
+ /* Really open it with libdvdcss */
+ dev->dvdcss =3D DVDcss_open(target);
+ if(dev->dvdcss =3D=3D 0) {
+ free(dev);
+ dev =3D NULL;
+ }
+ =20
+ return dev;
+}
+
+/**
+ * return the last error message
+ */
+static char *css_error(dvd_input_t dev)
+{
+ return DVDcss_error(dev->dvdcss);
+}
+
+/**
+ * seek into the device.
+ */
+static int css_seek(dvd_input_t dev, int blocks)
+{
+ /* DVDINPUT_NOFLAGS should match the DVDCSS_NOFLAGS value. */
+ return DVDcss_seek(dev->dvdcss, blocks, DVDINPUT_NOFLAGS);
+}
+
+/**
+ * set the block for the begining of a new title (key).
+ */
+static int css_title(dvd_input_t dev, int block)
+{
+ return DVDcss_title(dev->dvdcss, block);
+}
+
+/**
+ * read data from the device.
+ */
+static int css_read(dvd_input_t dev, void *buffer, int blocks, int flags=
)
+{
+ return DVDcss_read(dev->dvdcss, buffer, blocks, flags);
+}
+
+/**
+ * close the DVD device and clean up the library.
+ */
+static int css_close(dvd_input_t dev)
+{
+ int ret;
+
+ ret =3D DVDcss_close(dev->dvdcss);
+
+ if(ret < 0)
+ return ret;
+
+ free(dev);
+
+ return 0;
+}
+
+/* Need to use O_BINARY for WIN32 */
+#ifndef O_BINARY
+#ifdef _O_BINARY
+#define O_BINARY _O_BINARY
+#else
+#define O_BINARY 0
+#endif
+#endif
+
+/**
+ * initialize and open a DVD device or file.
+ */
+static dvd_input_t file_open(const char *target)
+{
+ dvd_input_t dev;
+ char *use_odirect;
+ int oflags;
+ =20
+ oflags =3D O_RDONLY | O_BINARY;
+ use_odirect =3D getenv("DVDREAD_USE_DIRECT");
+ if(use_odirect) {
+#ifndef O_DIRECT
+#define O_DIRECT 0
+#endif
+ oflags |=3D O_DIRECT;
+ }
+ /* Allocate the library structure */
+ dev =3D (dvd_input_t) malloc(sizeof(struct dvd_input_s));
+ if(dev =3D=3D NULL) {
+ return NULL;
+ }
+ =20
+ /* Open the device */
+ dev->fd =3D open(target, oflags);
+ if(dev->fd < 0) {
+ free(dev);
+ return NULL;
+ }
+ =20
+ return dev;
+}
+
+/**
+ * return the last error message
+ */
+static char *file_error(dvd_input_t dev)
+{
+ /* use strerror(errno)? */
+ return (char *)"unknown error";
+}
+
+/**
+ * seek into the device.
+ */
+static int file_seek(dvd_input_t dev, int blocks)
+{
+ off_t pos =3D (off_t)blocks * (off_t)DVD_VIDEO_LB_LEN;
+
+ pos =3D lseek(dev->fd, pos, SEEK_SET);
+ if(pos < 0) {
+ return pos;
+ }
+ /* assert pos % DVD_VIDEO_LB_LEN =3D=3D 0 */
+ return (int) (pos / DVD_VIDEO_LB_LEN);
+}
+
+/**
+ * set the block for the begining of a new title (key).
+ */
+static int file_title(dvd_input_t dev, int block)
+{
+ return -1;
+}
+
+/**
+ * read data from the device.
+ */
+static int file_read(dvd_input_t dev, void *buffer, int blocks, int flag=
s)
+{
+ size_t len;
+ ssize_t ret;
+ unsigned char *buf =3D buffer;
+
+ len =3D (size_t)blocks * DVD_VIDEO_LB_LEN;
+ =20
+ while(len > 0) {
+ =20
+ ret =3D read(dev->fd, buf, len);
+ =20
+ if(ret < 0) {
+ /* One of the reads failed, too bad. We won't even bother
+ * returning the reads that went ok, and as in the posix spec
+ * the file postition is left unspecified after a failure. */
+ return ret;
+ }
+ =20
+ if(ret =3D=3D 0) {
+ /* Nothing more to read. Return the whole blocks, if any, that we=
got.
+ and adjust the file possition back to the previous block bounda=
ry. */
+ size_t bytes =3D (size_t)blocks * DVD_VIDEO_LB_LEN - len;
+ off_t over_read =3D -(off_t)(bytes % DVD_VIDEO_LB_LEN);
+ /*off_t pos =3D*/ lseek(dev->fd, over_read, SEEK_CUR);
+ /* should have pos % 2048 =3D=3D 0 */
+ return (int) (bytes / DVD_VIDEO_LB_LEN);
+ }
+ =20
+ buf+=3Dret;
+ len -=3D ret;
+ }
+
+ return blocks;
+}
+
+/**
+ * close the DVD device and clean up.
+ */
+static int file_close(dvd_input_t dev)
+{
+ int ret;
+
+ ret =3D close(dev->fd);
+
+ if(ret < 0)
+ return ret;
+
+ free(dev);
+
+ return 0;
+}
+
+
+static void *dvdcss_library =3D NULL;
+static int dvdcss_library_init =3D 0;
+
+/**
+ * Free any objects allocated by dvdinput_setup.
+ * Should only be called when libdvdread is not to be used any more.
+ * Closes dlopened libraries.
+ */
+void dvdinput_free(void)
+{
+#ifdef HAVE_DVDCSS_DVDCSS_H
+ /* linked statically, nothing to free */
+ return;
+#else
+ if(dvdcss_library) {
+ dlclose(dvdcss_library);
+ dvdcss_library =3D NULL;
+ }
+ dvdcss_library_init =3D 0;
+ return;
+#endif
+}
+
+
+/**
+ * Setup read functions with either libdvdcss or minimal DVD access.
+ */
+int dvdinput_setup(void)
+{
+ char **dvdcss_version =3D NULL;
+ int verbose;
+
+ /* dlopening libdvdcss */
+ if(dvdcss_library_init) {
+ /* libdvdcss is already dlopened, function ptrs set */
+ if(dvdcss_library) {
+ return 1; /* css available */
+ } else {
+ return 0; /* css not available */
+ }
+ }
+
+ verbose =3D get_verbose();
+ =20
+#ifdef HAVE_DVDCSS_DVDCSS_H
+ /* linking to libdvdcss */
+ dvdcss_library =3D &dvdcss_library; /* Give it some value !=3D NULL *=
/
+ /* the DVDcss_* functions have been #defined at the top */
+ dvdcss_version =3D &dvdcss_interface_2;
+
+#else
+#if defined(WIN32) || defined(WIN64)
+ dvdcss_library =3D LoadLibraryA("libdvdcss.dll");
+#else
+ dvdcss_library =3D dlopen("libdvdcss.so.2", RTLD_LAZY);
+#endif
+
+ if(dvdcss_library !=3D NULL) {
+#if defined(__OpenBSD__) && !defined(__ELF__)
+#define U_S "_"
+#else
+#define U_S
+#endif
+ DVDcss_open =3D (dvdcss_handle (*)(const char*))
+ dlsym(dvdcss_library, U_S "dvdcss_open");
+ DVDcss_close =3D (int (*)(dvdcss_handle))
+ dlsym(dvdcss_library, U_S "dvdcss_close");
+ DVDcss_title =3D (int (*)(dvdcss_handle, int))
+ dlsym(dvdcss_library, U_S "dvdcss_title");
+ DVDcss_seek =3D (int (*)(dvdcss_handle, int, int))
+ dlsym(dvdcss_library, U_S "dvdcss_seek");
+ DVDcss_read =3D (int (*)(dvdcss_handle, void*, int, int))
+ dlsym(dvdcss_library, U_S "dvdcss_read");
+ DVDcss_error =3D (char* (*)(dvdcss_handle))
+ dlsym(dvdcss_library, U_S "dvdcss_error");
+ =20
+ dvdcss_version =3D (char **)dlsym(dvdcss_library, U_S "dvdcss_interf=
ace_2");
+
+ if(dlsym(dvdcss_library, U_S "dvdcss_crack")) {
+ if(verbose >=3D 0) {
+ fprintf(stderr,=20
+ "libdvdread: Old (pre-0.0.2) version of libdvdcss found.=
\n"
+ "libdvdread: You should get the latest version from "
+ "http://www.videolan.org/\n" );
+ }
+ dlclose(dvdcss_library);
+ dvdcss_library =3D NULL;
+ } else if(!DVDcss_open || !DVDcss_close || !DVDcss_title || !DVDcss=
_seek
+ || !DVDcss_read || !DVDcss_error || !dvdcss_version) {
+ if(verbose >=3D 0) {
+ fprintf(stderr, "libdvdread: Missing symbols in libdvdcss.so.2,=
"
+ "this shouldn't happen !\n");
+ }
+ dlclose(dvdcss_library);
+ dvdcss_library =3D NULL;
+ }
+ }
+#endif /* HAVE_DVDCSS_DVDCSS_H */
+
+ dvdcss_library_init =3D 1;
+ =20
+ if(dvdcss_library) {
+ /*
+ char *psz_method =3D getenv( "DVDCSS_METHOD" );
+ char *psz_verbose =3D getenv( "DVDCSS_VERBOSE" );
+ fprintf(stderr, "DVDCSS_METHOD %s\n", psz_method);
+ fprintf(stderr, "DVDCSS_VERBOSE %s\n", psz_verbose);
+ */
+ if(verbose >=3D 1) {
+ fprintf(stderr, "libdvdread: Using libdvdcss version %s for DVD ac=
cess\n",
+ *dvdcss_version);
+ }
+ /* libdvdcss wrapper functions */
+ dvdinput_open =3D css_open;
+ dvdinput_close =3D css_close;
+ dvdinput_seek =3D css_seek;
+ dvdinput_title =3D css_title;
+ dvdinput_read =3D css_read;
+ dvdinput_error =3D css_error;
+ return 1;
+ =20
+ } else {
+ if(verbose >=3D 1) {
+ fprintf(stderr, "libdvdread: Encrypted DVD support unavailable.\n"=
);
+ }
+ /* libdvdcss replacement functions */
+ dvdinput_open =3D file_open;
+ dvdinput_close =3D file_close;
+ dvdinput_seek =3D file_seek;
+ dvdinput_title =3D file_title;
+ dvdinput_read =3D file_read;
+ dvdinput_error =3D file_error;
+ return 0;
+ }
+}
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_input.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_input.h 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_input.h 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,55 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef DVD_INPUT_H_INCLUDED
+#define DVD_INPUT_H_INCLUDED
+
+/*
+ * Copyright (C) 2001, 2002 Samuel Hocevar <sam at zoy.org>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *=20
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU 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=
.
+ */
+
+/**
+ * Defines and flags. Make sure they fit the libdvdcss API!
+ */
+#define DVDINPUT_NOFLAGS 0
+
+#define DVDINPUT_READ_DECRYPT (1 << 0)
+
+typedef struct dvd_input_s *dvd_input_t;
+
+/**
+ * Pointers which will be filled either the input methods functions.
+ */
+extern dvd_input_t (*dvdinput_open) (const char *);
+extern int (*dvdinput_close) (dvd_input_t);
+extern int (*dvdinput_seek) (dvd_input_t, int);
+extern int (*dvdinput_title) (dvd_input_t, int);=20
+extern int (*dvdinput_read) (dvd_input_t, void *, int, int);
+extern char * (*dvdinput_error) (dvd_input_t);
+
+/**
+ * Free any objects allocated by dvdinput_setup.
+ * Should only be called when libdvdread is not to be used any more.
+ * Closes dlopened libraries.
+ */
+void dvdinput_free(void);
+
+/**
+ * Setup function accessed by dvd_reader.c. Returns 1 if there is CSS s=
upport.
+ */
+int dvdinput_setup(void);
+
+#endif /* DVD_INPUT_H_INCLUDED */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_reader.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_reader.c 2007-03-10 =
21:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_reader.c 2007-03-10 =
21:41:34 UTC (rev 1290)
@@ -0,0 +1,1622 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (C) 2001, 2002, 2003 Billy Biggs <vektor at dumbterm.net>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.=
se>,
+ * Bj=F6rn Englund <d4bjorn at dtek.chalmers=
.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU 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=
.
+ */
+
+#include "config.h"
+
+#if defined(WIN32) || defined(WIN64)
+#include "posix.h"
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#if !defined(WIN32) && !defined(WIN64)
+#include <sys/time.h> /* For the timing of dvdcss_title crack. */
+#endif
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <limits.h>
+#include <dirent.h>
+=20
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) =
|| defined(__bsdi__) || defined(__DARWIN__) || defined(__DragonFly__)
+#define SYS_BSD 1
+#endif
+
+#if defined(__sun)
+#include <sys/mnttab.h>
+#elif defined(SYS_BSD)
+#include <fstab.h>
+#elif defined(__linux__)
+#include <mntent.h>
+#endif
+
+#include "dvd_reader.h"
+#include "dvd_input.h"
+#include "dvd_udf.h"
+#include "md5.h"
+
+#include "dvdread_internal.h"
+
+#define DEFAULT_UDF_CACHE_LEVEL 1
+
+struct dvd_reader_s {
+ /* Basic information. */
+ int isImageFile;
+ =20
+ /* Hack for keeping track of the css status.=20
+ * 0: no css, 1: perhaps (need init of keys), 2: have done init */
+ int css_state;
+ int css_title; /* Last title that we have called dvdinpute_title for. =
*/
+
+ /* Information required for an image file. */
+ dvd_input_t dev;
+
+ /* Information required for a directory path drive. */
+ char *path_root;
+ =20
+ /* Filesystem cache */
+ int udfcache_level; /* 0 - turned off, 1 - on */
+ void *udfcache;
+
+ /* block aligned malloc */
+ void *align;
+ =20
+ /* error message verbosity level */
+ int verbose;
+};
+
+struct dvd_file_s {
+ /* Basic information. */
+ dvd_reader_t *dvd;
+ =20
+ /* Hack for selecting the right css title. */
+ int css_title;
+
+ /* Information required for an image file. */
+ uint32_t lb_start;
+ uint32_t seek_pos;
+
+ /* Information required for a directory path drive. */
+ size_t title_sizes[ 9 ];
+ dvd_input_t title_devs[ 9 ];
+
+ /* Calculated at open-time, size in blocks. */
+ ssize_t filesize;
+};
+
+
+#define DVDREAD_VERBOSE_DEFAULT 0
+
+int get_verbose(void)
+{
+ char *dvdread_verbose;
+ int verbose;
+ =20
+ dvdread_verbose =3D getenv("DVDREAD_VERBOSE");
+ if(dvdread_verbose) {
+ verbose =3D (int)strtol(dvdread_verbose, NULL, 0);
+ } else {
+ verbose =3D DVDREAD_VERBOSE_DEFAULT;
+ }
+ return verbose;
+}
+
+int dvdread_verbose(dvd_reader_t *dvd)
+{
+ return dvd->verbose;
+}
+
+dvd_reader_t *device_of_file(dvd_file_t *file)
+{
+ return file->dvd;
+}
+
+/**
+ * Returns the compiled version. (DVDREAD_VERSION as an int)
+ */
+int DVDVersion(void)
+{
+ return DVDREAD_VERSION;
+}
+
+
+/**
+ * Set the level of caching on udf
+ * level =3D 0 (no caching)
+ * level =3D 1 (caching filesystem info)
+ */
+int DVDUDFCacheLevel(dvd_reader_t *device, int level)
+{
+ struct dvd_reader_s *dev =3D (struct dvd_reader_s *)device;
+ =20
+ if(level > 0) {
+ level =3D 1;
+ } else if(level < 0) {
+ return dev->udfcache_level;
+ }
+
+ dev->udfcache_level =3D level;
+ =20
+ return level;
+}
+
+void *GetUDFCacheHandle(dvd_reader_t *device)
+{
+ struct dvd_reader_s *dev =3D (struct dvd_reader_s *)device;
+ =20
+ return dev->udfcache;
+}
+
+void SetUDFCacheHandle(dvd_reader_t *device, void *cache)
+{
+ struct dvd_reader_s *dev =3D (struct dvd_reader_s *)device;
+
+ dev->udfcache =3D cache;
+}
+
+void *GetAlignHandle(dvd_reader_t *device)
+{
+ struct dvd_reader_s *dev =3D (struct dvd_reader_s *)device;
+ =20
+ return dev->align;
+}
+
+void SetAlignHandle(dvd_reader_t *device, void *align)
+{
+ struct dvd_reader_s *dev =3D (struct dvd_reader_s *)device;
+
+ dev->align =3D align;
+}
+
+#if defined(WIN32) || defined(WIN64) /* replacement gettimeofday impleme=
ntation */
+#include <sys/timeb.h>
+#include <winsock.h> // for timeval
+static int gettimeofday( struct timeval *tv, void *tz )
+{
+ struct timeb t;
+ ftime( &t );
+ tv->tv_sec =3D (long)t.time;
+ tv->tv_usec =3D t.millitm * 1000;
+ return 0;
+}
+#endif
+
+
+/* Loop over all titles and call dvdcss_title to crack the keys. */
+static int initAllCSSKeys( dvd_reader_t *dvd )
+{
+ struct timeval all_s, all_e;
+ struct timeval t_s, t_e;
+ char filename[ MAX_UDF_FILE_NAME_LEN ];
+ uint32_t start, len;
+ int title;
+ =20
+ char *nokeys_str =3D getenv("DVDREAD_NOKEYS");
+ if(nokeys_str !=3D NULL)
+ return 0;
+ =20
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "\n" );
+ fprintf( stderr, "libdvdread: Attempting to retrieve all CSS keys\n"=
);
+ fprintf( stderr, "libdvdread: This can take a _long_ time, "
+ "please be patient\n\n" );
+ }
+ gettimeofday(&all_s, NULL);
+ =20
+ for( title =3D 0; title < 100; title++ ) {
+ gettimeofday( &t_s, NULL );
+ if( title =3D=3D 0 ) {
+ sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
+ } else {
+ sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 0 );
+ }
+ start =3D UDFFindFile( dvd, filename, &len );
+ if( start !=3D 0 && len !=3D 0 ) {
+ /* Perform CSS key cracking for this title. */
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Get key for %s at 0x%08x\n",=20
+ filename, start );
+ }
+ if( dvdinput_title( dvd->dev, (int)start ) < 0 ) {
+ if(dvd->verbose >=3D 0) {
+ fprintf( stderr, "libdvdread: Error cracking CSS key for %s (0=
x%08x)\n", filename, start);
+ }
+ }
+ gettimeofday( &t_e, NULL );
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Elapsed time %ld\n", =20
+ (long int) t_e.tv_sec - t_s.tv_sec );
+ }
+ }
+ =20
+ if( title =3D=3D 0 ) continue;
+ =20
+ gettimeofday( &t_s, NULL );
+ sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 1 );
+ start =3D UDFFindFile( dvd, filename, &len );
+ if( start =3D=3D 0 || len =3D=3D 0 ) break;
+ =20
+ /* Perform CSS key cracking for this title. */
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Get key for %s at 0x%08x\n",=20
+ filename, start );
+ }
+ if( dvdinput_title( dvd->dev, (int)start ) < 0 ) {
+ if(dvd->verbose >=3D 0) {
+ fprintf( stderr, "libdvdread: Error cracking CSS key for %s (0x%=
08x)!!\n", filename, start);
+ }
+ }
+ gettimeofday( &t_e, NULL );
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Elapsed time %ld\n", =20
+ (long int) t_e.tv_sec - t_s.tv_sec );
+ }
+ }
+ title--;
+ =20
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Found %d VTS's\n", title );
+ }
+ gettimeofday(&all_e, NULL);
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Elapsed time %ld\n", =20
+ (long int) all_e.tv_sec - all_s.tv_sec );
+ }
+ return 0;
+}
+
+
+
+/**
+ * Open a DVD image or block device file.
+ * Checks if the root directory in the udf image file can be found.
+ * If not it assumes this isn't a valid udf image and returns NULL
+ */
+static dvd_reader_t *DVDOpenImageFile( const char *location, int have_cs=
s )
+{
+ dvd_reader_t *dvd;
+ dvd_input_t dev;
+ int verbose;
+
+ verbose =3D get_verbose();
+
+ dev =3D dvdinput_open( location );
+ if( !dev ) {
+ if(verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Can't open '%s' for reading: %s\n",
+ location, strerror(errno));
+ }
+ return NULL;
+ }
+
+ dvd =3D (dvd_reader_t *) malloc( sizeof( dvd_reader_t ) );
+ if( !dvd ) {
+ int tmp_errno =3D errno;
+ dvdinput_close(dev);
+ errno =3D tmp_errno;
+ return NULL;
+ }
+ dvd->verbose =3D verbose;
+ dvd->isImageFile =3D 1;
+ dvd->dev =3D dev;
+ dvd->path_root =3D NULL;
+ =20
+ dvd->udfcache_level =3D DEFAULT_UDF_CACHE_LEVEL;
+ dvd->udfcache =3D NULL;
+
+ dvd->align =3D NULL;
+
+ if( have_css ) {
+ /* Only if DVDCSS_METHOD =3D title, a bit if it's disc or if
+ * DVDCSS_METHOD =3D key but region missmatch. Unfortunaly we
+ * don't have that information. */
+ =20
+ dvd->css_state =3D 1; /* Need key init. */
+ }
+ dvd->css_title =3D 0;
+ =20
+ /* sanity check, is it a valid UDF image, can we find the root dir */
+ if(!UDFFindFile(dvd, "/", NULL)) {
+ dvdinput_close(dvd->dev);
+ if(dvd->udfcache) {
+ FreeUDFCache(dvd, dvd->udfcache);
+ }
+ if(dvd->align) {
+ if(dvd->verbose >=3D 0) {
+ fprintf(stderr, "libdvdread: DVDOpenImageFile(): Memory leak in =
align functions 1\n");
+ }
+ }
+ free(dvd);
+ return NULL;
+ }
+ return dvd;
+}
+
+static dvd_reader_t *DVDOpenPath( const char *path_root )
+{
+ dvd_reader_t *dvd;
+
+ dvd =3D (dvd_reader_t *) malloc( sizeof( dvd_reader_t ) );
+ if( !dvd ) {
+ return NULL;
+ }
+ dvd->verbose =3D get_verbose();
+ dvd->isImageFile =3D 0;
+ dvd->dev =3D 0;
+ dvd->path_root =3D strdup( path_root );
+ if(!dvd->path_root) {
+ free(dvd);
+ return 0;
+ }
+ dvd->udfcache_level =3D DEFAULT_UDF_CACHE_LEVEL;
+ dvd->udfcache =3D NULL;
+
+ dvd->align =3D NULL;
+
+ dvd->css_state =3D 0; /* Only used in the UDF path */
+ dvd->css_title =3D 0; /* Only matters in the UDF path */
+
+ return dvd;
+}
+
+#if defined(__sun)
+/* /dev/rdsk/c0t6d0s0 (link to /devices/...)
+ /vol/dev/rdsk/c0t6d0/??
+ /vol/rdsk/<name> */
+static char *sun_block2char( const char *path )
+{
+ char *new_path;
+
+ /* Must contain "/dsk/" */=20
+ if( !strstr( path, "/dsk/" ) ) return (char *) strdup( path );
+
+ /* Replace "/dsk/" with "/rdsk/" */
+ new_path =3D malloc( strlen(path) + 2 );
+ strcpy( new_path, path );
+ strcpy( strstr( new_path, "/dsk/" ), "" );
+ strcat( new_path, "/rdsk/" );
+ strcat( new_path, strstr( path, "/dsk/" ) + strlen( "/dsk/" ) );
+
+ return new_path;
+}
+#endif
+
+#if defined(SYS_BSD)
+/* FreeBSD /dev/(r)(a)cd0c (a is for atapi), recomended to _not_ use r
+ update: FreeBSD and DragonFly no longer uses the prefix so don't add =
it.
+
+ OpenBSD /dev/rcd0c, it needs to be the raw device
+ NetBSD /dev/rcd0[d|c|..] d for x86, c (for non x86), perhaps others
+ Darwin /dev/rdisk0, it needs to be the raw device
+ BSD/OS /dev/sr0c (if not mounted) or /dev/rsr0c ('c' any letter will=
do)
+ =20
+ returns a string allocated with strdup which should be free()'d when
+ no longer used.
+*/
+static char *bsd_block2char( const char *path )
+{
+#if defined(__FreeBSD__) || defined(__DragonFly__)
+ return (char *) strdup( path );
+#else
+ char *new_path;
+
+ /* If it doesn't start with "/dev/" or does start with "/dev/r" exit *=
/=20
+ if( strncmp( path, "/dev/", 5 ) || !strncmp( path, "/dev/r", 6 ) )=20
+ return (char *) strdup( path );
+
+ /* Replace "/dev/" with "/dev/r" */
+ new_path =3D malloc( strlen(path) + 2 );
+ strcpy( new_path, "/dev/r" );
+ strcat( new_path, path + strlen( "/dev/" ) );
+
+ return new_path;
+#endif /* __FreeBSD__ || __DragonFly__ */
+}
+#endif
+
+
+dvd_reader_t *DVDOpen( const char *path )
+{
+ struct stat fileinfo;
+ int ret, have_css;
+ char *dev_name =3D NULL;
+ int internal_errno =3D 0;
+ int verbose;
+
+ if( path =3D=3D NULL ) {
+ errno =3D EINVAL;
+ return NULL;
+ }
+ =20
+ verbose =3D get_verbose();
+
+#if defined(WIN32) || defined(WIN64)
+ /* Stat doesn't work on devices under mingwin/cygwin. */
+ //if( path[0] && path[1] =3D=3D ':' && path[2] =3D=3D '\0' )
+ // {
+ // /* Don't try to stat the file */
+ // fileinfo.st_mode =3D S_IFBLK;
+ // }
+ //else
+#endif
+ {
+ ret =3D stat( path, &fileinfo );
+ if( ret < 0 ) {
+ int tmp_errno =3D errno;
+ /* If we can't stat the file, give up */
+ if(verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Can't stat '%s': %s\n",
+ path, strerror(errno));
+ }
+ errno =3D tmp_errno;
+ return NULL;
+ }
+ }
+
+ /* Try to open libdvdcss or fall back to standard functions */
+ have_css =3D dvdinput_setup();
+
+ /* First check if this is a block/char device or a file*/
+ if( S_ISBLK( fileinfo.st_mode ) ||=20
+ S_ISCHR( fileinfo.st_mode ) ||=20
+ S_ISREG( fileinfo.st_mode ) ) {
+ /**
+ * Block devices and regular files are assumed to be DVD-Video image=
s.
+ */
+ dvd_reader_t *dvd =3D NULL;
+#if defined(__sun)
+ dev_name =3D sun_block2char( path );
+#elif defined(SYS_BSD)
+ dev_name =3D bsd_block2char( path );
+#else
+ dev_name =3D strdup( path );
+#endif
+ dvd =3D DVDOpenImageFile( dev_name, have_css );
+ free( dev_name );
+ =20
+ return dvd;
+ } else if( S_ISDIR( fileinfo.st_mode ) ) {
+ dvd_reader_t *auth_drive =3D 0;
+ char *path_copy;
+#if defined(SYS_BSD)
+ struct fstab* fe;
+#elif defined(__sun) || defined(__linux__)
+ FILE *mntfile;
+#endif
+
+ /* XXX: We should scream real loud here. */
+ if( !(path_copy =3D strdup( path ) ) ) return 0;
+
+#if !defined(WIN32) && !defined(WIN64) /* don't have fchdir, and getcwd(=
NULL, ... ) is strange */
+ /* Resolve any symlinks and get the absolut dir name. */
+ {
+ char *new_path;
+ char *current_path;
+
+ current_path =3D malloc(PATH_MAX);
+ if(current_path) {
+ if(!getcwd(current_path, PATH_MAX)) {
+ free(current_path);
+ current_path =3D NULL;
+ }
+ }
+ if(current_path) {
+ chdir( path_copy );
+ new_path =3D malloc(PATH_MAX);
+ if(new_path) {
+ if(!getcwd(new_path, PATH_MAX )) {
+ free(new_path);
+ new_path =3D NULL;
+ }
+ }
+
+ chdir(current_path);
+ free(current_path);
+ if( new_path ) {
+ free( path_copy );
+ path_copy =3D new_path;
+ }
+ }
+ }
+#endif
+ =20
+ /**
+ * If we're being asked to open a directory, check if that directory
+ * is the mountpoint for a DVD-ROM which we can use instead.
+ */
+
+ if( strlen( path_copy ) > 1 ) {
+ if( path_copy[ strlen( path_copy ) - 1 ] =3D=3D '/' ) {
+ path_copy[ strlen( path_copy ) - 1 ] =3D '\0';
+ }
+ }
+
+ if( strlen( path_copy ) >=3D 9 ) {
+ if( !strcasecmp( &(path_copy[ strlen( path_copy ) - 9 ]),=20
+ "/video_ts" ) ) {
+ path_copy[ strlen( path_copy ) - 9 ] =3D '\0';
+ if(path_copy[0] =3D=3D '\0') {
+ path_copy[0] =3D '/';
+ path_copy[1] =3D '\0';
+ }
+ }
+ }
+
+#if defined(SYS_BSD)
+ if( ( fe =3D getfsfile( path_copy ) ) ) {
+ dev_name =3D bsd_block2char( fe->fs_spec );
+ if(verbose >=3D 1) {
+ fprintf( stderr,
+ "libdvdread: Attempting to use device %s"
+ " mounted on %s%s\n",
+ dev_name,
+ fe->fs_file,
+ have_css ? " for CSS authentication" : "");
+ }
+ auth_drive =3D DVDOpenImageFile( dev_name, have_css );
+ if(!auth_drive) {
+ internal_errno =3D errno;
+ }
+ }
+#elif defined(__sun)
+ mntfile =3D fopen( MNTTAB, "r" );
+ if( mntfile ) {
+ struct mnttab mp;
+ int res;
+ =20
+ while( ( res =3D getmntent( mntfile, &mp ) ) !=3D -1 ) {
+ if( res =3D=3D 0 && !strcmp( mp.mnt_mountp, path_copy ) ) {
+ dev_name =3D sun_block2char( mp.mnt_special );
+ if(verbose >=3D 1) {
+ fprintf( stderr,=20
+ "libdvdread: Attempting to use device %s"
+ " mounted on %s%s\n",
+ dev_name,
+ mp.mnt_mountp,
+ have_css ? " for CSS authentication" : "");
+ }
+ auth_drive =3D DVDOpenImageFile( dev_name, have_css );
+ if(!auth_drive) {
+ internal_errno =3D errno;
+ }
+ break;
+ }
+ }
+ fclose( mntfile );
+ }
+#elif defined(__linux__)
+ mntfile =3D fopen( MOUNTED, "r" );
+ if( mntfile ) {
+ struct mntent *me;
+=20
+ while( ( me =3D getmntent( mntfile ) ) ) {
+ if( !strcmp( me->mnt_dir, path_copy ) ) {
+ if(verbose >=3D 1) {
+ fprintf( stderr,=20
+ "libdvdread: Attempting to use device %s"
+ " mounted on %s%s\n",
+ me->mnt_fsname,
+ me->mnt_dir,
+ have_css ? " for CSS authentication" : "");
+ }
+ auth_drive =3D DVDOpenImageFile( me->mnt_fsname, have_css );
+ if(!auth_drive) {
+ internal_errno =3D errno;
+ }
+ dev_name =3D strdup(me->mnt_fsname);
+ break;
+ }
+ }
+ fclose( mntfile );
+ }
+#endif
+ if( !dev_name ) {
+ if(verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Couldn't find device name.\n" );
+ }
+ } else if( !auth_drive ) {
+ if(verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Device %s inaccessible%s: %s\n",
+ dev_name,
+ have_css ? ", CSS authentication not available" : "",
+ strerror(internal_errno));
+ }
+ }
+
+ free( dev_name );
+ free( path_copy );
+
+ /**
+ * If we've opened a drive, just use that.
+ */
+ if( auth_drive ) {
+ return auth_drive;
+ }
+ /**
+ * Otherwise, we now try to open the directory tree instead.
+ */
+ return DVDOpenPath( path );
+ }
+
+ /* If it's none of the above, screw it. */
+ if(verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Could not open %s\n", path );
+ }
+ return 0;
+}
+
+void DVDClose( dvd_reader_t *dvd )
+{
+ if( dvd ) {
+ if( dvd->dev ) dvdinput_close( dvd->dev );
+ if( dvd->path_root ) free( dvd->path_root );
+ if( dvd->udfcache ) FreeUDFCache( dvd, dvd->udfcache );
+ if(dvd->align) {
+ if(dvd->verbose >=3D 0) {
+ fprintf(stderr, "libdvdread: DVDClose(): Memory leak in align fu=
nctions\n");
+ }
+ }
+
+ free( dvd );
+ }
+}
+
+void DVDInit(void)
+{
+ dvdinput_setup();
+}
+
+void DVDFinish(void)
+{
+ dvdinput_free();
+}
+
+/**
+ * Open an unencrypted file on a DVD image file.
+ */
+static dvd_file_t *DVDOpenFileUDF( dvd_reader_t *dvd, char *filename )
+{
+ uint32_t start, len;
+ dvd_file_t *dvd_file;
+
+ start =3D UDFFindFile( dvd, filename, &len );
+ if( !start ) return 0;
+
+ dvd_file =3D (dvd_file_t *) malloc( sizeof( dvd_file_t ) );
+ if( !dvd_file ) return 0;
+ dvd_file->dvd =3D dvd;
+ dvd_file->lb_start =3D start;
+ dvd_file->seek_pos =3D 0;
+ memset( dvd_file->title_sizes, 0, sizeof( dvd_file->title_sizes ) );
+ memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) );
+ dvd_file->filesize =3D len / DVD_VIDEO_LB_LEN;
+
+ return dvd_file;
+}
+
+/**
+ * Searches for <file> in directory <path>, ignoring case.
+ * Returns 0 and full filename in <filename>.
+ * or -1 on file not found.
+ * or -2 on path not found.
+ */
+static int findDirFile( const char *path, const char *file, char *filena=
me )=20
+{
+ DIR *dir;
+ struct dirent *ent;
+
+ dir =3D opendir( path );
+ if( !dir ) return -2;
+
+ while( ( ent =3D readdir( dir ) ) !=3D NULL ) {
+ if( !strcasecmp( ent->d_name, file ) ) {
+ sprintf( filename, "%s%s%s", path,
+ ( ( path[ strlen( path ) - 1 ] =3D=3D '/' ) ? "" : "/" ),
+ ent->d_name );
+ closedir(dir);
+ return 0;
+ }
+ }
+ closedir(dir);
+ return -1;
+}
+
+static int findDVDFile( dvd_reader_t *dvd, const char *file, char *filen=
ame )
+{
+ char video_path[ PATH_MAX + 1 ];
+ const char *nodirfile;
+ int ret;
+
+ /* Strip off the directory for our search */
+ if( !strncasecmp( "/VIDEO_TS/", file, 10 ) ) {
+ nodirfile =3D &(file[ 10 ]);
+ } else {
+ nodirfile =3D file;
+ }
+
+ ret =3D findDirFile( dvd->path_root, nodirfile, filename );
+ if( ret < 0 ) {
+ /* Try also with adding the path, just in case. */
+ sprintf( video_path, "%s/VIDEO_TS/", dvd->path_root );
+ ret =3D findDirFile( video_path, nodirfile, filename );
+ if( ret < 0 ) {
+ /* Try with the path, but in lower case. */
+ sprintf( video_path, "%s/video_ts/", dvd->path_root );
+ ret =3D findDirFile( video_path, nodirfile, filename );
+ if( ret < 0 ) {
+ return 0;
+ }
+ }
+ }
+
+ return 1;
+}
+
+/**
+ * Open an unencrypted file from a DVD directory tree.
+ */
+static dvd_file_t *DVDOpenFilePath( dvd_reader_t *dvd, char *filename )
+{
+ char full_path[ PATH_MAX + 1 ];
+ dvd_file_t *dvd_file;
+ struct stat fileinfo;
+ dvd_input_t dev;
+
+ /* Get the full path of the file. */
+ if( !findDVDFile( dvd, filename, full_path ) ) return 0;
+
+ dev =3D dvdinput_open( full_path );
+ if( !dev ) return 0;
+
+ dvd_file =3D (dvd_file_t *) malloc( sizeof( dvd_file_t ) );
+ if( !dvd_file ) return 0;
+ dvd_file->dvd =3D dvd;
+ dvd_file->lb_start =3D 0;
+ dvd_file->seek_pos =3D 0;
+ memset( dvd_file->title_sizes, 0, sizeof( dvd_file->title_sizes ) );
+ memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) );
+ dvd_file->filesize =3D 0;
+
+ if( stat( full_path, &fileinfo ) < 0 ) {
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
+ }
+ free( dvd_file );
+ return 0;
+ }
+ dvd_file->title_sizes[ 0 ] =3D fileinfo.st_size / DVD_VIDEO_LB_LEN;
+ dvd_file->title_devs[ 0 ] =3D dev;
+ dvd_file->filesize =3D dvd_file->title_sizes[ 0 ];
+
+ return dvd_file;
+}
+
+static dvd_file_t *DVDOpenVOBUDF( dvd_reader_t *dvd, int title, int menu=
)
+{
+ char filename[ MAX_UDF_FILE_NAME_LEN ];
+ uint32_t start, len;
+ dvd_file_t *dvd_file;
+
+ if( title =3D=3D 0 ) {
+ sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
+ } else {
+ sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 =
);
+ }
+ start =3D UDFFindFile( dvd, filename, &len );
+ if( start =3D=3D 0 ) return 0;
+
+ dvd_file =3D (dvd_file_t *) malloc( sizeof( dvd_file_t ) );
+ if( !dvd_file ) return 0;
+ dvd_file->dvd =3D dvd;
+ /*Hack*/ dvd_file->css_title =3D title << 1 | menu;
+ dvd_file->lb_start =3D start;
+ dvd_file->seek_pos =3D 0;
+ memset( dvd_file->title_sizes, 0, sizeof( dvd_file->title_sizes ) );
+ memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) );
+ dvd_file->filesize =3D len / DVD_VIDEO_LB_LEN;
+
+ /* Calculate the complete file size for every file in the VOBS */
+ if( !menu ) {
+ int cur;
+
+ for( cur =3D 2; cur < 10; cur++ ) {
+ sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur );
+ if( !UDFFindFile( dvd, filename, &len ) ) break;
+ dvd_file->filesize +=3D len / DVD_VIDEO_LB_LEN;
+ }
+ }
+ =20
+ if( dvd->css_state =3D=3D 1 /* Need key init */ ) {
+ initAllCSSKeys( dvd );
+ dvd->css_state =3D 2;
+ }
+ /* =20
+ if( dvdinput_title( dvd_file->dvd->dev, (int)start ) < 0 ) {
+ fprintf( stderr, "libdvdread: Error cracking CSS key for %s\n",
+ filename );
+ }
+ */
+ =20
+ return dvd_file;
+}
+
+static dvd_file_t *DVDOpenVOBPath( dvd_reader_t *dvd, int title, int men=
u )
+{
+ char filename[ MAX_UDF_FILE_NAME_LEN ];
+ char full_path[ PATH_MAX + 1 ];
+ struct stat fileinfo;
+ dvd_file_t *dvd_file;
+ int i;
+
+ dvd_file =3D (dvd_file_t *) malloc( sizeof( dvd_file_t ) );
+ if( !dvd_file ) return 0;
+ dvd_file->dvd =3D dvd;
+ /*Hack*/ dvd_file->css_title =3D title << 1 | menu;
+ dvd_file->lb_start =3D 0;
+ dvd_file->seek_pos =3D 0;
+ memset( dvd_file->title_sizes, 0, sizeof( dvd_file->title_sizes ) );
+ memset( dvd_file->title_devs, 0, sizeof( dvd_file->title_devs ) );
+ dvd_file->filesize =3D 0;
+ =20
+ if( menu ) {
+ dvd_input_t dev;
+
+ if( title =3D=3D 0 ) {
+ sprintf( filename, "VIDEO_TS.VOB" );
+ } else {
+ sprintf( filename, "VTS_%02i_0.VOB", title );
+ }
+ if( !findDVDFile( dvd, filename, full_path ) ) {
+ free( dvd_file );
+ return 0;
+ }
+
+ dev =3D dvdinput_open( full_path );
+ if( dev =3D=3D NULL ) {
+ free( dvd_file );
+ return 0;
+ }
+
+ if( stat( full_path, &fileinfo ) < 0 ) {
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
+ }
+ free( dvd_file );
+ return 0;
+ }
+ dvd_file->title_sizes[ 0 ] =3D fileinfo.st_size / DVD_VIDEO_LB_LEN;
+ dvd_file->title_devs[ 0 ] =3D dev;
+ dvdinput_title( dvd_file->title_devs[0], 0);
+ dvd_file->filesize =3D dvd_file->title_sizes[ 0 ];
+
+ } else {
+ for( i =3D 0; i < 9; ++i ) {
+
+ sprintf( filename, "VTS_%02i_%i.VOB", title, i + 1 );
+ if( !findDVDFile( dvd, filename, full_path ) ) {
+ break;
+ }
+
+ if( stat( full_path, &fileinfo ) < 0 ) {
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
+ }
+ break;
+ }
+
+ dvd_file->title_sizes[ i ] =3D fileinfo.st_size / DVD_VIDEO_LB_LEN=
;
+ dvd_file->title_devs[ i ] =3D dvdinput_open( full_path );
+ dvdinput_title( dvd_file->title_devs[ i ], 0 );
+ dvd_file->filesize +=3D dvd_file->title_sizes[ i ];
+ }
+ if( !dvd_file->title_devs[ 0 ] ) {
+ free( dvd_file );
+ return 0;
+ }
+ }
+
+ return dvd_file;
+}
+
+dvd_file_t *DVDOpenFile( dvd_reader_t *dvd, int titlenum,=20
+ dvd_read_domain_t domain )
+{
+ char filename[ MAX_UDF_FILE_NAME_LEN ];
+ =20
+ /* Check arguments. */
+ if( dvd =3D=3D NULL || titlenum < 0 ) {
+ errno =3D EINVAL;
+ return NULL;
+ }
+
+ switch( domain ) {
+ case DVD_READ_INFO_FILE:
+ if( titlenum =3D=3D 0 ) {
+ sprintf( filename, "/VIDEO_TS/VIDEO_TS.IFO" );
+ } else {
+ sprintf( filename, "/VIDEO_TS/VTS_%02i_0.IFO", titlenum );
+ }
+ break;
+ case DVD_READ_INFO_BACKUP_FILE:
+ if( titlenum =3D=3D 0 ) {
+ sprintf( filename, "/VIDEO_TS/VIDEO_TS.BUP" );
+ } else {
+ sprintf( filename, "/VIDEO_TS/VTS_%02i_0.BUP", titlenum );
+ }
+ break;
+ case DVD_READ_MENU_VOBS:
+ if( dvd->isImageFile ) {
+ return DVDOpenVOBUDF( dvd, titlenum, 1 );
+ } else {
+ return DVDOpenVOBPath( dvd, titlenum, 1 );
+ }
+ break;
+ case DVD_READ_TITLE_VOBS:
+ if( titlenum =3D=3D 0 ) return 0;
+ if( dvd->isImageFile ) {
+ return DVDOpenVOBUDF( dvd, titlenum, 0 );
+ } else {
+ return DVDOpenVOBPath( dvd, titlenum, 0 );
+ }
+ break;
+ default:
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Invalid domain for file open.\n" );
+ }
+ errno =3D EINVAL;
+ return NULL;
+ }
+ =20
+ if( dvd->isImageFile ) {
+ return DVDOpenFileUDF( dvd, filename );
+ } else {
+ return DVDOpenFilePath( dvd, filename );
+ }
+}
+
+void DVDCloseFile( dvd_file_t *dvd_file )
+{
+ int i;
+
+ if( dvd_file ) {
+ if( dvd_file->dvd->isImageFile ) {
+ ;
+ } else {
+ for( i =3D 0; i < 9; ++i ) {
+ if( dvd_file->title_devs[ i ] ) {
+ dvdinput_close( dvd_file->title_devs[i] );
+ }
+ }
+ }
+
+ free( dvd_file );
+ dvd_file =3D 0;
+ }
+}
+
+static int DVDFileStatVOBUDF(dvd_reader_t *dvd, int title,=20
+ int menu, dvd_stat_t *statbuf)
+{
+ char filename[ MAX_UDF_FILE_NAME_LEN ];
+ uint32_t size;
+ off_t tot_size;
+ off_t parts_size[9];
+ int nr_parts =3D 0;
+ int n;
+=20
+ if( title =3D=3D 0 ) {
+ sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
+ } else {
+ sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 =
);
+ }
+ if(!UDFFindFile( dvd, filename, &size )) {
+ return -1;
+ }
+ tot_size =3D size;
+ nr_parts =3D 1;
+ parts_size[0] =3D size;
+
+ if( !menu ) {
+ int cur;
+
+ for( cur =3D 2; cur < 10; cur++ ) {
+ sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur );
+ if( !UDFFindFile( dvd, filename, &size ) ) {
+ break;
+ }
+ parts_size[nr_parts] =3D size;
+ tot_size +=3D size;
+ nr_parts++;
+ }
+ }
+ =20
+ statbuf->size =3D tot_size;
+ statbuf->nr_parts =3D nr_parts;
+ for(n =3D 0; n < nr_parts; n++) {
+ statbuf->parts_size[n] =3D parts_size[n];
+ }
+ return 0;
+}
+
+
+static int DVDFileStatVOBPath( dvd_reader_t *dvd, int title,
+ int menu, dvd_stat_t *statbuf )
+{
+ char filename[ MAX_UDF_FILE_NAME_LEN ];
+ char full_path[ PATH_MAX + 1 ];
+ struct stat fileinfo;
+ off_t tot_size;
+ off_t parts_size[9];
+ int nr_parts =3D 0;
+ int n;
+
+=20
+ =20
+ if( title =3D=3D 0 ) {
+ sprintf( filename, "VIDEO_TS.VOB" );
+ } else {
+ sprintf( filename, "VTS_%02d_%d.VOB", title, menu ? 0 : 1 );
+ }
+ if( !findDVDFile( dvd, filename, full_path ) ) {
+ return -1;
+ }
+ =20
+ if( stat( full_path, &fileinfo ) < 0 ) {
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
+ }
+ return -1;
+ }
+ =20
+
+ tot_size =3D fileinfo.st_size;
+ nr_parts =3D 1;
+ parts_size[0] =3D fileinfo.st_size;
+
+ if( !menu ) {
+ int cur;
+ =20
+ for( cur =3D 2; cur < 10; cur++ ) {
+
+ sprintf( filename, "VTS_%02d_%d.VOB", title, cur );
+ if( !findDVDFile( dvd, filename, full_path ) ) {
+ break;
+ }
+
+ if( stat( full_path, &fileinfo ) < 0 ) {
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
+ }
+ break;
+ }
+ =20
+ parts_size[nr_parts] =3D fileinfo.st_size;
+ tot_size +=3D parts_size[nr_parts];
+ nr_parts++;
+ }
+ }
+
+ statbuf->size =3D tot_size;
+ statbuf->nr_parts =3D nr_parts;
+ for(n =3D 0; n < nr_parts; n++) {
+ statbuf->parts_size[n] =3D parts_size[n];
+ }
+ return 0;
+}
+
+
+int DVDFileStat(dvd_reader_t *dvd, int titlenum,=20
+ dvd_read_domain_t domain, dvd_stat_t *statbuf)
+{
+ char filename[ MAX_UDF_FILE_NAME_LEN ];
+ char full_path[ PATH_MAX + 1 ];
+ struct stat fileinfo;
+ uint32_t size;
+
+ /* Check arguments. */
+ if( dvd =3D=3D NULL || titlenum < 0 ) {
+ errno =3D EINVAL;
+ return -1;
+ }
+
+ switch( domain ) {
+ case DVD_READ_INFO_FILE:
+ if( titlenum =3D=3D 0 ) {
+ sprintf( filename, "/VIDEO_TS/VIDEO_TS.IFO" );
+ } else {
+ sprintf( filename, "/VIDEO_TS/VTS_%02i_0.IFO", titlenum );
+ }
+ break;
+ case DVD_READ_INFO_BACKUP_FILE:
+ if( titlenum =3D=3D 0 ) {
+ sprintf( filename, "/VIDEO_TS/VIDEO_TS.BUP" );
+ } else {
+ sprintf( filename, "/VIDEO_TS/VTS_%02i_0.BUP", titlenum );
+ }
+ break;
+ case DVD_READ_MENU_VOBS:
+ if( dvd->isImageFile ) {
+ return DVDFileStatVOBUDF( dvd, titlenum, 1, statbuf );
+ } else {
+ return DVDFileStatVOBPath( dvd, titlenum, 1, statbuf );
+ }
+ break;
+ case DVD_READ_TITLE_VOBS:
+ if( titlenum =3D=3D 0 ) {
+ return -1;
+ }
+ if( dvd->isImageFile ) {
+ return DVDFileStatVOBUDF( dvd, titlenum, 0, statbuf );
+ } else {
+ return DVDFileStatVOBPath( dvd, titlenum, 0, statbuf );
+ }
+ break;
+ default:
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Invalid domain for file stat.\n" );
+ }
+ errno =3D EINVAL;
+ return -1;
+ }
+ =20
+ if( dvd->isImageFile ) {
+ if( UDFFindFile( dvd, filename, &size ) ) {
+ statbuf->size =3D size;
+ statbuf->nr_parts =3D 1;
+ statbuf->parts_size[0] =3D size;
+ return 0;
+ }
+ } else {
+ if( findDVDFile( dvd, filename, full_path ) ) {
+ if( stat( full_path, &fileinfo ) < 0 ) {
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Can't stat() %s.\n", filename );
+ }
+ } else {
+ statbuf->size =3D fileinfo.st_size;
+ statbuf->nr_parts =3D 1;
+ statbuf->parts_size[0] =3D statbuf->size;
+ return 0;
+ }
+ }
+ }
+ return -1;
+}
+
+/**
+ * Internal, but used from dvd_udf.c=20
+ *
+ * @param device A read handle.
+ * @param lb_number Logical block number to start read from.
+ * @param block_count Number of logical blocks to read.
+ * @param data Pointer to buffer where read data should be stored.
+ * This buffer must be large enough to hold lb_number*2048 b=
ytes.
+ * The pointer must be aligned to the logical block size whe=
n
+ * reading from a raw/O_DIRECT device.
+ * @param encrypted 0 if no decryption shall be performed,
+ * 1 if decryption shall be performed
+ * @param return Returns number of blocks read on success, negative on e=
rror
+ */
+int UDFReadBlocksRaw( dvd_reader_t *device, uint32_t lb_number,
+ size_t block_count, unsigned char *data,=20
+ int encrypted )
+{
+ int ret;
+
+ if( !device->dev ) {
+ if(device->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: Fatal error in block read.\n" );
+ }
+ return 0;
+ }
+
+ ret =3D dvdinput_seek( device->dev, (int) lb_number );
+ if( ret !=3D (int) lb_number ) {
+ if(device->verbose >=3D 1) {
+ fprintf( stderr,
+ "libdvdread: UDFReadBlocksRaw: Can't seek to block %u\n",
+ lb_number );
+ }
+ return 0;
+ }
+
+ return dvdinput_read( device->dev, (char *) data,=20
+ (int) block_count, encrypted );
+}
+
+/**
+ * This is using a single input and starting from 'dvd_file->lb_start' o=
ffset.
+ *
+ * Reads 'block_count' blocks from 'dvd_file' at block offset 'offset'
+ * into the buffer located at 'data' and if 'encrypted' is set
+ * descramble the data if it's encrypted. Returning either an
+ * negative error or the number of blocks read.
+ *
+ * @param data Pointer to buffer where read data should be placed.
+ * This buffer must be large enough to hold block_count*2048=
bytes.
+ * The pointer must be aligned to 2048 bytes when reading fr=
om
+ * a raw/O_DIRECT device.
+ * @return Returns the number of blocks read on success or a negative er=
ror.
+ */
+static int DVDReadBlocksUDF( dvd_file_t *dvd_file, uint32_t offset,
+ size_t block_count, unsigned char *data,
+ int encrypted )
+{
+ return UDFReadBlocksRaw( dvd_file->dvd, dvd_file->lb_start + offset,
+ block_count, data, encrypted );
+}
+
+/**
+ * This is using possibly several inputs and starting from an offset of =
'0'.
+ * data must be aligned to logical block size (2048 bytes) of the device
+ * for raw/O_DIRECT devices to work
+ * Reads 'block_count' blocks from 'dvd_file' at block offset 'offset'
+ * into the buffer located at 'data' and if 'encrypted' is set
+ * descramble the data if it's encrypted. Returning either an
+ * negative error or the number of blocks read.
+ *
+ * @param dvd_file A file read handle.
+ * @param offset Block offset from start of file.
+ * @return Returns number of blocks read on success, negative on error.
+ */
+static int DVDReadBlocksPath( dvd_file_t *dvd_file, unsigned int offset,
+ size_t block_count, unsigned char *data,
+ int encrypted )
+{
+ int i;
+ int ret, ret2, off;
+
+ ret =3D 0;
+ ret2 =3D 0;
+ for( i =3D 0; i < 9; ++i ) {
+ if( !dvd_file->title_sizes[ i ] ) return 0; /* Past end of file */
+
+ if( offset < dvd_file->title_sizes[ i ] ) {
+ if( ( offset + block_count ) <=3D dvd_file->title_sizes[ i ] ) {
+ off =3D dvdinput_seek( dvd_file->title_devs[ i ], (int)offset );
+ if( off < 0 || off !=3D (int)offset ) {
+ if(dvd_file->dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: DVDReadBlocksPath1: Can't seek=
to block %d\n",=20
+ offset );
+ }
+ return off < 0 ? off : 0;
+ }
+ ret =3D dvdinput_read( dvd_file->title_devs[ i ], data,
+ (int)block_count, encrypted );
+ break;
+ } else {
+ size_t part1_size =3D dvd_file->title_sizes[ i ] - offset;
+ /* FIXME: Really needs to be a while loop.
+ * (This is only true if you try and read >1GB at a time) */
+ =20
+ /* Read part 1 */
+ off =3D dvdinput_seek( dvd_file->title_devs[ i ], (int)offset );
+ if( off < 0 || off !=3D (int)offset ) {
+ if(dvd_file->dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: DVDReadBlocksPath2: Can't seek=
to block %d\n",=20
+ offset );
+ }
+ return off < 0 ? off : 0;
+ }
+ ret =3D dvdinput_read( dvd_file->title_devs[ i ], data,
+ (int)part1_size, encrypted );
+ if( ret < 0 ) return ret;
+ /* FIXME: This is wrong if i is the last file in the set.=20
+ * also error from this read will not show in ret. */
+ =20
+ /* Does the next part exist? If not then return now. */
+ if( !dvd_file->title_devs[ i + 1 ] ) return ret;
+
+ /* Read part 2 */
+ off =3D dvdinput_seek( dvd_file->title_devs[ i + 1 ], 0 );
+ if( off < 0 || off !=3D 0 ) {
+ if(dvd_file->dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: DVDReadBlocksPath3: Can't seek=
to block %d\n", 0 );
+ }
+ return off < 0 ? off : 0;
+ }
+ ret2 =3D dvdinput_read( dvd_file->title_devs[ i + 1 ],=20
+ data + ( part1_size
+ * (int64_t)DVD_VIDEO_LB_LEN ),
+ (int)(block_count - part1_size),
+ encrypted );
+ if( ret2 < 0 ) return ret2;
+ break;
+ }
+ } else {
+ offset -=3D (unsigned int)dvd_file->title_sizes[ i ];
+ }
+ }
+
+ return ret + ret2;
+}
+
+/**
+ * This is broken reading more than 2Gb at a time if ssize_t is 32-bit.
+ */
+ssize_t DVDReadBlocks( dvd_file_t *dvd_file, int offset,=20
+ size_t block_count, unsigned char *data )
+{
+ int ret;
+ =20
+ /* Check arguments. */
+ if( dvd_file =3D=3D NULL || offset < 0 || data =3D=3D NULL )
+ return -1;
+ =20
+ /* Hack, and it will still fail for multiple opens in a threaded app !=
*/
+ if( dvd_file->dvd->css_title !=3D dvd_file->css_title ) {
+ dvd_file->dvd->css_title =3D dvd_file->css_title;
+ if( dvd_file->dvd->isImageFile ) {
+ dvdinput_title( dvd_file->dvd->dev, (int)dvd_file->lb_start );
+ }=20
+ /* Here each vobu has it's own dvdcss handle, so no need to update=20
+ else {
+ dvdinput_title( dvd_file->title_devs[ 0 ], (int)dvd_file->lb_star=
t );
+ }*/
+ }
+ =20
+ if( dvd_file->dvd->isImageFile ) {
+ ret =3D DVDReadBlocksUDF( dvd_file, (uint32_t)offset,=20
+ block_count, data, DVDINPUT_READ_DECRYPT );
+ } else {
+ ret =3D DVDReadBlocksPath( dvd_file, (unsigned int)offset,=20
+ block_count, data, DVDINPUT_READ_DECRYPT );
+ }
+ =20
+ return (ssize_t)ret;
+}
+
+int DVDFileSeek( dvd_file_t *dvd_file, int offset )
+{
+ /* Check arguments. */
+ if( dvd_file =3D=3D NULL || offset < 0 )
+ return -1;
+ =20
+ if( offset > dvd_file->filesize * DVD_VIDEO_LB_LEN ) {
+ return -1;
+ }
+ dvd_file->seek_pos =3D (uint32_t) offset;
+ return offset;
+}
+
+#if !defined(HAVE_UINTPTR_T) && !defined(HAVE_STDINT_H)
+#warning "Assuming that (unsigned long) can hold (void *)"
+typedef unsigned long uintptr_t;
+#endif
+
+#define DVD_ALIGN(ptr) (void *)((((uintptr_t)(ptr)) + (DVD_VIDEO_LB_LEN-=
1)) \
+ / DVD_VIDEO_LB_LEN * DVD_VIDEO_LB_LEN)
+
+ssize_t DVDReadBytes( dvd_file_t *dvd_file, void *data, size_t byte_size=
)
+{
+ unsigned char *secbuf_start;
+ unsigned char *secbuf; //must be aligned to 2048-bytes for raw/O_DIREC=
T
+ unsigned int numsec, seek_sector, seek_byte;
+ int ret;
+ =20
+ /* Check arguments. */
+ if( dvd_file =3D=3D NULL || data =3D=3D NULL ) {
+ errno =3D EINVAL;
+ return -1;
+ }
+ seek_sector =3D dvd_file->seek_pos / DVD_VIDEO_LB_LEN;
+ seek_byte =3D dvd_file->seek_pos % DVD_VIDEO_LB_LEN;
+
+ numsec =3D ( ( seek_byte + byte_size ) / DVD_VIDEO_LB_LEN ) +
+ ( ( ( seek_byte + byte_size ) % DVD_VIDEO_LB_LEN ) ? 1 : 0 );
+
+ /* must align to 2048 bytes if we are reading from raw/O_DIRECT */
+ secbuf_start =3D (unsigned char *) malloc( (numsec+1) * DVD_VIDEO_LB_L=
EN );
+ if( !secbuf_start ) {
+ /* errno will be set to ENOMEM by malloc */
+ return -1;
+ }
+
+ secbuf =3D DVD_ALIGN(secbuf_start);
+
+ if( dvd_file->dvd->isImageFile ) {
+ ret =3D DVDReadBlocksUDF( dvd_file, (uint32_t) seek_sector,=20
+ (size_t) numsec, secbuf, DVDINPUT_NOFLAGS );
+ } else {
+ ret =3D DVDReadBlocksPath( dvd_file, seek_sector,=20
+ (size_t) numsec, secbuf, DVDINPUT_NOFLAGS )=
;
+ }
+
+ if( ret !=3D (int) numsec ) {
+ free( secbuf_start );
+ return ret < 0 ? ret : 0;
+ }
+
+ memcpy( data, &(secbuf[ seek_byte ]), byte_size );
+ free( secbuf_start );
+
+ dvd_file->seek_pos +=3D (unsigned int)byte_size;
+ return byte_size;
+}
+
+ssize_t DVDFileSize( dvd_file_t *dvd_file )
+{
+ /* Check arguments. */
+ if( dvd_file =3D=3D NULL )
+ return -1;
+ =20
+ return dvd_file->filesize;
+}
+
+int DVDDiscID( dvd_reader_t *dvd, unsigned char *discid )
+{
+ struct md5_ctx ctx;
+ int title;
+ int nr_of_files =3D 0;
+ int tmp_errno;
+ int nofiles_errno =3D ENOENT;
+ /* Check arguments. */
+ if( dvd =3D=3D NULL || discid =3D=3D NULL ) {
+ errno =3D EINVAL;
+ return -1;
+ }
+ /* Go through the first 10 IFO:s, in order,=20
+ * and md5sum them, i.e VIDEO_TS.IFO and VTS_0?_0.IFO */
+ md5_init_ctx( &ctx );
+ for( title =3D 0; title < 10; title++ ) {
+ dvd_file_t *dvd_file =3D DVDOpenFile( dvd, title, DVD_READ_INFO_FILE=
);
+ if( dvd_file !=3D NULL ) {
+ ssize_t bytes_read;
+ size_t file_size =3D dvd_file->filesize * DVD_VIDEO_LB_LEN;
+ char *buffer =3D malloc( file_size );
+
+ nr_of_files++;
+
+ if( buffer =3D=3D NULL ) {
+ /* errno will be set to ENOMEM by malloc */
+ return -1;
+ }
+
+ bytes_read =3D DVDReadBytes( dvd_file, buffer, file_size );
+ if( bytes_read !=3D file_size ) {
+ tmp_errno =3D errno;
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: DVDDiscId read returned %d bytes=
"
+ ", wanted %d\n", (int)bytes_read, (int)file_size );
+ }
+ free(buffer);
+ DVDCloseFile( dvd_file );
+ errno =3D tmp_errno;
+ return -1;
+ }
+ =20
+ md5_process_bytes( buffer, file_size, &ctx );
+ =20
+ DVDCloseFile( dvd_file );
+ free( buffer );
+ } else {
+ if(errno !=3D ENOENT) {
+ nofiles_errno =3D errno;
+ }
+ }
+ }
+ md5_finish_ctx( &ctx, discid );
+ if(nr_of_files =3D=3D 0) {
+ errno =3D nofiles_errno;
+ return -1;
+ }
+ return 0;
+}
+
+
+int DVDISOVolumeInfo( dvd_reader_t *dvd,
+ char *volid, unsigned int volid_size,
+ unsigned char *volsetid, unsigned int volsetid_siz=
e )
+{
+ unsigned char *buffer; /* must be aligned to 2048 for raw/O_DIRECT */
+ unsigned char *buffer_start;=20
+ int ret;
+
+ /* Check arguments. */
+ if( dvd =3D=3D NULL ) {
+ errno =3D EINVAL;
+ return -1;
+ }
+ =20
+ if( dvd->dev =3D=3D NULL ) {
+ /* No block access, so no ISO... */
+ errno =3D EINVAL;
+ return -1;
+ }
+ =20
+ buffer_start =3D malloc( 2 * DVD_VIDEO_LB_LEN );
+ if( buffer_start =3D=3D NULL ) {
+ return -1;
+ }
+
+ buffer =3D DVD_ALIGN(buffer_start);
+ =20
+ ret =3D UDFReadBlocksRaw( dvd, 16, 1, buffer, 0 );
+ if( ret !=3D 1 ) {
+ if(dvd->verbose >=3D 1) {
+ fprintf( stderr, "libdvdread: DVDISOVolumeInfo, failed to "
+ "read ISO9660 Primary Volume Descriptor!\n" );
+ }
+ free(buffer_start);
+ return -1;
+ }
+ =20
+ if( (volid !=3D NULL) && (volid_size > 0) ) {
+ unsigned int n;
+ for(n =3D 0; n < 32; n++) {
+ if(buffer[40+n] =3D=3D 0x20) {
+ break;
+ }
+ }
+ =20
+ if(volid_size > n+1) {
+ volid_size =3D n+1;
+ }
+
+ memcpy(volid, &buffer[40], volid_size-1);
+ volid[volid_size-1] =3D '\0';
+ }
+ =20
+ if( (volsetid !=3D NULL) && (volsetid_size > 0) ) {
+ if(volsetid_size > 128) {
+ volsetid_size =3D 128;
+ }
+ memcpy(volsetid, &buffer[190], volsetid_size);
+ }
+ free(buffer_start);
+
+ return 0;
+}
+
+
+int DVDUDFVolumeInfo( dvd_reader_t *dvd,
+ char *volid, unsigned int volid_size,
+ unsigned char *volsetid, unsigned int volsetid_siz=
e )
+{
+ int ret;
+ /* Check arguments. */
+ if( dvd =3D=3D NULL )
+ return -1;
+ =20
+ if( dvd->dev =3D=3D NULL ) {
+ /* No block access, so no UDF VolumeSet Identifier */
+ return -1;
+ }
+ =20
+ if( (volid !=3D NULL) && (volid_size > 0) ) {
+ ret =3D UDFGetVolumeIdentifier(dvd, volid, volid_size);
+ if(!ret) {
+ return -1;
+ }
+ }
+ if( (volsetid !=3D NULL) && (volsetid_size > 0) ) {
+ ret =3D UDFGetVolumeSetIdentifier(dvd, volsetid, volsetid_size);
+ if(!ret) {
+ return -1;
+ }
+ }
+ =20
+ return 0; =20
+}
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_reader.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_reader.h 2007-03-10 =
21:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_reader.h 2007-03-10 =
21:41:34 UTC (rev 1290)
@@ -0,0 +1,348 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef DVD_READER_H_INCLUDED
+#define DVD_READER_H_INCLUDED
+
+/*
+ * Copyright (C) 2001, 2002 Billy Biggs <vektor at dumbterm.net>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>,
+ * Bj=F6rn Englund <d4bjorn at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 <inttypes.h> // include local inttypes for WINDOWS
+#include <sys/types.h>
+#if defined(WIN32) || defined(WIN64)
+typedef SSIZE_T ssize_t;
+#endif
+
+/**
+ * The DVD access interface.
+ *
+ * This file contains the functions that form the interface to to
+ * reading files located on a DVD.
+ */
+
+/**
+ * The current version. (0.9.4 =3D> 904, 1.2.3 =3D> 10203)
+ */
+#define DVDREAD_VERSION 907
+
+
+/**
+ * The length of one Logical Block of a DVD.
+ */
+#define DVD_VIDEO_LB_LEN 2048
+
+/**
+ * Maximum length of filenames allowed in UDF.
+ */
+#define MAX_UDF_FILE_NAME_LEN 2048
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ =20
+/**
+ * Opaque type that is used as a handle for one instance of an opened DV=
D.
+ */
+typedef struct dvd_reader_s dvd_reader_t;
+ =20
+/**
+ * Opaque type for a file read handle, much like a normal fd or FILE *.
+ */
+typedef struct dvd_file_s dvd_file_t;
+
+/**
+ * Returns the compiled version. (DVDREAD_VERSION as an int)
+ */
+int DVDVersion(void);
+
+
+/**
+ * Opens a block device of a DVD-ROM file, or an image file, or a direct=
ory
+ * name for a mounted DVD or HD copy of a DVD.
+ *
+ * If the given file is a block device, or is the mountpoint for a block
+ * device, then that device is used for CSS authentication using libdvdc=
ss.
+ * If no device is available, then no CSS authentication is performed,=20
+ * and we hope that the image is decrypted.
+ *
+ * If the path given is a directory, then the files in that directory ma=
y be
+ * in any one of these formats:
+ *
+ * path/VIDEO_TS/VTS_01_1.VOB
+ * path/video_ts/vts_01_1.vob
+ * path/VTS_01_1.VOB
+ * path/vts_01_1.vob
+ *
+ * @param path Specifies the the device, file or directory to be used.=20
+ * @return If successful a a read handle is returned. Otherwise 0 is ret=
urned.
+ *
+ * dvd =3D DVDOpen(path);
+ *
+ * Threads: this function uses chdir() and getcwd().
+ * The current working directory is global to all threads,
+ * so using chdir/getcwd in another thread could give unexpected results=
.
+ */
+dvd_reader_t *DVDOpen( const char * );
+
+/**
+ * Closes and cleans up the DVD reader object.
+ *
+ * You must close all open files before calling this function.
+ *
+ * @param dvd A read handle that should be closed.
+ *
+ * DVDClose(dvd);
+ */
+void DVDClose( dvd_reader_t * );
+
+/**
+ * Initializes libdvdread to be used with multithreading apps.
+ *
+ * You must call this function before using any other functions of libdv=
dread
+ * if you are going to use libdvdread in multiple threads in your progra=
m.
+ * If you are not using threads, or using libdvdread from just one threa=
d,
+ * you do not need to call this, but you are allowed to do so anyway.
+ *=20
+ * There are several restrictions on how you can use libdvdread in
+ * multithreading apps, see further documentation.
+ *
+ * If you have called DVDFinish() you need to call DVDInit again to use
+ * libdvdread in multiple threads.
+ *
+ * DVDInit(void);
+ */
+void DVDInit(void);
+
+/**
+ * frees any dlopened objects.
+ *
+ * You must DVDClose all handles opened with DVDOpen before calling this=
.
+ * Use this function if you need to close the dlopened libs and any othe=
r
+ * objects that have been dynamically allocated by libdvdread.
+ *=20
+ * DVDFinish(void);
+ */
+void DVDFinish(void);
+
+/**
+ *=20
+ */
+typedef enum {
+ DVD_READ_INFO_FILE, /**< VIDEO_TS.IFO or VTS_XX_0.IFO (title) =
*/
+ DVD_READ_INFO_BACKUP_FILE, /**< VIDEO_TS.BUP or VTS_XX_0.BUP (title) =
*/
+ DVD_READ_MENU_VOBS, /**< VIDEO_TS.VOB or VTS_XX_0.VOB (title) =
*/
+ DVD_READ_TITLE_VOBS /**< VTS_XX_[1-9].VOB (title). All files i=
n=20
+ the title set are opened and read as a
+ single file. */
+} dvd_read_domain_t;
+
+/**
+ *
+ */
+typedef struct {
+ off_t size; /**< Total size of file in bytes */
+ int nr_parts; /**< Number of file parts */
+ off_t parts_size[9]; /**< Size of each part in bytes */
+} dvd_stat_t;
+
+/**
+ * Stats a file on the DVD given the title number and domain.
+ * The information about the file is stored in a dvd_stat_t
+ * which contains information about the size of the file and
+ * the number of parts in case of a multipart file and the respective
+ * sizes of the parts.
+ * A multipart file is for instance VTS_02_1.VOB, VTS_02_2.VOB, VTS_02_3=
.VOB
+ * The size of VTS_02_1.VOB will be stored in stat->parts_size[0],
+ * VTS_02_2.VOB in stat->parts_size[1], ...
+ * The total size (sum of all parts) is stored in stat->size and
+ * stat->nr_parts will hold the number of parts.
+ * Only DVD_READ_TITLE_VOBS (VTS_??_[1-9].VOB) can be multipart files.
+ *=20
+ * This function is only of use if you want to get the size of each file
+ * in the filesystem. These sizes are not needed to use any other
+ * functions in libdvdread.=20
+ *
+ * @param dvd A dvd read handle.
+ * @param titlenum Which Video Title Set should be used, VIDEO_TS is 0.
+ * @param domain Which domain.=20
+ * @param stat Pointer to where the result is stored.
+ * @return If successful 0, otherwise -1.
+ *
+ * int DVDFileStat(dvd, titlenum, domain, stat);
+ */
+int DVDFileStat(dvd_reader_t *, int, dvd_read_domain_t, dvd_stat_t *);
+ =20
+/**
+ * Opens a file on the DVD given the title number and domain.
+ *
+ * If the title number is 0, the video manager information is opened
+ * (VIDEO_TS.[IFO,BUP,VOB]). Returns a file structure which may be
+ * used for reads, or 0 if the file was not found.
+ *
+ * @param dvd A dvd read handle.
+ * @param titlenum Which Video Title Set should be used, VIDEO_TS is 0.
+ * @param domain Which domain.=20
+ * @return If successful a a file read handle is returned, otherwise 0.
+ *
+ * dvd_file =3D DVDOpenFile(dvd, titlenum, domain); */
+dvd_file_t *DVDOpenFile( dvd_reader_t *, int, dvd_read_domain_t );
+
+/**
+ * Closes a file and frees the associated structure.
+ *
+ * @param dvd_file The file read handle to be closed.
+ *
+ * DVDCloseFile(dvd_file);
+ */
+void DVDCloseFile( dvd_file_t * );
+
+/**
+ * Reads block_count number of blocks from the file at the given block o=
ffset.
+ * Returns number of blocks read on success, -1 on error. This call is =
only
+ * for reading VOB data, and should not be used when reading the IFO fil=
es. =20
+ * When reading from an encrypted drive, blocks are decrypted using libd=
vdcss=20
+ * where required.
+ *
+ * @param dvd_file A file read handle.
+ * @param offset Block offset from the start of the file to start readin=
g at.
+ * @param block_count Number of block to read.
+ * @param data Pointer to a buffer to write the data into.
+ * It must be aligned to the logical block size of the devic=
e when
+ * reading from a raw/O_DIRECT device (2048 bytes for DVD)
+ * @return Returns number of blocks read on success, -1 on error.
+ *
+ * blocks_read =3D DVDReadBlocks(dvd_file, offset, block_count, data);
+ */
+ssize_t DVDReadBlocks( dvd_file_t *, int, size_t, unsigned char * );
+
+/**
+ * Seek to the given position in the file. Returns the resulting positi=
on in
+ * bytes from the beginning of the file. The seek position is only used=
for
+ * byte reads from the file, the block read call always reads from the g=
iven
+ * offset.
+ *
+ * @param dvd_file A file read handle.
+ * @param seek_offset Byte offset from the start of the file to seek to.
+ * @return The resulting position in bytes from the beginning of the fil=
e.
+ *
+ * offset_set =3D DVDFileSeek(dvd_file, seek_offset);
+ */
+int DVDFileSeek( dvd_file_t *, int );
+
+/**
+ * Reads the given number of bytes from the file. This call can only be=
used
+ * on the information files, and may not be used for reading from a VOB.=
This
+ * reads from and increments the currrent seek position for the file.
+ *
+ * @param dvd_file A file read handle.
+ * @param data Pointer to a buffer to write the data into.
+ * @param bytes Number of bytes to read.
+ * @return Returns number of bytes read on success, -1 on error.
+ *
+ * bytes_read =3D DVDReadBytes(dvd_file, data, bytes);
+ */
+ssize_t DVDReadBytes( dvd_file_t *, void *, size_t );
+ =20
+/**
+ * Returns the file size in blocks.
+ *
+ * @param dvd_file A file read handle.
+ * @return The size of the file in blocks, -1 on error.
+ *
+ * blocks =3D DVDFileSize(dvd_file);
+ */
+ssize_t DVDFileSize( dvd_file_t * );
+ =20
+/**
+ * Get a unique 128 bit disc ID.
+ * This is the MD5 sum of VIDEO_TS.IFO and the VTS_0?_0.IFO files
+ * in title order (those that exist).
+ * If you need a 'text' representation of the id, print it as a
+ * hexadecimal number, using lowercase letters, discid[0] first.=20
+ * I.e. the same format as the command-line 'md5sum' program uses.
+ *
+ * @param dvd A read handle to get the disc ID from
+ * @param discid The buffer to put the disc ID into. The buffer must
+ * have room for 128 bits (16 chars).
+ * @return 0 on success, -1 on error.
+ */
+int DVDDiscID( dvd_reader_t *, unsigned char * );
+
+/**
+ * Get the UDF VolumeIdentifier and VolumeSetIdentifier
+ * from the PrimaryVolumeDescriptor.
+ *
+ * @param dvd A read handle to get the disc ID from
+ * @param volid The buffer to put the VolumeIdentifier into.
+ * The VolumeIdentifier is latin-1 encoded (8bit unicode)
+ * null terminated and max 32 bytes (including '\0')
+ * @param volid_size No more than volid_size bytes will be copied to vol=
id.
+ * If the VolumeIdentifier is truncated because of thi=
s
+ * it will still be null terminated.
+ * @param volsetid The buffer to put the VolumeSetIdentifier into.
+ * The VolumeIdentifier is 128 bytes as
+ * stored in the UDF PrimaryVolumeDescriptor.
+ * Note that this is not a null terminated string.
+ * @param volsetid_size At most volsetid_size bytes will be copied to vo=
lsetid.
+ * @return 0 on success, -1 on error.
+ */
+int DVDUDFVolumeInfo( dvd_reader_t *, char *, unsigned int,
+ unsigned char *, unsigned int );
+
+/**
+ * Get the ISO9660 VolumeIdentifier and VolumeSetIdentifier
+ *
+ * * Only use this function as fallback if DVDUDFVolumeInfo returns 0 =
*
+ * * this will happen on a disc mastered only with a iso9660 filesystem =
*
+ * * All video DVD discs have UDF filesystem =
*
+ *
+ * @param dvd A read handle to get the disc ID from
+ * @param volid The buffer to put the VolumeIdentifier into.
+ * The VolumeIdentifier is coded with '0-9','A-Z','_'
+ * null terminated and max 33 bytes (including '\0')
+ * @param volid_size No more than volid_size bytes will be copied to vol=
id.
+ * If the VolumeIdentifier is truncated because of thi=
s
+ * it will still be null terminated.
+ * @param volsetid The buffer to put the VolumeSetIdentifier into.
+ * The VolumeIdentifier is 128 bytes as
+ * stored in the ISO9660 PrimaryVolumeDescriptor.
+ * Note that this is not a null terminated string.
+ * @param volsetid_size At most volsetid_size bytes will be copied to vo=
lsetid.
+ * @return 0 on success, -1 on error.
+ */
+int DVDISOVolumeInfo( dvd_reader_t *, char *, unsigned int,
+ unsigned char *, unsigned int );
+
+/**
+ * Sets the level of caching that is done when reading from a device
+ *
+ * @param dvd A read handle to get the disc ID from
+ * @param level The level of caching wanted.
+ * -1 - returns the current setting.
+ * 0 - UDF Cache turned off.
+ * 1 - (default level) Pointers to IFO files and some data =
from
+ * PrimaryVolumeDescriptor are cached.=20
+ *
+ * @return The level of caching.
+ */
+int DVDUDFCacheLevel( dvd_reader_t *, int );
+ =20
+#ifdef __cplusplus
+};
+#endif
+#endif /* DVD_READER_H_INCLUDED */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_udf.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_udf.c 2007-03-10 21:=
38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_udf.c 2007-03-10 21:=
41:34 UTC (rev 1290)
@@ -0,0 +1,1222 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * This code is based on dvdudf by:
+ * Christian Wolff <scarabaeus at convergence.de>.
+ *
+ * Modifications by:
+ * Billy Biggs <vektor at dumbterm.net>.
+ * Bj=F6rn Englund <d4bjorn at dtek.chalmers.se>.
+ *
+ * dvdudf: parse and read the UDF volume information of a DVD Video
+ * Copyright (C) 1999 Christian Wolff for convergence integrated media
+ * GmbH The author can be reached at scarabaeus at convergence.de, the
+ * project's page is at http://linuxtv.org/dvd/
+ *=20
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *=20
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *=20
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA. Or, point your browser to
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+=20
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined(WIN32) || defined(WIN64)
+#include "posix.h"
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <errno.h>
+
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#include "dvd_reader.h"
+#include "dvd_udf.h"
+#include "dvdread_internal.h"
+
+#ifndef EMEDIUMTYPE
+#define EMEDIUMTYPE ENOENT
+#endif
+
+#if !defined(HAVE_UINTPTR_T) && !defined(HAVE_STDINT_H)
+#warning "Assuming that (unsigned long) can hold (void *)"
+typedef unsigned long uintptr_t;
+#endif
+
+#define DVD_ALIGN(ptr) (void *)((((uintptr_t)(ptr)) + (DVD_VIDEO_LB_LEN-=
1)) \
+ / DVD_VIDEO_LB_LEN * DVD_VIDEO_LB_LEN)
+
+typedef struct {
+ void *start;
+ void *aligned;
+} dvdalign_ptrs_t;
+
+typedef struct {
+ dvdalign_ptrs_t *ptrs;
+ uint32_t ptrs_in_use;
+ uint32_t ptrs_max;
+} dvdalign_t;
+
+extern void *GetAlignHandle(dvd_reader_t *device);
+extern void SetAlignHandle(dvd_reader_t *device, void *align);
+
+/**
+ * Allocates aligned memory (for use with reads from raw/O_DIRECT device=
s).
+ * This memory must be freed with dvdalign_free()
+ * The size of the memory that is allocate is num_lbs*2048 bytes.
+ * The memory will be suitably aligned for use with
+ * block reads from raw/O_DIRECT device.
+ * @param num_lbs Number of logical blocks (2048 bytes) to allocate.
+ * @return Returns pointer to allocated memory, or NULL on failure
+ * This isn't supposed to be fast/efficient, if that is needed
+ * this function should be rewritten to use posix_memalign or similar.
+ * It's just needed for aligning memory for small block reads from
+ * raw/O_DIRECT devices.=20
+ * We assume that 2048 is enough alignment for all systems at the moment=
.
+ * Not thread safe. Only use this from one thread.
+ * Depends on sizeof(unsigned long) being at least as large as sizeof(vo=
id *)
+ */
+static void *dvdalign_lbmalloc(dvd_reader_t *device, uint32_t num_lbs)
+{
+ void *m;
+ uint32_t n;
+ dvdalign_t *a;
+ =20
+ m =3D malloc((num_lbs+1)*DVD_VIDEO_LB_LEN);
+ if(m =3D=3D NULL) {
+ return m;
+ }
+ a =3D (dvdalign_t *)GetAlignHandle(device);
+ if(a =3D=3D NULL) {
+ a =3D malloc(sizeof(dvdalign_t));
+ if(a =3D=3D NULL) {
+ return a;
+ }
+ a->ptrs =3D NULL;
+ a->ptrs_in_use =3D 0;
+ a->ptrs_max =3D 0;
+ SetAlignHandle(device, (void *)a);
+ }
+ =20
+ if(a->ptrs_in_use >=3D a->ptrs_max) {
+ a->ptrs =3D realloc(a->ptrs, (a->ptrs_max+10)*sizeof(dvdalign_ptrs_t=
));
+ if(a->ptrs =3D=3D NULL) {
+ free(m);
+ return NULL;
+ }
+ a->ptrs_max+=3D10;
+ for(n =3D a->ptrs_in_use; n < a->ptrs_max; n++) {
+ a->ptrs[n].start =3D NULL;
+ a->ptrs[n].aligned =3D NULL;
+ }
+ n =3D a->ptrs_in_use;
+ } else {
+ for(n =3D 0; n < a->ptrs_max; n++) {
+ if(a->ptrs[n].start =3D=3D NULL) {
+ break;
+ }
+ }
+ }
+
+ a->ptrs[n].start =3D m;
+ a->ptrs[n].aligned =3D DVD_ALIGN(m);
+
+ a->ptrs_in_use++;
+
+ /* If this function starts to be used too much print a warning.
+ Either there is a memory leak somewhere or we need to rewrite this =
to
+ a more efficient version.
+ */
+ if(a->ptrs_in_use > 50) {
+ if(dvdread_verbose(device) >=3D 0) {
+ fprintf(stderr, "libdvdread: dvdalign_lbmalloc(), more allocs than=
supposed: %u\n", a->ptrs_in_use);
+ }
+ }
+
+ return a->ptrs[n].aligned;
+}
+
+/**
+ * Frees memory allocated with dvdalign_lbmemory()=20
+ * @param ptr Pointer to memory space to free
+ * Not thread safe.
+ */
+static void dvdalign_lbfree(dvd_reader_t *device, void *ptr)
+{
+ uint32_t n;
+ dvdalign_t *a;
+
+ a =3D (dvdalign_t *)GetAlignHandle(device);
+ if(a && a->ptrs) {
+ for(n =3D 0; n < a->ptrs_max; n++) {
+ if(a->ptrs[n].aligned =3D=3D ptr) {
+ free(a->ptrs[n].start);
+ a->ptrs[n].start =3D NULL;
+ a->ptrs[n].aligned =3D NULL;
+ a->ptrs_in_use--;
+ if(a->ptrs_in_use =3D=3D 0) {
+ free(a->ptrs);
+ a->ptrs =3D NULL;
+ a->ptrs_max =3D 0;
+ free(a);
+ a =3D NULL;
+ SetAlignHandle(device, (void *)a);
+ }
+ return;
+ }
+ }
+ }
+ if(dvdread_verbose(device) >=3D 0) {
+ fprintf(stderr, "libdvdread: dvdalign_lbfree(), error trying to free=
mem: %08lx (%u)\n", (unsigned long)ptr, a ? a->ptrs_in_use : 0);
+ }
+}
+
+
+/* Private but located in/shared with dvd_reader.c */
+extern int UDFReadBlocksRaw( dvd_reader_t *device, uint32_t lb_number,
+ size_t block_count, unsigned char *data,=20
+ int encrypted );
+
+/** @internal
+ * Its required to either fail or deliver all the blocks asked for.=20
+ *
+ * @param data Pointer to a buffer where data is returned. This must be =
large
+ * enough to hold lb_number*2048 bytes.
+ * It must be aligned to system specific (2048) logical blocks size wh=
en
+ * reading from raw/O_DIRECT device.
+ */
+static int DVDReadLBUDF( dvd_reader_t *device, uint32_t lb_number,
+ size_t block_count, unsigned char *data,=20
+ int encrypted )
+{
+ int ret;
+ size_t count =3D block_count;
+ =20
+ while(count > 0) {
+ =20
+ ret =3D UDFReadBlocksRaw(device, lb_number, count, data, encrypted);
+ =20
+ if(ret <=3D 0) {
+ /* One of the reads failed or nothing more to read, too bad.
+ * We won't even bother returning the reads that went ok. */
+ return ret;
+ }
+ =20
+ count -=3D (size_t)ret;
+ lb_number +=3D (uint32_t)ret;
+ }
+
+ return block_count;
+}
+
+
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
+
+struct Partition {
+ int valid;
+ char VolumeDesc[128];
+ uint16_t Flags;
+ uint16_t Number;
+ char Contents[32];
+ uint32_t AccessType;
+ uint32_t Start;
+ uint32_t Length;
+};
+
+struct AD {
+ uint32_t Location;
+ uint32_t Length;
+ uint8_t Flags;
+ uint16_t Partition;
+};
+
+struct extent_ad {
+ uint32_t location;
+ uint32_t length;
+};
+
+struct avdp_t {
+ struct extent_ad mvds;
+ struct extent_ad rvds;
+};
+
+struct pvd_t {
+ uint8_t VolumeIdentifier[32];
+ uint8_t VolumeSetIdentifier[128];
+};
+
+struct lbudf {
+ uint32_t lb;
+ uint8_t *data;
+};
+
+struct icbmap {
+ uint32_t lbn;
+ struct AD file;
+ uint8_t filetype;
+};
+
+struct udf_cache {
+ int avdp_valid;
+ struct avdp_t avdp;
+ int pvd_valid;
+ struct pvd_t pvd;
+ int partition_valid;
+ struct Partition partition;
+ int rooticb_valid;
+ struct AD rooticb;
+ int lb_num;
+ struct lbudf *lbs;
+ int map_num;
+ struct icbmap *maps;
+};
+
+typedef enum {
+ PartitionCache, RootICBCache, LBUDFCache, MapCache, AVDPCache, PVDCach=
e
+} UDFCacheType;
+
+extern void *GetUDFCacheHandle(dvd_reader_t *device);
+extern void SetUDFCacheHandle(dvd_reader_t *device, void *cache);
+
+
+void FreeUDFCache(dvd_reader_t *device, void *cache)
+{
+ int n;
+ =20
+ struct udf_cache *c =3D (struct udf_cache *)cache;
+ if(c =3D=3D NULL) {
+ return;
+ }
+
+ for(n =3D 0; n < c->lb_num; n++) {
+ if(c->lbs[n].data) {
+ /* free data */
+ dvdalign_lbfree(device, c->lbs[n].data);
+ }
+ }
+ c->lb_num =3D 0;
+
+ if(c->lbs) {
+ free(c->lbs);
+ }
+ if(c->maps) {
+ free(c->maps);
+ }
+ free(c);
+}
+
+
+static int GetUDFCache(dvd_reader_t *device, UDFCacheType type,
+ uint32_t nr, void *data)
+{
+ int n;
+ struct udf_cache *c;
+
+ if(DVDUDFCacheLevel(device, -1) <=3D 0) {
+ return 0;
+ }
+ =20
+ c =3D (struct udf_cache *)GetUDFCacheHandle(device);
+ =20
+ if(c =3D=3D NULL) {
+ return 0;
+ }
+ =20
+ switch(type) {
+ case AVDPCache:
+ if(c->avdp_valid) {
+ *(struct avdp_t *)data =3D c->avdp;
+ return 1;
+ } =20
+ break;
+ case PVDCache:
+ if(c->pvd_valid) {
+ *(struct pvd_t *)data =3D c->pvd;
+ return 1;
+ } =20
+ break;
+ case PartitionCache:
+ if(c->partition_valid) {
+ *(struct Partition *)data =3D c->partition;
+ return 1;
+ }
+ break;
+ case RootICBCache:
+ if(c->rooticb_valid) {
+ *(struct AD *)data =3D c->rooticb;
+ return 1;
+ }
+ break;
+ case LBUDFCache:
+ for(n =3D 0; n < c->lb_num; n++) {
+ if(c->lbs[n].lb =3D=3D nr) {
+ *(uint8_t **)data =3D c->lbs[n].data;
+ return 1;
+ }
+ }
+ break;
+ case MapCache:
+ for(n =3D 0; n < c->map_num; n++) {
+ if(c->maps[n].lbn =3D=3D nr) {
+ *(struct icbmap *)data =3D c->maps[n];
+ return 1;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ =20
+ return 0;
+}
+
+static int SetUDFCache(dvd_reader_t *device, UDFCacheType type,
+ uint32_t nr, void *data)
+{
+ int n;
+ struct udf_cache *c;
+
+ if(DVDUDFCacheLevel(device, -1) <=3D 0) {
+ return 0;
+ }
+
+ c =3D (struct udf_cache *)GetUDFCacheHandle(device);
+ =20
+ if(c =3D=3D NULL) {
+ c =3D calloc(1, sizeof(struct udf_cache)); =20
+ // fprintf(stderr, "calloc: %d\n", sizeof(struct udf_cache)); =20
+ if(c =3D=3D NULL) {
+ return 0;
+ }
+ SetUDFCacheHandle(device, c);
+ }
+ =20
+ =20
+ switch(type) {
+ case AVDPCache:
+ c->avdp =3D *(struct avdp_t *)data;=20
+ c->avdp_valid =3D 1;
+ break;
+ case PVDCache:
+ c->pvd =3D *(struct pvd_t *)data;=20
+ c->pvd_valid =3D 1;
+ break;
+ case PartitionCache:
+ c->partition =3D *(struct Partition *)data;=20
+ c->partition_valid =3D 1;
+ break;
+ case RootICBCache:
+ c->rooticb =3D *(struct AD *)data;=20
+ c->rooticb_valid =3D 1;
+ break;
+ case LBUDFCache:
+ for(n =3D 0; n < c->lb_num; n++) {
+ if(c->lbs[n].lb =3D=3D nr) {
+ /* replace with new data */
+ c->lbs[n].data =3D *(uint8_t **)data;
+ c->lbs[n].lb =3D nr;
+ return 1;
+ }
+ }
+ c->lb_num++;
+ c->lbs =3D realloc(c->lbs, c->lb_num * sizeof(struct lbudf));
+ /*
+ fprintf(stderr, "realloc lb: %d * %d =3D %d\n",
+ c->lb_num, sizeof(struct lbudf),
+ c->lb_num * sizeof(struct lbudf));
+ */
+ if(c->lbs =3D=3D NULL) {
+ c->lb_num =3D 0;
+ return 0;
+ }
+ c->lbs[n].data =3D *(uint8_t **)data;
+ c->lbs[n].lb =3D nr;
+ break;
+ case MapCache:
+ for(n =3D 0; n < c->map_num; n++) {
+ if(c->maps[n].lbn =3D=3D nr) {
+ /* replace with new data */
+ c->maps[n] =3D *(struct icbmap *)data;
+ c->maps[n].lbn =3D nr;
+ return 1;
+ }
+ }
+ c->map_num++;
+ c->maps =3D realloc(c->maps, c->map_num * sizeof(struct icbmap));
+ /*
+ fprintf(stderr, "realloc maps: %d * %d =3D %d\n",
+ c->map_num, sizeof(struct icbmap),
+ c->map_num * sizeof(struct icbmap));
+ */
+ if(c->maps =3D=3D NULL) {
+ c->map_num =3D 0;
+ return 0;
+ }
+ c->maps[n] =3D *(struct icbmap *)data;
+ c->maps[n].lbn =3D nr;
+ break;
+ default:
+ return 0;
+ }
+ =20
+ return 1;
+}
+
+
+/* For direct data access, LSB first */
+#define GETN1(p) ((uint8_t)data[p])
+#define GETN2(p) ((uint16_t)data[p] | ((uint16_t)data[(p) + 1] << 8))
+#define GETN3(p) ((uint32_t)data[p] | ((uint32_t)data[(p) + 1] << 8) =
\
+ | ((uint32_t)data[(p) + 2] << 16))
+#define GETN4(p) ((uint32_t)data[p] \
+ | ((uint32_t)data[(p) + 1] << 8) \
+ | ((uint32_t)data[(p) + 2] << 16) \
+ | ((uint32_t)data[(p) + 3] << 24))
+/* This is wrong with regard to endianess */
+#define GETN(p, n, target) memcpy(target, &data[p], n)
+
+static int Unicodedecode( uint8_t *data, int len, char *target )=20
+{
+ int p =3D 1, i =3D 0;
+
+ if( ( data[ 0 ] =3D=3D 8 ) || ( data[ 0 ] =3D=3D 16 ) ) do {
+ if( data[ 0 ] =3D=3D 16 ) p++; /* Ignore MSB of unicode16 */
+ if( p < len ) {
+ target[ i++ ] =3D data[ p++ ];
+ }
+ } while( p < len );
+
+ target[ i ] =3D '\0';
+ return 0;
+}
+
+static int UDFDescriptor( uint8_t *data, uint16_t *TagID )=20
+{
+ *TagID =3D GETN2(0);
+ // TODO: check CRC 'n stuff
+ return 0;
+}
+
+static int UDFExtentAD( uint8_t *data, uint32_t *Length, uint32_t *Locat=
ion )=20
+{
+ *Length =3D GETN4(0);
+ *Location =3D GETN4(4);
+ return 0;
+}
+
+static int UDFShortAD( uint8_t *data, struct AD *ad,=20
+ struct Partition *partition )=20
+{
+ ad->Length =3D GETN4(0);
+ ad->Flags =3D ad->Length >> 30;
+ ad->Length &=3D 0x3FFFFFFF;
+ ad->Location =3D GETN4(4);
+ ad->Partition =3D partition->Number; // use number of current partitio=
n
+ return 0;
+}
+
+static int UDFLongAD( uint8_t *data, struct AD *ad )
+{
+ ad->Length =3D GETN4(0);
+ ad->Flags =3D ad->Length >> 30;
+ ad->Length &=3D 0x3FFFFFFF;
+ ad->Location =3D GETN4(4);
+ ad->Partition =3D GETN2(8);
+ //GETN(10, 6, Use);
+ return 0;
+}
+
+static int UDFExtAD( uint8_t *data, struct AD *ad )
+{
+ ad->Length =3D GETN4(0);
+ ad->Flags =3D ad->Length >> 30;
+ ad->Length &=3D 0x3FFFFFFF;
+ ad->Location =3D GETN4(12);
+ ad->Partition =3D GETN2(16);
+ //GETN(10, 6, Use);
+ return 0;
+}
+
+static int UDFICB( uint8_t *data, uint8_t *FileType, uint16_t *Flags )
+{
+ *FileType =3D GETN1(11);
+ *Flags =3D GETN2(18);
+ return 0;
+}
+
+
+static int UDFPartition( uint8_t *data, uint16_t *Flags, uint16_t *Numbe=
r,
+ char *Contents, uint32_t *Start, uint32_t *Leng=
th )
+{
+ *Flags =3D GETN2(20);
+ *Number =3D GETN2(22);
+ GETN(24, 32, Contents);
+ *Start =3D GETN4(188);
+ *Length =3D GETN4(192);
+ return 0;
+}
+
+/**
+ * Reads the volume descriptor and checks the parameters. Returns 0 on =
OK, 1
+ * on error.
+ */
+static int UDFLogVolume( uint8_t *data, char *VolumeDescriptor )
+{
+ uint32_t lbsize, MT_L, N_PM;
+ Unicodedecode(&data[84], 128, VolumeDescriptor);
+ lbsize =3D GETN4(212); // should be 2048
+ MT_L =3D GETN4(264); // should be 6
+ N_PM =3D GETN4(268); // should be 1
+ if (lbsize !=3D DVD_VIDEO_LB_LEN) return 1;
+ return 0;
+}
+
+static int UDFFileEntry( uint8_t *data, uint8_t *FileType,=20
+ struct Partition *partition, struct AD *ad )
+{
+ uint16_t flags;
+ uint32_t L_EA, L_AD;
+ unsigned int p;
+
+ UDFICB( &data[ 16 ], FileType, &flags );
+ =20
+ /* Init ad for an empty file (i.e. there isn't a AD, L_AD =3D=3D 0 ) *=
/
+ ad->Length =3D GETN4( 60 ); // Really 8 bytes a 56
+ ad->Flags =3D 0;
+ ad->Location =3D 0; // what should we put here?=20
+ ad->Partition =3D partition->Number; // use number of current partitio=
n
+
+ L_EA =3D GETN4( 168 );
+ L_AD =3D GETN4( 172 );
+ p =3D 176 + L_EA;
+ while( p < 176 + L_EA + L_AD ) {
+ switch( flags & 0x0007 ) {
+ case 0: UDFShortAD( &data[ p ], ad, partition ); p +=3D 8; break;
+ case 1: UDFLongAD( &data[ p ], ad ); p +=3D 16; break;
+ case 2: UDFExtAD( &data[ p ], ad ); p +=3D 20; break;
+ case 3:
+ switch( L_AD ) {
+ case 8: UDFShortAD( &data[ p ], ad, partition ); break;
+ case 16: UDFLongAD( &data[ p ], ad ); break;
+ case 20: UDFExtAD( &data[ p ], ad ); break;
+ }
+ p +=3D L_AD;
+ break;
+ default:
+ p +=3D L_AD; break;
+ }
+ }
+ return 0;
+}
+
+static int UDFFileIdentifier( uint8_t *data, uint8_t *FileCharacteristic=
s,
+ char *FileName, struct AD *FileICB )
+{
+ uint8_t L_FI;
+ uint16_t L_IU;
+
+ *FileCharacteristics =3D GETN1(18);
+ L_FI =3D GETN1(19);
+ UDFLongAD(&data[20], FileICB);
+ L_IU =3D GETN2(36);
+ if (L_FI) Unicodedecode(&data[38 + L_IU], L_FI, FileName);
+ else FileName[0] =3D '\0';
+ return 4 * ((38 + L_FI + L_IU + 3) / 4);
+}
+
+/**
+ * Maps ICB to FileAD
+ * ICB: Location of ICB of directory to scan
+ * FileType: Type of the file
+ * File: Location of file the ICB is pointing to
+ * return 1 on success, 0 on error;
+ */
+static int UDFMapICB( dvd_reader_t *device, struct AD ICB, uint8_t *File=
Type,
+ struct Partition *partition, struct AD *File )=20
+{
+ uint8_t *LogBlock;
+ uint32_t lbnum;
+ uint16_t TagID;
+ struct icbmap tmpmap;
+
+ lbnum =3D partition->Start + ICB.Location;
+ tmpmap.lbn =3D lbnum;
+ if(GetUDFCache(device, MapCache, lbnum, &tmpmap)) {
+ *FileType =3D tmpmap.filetype;
+ *File =3D tmpmap.file;
+ return 1;
+ }
+
+ LogBlock =3D dvdalign_lbmalloc(device, 1);
+ if(!LogBlock) {
+ return 0;
+ }
+ =20
+ do {
+ if( DVDReadLBUDF( device, lbnum++, 1, LogBlock, 0 ) <=3D 0 ) {
+ TagID =3D 0;
+ } else {
+ UDFDescriptor( LogBlock, &TagID );
+ }
+
+ if( TagID =3D=3D 261 ) {
+ UDFFileEntry( LogBlock, FileType, partition, File );
+ tmpmap.file =3D *File;
+ tmpmap.filetype =3D *FileType;
+ SetUDFCache(device, MapCache, tmpmap.lbn, &tmpmap);
+ dvdalign_lbfree(device, LogBlock);
+ return 1;
+ };
+ } while( ( lbnum <=3D partition->Start + ICB.Location + ( ICB.Length -=
1 )
+ / DVD_VIDEO_LB_LEN ) && ( TagID !=3D 261 ) );
+
+ dvdalign_lbfree(device, LogBlock);
+ return 0;
+}
+
+/**
+ * Dir: Location of directory to scan
+ * FileName: Name of file to look for
+ * FileICB: Location of ICB of the found file
+ * return 1 on success, 0 on error;
+ */
+static int UDFScanDir( dvd_reader_t *device, struct AD Dir, char *FileNa=
me,
+ struct Partition *partition, struct AD *FileICB,
+ int cache_file_info)=20
+{
+ char filename[ MAX_UDF_FILE_NAME_LEN ];
+ uint8_t *directory;
+ uint32_t lbnum;
+ uint16_t TagID;
+ uint8_t filechar;
+ unsigned int p;
+ uint8_t *cached_dir =3D NULL;
+ uint32_t dir_lba;
+ struct AD tmpICB;
+ int found =3D 0;
+ int in_cache =3D 0;
+
+ /* Scan dir for ICB of file */
+ lbnum =3D partition->Start + Dir.Location;
+ =20
+ if(DVDUDFCacheLevel(device, -1) > 0) {
+ /* caching */
+ =20
+ if(!GetUDFCache(device, LBUDFCache, lbnum, &cached_dir)) {
+ dir_lba =3D (Dir.Length + DVD_VIDEO_LB_LEN) / DVD_VIDEO_LB_LEN;
+ if((cached_dir =3D dvdalign_lbmalloc(device, dir_lba)) =3D=3D NULL=
) {
+ return 0;
+ }
+ if( DVDReadLBUDF( device, lbnum, dir_lba, cached_dir, 0) <=3D 0 ) =
{
+ dvdalign_lbfree(device, cached_dir);
+ cached_dir =3D NULL;
+ }
+ SetUDFCache(device, LBUDFCache, lbnum, &cached_dir);
+ } else {
+ in_cache =3D 1;
+ }
+ =20
+ if(cached_dir =3D=3D NULL) {
+ return 0;
+ }
+ =20
+ p =3D 0;
+ =20
+ while( p < Dir.Length ) {
+ UDFDescriptor( &cached_dir[ p ], &TagID );
+ if( TagID =3D=3D 257 ) {
+ p +=3D UDFFileIdentifier( &cached_dir[ p ], &filechar,
+ filename, &tmpICB );
+ if(cache_file_info && !in_cache) {
+ uint8_t tmpFiletype;
+ struct AD tmpFile;
+ =20
+ if( !strcasecmp( FileName, filename ) ) {
+ *FileICB =3D tmpICB;
+ found =3D 1;
+ =20
+ }
+ UDFMapICB(device, tmpICB, &tmpFiletype,
+ partition, &tmpFile);
+ } else {
+ if( !strcasecmp( FileName, filename ) ) {
+ *FileICB =3D tmpICB;
+ return 1;
+ }
+ }
+ } else {
+ if(cache_file_info && (!in_cache) && found) {
+ return 1;
+ }
+ return 0;
+ }
+ }
+ if(cache_file_info && (!in_cache) && found) {
+ return 1;
+ }
+ return 0;
+ }
+
+ directory =3D dvdalign_lbmalloc(device, 2);
+ if(!directory) {
+ return 0;
+ }
+ if( DVDReadLBUDF( device, lbnum, 2, directory, 0 ) <=3D 0 ) {
+ dvdalign_lbfree(device, directory);
+ return 0;
+ }
+
+ p =3D 0;
+ while( p < Dir.Length ) {
+ if( p > DVD_VIDEO_LB_LEN ) {
+ ++lbnum;
+ p -=3D DVD_VIDEO_LB_LEN;
+ Dir.Length -=3D DVD_VIDEO_LB_LEN;
+ if( DVDReadLBUDF( device, lbnum, 2, directory, 0 ) <=3D 0 ) {
+ dvdalign_lbfree(device, directory);
+ return 0;
+ }
+ }
+ UDFDescriptor( &directory[ p ], &TagID );
+ if( TagID =3D=3D 257 ) {
+ p +=3D UDFFileIdentifier( &directory[ p ], &filechar,
+ filename, FileICB );
+ if( !strcasecmp( FileName, filename ) ) {
+ dvdalign_lbfree(device, directory);
+ return 1;
+ }
+ } else {
+ dvdalign_lbfree(device, directory);
+ return 0;
+ }
+ }
+
+ dvdalign_lbfree(device, directory);
+ return 0;
+}
+
+
+static int UDFGetAVDP( dvd_reader_t *device,
+ struct avdp_t *avdp)
+{
+ uint8_t *Anchor;
+ uint32_t lbnum, MVDS_location, MVDS_length;
+ uint16_t TagID;
+ uint32_t lastsector;
+ int terminate;
+ struct avdp_t;=20
+ =20
+ if(GetUDFCache(device, AVDPCache, 0, avdp)) {
+ return 1;
+ }
+ =20
+ /* Find Anchor */
+ lastsector =3D 0;
+ lbnum =3D 256; /* Try #1, prime anchor */
+ terminate =3D 0;
+ =20
+ Anchor =3D dvdalign_lbmalloc(device, 1);
+ if(!Anchor) {
+ return 0;
+ }
+ for(;;) {
+ if( DVDReadLBUDF( device, lbnum, 1, Anchor, 0 ) > 0 ) {
+ UDFDescriptor( Anchor, &TagID );
+ } else {
+ TagID =3D 0;
+ }
+ if (TagID !=3D 2) {
+ /* Not an anchor */
+ if( terminate ) {
+ dvdalign_lbfree(device, Anchor);
+ errno =3D EMEDIUMTYPE;
+ return 0; /* Final try failed */
+ }=20
+ =20
+ if( lastsector ) {
+ /* We already found the last sector. Try #3, alternative
+ * backup anchor. If that fails, don't try again.
+ */
+ lbnum =3D lastsector;
+ terminate =3D 1;
+ } else {
+ /* TODO: Find last sector of the disc (this is optional). */
+ if( lastsector ) {
+ /* Try #2, backup anchor */
+ lbnum =3D lastsector - 256;
+ } else {
+ /* Unable to find last sector */
+ dvdalign_lbfree(device, Anchor);
+ errno =3D EMEDIUMTYPE;
+ return 0;
+ }
+ }
+ } else {
+ /* It's an anchor! We can leave */
+ break;
+ }
+ }
+ /* Main volume descriptor */
+ UDFExtentAD( &Anchor[ 16 ], &MVDS_length, &MVDS_location );
+ avdp->mvds.location =3D MVDS_location;
+ avdp->mvds.length =3D MVDS_length;
+ =20
+ /* Backup volume descriptor */
+ UDFExtentAD( &Anchor[ 24 ], &MVDS_length, &MVDS_location );
+ avdp->rvds.location =3D MVDS_location;
+ avdp->rvds.length =3D MVDS_length;
+ =20
+ SetUDFCache(device, AVDPCache, 0, avdp);
+ =20
+ dvdalign_lbfree(device, Anchor);
+ return 1;
+}
+
+/**
+ * Looks for partition on the disc. Returns 1 if partition found, 0 on =
error.
+ * partnum: Number of the partition, starting at 0.
+ * part: structure to fill with the partition information
+ */
+static int UDFFindPartition( dvd_reader_t *device, int partnum,
+ struct Partition *part )=20
+{
+ uint8_t *LogBlock;
+ uint32_t lbnum, MVDS_location, MVDS_length;
+ uint16_t TagID;
+ int i, volvalid;
+ struct avdp_t avdp;
+
+ =20
+ if(!UDFGetAVDP(device, &avdp)) {
+ return 0;
+ }
+
+ LogBlock =3D dvdalign_lbmalloc(device, 1);
+ if(!LogBlock) {
+ return 0;
+ }
+ /* Main volume descriptor */
+ MVDS_location =3D avdp.mvds.location;
+ MVDS_length =3D avdp.mvds.length;
+
+ part->valid =3D 0;
+ volvalid =3D 0;
+ part->VolumeDesc[ 0 ] =3D '\0';
+ i =3D 1;
+ do {
+ /* Find Volume Descriptor */
+ lbnum =3D MVDS_location;
+ do {
+
+ if( DVDReadLBUDF( device, lbnum++, 1, LogBlock, 0 ) <=3D 0 ) {
+ TagID =3D 0;
+ } else {
+ UDFDescriptor( LogBlock, &TagID );
+ }
+
+ if( ( TagID =3D=3D 5 ) && ( !part->valid ) ) {
+ /* Partition Descriptor */
+ UDFPartition( LogBlock, &part->Flags, &part->Number,
+ part->Contents, &part->Start, &part->Length );
+ part->valid =3D ( partnum =3D=3D part->Number );
+ } else if( ( TagID =3D=3D 6 ) && ( !volvalid ) ) {
+ /* Logical Volume Descriptor */
+ if( UDFLogVolume( LogBlock, part->VolumeDesc ) ) { =20
+ /* TODO: sector size wrong! */
+ } else {
+ volvalid =3D 1;
+ }
+ }
+
+ } while( ( lbnum <=3D MVDS_location + ( MVDS_length - 1 )
+ / DVD_VIDEO_LB_LEN ) && ( TagID !=3D 8 )
+ && ( ( !part->valid ) || ( !volvalid ) ) );
+
+ if( ( !part->valid) || ( !volvalid ) ) {
+ /* Backup volume descriptor */
+ MVDS_location =3D avdp.mvds.location;
+ MVDS_length =3D avdp.mvds.length;
+ }
+ } while( i-- && ( ( !part->valid ) || ( !volvalid ) ) );
+
+ dvdalign_lbfree(device, LogBlock);
+ /* We only care for the partition, not the volume */
+ return part->valid;
+}
+
+uint32_t UDFFindFile( dvd_reader_t *device, char *filename,
+ uint32_t *filesize )
+{
+ uint8_t *LogBlock;
+ uint32_t lbnum;
+ uint16_t TagID;
+ struct Partition partition;
+ struct AD RootICB, File, ICB =3D {0};
+ char tokenline[ MAX_UDF_FILE_NAME_LEN ];
+ char *token;
+ uint8_t filetype;
+ =20
+ if(filesize) {
+ *filesize =3D 0;
+ }
+ tokenline[0] =3D '\0';
+ strcat( tokenline, filename );
+
+ =20
+ if(!(GetUDFCache(device, PartitionCache, 0, &partition) &&
+ GetUDFCache(device, RootICBCache, 0, &RootICB))) {
+ /* Find partition, 0 is the standard location for DVD Video.*/
+ if( !UDFFindPartition( device, 0, &partition ) ) {
+ return 0;
+ }
+ SetUDFCache(device, PartitionCache, 0, &partition);
+ =20
+ LogBlock =3D dvdalign_lbmalloc(device, 1);
+ if(!LogBlock) {
+ return 0;
+ }
+ /* Find root dir ICB */
+ lbnum =3D partition.Start;
+ do {
+ if( DVDReadLBUDF( device, lbnum++, 1, LogBlock, 0 ) <=3D 0 ) {
+ TagID =3D 0;
+ } else {
+ UDFDescriptor( LogBlock, &TagID );
+ }
+
+ /* File Set Descriptor */
+ if( TagID =3D=3D 256 ) { // File Set Descriptor
+ UDFLongAD( &LogBlock[ 400 ], &RootICB );
+ }
+ } while( ( lbnum < partition.Start + partition.Length )
+ && ( TagID !=3D 8 ) && ( TagID !=3D 256 ) );
+
+ dvdalign_lbfree(device, LogBlock);
+ =20
+ /* Sanity checks. */
+ if( TagID !=3D 256 ) {
+ return 0;
+ }
+ if( RootICB.Partition !=3D 0 ) {
+ return 0;
+ }
+ SetUDFCache(device, RootICBCache, 0, &RootICB);
+ }
+
+ /* Find root dir */
+ if( !UDFMapICB( device, RootICB, &filetype, &partition, &File ) ) {
+ return 0;
+ }
+ if( filetype !=3D 4 ) {
+ return 0; /* Root dir should be dir */
+ }
+ {
+ int cache_file_info =3D 0;
+ /* Tokenize filepath */
+ token =3D strtok(tokenline, "/");
+ =20
+ while( token !=3D NULL ) {
+ =20
+ if( !UDFScanDir( device, File, token, &partition, &ICB,
+ cache_file_info)) {
+ return 0;
+ }
+ if( !UDFMapICB( device, ICB, &filetype, &partition, &File ) ) {
+ return 0;
+ }
+ if(!strcmp(token, "VIDEO_TS")) {
+ cache_file_info =3D 1;
+ }
+ token =3D strtok( NULL, "/" );
+ }
+ }=20
+
+ /* Sanity check. */
+ if( File.Partition !=3D 0 ) {
+ return 0;
+ }
+
+ if(filesize) {
+ *filesize =3D File.Length;
+ }
+ /* Hack to not return partition.Start for empty files. */
+ if( !File.Location ) {
+ return 0;
+ } else {
+ return partition.Start + File.Location;
+ }
+}
+
+
+
+/**
+ * Gets a Descriptor .
+ * Returns 1 if descriptor found, 0 on error.
+ * id, tagid of descriptor
+ * bufsize, size of BlockBuf (must be >=3D DVD_VIDEO_LB_LEN)
+ * and aligned for raw/O_DIRECT read.
+ */
+static int UDFGetDescriptor( dvd_reader_t *device, int id,
+ uint8_t *descriptor, int bufsize)=20
+{
+ uint32_t lbnum, MVDS_location, MVDS_length;
+ struct avdp_t avdp;
+ uint16_t TagID;
+ uint32_t lastsector;
+ int i, terminate;
+ int desc_found =3D 0;
+ /* Find Anchor */
+ lastsector =3D 0;
+ lbnum =3D 256; /* Try #1, prime anchor */
+ terminate =3D 0;
+ if(bufsize < DVD_VIDEO_LB_LEN) {
+ return 0;
+ }
+ =20
+ if(!UDFGetAVDP(device, &avdp)) {
+ return 0;
+ }
+
+ /* Main volume descriptor */
+ MVDS_location =3D avdp.mvds.location;
+ MVDS_length =3D avdp.mvds.length;
+ =20
+ i =3D 1;
+ do {
+ /* Find Descriptor */
+ lbnum =3D MVDS_location;
+ do {
+ =20
+ if( DVDReadLBUDF( device, lbnum++, 1, descriptor, 0 ) <=3D 0 ) {
+ TagID =3D 0;
+ } else {
+ UDFDescriptor( descriptor, &TagID );
+ }
+ =20
+ if( (TagID =3D=3D id) && ( !desc_found ) ) {
+ /* Descriptor */
+ desc_found =3D 1;
+ }
+ } while( ( lbnum <=3D MVDS_location + ( MVDS_length - 1 )
+ / DVD_VIDEO_LB_LEN ) && ( TagID !=3D 8 )
+ && ( !desc_found) );
+ =20
+ if( !desc_found ) {
+ /* Backup volume descriptor */
+ MVDS_location =3D avdp.rvds.location;
+ MVDS_length =3D avdp.rvds.length;
+ }
+ } while( i-- && ( !desc_found ) );
+
+ =20
+ return desc_found;
+}
+
+
+static int UDFGetPVD(dvd_reader_t *device, struct pvd_t *pvd)
+{
+ uint8_t *pvd_buf;
+ =20
+ if(GetUDFCache(device, PVDCache, 0, pvd)) {
+ return 1;
+ }
+ =20
+ pvd_buf =3D dvdalign_lbmalloc(device, 1);
+ if(!pvd_buf) {
+ return 0;
+ }
+ if(!UDFGetDescriptor( device, 1, pvd_buf, 1*DVD_VIDEO_LB_LEN)) {
+ dvdalign_lbfree(device, pvd_buf);
+ return 0;
+ }
+ =20
+ memcpy(pvd->VolumeIdentifier, &pvd_buf[24], 32);
+ memcpy(pvd->VolumeSetIdentifier, &pvd_buf[72], 128);
+ SetUDFCache(device, PVDCache, 0, pvd);
+ =20
+ dvdalign_lbfree(device, pvd_buf);
+
+ return 1;
+}
+
+/**
+ * Gets the Volume Identifier string, in 8bit unicode (latin-1)
+ * volid, place to put the string
+ * volid_size, size of the buffer volid points to
+ * returns the size of buffer needed for all data
+ */
+int UDFGetVolumeIdentifier(dvd_reader_t *device, char *volid,
+ unsigned int volid_size)
+{
+ struct pvd_t pvd;
+ unsigned int volid_len;
+
+ /* get primary volume descriptor */
+ if(!UDFGetPVD(device, &pvd)) {
+ return 0;
+ }
+
+ volid_len =3D pvd.VolumeIdentifier[31];
+ if(volid_len > 31) {
+ /* this field is only 32 bytes something is wrong */
+ volid_len =3D 31;
+ }
+ if(volid_size > volid_len) {
+ volid_size =3D volid_len;
+ }
+ Unicodedecode(pvd.VolumeIdentifier, volid_size, volid);
+ =20
+ return volid_len;
+}
+
+/**
+ * Gets the Volume Set Identifier, as a 128-byte dstring (not decoded)
+ * WARNING This is not a null terminated string
+ * volsetid, place to put the data
+ * volsetid_size, size of the buffer volsetid points to=20
+ * the buffer should be >=3D128 bytes to store the whole volumesetidenti=
fier
+ * returns the size of the available volsetid information (128)
+ * or 0 on error
+ */
+int UDFGetVolumeSetIdentifier(dvd_reader_t *device, uint8_t *volsetid,
+ unsigned int volsetid_size)
+{
+ struct pvd_t pvd;
+
+ /* get primary volume descriptor */
+ if(!UDFGetPVD(device, &pvd)) {
+ return 0;
+ }
+
+
+ if(volsetid_size > 128) {
+ volsetid_size =3D 128;
+ }
+ =20
+ memcpy(volsetid, pvd.VolumeSetIdentifier, volsetid_size);
+ =20
+ return 128;
+}
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_udf.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_udf.h 2007-03-10 21:=
38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvd_udf.h 2007-03-10 21:=
41:34 UTC (rev 1290)
@@ -0,0 +1,66 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef DVD_UDF_H_INCLUDED
+#define DVD_UDF_H_INCLUDED
+
+/*
+ * This code is based on dvdudf by:
+ * Christian Wolff <scarabaeus at convergence.de>.
+ *
+ * Modifications by:
+ * Billy Biggs <vektor at dumbterm.net>.
+ * Bj=F6rn Englund <d4bjorn at dtek.chalmers.se>.
+ *=20
+ * dvdudf: parse and read the UDF volume information of a DVD Video
+ * Copyright (C) 1999 Christian Wolff for convergence integrated media
+ * GmbH The author can be reached at scarabaeus at convergence.de, the
+ * project's page is at http://linuxtv.org/dvd/
+ *=20
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *=20
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *=20
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA. Or, point your browser to
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#include "dvd_reader.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Looks for a file on the UDF disc/imagefile and returns the block numb=
er
+ * where it begins, or 0 if it is not found. The filename should be an
+ * absolute pathname on the UDF filesystem, starting with '/'. For exam=
ple,
+ * '/VIDEO_TS/VTS_01_1.IFO'. On success, filesize will be set to the si=
ze of
+ * the file in bytes.
+ * This implementation relies on that the file size is less than 2^32
+ * A DVD file can at most be 2^30 (-2048 ?).
+ */
+uint32_t UDFFindFile( dvd_reader_t *device, char *filename, uint32_t *si=
ze );
+ =20
+void FreeUDFCache(dvd_reader_t *device, void *cache);
+int UDFGetVolumeIdentifier(dvd_reader_t *device,
+ char *volid, unsigned int volid_size);
+int UDFGetVolumeSetIdentifier(dvd_reader_t *device,
+ uint8_t *volsetid, unsigned int volsetid_s=
ize);
+#ifdef __cplusplus
+};
+#endif
+#endif /* DVD_UDF_H_INCLUDED */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvdread.proj
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvdread.proj 2007-03-10 =
21:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvdread.proj 2007-03-10 =
21:41:34 UTC (rev 1290)
@@ -0,0 +1,35 @@
+#include "*/*.proj"
+
+LIB dvdread
+{
+ USE(TARGET_WIN) c99msvc
+ USE(TARGET_WIN) posixmsvc
+ DEFINE STDC_HEADERS
+
+ SOURCE cmd_print.c
+ SOURCE dvd_input.c
+ SOURCE dvd_reader.c
+ SOURCE dvd_udf.c
+ SOURCE ifo_print.c
+ SOURCE ifo_read.c
+ SOURCE md5.c
+ SOURCE nav_print.c
+ SOURCE nav_read.c
+
+ HEADER bswap.h
+ HEADER cmd_print.h
+ HEADER dvd_input.h
+ HEADER dvd_reader.h
+ HEADER dvd_udf.h
+ HEADER dvdread_internal.h
+ HEADER ifo_print.h
+ HEADER ifo_read.h
+ HEADER ifo_types.h
+ HEADER md5.h
+ HEADER nav_print.h
+ HEADER nav_read.h
+ HEADER nav_types.h
+ =20
+ INCLUDE(TARGET_WIN) ../win32
+ INCLUDE ..
+}
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvdread_internal.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvdread_internal.h 2007-=
03-10 21:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/dvdread_internal.h 2007-=
03-10 21:41:34 UTC (rev 1290)
@@ -0,0 +1,18 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef DVDREAD_INTERNAL_H
+#define DVDREAD_INTERNAL_H
+
+
+#define CHECK_VALUE(arg) =
\
+ if(!(arg)) { =
\
+ fprintf(stderr, "\n*** libdvdread: CHECK_VALUE failed in %s:%i ***" =
\
+ "\n*** for %s ***\n\n", =
\
+ __FILE__, __LINE__, # arg ); =
\
+ }
+
+
+int get_verbose(void);
+int dvdread_verbose(dvd_reader_t *dvd);
+dvd_reader_t *device_of_file(dvd_file_t *file);
+
+#endif /* DVDREAD_INTERNAL_H */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_print.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_print.c 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_print.c 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,1188 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*=20
+ * Copyright (C) 2000, 2001, 2002, 2003
+ * Bj=F6rn Englund <d4bjorn at dtek.chalmers.se>,=20
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <ctype.h>
+
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#include "ifo_types.h"
+#include "ifo_read.h"
+#include "ifo_print.h"
+#include "cmd_print.h"
+#include "dvdread_internal.h"
+
+/* Put this in some other file / package? It's used in nav_print too. *=
/
+static void ifoPrint_time(dvd_time_t *dtime) {
+ const char *rate;
+ CHECK_VALUE((dtime->hour>>4) < 0xa && (dtime->hour&0xf) < 0xa);
+ CHECK_VALUE((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa);
+ CHECK_VALUE((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa);
+ CHECK_VALUE((dtime->frame_u&0xf) < 0xa);
+ =20
+ printf("%02x:%02x:%02x.%02x",=20
+ dtime->hour,
+ dtime->minute,
+ dtime->second,
+ dtime->frame_u & 0x3f);
+ switch((dtime->frame_u & 0xc0) >> 6) {
+ case 1:
+ rate =3D "25.00";
+ break;
+ case 3:
+ rate =3D "29.97";
+ break;
+ default:
+ if(dtime->hour =3D=3D 0 && dtime->minute =3D=3D 0=20
+ && dtime->second =3D=3D 0 && dtime->frame_u =3D=3D 0)
+ rate =3D "no";
+ else
+ rate =3D "(please send a bug report)";
+ break;
+ }=20
+ printf(" @ %s fps", rate);
+}
+
+static void ifoPrint_video_attributes(video_attr_t *attr) {
+ =20
+ /* The following test is shorter but not correct ISO C,
+ memcmp(attr,my_friendly_zeros, sizeof(video_attr_t)) */
+ if(attr->mpeg_version =3D=3D 0=20
+ && attr->video_format =3D=3D 0=20
+ && attr->display_aspect_ratio =3D=3D 0=20
+ && attr->permitted_df =3D=3D 0=20
+ && attr->unknown1 =3D=3D 0=20
+ && attr->line21_cc_1 =3D=3D 0=20
+ && attr->line21_cc_2 =3D=3D 0=20
+ && attr->bit_rate =3D=3D 0=20
+ && attr->video_format =3D=3D 0=20
+ && attr->letterboxed =3D=3D 0=20
+ && attr->film_mode =3D=3D 0) {
+ printf("-- Unspecified --");
+ return;
+ }
+ =20
+ switch(attr->mpeg_version) {
+ case 0:
+ printf("mpeg1 ");
+ break;
+ case 1:
+ printf("mpeg2 ");
+ break;
+ default:
+ printf("(please send a bug report) ");
+ }
+ =20
+ switch(attr->video_format) {
+ case 0:
+ printf("ntsc ");
+ break;
+ case 1:
+ printf("pal ");
+ break;
+ default:
+ printf("(please send a bug report) ");
+ }
+ =20
+ switch(attr->display_aspect_ratio) {
+ case 0:
+ printf("4:3 ");
+ break;
+ case 3:
+ printf("16:9 ");
+ break;
+ default:
+ printf("(please send a bug report) ");
+ }
+ =20
+ // Wide is allways allowed..!!!
+ switch(attr->permitted_df) {
+ case 0:
+ printf("pan&scan+letterboxed ");
+ break;
+ case 1:
+ printf("only pan&scan "); //??
+ break;
+ case 2:
+ printf("only letterboxed ");
+ break;
+ case 3:
+ // not specified
+ break;
+ default:
+ printf("(please send a bug report)");
+ }
+ =20
+ printf("U%x ", attr->unknown1);
+ CHECK_VALUE(!attr->unknown1);
+ =20
+ if(attr->line21_cc_1 || attr->line21_cc_2) {
+ printf("NTSC CC ");
+ if(attr->line21_cc_1)
+ printf("1 ");
+ if(attr->line21_cc_2)
+ printf("2 ");
+ }
+
+ switch(attr->bit_rate) {
+ case 0:
+ printf("Variable Bit Rate ");
+ break;
+ case 1:
+ printf("Constant Bit Rate ");
+ break;
+ default:
+ printf("(please send a bug report)");
+ }
+ =20
+ {
+ int height =3D 480;
+ if(attr->video_format !=3D 0)=20
+ height =3D 576;
+ switch(attr->picture_size) {
+ case 0:
+ printf("720x%d ", height);
+ break;
+ case 1:
+ printf("704x%d ", height);
+ break;
+ case 2:
+ printf("352x%d ", height);
+ break;
+ case 3:
+ printf("352x%d ", height/2);
+ break; =20
+ default:
+ printf("(please send a bug report) ");
+ }
+ }
+
+ if(attr->letterboxed) {
+ printf("source letterboxed ");
+ }
+ =20
+ if(attr->film_mode) {
+ printf("film");
+ } else {
+ printf("video"); //camera
+ }
+}
+
+static void ifoPrint_audio_attributes(audio_attr_t *attr) {
+ =20
+ if(attr->audio_format =3D=3D 0
+ && attr->multichannel_extension =3D=3D 0
+ && attr->lang_type =3D=3D 0
+ && attr->application_mode =3D=3D 0
+ && attr->quantization =3D=3D 0
+ && attr->sample_frequency =3D=3D 0
+ && attr->channels =3D=3D 0
+ && attr->lang_code =3D=3D 0
+ && attr->lang_extension =3D=3D 0
+ && attr->code_extension =3D=3D 0
+ && attr->unknown3 =3D=3D 0
+ && attr->unknown1 =3D=3D 0) {
+ printf("-- Unspecified --");
+ return;
+ }
+ =20
+ switch(attr->audio_format) {
+ case 0:
+ printf("ac3 ");
+ break;
+ case 1:
+ printf("(please send a bug report) ");
+ break;
+ case 2:
+ printf("mpeg1 ");
+ break;
+ case 3:
+ printf("mpeg2ext ");
+ break;
+ case 4:
+ printf("lpcm ");
+ break;
+ case 5:
+ printf("(please send a bug report) ");
+ break;
+ case 6:
+ printf("dts ");
+ break;
+ default:
+ printf("(please send a bug report) ");
+ }
+ =20
+ if(attr->multichannel_extension)
+ printf("multichannel_extension ");
+ =20
+ switch(attr->lang_type) {
+ case 0:
+ // not specified
+ CHECK_VALUE(attr->lang_code =3D=3D 0 || attr->lang_code =3D=3D 0xfff=
f);
+ break;
+ case 1:
+ printf("%c%c (%c) ", attr->lang_code>>8, attr->lang_code & 0xff,
+ attr->lang_extension ? attr->lang_extension : ' ');
+ if(attr->lang_extension) {
+ printf("(please send a bug report) lang_extension !=3D 0");
+ }
+ break;
+ default:
+ printf("(please send a bug report) ");
+ }
+
+ switch(attr->application_mode) {
+ case 0:
+ // not specified
+ break;
+ case 1:
+ printf("karaoke mode ");
+ break;
+ case 2:
+ printf("surround sound mode ");
+ break;
+ default:
+ printf("(please send a bug report) ");
+ }
+ =20
+ switch(attr->audio_format) {
+ case 0: //ac3
+ if(attr->quantization !=3D 3) {
+ printf("(please send a bug report) ac3 quant/drc not 3 (%d)",
+ attr->quantization);
+ }
+ break;
+ case 2: //mpeg 1 or mpeg 2 without extension stream
+ case 3: //mpeg 2 with extension stream
+ switch(attr->quantization) {
+ case 0: //no drc
+ printf("no drc ");
+ break;
+ case 1:
+ printf("drc ");
+ break;
+ default:
+ printf("(please send a bug report) mpeg reserved quant/drc (%d)",
+ attr->quantization);
+ break;
+ }
+ break;
+ case 4:
+ switch(attr->quantization) {
+ case 0:
+ printf("16bit ");
+ break;
+ case 1:
+ printf("20bit ");
+ break;
+ case 2:
+ printf("24bit ");
+ break;
+ case 3:
+ printf("(please send a bug report) lpcm reserved quant/drc (%d)",
+ attr->quantization);
+ break;
+ }
+ break;
+ case 6: //dts
+ if(attr->quantization !=3D 3) {
+ printf("(please send a bug report) dts quant/drc not 3 (%d)",
+ attr->quantization);
+ }
+ break;
+ default:
+ break;
+ }
+
+ switch(attr->sample_frequency) {
+ case 0:
+ printf("48kHz ");
+ break;
+ case 1:
+ printf("96kHz ");
+ break;
+ default:
+ printf("sample_frequency %i (please send a bug report) ",=20
+ attr->sample_frequency);
+ }
+ =20
+ printf("%dCh ", attr->channels + 1);
+ =20
+ switch(attr->code_extension) {
+ case 0:
+ printf("Not specified ");
+ break;
+ case 1: // Normal audio
+ printf("Normal Caption ");
+ break;
+ case 2: // visually imparied
+ printf("Audio for visually impaired ");
+ break;
+ case 3: // Directors 1
+ printf("Director's comments 1 ");
+ break;
+ case 4: // Directors 2
+ printf("Director's comments 2 ");
+ break;
+ //case 4: // Music score ? =20
+ default:
+ printf("(please send a bug report) ");
+ }
+ =20
+ printf("%d ", attr->unknown3);
+ if(attr->application_mode =3D=3D 1) {
+ printf("ca=3D%d ", attr->app_info.karaoke.channel_assignment);
+ printf("%d ", attr->app_info.karaoke.version);
+ if(attr->app_info.karaoke.mc_intro)=20
+ printf("mc intro ");
+ printf("%s ", attr->app_info.karaoke.mode ? "duet" : "solo");
+ printf("%d ", attr->app_info.karaoke.unknown4);
+ }
+ if(attr->application_mode =3D=3D 2) {
+ if(attr->app_info.surround.dolby_encoded) {
+ printf("dolby surround ");
+ }
+ printf("%d ", attr->app_info.surround.unknown5);
+ printf("%d ", attr->app_info.surround.unknown6);
+ } =20
+}
+
+static void ifoPrint_subp_attributes(subp_attr_t *attr) {
+ =20
+ if(attr->type =3D=3D 0
+ && attr->code_mode =3D=3D 0
+ && attr->lang_code =3D=3D 0
+ && attr->lang_extension =3D=3D 0
+ && attr->zero1 =3D=3D 0
+ && attr->zero2 =3D=3D 0
+ && attr->code_extension =3D=3D 0) {
+ printf("-- Unspecified --");
+ return;
+ }
+ =20
+ switch(attr->code_mode) {
+ case 0:
+ printf("Coding Mode RLE ");
+ break;
+ case 1:
+ printf("Coding Mode Extended ");
+ break;
+ default:
+ printf("(please send a bug report) ");
+ } =20
+=20
+ if(attr->type =3D=3D 1) {
+ if(isalpha((int)(attr->lang_code >> 8))
+ && isalpha((int)(attr->lang_code & 0xff))) {
+ printf("%c%c ", attr->lang_code >> 8, attr->lang_code & 0xff);
+ } else {
+ printf("%02x%02x ", attr->lang_code >> 8, attr->lang_code & 0xff);
+ }
+ } else {
+ printf("lang not specified ");
+ }
+ =20
+ printf("%d ", attr->zero1);
+ printf("%d ", attr->zero2);
+ printf("%d ", attr->lang_extension);
+ =20
+ switch(attr->code_extension) {
+ case 0:
+ printf("Not specified ");
+ break;
+ case 1:
+ printf("Caption with normal size character ");
+ break;
+ case 2:
+ printf("Caption with bigger size character ");
+ break;
+ case 3:=20
+ printf("Caption for children ");
+ break;
+ case 4:
+ printf("reserved ");
+ break;
+ case 5:
+ printf("Closed Caption with normal size character ");
+ break;
+ case 6:
+ printf("Closed Caption with bigger size character ");
+ break;
+ case 7:
+ printf("Closed Caption for children ");
+ break;
+ case 8:
+ printf("reserved ");
+ break;
+ case 9:
+ printf("Forced Caption");
+ break;
+ case 10:
+ printf("reserved ");
+ break;
+ case 11:
+ printf("reserved ");
+ break;
+ case 12:
+ printf("reserved ");
+ break;
+ case 13:
+ printf("Director's comments with normal size character ");
+ break;
+ case 14:
+ printf("Director's comments with bigger size character ");
+ break;
+ case 15:
+ printf("Director's comments for children ");
+ break;
+ default:
+ printf("(please send a bug report) ");
+ }
+
+}
+
+
+static void ifoPrint_USER_OPS(user_ops_t *user_ops) {
+ uint32_t uops;
+ unsigned char *ptr =3D (unsigned char *)user_ops;
+ =20
+ uops =3D (*ptr++ << 24);
+ uops |=3D (*ptr++ << 16);
+ uops |=3D (*ptr++ << 8);
+ uops |=3D (*ptr++);
+ =20
+ if(uops =3D=3D 0) {
+ printf("None\n");
+ } else if(uops =3D=3D 0x01ffffff) {
+ printf("All\n");
+ } else {
+ if(user_ops->title_or_time_play)
+ printf("Title or Time Play, ");
+ if(user_ops->chapter_search_or_play)
+ printf("Chapter Search or Play, ");
+ if(user_ops->title_play)
+ printf("Title Play, ");
+ if(user_ops->stop)
+ printf("Stop, ");
+ if(user_ops->go_up)
+ printf("Go Up, ");
+ if(user_ops->time_or_chapter_search)
+ printf("Time or Chapter Search, ");
+ if(user_ops->prev_or_top_pg_search)
+ printf("Prev or Top PG Search, ");
+ if(user_ops->next_pg_search)
+ printf("Next PG Search, ");
+ if(user_ops->forward_scan)
+ printf("Forward Scan, ");
+ if(user_ops->backward_scan)
+ printf("Backward Scan, ");
+ if(user_ops->title_menu_call)
+ printf("Title Menu Call, ");
+ if(user_ops->root_menu_call)
+ printf("Root Menu Call, ");
+ if(user_ops->subpic_menu_call)
+ printf("SubPic Menu Call, ");
+ if(user_ops->audio_menu_call)
+ printf("Audio Menu Call, ");
+ if(user_ops->angle_menu_call)
+ printf("Angle Menu Call, ");
+ if(user_ops->chapter_menu_call)
+ printf("Chapter Menu Call, ");
+ if(user_ops->resume)
+ printf("Resume, ");
+ if(user_ops->button_select_or_activate)
+ printf("Button Select or Activate, ");
+ if(user_ops->still_off)
+ printf("Still Off, ");
+ if(user_ops->pause_on)
+ printf("Pause On, ");
+ if(user_ops->audio_stream_change)
+ printf("Audio Stream Change, ");
+ if(user_ops->subpic_stream_change)
+ printf("SubPic Stream Change, ");
+ if(user_ops->angle_change)
+ printf("Angle Change, ");
+ if(user_ops->karaoke_audio_pres_mode_change)
+ printf("Karaoke Audio Pres Mode Change, ");
+ if(user_ops->video_pres_mode_change)
+ printf("Video Pres Mode Change, ");
+ printf("\n");
+ }
+}
+
+
+void ifoPrint_VMGI_MAT(vmgi_mat_t *vmgi_mat) {
+ =20
+ printf("VMG Identifier: %.12s\n", vmgi_mat->vmg_identifier);
+ printf("Last Sector of VMG: %08x\n", vmgi_mat->vmg_last_sector);
+ printf("Last Sector of VMGI: %08x\n", vmgi_mat->vmgi_last_sector);
+ printf("Specification version number: %01x.%01x\n",=20
+ vmgi_mat->specification_version >> 4,=20
+ vmgi_mat->specification_version & 0xf);
+ /* Byte 2 of 'VMG Category' (00xx0000) is the Region Code */
+ printf("VMG Category: %08x\n", vmgi_mat->vmg_category);
+ printf("VMG Number of Volumes: %i\n", vmgi_mat->vmg_nr_of_volumes);
+ printf("VMG This Volume: %i\n", vmgi_mat->vmg_this_volume_nr);
+ printf("Disc side %i\n", vmgi_mat->disc_side);
+ printf("VMG Number of Title Sets %i\n", vmgi_mat->vmg_nr_of_title_sets=
);
+ printf("Provider ID: %.32s\n", vmgi_mat->provider_identifier);
+ printf("VMG POS Code: %08x", (uint32_t)(vmgi_mat->vmg_pos_code >> 32))=
;
+ printf("%08x\n", (uint32_t)vmgi_mat->vmg_pos_code);
+ printf("End byte of VMGI_MAT: %08x\n", vmgi_mat->vmgi_last_byte);
+ printf("Start byte of First Play PGC FP PGC: %08x\n",=20
+ vmgi_mat->first_play_pgc);
+ printf("Start sector of VMGM_VOBS: %08x\n", vmgi_mat->vmgm_vobs);
+ printf("Start sector of TT_SRPT: %08x\n", vmgi_mat->tt_srpt);
+ printf("Start sector of VMGM_PGCI_UT: %08x\n", vmgi_mat->vmgm_pgci_ut)=
;
+ printf("Start sector of PTL_MAIT: %08x\n", vmgi_mat->ptl_mait);
+ printf("Start sector of VTS_ATRT: %08x\n", vmgi_mat->vts_atrt);
+ printf("Start sector of TXTDT_MG: %08x\n", vmgi_mat->txtdt_mgi);
+ printf("Start sector of VMGM_C_ADT: %08x\n", vmgi_mat->vmgm_c_adt);
+ printf("Start sector of VMGM_VOBU_ADMAP: %08x\n",=20
+ vmgi_mat->vmgm_vobu_admap);
+ printf("Video attributes of VMGM_VOBS: ");
+ ifoPrint_video_attributes(&vmgi_mat->vmgm_video_attr);
+ printf("\n");
+ printf("VMGM Number of Audio attributes: %i\n",=20
+ vmgi_mat->nr_of_vmgm_audio_streams);
+ if(vmgi_mat->nr_of_vmgm_audio_streams > 0) {
+ printf("\tstream %i status: ", 1);
+ ifoPrint_audio_attributes(&vmgi_mat->vmgm_audio_attr);
+ printf("\n");
+ }
+ printf("VMGM Number of Sub-picture attributes: %i\n",=20
+ vmgi_mat->nr_of_vmgm_subp_streams);
+ if(vmgi_mat->nr_of_vmgm_subp_streams > 0) {
+ printf("\tstream %2i status: ", 1);
+ ifoPrint_subp_attributes(&vmgi_mat->vmgm_subp_attr);
+ printf("\n");
+ }
+}
+
+
+void ifoPrint_VTSI_MAT(vtsi_mat_t *vtsi_mat) {
+ int i;
+
+ printf("VTS Identifier: %.12s\n", vtsi_mat->vts_identifier);
+ printf("Last Sector of VTS: %08x\n", vtsi_mat->vts_last_sector);
+ printf("Last Sector of VTSI: %08x\n", vtsi_mat->vtsi_last_sector);
+ printf("Specification version number: %01x.%01x\n",=20
+ vtsi_mat->specification_version>>4,=20
+ vtsi_mat->specification_version&0xf);
+ printf("VTS Category: %08x\n", vtsi_mat->vts_category);
+ printf("End byte of VTSI_MAT: %08x\n", vtsi_mat->vtsi_last_byte);
+ printf("Start sector of VTSM_VOBS: %08x\n", vtsi_mat->vtsm_vobs);
+ printf("Start sector of VTSTT_VOBS: %08x\n", vtsi_mat->vtstt_vobs);
+ printf("Start sector of VTS_PTT_SRPT: %08x\n", vtsi_mat->vts_ptt_srpt)=
;
+ printf("Start sector of VTS_PGCIT: %08x\n", vtsi_mat->vts_pgcit);
+ printf("Start sector of VTSM_PGCI_UT: %08x\n", vtsi_mat->vtsm_pgci_ut)=
;
+ printf("Start sector of VTS_TMAPT: %08x\n", vtsi_mat->vts_tmapt);
+ printf("Start sector of VTSM_C_ADT: %08x\n", vtsi_mat->vtsm_c_adt=
);
+ printf("Start sector of VTSM_VOBU_ADMAP: %08x\n",vtsi_mat->vtsm_vobu_a=
dmap);
+ printf("Start sector of VTS_C_ADT: %08x\n", vtsi_mat->vts_c_adt)=
;
+ printf("Start sector of VTS_VOBU_ADMAP: %08x\n", vtsi_mat->vts_vobu_a=
dmap);
+
+ printf("Video attributes of VTSM_VOBS: ");
+ ifoPrint_video_attributes(&vtsi_mat->vtsm_video_attr);
+ printf("\n");
+ =20
+ printf("VTSM Number of Audio attributes: %i\n",=20
+ vtsi_mat->nr_of_vtsm_audio_streams);
+ if(vtsi_mat->nr_of_vtsm_audio_streams > 0) {
+ printf("\tstream %i status: ", 1);
+ ifoPrint_audio_attributes(&vtsi_mat->vtsm_audio_attr);
+ printf("\n");
+ }
+ =20
+ printf("VTSM Number of Sub-picture attributes: %i\n",=20
+ vtsi_mat->nr_of_vtsm_subp_streams);
+ if(vtsi_mat->nr_of_vtsm_subp_streams > 0) {
+ printf("\tstream %2i status: ", 1);
+ ifoPrint_subp_attributes(&vtsi_mat->vtsm_subp_attr);
+ printf("\n");
+ }
+ =20
+ printf("Video attributes of VTS_VOBS: ");
+ ifoPrint_video_attributes(&vtsi_mat->vts_video_attr);
+ printf("\n");
+ =20
+ printf("VTS Number of Audio attributes: %i\n",=20
+ vtsi_mat->nr_of_vts_audio_streams);
+ for(i =3D 0; i < vtsi_mat->nr_of_vts_audio_streams; i++) {
+ printf("\tstream %i status: ", i);
+ ifoPrint_audio_attributes(&vtsi_mat->vts_audio_attr[i]);
+ printf("\n");
+ }
+ =20
+ printf("VTS Number of Subpicture attributes: %i\n",=20
+ vtsi_mat->nr_of_vts_subp_streams);
+ for(i =3D 0; i < vtsi_mat->nr_of_vts_subp_streams; i++) {
+ printf("\tstream %2i status: ", i);
+ ifoPrint_subp_attributes(&vtsi_mat->vts_subp_attr[i]);
+ printf("\n");
+ }
+ =20
+ /* FIXME: Add printing of MultiChannel Extension */
+}
+
+
+static void ifoPrint_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl) {
+ int i;
+ =20
+ if(cmd_tbl =3D=3D NULL) {
+ printf("No Command table present\n");
+ return;
+ }
+ =20
+ printf("Number of Pre commands: %i\n", cmd_tbl->nr_of_pre);
+ for(i =3D 0; i < cmd_tbl->nr_of_pre; i++) {
+ cmdPrint_CMD(i, &cmd_tbl->pre_cmds[i]);
+ }
+
+ printf("Number of Post commands: %i\n", cmd_tbl->nr_of_post);
+ for(i =3D 0; i < cmd_tbl->nr_of_post; i++) {
+ cmdPrint_CMD(i, &cmd_tbl->post_cmds[i]);
+ }
+
+ printf("Number of Cell commands: %i\n", cmd_tbl->nr_of_cell);
+ for(i =3D 0; i < cmd_tbl->nr_of_cell; i++) {
+ cmdPrint_CMD(i, &cmd_tbl->cell_cmds[i]);
+ }
+}
+
+
+static void ifoPrint_PGC_PROGRAM_MAP(pgc_program_map_t *program_map, int=
nr) {
+ int i;
+ =20
+ if(program_map =3D=3D NULL) {
+ printf("No Program map present\n");
+ return;
+ }
+ =20
+ for(i =3D 0; i < nr; i++) {
+ printf("Program %3i Entry Cell: %3i\n", i + 1, program_map[i]);
+ }
+}
+
+
+static void ifoPrint_CELL_PLAYBACK(cell_playback_t *cell_playback, int n=
r) {
+ int i;
+ =20
+ if(cell_playback =3D=3D NULL) {
+ printf("No Cell Playback info present\n");
+ return;
+ }
+ =20
+ for(i=3D0;i<nr;i++) {
+ printf("Cell: %3i ", i + 1);
+
+ ifoPrint_time(&cell_playback[i].playback_time);
+ printf("\t");
+
+ if(cell_playback[i].block_mode || cell_playback[i].block_type) {
+ const char *s;
+ switch(cell_playback[i].block_mode) {
+ case 0:
+ s =3D "not a"; break;
+ case 1:
+ s =3D "the first"; break;
+ case 2:
+ default:
+ s =3D ""; break;
+ case 3:
+ s =3D "last"; break;
+ }
+ printf("%s cell in the block ", s);
+ =20
+ switch(cell_playback[i].block_type) {
+ case 0:
+ printf("not part of the block ");
+ break;
+ case 1:
+ printf("angle block ");
+ break;
+ case 2:
+ case 3:
+ printf("(send bug repport) ");
+ break;
+ }
+ }
+ if(cell_playback[i].seamless_play)
+ printf("presented seamlessly ");
+ if(cell_playback[i].interleaved)
+ printf("cell is interleaved ");
+ if(cell_playback[i].stc_discontinuity)
+ printf("STC_discontinuty ");
+ if(cell_playback[i].seamless_angle)
+ printf("only seamless angle ");
+ if(cell_playback[i].restricted)
+ printf("restricted cell ");
+ =20
+ if(cell_playback[i].still_time)
+ printf("still time %d ", cell_playback[i].still_time);
+ if(cell_playback[i].cell_cmd_nr)
+ printf("cell command %d", cell_playback[i].cell_cmd_nr);
+ =20
+ printf("\n\tStart sector: %08x\tFirst ILVU end sector: %08x\n",=20
+ cell_playback[i].first_sector,=20
+ cell_playback[i].first_ilvu_end_sector);
+ printf("\tEnd sector: %08x\tLast VOBU start sector: %08x\n",=20
+ cell_playback[i].last_sector,=20
+ cell_playback[i].last_vobu_start_sector);
+ }
+}
+
+static void ifoPrint_CELL_POSITION(cell_position_t *cell_position, int n=
r) {
+ int i;
+ =20
+ if(cell_position =3D=3D NULL) {
+ printf("No Cell Position info present\n");
+ return;
+ }
+ =20
+ for(i=3D0;i<nr;i++) {
+ printf("Cell: %3i has VOB ID: %3i, Cell ID: %3i\n", i + 1,=20
+ cell_position[i].vob_id_nr, cell_position[i].cell_nr);
+ }
+}
+
+
+void ifoPrint_PGC(pgc_t *pgc) {
+ int i;
+ =20
+ if(pgc =3D=3D NULL) {
+ printf("Error: No PGC present\n");
+ return;
+ }
+
+ printf("Number of Programs: %i\n", pgc->nr_of_programs);
+ printf("Number of Cells: %i\n", pgc->nr_of_cells);
+ /* Check that time is 0:0:0:0 also if nr_of_programs=3D=3D0 */
+ printf("Playback time: ");
+ ifoPrint_time(&pgc->playback_time); printf("\n");
+
+ /* If no programs/no time then does this mean anything? */
+ printf("Prohibited user operations: ");
+ ifoPrint_USER_OPS(&pgc->prohibited_ops);
+ =20
+ for(i =3D 0; i < 8; i++) {
+ if(pgc->audio_control[i] & 0x8000) { /* The 'is present' bit */
+ printf("Audio stream %i control: %04x\n",=20
+ i, pgc->audio_control[i]);
+ }
+ }
+ =20
+ for(i =3D 0; i < 32; i++) {
+ if(pgc->subp_control[i] & 0x80000000) { /* The 'is present' bit */
+ printf("Subpicture stream %2i control: %08x\n",=20
+ i, pgc->subp_control[i]);
+ }
+ }
+ =20
+ printf("Next PGC number: %i\n", pgc->next_pgc_nr);
+ printf("Prev PGC number: %i\n", pgc->prev_pgc_nr);
+ printf("GoUp PGC number: %i\n", pgc->goup_pgc_nr);
+ if(pgc->nr_of_programs !=3D 0) {
+ printf("Still time: %i seconds (255=3Dinf)\n", pgc->still_time);
+ if(pgc->pg_playback_mode =3D=3D 0)
+ printf("PG Playback mode: Sequential\n");
+ else if(!(pgc->pg_playback_mode & 0x80))
+ printf("PG Playback mode: Random %i\n", pgc->pg_playback_mode);
+ else
+ printf("PG Playback mode: Shuffle %i\n", pgc->pg_playback_mode & 0=
x7f );
+ }
+ =20
+ if(pgc->nr_of_programs !=3D 0) {
+ for(i =3D 0; i < 16; i++) {
+ printf("Color %2i: %08x\n", i, pgc->palette[i]);
+ }
+ }
+ =20
+ /* Memmory offsets to div. tables. */
+ ifoPrint_PGC_COMMAND_TBL(pgc->command_tbl);
+ ifoPrint_PGC_PROGRAM_MAP(pgc->program_map, pgc->nr_of_programs);
+ ifoPrint_CELL_PLAYBACK(pgc->cell_playback, pgc->nr_of_cells);
+ ifoPrint_CELL_POSITION(pgc->cell_position, pgc->nr_of_cells);
+}
+
+
+void ifoPrint_TT_SRPT(tt_srpt_t *tt_srpt) {
+ int i;
+ =20
+ printf("Number of TitleTrack search pointers: %i\n",
+ tt_srpt->nr_of_srpts);
+ for(i=3D0;i<tt_srpt->nr_of_srpts;i++) {
+ printf("Title Track index %i\n", i + 1);
+ printf("\tTitle set number (VTS): %i",=20
+ tt_srpt->title[i].title_set_nr);
+ printf("\tVTS_TTN: %i\n", tt_srpt->title[i].vts_ttn);
+ printf("\tNumber of PTTs: %i\n", tt_srpt->title[i].nr_of_ptts);
+ printf("\tNumber of angles: %i\n",=20
+ tt_srpt->title[i].nr_of_angles);
+ printf("\tTitle playback type: %s%s%s%s%s%s%s\n",
+ tt_srpt->title[i].pb_ty.multi_or_random_pgc_title ?=20
+ " One Random PGC Title or Multi PGC Title" :=20
+ " One Sequential PGC Title",
+ tt_srpt->title[i].pb_ty.jlc_exists_in_cell_cmd ?
+ "" : ", No Link/Jump/Call exists in Cell command",
+ tt_srpt->title[i].pb_ty.jlc_exists_in_prepost_cmd ?
+ "" : ", No Link/Jump/Call exists in Pre- and/or Post-command"=
,
+ tt_srpt->title[i].pb_ty.jlc_exists_in_button_cmd ?
+ "" : ", No Link/Jump/Call exists in Button command",
+ tt_srpt->title[i].pb_ty.jlc_exists_in_tt_dom ?
+ "" : ", No Link/Jump/Call exists in TT_DOM",
+ tt_srpt->title[i].pb_ty.chapter_search_or_play ?
+ ", UOP1 (TT_Play and PTT_Search) prohibited" : "",
+ tt_srpt->title[i].pb_ty.title_or_time_play ?
+ ", UOP0 (Time_Play and Time_Search) prohibited" : ""
+ ); =20
+ printf("\tParental ID field: %04x\n",
+ tt_srpt->title[i].parental_id);
+ printf("\tTitle set starting sector %08x\n",=20
+ tt_srpt->title[i].title_set_sector);
+ }
+}
+
+
+void ifoPrint_VTS_PTT_SRPT(vts_ptt_srpt_t *vts_ptt_srpt) {
+ int i, j;
+ printf(" nr_of_srpts %i last byte %i\n",=20
+ vts_ptt_srpt->nr_of_srpts,=20
+ vts_ptt_srpt->last_byte);
+ for(i=3D0;i<vts_ptt_srpt->nr_of_srpts;i++) {
+ printf("\nVTS_PTT number %d has a offset %d relative to VTS_PTT_SRPT=
\n",=20
+ i + 1, vts_ptt_srpt->ttu_offset[i]);
+ for(j=3D0;j<vts_ptt_srpt->title[i].nr_of_ptts;j++) {
+ printf("VTS_PTT_SRPT - Title %3i part %3i: PGC: %3i PG: %3i\n",
+ i + 1, j + 1,=20
+ vts_ptt_srpt->title[i].ptt[j].pgcn,
+ vts_ptt_srpt->title[i].ptt[j].pgn );
+ }
+ }
+}
+
+
+void ifoPrint_PTL_MAIT(ptl_mait_t *ptl_mait) {
+ int i, level, vts;
+ =20
+ printf("Number of Countries: %i\n", ptl_mait->nr_of_countries);
+ printf("Number of VTSs: %i\n", ptl_mait->nr_of_vtss);
+ printf("Last byte: %i\n", ptl_mait->last_byte);
+ =20
+ for(i =3D 0; i < ptl_mait->nr_of_countries; i++) {
+ =20
+ printf("Start byte: %i\n", ptl_mait->countries[i].pf_ptl_mai_start_b=
yte);
+ printf("Parental Masks for country: %c%c\n",
+ ptl_mait->countries[i].country_code >> 8,
+ ptl_mait->countries[i].country_code & 0xff);
+ =20
+ for(vts =3D 0; vts <=3D ptl_mait->nr_of_vtss; vts++) {
+ if( vts =3D=3D 0 ) {
+ printf("VMG ");=20
+ } else {
+ printf("VTS %2d ", vts);
+ }
+ for(level =3D 0; level < 8; level++) {
+ printf("%d: %04x ", level,
+ ptl_mait->countries[i].pf_ptl_mai[vts][level] );
+ }
+ printf("\n");
+ }
+ }
+}
+
+void ifoPrint_VTS_TMAPT(vts_tmapt_t *vts_tmapt) {
+ unsigned int timeunit;
+ int i, j;
+ =20
+ printf("Number of VTS_TMAPS: %i\n", vts_tmapt->nr_of_tmaps);
+ printf("Last byte: %i\n", vts_tmapt->last_byte);
+
+ for(i =3D 0; i < vts_tmapt->nr_of_tmaps; i++) {
+ printf("TMAP %i\n", i + 1);
+ printf(" offset %d relative to VTS_TMAPTI\n", vts_tmapt->tmap_offse=
t[i]);
+ printf(" Time unit (seconds): %i\n", vts_tmapt->tmap[i].tmu);
+ printf(" Number of entries: %i\n", vts_tmapt->tmap[i].nr_of_entries=
);
+ timeunit =3D vts_tmapt->tmap[i].tmu;
+ for(j =3D 0; j < vts_tmapt->tmap[i].nr_of_entries; j++) {
+ unsigned int ac_time =3D timeunit * (j + 1);
+ printf("Time: %2i:%02i:%02i VOBU Sector: 0x%08x %s\n",=20
+ ac_time / (60 * 60), (ac_time / 60) % 60, ac_time % 60,
+ vts_tmapt->tmap[i].map_ent[j] & 0x7fffffff,
+ (vts_tmapt->tmap[i].map_ent[j] >> 31) ? "discontinuity" : "=
");
+ }
+ }
+}
+
+void ifoPrint_C_ADT(c_adt_t *c_adt) {
+ int i, entries;
+ =20
+ printf("Number of VOBs in this VOBS: %i\n", c_adt->nr_of_vobs);
+ //entries =3D c_adt->nr_of_vobs;
+ entries =3D (c_adt->last_byte + 1 - C_ADT_SIZE)/sizeof(cell_adr_t);
+ =20
+ for(i =3D 0; i < entries; i++) {
+ printf("VOB ID: %3i, Cell ID: %3i ",=20
+ c_adt->cell_adr_table[i].vob_id, c_adt->cell_adr_table[i].cel=
l_id);
+ printf("Sector (first): 0x%08x (last): 0x%08x\n",
+ c_adt->cell_adr_table[i].start_sector,=20
+ c_adt->cell_adr_table[i].last_sector);
+ }
+}
+
+
+void ifoPrint_VOBU_ADMAP(vobu_admap_t *vobu_admap) {
+ int i, entries;
+ =20
+ entries =3D (vobu_admap->last_byte + 1 - VOBU_ADMAP_SIZE)/4;
+ for(i =3D 0; i < entries; i++) {
+ printf("VOBU %5i First sector: 0x%08x\n", i + 1,
+ vobu_admap->vobu_start_sectors[i]);
+ }
+}
+
+
+void ifoPrint_PGCIT(pgcit_t *pgcit) {
+ int i;
+ =20
+ for(i =3D 0; i < pgcit->nr_of_pgci_srp; i++) {
+ printf("\nProgram (PGC): %3i\t", i + 1);
+ printf("PGC Category: Entry id 0x%02x, ", pgcit->pgci_srp[i].entry_i=
d);
+ printf("Parental ID mask 0x%04x\n", pgcit->pgci_srp[i].ptl_id_mask);
+ ifoPrint_PGC(pgcit->pgci_srp[i].pgc);
+ }
+}
+
+
+void ifoPrint_PGCI_UT(pgci_ut_t *pgci_ut) {
+ int i;
+ =20
+ printf("Number of Menu Language Units (PGCI_LU): %3i\n", pgci_ut->nr_o=
f_lus);
+ for(i =3D 0; i < pgci_ut->nr_of_lus; i++) {
+ printf("\nMenu Language Code: %c%c (%c)\n",
+ pgci_ut->lu[i].lang_code >> 8,
+ pgci_ut->lu[i].lang_code & 0xff,
+ pgci_ut->lu[i].lang_extension ? pgci_ut->lu[i].lang_extension=
:' ');
+ printf("Menu Existence: %02x\n", pgci_ut->lu[i].exists);
+ ifoPrint_PGCIT(pgci_ut->lu[i].pgcit);
+ }
+}
+
+
+static void ifoPrint_VTS_ATTRIBUTES(vts_attributes_t *vts_attributes) {
+ int i;
+ =20
+ printf("VTS_CAT Application type: %08x\n", vts_attributes->vts_cat);
+=20
+ printf("Video attributes of VTSM_VOBS: ");
+ ifoPrint_video_attributes(&vts_attributes->vtsm_vobs_attr);
+ printf("\n");
+ printf("Number of Audio streams: %i\n",=20
+ vts_attributes->nr_of_vtsm_audio_streams);
+ if(vts_attributes->nr_of_vtsm_audio_streams > 0) {
+ printf("\tstream %i attributes: ", 1);
+ ifoPrint_audio_attributes(&vts_attributes->vtsm_audio_attr);
+ printf("\n");
+ }
+ printf("Number of Subpicture streams: %i\n",=20
+ vts_attributes->nr_of_vtsm_subp_streams);
+ if(vts_attributes->nr_of_vtsm_subp_streams > 0) {
+ printf("\tstream %2i attributes: ", 1);
+ ifoPrint_subp_attributes(&vts_attributes->vtsm_subp_attr);
+ printf("\n");
+ }
+ =20
+ printf("Video attributes of VTSTT_VOBS: ");
+ ifoPrint_video_attributes(&vts_attributes->vtstt_vobs_video_attr);
+ printf("\n");
+ printf("Number of Audio streams: %i\n",=20
+ vts_attributes->nr_of_vtstt_audio_streams);
+ for(i =3D 0; i < vts_attributes->nr_of_vtstt_audio_streams; i++) {
+ printf("\tstream %i attributes: ", i);
+ ifoPrint_audio_attributes(&vts_attributes->vtstt_audio_attr[i]);
+ printf("\n");
+ }
+ =20
+ printf("Number of Subpicture streams: %i\n",=20
+ vts_attributes->nr_of_vtstt_subp_streams);
+ for(i =3D 0; i < vts_attributes->nr_of_vtstt_subp_streams; i++) {
+ printf("\tstream %2i attributes: ", i); =20
+ ifoPrint_subp_attributes(&vts_attributes->vtstt_subp_attr[i]);
+ printf("\n");
+ }
+}
+
+
+void ifoPrint_VTS_ATRT(vts_atrt_t *vts_atrt) {
+ int i;
+ =20
+ printf("Number of Video Title Sets: %3i\n", vts_atrt->nr_of_vtss);
+ for(i =3D 0; i < vts_atrt->nr_of_vtss; i++) {
+ printf("\nVideo Title Set %i\n", i + 1);
+ printf(" offset %d relative to VMG_VTS_ATRT\n",=20
+ vts_atrt->vts_atrt_offsets[i]);
+ ifoPrint_VTS_ATTRIBUTES(&vts_atrt->vts[i]);
+ }
+}
+
+
+void ifoPrint(dvd_reader_t *dvd, int title) {
+ ifo_handle_t *ifohandle;
+
+ ifohandle =3D ifoOpen(dvd, title);
+ if(!ifohandle) {
+ if(dvdread_verbose(dvd) >=3D 0) {
+ fprintf(stderr, "Can't open info file for title %d\n", title);
+ }
+ return;
+ }
+ =20
+ =20
+ if(ifohandle->vmgi_mat) {
+
+ printf("VMG top level\n-------------\n");
+ ifoPrint_VMGI_MAT(ifohandle->vmgi_mat);
+
+ printf("\nFirst Play PGC\n--------------\n");
+ if(ifohandle->first_play_pgc) {
+ ifoPrint_PGC(ifohandle->first_play_pgc);
+ } else {
+ printf("No First Play PGC present\n");
+ }
+
+ printf("\nTitle Track search pointer table\n");
+ printf( "------------------------------------------------\n");
+ ifoPrint_TT_SRPT(ifohandle->tt_srpt);
+
+ printf("\nMenu PGCI Unit table\n");
+ printf( "--------------------\n");
+ if(ifohandle->pgci_ut) {
+ ifoPrint_PGCI_UT(ifohandle->pgci_ut);
+ } else {
+ printf("No PGCI Unit table present\n");
+ }
+
+ printf("\nParental Manegment Information table\n");
+ printf( "------------------------------------\n");
+ if(ifohandle->ptl_mait) {
+ ifoPrint_PTL_MAIT(ifohandle->ptl_mait);
+ } else {
+ printf("No Parental Management Information present\n");
+ }
+
+ printf("\nVideo Title Set Attribute Table\n");
+ printf( "-------------------------------\n");
+ ifoPrint_VTS_ATRT(ifohandle->vts_atrt);
+ =20
+ printf("\nText Data Manager Information\n");
+ printf( "-----------------------------\n");
+ if(ifohandle->txtdt_mgi) {
+ //ifoPrint_TXTDT_MGI(&(vmgi->txtdt_mgi));
+ } else {
+ printf("No Text Data Manager Information present\n");
+ }
+
+ printf("\nMenu Cell Adress table\n");
+ printf( "-----------------\n");
+ if(ifohandle->menu_c_adt) {
+ ifoPrint_C_ADT(ifohandle->menu_c_adt);
+ } else {
+ printf("No Menu Cell Adress table present\n");
+ }
+
+ printf("\nVideo Manager Menu VOBU address map\n");
+ printf( "-----------------\n");
+ if(ifohandle->menu_vobu_admap) {
+ ifoPrint_VOBU_ADMAP(ifohandle->menu_vobu_admap);
+ } else {
+ printf("No Menu VOBU address map present\n"); =20
+ }
+ }
+
+
+ if(ifohandle->vtsi_mat) {
+
+ printf("VTS top level\n-------------\n");
+ ifoPrint_VTSI_MAT(ifohandle->vtsi_mat);
+
+ printf("\nPart of Title Track search pointer table\n");
+ printf( "----------------------------------------------\n");
+ ifoPrint_VTS_PTT_SRPT(ifohandle->vts_ptt_srpt);
+
+ printf("\nPGCI Unit table\n");
+ printf( "--------------------\n");
+ ifoPrint_PGCIT(ifohandle->vts_pgcit);
+
+ printf("\nMenu PGCI Unit table\n");
+ printf( "--------------------\n");
+ if(ifohandle->pgci_ut) {
+ ifoPrint_PGCI_UT(ifohandle->pgci_ut);
+ } else {
+ printf("No Menu PGCI Unit table present\n");
+ }
+ =20
+ printf("\nTime Search table\n");
+ printf( "-----------------\n");
+ if(ifohandle->vts_tmapt) {
+ ifoPrint_VTS_TMAPT(ifohandle->vts_tmapt);
+ } else {
+ printf("No Time Search table present\n");
+ }
+
+ printf("\nMenu Cell Adress table\n");
+ printf( "-----------------\n");
+ if(ifohandle->menu_c_adt) {
+ ifoPrint_C_ADT(ifohandle->menu_c_adt);
+ } else {
+ printf("No Cell Adress table present\n");
+ }
+
+ printf("\nVideo Title Set Menu VOBU address map\n");
+ printf( "-----------------\n");
+ if(ifohandle->menu_vobu_admap) {
+ ifoPrint_VOBU_ADMAP(ifohandle->menu_vobu_admap);
+ } else {
+ printf("No Menu VOBU address map present\n");
+ }
+
+ printf("\nCell Adress table\n");
+ printf( "-----------------\n");
+ ifoPrint_C_ADT(ifohandle->vts_c_adt);
+
+ printf("\nVideo Title Set VOBU address map\n");
+ printf( "-----------------\n");
+ ifoPrint_VOBU_ADMAP(ifohandle->vts_vobu_admap);
+ }=20
+
+ ifoClose(ifohandle);
+}
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_print.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_print.h 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_print.h 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,60 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef IFO_PRINT_H_INCLUDED
+#define IFO_PRINT_H_INCLUDED
+
+/*
+ * Copyright (C) 2000, 2001 Bj=F6rn Englund <d4bjorn at dtek.chalmers.se>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 <dvdread/ifo_types.h>
+#include <dvdread/dvd_reader.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * This file provides example functions for printing information about t=
he IFO
+ * file to stdout.
+ */
+
+/**
+ * Print the complete parsing information for the given file.
+ */
+
+/* ifoPrint(dvd, title); */
+void ifoPrint(dvd_reader_t *, int);
+
+void ifoPrint_VMGI_MAT(vmgi_mat_t *);
+void ifoPrint_VTSI_MAT(vtsi_mat_t *);
+
+void ifoPrint_PTL_MAIT(ptl_mait_t *);
+void ifoPrint_VTS_ATRT(vts_atrt_t *);
+void ifoPrint_TT_SRPT(tt_srpt_t *);
+void ifoPrint_VTS_PTT_SRPT(vts_ptt_srpt_t *);
+void ifoPrint_PGC(pgc_t *);
+void ifoPrint_PGCIT(pgcit_t *);
+void ifoPrint_PGCI_UT(pgci_ut_t *);
+void ifoPrint_VTS_TMAPT(vts_tmapt_t *);
+void ifoPrint_C_ADT(c_adt_t *);
+void ifoPrint_VOBU_ADMAP(vobu_admap_t *);
+
+#ifdef __cplusplus
+};
+#endif
+#endif /* IFO_PRINT_H_INCLUDED */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_read.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_read.c 2007-03-10 21=
:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_read.c 2007-03-10 21=
:41:34 UTC (rev 1290)
@@ -0,0 +1,2182 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (C) 2000, 2001, 2002, 2003
+ * Bj=F6rn Englund <d4bjorn at dtek.chalmers.se>,=20
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#include <string.h>
+#include <errno.h>
+
+#include "bswap.h"
+#include "ifo_types.h"
+#include "ifo_read.h"
+#include "dvd_reader.h"
+#include "dvdread_internal.h"
+
+#ifndef DVD_BLOCK_LEN
+#define DVD_BLOCK_LEN 2048
+#endif
+
+#ifndef NDEBUG
+#define CHECK_ZERO0(arg) =
\
+ if(arg !=3D 0) { =
\
+ fprintf(stderr, "*** Zero check failed in %s:%i\n for %s =3D 0x%x=
\n", \
+ __FILE__, __LINE__, # arg, arg); =
\
+ }
+#define CHECK_ZERO(arg) =
\
+ if(memcmp(my_friendly_zeros, &arg, sizeof(arg))) { =
\
+ unsigned int i_CZ; =
\
+ fprintf(stderr, "*** Zero check failed in %s:%i\n for %s =3D 0x",=
\
+ __FILE__, __LINE__, # arg ); =
\
+ for(i_CZ =3D 0; i_CZ < sizeof(arg); i_CZ++) =
\
+ fprintf(stderr, "%02x", *((uint8_t *)&arg + i_CZ)); =
\
+ fprintf(stderr, "\n"); =
\
+ }
+static const uint8_t my_friendly_zeros[2048];
+#else
+#define CHECK_ZERO0(arg) (void)(arg)
+#define CHECK_ZERO(arg) (void)(arg)
+#endif
+
+
+/* Prototypes for internal functions */
+static int ifoRead_VMG(ifo_handle_t *ifofile);
+static int ifoRead_VTS(ifo_handle_t *ifofile);
+static int ifoRead_PGC(ifo_handle_t *ifofile, pgc_t *pgc, unsigned int o=
ffset);
+static int ifoRead_PGC_COMMAND_TBL(ifo_handle_t *ifofile,=20
+ pgc_command_tbl_t *cmd_tbl,=20
+ unsigned int offset);
+static int ifoRead_PGC_PROGRAM_MAP(ifo_handle_t *ifofile,=20
+ pgc_program_map_t *program_map,=20
+ unsigned int nr, unsigned int offset)=
;
+static int ifoRead_CELL_PLAYBACK_TBL(ifo_handle_t *ifofile,=20
+ cell_playback_t *cell_playback,=20
+ unsigned int nr, unsigned int offse=
t);
+static int ifoRead_CELL_POSITION_TBL(ifo_handle_t *ifofile,=20
+ cell_position_t *cell_position,=20
+ unsigned int nr, unsigned int offse=
t);
+static int ifoRead_VTS_ATTRIBUTES(ifo_handle_t *ifofile,=20
+ vts_attributes_t *vts_attributes,=20
+ unsigned int offset);
+static int ifoRead_C_ADT_internal(ifo_handle_t *ifofile, c_adt_t *c_adt,=
=20
+ unsigned int sector);
+static int ifoRead_VOBU_ADMAP_internal(ifo_handle_t *ifofile,=20
+ vobu_admap_t *vobu_admap,=20
+ unsigned int sector);
+static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit,=
=20
+ unsigned int offset);
+
+static void ifoFree_PGC(pgc_t *pgc);
+static void ifoFree_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl);
+static void ifoFree_PGCIT_internal(pgcit_t *pgcit);
+
+static ifo_handle_t *ifoOpen_File(ifo_handle_t *ifofile, int title,=20
+ char *suffix);
+static ifo_handle_t *ifoOpenVMGI_File(ifo_handle_t *ifofile, char *suffi=
x);
+static ifo_handle_t *ifoOpenVTSI_File(ifo_handle_t *ifofile, int title,
+ char *suffix);
+
+static inline int DVDFileSeek_( dvd_file_t *dvd_file, uint32_t offset ) =
{
+ return (DVDFileSeek(dvd_file, (int)offset) =3D=3D (int)offset);
+}
+
+
+ifo_handle_t *ifoOpen(dvd_reader_t *dvd, int title) {
+ ifo_handle_t *ifofile;
+
+ ifofile =3D (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
+ if(!ifofile)
+ return NULL;
+
+ memset(ifofile, 0, sizeof(ifo_handle_t));
+
+ ifofile->file =3D DVDOpenFile(dvd, title, DVD_READ_INFO_FILE);
+ if(!ifoOpen_File(ifofile, title, "IFO")) {
+ if(title) {
+ if(dvdread_verbose(dvd) >=3D 1) {
+ fprintf(stderr, "libdvdread: Can't open file VTS_%02d_0.%s.\n",=20
+ title, "IFO");
+ }
+ } else {
+ if(dvdread_verbose(dvd) >=3D 1) {
+ fprintf(stderr, "libdvdread: Can't open file VIDEO_TS.%s.\n", "I=
FO");
+ }
+ }
+ /* lower functions free the pointer, reallocate */
+ ifofile =3D (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
+ if(!ifofile)
+ return NULL;
+
+ memset(ifofile, 0, sizeof(ifo_handle_t));
+
+ ifofile->file =3D DVDOpenFile(dvd, title, DVD_READ_INFO_BACKUP_FILE)=
;
+ if(!ifoOpen_File(ifofile, title, "BUP")) {
+ if(title) {
+ if(dvdread_verbose(dvd) >=3D 1) {
+ fprintf(stderr, "libdvdread: Can't open file VTS_%02d_0.%s.\n"=
,=20
+ title, "BUP");
+ }
+ } else {
+ if(dvdread_verbose(dvd) >=3D 1) {
+ fprintf(stderr, "libdvdread: Can't open file VIDEO_TS.%s.\n", =
"BUP");
+ }
+ }
+ return NULL;
+ }
+ }
+ return ifofile;
+}
+
+static ifo_handle_t *ifoOpen_File(ifo_handle_t *ifofile, int title,=20
+ char *suffix) {
+ if(!ifofile->file) {
+ free(ifofile);
+ return NULL;
+ }
+
+ /* First check if this is a VMGI file. */
+ if(ifoRead_VMG(ifofile)) {
+
+ /* These are both mandatory. */
+ if(!ifoRead_FP_PGC(ifofile) || !ifoRead_TT_SRPT(ifofile)) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 0) {
+ fprintf(stderr, "libdvdread: Invalid main menu IFO (VIDEO_TS.%s)=
.\n",
+ suffix);
+ }
+ ifoClose(ifofile);
+ return NULL;
+ }
+
+ ifoRead_PGCI_UT(ifofile);
+ ifoRead_PTL_MAIT(ifofile);
+
+ /* This is also mandatory. */
+ if(!ifoRead_VTS_ATRT(ifofile)) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 0) {
+ fprintf(stderr, "libdvdread: Invalid main menu IFO (VIDEO_TS.%s)=
.\n",
+ suffix);
+ }
+ ifoClose(ifofile);
+ return NULL;
+ }
+
+ ifoRead_TXTDT_MGI(ifofile);
+ ifoRead_C_ADT(ifofile);
+ ifoRead_VOBU_ADMAP(ifofile);
+
+ return ifofile;
+ }
+
+ if(ifoRead_VTS(ifofile)) {
+
+ if(!ifoRead_VTS_PTT_SRPT(ifofile) || !ifoRead_PGCIT(ifofile)) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 0) {
+ fprintf(stderr, "libdvdread: Invalid title IFO (VTS_%02d_0.%s).\=
n",
+ title, suffix);
+ }
+ ifoClose(ifofile);
+ return NULL;
+ }
+
+ ifoRead_PGCI_UT(ifofile);
+ ifoRead_VTS_TMAPT(ifofile);
+ ifoRead_C_ADT(ifofile);
+ ifoRead_VOBU_ADMAP(ifofile);
+
+ if(!ifoRead_TITLE_C_ADT(ifofile) || !ifoRead_TITLE_VOBU_ADMAP(ifofil=
e)) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 0) {
+ fprintf(stderr, "libdvdread: Invalid title IFO (VTS_%02d_0.%s).\=
n",
+ title, suffix);
+ }
+ ifoClose(ifofile);
+ return NULL;
+ }
+
+ return ifofile;
+ }
+
+ if(title) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 0) {
+ fprintf(stderr, "libdvdread: Invalid IFO for title %d (VTS_%02d_0.=
%s).\n",
+ title, title, suffix);
+ }
+ } else {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 0) {
+ fprintf(stderr, "libdvdread: Invalid IFO for VMGM (VIDEO_TS.%s).\n=
",=20
+ suffix);
+ }
+ }
+ ifoClose(ifofile);
+ return NULL;
+}
+
+
+ifo_handle_t *ifoOpenVMGI(dvd_reader_t *dvd) {
+ ifo_handle_t *ifofile;
+
+ ifofile =3D (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
+ if(!ifofile)
+ return NULL;
+
+ memset(ifofile, 0, sizeof(ifo_handle_t));
+
+ ifofile->file =3D DVDOpenFile(dvd, 0, DVD_READ_INFO_FILE);
+ if(!ifoOpenVMGI_File(ifofile, "IFO")) {
+ if(dvdread_verbose(dvd) >=3D 1) {
+ fprintf(stderr, "libdvdread: Can't open file VIDEO_TS.IFO: %s\n",
+ strerror(errno));
+ }
+
+ /* lower functions free the pointer, reallocate */
+ ifofile =3D (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
+ if(!ifofile)
+ return NULL;
+
+ memset(ifofile, 0, sizeof(ifo_handle_t));
+
+ ifofile->file =3D DVDOpenFile(dvd, 0, DVD_READ_INFO_BACKUP_FILE);
+ if(!ifoOpenVMGI_File(ifofile, "BUP"))
+ if(dvdread_verbose(dvd) >=3D 1) {
+ fprintf(stderr, "libdvdread: Can't open file VIDEO_TS.BUP: %s\n"=
,
+ strerror(errno));
+ }
+ return NULL;
+ }
+ return ifofile;
+}
+
+static ifo_handle_t *ifoOpenVMGI_File(ifo_handle_t *ifofile, char *suffi=
x) {
+ if(!ifofile->file) {
+ free(ifofile);
+ return NULL;
+ }
+
+ if(ifoRead_VMG(ifofile))
+ return ifofile;
+
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 0) {
+ fprintf(stderr, "libdvdread: Invalid main menu IFO (VIDEO_TS.%s).\n"=
,=20
+ suffix);
+ }
+ ifoClose(ifofile);
+ return NULL;
+}
+
+
+ifo_handle_t *ifoOpenVTSI(dvd_reader_t *dvd, int title) {
+ ifo_handle_t *ifofile;
+ =20
+ ifofile =3D (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
+ if(!ifofile)
+ return NULL;
+
+ memset(ifofile, 0, sizeof(ifo_handle_t));
+ =20
+ if(title <=3D 0 || title > 99) {
+ if(dvdread_verbose(dvd) >=3D 0) {
+ fprintf(stderr, "libdvdread: ifoOpenVTSI invalid title (%d).\n", t=
itle);
+ }
+ free(ifofile);
+ errno =3D EINVAL;
+ return NULL;
+ }
+ =20
+ ifofile->file =3D DVDOpenFile(dvd, title, DVD_READ_INFO_FILE);
+ if(!ifoOpenVTSI_File(ifofile, title, "IFO")) {
+ if(dvdread_verbose(dvd) >=3D 1) {
+ fprintf(stderr, "libdvdread: Can't open file VTS_%02d_0.%s.\n", ti=
tle, "IFO");
+ }
+ /* lower functions free the pointer, reallocate */
+ ifofile =3D (ifo_handle_t *)malloc(sizeof(ifo_handle_t));
+ if(!ifofile)
+ return NULL;
+
+ memset(ifofile, 0, sizeof(ifo_handle_t));
+
+ ifofile->file =3D DVDOpenFile(dvd, title, DVD_READ_INFO_BACKUP_FILE)=
;
+ if(!ifoOpenVTSI_File(ifofile, title, "BUP"))
+ if(dvdread_verbose(dvd) >=3D 1) {
+ fprintf(stderr, "libdvdread: Can't open file VTS_%02d_0.%s.\n", =
title, "BUP");
+ }
+ return NULL;
+ }
+ return ifofile;
+}
+
+static ifo_handle_t *ifoOpenVTSI_File(ifo_handle_t* ifofile, int title, =
char *suffix) {
+ if(!ifofile->file) {
+ free(ifofile);
+ return NULL;
+ }
+
+ ifoRead_VTS(ifofile);
+ if(ifofile->vtsi_mat)
+ return ifofile;
+
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 0) {
+ fprintf(stderr, "libdvdread: Invalid IFO for title %d (VTS_%02d_0.%s=
).\n",
+ title, title, suffix);
+ }
+ ifoClose(ifofile);
+ return NULL;
+}
+
+
+void ifoClose(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return;
+ =20
+ ifoFree_VOBU_ADMAP(ifofile);
+ ifoFree_TITLE_VOBU_ADMAP(ifofile);
+ ifoFree_C_ADT(ifofile);
+ ifoFree_TITLE_C_ADT(ifofile);
+ ifoFree_TXTDT_MGI(ifofile);
+ ifoFree_VTS_ATRT(ifofile);
+ ifoFree_PTL_MAIT(ifofile);
+ ifoFree_PGCI_UT(ifofile);
+ ifoFree_TT_SRPT(ifofile);
+ ifoFree_FP_PGC(ifofile);
+ ifoFree_PGCIT(ifofile);
+ ifoFree_VTS_PTT_SRPT(ifofile);
+ ifoFree_VTS_TMAPT(ifofile);
+
+ if(ifofile->vmgi_mat)
+ free(ifofile->vmgi_mat);
+
+ if(ifofile->vtsi_mat)
+ free(ifofile->vtsi_mat);
+
+ DVDCloseFile(ifofile->file);
+ ifofile->file =3D 0;
+ free(ifofile);
+ ifofile =3D 0;
+}
+
+
+static int ifoRead_VMG(ifo_handle_t *ifofile) {
+ vmgi_mat_t *vmgi_mat;
+
+ vmgi_mat =3D (vmgi_mat_t *)malloc(sizeof(vmgi_mat_t));
+ if(!vmgi_mat)
+ return 0;
+
+ ifofile->vmgi_mat =3D vmgi_mat;
+
+ if(!DVDFileSeek_(ifofile->file, 0)) {
+ free(ifofile->vmgi_mat);
+ ifofile->vmgi_mat =3D 0;
+ return 0;
+ }
+
+ if(!DVDReadBytes(ifofile->file, vmgi_mat, sizeof(vmgi_mat_t))) {
+ free(ifofile->vmgi_mat);
+ ifofile->vmgi_mat =3D 0;
+ return 0;
+ }
+
+ if(strncmp("DVDVIDEO-VMG", vmgi_mat->vmg_identifier, 12) !=3D 0) {
+ free(ifofile->vmgi_mat);
+ ifofile->vmgi_mat =3D 0;
+ return 0;
+ }
+ =20
+ B2N_32(vmgi_mat->vmg_last_sector);
+ B2N_32(vmgi_mat->vmgi_last_sector);
+ B2N_32(vmgi_mat->vmg_category);
+ B2N_16(vmgi_mat->vmg_nr_of_volumes);
+ B2N_16(vmgi_mat->vmg_this_volume_nr);
+ B2N_16(vmgi_mat->vmg_nr_of_title_sets);
+ B2N_64(vmgi_mat->vmg_pos_code);
+ B2N_32(vmgi_mat->vmgi_last_byte);
+ B2N_32(vmgi_mat->first_play_pgc);
+ B2N_32(vmgi_mat->vmgm_vobs);
+ B2N_32(vmgi_mat->tt_srpt);
+ B2N_32(vmgi_mat->vmgm_pgci_ut);
+ B2N_32(vmgi_mat->ptl_mait);
+ B2N_32(vmgi_mat->vts_atrt);
+ B2N_32(vmgi_mat->txtdt_mgi);
+ B2N_32(vmgi_mat->vmgm_c_adt);
+ B2N_32(vmgi_mat->vmgm_vobu_admap);
+ B2N_16(vmgi_mat->vmgm_audio_attr.lang_code);
+ B2N_16(vmgi_mat->vmgm_subp_attr.lang_code);
+
+
+ CHECK_ZERO(vmgi_mat->zero_1);
+ CHECK_ZERO(vmgi_mat->zero_2);
+ CHECK_ZERO(vmgi_mat->zero_3);
+ CHECK_ZERO(vmgi_mat->zero_4);
+ CHECK_ZERO(vmgi_mat->zero_5);
+ CHECK_ZERO(vmgi_mat->zero_6);
+ CHECK_ZERO(vmgi_mat->zero_7);
+ CHECK_ZERO(vmgi_mat->zero_8);
+ CHECK_ZERO(vmgi_mat->zero_9);
+ CHECK_ZERO(vmgi_mat->zero_10); =20
+ CHECK_VALUE(vmgi_mat->vmg_last_sector !=3D 0);
+ CHECK_VALUE(vmgi_mat->vmgi_last_sector !=3D 0);
+ CHECK_VALUE(vmgi_mat->vmgi_last_sector * 2 <=3D vmgi_mat->vmg_last_sec=
tor);
+ CHECK_VALUE(vmgi_mat->vmgi_last_sector * 2 <=3D vmgi_mat->vmg_last_sec=
tor);
+ CHECK_VALUE(vmgi_mat->vmg_nr_of_volumes !=3D 0);
+ CHECK_VALUE(vmgi_mat->vmg_this_volume_nr !=3D 0);
+ CHECK_VALUE(vmgi_mat->vmg_this_volume_nr <=3D vmgi_mat->vmg_nr_of_volu=
mes);
+ CHECK_VALUE(vmgi_mat->disc_side =3D=3D 1 || vmgi_mat->disc_side =3D=3D=
2);
+ CHECK_VALUE(vmgi_mat->vmg_nr_of_title_sets !=3D 0);
+ CHECK_VALUE(vmgi_mat->vmgi_last_byte >=3D 341);
+ CHECK_VALUE(vmgi_mat->vmgi_last_byte / DVD_BLOCK_LEN <=3D=20
+ vmgi_mat->vmgi_last_sector);
+ /* It seems that first_play_pgc is optional. */
+ CHECK_VALUE(vmgi_mat->first_play_pgc < vmgi_mat->vmgi_last_byte);
+ CHECK_VALUE(vmgi_mat->vmgm_vobs =3D=3D 0 ||=20
+ (vmgi_mat->vmgm_vobs > vmgi_mat->vmgi_last_sector &&
+ vmgi_mat->vmgm_vobs < vmgi_mat->vmg_last_sector));
+ CHECK_VALUE(vmgi_mat->tt_srpt <=3D vmgi_mat->vmgi_last_sector);
+ CHECK_VALUE(vmgi_mat->vmgm_pgci_ut <=3D vmgi_mat->vmgi_last_sector);
+ CHECK_VALUE(vmgi_mat->ptl_mait <=3D vmgi_mat->vmgi_last_sector);
+ CHECK_VALUE(vmgi_mat->vts_atrt <=3D vmgi_mat->vmgi_last_sector);
+ CHECK_VALUE(vmgi_mat->txtdt_mgi <=3D vmgi_mat->vmgi_last_sector);
+ CHECK_VALUE(vmgi_mat->vmgm_c_adt <=3D vmgi_mat->vmgi_last_sector);
+ CHECK_VALUE(vmgi_mat->vmgm_vobu_admap <=3D vmgi_mat->vmgi_last_sector)=
;
+
+ CHECK_VALUE(vmgi_mat->nr_of_vmgm_audio_streams <=3D 1);
+ CHECK_VALUE(vmgi_mat->nr_of_vmgm_subp_streams <=3D 1);
+
+ return 1;
+}
+
+
+static int ifoRead_VTS(ifo_handle_t *ifofile) {
+ vtsi_mat_t *vtsi_mat;
+ int i;
+
+ vtsi_mat =3D (vtsi_mat_t *)malloc(sizeof(vtsi_mat_t));
+ if(!vtsi_mat)
+ return 0;
+ =20
+ ifofile->vtsi_mat =3D vtsi_mat;
+
+ if(!DVDFileSeek_(ifofile->file, 0)) {
+ free(ifofile->vtsi_mat);
+ ifofile->vtsi_mat =3D 0;
+ return 0;
+ }
+
+ if(!(DVDReadBytes(ifofile->file, vtsi_mat, sizeof(vtsi_mat_t)))) {
+ free(ifofile->vtsi_mat);
+ ifofile->vtsi_mat =3D 0;
+ return 0;
+ }
+
+ if(strncmp("DVDVIDEO-VTS", vtsi_mat->vts_identifier, 12) !=3D 0) {
+ free(ifofile->vtsi_mat);
+ ifofile->vtsi_mat =3D 0;
+ return 0;
+ }
+
+ B2N_32(vtsi_mat->vts_last_sector);
+ B2N_32(vtsi_mat->vtsi_last_sector);
+ B2N_32(vtsi_mat->vts_category);
+ B2N_32(vtsi_mat->vtsi_last_byte);
+ B2N_32(vtsi_mat->vtsm_vobs);
+ B2N_32(vtsi_mat->vtstt_vobs);
+ B2N_32(vtsi_mat->vts_ptt_srpt);
+ B2N_32(vtsi_mat->vts_pgcit);
+ B2N_32(vtsi_mat->vtsm_pgci_ut);
+ B2N_32(vtsi_mat->vts_tmapt);
+ B2N_32(vtsi_mat->vtsm_c_adt);
+ B2N_32(vtsi_mat->vtsm_vobu_admap);
+ B2N_32(vtsi_mat->vts_c_adt);
+ B2N_32(vtsi_mat->vts_vobu_admap);
+ B2N_16(vtsi_mat->vtsm_audio_attr.lang_code);
+ B2N_16(vtsi_mat->vtsm_subp_attr.lang_code);
+ for(i =3D 0; i < 8; i++)
+ B2N_16(vtsi_mat->vts_audio_attr[i].lang_code);
+ for(i =3D 0; i < 32; i++)
+ B2N_16(vtsi_mat->vts_subp_attr[i].lang_code);
+
+
+ CHECK_ZERO(vtsi_mat->zero_1);
+ CHECK_ZERO(vtsi_mat->zero_2);
+ CHECK_ZERO(vtsi_mat->zero_3);
+ CHECK_ZERO(vtsi_mat->zero_4);
+ CHECK_ZERO(vtsi_mat->zero_5);
+ CHECK_ZERO(vtsi_mat->zero_6);
+ CHECK_ZERO(vtsi_mat->zero_7);
+ CHECK_ZERO(vtsi_mat->zero_8);
+ CHECK_ZERO(vtsi_mat->zero_9);
+ CHECK_ZERO(vtsi_mat->zero_10);
+ CHECK_ZERO(vtsi_mat->zero_11);
+ CHECK_ZERO(vtsi_mat->zero_12);
+ CHECK_ZERO(vtsi_mat->zero_13);
+ CHECK_ZERO(vtsi_mat->zero_14);
+ CHECK_ZERO(vtsi_mat->zero_15);
+ CHECK_ZERO(vtsi_mat->zero_16);
+ CHECK_ZERO(vtsi_mat->zero_17);
+ CHECK_ZERO(vtsi_mat->zero_18);
+ CHECK_ZERO(vtsi_mat->zero_19);
+ CHECK_ZERO(vtsi_mat->zero_20);
+ CHECK_ZERO(vtsi_mat->zero_21);
+ CHECK_VALUE(vtsi_mat->vtsi_last_sector*2 <=3D vtsi_mat->vts_last_secto=
r);
+ CHECK_VALUE(vtsi_mat->vtsi_last_byte/DVD_BLOCK_LEN <=3D vtsi_mat->vtsi=
_last_sector);
+ CHECK_VALUE(vtsi_mat->vtsm_vobs =3D=3D 0 ||=20
+ (vtsi_mat->vtsm_vobs > vtsi_mat->vtsi_last_sector &&
+ vtsi_mat->vtsm_vobs < vtsi_mat->vts_last_sector));
+ CHECK_VALUE(vtsi_mat->vtstt_vobs =3D=3D 0 ||=20
+ (vtsi_mat->vtstt_vobs > vtsi_mat->vtsi_last_sector &&
+ vtsi_mat->vtstt_vobs < vtsi_mat->vts_last_sector));
+ CHECK_VALUE(vtsi_mat->vts_ptt_srpt <=3D vtsi_mat->vtsi_last_sector);
+ CHECK_VALUE(vtsi_mat->vts_pgcit <=3D vtsi_mat->vtsi_last_sector);
+ CHECK_VALUE(vtsi_mat->vtsm_pgci_ut <=3D vtsi_mat->vtsi_last_sector);
+ CHECK_VALUE(vtsi_mat->vts_tmapt <=3D vtsi_mat->vtsi_last_sector);
+ CHECK_VALUE(vtsi_mat->vtsm_c_adt <=3D vtsi_mat->vtsi_last_sector);
+ CHECK_VALUE(vtsi_mat->vtsm_vobu_admap <=3D vtsi_mat->vtsi_last_sector)=
;
+ CHECK_VALUE(vtsi_mat->vts_c_adt <=3D vtsi_mat->vtsi_last_sector);
+ CHECK_VALUE(vtsi_mat->vts_vobu_admap <=3D vtsi_mat->vtsi_last_sector);
+ =20
+ CHECK_VALUE(vtsi_mat->nr_of_vtsm_audio_streams <=3D 1);
+ CHECK_VALUE(vtsi_mat->nr_of_vtsm_subp_streams <=3D 1);
+
+ CHECK_VALUE(vtsi_mat->nr_of_vts_audio_streams <=3D 8);
+ for(i =3D vtsi_mat->nr_of_vts_audio_streams; i < 8; i++)
+ CHECK_ZERO(vtsi_mat->vts_audio_attr[i]);
+
+ CHECK_VALUE(vtsi_mat->nr_of_vts_subp_streams <=3D 32);
+ for(i =3D vtsi_mat->nr_of_vts_subp_streams; i < 32; i++)
+ CHECK_ZERO(vtsi_mat->vts_subp_attr[i]); =20
+ =20
+ for(i =3D 0; i < 8; i++) {
+ CHECK_ZERO0(vtsi_mat->vts_mu_audio_attr[i].zero1);
+ CHECK_ZERO0(vtsi_mat->vts_mu_audio_attr[i].zero2);
+ CHECK_ZERO0(vtsi_mat->vts_mu_audio_attr[i].zero3);
+ CHECK_ZERO0(vtsi_mat->vts_mu_audio_attr[i].zero4);
+ CHECK_ZERO0(vtsi_mat->vts_mu_audio_attr[i].zero5);
+ CHECK_ZERO(vtsi_mat->vts_mu_audio_attr[i].zero6);
+ }
+ =20
+ return 1;
+}
+
+
+static int ifoRead_PGC_COMMAND_TBL(ifo_handle_t *ifofile,=20
+ pgc_command_tbl_t *cmd_tbl,=20
+ unsigned int offset) {
+ unsigned int total;
+
+ memset(cmd_tbl, 0, sizeof(pgc_command_tbl_t));
+
+ if(!DVDFileSeek_(ifofile->file, offset))
+ return 0;
+
+ if(!(DVDReadBytes(ifofile->file, cmd_tbl, PGC_COMMAND_TBL_SIZE)))
+ return 0;
+
+ B2N_16(cmd_tbl->nr_of_pre);
+ B2N_16(cmd_tbl->nr_of_post);
+ B2N_16(cmd_tbl->nr_of_cell);
+ B2N_16(cmd_tbl->last_byte);
+ =20
+ total =3D cmd_tbl->nr_of_pre + cmd_tbl->nr_of_post + cmd_tbl->nr_of_ce=
ll;
+ CHECK_VALUE(PGC_COMMAND_TBL_SIZE + total * COMMAND_DATA_SIZE=20
+ <=3D cmd_tbl->last_byte + 1U);
+ CHECK_VALUE(total <=3D 255);
+
+ if(cmd_tbl->nr_of_pre !=3D 0) {
+ unsigned int pre_cmds_size =3D cmd_tbl->nr_of_pre * COMMAND_DATA_SI=
ZE;
+ cmd_tbl->pre_cmds =3D (vm_cmd_t *)malloc(pre_cmds_size);
+ if(!cmd_tbl->pre_cmds)
+ return 0;
+
+ if(!(DVDReadBytes(ifofile->file, cmd_tbl->pre_cmds, pre_cmds_size)))=
{
+ free(cmd_tbl->pre_cmds);
+ return 0;
+ }
+ }
+
+ if(cmd_tbl->nr_of_post !=3D 0) {
+ unsigned int post_cmds_size =3D cmd_tbl->nr_of_post * COMMAND_DATA_S=
IZE;
+ cmd_tbl->post_cmds =3D (vm_cmd_t *)malloc(post_cmds_size);
+ if(!cmd_tbl->post_cmds) {
+ if(cmd_tbl->pre_cmds)=20
+ free(cmd_tbl->pre_cmds);
+ return 0;
+ }
+ if(!(DVDReadBytes(ifofile->file, cmd_tbl->post_cmds, post_cmds_size)=
)) {
+ if(cmd_tbl->pre_cmds)=20
+ free(cmd_tbl->pre_cmds);
+ free(cmd_tbl->post_cmds);
+ return 0;
+ }
+ }
+
+ if(cmd_tbl->nr_of_cell !=3D 0) {
+ unsigned int cell_cmds_size =3D cmd_tbl->nr_of_cell * COMMAND_DATA_S=
IZE;
+ cmd_tbl->cell_cmds =3D (vm_cmd_t *)malloc(cell_cmds_size);
+ if(!cmd_tbl->cell_cmds) {
+ if(cmd_tbl->pre_cmds)
+ free(cmd_tbl->pre_cmds);
+ if(cmd_tbl->post_cmds)
+ free(cmd_tbl->post_cmds);
+ return 0;
+ }
+ if(!(DVDReadBytes(ifofile->file, cmd_tbl->cell_cmds, cell_cmds_size)=
)) {
+ if(cmd_tbl->pre_cmds)=20
+ free(cmd_tbl->pre_cmds);
+ if(cmd_tbl->post_cmds)=20
+ free(cmd_tbl->post_cmds);
+ free(cmd_tbl->cell_cmds);
+ return 0;
+ }
+ }
+ =20
+ /*=20
+ * Make a run over all the commands and see that we can interpret them=
all?
+ */
+ return 1;
+}
+
+
+static void ifoFree_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl) {
+ if(cmd_tbl) {
+ if(cmd_tbl->nr_of_pre && cmd_tbl->pre_cmds)
+ free(cmd_tbl->pre_cmds);
+ if(cmd_tbl->nr_of_post && cmd_tbl->post_cmds)
+ free(cmd_tbl->post_cmds);
+ if(cmd_tbl->nr_of_cell && cmd_tbl->cell_cmds)
+ free(cmd_tbl->cell_cmds);
+ free(cmd_tbl);
+ }
+}
+
+static int ifoRead_PGC_PROGRAM_MAP(ifo_handle_t *ifofile,=20
+ pgc_program_map_t *program_map,=20
+ unsigned int nr, unsigned int offset)=
{
+ unsigned int size =3D nr * sizeof(pgc_program_map_t);
+
+ if(!DVDFileSeek_(ifofile->file, offset))
+ return 0;
+=20
+ if(!(DVDReadBytes(ifofile->file, program_map, size)))
+ return 0;
+
+ return 1;
+}
+
+static int ifoRead_CELL_PLAYBACK_TBL(ifo_handle_t *ifofile,=20
+ cell_playback_t *cell_playback,
+ unsigned int nr, unsigned int offse=
t) {
+ unsigned int i;
+ unsigned int size =3D nr * sizeof(cell_playback_t);
+
+ if(!DVDFileSeek_(ifofile->file, offset))
+ return 0;
+
+ if(!(DVDReadBytes(ifofile->file, cell_playback, size)))
+ return 0;
+
+ for(i =3D 0; i < nr; i++) {
+ B2N_32(cell_playback[i].first_sector);
+ B2N_32(cell_playback[i].first_ilvu_end_sector);
+ B2N_32(cell_playback[i].last_vobu_start_sector);
+ B2N_32(cell_playback[i].last_sector);
+ =20
+ /* Changed < to <=3D because this was false in the movie 'Pi'. */
+ CHECK_VALUE(cell_playback[i].last_vobu_start_sector <=3D=20
+ cell_playback[i].last_sector);
+ CHECK_VALUE(cell_playback[i].first_sector <=3D=20
+ cell_playback[i].last_vobu_start_sector);
+ }
+
+ return 1;
+}
+
+
+static int ifoRead_CELL_POSITION_TBL(ifo_handle_t *ifofile,=20
+ cell_position_t *cell_position,=20
+ unsigned int nr, unsigned int offse=
t) {
+ unsigned int i;
+ unsigned int size =3D nr * sizeof(cell_position_t);
+
+ if(!DVDFileSeek_(ifofile->file, offset))
+ return 0;
+
+ if(!(DVDReadBytes(ifofile->file, cell_position, size)))
+ return 0;
+
+ for(i =3D 0; i < nr; i++) {
+ B2N_16(cell_position[i].vob_id_nr);
+ CHECK_ZERO(cell_position[i].zero_1);
+ }
+
+ return 1;
+}
+
+static int ifoRead_PGC(ifo_handle_t *ifofile, pgc_t *pgc, unsigned int o=
ffset) {
+ unsigned int i;
+
+ if(!DVDFileSeek_(ifofile->file, offset))
+ return 0;
+=20
+ if(!(DVDReadBytes(ifofile->file, pgc, PGC_SIZE)))
+ return 0;
+
+ B2N_16(pgc->next_pgc_nr);
+ B2N_16(pgc->prev_pgc_nr);
+ B2N_16(pgc->goup_pgc_nr);
+ B2N_16(pgc->command_tbl_offset);
+ B2N_16(pgc->program_map_offset);
+ B2N_16(pgc->cell_playback_offset);
+ B2N_16(pgc->cell_position_offset);
+
+ for(i =3D 0; i < 8; i++)
+ B2N_16(pgc->audio_control[i]);
+ for(i =3D 0; i < 32; i++)
+ B2N_32(pgc->subp_control[i]);
+ for(i =3D 0; i < 16; i++)
+ B2N_32(pgc->palette[i]);
+ =20
+ CHECK_ZERO(pgc->zero_1);
+ CHECK_VALUE(pgc->nr_of_programs <=3D pgc->nr_of_cells);
+
+ /* verify time (look at print_time) */
+ for(i =3D 0; i < 8; i++)
+ if(!pgc->audio_control[i] & 0x8000) /* The 'is present' bit */
+ CHECK_ZERO(pgc->audio_control[i]);
+ for(i =3D 0; i < 32; i++)
+ if(!pgc->subp_control[i] & 0x80000000) /* The 'is present' bit */
+ CHECK_ZERO(pgc->subp_control[i]);
+ =20
+ /* Check that time is 0:0:0:0 also if nr_of_programs =3D=3D 0 */
+ if(pgc->nr_of_programs =3D=3D 0) {
+ CHECK_ZERO(pgc->still_time);
+ CHECK_ZERO(pgc->pg_playback_mode); // ??
+ CHECK_VALUE(pgc->program_map_offset =3D=3D 0);
+ CHECK_VALUE(pgc->cell_playback_offset =3D=3D 0);
+ CHECK_VALUE(pgc->cell_position_offset =3D=3D 0);
+ } else {
+ CHECK_VALUE(pgc->program_map_offset !=3D 0);
+ CHECK_VALUE(pgc->cell_playback_offset !=3D 0);
+ CHECK_VALUE(pgc->cell_position_offset !=3D 0);
+ }
+ =20
+ if(pgc->command_tbl_offset !=3D 0) {
+ pgc->command_tbl =3D malloc(sizeof(pgc_command_tbl_t));
+ if(!pgc->command_tbl)
+ return 0;
+
+ if(!ifoRead_PGC_COMMAND_TBL(ifofile, pgc->command_tbl,=20
+ offset + pgc->command_tbl_offset)) {
+ free(pgc->command_tbl);
+ return 0;
+ }
+ } else {
+ pgc->command_tbl =3D NULL;
+ }
+ =20
+ if(pgc->program_map_offset !=3D 0) {
+ if(pgc->nr_of_programs !=3D 0) {
+
+ pgc->program_map =3D malloc(pgc->nr_of_programs * sizeof(pgc_program=
_map_t));
+ if(!pgc->program_map) {
+ ifoFree_PGC_COMMAND_TBL(pgc->command_tbl);
+ return 0;
+ }
+ if(!ifoRead_PGC_PROGRAM_MAP(ifofile, pgc->program_map,pgc->nr_of_pro=
grams,
+ offset + pgc->program_map_offset)) {
+ ifoFree_PGC_COMMAND_TBL(pgc->command_tbl);
+ free(pgc->program_map);
+ return 0;
+ }
+ } else {
+ pgc->program_map =3D NULL;
+ }
+ } else {
+ pgc->program_map =3D NULL;
+ }
+ =20
+ if(pgc->cell_playback_offset !=3D 0) {
+ if(pgc->nr_of_cells !=3D 0) {
+
+ pgc->cell_playback =3D malloc(pgc->nr_of_cells * sizeof(cell_playbac=
k_t));
+ if(!pgc->cell_playback) {
+ ifoFree_PGC_COMMAND_TBL(pgc->command_tbl);
+ if(pgc->program_map)
+ free(pgc->program_map);
+ return 0;
+ }
+ if(!ifoRead_CELL_PLAYBACK_TBL(ifofile, pgc->cell_playback,=20
+ pgc->nr_of_cells,
+ offset + pgc->cell_playback_offset)) {
+ ifoFree_PGC_COMMAND_TBL(pgc->command_tbl);
+ if(pgc->program_map)
+ free(pgc->program_map);
+ free(pgc->cell_playback);
+ return 0;
+ }
+ } else {
+ pgc->cell_playback =3D NULL;
+ }
+ } else {
+ pgc->cell_playback =3D NULL;
+ }
+ =20
+ if(pgc->cell_position_offset !=3D 0) {
+ if(pgc->nr_of_cells !=3D 0) {
+
+ pgc->cell_position =3D malloc(pgc->nr_of_cells * sizeof(cell_positio=
n_t));
+ if(!pgc->cell_position) {
+ ifoFree_PGC(pgc);
+ return 0;
+ }
+ if(!ifoRead_CELL_POSITION_TBL(ifofile, pgc->cell_position,=20
+ pgc->nr_of_cells,
+ offset + pgc->cell_position_offset)) {
+ ifoFree_PGC(pgc);
+ return 0;
+ }
+ } else {
+ pgc->cell_position =3D NULL;
+ }
+ } else {
+ pgc->cell_position =3D NULL;
+ }
+
+ return 1;
+}
+
+int ifoRead_FP_PGC(ifo_handle_t *ifofile) {
+
+ if(!ifofile)
+ return 0;
+
+ if(!ifofile->vmgi_mat)
+ return 0;
+ =20
+ /* It seems that first_play_pgc is optional after all. */
+ ifofile->first_play_pgc =3D 0;
+ if(ifofile->vmgi_mat->first_play_pgc =3D=3D 0)
+ return 1;
+ =20
+ ifofile->first_play_pgc =3D (pgc_t *)malloc(sizeof(pgc_t));
+ if(!ifofile->first_play_pgc)
+ return 0;
+ =20
+ if(!ifoRead_PGC(ifofile, ifofile->first_play_pgc,=20
+ ifofile->vmgi_mat->first_play_pgc)) {
+ free(ifofile->first_play_pgc);
+ ifofile->first_play_pgc =3D 0;
+ return 0;
+ }
+
+ return 1;
+}
+
+static void ifoFree_PGC(pgc_t *pgc) {
+ if(pgc) {
+ ifoFree_PGC_COMMAND_TBL(pgc->command_tbl);
+ if(pgc->program_map)
+ free(pgc->program_map);
+ if(pgc->cell_playback)
+ free(pgc->cell_playback);
+ if(pgc->cell_position)
+ free(pgc->cell_position);
+ }
+}
+
+void ifoFree_FP_PGC(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return;
+ =20
+ if(ifofile->first_play_pgc) {
+ ifoFree_PGC(ifofile->first_play_pgc);
+ free(ifofile->first_play_pgc);
+ ifofile->first_play_pgc =3D 0;
+ }
+}
+
+
+int ifoRead_TT_SRPT(ifo_handle_t *ifofile) {
+ tt_srpt_t *tt_srpt;
+ int i;
+ unsigned info_length;
+
+ if(!ifofile)
+ return 0;
+
+ if(!ifofile->vmgi_mat)
+ return 0;
+
+ if(ifofile->vmgi_mat->tt_srpt =3D=3D 0) /* mandatory */
+ return 0;
+
+ if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->tt_srpt * DVD_BLOCK=
_LEN))
+ return 0;
+
+ tt_srpt =3D (tt_srpt_t *)malloc(sizeof(tt_srpt_t));
+ if(!tt_srpt)
+ return 0;
+
+ ifofile->tt_srpt =3D tt_srpt;
+ =20
+ if(!(DVDReadBytes(ifofile->file, tt_srpt, TT_SRPT_SIZE))) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to read read TT_SRPT.\n");
+ }
+ free(tt_srpt);
+ return 0;
+ }
+
+ B2N_16(tt_srpt->nr_of_srpts);
+ B2N_32(tt_srpt->last_byte);
+ =20
+ info_length =3D tt_srpt->last_byte + 1 - TT_SRPT_SIZE;
+
+ tt_srpt->title =3D (title_info_t *)malloc(info_length);=20
+ if(!tt_srpt->title) {
+ free(tt_srpt);
+ ifofile->tt_srpt =3D 0;
+ return 0;
+ }
+ if(!(DVDReadBytes(ifofile->file, tt_srpt->title, info_length))) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to read read TT_SRPT.\n");
+ }
+ ifoFree_TT_SRPT(ifofile);
+ return 0;
+ }
+
+ for(i =3D 0; i < tt_srpt->nr_of_srpts; i++) {
+ B2N_16(tt_srpt->title[i].nr_of_ptts);
+ B2N_16(tt_srpt->title[i].parental_id);
+ B2N_32(tt_srpt->title[i].title_set_sector);
+ }
+ =20
+
+ CHECK_ZERO(tt_srpt->zero_1);
+ CHECK_VALUE(tt_srpt->nr_of_srpts !=3D 0);
+ CHECK_VALUE(tt_srpt->nr_of_srpts < 100); // ??
+ CHECK_VALUE(tt_srpt->nr_of_srpts * sizeof(title_info_t) <=3D info_leng=
th);
+ =20
+ for(i =3D 0; i < tt_srpt->nr_of_srpts; i++) {
+ CHECK_VALUE(tt_srpt->title[i].pb_ty.zero_1 =3D=3D 0);
+ CHECK_VALUE(tt_srpt->title[i].nr_of_angles !=3D 0);
+ CHECK_VALUE(tt_srpt->title[i].nr_of_angles < 10);
+ //CHECK_VALUE(tt_srpt->title[i].nr_of_ptts !=3D 0);
+ // XXX: this assertion breaks Ghostbusters:
+ CHECK_VALUE(tt_srpt->title[i].nr_of_ptts < 1000); // ??
+ CHECK_VALUE(tt_srpt->title[i].title_set_nr !=3D 0);
+ CHECK_VALUE(tt_srpt->title[i].title_set_nr < 100); // ??
+ CHECK_VALUE(tt_srpt->title[i].vts_ttn !=3D 0);
+ CHECK_VALUE(tt_srpt->title[i].vts_ttn < 100); // ??
+ //CHECK_VALUE(tt_srpt->title[i].title_set_sector !=3D 0);
+ }
+ =20
+ // Make this a function
+#if 0
+ if(memcmp((uint8_t *)tt_srpt->title +=20
+ tt_srpt->nr_of_srpts * sizeof(title_info_t),=20
+ my_friendly_zeros,=20
+ info_length - tt_srpt->nr_of_srpts * sizeof(title_info_t))) =
{
+ fprintf(stderr, "VMG_PTT_SRPT slack is !=3D 0, ");
+ hexdump((uint8_t *)tt_srpt->title +=20
+ tt_srpt->nr_of_srpts * sizeof(title_info_t),=20
+ info_length - tt_srpt->nr_of_srpts * sizeof(title_info_t));
+ }
+#endif
+
+ return 1;
+}
+
+
+void ifoFree_TT_SRPT(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return;
+ =20
+ if(ifofile->tt_srpt) {
+ free(ifofile->tt_srpt->title);
+ free(ifofile->tt_srpt);
+ ifofile->tt_srpt =3D 0;
+ }
+}
+
+
+int ifoRead_VTS_PTT_SRPT(ifo_handle_t *ifofile) {
+ vts_ptt_srpt_t *vts_ptt_srpt;
+ int info_length, i, j;
+ uint32_t *data;
+
+ if(!ifofile)
+ return 0;
+ =20
+ if(!ifofile->vtsi_mat)
+ return 0;
+
+ if(ifofile->vtsi_mat->vts_ptt_srpt =3D=3D 0) /* mandatory */
+ return 0;
+ =20
+ if(!DVDFileSeek_(ifofile->file,
+ ifofile->vtsi_mat->vts_ptt_srpt * DVD_BLOCK_LEN))
+ return 0;
+
+ vts_ptt_srpt =3D (vts_ptt_srpt_t *)malloc(sizeof(vts_ptt_srpt_t));
+ if(!vts_ptt_srpt)
+ return 0;
+
+ ifofile->vts_ptt_srpt =3D vts_ptt_srpt;
+
+ if(!(DVDReadBytes(ifofile->file, vts_ptt_srpt, VTS_PTT_SRPT_SIZE))) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to read PTT search table.\n");
+ }
+ free(vts_ptt_srpt);
+ return 0;
+ }
+
+ B2N_16(vts_ptt_srpt->nr_of_srpts);
+ B2N_32(vts_ptt_srpt->last_byte);
+
+ CHECK_ZERO(vts_ptt_srpt->zero_1);
+ CHECK_VALUE(vts_ptt_srpt->nr_of_srpts !=3D 0);
+ CHECK_VALUE(vts_ptt_srpt->nr_of_srpts < 100); // ??
+ =20
+ info_length =3D vts_ptt_srpt->last_byte + 1 - VTS_PTT_SRPT_SIZE;
+ =20
+ data =3D (uint32_t *)malloc(info_length);=20
+ if(!data) {
+ free(vts_ptt_srpt);
+ ifofile->vts_ptt_srpt =3D 0;
+ return 0;
+ }
+ if(!(DVDReadBytes(ifofile->file, data, info_length))) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to read PTT search table.\n");
+ }
+ free(vts_ptt_srpt);
+ free(data);
+ ifofile->vts_ptt_srpt =3D 0;
+ return 0;
+ }
+
+ for(i =3D 0; i < vts_ptt_srpt->nr_of_srpts; i++) {
+ B2N_32(data[i]);
+ /* assert(data[i] + sizeof(ptt_info_t) <=3D vts_ptt_srpt->last_byte =
+ 1);
+ Magic Knight Rayearth Daybreak is mastered very strange and has=20
+ Titles with 0 PTTs. They all have a data[i] offsets beyond the en=
d of
+ of the vts_ptt_srpt structure. */
+ CHECK_VALUE(data[i] + sizeof(ptt_info_t) <=3D vts_ptt_srpt->last_byt=
e + 1 + 4);
+ }
+=20
+ vts_ptt_srpt->ttu_offset =3D data;
+ =20
+ vts_ptt_srpt->title =3D malloc(vts_ptt_srpt->nr_of_srpts * sizeof(ttu_=
t));
+ if(!vts_ptt_srpt->title) {
+ free(vts_ptt_srpt);
+ free(data);
+ ifofile->vts_ptt_srpt =3D 0;
+ return 0;
+ }
+ for(i =3D 0; i < vts_ptt_srpt->nr_of_srpts; i++) {
+ int n;
+ if(i < vts_ptt_srpt->nr_of_srpts - 1)
+ n =3D (data[i+1] - data[i]);
+ else
+ n =3D (vts_ptt_srpt->last_byte + 1 - data[i]);
+ /* assert(n > 0 && (n % 4) =3D=3D 0);
+ Magic Knight Rayearth Daybreak is mastered very strange and has=20
+ Titles with 0 PTTs. */
+ if(n < 0) n =3D 0;
+ CHECK_VALUE(n % 4 =3D=3D 0);
+ =20
+ vts_ptt_srpt->title[i].nr_of_ptts =3D n / 4;
+ vts_ptt_srpt->title[i].ptt =3D malloc(n * sizeof(ptt_info_t));
+ if(!vts_ptt_srpt->title[i].ptt) {
+ for(n =3D 0; n < i; n++)
+ free(vts_ptt_srpt->title[n].ptt);
+ free(vts_ptt_srpt);
+ free(data);
+ ifofile->vts_ptt_srpt =3D 0;
+ return 0;
+ }
+ for(j =3D 0; j < vts_ptt_srpt->title[i].nr_of_ptts; j++) {
+ /* The assert placed here because of Magic Knight Rayearth Daybrea=
k */
+ CHECK_VALUE(data[i] + sizeof(ptt_info_t) <=3D vts_ptt_srpt->last_b=
yte + 1);
+ vts_ptt_srpt->title[i].ptt[j].pgcn=20
+ =3D *(uint16_t*)(((char *)data) + data[i] + 4*j - VTS_PTT_SRPT_S=
IZE);
+ vts_ptt_srpt->title[i].ptt[j].pgn=20
+ =3D *(uint16_t*)(((char *)data) + data[i] + 4*j + 2 - VTS_PTT_SR=
PT_SIZE);
+ }
+ }
+ =20
+ for(i =3D 0; i < vts_ptt_srpt->nr_of_srpts; i++) {
+ for(j =3D 0; j < vts_ptt_srpt->title[i].nr_of_ptts; j++) {
+ B2N_16(vts_ptt_srpt->title[i].ptt[j].pgcn);
+ B2N_16(vts_ptt_srpt->title[i].ptt[j].pgn);
+ }
+ }
+ =20
+ for(i =3D 0; i < vts_ptt_srpt->nr_of_srpts; i++) {
+ CHECK_VALUE(vts_ptt_srpt->title[i].nr_of_ptts < 1000); // ??
+ for(j =3D 0; j < vts_ptt_srpt->title[i].nr_of_ptts; j++) {
+ CHECK_VALUE(vts_ptt_srpt->title[i].ptt[j].pgcn !=3D 0 );
+ CHECK_VALUE(vts_ptt_srpt->title[i].ptt[j].pgcn < 1000); // ??
+ CHECK_VALUE(vts_ptt_srpt->title[i].ptt[j].pgn !=3D 0);
+ CHECK_VALUE(vts_ptt_srpt->title[i].ptt[j].pgn < 100); // ??
+ }
+ }
+
+ return 1;
+}
+
+
+void ifoFree_VTS_PTT_SRPT(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return;
+ =20
+ if(ifofile->vts_ptt_srpt) {
+ int i;
+ for(i =3D 0; i < ifofile->vts_ptt_srpt->nr_of_srpts; i++)
+ free(ifofile->vts_ptt_srpt->title[i].ptt);
+ free(ifofile->vts_ptt_srpt->ttu_offset);
+ free(ifofile->vts_ptt_srpt->title);
+ free(ifofile->vts_ptt_srpt);
+ ifofile->vts_ptt_srpt =3D 0;
+ }
+}
+
+
+int ifoRead_PTL_MAIT(ifo_handle_t *ifofile) {
+ ptl_mait_t *ptl_mait;
+ int info_length;
+ unsigned int i, j;
+
+ if(!ifofile)
+ return 0;
+ =20
+ if(!ifofile->vmgi_mat)
+ return 0;
+ =20
+ if(ifofile->vmgi_mat->ptl_mait =3D=3D 0)
+ return 1;
+
+ if(!DVDFileSeek_(ifofile->file, ifofile->vmgi_mat->ptl_mait * DVD_BLOC=
K_LEN))
+ return 0;
+
+ ptl_mait =3D (ptl_mait_t *)malloc(sizeof(ptl_mait_t));
+ if(!ptl_mait)
+ return 0;
+
+ ifofile->ptl_mait =3D ptl_mait;
+
+ if(!(DVDReadBytes(ifofile->file, ptl_mait, PTL_MAIT_SIZE))) {
+ free(ptl_mait);
+ ifofile->ptl_mait =3D 0;
+ return 0;
+ }
+
+ B2N_16(ptl_mait->nr_of_countries);
+ B2N_16(ptl_mait->nr_of_vtss);
+ B2N_32(ptl_mait->last_byte);
+ =20
+ CHECK_VALUE(ptl_mait->nr_of_countries !=3D 0);
+ CHECK_VALUE(ptl_mait->nr_of_countries < 100); // ??
+ CHECK_VALUE(ptl_mait->nr_of_vtss !=3D 0);
+ CHECK_VALUE(ptl_mait->nr_of_vtss < 100); // ?? =20
+ CHECK_VALUE(ptl_mait->nr_of_countries * PTL_MAIT_COUNTRY_SIZE=20
+ <=3D ptl_mait->last_byte + 1 - PTL_MAIT_SIZE);
+ =20
+ info_length =3D ptl_mait->nr_of_countries * sizeof(ptl_mait_country_t)=
;
+ ptl_mait->countries =3D (ptl_mait_country_t *)malloc(info_length);
+ if(!ptl_mait->countries) {
+ free(ptl_mait);
+ ifofile->ptl_mait =3D 0;
+ return 0;
+ }
+ =20
+ for(i =3D 0; i < ptl_mait->nr_of_countries; i++) {
+ if(!(DVDReadBytes(ifofile->file, &ptl_mait->countries[i], PTL_MAIT_C=
OUNTRY_SIZE))) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to read PTL_MAIT.\n");
+ }
+ free(ptl_mait->countries);
+ free(ptl_mait);
+ ifofile->ptl_mait =3D 0;
+ return 0;
+ }
+ }
+
+ for(i =3D 0; i < ptl_mait->nr_of_countries; i++) {
+ B2N_16(ptl_mait->countries[i].country_code);
+ B2N_16(ptl_mait->countries[i].pf_ptl_mai_start_byte);
+ }
+ =20
+ for(i =3D 0; i < ptl_mait->nr_of_countries; i++) {
+ CHECK_ZERO(ptl_mait->countries[i].zero_1);
+ CHECK_ZERO(ptl_mait->countries[i].zero_2); =20
+ CHECK_VALUE(ptl_mait->countries[i].pf_ptl_mai_start_byte +
+ 16U * (ptl_mait->nr_of_vtss + 1) <=3D ptl_mait->last_byt=
e + 1U);
+ }
+
+ for(i =3D 0; i < ptl_mait->nr_of_countries; i++) {
+ uint16_t *pf_temp;
+ =20
+ if(!DVDFileSeek_(ifofile->file,=20
+ ifofile->vmgi_mat->ptl_mait * DVD_BLOCK_LEN
+ + ptl_mait->countries[i].pf_ptl_mai_start_byte)) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to seak PTL_MAIT table.\n");
+ }
+ free(ptl_mait->countries);
+ free(ptl_mait);
+ return 0;
+ }
+ info_length =3D (ptl_mait->nr_of_vtss + 1) * sizeof(pf_level_t);
+ pf_temp =3D (uint16_t *)malloc(info_length);
+ if(!pf_temp) {
+ for(j =3D 0; j < i ; j++) {
+ free(ptl_mait->countries[j].pf_ptl_mai);
+ }
+ free(ptl_mait->countries);
+ free(ptl_mait);
+ return 0;
+ }
+ if(!(DVDReadBytes(ifofile->file, pf_temp, info_length))) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to read PTL_MAIT table.\n");
+ }
+ free(pf_temp);
+ for(j =3D 0; j < i ; j++) {
+ free(ptl_mait->countries[j].pf_ptl_mai);
+ }
+ free(ptl_mait->countries);
+ free(ptl_mait);
+ return 0;
+ }
+ for (j =3D 0; j < (unsigned)((ptl_mait->nr_of_vtss + 1) * 8); j++) {
+ B2N_16(pf_temp[j]);
+ }
+ ptl_mait->countries[i].pf_ptl_mai =3D (pf_level_t *)malloc(info_leng=
th);
+ if(!ptl_mait->countries[i].pf_ptl_mai) {
+ free(pf_temp);
+ for(j =3D 0; j < i ; j++) {
+ free(ptl_mait->countries[j].pf_ptl_mai);
+ }
+ free(ptl_mait->countries);
+ free(ptl_mait);
+ return 0;
+ }
+ { /* Transpose the array so we can use C indexing. */
+ int level, vts;
+ for(level =3D 0; level < 8; level++) {
+ for(vts =3D 0; vts <=3D ptl_mait->nr_of_vtss; vts++) {
+ ptl_mait->countries[i].pf_ptl_mai[vts][level] =3D
+ pf_temp[(7-level)*(ptl_mait->nr_of_vtss+1) + vts];
+ }
+ }
+ free(pf_temp);
+ }
+ }
+ return 1;
+}
+
+void ifoFree_PTL_MAIT(ifo_handle_t *ifofile) {
+ unsigned int i;
+ =20
+ if(!ifofile)
+ return;
+ =20
+ if(ifofile->ptl_mait) {
+ for(i =3D 0; i < ifofile->ptl_mait->nr_of_countries; i++) {
+ free(ifofile->ptl_mait->countries[i].pf_ptl_mai);
+ }
+ free(ifofile->ptl_mait->countries);
+ free(ifofile->ptl_mait);
+ ifofile->ptl_mait =3D 0;
+ }
+}
+
+int ifoRead_VTS_TMAPT(ifo_handle_t *ifofile) {
+ vts_tmapt_t *vts_tmapt;
+ uint32_t *vts_tmap_srp;
+ unsigned int offset;
+ int info_length;
+ unsigned int i, j;
+ =20
+ if(!ifofile)
+ return 0;
+
+ if(!ifofile->vtsi_mat)
+ return 0;
+
+ /* Seems to be optional, at least when there are no OneSequencial Titl=
es */
+ if(ifofile->vtsi_mat->vts_tmapt =3D=3D 0) {
+ ifofile->vts_tmapt =3D NULL;
+ return 1;
+ }
+ =20
+ offset =3D ifofile->vtsi_mat->vts_tmapt * DVD_BLOCK_LEN;
+ =20
+ if(!DVDFileSeek_(ifofile->file, offset))=20
+ return 0;
+ =20
+ vts_tmapt =3D (vts_tmapt_t *)malloc(sizeof(vts_tmapt_t));
+ if(!vts_tmapt)
+ return 0;
+ =20
+ ifofile->vts_tmapt =3D vts_tmapt;
+ =20
+ if(!(DVDReadBytes(ifofile->file, vts_tmapt, VTS_TMAPT_SIZE))) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to read VTS_TMAPT.\n");
+ }
+ free(vts_tmapt);
+ ifofile->vts_tmapt =3D NULL;
+ return 0;
+ }
+
+ B2N_16(vts_tmapt->nr_of_tmaps);
+ B2N_32(vts_tmapt->last_byte);
+ =20
+ CHECK_ZERO(vts_tmapt->zero_1);
+ =20
+ info_length =3D vts_tmapt->nr_of_tmaps * 4;
+ =20
+ vts_tmap_srp =3D (uint32_t *)malloc(info_length);
+ if(!vts_tmap_srp) {
+ free(vts_tmapt);
+ ifofile->vts_tmapt =3D NULL;
+ return 0;
+ }
+
+ vts_tmapt->tmap_offset =3D vts_tmap_srp;
+ =20
+ if(!(DVDReadBytes(ifofile->file, vts_tmap_srp, info_length))) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to read VTS_TMAPT.\n");
+ }
+ free(vts_tmap_srp);
+ free(vts_tmapt);
+ ifofile->vts_tmapt =3D NULL;
+ return 0;
+ }
+
+ for (i =3D 0; i < vts_tmapt->nr_of_tmaps; i++) {
+ B2N_32(vts_tmap_srp[i]);=20
+ }
+
+ =20
+ info_length =3D vts_tmapt->nr_of_tmaps * sizeof(vts_tmap_t);
+ =20
+ vts_tmapt->tmap =3D (vts_tmap_t *)malloc(info_length);
+ if(!vts_tmapt->tmap) {
+ free(vts_tmap_srp);
+ free(vts_tmapt);
+ ifofile->vts_tmapt =3D NULL;
+ return 0;
+ }
+
+ memset(vts_tmapt->tmap, 0, info_length); /* So ifoFree_VTS_TMAPT works=
. */
+ =20
+ for(i =3D 0; i < vts_tmapt->nr_of_tmaps; i++) {
+ if(!DVDFileSeek_(ifofile->file, offset + vts_tmap_srp[i])) {
+ ifoFree_VTS_TMAPT(ifofile);
+ return 0;
+ }
+
+ if(!(DVDReadBytes(ifofile->file, &vts_tmapt->tmap[i], VTS_TMAP_SIZE)=
)) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to read VTS_TMAP.\n");
+ }
+ ifoFree_VTS_TMAPT(ifofile);
+ return 0;
+ }
+ =20
+ B2N_16(vts_tmapt->tmap[i].nr_of_entries);
+ CHECK_ZERO(vts_tmapt->tmap[i].zero_1);
+ =20
+ if(vts_tmapt->tmap[i].nr_of_entries =3D=3D 0) { /* Early out if zero=
entries */
+ vts_tmapt->tmap[i].map_ent =3D NULL;
+ continue;
+ }
+ =20
+ info_length =3D vts_tmapt->tmap[i].nr_of_entries * sizeof(map_ent_t)=
;
+ =20
+ vts_tmapt->tmap[i].map_ent =3D (map_ent_t *)malloc(info_length);
+ if(!vts_tmapt->tmap[i].map_ent) {
+ ifoFree_VTS_TMAPT(ifofile);
+ return 0;
+ }
+
+ if(!(DVDReadBytes(ifofile->file, vts_tmapt->tmap[i].map_ent, info_le=
ngth))) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to read VTS_TMAP_ENT.\n");
+ }
+ ifoFree_VTS_TMAPT(ifofile);
+ return 0;
+ }
+ =20
+ for(j =3D 0; j < vts_tmapt->tmap[i].nr_of_entries; j++)
+ B2N_32(vts_tmapt->tmap[i].map_ent[j]);
+ } =20
+ =20
+ return 1;
+}
+
+void ifoFree_VTS_TMAPT(ifo_handle_t *ifofile) {
+ unsigned int i;
+ =20
+ if(!ifofile)
+ return;
+ =20
+ if(ifofile->vts_tmapt) { =20
+ for(i =3D 0; i < ifofile->vts_tmapt->nr_of_tmaps; i++)
+ if(ifofile->vts_tmapt->tmap[i].map_ent)
+ free(ifofile->vts_tmapt->tmap[i].map_ent);
+ free(ifofile->vts_tmapt->tmap);
+ free(ifofile->vts_tmapt->tmap_offset);
+ free(ifofile->vts_tmapt);
+ ifofile->vts_tmapt =3D NULL;
+ }
+}
+
+
+int ifoRead_TITLE_C_ADT(ifo_handle_t *ifofile) {
+
+ if(!ifofile)
+ return 0;
+
+ if(!ifofile->vtsi_mat)
+ return 0;
+
+ if(ifofile->vtsi_mat->vts_c_adt =3D=3D 0) /* mandatory */
+ return 0;
+
+ ifofile->vts_c_adt =3D (c_adt_t *)malloc(sizeof(c_adt_t));
+ if(!ifofile->vts_c_adt)
+ return 0;
+
+ if(!ifoRead_C_ADT_internal(ifofile, ifofile->vts_c_adt,=20
+ ifofile->vtsi_mat->vts_c_adt)) {
+ free(ifofile->vts_c_adt);
+ ifofile->vts_c_adt =3D 0;
+ return 0;
+ }
+
+ return 1;
+}
+
+int ifoRead_C_ADT(ifo_handle_t *ifofile) {
+ unsigned int sector;
+
+ if(!ifofile)
+ return 0;
+ =20
+ if(ifofile->vmgi_mat) {
+ if(ifofile->vmgi_mat->vmgm_c_adt =3D=3D 0)
+ return 1;
+ sector =3D ifofile->vmgi_mat->vmgm_c_adt;
+ } else if(ifofile->vtsi_mat) {
+ if(ifofile->vtsi_mat->vtsm_c_adt =3D=3D 0)
+ return 1;
+ sector =3D ifofile->vtsi_mat->vtsm_c_adt;
+ } else {
+ return 0;
+ }
+ =20
+ ifofile->menu_c_adt =3D (c_adt_t *)malloc(sizeof(c_adt_t));
+ if(!ifofile->menu_c_adt)
+ return 0;
+
+ if(!ifoRead_C_ADT_internal(ifofile, ifofile->menu_c_adt, sector)) {
+ free(ifofile->menu_c_adt);
+ ifofile->menu_c_adt =3D 0;
+ return 0;
+ }
+
+ return 1;
+}
+
+static int ifoRead_C_ADT_internal(ifo_handle_t *ifofile,=20
+ c_adt_t *c_adt, unsigned int sector) {
+ unsigned int i, info_length;
+
+ if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN))
+ return 0;
+
+ if(!(DVDReadBytes(ifofile->file, c_adt, C_ADT_SIZE)))
+ return 0;
+
+ B2N_16(c_adt->nr_of_vobs);
+ B2N_32(c_adt->last_byte);
+ =20
+ info_length =3D c_adt->last_byte + 1 - C_ADT_SIZE;
+ =20
+ CHECK_ZERO(c_adt->zero_1);
+ /* assert(c_adt->nr_of_vobs > 0); =20
+ Magic Knight Rayearth Daybreak is mastered very strange and has=20
+ Titles with a VOBS that has no cells. */
+ CHECK_VALUE(info_length % sizeof(cell_adr_t) =3D=3D 0);
+ =20
+ /* assert(info_length / sizeof(cell_adr_t) >=3D c_adt->nr_of_vobs);
+ Enemy of the State region 2 (de) has Titles where nr_of_vobs field
+ is to high, they high ones are never referenced though. */
+ if(info_length / sizeof(cell_adr_t) < c_adt->nr_of_vobs) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: *C_ADT nr_of_vobs > avaiable info ent=
ries\n");
+ }
+ c_adt->nr_of_vobs =3D info_length / sizeof(cell_adr_t);
+ }
+ =20
+ c_adt->cell_adr_table =3D (cell_adr_t *)malloc(info_length);
+ if(!c_adt->cell_adr_table)
+ return 0;
+
+ if(info_length &&=20
+ !(DVDReadBytes(ifofile->file, c_adt->cell_adr_table, info_length)))=
{
+ free(c_adt->cell_adr_table);
+ return 0;
+ }
+
+ for(i =3D 0; i < info_length/sizeof(cell_adr_t); i++) {
+ B2N_16(c_adt->cell_adr_table[i].vob_id);
+ B2N_32(c_adt->cell_adr_table[i].start_sector);
+ B2N_32(c_adt->cell_adr_table[i].last_sector);
+
+ CHECK_ZERO(c_adt->cell_adr_table[i].zero_1);
+ CHECK_VALUE(c_adt->cell_adr_table[i].vob_id > 0);
+ CHECK_VALUE(c_adt->cell_adr_table[i].vob_id <=3D c_adt->nr_of_vobs);
+ CHECK_VALUE(c_adt->cell_adr_table[i].cell_id > 0);
+ CHECK_VALUE(c_adt->cell_adr_table[i].start_sector <=20
+ c_adt->cell_adr_table[i].last_sector);
+ }
+
+ return 1;
+}
+
+
+static void ifoFree_C_ADT_internal(c_adt_t *c_adt) {
+ if(c_adt) {
+ free(c_adt->cell_adr_table);
+ free(c_adt);
+ }
+}
+
+void ifoFree_C_ADT(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return;
+ =20
+ ifoFree_C_ADT_internal(ifofile->menu_c_adt);
+ ifofile->menu_c_adt =3D 0;
+}
+
+void ifoFree_TITLE_C_ADT(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return;
+ =20
+ ifoFree_C_ADT_internal(ifofile->vts_c_adt);
+ ifofile->vts_c_adt =3D 0;
+}
+
+int ifoRead_TITLE_VOBU_ADMAP(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return 0;
+
+ if(!ifofile->vtsi_mat)
+ return 0;
+ =20
+ if(ifofile->vtsi_mat->vts_vobu_admap =3D=3D 0) /* mandatory */
+ return 0;
+ =20
+ ifofile->vts_vobu_admap =3D (vobu_admap_t *)malloc(sizeof(vobu_admap_t=
));
+ if(!ifofile->vts_vobu_admap)
+ return 0;
+
+ if(!ifoRead_VOBU_ADMAP_internal(ifofile, ifofile->vts_vobu_admap,
+ ifofile->vtsi_mat->vts_vobu_admap)) {
+ free(ifofile->vts_vobu_admap);
+ ifofile->vts_vobu_admap =3D 0;
+ return 0;
+ }
+
+ return 1;
+}
+
+int ifoRead_VOBU_ADMAP(ifo_handle_t *ifofile) {
+ unsigned int sector;
+
+ if(!ifofile)
+ return 0;
+ =20
+ if(ifofile->vmgi_mat) {
+ if(ifofile->vmgi_mat->vmgm_vobu_admap =3D=3D 0)
+ return 1;
+ sector =3D ifofile->vmgi_mat->vmgm_vobu_admap;
+ } else if(ifofile->vtsi_mat) {
+ if(ifofile->vtsi_mat->vtsm_vobu_admap =3D=3D 0)
+ return 1;
+ sector =3D ifofile->vtsi_mat->vtsm_vobu_admap;
+ } else {
+ return 0;
+ }
+ =20
+ ifofile->menu_vobu_admap =3D (vobu_admap_t *)malloc(sizeof(vobu_admap_=
t));
+ if(!ifofile->menu_vobu_admap)
+ return 0;
+ =20
+ if(!ifoRead_VOBU_ADMAP_internal(ifofile, ifofile->menu_vobu_admap, sec=
tor)) {
+ free(ifofile->menu_vobu_admap);
+ ifofile->menu_vobu_admap =3D 0;
+ return 0;
+ }
+
+ return 1;
+}
+
+static int ifoRead_VOBU_ADMAP_internal(ifo_handle_t *ifofile,=20
+ vobu_admap_t *vobu_admap,=20
+ unsigned int sector) {
+ unsigned int i;
+ int info_length;
+
+ if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN))
+ return 0;
+
+ if(!(DVDReadBytes(ifofile->file, vobu_admap, VOBU_ADMAP_SIZE)))
+ return 0;
+
+ B2N_32(vobu_admap->last_byte);
+ =20
+ info_length =3D vobu_admap->last_byte + 1 - VOBU_ADMAP_SIZE;
+ /* assert(info_length > 0);
+ Magic Knight Rayearth Daybreak is mastered very strange and has=20
+ Titles with a VOBS that has no VOBUs. */
+ CHECK_VALUE(info_length % sizeof(uint32_t) =3D=3D 0);
+ =20
+ vobu_admap->vobu_start_sectors =3D (uint32_t *)malloc(info_length);=20
+ if(!vobu_admap->vobu_start_sectors) {
+ return 0;
+ }
+ if(info_length &&=20
+ !(DVDReadBytes(ifofile->file,=20
+ vobu_admap->vobu_start_sectors, info_length))) {
+ free(vobu_admap->vobu_start_sectors);
+ return 0;
+ }
+
+ for(i =3D 0; i < info_length/sizeof(uint32_t); i++)
+ B2N_32(vobu_admap->vobu_start_sectors[i]);
+
+ return 1;
+}
+
+
+static void ifoFree_VOBU_ADMAP_internal(vobu_admap_t *vobu_admap) {
+ if(vobu_admap) {
+ free(vobu_admap->vobu_start_sectors);
+ free(vobu_admap);
+ }
+}
+
+void ifoFree_VOBU_ADMAP(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return;
+ =20
+ ifoFree_VOBU_ADMAP_internal(ifofile->menu_vobu_admap);
+ ifofile->menu_vobu_admap =3D 0;
+}
+
+void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return;
+ =20
+ ifoFree_VOBU_ADMAP_internal(ifofile->vts_vobu_admap);
+ ifofile->vts_vobu_admap =3D 0;
+}
+
+int ifoRead_PGCIT(ifo_handle_t *ifofile) {
+
+ if(!ifofile)
+ return 0;
+ =20
+ if(!ifofile->vtsi_mat)
+ return 0;
+ =20
+ if(ifofile->vtsi_mat->vts_pgcit =3D=3D 0) /* mandatory */
+ return 0;
+ =20
+ ifofile->vts_pgcit =3D (pgcit_t *)malloc(sizeof(pgcit_t));
+ if(!ifofile->vts_pgcit)
+ return 0;
+
+ if(!ifoRead_PGCIT_internal(ifofile, ifofile->vts_pgcit,=20
+ ifofile->vtsi_mat->vts_pgcit * DVD_BLOCK_LE=
N)) {
+ free(ifofile->vts_pgcit);
+ ifofile->vts_pgcit =3D 0;
+ return 0;
+ }
+
+ return 1;
+}
+
+static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit,=
=20
+ unsigned int offset) {
+ int i, info_length;
+ uint8_t *data, *ptr;
+ =20
+ if(!DVDFileSeek_(ifofile->file, offset))
+ return 0;
+
+ if(!(DVDReadBytes(ifofile->file, pgcit, PGCIT_SIZE)))
+ return 0;
+
+ B2N_16(pgcit->nr_of_pgci_srp);
+ B2N_32(pgcit->last_byte);
+ =20
+ CHECK_ZERO(pgcit->zero_1);
+ /* assert(pgcit->nr_of_pgci_srp !=3D 0);
+ Magic Knight Rayearth Daybreak is mastered very strange and has=20
+ Titles with 0 PTTs. */
+ CHECK_VALUE(pgcit->nr_of_pgci_srp < 10000); // ?? seen max of 1338
+ =20
+ info_length =3D pgcit->nr_of_pgci_srp * PGCI_SRP_SIZE;
+ data =3D malloc(info_length);
+ if(!data)
+ return 0;
+
+ if(info_length && !(DVDReadBytes(ifofile->file, data, info_length))) {
+ free(data);
+ return 0;
+ }
+
+ pgcit->pgci_srp =3D malloc(pgcit->nr_of_pgci_srp * sizeof(pgci_srp_t))=
;
+ if(!pgcit->pgci_srp) {
+ free(data);
+ return 0;
+ }
+ ptr =3D data;
+ for(i =3D 0; i < pgcit->nr_of_pgci_srp; i++) {
+ memcpy(&pgcit->pgci_srp[i], ptr, PGCI_SRP_SIZE);
+ ptr +=3D PGCI_SRP_SIZE;
+ B2N_16(pgcit->pgci_srp[i].ptl_id_mask);
+ B2N_32(pgcit->pgci_srp[i].pgc_start_byte);
+ CHECK_VALUE(pgcit->pgci_srp[i].unknown1 =3D=3D 0);
+ }
+ free(data);
+ =20
+ for(i =3D 0; i < pgcit->nr_of_pgci_srp; i++)
+ CHECK_VALUE(pgcit->pgci_srp[i].pgc_start_byte + PGC_SIZE <=3D pgcit-=
>last_byte+1);
+ =20
+ for(i =3D 0; i < pgcit->nr_of_pgci_srp; i++) {
+ pgcit->pgci_srp[i].pgc =3D malloc(sizeof(pgc_t));
+ if(!pgcit->pgci_srp[i].pgc) {
+ int j;
+ for(j =3D 0; j < i; j++) {
+ ifoFree_PGC(pgcit->pgci_srp[j].pgc);
+ free(pgcit->pgci_srp[j].pgc);
+ }
+ free(pgcit->pgci_srp);
+ pgcit->pgci_srp =3D NULL;
+ return 0;
+ }
+ if(!ifoRead_PGC(ifofile, pgcit->pgci_srp[i].pgc,=20
+ offset + pgcit->pgci_srp[i].pgc_start_byte)) {
+ int j;
+ for(j =3D 0; j < i; j++) {
+ ifoFree_PGC(pgcit->pgci_srp[j].pgc);
+ free(pgcit->pgci_srp[j].pgc);
+ }
+ free(pgcit->pgci_srp);
+ pgcit->pgci_srp =3D NULL;
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+static void ifoFree_PGCIT_internal(pgcit_t *pgcit) {
+ if(pgcit) {
+ int i;
+ for(i =3D 0; i < pgcit->nr_of_pgci_srp; i++) {
+ ifoFree_PGC(pgcit->pgci_srp[i].pgc);
+ free(pgcit->pgci_srp[i].pgc);
+ }
+ free(pgcit->pgci_srp);
+ }
+}
+
+void ifoFree_PGCIT(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return;
+ =20
+ if(ifofile->vts_pgcit) {
+ ifoFree_PGCIT_internal(ifofile->vts_pgcit);
+ free(ifofile->vts_pgcit);
+ ifofile->vts_pgcit =3D 0;
+ }
+}
+
+
+int ifoRead_PGCI_UT(ifo_handle_t *ifofile) {
+ pgci_ut_t *pgci_ut;
+ unsigned int sector;
+ unsigned int i; =20
+ int info_length;
+ uint8_t *data, *ptr;
+
+ if(!ifofile)
+ return 0;
+ =20
+ if(ifofile->vmgi_mat) {
+ if(ifofile->vmgi_mat->vmgm_pgci_ut =3D=3D 0)
+ return 1;
+ sector =3D ifofile->vmgi_mat->vmgm_pgci_ut;
+ } else if(ifofile->vtsi_mat) {
+ if(ifofile->vtsi_mat->vtsm_pgci_ut =3D=3D 0)
+ return 1;
+ sector =3D ifofile->vtsi_mat->vtsm_pgci_ut;
+ } else {
+ return 0;
+ }
+ =20
+ ifofile->pgci_ut =3D (pgci_ut_t *)malloc(sizeof(pgci_ut_t));
+ if(!ifofile->pgci_ut)
+ return 0;
+ =20
+ if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN)) {
+ free(ifofile->pgci_ut);
+ ifofile->pgci_ut =3D 0;
+ return 0;
+ }
+ =20
+ if(!(DVDReadBytes(ifofile->file, ifofile->pgci_ut, PGCI_UT_SIZE))) {
+ free(ifofile->pgci_ut);
+ ifofile->pgci_ut =3D 0;
+ return 0;
+ }
+ =20
+ pgci_ut =3D ifofile->pgci_ut;
+ =20
+ B2N_16(pgci_ut->nr_of_lus);
+ B2N_32(pgci_ut->last_byte);
+ =20
+ CHECK_ZERO(pgci_ut->zero_1);
+ CHECK_VALUE(pgci_ut->nr_of_lus !=3D 0);
+ CHECK_VALUE(pgci_ut->nr_of_lus < 100); // ?? 3-4 ?
+ CHECK_VALUE((uint32_t)pgci_ut->nr_of_lus * PGCI_LU_SIZE < pgci_ut->las=
t_byte);
+
+ info_length =3D pgci_ut->nr_of_lus * PGCI_LU_SIZE;
+ data =3D malloc(info_length);
+ if(!data) {
+ free(pgci_ut);
+ ifofile->pgci_ut =3D 0;
+ return 0;
+ }
+ if(!(DVDReadBytes(ifofile->file, data, info_length))) {
+ free(data);
+ free(pgci_ut);
+ ifofile->pgci_ut =3D 0;
+ return 0;
+ }
+
+ pgci_ut->lu =3D malloc(pgci_ut->nr_of_lus * sizeof(pgci_lu_t));
+ if(!pgci_ut->lu) {
+ free(data);
+ free(pgci_ut);
+ ifofile->pgci_ut =3D 0;
+ return 0;
+ }
+ ptr =3D data;
+ for(i =3D 0; i < pgci_ut->nr_of_lus; i++) {
+ memcpy(&pgci_ut->lu[i], ptr, PGCI_LU_SIZE);
+ ptr +=3D PGCI_LU_SIZE;
+ B2N_16(pgci_ut->lu[i].lang_code);=20
+ B2N_32(pgci_ut->lu[i].lang_start_byte);=20
+ }
+ free(data);
+ =20
+ for(i =3D 0; i < pgci_ut->nr_of_lus; i++) {
+ // Maybe this is only defined for v1.1 and later titles?
+ /* If the bits in 'lu[i].exists' are enumerated abcd efgh then:
+ VTS_x_yy.IFO VIDEO_TS.IFO
+ a =3D=3D 0x83 "Root" 0x82 "Title"
+ b =3D=3D 0x84 "Subpicture"
+ c =3D=3D 0x85 "Audio"
+ d =3D=3D 0x86 "Angle"
+ e =3D=3D 0x87 "PTT"
+ */
+ CHECK_VALUE((pgci_ut->lu[i].exists & 0x07) =3D=3D 0);
+ }
+
+ for(i =3D 0; i < pgci_ut->nr_of_lus; i++) {
+ pgci_ut->lu[i].pgcit =3D malloc(sizeof(pgcit_t));
+ if(!pgci_ut->lu[i].pgcit) {
+ unsigned int j;
+ for(j =3D 0; j < i; j++) {
+ ifoFree_PGCIT_internal(pgci_ut->lu[j].pgcit);
+ free(pgci_ut->lu[j].pgcit);
+ }
+ free(pgci_ut->lu);
+ free(pgci_ut);
+ ifofile->pgci_ut =3D 0;
+ return 0;
+ }
+ if(!ifoRead_PGCIT_internal(ifofile, pgci_ut->lu[i].pgcit,=20
+ sector * DVD_BLOCK_LEN=20
+ + pgci_ut->lu[i].lang_start_byte)) {
+ unsigned int j;
+ for(j =3D 0; j < i; j++) {
+ ifoFree_PGCIT_internal(pgci_ut->lu[j].pgcit);
+ free(pgci_ut->lu[j].pgcit);
+ }
+ free(pgci_ut->lu[i].pgcit);
+ free(pgci_ut->lu);
+ free(pgci_ut);
+ ifofile->pgci_ut =3D 0;
+ return 0;
+ }
+ // FIXME: Iterate and verify that all menus that should exists accor=
dingly
+ // to pgci_ut->lu[i].exists really do?
+ }
+
+ return 1;
+}
+
+
+void ifoFree_PGCI_UT(ifo_handle_t *ifofile) {
+ unsigned int i;
+
+ if(!ifofile)
+ return;
+ =20
+ if(ifofile->pgci_ut) {
+ for(i =3D 0; i < ifofile->pgci_ut->nr_of_lus; i++) {
+ ifoFree_PGCIT_internal(ifofile->pgci_ut->lu[i].pgcit);
+ free(ifofile->pgci_ut->lu[i].pgcit);
+ }
+ free(ifofile->pgci_ut->lu);
+ free(ifofile->pgci_ut);
+ ifofile->pgci_ut =3D 0;
+ }
+}
+
+static int ifoRead_VTS_ATTRIBUTES(ifo_handle_t *ifofile,=20
+ vts_attributes_t *vts_attributes,=20
+ unsigned int offset) {
+ unsigned int i;
+
+ if(!DVDFileSeek_(ifofile->file, offset))
+ return 0;
+
+ if(!(DVDReadBytes(ifofile->file, vts_attributes, sizeof(vts_attributes=
_t))))
+ return 0;
+
+ B2N_32(vts_attributes->last_byte);
+ B2N_32(vts_attributes->vts_cat);
+ B2N_16(vts_attributes->vtsm_audio_attr.lang_code);
+ B2N_16(vts_attributes->vtsm_subp_attr.lang_code);
+ for(i =3D 0; i < 8; i++)
+ B2N_16(vts_attributes->vtstt_audio_attr[i].lang_code);
+ for(i =3D 0; i < 32; i++)
+ B2N_16(vts_attributes->vtstt_subp_attr[i].lang_code);
+ =20
+ CHECK_ZERO(vts_attributes->zero_1);
+ CHECK_ZERO(vts_attributes->zero_2);
+ CHECK_ZERO(vts_attributes->zero_3);
+ CHECK_ZERO(vts_attributes->zero_4);
+ CHECK_ZERO(vts_attributes->zero_5);
+ CHECK_ZERO(vts_attributes->zero_6);
+ CHECK_ZERO(vts_attributes->zero_7);
+ CHECK_VALUE(vts_attributes->nr_of_vtsm_audio_streams <=3D 1);
+ CHECK_VALUE(vts_attributes->nr_of_vtsm_subp_streams <=3D 1);
+ CHECK_VALUE(vts_attributes->nr_of_vtstt_audio_streams <=3D 8);
+ for(i =3D vts_attributes->nr_of_vtstt_audio_streams; i < 8; i++)
+ CHECK_ZERO(vts_attributes->vtstt_audio_attr[i]);
+ CHECK_VALUE(vts_attributes->nr_of_vtstt_subp_streams <=3D 32);
+ {
+ unsigned int nr_coded;
+ CHECK_VALUE(vts_attributes->last_byte + 1 >=3D VTS_ATTRIBUTES_MIN_SI=
ZE); =20
+ nr_coded =3D (vts_attributes->last_byte + 1 - VTS_ATTRIBUTES_MIN_SIZ=
E)/6;
+ // This is often nr_coded =3D 70, how do you know how many there rea=
lly are?
+ if(nr_coded > 32) { // We haven't read more from disk/file anyway
+ nr_coded =3D 32;
+ }
+ CHECK_VALUE(vts_attributes->nr_of_vtstt_subp_streams <=3D nr_coded);
+ for(i =3D vts_attributes->nr_of_vtstt_subp_streams; i < nr_coded; i+=
+)
+ CHECK_ZERO(vts_attributes->vtstt_subp_attr[i]);
+ }
+
+ return 1;
+}
+
+
+
+int ifoRead_VTS_ATRT(ifo_handle_t *ifofile) {
+ vts_atrt_t *vts_atrt;
+ unsigned int i, info_length, sector;
+ uint32_t *data;
+
+ if(!ifofile)
+ return 0;
+ =20
+ if(!ifofile->vmgi_mat)
+ return 0;
+ =20
+ if(ifofile->vmgi_mat->vts_atrt =3D=3D 0) /* mandatory */
+ return 0;
+ =20
+ sector =3D ifofile->vmgi_mat->vts_atrt;
+ if(!DVDFileSeek_(ifofile->file, sector * DVD_BLOCK_LEN))
+ return 0;
+
+ vts_atrt =3D (vts_atrt_t *)malloc(sizeof(vts_atrt_t));
+ if(!vts_atrt)
+ return 0;
+
+ ifofile->vts_atrt =3D vts_atrt;
+ =20
+ if(!(DVDReadBytes(ifofile->file, vts_atrt, VTS_ATRT_SIZE))) {
+ free(vts_atrt);
+ ifofile->vts_atrt =3D 0;
+ return 0;
+ }
+
+ B2N_16(vts_atrt->nr_of_vtss);
+ B2N_32(vts_atrt->last_byte);
+
+ CHECK_ZERO(vts_atrt->zero_1);
+ CHECK_VALUE(vts_atrt->nr_of_vtss !=3D 0);
+ CHECK_VALUE(vts_atrt->nr_of_vtss < 100); //??
+ CHECK_VALUE((uint32_t)vts_atrt->nr_of_vtss * (4 + VTS_ATTRIBUTES_MIN_S=
IZE) +=20
+ VTS_ATRT_SIZE < vts_atrt->last_byte + 1);
+
+ info_length =3D vts_atrt->nr_of_vtss * sizeof(uint32_t);
+ data =3D (uint32_t *)malloc(info_length);
+ if(!data) {
+ free(vts_atrt);
+ ifofile->vts_atrt =3D 0;
+ return 0;
+ }
+
+ vts_atrt->vts_atrt_offsets =3D data; =20
+
+ if(!(DVDReadBytes(ifofile->file, data, info_length))) {
+ free(data);
+ free(vts_atrt);
+ ifofile->vts_atrt =3D 0;
+ return 0;
+ }
+ =20
+ for(i =3D 0; i < vts_atrt->nr_of_vtss; i++) {
+ B2N_32(data[i]);
+ CHECK_VALUE(data[i] + VTS_ATTRIBUTES_MIN_SIZE < vts_atrt->last_byte =
+ 1);
+ }
+ =20
+ info_length =3D vts_atrt->nr_of_vtss * sizeof(vts_attributes_t);
+ vts_atrt->vts =3D (vts_attributes_t *)malloc(info_length);
+ if(!vts_atrt->vts) {
+ free(data);
+ free(vts_atrt);
+ ifofile->vts_atrt =3D 0;
+ return 0;
+ }
+ for(i =3D 0; i < vts_atrt->nr_of_vtss; i++) {
+ unsigned int offset =3D data[i];
+ if(!ifoRead_VTS_ATTRIBUTES(ifofile, &(vts_atrt->vts[i]),
+ (sector * DVD_BLOCK_LEN) + offset)) {
+ free(data);
+ free(vts_atrt);
+ ifofile->vts_atrt =3D 0;
+ return 0;
+ }
+
+ // This assert cant be in ifoRead_VTS_ATTRIBUTES
+ CHECK_VALUE(offset + vts_atrt->vts[i].last_byte <=3D vts_atrt->last_=
byte + 1);
+ // Is this check correct?
+ }
+
+ return 1;
+}
+
+
+void ifoFree_VTS_ATRT(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return;
+ =20
+ if(ifofile->vts_atrt) {
+ free(ifofile->vts_atrt->vts);
+ free(ifofile->vts_atrt->vts_atrt_offsets);
+ free(ifofile->vts_atrt);
+ ifofile->vts_atrt =3D 0;
+ }
+}
+
+
+int ifoRead_TXTDT_MGI(ifo_handle_t *ifofile) {
+ txtdt_mgi_t *txtdt_mgi;
+
+ if(!ifofile)
+ return 0;
+ =20
+ if(!ifofile->vmgi_mat)
+ return 0;
+=20
+ /* Return successfully if there is nothing to read. */=20
+ if(ifofile->vmgi_mat->txtdt_mgi =3D=3D 0)
+ return 1;
+
+ if(!DVDFileSeek_(ifofile->file,=20
+ ifofile->vmgi_mat->txtdt_mgi * DVD_BLOCK_LEN))
+ return 0;
+ =20
+ txtdt_mgi =3D (txtdt_mgi_t *)malloc(sizeof(txtdt_mgi_t));
+ if(!txtdt_mgi) {
+ return 0;
+ }
+ ifofile->txtdt_mgi =3D txtdt_mgi;
+
+ if(!(DVDReadBytes(ifofile->file, txtdt_mgi, TXTDT_MGI_SIZE))) {
+ if(dvdread_verbose(device_of_file(ifofile->file)) >=3D 1) {
+ fprintf(stderr, "libdvdread: Unable to read TXTDT_MGI.\n");
+ }
+ free(txtdt_mgi);
+ ifofile->txtdt_mgi =3D 0;
+ return 0;
+ }
+
+ // fprintf(stderr, "-- Not done yet --\n");
+ return 1;
+}
+
+void ifoFree_TXTDT_MGI(ifo_handle_t *ifofile) {
+ if(!ifofile)
+ return;
+ =20
+ if(ifofile->txtdt_mgi) {
+ free(ifofile->txtdt_mgi);
+ ifofile->txtdt_mgi =3D 0;
+ }
+}
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_read.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_read.h 2007-03-10 21=
:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_read.h 2007-03-10 21=
:41:34 UTC (rev 1290)
@@ -0,0 +1,228 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef IFO_READ_H_INCLUDED
+#define IFO_READ_H_INCLUDED
+
+/*
+ * Copyright (C) 2000, 2001, 2002 Bj=F6rn Englund <d4bjorn at dtek.chalmers=
.se>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.=
se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 <dvdread/ifo_types.h>
+#include <dvdread/dvd_reader.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * handle =3D ifoOpen(dvd, title);
+ *
+ * Opens an IFO and reads in all the data for the IFO file corresponding=
to the
+ * given title. If title 0 is given, the video manager IFO file is read=
.
+ * Returns a handle to a completely parsed structure.
+ */
+ifo_handle_t *ifoOpen(dvd_reader_t *, int );
+
+/**
+ * handle =3D ifoOpenVMGI(dvd);
+ *
+ * Opens an IFO and reads in _only_ the vmgi_mat data. This call can be=
used
+ * together with the calls below to read in each segment of the IFO file=
on
+ * demand.
+ */
+ifo_handle_t *ifoOpenVMGI(dvd_reader_t *);
+
+/**
+ * handle =3D ifoOpenVTSI(dvd, title);
+ *
+ * Opens an IFO and reads in _only_ the vtsi_mat data. This call can be=
used
+ * together with the calls below to read in each segment of the IFO file=
on
+ * demand.
+ */
+ifo_handle_t *ifoOpenVTSI(dvd_reader_t *, int);
+
+/**
+ * ifoClose(ifofile);
+ * Cleans up the IFO information. This will free all data allocated for=
the
+ * substructures.
+ */
+void ifoClose(ifo_handle_t *);
+
+/**
+ * The following functions are for reading only part of the VMGI/VTSI fi=
les.
+ * Returns 1 if the data was successfully read and 0 on error.
+ */
+
+/**
+ * okay =3D ifoRead_PLT_MAIT(ifofile);
+ *
+ * Read in the Parental Management Information table, filling the
+ * ifofile->ptl_mait structure and its substructures. This data is only
+ * located in the video manager information file. This fills the
+ * ifofile->ptl_mait structure and all its substructures.
+ */
+int ifoRead_PTL_MAIT(ifo_handle_t *);
+
+/**
+ * okay =3D ifoRead_VTS_ATRT(ifofile);
+ *
+ * Read in the attribute table for the main menu vob, filling the
+ * ifofile->vts_atrt structure and its substructures. Only located in t=
he
+ * video manager information file. This fills in the ifofile->vts_atrt
+ * structure and all its substructures.
+ */
+int ifoRead_VTS_ATRT(ifo_handle_t *);
+
+/**
+ * okay =3D ifoRead_TT_SRPT(ifofile);
+ *
+ * Reads the title info for the main menu, filling the ifofile->tt_srpt
+ * structure and its substructures. This data is only located in the vi=
deo
+ * manager information file. This structure is mandatory in the IFO fil=
e.
+ */
+int ifoRead_TT_SRPT(ifo_handle_t *);
+
+/**
+ * okay =3D ifoRead_VTS_PTT_SRPT(ifofile);
+ *
+ * Reads in the part of title search pointer table, filling the
+ * ifofile->vts_ptt_srpt structure and its substructures. This data is =
only
+ * located in the video title set information file. This structure is
+ * mandatory, and must be included in the VTSI file.
+ */
+int ifoRead_VTS_PTT_SRPT(ifo_handle_t *);
+
+/**
+ * okay =3D ifoRead_FP_PGC(ifofile);
+ *
+ * Reads in the first play program chain data, filling the
+ * ifofile->first_play_pgc structure. This data is only located in the =
video
+ * manager information file (VMGI). This structure is optional.
+ */
+int ifoRead_FP_PGC(ifo_handle_t *);
+
+/**
+ * okay =3D ifoRead_PGCIT(ifofile);
+ *
+ * Reads in the program chain information table for the video title set.=
Fills
+ * in the ifofile->vts_pgcit structure and its substructures, which incl=
udes
+ * the data for each program chain in the set. This data is only locate=
d in
+ * the video title set information file. This structure is mandatory, a=
nd must
+ * be included in the VTSI file.
+ */
+int ifoRead_PGCIT(ifo_handle_t *);
+
+/**
+ * okay =3D ifoRead_PGCI_UT(ifofile);
+ *
+ * Reads in the menu PGCI unit table for the menu VOB. For the video ma=
nager,
+ * this corresponds to the VIDEO_TS.VOB file, and for each title set, th=
is
+ * corresponds to the VTS_XX_0.VOB file. This data is located in both t=
he
+ * video manager and video title set information files. For VMGI files,=
this
+ * fills the ifofile->vmgi_pgci_ut structure and all its substructures. =
For
+ * VTSI files, this fills the ifofile->vtsm_pgci_ut structure.
+ */
+int ifoRead_PGCI_UT(ifo_handle_t *);
+ =20
+/**
+ * okay =3D ifoRead_VTS_TMAPT(ifofile);
+ *
+ * Reads in the VTS Time Map Table, this data is only located in the vid=
eo
+ * title set information file. This fills the ifofile->vts_tmapt struct=
ure
+ * and all its substructures. When pressent enables VOBU level time-bas=
ed
+ * seeking for One_Sequential_PGC_Titles.
+ */
+int ifoRead_VTS_TMAPT(ifo_handle_t *);
+ =20
+/**
+ * okay =3D ifoRead_C_ADT(ifofile);
+ *
+ * Reads in the cell address table for the menu VOB. For the video mana=
ger,
+ * this corresponds to the VIDEO_TS.VOB file, and for each title set, th=
is
+ * corresponds to the VTS_XX_0.VOB file. This data is located in both t=
he
+ * video manager and video title set information files. For VMGI files,=
this
+ * fills the ifofile->vmgm_c_adt structure and all its substructures. F=
or VTSI
+ * files, this fills the ifofile->vtsm_c_adt structure.
+ */
+int ifoRead_C_ADT(ifo_handle_t *);
+
+/**
+ * okay =3D ifoRead_TITLE_C_ADT(ifofile);
+ *
+ * Reads in the cell address table for the video title set corresponding=
to
+ * this IFO file. This data is only located in the video title set info=
rmation
+ * file. This structure is mandatory, and must be included in the VTSI =
file.
+ * This call fills the ifofile->vts_c_adt structure and its substructure=
s.
+ */
+int ifoRead_TITLE_C_ADT(ifo_handle_t *);
+
+/**
+ * okay =3D ifoRead_VOBU_ADMAP(ifofile);
+ *
+ * Reads in the VOBU address map for the menu VOB. For the video manage=
r, this
+ * corresponds to the VIDEO_TS.VOB file, and for each title set, this
+ * corresponds to the VTS_XX_0.VOB file. This data is located in both t=
he
+ * video manager and video title set information files. For VMGI files,=
this
+ * fills the ifofile->vmgm_vobu_admap structure and all its substructure=
s. For
+ * VTSI files, this fills the ifofile->vtsm_vobu_admap structure.
+ */
+int ifoRead_VOBU_ADMAP(ifo_handle_t *);
+
+/**
+ * okay =3D ifoRead_TITLE_VOBU_ADMAP(ifofile);
+ *
+ * Reads in the VOBU address map for the associated video title set. Th=
is data
+ * is only located in the video title set information file. This struct=
ure is
+ * mandatory, and must be included in the VTSI file. Fills the
+ * ifofile->vts_vobu_admap structure and its substructures.
+ */
+int ifoRead_TITLE_VOBU_ADMAP(ifo_handle_t *);
+
+/**
+ * okay =3D ifoRead_TXTDT_MGI(ifofile);
+ *
+ * Reads in the text data strings for the DVD. Fills the ifofile->txtdt=
_mgi
+ * structure and all its substructures. This data is only located in th=
e video
+ * manager information file. This structure is mandatory, and must be i=
ncluded
+ * in the VMGI file.
+ */
+int ifoRead_TXTDT_MGI(ifo_handle_t *);
+
+/**
+ * The following functions are used for freeing parsed sections of the
+ * ifo_handle_t structure and the allocated substructures. The free cal=
ls
+ * below are safe: they will not mind if you attempt to free part of an=
IFO
+ * file which was not read in or which does not exist.
+ */
+void ifoFree_PTL_MAIT(ifo_handle_t *);
+void ifoFree_VTS_ATRT(ifo_handle_t *);
+void ifoFree_TT_SRPT(ifo_handle_t *);
+void ifoFree_VTS_PTT_SRPT(ifo_handle_t *);
+void ifoFree_FP_PGC(ifo_handle_t *);
+void ifoFree_PGCIT(ifo_handle_t *);
+void ifoFree_PGCI_UT(ifo_handle_t *);
+void ifoFree_VTS_TMAPT(ifo_handle_t *);
+void ifoFree_C_ADT(ifo_handle_t *);
+void ifoFree_TITLE_C_ADT(ifo_handle_t *);
+void ifoFree_VOBU_ADMAP(ifo_handle_t *);
+void ifoFree_TITLE_VOBU_ADMAP(ifo_handle_t *);
+void ifoFree_TXTDT_MGI(ifo_handle_t *);
+
+#ifdef __cplusplus
+};
+#endif
+#endif /* IFO_READ_H_INCLUDED */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_types.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_types.h 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/ifo_types.h 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,901 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef IFO_TYPES_H_INCLUDED
+#define IFO_TYPES_H_INCLUDED
+
+/*
+ * Copyright (C) 2000, 2001 Bj=F6rn Englund <d4bjorn at dtek.chalmers.se>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 <dvdread/dvd_reader.h>
+
+#if defined(__BEOS__)
+#if !defined(_INTTYPES_H_) && !defined(_INTTYPES_H) && !defined(_STDINT_=
H_) && !defined(_STDINT_H)
+#error "Must include <inttypes.h> or <stdint.h> before any libdvdread he=
ader."
+#endif
+#else
+#if !defined(UINT8_MAX) || !defined(UINT16_MAX) || !defined(INT32_MAX)
+#error "Must include <inttypes.h> or <stdint.h> before any libdvdread he=
ader."
+#endif
+#endif
+
+#undef ATTRIBUTE_PACKED
+#undef PRAGMA_PACK_BEGIN=20
+#undef PRAGMA_PACK_END
+
+#if defined(__GNUC__)
+#if __GNUC__ > 2 || (__GNUC__ =3D=3D 2 && __GNUC_MINOR__ >=3D 95)
+#define ATTRIBUTE_PACKED __attribute__ ((packed))
+#define PRAGMA_PACK 0
+#endif
+#endif
+
+#if !defined(ATTRIBUTE_PACKED)
+#define ATTRIBUTE_PACKED
+#define PRAGMA_PACK 1
+#endif
+
+#if PRAGMA_PACK
+#pragma pack(1)
+#endif
+
+
+/**
+ * Common
+ *
+ * The following structures are used in both the VMGI and VTSI.
+ */
+
+
+/**
+ * DVD Time Information.
+ */
+typedef struct {
+ uint8_t hour;
+ uint8_t minute;
+ uint8_t second;
+ uint8_t frame_u; /* The two high bits are the frame rate. */
+} ATTRIBUTE_PACKED dvd_time_t;
+
+/**
+ * Type to store per-command data.
+ */
+typedef struct {
+ uint8_t bytes[8];
+} ATTRIBUTE_PACKED vm_cmd_t;
+#define COMMAND_DATA_SIZE 8U
+
+/* This typedefs are needed for MSVC compatiblity */
+/* Thanks robux ;) */
+#undef BITFIELD_TYPE
+#if defined(_MSC_VER)
+#define BITFIELD_TYPE char
+#else
+#define BITFIELD_TYPE int
+#endif
+
+/**
+ * Video Attributes.
+ */
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned BITFIELD_TYPE mpeg_version : 2;
+ unsigned BITFIELD_TYPE video_format : 2;
+ unsigned BITFIELD_TYPE display_aspect_ratio : 2;
+ unsigned BITFIELD_TYPE permitted_df : 2;
+ =20
+ unsigned BITFIELD_TYPE line21_cc_1 : 1;
+ unsigned BITFIELD_TYPE line21_cc_2 : 1;
+ unsigned BITFIELD_TYPE unknown1 : 1;
+ unsigned BITFIELD_TYPE bit_rate : 1;
+ =20
+ unsigned BITFIELD_TYPE picture_size : 2;
+ unsigned BITFIELD_TYPE letterboxed : 1;
+ unsigned BITFIELD_TYPE film_mode : 1;
+#else
+ unsigned BITFIELD_TYPE permitted_df : 2;
+ unsigned BITFIELD_TYPE display_aspect_ratio : 2;
+ unsigned BITFIELD_TYPE video_format : 2;
+ unsigned BITFIELD_TYPE mpeg_version : 2;
+ =20
+ unsigned BITFIELD_TYPE film_mode : 1;
+ unsigned BITFIELD_TYPE letterboxed : 1;
+ unsigned BITFIELD_TYPE picture_size : 2;
+ =20
+ unsigned BITFIELD_TYPE bit_rate : 1;
+ unsigned BITFIELD_TYPE unknown1 : 1;
+ unsigned BITFIELD_TYPE line21_cc_2 : 1;
+ unsigned BITFIELD_TYPE line21_cc_1 : 1;
+#endif
+} ATTRIBUTE_PACKED video_attr_t;
+
+/**
+ * Audio Attributes.
+ */
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned BITFIELD_TYPE audio_format : 3;
+ unsigned BITFIELD_TYPE multichannel_extension : 1;
+ unsigned BITFIELD_TYPE lang_type : 2;
+ unsigned BITFIELD_TYPE application_mode : 2;
+ =20
+ unsigned BITFIELD_TYPE quantization : 2;
+ unsigned BITFIELD_TYPE sample_frequency : 2;
+ unsigned BITFIELD_TYPE unknown1 : 1;
+ unsigned BITFIELD_TYPE channels : 3;
+#else
+ unsigned BITFIELD_TYPE application_mode : 2;
+ unsigned BITFIELD_TYPE lang_type : 2;
+ unsigned BITFIELD_TYPE multichannel_extension : 1;
+ unsigned BITFIELD_TYPE audio_format : 3;
+ =20
+ unsigned BITFIELD_TYPE channels : 3;
+ unsigned BITFIELD_TYPE unknown1 : 1;
+ unsigned BITFIELD_TYPE sample_frequency : 2;
+ unsigned BITFIELD_TYPE quantization : 2;
+#endif
+ uint16_t lang_code;
+ uint8_t lang_extension;
+ uint8_t code_extension;
+ uint8_t unknown3;
+ union {
+ struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned BITFIELD_TYPE unknown4 : 1;
+ unsigned BITFIELD_TYPE channel_assignment : 3;
+ unsigned BITFIELD_TYPE version : 2;
+ unsigned BITFIELD_TYPE mc_intro : 1; /* probably 0: true=
, 1:false */
+ unsigned BITFIELD_TYPE mode : 1; /* Karaoke mode 0: =
solo 1: duet */
+#else
+ unsigned BITFIELD_TYPE mode : 1;
+ unsigned BITFIELD_TYPE mc_intro : 1;
+ unsigned BITFIELD_TYPE version : 2;
+ unsigned BITFIELD_TYPE channel_assignment : 3;
+ unsigned BITFIELD_TYPE unknown4 : 1;
+#endif
+ } ATTRIBUTE_PACKED karaoke;
+ struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned BITFIELD_TYPE unknown5 : 4;
+ unsigned BITFIELD_TYPE dolby_encoded : 1; /* suitable for sur=
round decoding */
+ unsigned BITFIELD_TYPE unknown6 : 3;
+#else
+ unsigned BITFIELD_TYPE unknown6 : 3;
+ unsigned BITFIELD_TYPE dolby_encoded : 1;
+ unsigned BITFIELD_TYPE unknown5 : 4;
+#endif
+ } ATTRIBUTE_PACKED surround;
+ } ATTRIBUTE_PACKED app_info;
+} ATTRIBUTE_PACKED audio_attr_t;
+
+
+/**
+ * MultiChannel Extension
+ */
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned BITFIELD_TYPE zero1 : 7;
+ unsigned BITFIELD_TYPE ach0_gme : 1;
+
+ unsigned BITFIELD_TYPE zero2 : 7;
+ unsigned BITFIELD_TYPE ach1_gme : 1;
+
+ unsigned BITFIELD_TYPE zero3 : 4;
+ unsigned BITFIELD_TYPE ach2_gv1e : 1;
+ unsigned BITFIELD_TYPE ach2_gv2e : 1;
+ unsigned BITFIELD_TYPE ach2_gm1e : 1;
+ unsigned BITFIELD_TYPE ach2_gm2e : 1;
+
+ unsigned BITFIELD_TYPE zero4 : 4;
+ unsigned BITFIELD_TYPE ach3_gv1e : 1;
+ unsigned BITFIELD_TYPE ach3_gv2e : 1;
+ unsigned BITFIELD_TYPE ach3_gmAe : 1;
+ unsigned BITFIELD_TYPE ach3_se2e : 1;
+
+ unsigned BITFIELD_TYPE zero5 : 4;
+ unsigned BITFIELD_TYPE ach4_gv1e : 1;
+ unsigned BITFIELD_TYPE ach4_gv2e : 1;
+ unsigned BITFIELD_TYPE ach4_gmBe : 1;
+ unsigned BITFIELD_TYPE ach4_seBe : 1;
+#else
+ unsigned BITFIELD_TYPE ach0_gme : 1;
+ unsigned BITFIELD_TYPE zero1 : 7;
+
+ unsigned BITFIELD_TYPE ach1_gme : 1;
+ unsigned BITFIELD_TYPE zero2 : 7;
+
+ unsigned BITFIELD_TYPE ach2_gm2e : 1;
+ unsigned BITFIELD_TYPE ach2_gm1e : 1;
+ unsigned BITFIELD_TYPE ach2_gv2e : 1;
+ unsigned BITFIELD_TYPE ach2_gv1e : 1;
+ unsigned BITFIELD_TYPE zero3 : 4;
+
+ unsigned BITFIELD_TYPE ach3_se2e : 1;
+ unsigned BITFIELD_TYPE ach3_gmAe : 1;
+ unsigned BITFIELD_TYPE ach3_gv2e : 1;
+ unsigned BITFIELD_TYPE ach3_gv1e : 1;
+ unsigned BITFIELD_TYPE zero4 : 4;
+
+ unsigned BITFIELD_TYPE ach4_seBe : 1;
+ unsigned BITFIELD_TYPE ach4_gmBe : 1;
+ unsigned BITFIELD_TYPE ach4_gv2e : 1;
+ unsigned BITFIELD_TYPE ach4_gv1e : 1;
+ unsigned BITFIELD_TYPE zero5 : 4;
+#endif
+ uint8_t zero6[19];
+} ATTRIBUTE_PACKED multichannel_ext_t;
+
+
+/**
+ * Subpicture Attributes.
+ */
+typedef struct {
+ /*
+ * type: 0 not specified
+ * 1 language
+ * 2 other
+ * coding mode: 0 run length
+ * 1 extended
+ * 2 other
+ * language: indicates language if type =3D=3D 1
+ * lang extension: if type =3D=3D 1 contains the lang extension
+ */
+#ifdef WORDS_BIGENDIAN
+ unsigned BITFIELD_TYPE code_mode : 3;
+ unsigned BITFIELD_TYPE zero1 : 3;
+ unsigned BITFIELD_TYPE type : 2;
+#else
+ unsigned BITFIELD_TYPE type : 2;
+ unsigned BITFIELD_TYPE zero1 : 3;
+ unsigned BITFIELD_TYPE code_mode : 3;
+#endif
+ uint8_t zero2;
+ uint16_t lang_code;
+ uint8_t lang_extension;
+ uint8_t code_extension;
+} ATTRIBUTE_PACKED subp_attr_t;
+
+
+
+/**
+ * PGC Command Table.
+ */=20
+typedef struct {
+ uint16_t nr_of_pre;
+ uint16_t nr_of_post;
+ uint16_t nr_of_cell;
+ uint16_t last_byte;
+ vm_cmd_t *pre_cmds;
+ vm_cmd_t *post_cmds;
+ vm_cmd_t *cell_cmds;
+} ATTRIBUTE_PACKED pgc_command_tbl_t;
+#define PGC_COMMAND_TBL_SIZE 8U
+
+/**
+ * PGC Program Map
+ */
+typedef uint8_t pgc_program_map_t;=20
+
+/**
+ * Cell Playback Information.
+ */
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned BITFIELD_TYPE block_mode : 2;
+ unsigned BITFIELD_TYPE block_type : 2;
+ unsigned BITFIELD_TYPE seamless_play : 1;
+ unsigned BITFIELD_TYPE interleaved : 1;
+ unsigned BITFIELD_TYPE stc_discontinuity: 1;
+ unsigned BITFIELD_TYPE seamless_angle : 1;
+ =20
+ unsigned BITFIELD_TYPE playback_mode : 1; /**< When set, enter Sti=
llMode after each VOBU */
+ unsigned BITFIELD_TYPE restricted : 1; /**< ?? drop out of fast=
forward? */
+ unsigned BITFIELD_TYPE unknown2 : 6;
+#else
+ unsigned BITFIELD_TYPE seamless_angle : 1;
+ unsigned BITFIELD_TYPE stc_discontinuity: 1;
+ unsigned BITFIELD_TYPE interleaved : 1;
+ unsigned BITFIELD_TYPE seamless_play : 1;
+ unsigned BITFIELD_TYPE block_type : 2;
+ unsigned BITFIELD_TYPE block_mode : 2;
+ =20
+ unsigned BITFIELD_TYPE unknown2 : 6;
+ unsigned BITFIELD_TYPE restricted : 1;
+ unsigned BITFIELD_TYPE playback_mode : 1;
+#endif
+ uint8_t still_time;
+ uint8_t cell_cmd_nr;
+ dvd_time_t playback_time;
+ uint32_t first_sector;
+ uint32_t first_ilvu_end_sector;
+ uint32_t last_vobu_start_sector;
+ uint32_t last_sector;
+} ATTRIBUTE_PACKED cell_playback_t;
+
+#define BLOCK_TYPE_NONE 0x0
+#define BLOCK_TYPE_ANGLE_BLOCK 0x1
+
+#define BLOCK_MODE_NOT_IN_BLOCK 0x0
+#define BLOCK_MODE_FIRST_CELL 0x1
+#define BLOCK_MODE_IN_BLOCK 0x2
+#define BLOCK_MODE_LAST_CELL 0x3
+
+/**
+ * Cell Position Information.
+ */
+typedef struct {
+ uint16_t vob_id_nr;
+ uint8_t zero_1;
+ uint8_t cell_nr;
+} ATTRIBUTE_PACKED cell_position_t;
+
+/**
+ * User Operations.
+ */
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned BITFIELD_TYPE zero : 7; /* 25-31 */
+ unsigned BITFIELD_TYPE video_pres_mode_change : 1; /* 24 */
+ =20
+ unsigned BITFIELD_TYPE karaoke_audio_pres_mode_change : 1; /* 23 */
+ unsigned BITFIELD_TYPE angle_change : 1;
+ unsigned BITFIELD_TYPE subpic_stream_change : 1;
+ unsigned BITFIELD_TYPE audio_stream_change : 1;
+ unsigned BITFIELD_TYPE pause_on : 1;
+ unsigned BITFIELD_TYPE still_off : 1;
+ unsigned BITFIELD_TYPE button_select_or_activate : 1;
+ unsigned BITFIELD_TYPE resume : 1; /* 16 */
+ =20
+ unsigned BITFIELD_TYPE chapter_menu_call : 1; /* 15 */
+ unsigned BITFIELD_TYPE angle_menu_call : 1;
+ unsigned BITFIELD_TYPE audio_menu_call : 1;
+ unsigned BITFIELD_TYPE subpic_menu_call : 1;
+ unsigned BITFIELD_TYPE root_menu_call : 1;
+ unsigned BITFIELD_TYPE title_menu_call : 1;
+ unsigned BITFIELD_TYPE backward_scan : 1;
+ unsigned BITFIELD_TYPE forward_scan : 1; /* 8 */
+ =20
+ unsigned BITFIELD_TYPE next_pg_search : 1; /* 7 */
+ unsigned BITFIELD_TYPE prev_or_top_pg_search : 1;
+ unsigned BITFIELD_TYPE time_or_chapter_search : 1;
+ unsigned BITFIELD_TYPE go_up : 1;
+ unsigned BITFIELD_TYPE stop : 1;
+ unsigned BITFIELD_TYPE title_play : 1;
+ unsigned BITFIELD_TYPE chapter_search_or_play : 1;
+ unsigned BITFIELD_TYPE title_or_time_play : 1; /* 0 */
+#else
+ unsigned BITFIELD_TYPE video_pres_mode_change : 1; /* 24 */
+ unsigned BITFIELD_TYPE zero : 7; /* 25-31 */
+ =20
+ unsigned BITFIELD_TYPE resume : 1; /* 16 */
+ unsigned BITFIELD_TYPE button_select_or_activate : 1;
+ unsigned BITFIELD_TYPE still_off : 1;
+ unsigned BITFIELD_TYPE pause_on : 1;
+ unsigned BITFIELD_TYPE audio_stream_change : 1;
+ unsigned BITFIELD_TYPE subpic_stream_change : 1;
+ unsigned BITFIELD_TYPE angle_change : 1;
+ unsigned BITFIELD_TYPE karaoke_audio_pres_mode_change : 1; /* 23 */
+ =20
+ unsigned BITFIELD_TYPE forward_scan : 1; /* 8 */
+ unsigned BITFIELD_TYPE backward_scan : 1;
+ unsigned BITFIELD_TYPE title_menu_call : 1;
+ unsigned BITFIELD_TYPE root_menu_call : 1;
+ unsigned BITFIELD_TYPE subpic_menu_call : 1;
+ unsigned BITFIELD_TYPE audio_menu_call : 1;
+ unsigned BITFIELD_TYPE angle_menu_call : 1;
+ unsigned BITFIELD_TYPE chapter_menu_call : 1; /* 15 */
+ =20
+ unsigned BITFIELD_TYPE title_or_time_play : 1; /* 0 */
+ unsigned BITFIELD_TYPE chapter_search_or_play : 1;
+ unsigned BITFIELD_TYPE title_play : 1;
+ unsigned BITFIELD_TYPE stop : 1;
+ unsigned BITFIELD_TYPE go_up : 1;
+ unsigned BITFIELD_TYPE time_or_chapter_search : 1;
+ unsigned BITFIELD_TYPE prev_or_top_pg_search : 1;
+ unsigned BITFIELD_TYPE next_pg_search : 1; /* 7 */
+#endif
+} ATTRIBUTE_PACKED user_ops_t;
+
+/**
+ * Program Chain Information.
+ */
+typedef struct {
+ uint16_t zero_1;
+ uint8_t nr_of_programs;
+ uint8_t nr_of_cells;
+ dvd_time_t playback_time;
+ user_ops_t prohibited_ops;
+ uint16_t audio_control[8]; /* New type? */
+ uint32_t subp_control[32]; /* New type? */
+ uint16_t next_pgc_nr;
+ uint16_t prev_pgc_nr;
+ uint16_t goup_pgc_nr;
+ uint8_t pg_playback_mode;
+ uint8_t still_time;
+ uint32_t palette[16]; /* New type struct {zero_1, Y, Cr, Cb} ? */
+ uint16_t command_tbl_offset;
+ uint16_t program_map_offset;
+ uint16_t cell_playback_offset;
+ uint16_t cell_position_offset;
+ pgc_command_tbl_t *command_tbl;
+ pgc_program_map_t *program_map;
+ cell_playback_t *cell_playback;
+ cell_position_t *cell_position;
+} ATTRIBUTE_PACKED pgc_t;
+#define PGC_SIZE 236U
+
+/**
+ * Program Chain Information Search Pointer.
+ */
+typedef struct {
+ uint8_t entry_id;
+#ifdef WORDS_BIGENDIAN
+ unsigned BITFIELD_TYPE block_mode : 2;
+ unsigned BITFIELD_TYPE block_type : 2;
+ unsigned BITFIELD_TYPE unknown1 : 4;
+#else
+ unsigned BITFIELD_TYPE unknown1 : 4;
+ unsigned BITFIELD_TYPE block_type : 2;
+ unsigned BITFIELD_TYPE block_mode : 2;
+#endif =20
+ uint16_t ptl_id_mask;
+ uint32_t pgc_start_byte;
+ pgc_t *pgc;
+} ATTRIBUTE_PACKED pgci_srp_t;
+#define PGCI_SRP_SIZE 8U
+
+/**
+ * Program Chain Information Table.
+ */
+typedef struct {
+ uint16_t nr_of_pgci_srp;
+ uint16_t zero_1;
+ uint32_t last_byte;
+ pgci_srp_t *pgci_srp;
+} ATTRIBUTE_PACKED pgcit_t;
+#define PGCIT_SIZE 8U
+
+/**
+ * Menu PGCI Language Unit.
+ */
+typedef struct {
+ uint16_t lang_code;
+ uint8_t lang_extension;
+ uint8_t exists;
+ uint32_t lang_start_byte;
+ pgcit_t *pgcit;
+} ATTRIBUTE_PACKED pgci_lu_t;
+#define PGCI_LU_SIZE 8U
+
+/**
+ * Menu PGCI Unit Table.
+ */
+typedef struct {
+ uint16_t nr_of_lus;
+ uint16_t zero_1;
+ uint32_t last_byte;
+ pgci_lu_t *lu;
+} ATTRIBUTE_PACKED pgci_ut_t;
+#define PGCI_UT_SIZE 8U
+
+/**
+ * Cell Address Information.
+ */
+typedef struct {
+ uint16_t vob_id;
+ uint8_t cell_id;
+ uint8_t zero_1;
+ uint32_t start_sector;
+ uint32_t last_sector;
+} ATTRIBUTE_PACKED cell_adr_t;
+
+/**
+ * Cell Address Table.
+ */
+typedef struct {
+ uint16_t nr_of_vobs; /* VOBs */
+ uint16_t zero_1;
+ uint32_t last_byte;
+ cell_adr_t *cell_adr_table; /* No explicit size given. */
+} ATTRIBUTE_PACKED c_adt_t;
+#define C_ADT_SIZE 8U
+
+/**
+ * VOBU Address Map.
+ */
+typedef struct {
+ uint32_t last_byte;
+ uint32_t *vobu_start_sectors;
+} ATTRIBUTE_PACKED vobu_admap_t;
+#define VOBU_ADMAP_SIZE 4U
+
+
+
+
+/**
+ * VMGI
+ *
+ * The following structures relate to the Video Manager.
+ */
+
+/**
+ * Video Manager Information Management Table.
+ */
+typedef struct {
+ char vmg_identifier[12];
+ uint32_t vmg_last_sector;
+ uint8_t zero_1[12];
+ uint32_t vmgi_last_sector;
+ uint8_t zero_2;
+ uint8_t specification_version;
+ uint32_t vmg_category;
+ uint16_t vmg_nr_of_volumes;
+ uint16_t vmg_this_volume_nr;
+ uint8_t disc_side;
+ uint8_t zero_3[19];
+ uint16_t vmg_nr_of_title_sets; /* Number of VTSs. */
+ char provider_identifier[32];
+ uint64_t vmg_pos_code;
+ uint8_t zero_4[24];
+ uint32_t vmgi_last_byte;
+ uint32_t first_play_pgc;
+ uint8_t zero_5[56];
+ uint32_t vmgm_vobs; /* sector */
+ uint32_t tt_srpt; /* sector */
+ uint32_t vmgm_pgci_ut; /* sector */
+ uint32_t ptl_mait; /* sector */
+ uint32_t vts_atrt; /* sector */
+ uint32_t txtdt_mgi; /* sector */
+ uint32_t vmgm_c_adt; /* sector */
+ uint32_t vmgm_vobu_admap; /* sector */
+ uint8_t zero_6[32];
+ =20
+ video_attr_t vmgm_video_attr;
+ uint8_t zero_7;
+ uint8_t nr_of_vmgm_audio_streams; /* should be 0 or 1 */
+ audio_attr_t vmgm_audio_attr;
+ audio_attr_t zero_8[7];
+ uint8_t zero_9[17];
+ uint8_t nr_of_vmgm_subp_streams; /* should be 0 or 1 */
+ subp_attr_t vmgm_subp_attr;
+ subp_attr_t zero_10[27]; /* XXX: how much 'padding' here? */
+} ATTRIBUTE_PACKED vmgi_mat_t;
+
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned BITFIELD_TYPE zero_1 : 1;
+ unsigned BITFIELD_TYPE multi_or_random_pgc_title : 1; /* 0: one sequen=
tial pgc title */
+ unsigned BITFIELD_TYPE jlc_exists_in_cell_cmd : 1;
+ unsigned BITFIELD_TYPE jlc_exists_in_prepost_cmd : 1;
+ unsigned BITFIELD_TYPE jlc_exists_in_button_cmd : 1;
+ unsigned BITFIELD_TYPE jlc_exists_in_tt_dom : 1;
+ unsigned BITFIELD_TYPE chapter_search_or_play : 1; /* UOP 1 */
+ unsigned BITFIELD_TYPE title_or_time_play : 1; /* UOP 0 */
+#else
+ unsigned BITFIELD_TYPE title_or_time_play : 1;
+ unsigned BITFIELD_TYPE chapter_search_or_play : 1;
+ unsigned BITFIELD_TYPE jlc_exists_in_tt_dom : 1;
+ unsigned BITFIELD_TYPE jlc_exists_in_button_cmd : 1;
+ unsigned BITFIELD_TYPE jlc_exists_in_prepost_cmd : 1;
+ unsigned BITFIELD_TYPE jlc_exists_in_cell_cmd : 1;
+ unsigned BITFIELD_TYPE multi_or_random_pgc_title : 1;
+ unsigned BITFIELD_TYPE zero_1 : 1;
+#endif
+} ATTRIBUTE_PACKED playback_type_t;
+
+/**
+ * Title Information.
+ */
+typedef struct {
+ playback_type_t pb_ty;
+ uint8_t nr_of_angles;
+ uint16_t nr_of_ptts;
+ uint16_t parental_id;
+ uint8_t title_set_nr;
+ uint8_t vts_ttn;
+ uint32_t title_set_sector;
+} ATTRIBUTE_PACKED title_info_t;
+
+/**
+ * PartOfTitle Search Pointer Table.
+ */
+typedef struct {
+ uint16_t nr_of_srpts;
+ uint16_t zero_1;
+ uint32_t last_byte;
+ title_info_t *title;
+} ATTRIBUTE_PACKED tt_srpt_t;
+#define TT_SRPT_SIZE 8U
+
+
+/**
+ * Parental Management Information Unit Table.
+ * Level 1 (US: G), ..., 7 (US: NC-17), 8
+ */
+typedef uint16_t pf_level_t[8];
+
+/**
+ * Parental Management Information Unit Table.
+ */
+typedef struct {
+ uint16_t country_code;
+ uint16_t zero_1;
+ uint16_t pf_ptl_mai_start_byte;
+ uint16_t zero_2;
+ pf_level_t *pf_ptl_mai; /* table of (nr_of_vtss + 1), video_ts is firs=
t */
+} ATTRIBUTE_PACKED ptl_mait_country_t;
+#define PTL_MAIT_COUNTRY_SIZE 8U
+
+/**
+ * Parental Management Information Table.
+ */
+typedef struct {
+ uint16_t nr_of_countries;
+ uint16_t nr_of_vtss;
+ uint32_t last_byte;
+ ptl_mait_country_t *countries;
+} ATTRIBUTE_PACKED ptl_mait_t;
+#define PTL_MAIT_SIZE 8U
+
+/**
+ * Video Title Set Attributes.
+ */
+typedef struct {
+ uint32_t last_byte;
+ uint32_t vts_cat;
+ =20
+ video_attr_t vtsm_vobs_attr;
+ uint8_t zero_1;
+ uint8_t nr_of_vtsm_audio_streams; /* should be 0 or 1 */
+ audio_attr_t vtsm_audio_attr;
+ audio_attr_t zero_2[7]; =20
+ uint8_t zero_3[16];
+ uint8_t zero_4;
+ uint8_t nr_of_vtsm_subp_streams; /* should be 0 or 1 */
+ subp_attr_t vtsm_subp_attr;
+ subp_attr_t zero_5[27];
+ =20
+ uint8_t zero_6[2];
+ =20
+ video_attr_t vtstt_vobs_video_attr;
+ uint8_t zero_7;
+ uint8_t nr_of_vtstt_audio_streams;
+ audio_attr_t vtstt_audio_attr[8];
+ uint8_t zero_8[16];
+ uint8_t zero_9;
+ uint8_t nr_of_vtstt_subp_streams;
+ subp_attr_t vtstt_subp_attr[32];
+} ATTRIBUTE_PACKED vts_attributes_t;
+#define VTS_ATTRIBUTES_SIZE 542U
+#define VTS_ATTRIBUTES_MIN_SIZE 356U
+
+/**
+ * Video Title Set Attribute Table.
+ */
+typedef struct {
+ uint16_t nr_of_vtss;
+ uint16_t zero_1;
+ uint32_t last_byte;
+ vts_attributes_t *vts;
+ uint32_t *vts_atrt_offsets; /* offsets table for each vts_attributes *=
/
+} ATTRIBUTE_PACKED vts_atrt_t;
+#define VTS_ATRT_SIZE 8U
+
+/**
+ * Text Data. (Incomplete)
+ */
+typedef struct {
+ uint32_t last_byte; /* offsets are relative here */
+ uint16_t offsets[100]; /* =3D=3D nr_of_srpts + 1 (first is disc title)=
*/
+#if 0 =20
+ uint16_t unknown; /* 0x48 ?? 0x48 words (16bit) info following */
+ uint16_t zero_1;
+ =20
+ uint8_t type_of_info; /* ?? 01 =3D=3D disc, 02 =3D=3D Title, 04 =3D=3D=
Title part */
+ uint8_t unknown1;
+ uint8_t unknown2;
+ uint8_t unknown3;
+ uint8_t unknown4; /* ?? allways 0x30 language?, text format? */
+ uint8_t unknown5;
+ uint16_t offset; /* from first */
+ =20
+ char text[12]; /* ended by 0x09 */
+#endif
+} ATTRIBUTE_PACKED txtdt_t;
+
+/**
+ * Text Data Language Unit. (Incomplete)
+ */=20
+typedef struct {
+ uint16_t lang_code;
+ uint16_t unknown; /* 0x0001, title 1? disc 1? side 1? */
+ uint32_t txtdt_start_byte; /* prt, rel start of vmg_txtdt_mgi */
+ txtdt_t *txtdt;
+} ATTRIBUTE_PACKED txtdt_lu_t;
+#define TXTDT_LU_SIZE 8U
+
+/**
+ * Text Data Manager Information. (Incomplete)
+ */
+typedef struct {
+ char disc_name[14]; /* how many bytes?? */
+ uint16_t nr_of_language_units; /* 32bit?? */
+ uint32_t last_byte;
+ txtdt_lu_t *lu;
+} ATTRIBUTE_PACKED txtdt_mgi_t;
+#define TXTDT_MGI_SIZE 20U
+
+
+/**
+ * VTS
+ *
+ * Structures relating to the Video Title Set (VTS).
+ */
+
+/**
+ * Video Title Set Information Management Table.
+ */
+typedef struct {
+ char vts_identifier[12];
+ uint32_t vts_last_sector;
+ uint8_t zero_1[12];
+ uint32_t vtsi_last_sector;
+ uint8_t zero_2;
+ uint8_t specification_version;
+ uint32_t vts_category;
+ uint16_t zero_3;
+ uint16_t zero_4;
+ uint8_t zero_5;
+ uint8_t zero_6[19];
+ uint16_t zero_7;
+ uint8_t zero_8[32];
+ uint64_t zero_9;
+ uint8_t zero_10[24];
+ uint32_t vtsi_last_byte;
+ uint32_t zero_11;
+ uint8_t zero_12[56];
+ uint32_t vtsm_vobs; /* sector */
+ uint32_t vtstt_vobs; /* sector */
+ uint32_t vts_ptt_srpt; /* sector */
+ uint32_t vts_pgcit; /* sector */
+ uint32_t vtsm_pgci_ut; /* sector */
+ uint32_t vts_tmapt; /* sector */
+ uint32_t vtsm_c_adt; /* sector */
+ uint32_t vtsm_vobu_admap; /* sector */
+ uint32_t vts_c_adt; /* sector */
+ uint32_t vts_vobu_admap; /* sector */
+ uint8_t zero_13[24];
+ =20
+ video_attr_t vtsm_video_attr;
+ uint8_t zero_14;
+ uint8_t nr_of_vtsm_audio_streams; /* should be 0 or 1 */
+ audio_attr_t vtsm_audio_attr;
+ audio_attr_t zero_15[7];
+ uint8_t zero_16[17];
+ uint8_t nr_of_vtsm_subp_streams; /* should be 0 or 1 */
+ subp_attr_t vtsm_subp_attr;
+ subp_attr_t zero_17[27];
+ uint8_t zero_18[2];
+ =20
+ video_attr_t vts_video_attr;
+ uint8_t zero_19;
+ uint8_t nr_of_vts_audio_streams;
+ audio_attr_t vts_audio_attr[8];
+ uint8_t zero_20[17];
+ uint8_t nr_of_vts_subp_streams;
+ subp_attr_t vts_subp_attr[32];
+ uint16_t zero_21;
+ multichannel_ext_t vts_mu_audio_attr[8];
+ /* XXX: how much 'padding' here, if any? */
+} ATTRIBUTE_PACKED vtsi_mat_t;
+
+/**
+ * PartOfTitle Unit Information.
+ */
+typedef struct {
+ uint16_t pgcn;
+ uint16_t pgn;
+} ATTRIBUTE_PACKED ptt_info_t;
+
+/**
+ * PartOfTitle Information.
+ */
+typedef struct {
+ uint16_t nr_of_ptts;
+ ptt_info_t *ptt;
+} ATTRIBUTE_PACKED ttu_t;
+
+/**
+ * PartOfTitle Search Pointer Table.
+ */
+typedef struct {
+ uint16_t nr_of_srpts;
+ uint16_t zero_1;
+ uint32_t last_byte;
+ ttu_t *title;
+ uint32_t *ttu_offset; /* offset table for each ttu */
+} ATTRIBUTE_PACKED vts_ptt_srpt_t;
+#define VTS_PTT_SRPT_SIZE 8U
+
+
+/**
+ * Time Map Entry.
+ */
+/* Should this be bit field at all or just the uint32_t? */
+typedef uint32_t map_ent_t;
+
+/**
+ * Time Map.
+ */
+typedef struct {
+ uint8_t tmu; /* Time unit, in seconds */
+ uint8_t zero_1;
+ uint16_t nr_of_entries;
+ map_ent_t *map_ent;
+} ATTRIBUTE_PACKED vts_tmap_t;
+#define VTS_TMAP_SIZE 4U
+
+/**
+ * Time Map Table.
+ */
+typedef struct {
+ uint16_t nr_of_tmaps;
+ uint16_t zero_1;
+ uint32_t last_byte;
+ vts_tmap_t *tmap;
+ uint32_t *tmap_offset; /* offset table for each tmap */
+} ATTRIBUTE_PACKED vts_tmapt_t;
+#define VTS_TMAPT_SIZE 8U
+
+
+#if PRAGMA_PACK
+#pragma pack()
+#endif
+
+
+/**
+ * The following structure defines an IFO file. The structure is divide=
d into
+ * two parts, the VMGI, or Video Manager Information, which is read from=
the
+ * VIDEO_TS.[IFO,BUP] file, and the VTSI, or Video Title Set Information=
, which
+ * is read in from the VTS_XX_0.[IFO,BUP] files.
+ */
+typedef struct {
+ dvd_file_t *file;
+ =20
+ /* VMGI */
+ vmgi_mat_t *vmgi_mat;
+ tt_srpt_t *tt_srpt;
+ pgc_t *first_play_pgc; =20
+ ptl_mait_t *ptl_mait;
+ vts_atrt_t *vts_atrt;
+ txtdt_mgi_t *txtdt_mgi;
+ =20
+ /* Common */
+ pgci_ut_t *pgci_ut;
+ c_adt_t *menu_c_adt;
+ vobu_admap_t *menu_vobu_admap;
+ =20
+ /* VTSI */
+ vtsi_mat_t *vtsi_mat;
+ vts_ptt_srpt_t *vts_ptt_srpt;
+ pgcit_t *vts_pgcit;
+ vts_tmapt_t *vts_tmapt;
+ c_adt_t *vts_c_adt;
+ vobu_admap_t *vts_vobu_admap;
+} ifo_handle_t;
+
+#endif /* IFO_TYPES_H_INCLUDED */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/md5.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/md5.c 2007-03-10 21:38:2=
9 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/md5.c 2007-03-10 21:41:3=
4 UTC (rev 1290)
@@ -0,0 +1,418 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/* md5.c - Functions to compute MD5 message digest of files or memory bl=
ocks
+ according to the definition of MD5 in RFC 1321 from April 1992.
+ Copyright (C) 1995, 1996, 2001 Free Software Foundation, Inc.
+ NOTE: The canonical source of this file is maintained with the GNU C
+ Library. Bugs can be reported to bug-glibc at prep.ai.mit.edu.
+
+ This program is free software; you can redistribute 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 Foundatio=
n,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/* Written by Ulrich Drepper <drepper at gnu.ai.mit.edu>, 1995. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#if STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+# include <string.h>
+#else
+# ifndef HAVE_MEMCPY
+# define memcpy(d, s, n) bcopy ((s), (d), (n))
+# endif
+#endif
+
+#include "md5.h"
+//#include "unlocked-io.h"
+
+#ifdef _LIBC
+# include <endian.h>
+# if __BYTE_ORDER =3D=3D __BIG_ENDIAN
+# define WORDS_BIGENDIAN 1
+# endif
+#endif
+
+#ifdef WORDS_BIGENDIAN
+# define SWAP(n) =
\
+ (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >>=
24))
+#else
+# define SWAP(n) (n)
+#endif
+
+
+/* This array contains the bytes used to pad the buffer to the next
+ 64-byte boundary. (RFC 1321, 3.1: Step 1) */
+static const unsigned char fillbuf[64] =3D { 0x80, 0 /* , 0, 0, ... */ =
};
+
+
+/* Initialize structure containing state of computation.
+ (RFC 1321, 3.3: Step 3) */
+void
+md5_init_ctx (ctx)
+ struct md5_ctx *ctx;
+{
+ ctx->A =3D 0x67452301;
+ ctx->B =3D 0xefcdab89;
+ ctx->C =3D 0x98badcfe;
+ ctx->D =3D 0x10325476;
+
+ ctx->total[0] =3D ctx->total[1] =3D 0;
+ ctx->buflen =3D 0;
+}
+
+/* Put result from CTX in first 16 bytes following RESBUF. The result
+ must be in little endian byte order.
+
+ IMPORTANT: On some systems it is required that RESBUF is correctly
+ aligned for a 32 bits value. */
+void *
+md5_read_ctx (ctx, resbuf)
+ const struct md5_ctx *ctx;
+ void *resbuf;
+{
+ ((md5_uint32 *) resbuf)[0] =3D SWAP (ctx->A);
+ ((md5_uint32 *) resbuf)[1] =3D SWAP (ctx->B);
+ ((md5_uint32 *) resbuf)[2] =3D SWAP (ctx->C);
+ ((md5_uint32 *) resbuf)[3] =3D SWAP (ctx->D);
+
+ return resbuf;
+}
+
+/* Process the remaining bytes in the internal buffer and the usual
+ prolog according to the standard and write the result to RESBUF.
+
+ IMPORTANT: On some systems it is required that RESBUF is correctly
+ aligned for a 32 bits value. */
+void *
+md5_finish_ctx (ctx, resbuf)
+ struct md5_ctx *ctx;
+ void *resbuf;
+{
+ /* Take yet unprocessed bytes into account. */
+ md5_uint32 bytes =3D ctx->buflen;
+ size_t pad;
+
+ /* Now count remaining bytes. */
+ ctx->total[0] +=3D bytes;
+ if (ctx->total[0] < bytes)
+ ++ctx->total[1];
+
+ pad =3D bytes >=3D 56 ? 64 + 56 - bytes : 56 - bytes;
+ memcpy (&ctx->buffer[bytes], fillbuf, pad);
+
+ /* Put the 64-bit file length in *bits* at the end of the buffer. */
+ *(md5_uint32 *) &ctx->buffer[bytes + pad] =3D SWAP (ctx->total[0] << 3=
);
+ *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] =3D SWAP ((ctx->total[1]=
<< 3) |
+ (ctx->total[0] >=
> 29));
+
+ /* Process last bytes. */
+ md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
+
+ return md5_read_ctx (ctx, resbuf);
+}
+
+/* Compute MD5 message digest for bytes read from STREAM. The
+ resulting message digest number will be written into the 16 bytes
+ beginning at RESBLOCK. */
+int
+md5_stream (stream, resblock)
+ FILE *stream;
+ void *resblock;
+{
+ /* Important: BLOCKSIZE must be a multiple of 64. */
+#define BLOCKSIZE 4096
+ struct md5_ctx ctx;
+ char buffer[BLOCKSIZE + 72];
+ size_t sum;
+
+ /* Initialize the computation context. */
+ md5_init_ctx (&ctx);
+
+ /* Iterate over full file contents. */
+ while (1)
+ {
+ /* We read the file in blocks of BLOCKSIZE bytes. One call of the
+ computation function processes the whole buffer so that with th=
e
+ next round of the loop another block can be read. */
+ size_t n;
+ sum =3D 0;
+
+ /* Read block. Take care for partial reads. */
+ do
+ {
+ n =3D fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
+
+ sum +=3D n;
+ }
+ while (sum < BLOCKSIZE && n !=3D 0);
+ if (n =3D=3D 0 && ferror (stream))
+ return 1;
+
+ /* If end of file is reached, end the loop. */
+ if (n =3D=3D 0)
+ break;
+
+ /* Process buffer with BLOCKSIZE bytes. Note that
+ BLOCKSIZE % 64 =3D=3D 0
+ */
+ md5_process_block (buffer, BLOCKSIZE, &ctx);
+ }
+
+ /* Add the last bytes if necessary. */
+ if (sum > 0)
+ md5_process_bytes (buffer, sum, &ctx);
+
+ /* Construct result in desired memory. */
+ md5_finish_ctx (&ctx, resblock);
+ return 0;
+}
+
+/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
+ result is always in little endian byte order, so that a byte-wise
+ output yields to the wanted ASCII representation of the message
+ digest. */
+void *
+md5_buffer (buffer, len, resblock)
+ const char *buffer;
+ size_t len;
+ void *resblock;
+{
+ struct md5_ctx ctx;
+
+ /* Initialize the computation context. */
+ md5_init_ctx (&ctx);
+
+ /* Process whole buffer but last len % 64 bytes. */
+ md5_process_bytes (buffer, len, &ctx);
+
+ /* Put result in desired memory area. */
+ return md5_finish_ctx (&ctx, resblock);
+}
+
+
+void
+md5_process_bytes (buffer, len, ctx)
+ const void *buffer;
+ size_t len;
+ struct md5_ctx *ctx;
+{
+ /* When we already have some bits in our internal buffer concatenate
+ both inputs first. */
+ if (ctx->buflen !=3D 0)
+ {
+ size_t left_over =3D ctx->buflen;
+ size_t add =3D 128 - left_over > len ? len : 128 - left_over;
+
+ memcpy (&ctx->buffer[left_over], buffer, add);
+ ctx->buflen +=3D add;
+
+ if (left_over + add > 64)
+ {
+ md5_process_block (ctx->buffer, (left_over + add) & ~63, ctx);
+ /* The regions in the following copy operation cannot overlap.=
*/
+ memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63],
+ (left_over + add) & 63);
+ ctx->buflen =3D (left_over + add) & 63;
+ }
+
+ buffer =3D (const char *) buffer + add;
+ len -=3D add;
+ }
+
+ /* Process available complete blocks. */
+ if (len > 64)
+ {
+ md5_process_block (buffer, len & ~63, ctx);
+ buffer =3D (const char *) buffer + (len & ~63);
+ len &=3D 63;
+ }
+
+ /* Move remaining bytes in internal buffer. */
+ if (len > 0)
+ {
+ memcpy (ctx->buffer, buffer, len);
+ ctx->buflen =3D len;
+ }
+}
+
+
+/* These are the four functions used in the four steps of the MD5 algori=
thm
+ and defined in the RFC 1321. The first function is a little bit opti=
mized
+ (as found in Colin Plumbs public domain implementation). */
+/* #define FF(b, c, d) ((b & c) | (~b & d)) */
+#define FF(b, c, d) (d ^ (b & (c ^ d)))
+#define FG(b, c, d) FF (d, b, c)
+#define FH(b, c, d) (b ^ c ^ d)
+#define FI(b, c, d) (c ^ (b | ~d))
+
+/* Process LEN bytes of BUFFER, accumulating context into CTX.
+ It is assumed that LEN % 64 =3D=3D 0. */
+
+void
+md5_process_block (buffer, len, ctx)
+ const void *buffer;
+ size_t len;
+ struct md5_ctx *ctx;
+{
+ md5_uint32 correct_words[16];
+ const md5_uint32 *words =3D buffer;
+ size_t nwords =3D len / sizeof (md5_uint32);
+ const md5_uint32 *endp =3D words + nwords;
+ md5_uint32 A =3D ctx->A;
+ md5_uint32 B =3D ctx->B;
+ md5_uint32 C =3D ctx->C;
+ md5_uint32 D =3D ctx->D;
+
+ /* First increment the byte count. RFC 1321 specifies the possible
+ length of the file up to 2^64 bits. Here we only compute the
+ number of bytes. Do a double word increment. */
+ ctx->total[0] +=3D len;
+ if (ctx->total[0] < len)
+ ++ctx->total[1];
+
+ /* Process all bytes in the buffer with 64 bytes in each round of
+ the loop. */
+ while (words < endp)
+ {
+ md5_uint32 *cwp =3D correct_words;
+ md5_uint32 A_save =3D A;
+ md5_uint32 B_save =3D B;
+ md5_uint32 C_save =3D C;
+ md5_uint32 D_save =3D D;
+
+ /* First round: using the given function, the context and a consta=
nt
+ the next context is computed. Because the algorithms processin=
g
+ unit is a 32-bit word and it is determined to work on words in
+ little endian byte order we perhaps have to change the byte ord=
er
+ before the computation. To reduce the work for the next steps
+ we store the swapped words in the array CORRECT_WORDS. */
+
+#define OP(a, b, c, d, s, T) \
+ do \
+ { \
+ a +=3D FF (b, c, d) + (*cwp++ =3D SWAP (*words)) + T; \
+ ++words; \
+ a =3D rol (a, s); \
+ a +=3D b; \
+ } \
+ while (0)
+
+ /* Before we start, one word to the strange constants.
+ They are defined in RFC 1321 as
+
+ T[i] =3D (int) (4294967296.0 * fabs (sin (i))), i=3D1..64, or
+ perl -e 'foreach(1..64){printf "0x%08x\n", int (4294967296 * ab=
s (sin $_))}'
+ */
+
+ /* Round 1. */
+ OP (A, B, C, D, 7, 0xd76aa478);
+ OP (D, A, B, C, 12, 0xe8c7b756);
+ OP (C, D, A, B, 17, 0x242070db);
+ OP (B, C, D, A, 22, 0xc1bdceee);
+ OP (A, B, C, D, 7, 0xf57c0faf);
+ OP (D, A, B, C, 12, 0x4787c62a);
+ OP (C, D, A, B, 17, 0xa8304613);
+ OP (B, C, D, A, 22, 0xfd469501);
+ OP (A, B, C, D, 7, 0x698098d8);
+ OP (D, A, B, C, 12, 0x8b44f7af);
+ OP (C, D, A, B, 17, 0xffff5bb1);
+ OP (B, C, D, A, 22, 0x895cd7be);
+ OP (A, B, C, D, 7, 0x6b901122);
+ OP (D, A, B, C, 12, 0xfd987193);
+ OP (C, D, A, B, 17, 0xa679438e);
+ OP (B, C, D, A, 22, 0x49b40821);
+
+ /* For the second to fourth round we have the possibly swapped wor=
ds
+ in CORRECT_WORDS. Redefine the macro to take an additional fir=
st
+ argument specifying the function to use. */
+#undef OP
+#define OP(f, a, b, c, d, k, s, T) \
+ do \
+ { \
+ a +=3D f (b, c, d) + correct_words[k] + T; \
+ a =3D rol (a, s); \
+ a +=3D b; \
+ } \
+ while (0)
+
+ /* Round 2. */
+ OP (FG, A, B, C, D, 1, 5, 0xf61e2562);
+ OP (FG, D, A, B, C, 6, 9, 0xc040b340);
+ OP (FG, C, D, A, B, 11, 14, 0x265e5a51);
+ OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa);
+ OP (FG, A, B, C, D, 5, 5, 0xd62f105d);
+ OP (FG, D, A, B, C, 10, 9, 0x02441453);
+ OP (FG, C, D, A, B, 15, 14, 0xd8a1e681);
+ OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8);
+ OP (FG, A, B, C, D, 9, 5, 0x21e1cde6);
+ OP (FG, D, A, B, C, 14, 9, 0xc33707d6);
+ OP (FG, C, D, A, B, 3, 14, 0xf4d50d87);
+ OP (FG, B, C, D, A, 8, 20, 0x455a14ed);
+ OP (FG, A, B, C, D, 13, 5, 0xa9e3e905);
+ OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8);
+ OP (FG, C, D, A, B, 7, 14, 0x676f02d9);
+ OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a);
+
+ /* Round 3. */
+ OP (FH, A, B, C, D, 5, 4, 0xfffa3942);
+ OP (FH, D, A, B, C, 8, 11, 0x8771f681);
+ OP (FH, C, D, A, B, 11, 16, 0x6d9d6122);
+ OP (FH, B, C, D, A, 14, 23, 0xfde5380c);
+ OP (FH, A, B, C, D, 1, 4, 0xa4beea44);
+ OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9);
+ OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60);
+ OP (FH, B, C, D, A, 10, 23, 0xbebfbc70);
+ OP (FH, A, B, C, D, 13, 4, 0x289b7ec6);
+ OP (FH, D, A, B, C, 0, 11, 0xeaa127fa);
+ OP (FH, C, D, A, B, 3, 16, 0xd4ef3085);
+ OP (FH, B, C, D, A, 6, 23, 0x04881d05);
+ OP (FH, A, B, C, D, 9, 4, 0xd9d4d039);
+ OP (FH, D, A, B, C, 12, 11, 0xe6db99e5);
+ OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8);
+ OP (FH, B, C, D, A, 2, 23, 0xc4ac5665);
+
+ /* Round 4. */
+ OP (FI, A, B, C, D, 0, 6, 0xf4292244);
+ OP (FI, D, A, B, C, 7, 10, 0x432aff97);
+ OP (FI, C, D, A, B, 14, 15, 0xab9423a7);
+ OP (FI, B, C, D, A, 5, 21, 0xfc93a039);
+ OP (FI, A, B, C, D, 12, 6, 0x655b59c3);
+ OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92);
+ OP (FI, C, D, A, B, 10, 15, 0xffeff47d);
+ OP (FI, B, C, D, A, 1, 21, 0x85845dd1);
+ OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f);
+ OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0);
+ OP (FI, C, D, A, B, 6, 15, 0xa3014314);
+ OP (FI, B, C, D, A, 13, 21, 0x4e0811a1);
+ OP (FI, A, B, C, D, 4, 6, 0xf7537e82);
+ OP (FI, D, A, B, C, 11, 10, 0xbd3af235);
+ OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb);
+ OP (FI, B, C, D, A, 9, 21, 0xeb86d391);
+
+ /* Add the starting values of the context. */
+ A +=3D A_save;
+ B +=3D B_save;
+ C +=3D C_save;
+ D +=3D D_save;
+ }
+
+ /* Put checksum in context given as argument. */
+ ctx->A =3D A;
+ ctx->B =3D B;
+ ctx->C =3D C;
+ ctx->D =3D D;
+}
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/md5.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/md5.h 2007-03-10 21:38:2=
9 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/md5.h 2007-03-10 21:41:3=
4 UTC (rev 1290)
@@ -0,0 +1,162 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/* md5.h - Declaration of functions and data types used for MD5 sum
+ computing library functions.
+ Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
+ NOTE: The canonical source of this file is maintained with the GNU C
+ Library. Bugs can be reported to bug-glibc at prep.ai.mit.edu.
+
+ This program is free software; you can redistribute 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 Foundatio=
n,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _MD5_H
+#define _MD5_H 1
+
+#include <stdio.h>
+
+#if defined HAVE_LIMITS_H || _LIBC
+# include <limits.h>
+#endif
+
+/* The following contortions are an attempt to use the C preprocessor
+ to determine an unsigned integral type that is 32 bits wide. An
+ alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
+ doing that would require that the configure script compile and *run*
+ the resulting executable. Locally running cross-compiled executables
+ is usually not possible. */
+
+#ifdef _LIBC
+# include <sys/types.h>
+typedef u_int32_t md5_uint32;
+#else
+# if defined __STDC__ && __STDC__
+# define UINT_MAX_32_BITS 4294967295U
+# else
+# define UINT_MAX_32_BITS 0xFFFFFFFF
+# endif
+
+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
+ This should be valid for all systems GNU cares about because
+ that doesn't include 16-bit systems, and only modern systems
+ (that certainly have <limits.h>) have 64+-bit integral types. */
+
+# ifndef UINT_MAX
+# define UINT_MAX UINT_MAX_32_BITS
+# endif
+
+# if UINT_MAX =3D=3D UINT_MAX_32_BITS
+typedef unsigned int md5_uint32;
+# else
+# if USHRT_MAX =3D=3D UINT_MAX_32_BITS
+typedef unsigned short md5_uint32;
+# else
+# if ULONG_MAX =3D=3D UINT_MAX_32_BITS
+typedef unsigned long md5_uint32;
+# else
+/* The following line is intended to evoke an error.
+ Using #error is not portable enough. */
+"Cannot determine unsigned 32-bit data type."
+# endif
+# endif
+# endif
+#endif
+
+#undef __P
+#if defined (__STDC__) && __STDC__
+#define __P(x) x
+#else
+#define __P(x) ()
+#endif
+
+/* Structure to save state of computation between the single steps. */
+struct md5_ctx
+{
+ md5_uint32 A;
+ md5_uint32 B;
+ md5_uint32 C;
+ md5_uint32 D;
+
+ md5_uint32 total[2];
+ md5_uint32 buflen;
+ char buffer[128];
+};
+
+/*
+ * The following three functions are build up the low level used in
+ * the functions `md5_stream' and `md5_buffer'.
+ */
+
+/* Initialize structure containing state of computation.
+ (RFC 1321, 3.3: Step 3) */
+extern void md5_init_ctx __P ((struct md5_ctx *ctx));
+
+/* Starting with the result of former calls of this function (or the
+ initialization function update the context for the next LEN bytes
+ starting at BUFFER.
+ It is necessary that LEN is a multiple of 64!!! */
+extern void md5_process_block __P ((const void *buffer, size_t len,
+ struct md5_ctx *ctx));
+
+/* Starting with the result of former calls of this function (or the
+ initialization function update the context for the next LEN bytes
+ starting at BUFFER.
+ It is NOT required that LEN is a multiple of 64. */
+extern void md5_process_bytes __P ((const void *buffer, size_t len,
+ struct md5_ctx *ctx));
+
+/* Process the remaining bytes in the buffer and put result from CTX
+ in first 16 bytes following RESBUF. The result is always in little
+ endian byte order, so that a byte-wise output yields to the wanted
+ ASCII representation of the message digest.
+
+ IMPORTANT: On some systems it is required that RESBUF be correctly
+ aligned for a 32 bits value. */
+extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
+
+
+/* Put result from CTX in first 16 bytes following RESBUF. The result i=
s
+ always in little endian byte order, so that a byte-wise output yields
+ to the wanted ASCII representation of the message digest.
+
+ IMPORTANT: On some systems it is required that RESBUF is correctly
+ aligned for a 32 bits value. */
+extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf)=
);
+
+
+/* Compute MD5 message digest for bytes read from STREAM. The
+ resulting message digest number will be written into the 16 bytes
+ beginning at RESBLOCK. */
+extern int md5_stream __P ((FILE *stream, void *resblock));
+
+/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
+ result is always in little endian byte order, so that a byte-wise
+ output yields to the wanted ASCII representation of the message
+ digest. */
+extern void *md5_buffer __P ((const char *buffer, size_t len, void *resb=
lock));
+
+/* The following is from gnupg-1.0.2's cipher/bithelp.h. */
+/* Rotate a 32 bit integer by n bytes */
+#if defined __GNUC__ && defined __i386__
+static inline md5_uint32
+rol(md5_uint32 x, int n)
+{
+ __asm__("roll %%cl,%0"
+ :"=3Dr" (x)
+ :"0" (x),"c" (n));
+ return x;
+}
+#else
+# define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) )
+#endif
+
+#endif
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_print.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_print.c 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_print.c 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,286 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (C) 2000, 2001, 2002, 2003 H=E5kan Hjort <d95hjort at dtek.cha=
lmers.se>
+ *
+ * Much of the contents in this file is based on VOBDUMP.
+ *
+ * VOBDUMP: a program for examining DVD .VOB filse
+ *
+ * Copyright 1998, 1999 Eric Smith <eric at brouhaha.com>
+ *
+ * VOBDUMP 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. Note that I am not
+ * granting permission to redistribute or modify VOBDUMP under the
+ * terms of any later version of the General Public License.
+ *
+ * This program is distributed in the hope that it will be useful (or
+ * at least amusing), but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 "config.h"
+
+#include <stdio.h>
+
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#include "nav_types.h"
+#include "nav_print.h"
+#include "cmd_print.h"
+#include "dvdread_internal.h"
+
+static void print_time(dvd_time_t *dtime) {
+ const char *rate;
+ CHECK_VALUE((dtime->hour>>4) < 0xa && (dtime->hour&0xf) < 0xa);
+ CHECK_VALUE((dtime->minute>>4) < 0x7 && (dtime->minute&0xf) < 0xa);
+ CHECK_VALUE((dtime->second>>4) < 0x7 && (dtime->second&0xf) < 0xa);
+ CHECK_VALUE((dtime->frame_u&0xf) < 0xa);
+ =20
+ printf("%02x:%02x:%02x.%02x",=20
+ dtime->hour,
+ dtime->minute,
+ dtime->second,
+ dtime->frame_u & 0x3f);
+ switch((dtime->frame_u & 0xc0) >> 6) {
+ case 1:
+ rate =3D "25.00";
+ break;
+ case 3:
+ rate =3D "29.97";
+ break;
+ default:
+ rate =3D "(please send a bug report)";
+ break;
+ }=20
+ printf(" @ %s fps", rate);
+}
+
+
+static void navPrint_PCI_GI(pci_gi_t *pci_gi) {
+ int i;
+
+ printf("pci_gi:\n");
+ printf("nv_pck_lbn 0x%08x\n", pci_gi->nv_pck_lbn);
+ printf("vobu_cat 0x%04x\n", pci_gi->vobu_cat);
+ printf("vobu_uop_ctl 0x%08x\n", *(uint32_t*)&pci_gi->vobu_uop_ctl);
+ printf("vobu_s_ptm 0x%08x\n", pci_gi->vobu_s_ptm);
+ printf("vobu_e_ptm 0x%08x\n", pci_gi->vobu_e_ptm);
+ printf("vobu_se_e_ptm 0x%08x\n", pci_gi->vobu_se_e_ptm);
+ printf("e_eltm ");
+ print_time(&pci_gi->e_eltm);
+ printf("\n");
+ =20
+ printf("vobu_isrc \"");
+ for(i =3D 0; i < 32; i++) {
+ char c =3D pci_gi->vobu_isrc[i];
+ if((c >=3D ' ') && (c <=3D '~'))
+ printf("%c", c);
+ else
+ printf(".");
+ }
+ printf("\"\n");
+}
+
+static void navPrint_NSML_AGLI(nsml_agli_t *nsml_agli) {
+ int i, j =3D 0;
+ =20
+ for(i =3D 0; i < 9; i++)
+ j |=3D nsml_agli->nsml_agl_dsta[i];
+ if(j =3D=3D 0)
+ return;
+ =20
+ printf("nsml_agli:\n");
+ for(i =3D 0; i < 9; i++)
+ if(nsml_agli->nsml_agl_dsta[i])
+ printf("nsml_agl_c%d_dsta 0x%08x\n", i + 1,=20
+ nsml_agli->nsml_agl_dsta[i]);
+}
+
+static void navPrint_HL_GI(hl_gi_t *hl_gi, int *btngr_ns, int *btn_ns) {
+ =20
+ if((hl_gi->hli_ss & 0x03) =3D=3D 0)
+ return;
+ =20
+ printf("hl_gi:\n");
+ printf("hli_ss 0x%01x\n", hl_gi->hli_ss & 0x03);
+ printf("hli_s_ptm 0x%08x\n", hl_gi->hli_s_ptm);
+ printf("hli_e_ptm 0x%08x\n", hl_gi->hli_e_ptm);
+ printf("btn_se_e_ptm 0x%08x\n", hl_gi->btn_se_e_ptm);
+
+ *btngr_ns =3D hl_gi->btngr_ns;
+ printf("btngr_ns %d\n", hl_gi->btngr_ns);
+ printf("btngr%d_dsp_ty 0x%02x\n", 1, hl_gi->btngr1_dsp_ty);
+ printf("btngr%d_dsp_ty 0x%02x\n", 2, hl_gi->btngr2_dsp_ty);
+ printf("btngr%d_dsp_ty 0x%02x\n", 3, hl_gi->btngr3_dsp_ty);
+ =20
+ printf("btn_ofn %d\n", hl_gi->btn_ofn);
+ *btn_ns =3D hl_gi->btn_ns;
+ printf("btn_ns %d\n", hl_gi->btn_ns);
+ printf("nsl_btn_ns %d\n", hl_gi->nsl_btn_ns);
+ printf("fosl_btnn %d\n", hl_gi->fosl_btnn);
+ printf("foac_btnn %d\n", hl_gi->foac_btnn);
+}
+
+static void navPrint_BTN_COLIT(btn_colit_t *btn_colit) {
+ int i, j;
+ =20
+ j =3D 0;
+ for(i =3D 0; i < 6; i++)
+ j |=3D btn_colit->btn_coli[i/2][i&1];
+ if(j =3D=3D 0)
+ return;
+ =20
+ printf("btn_colit:\n");
+ for(i =3D 0; i < 3; i++)
+ for(j =3D 0; j < 2; j++)
+ printf("btn_cqoli %d %s_coli: %08x\n",
+ i, (j =3D=3D 0) ? "sl" : "ac",
+ btn_colit->btn_coli[i][j]);
+}
+
+static void navPrint_BTNIT(btni_t *btni_table, int btngr_ns, int btn_ns)=
{
+ int i, j;
+ =20
+ printf("btnit:\n");
+ printf("btngr_ns: %i\n", btngr_ns);
+ printf("btn_ns: %i\n", btn_ns);
+ =20
+ if(btngr_ns =3D=3D 0)
+ return;
+ =20
+ for(i =3D 0; i < btngr_ns; i++) {
+ for(j =3D 0; j < (36 / btngr_ns); j++) {
+ if(j < btn_ns) {
+ btni_t *btni =3D &btni_table[(36 / btngr_ns) * i + j];
+ =20
+ printf("group %d btni %d: ", i+1, j+1);
+ printf("btn_coln %d, auto_action_mode %d\n",
+ btni->btn_coln, btni->auto_action_mode);
+ printf("coords (%d, %d) .. (%d, %d)\n",
+ btni->x_start, btni->y_start, btni->x_end, btni->y_end);
+ =20
+ printf("up %d, ", btni->up);
+ printf("down %d, ", btni->down);
+ printf("left %d, ", btni->left);
+ printf("right %d\n", btni->right);
+ =20
+ cmdPrint_CMD(0, &btni->cmd);
+ printf("\n");
+ }
+ }
+ }
+}
+
+static void navPrint_HLI(hli_t *hli) {
+ int btngr_ns =3D 0, btn_ns =3D 0;
+ =20
+ printf("hli:\n");
+ navPrint_HL_GI(&hli->hl_gi, & btngr_ns, & btn_ns);
+ navPrint_BTN_COLIT(&hli->btn_colit);
+ navPrint_BTNIT(hli->btnit, btngr_ns, btn_ns);
+}
+
+void navPrint_PCI(pci_t *pci) {
+ printf("pci packet:\n");
+ navPrint_PCI_GI(&pci->pci_gi);
+ navPrint_NSML_AGLI(&pci->nsml_agli);
+ navPrint_HLI(&pci->hli);
+}
+
+static void navPrint_DSI_GI(dsi_gi_t *dsi_gi) {
+ printf("dsi_gi:\n");
+ printf("nv_pck_scr 0x%08x\n", dsi_gi->nv_pck_scr);
+ printf("nv_pck_lbn 0x%08x\n", dsi_gi->nv_pck_lbn );
+ printf("vobu_ea 0x%08x\n", dsi_gi->vobu_ea);
+ printf("vobu_1stref_ea 0x%08x\n", dsi_gi->vobu_1stref_ea);
+ printf("vobu_2ndref_ea 0x%08x\n", dsi_gi->vobu_2ndref_ea);
+ printf("vobu_3rdref_ea 0x%08x\n", dsi_gi->vobu_3rdref_ea);
+ printf("vobu_vob_idn 0x%04x\n", dsi_gi->vobu_vob_idn);
+ printf("vobu_c_idn 0x%02x\n", dsi_gi->vobu_c_idn);
+ printf("c_eltm ");
+ print_time(&dsi_gi->c_eltm);
+ printf("\n");
+}
+
+static void navPrint_SML_PBI(sml_pbi_t *sml_pbi) {
+ printf("sml_pbi:\n");
+ printf("category 0x%04x\n", sml_pbi->category);
+ if(sml_pbi->category & 0x8000)
+ printf("VOBU is in preunit\n");
+ if(sml_pbi->category & 0x4000)
+ printf("VOBU is in ILVU\n");
+ if(sml_pbi->category & 0x2000)
+ printf("VOBU at the beginning of ILVU\n");
+ if(sml_pbi->category & 0x1000)
+ printf("VOBU at end of PREU of ILVU\n");
+ =20
+ printf("ilvu_ea 0x%08x\n", sml_pbi->ilvu_ea);
+ printf("nxt_ilvu_sa 0x%08x\n", sml_pbi->ilvu_sa);
+ printf("nxt_ilvu_size 0x%04x\n", sml_pbi->size);
+ =20
+ printf("vob_v_s_s_ptm 0x%08x\n", sml_pbi->vob_v_s_s_ptm);
+ printf("vob_v_e_e_ptm 0x%08x\n", sml_pbi->vob_v_e_e_ptm);
+ =20
+ /* $$$ more code needed here */
+}
+
+static void navPrint_SML_AGLI(sml_agli_t *sml_agli) {
+ int i;
+ printf("sml_agli:\n");
+ for(i =3D 0; i < 9; i++) {
+ printf("agl_c%d address: 0x%08x size 0x%04x\n", i,
+ sml_agli->data[i].address, sml_agli->data[i].size);
+ }
+}
+
+static void navPrint_VOBU_SRI(vobu_sri_t *vobu_sri) {
+ int i;
+ int stime[19] =3D { 240, 120, 60, 20, 15, 14, 13, 12, 11,=20
+ 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};
+ printf("vobu_sri:\n");
+ printf("Next VOBU with Video %08x\n", vobu_sri->next_video);
+ for(i =3D 0; i < 19; i++) {
+ printf("%3.1f %08x ", stime[i]/2.0, vobu_sri->fwda[i]);
+ }
+ printf("\n");
+ printf("Next VOBU %08x\n", vobu_sri->next_vobu);
+ printf("--\n");
+ printf("Prev VOBU %08x\n", vobu_sri->prev_vobu);
+ for(i =3D 0; i < 19; i++) {
+ printf("%3.1f %08x ", stime[18 - i]/2.0, vobu_sri->bwda[i]);
+ }
+ printf("\n");
+ printf("Prev VOBU with Video %08x\n", vobu_sri->prev_video);
+}
+
+static void navPrint_SYNCI(synci_t *synci) {
+ int i;
+ =20
+ printf("synci:\n");
+ /* $$$ more code needed here */
+ for(i =3D 0; i < 8; i++)
+ printf("%04x ", synci->a_synca[i]);
+ for(i =3D 0; i < 32; i++)
+ printf("%08x ", synci->sp_synca[i]);
+}
+
+void navPrint_DSI(dsi_t *dsi) {
+ printf("dsi packet:\n");
+ navPrint_DSI_GI(&dsi->dsi_gi);
+ navPrint_SML_PBI(&dsi->sml_pbi);
+ navPrint_SML_AGLI(&dsi->sml_agli);
+ navPrint_VOBU_SRI(&dsi->vobu_sri);
+ navPrint_SYNCI(&dsi->synci);
+}
+
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_print.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_print.h 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_print.h 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,51 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef NAV_PRINT_H_INCLUDED
+#define NAV_PRINT_H_INCLUDED
+
+/*
+ * Copyright (C) 2001, 2002 Billy Biggs <vektor at dumbterm.net>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 <dvdread/nav_types.h>
+
+/**
+ * Pretty printing of the NAV packets, PCI and DSI structs.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Prints information contained in the PCI to stdout.
+ *
+ * @param pci Pointer to the PCI data structure to be printed.
+ */
+void navPrint_PCI(pci_t *);
+ =20
+/**
+ * Prints information contained in the DSI to stdout.
+ *
+ * @param dsi Pointer to the DSI data structure to be printed.
+ */
+void navPrint_DSI(dsi_t *);
+
+#ifdef __cplusplus
+};
+#endif
+#endif /* NAV_PRINT_H_INCLUDED */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_read.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_read.c 2007-03-10 21=
:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_read.c 2007-03-10 21=
:41:34 UTC (rev 1290)
@@ -0,0 +1,209 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (C) 2000, 2001, 2002, 2003 H=E5kan Hjort <d95hjort at dtek.cha=
lmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#include "bswap.h"
+#include "nav_types.h"
+#include "nav_read.h"
+#include "dvdread_internal.h"
+
+void navRead_PCI(pci_t *pci, unsigned char *buffer) {
+ unsigned int i, j;
+
+ CHECK_VALUE(sizeof(pci_t) =3D=3D PCI_BYTES - 1); // -1 for substream i=
d
+ =20
+ memcpy(pci, buffer, sizeof(pci_t));
+
+ /* Endian conversions */
+
+ /* pci pci_gi */
+ B2N_32(pci->pci_gi.nv_pck_lbn);
+ B2N_16(pci->pci_gi.vobu_cat);
+ B2N_32(pci->pci_gi.vobu_s_ptm);
+ B2N_32(pci->pci_gi.vobu_e_ptm);
+ B2N_32(pci->pci_gi.vobu_se_e_ptm);
+
+ /* pci nsml_agli */
+ for(i =3D 0; i < 9; i++)
+ B2N_32(pci->nsml_agli.nsml_agl_dsta[i]);
+
+ /* pci hli hli_gi */
+ B2N_16(pci->hli.hl_gi.hli_ss);
+ B2N_32(pci->hli.hl_gi.hli_s_ptm);
+ B2N_32(pci->hli.hl_gi.hli_e_ptm);
+ B2N_32(pci->hli.hl_gi.btn_se_e_ptm);
+
+ /* pci hli btn_colit */
+ for(i =3D 0; i < 3; i++)
+ for(j =3D 0; j < 2; j++)
+ B2N_32(pci->hli.btn_colit.btn_coli[i][j]);
+
+ /* NOTE: I've had to change the structure from the disk layout to get
+ * the packing to work with Sun's Forte C compiler. */
+ =20
+ /* pci hli btni */
+ for(i =3D 0; i < 36; i++) {
+ char tmp[sizeof(pci->hli.btnit[i])], swap;
+ memcpy(tmp, &(pci->hli.btnit[i]), sizeof(pci->hli.btnit[i]));
+ /* Byte 4 to 7 are 'rotated' was: ABCD EFGH IJ is: ABCG DEFH IJ */
+ swap =3D tmp[6];=20
+ tmp[6] =3D tmp[5];
+ tmp[5] =3D tmp[4];
+ tmp[4] =3D tmp[3];
+ tmp[3] =3D swap;
+ =20
+ /* Then there are the two B2N_24(..) calls */
+#ifndef WORDS_BIGENDIAN
+ swap =3D tmp[0];
+ tmp[0] =3D tmp[2];
+ tmp[2] =3D swap;
+ =20
+ swap =3D tmp[4];
+ tmp[4] =3D tmp[6];
+ tmp[6] =3D swap;
+#endif
+ memcpy(&(pci->hli.btnit[i]), tmp, sizeof(pci->hli.btnit[i]));
+ }
+
+
+#ifndef NDEBUG
+ /* Asserts */
+
+ /* pci pci gi */=20
+ CHECK_VALUE(pci->pci_gi.zero1 =3D=3D 0);
+
+ /* pci hli hli_gi */
+ CHECK_VALUE(pci->hli.hl_gi.zero1 =3D=3D 0);
+ CHECK_VALUE(pci->hli.hl_gi.zero2 =3D=3D 0);
+ CHECK_VALUE(pci->hli.hl_gi.zero3 =3D=3D 0);
+ CHECK_VALUE(pci->hli.hl_gi.zero4 =3D=3D 0);
+ CHECK_VALUE(pci->hli.hl_gi.zero5 =3D=3D 0);
+
+ /* Are there buttons defined here? */
+ if((pci->hli.hl_gi.hli_ss & 0x03) !=3D 0) {
+ CHECK_VALUE(pci->hli.hl_gi.btn_ns !=3D 0);=20
+ CHECK_VALUE(pci->hli.hl_gi.btngr_ns !=3D 0);=20
+ } else {
+ CHECK_VALUE((pci->hli.hl_gi.btn_ns !=3D 0 && pci->hli.hl_gi.btngr_ns=
!=3D 0)=20
+ || (pci->hli.hl_gi.btn_ns =3D=3D 0 && pci->hli.hl_gi.btn=
gr_ns =3D=3D 0));
+ }
+
+ /* pci hli btnit */
+ for(i =3D 0; i < pci->hli.hl_gi.btngr_ns; i++) {
+ for(j =3D 0; j < (36 / pci->hli.hl_gi.btngr_ns); j++) {
+ int n =3D (36 / pci->hli.hl_gi.btngr_ns) * i + j;
+ CHECK_VALUE(pci->hli.btnit[n].zero1 =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].zero2 =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].zero3 =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].zero4 =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].zero5 =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].zero6 =3D=3D 0);
+ =20
+ if (j < pci->hli.hl_gi.btn_ns) { =20
+ CHECK_VALUE(pci->hli.btnit[n].x_start <=3D pci->hli.btnit[n].x_e=
nd);
+ CHECK_VALUE(pci->hli.btnit[n].y_start <=3D pci->hli.btnit[n].y_e=
nd);
+ CHECK_VALUE(pci->hli.btnit[n].up <=3D pci->hli.hl_gi.btn_ns);
+ CHECK_VALUE(pci->hli.btnit[n].down <=3D pci->hli.hl_gi.btn_ns);
+ CHECK_VALUE(pci->hli.btnit[n].left <=3D pci->hli.hl_gi.btn_ns);
+ CHECK_VALUE(pci->hli.btnit[n].right <=3D pci->hli.hl_gi.btn_ns);
+ //vmcmd_verify(pci->hli.btnit[n].cmd);
+ } else {
+ int k;
+ CHECK_VALUE(pci->hli.btnit[n].btn_coln =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].auto_action_mode =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].x_start =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].y_start =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].x_end =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].y_end =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].up =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].down =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].left =3D=3D 0);
+ CHECK_VALUE(pci->hli.btnit[n].right =3D=3D 0);
+ for (k =3D 0; k < 8; k++)
+ CHECK_VALUE(pci->hli.btnit[n].cmd.bytes[k] =3D=3D 0); //CHECK_=
ZERO?
+ }
+ }
+ }
+#endif /* !NDEBUG */
+}
+
+void navRead_DSI(dsi_t *dsi, unsigned char *buffer) {
+ int i;
+
+ CHECK_VALUE(sizeof(dsi_t) =3D=3D DSI_BYTES - 1); // -1 for substream i=
d
+ =20
+ memcpy(dsi, buffer, sizeof(dsi_t));
+
+ /* Endian conversions */
+
+ /* dsi dsi gi */
+ B2N_32(dsi->dsi_gi.nv_pck_scr);
+ B2N_32(dsi->dsi_gi.nv_pck_lbn);
+ B2N_32(dsi->dsi_gi.vobu_ea);
+ B2N_32(dsi->dsi_gi.vobu_1stref_ea);
+ B2N_32(dsi->dsi_gi.vobu_2ndref_ea);
+ B2N_32(dsi->dsi_gi.vobu_3rdref_ea);
+ B2N_16(dsi->dsi_gi.vobu_vob_idn);
+
+ /* dsi sml pbi */
+ B2N_16(dsi->sml_pbi.category);
+ B2N_32(dsi->sml_pbi.ilvu_ea);
+ B2N_32(dsi->sml_pbi.ilvu_sa);
+ B2N_16(dsi->sml_pbi.size);
+ B2N_32(dsi->sml_pbi.vob_v_s_s_ptm);
+ B2N_32(dsi->sml_pbi.vob_v_e_e_ptm);
+
+ /* dsi sml agli */
+ for(i =3D 0; i < 9; i++) {
+ B2N_32(dsi->sml_agli.data[ i ].address);
+ B2N_16(dsi->sml_agli.data[ i ].size);
+ }
+
+ /* dsi vobu sri */
+ B2N_32(dsi->vobu_sri.next_video);
+ for(i =3D 0; i < 19; i++)
+ B2N_32(dsi->vobu_sri.fwda[i]);
+ B2N_32(dsi->vobu_sri.next_vobu);
+ B2N_32(dsi->vobu_sri.prev_vobu);
+ for(i =3D 0; i < 19; i++)
+ B2N_32(dsi->vobu_sri.bwda[i]);
+ B2N_32(dsi->vobu_sri.prev_video);
+
+ /* dsi synci */
+ for(i =3D 0; i < 8; i++)
+ B2N_16(dsi->synci.a_synca[i]);
+ for(i =3D 0; i < 32; i++)
+ B2N_32(dsi->synci.sp_synca[i]);
+
+ =20
+ /* Asserts */
+
+ /* dsi dsi gi */
+ CHECK_VALUE(dsi->dsi_gi.zero1 =3D=3D 0);
+}
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_read.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_read.h 2007-03-10 21=
:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_read.h 2007-03-10 21=
:41:34 UTC (rev 1290)
@@ -0,0 +1,52 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef NAV_READ_H_INCLUDED
+#define NAV_READ_H_INCLUDED
+
+/*
+ * Copyright (C) 2000, 2001, 2002 H=E5kan Hjort <d95hjort at dtek.chalmers.=
se>.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 <dvdread/nav_types.h>
+
+/**
+ * Parsing of NAV data, PCI and DSI parts.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Reads the PCI packet data pointed to into th pci struct.
+ *=20
+ * @param pci Pointer to the PCI data structure to be filled in.
+ * @param bufffer Pointer to the buffer of the on disc PCI data.
+ */ =20
+void navRead_PCI(pci_t *, unsigned char *);
+
+/**
+ * Reads the DSI packet data pointed to into dsi struct.
+ *=20
+ * @param dsi Pointer to the DSI data structure to be filled in.
+ * @param bufffer Pointer to the buffer of the on disc DSI data.
+ */
+void navRead_DSI(dsi_t *, unsigned char *);
+
+#ifdef __cplusplus
+};
+#endif
+#endif /* NAV_READ_H_INCLUDED */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_types.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_types.h 2007-03-10 2=
1:38:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/dvdread/nav_types.h 2007-03-10 2=
1:41:34 UTC (rev 1290)
@@ -0,0 +1,307 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+#ifndef NAV_TYPES_H_INCLUDED
+#define NAV_TYPES_H_INCLUDED
+
+/*
+ * Copyright (C) 2000, 2001, 2002 H=E5kan Hjort <d95hjort at dtek.chalmers.=
se>
+ *
+ * The data structures in this file should represent the layout of the
+ * pci and dsi packets as they are stored in the stream. Information
+ * found by reading the source to VOBDUMP is the base for the structure
+ * and names of these data types.
+ *
+ * VOBDUMP: a program for examining DVD .VOB files.
+ * Copyright 1998, 1999 Eric Smith <eric at brouhaha.com>
+ *
+ * VOBDUMP 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. Note that I am not
+ * granting permission to redistribute or modify VOBDUMP under the terms
+ * of any later version of the General Public License.
+ *
+ * This program is distributed in the hope that it will be useful (or at
+ * least amusing), but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
+ * the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 <dvdread/ifo_types.h> /* only dvd_time_t, vm_cmd_t and user_ops=
_t */
+/* If it's ever removed add a uintX_t test. */
+
+#undef ATTRIBUTE_PACKED
+#undef PRAGMA_PACK_BEGIN=20
+#undef PRAGMA_PACK_END
+
+#if defined(__GNUC__)
+#if __GNUC__ > 2 || (__GNUC__ =3D=3D 2 && __GNUC_MINOR__ >=3D 95)
+#define ATTRIBUTE_PACKED __attribute__ ((packed))
+#define PRAGMA_PACK 0
+#endif
+#endif
+
+#if !defined(ATTRIBUTE_PACKED)
+#define ATTRIBUTE_PACKED
+#define PRAGMA_PACK 1
+#endif
+
+
+/* The length including the substream id byte. */
+#define PCI_BYTES 0x3d4
+#define DSI_BYTES 0x3fa
+
+#define PS2_PCI_SUBSTREAM_ID 0x00
+#define PS2_DSI_SUBSTREAM_ID 0x01
+
+/* Remove this */
+#define DSI_START_BYTE 1031
+
+
+#if PRAGMA_PACK
+#pragma pack(1)
+#endif
+
+
+/**
+ * PCI General Information=20
+ */
+typedef struct {
+ uint32_t nv_pck_lbn; /**< sector address of this nav pack */
+ uint16_t vobu_cat; /**< 'category' of vobu */
+ uint16_t zero1; /**< reserved */
+ user_ops_t vobu_uop_ctl; /**< UOP of vobu */
+ uint32_t vobu_s_ptm; /**< start presentation time of vobu */
+ uint32_t vobu_e_ptm; /**< end presentation time of vobu */
+ uint32_t vobu_se_e_ptm; /**< end ptm of sequence end in vobu */
+ dvd_time_t e_eltm; /**< Cell elapsed time */
+ char vobu_isrc[32];
+} ATTRIBUTE_PACKED pci_gi_t;
+
+/**
+ * Non Seamless Angle Information
+ */
+typedef struct {
+ uint32_t nsml_agl_dsta[9]; /**< address of destination vobu in AGL_C#=
n */
+} ATTRIBUTE_PACKED nsml_agli_t;
+
+/**=20
+ * Highlight General Information=20
+ *
+ * For btngrX_dsp_ty the bits have the following meaning:
+ * 000b: normal 4/3 only buttons
+ * XX1b: wide (16/9) buttons
+ * X1Xb: letterbox buttons
+ * 1XXb: pan&scan buttons
+ */
+typedef struct {
+ uint16_t hli_ss; /**< status, only low 2 bits 0: no buttons, 1: differ=
ent 2: equal 3: eual except for button cmds */
+ uint32_t hli_s_ptm; /**< start ptm of hli */
+ uint32_t hli_e_ptm; /**< end ptm of hli */
+ uint32_t btn_se_e_ptm; /**< end ptm of button select */
+#ifdef WORDS_BIGENDIAN
+ unsigned int zero1 : 2; /**< reserved */
+ unsigned int btngr_ns : 2; /**< number of button groups 1, 2 or =
3 with 36/18/12 buttons */
+ unsigned int zero2 : 1; /**< reserved */
+ unsigned int btngr1_dsp_ty : 3; /**< display type of subpic stream fo=
r button group 1 */
+ unsigned int zero3 : 1; /**< reserved */
+ unsigned int btngr2_dsp_ty : 3; /**< display type of subpic stream fo=
r button group 2 */
+ unsigned int zero4 : 1; /**< reserved */
+ unsigned int btngr3_dsp_ty : 3; /**< display type of subpic stream fo=
r button group 3 */
+#else
+ unsigned int btngr1_dsp_ty : 3;
+ unsigned int zero2 : 1;
+ unsigned int btngr_ns : 2;
+ unsigned int zero1 : 2;
+ unsigned int btngr3_dsp_ty : 3;
+ unsigned int zero4 : 1;
+ unsigned int btngr2_dsp_ty : 3;
+ unsigned int zero3 : 1;
+#endif
+ uint8_t btn_ofn; /**< button offset number range 0-255 */
+ uint8_t btn_ns; /**< number of valid buttons <=3D 36/18/12 (low =
6 bits) */ =20
+ uint8_t nsl_btn_ns; /**< number of buttons selectable by U_BTNNi (low=
6 bits) nsl_btn_ns <=3D btn_ns */
+ uint8_t zero5; /**< reserved */
+ uint8_t fosl_btnn; /**< forcedly selected button (low 6 bits) */
+ uint8_t foac_btnn; /**< forcedly activated button (low 6 bits) */
+} ATTRIBUTE_PACKED hl_gi_t;
+
+
+/**=20
+ * Button Color Information Table=20
+ * Each entry beeing a 32bit word that contains the color indexs and alp=
ha
+ * values to use. They are all represented by 4 bit number and stored
+ * like this [Ci3, Ci2, Ci1, Ci0, A3, A2, A1, A0]. The actual palette
+ * that the indexes reference is in the PGC.
+ * @TODO split the uint32_t into a struct
+ */
+typedef struct {
+ uint32_t btn_coli[3][2]; /**< [button color number-1][select:0/action=
:1] */
+} ATTRIBUTE_PACKED btn_colit_t;
+
+/**=20
+ * Button Information
+ *
+ * NOTE: I've had to change the structure from the disk layout to get
+ * the packing to work with Sun's Forte C compiler.
+ * The 4 and 7 bytes are 'rotated' was: ABC DEF GHIJ is: ABCG DEFH IJ
+ */
+typedef struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned int btn_coln : 2; /**< button color number */
+ unsigned int x_start : 10; /**< x start offset within the ove=
rlay */
+ unsigned int zero1 : 2; /**< reserved */
+ unsigned int x_end : 10; /**< x end offset within the overl=
ay */
+
+ unsigned int zero3 : 2; /**< reserved */
+ unsigned int up : 6; /**< button index when pressing up=
*/
+
+ unsigned int auto_action_mode : 2; /**< 0: no, 1: activated if select=
ed */
+ unsigned int y_start : 10; /**< y start offset within the ove=
rlay */
+ unsigned int zero2 : 2; /**< reserved */
+ unsigned int y_end : 10; /**< y end offset within the overl=
ay */
+
+ unsigned int zero4 : 2; /**< reserved */
+ unsigned int down : 6; /**< button index when pressing do=
wn */
+ unsigned int zero5 : 2; /**< reserved */
+ unsigned int left : 6; /**< button index when pressing le=
ft */
+ unsigned int zero6 : 2; /**< reserved */
+ unsigned int right : 6; /**< button index when pressing ri=
ght */
+#else
+ unsigned int x_end : 10;
+ unsigned int zero1 : 2;
+ unsigned int x_start : 10;
+ unsigned int btn_coln : 2;
+
+ unsigned int up : 6;
+ unsigned int zero3 : 2;
+
+ unsigned int y_end : 10;
+ unsigned int zero2 : 2;
+ unsigned int y_start : 10;
+ unsigned int auto_action_mode : 2;
+
+ unsigned int down : 6;
+ unsigned int zero4 : 2;
+ unsigned int left : 6;
+ unsigned int zero5 : 2;
+ unsigned int right : 6;
+ unsigned int zero6 : 2;
+#endif
+ vm_cmd_t cmd;
+} ATTRIBUTE_PACKED btni_t;
+
+/**
+ * Highlight Information=20
+ */
+typedef struct {
+ hl_gi_t hl_gi;
+ btn_colit_t btn_colit;
+ btni_t btnit[36];
+} ATTRIBUTE_PACKED hli_t;
+
+/**
+ * PCI packet
+ */
+typedef struct {
+ pci_gi_t pci_gi;
+ nsml_agli_t nsml_agli;
+ hli_t hli;
+ uint8_t zero1[189];
+} ATTRIBUTE_PACKED pci_t;
+
+
+
+
+/**
+ * DSI General Information=20
+ */
+typedef struct {
+ uint32_t nv_pck_scr;
+ uint32_t nv_pck_lbn; /**< sector address of this nav pack */
+ uint32_t vobu_ea; /**< end address of this VOBU */
+ uint32_t vobu_1stref_ea; /**< end address of the 1st reference image =
*/
+ uint32_t vobu_2ndref_ea; /**< end address of the 2nd reference image =
*/
+ uint32_t vobu_3rdref_ea; /**< end address of the 3rd reference image =
*/
+ uint16_t vobu_vob_idn; /**< VOB Id number that this VOBU is part of=
*/
+ uint8_t zero1; /**< reserved */
+ uint8_t vobu_c_idn; /**< Cell Id number that this VOBU is part o=
f */
+ dvd_time_t c_eltm; /**< Cell elapsed time */
+} ATTRIBUTE_PACKED dsi_gi_t;
+
+/**
+ * Seamless Playback Information
+ */
+typedef struct {
+ uint16_t category; /**< 'category' of seamless VOBU */
+ uint32_t ilvu_ea; /**< end address of interleaved Unit */
+ uint32_t ilvu_sa; /**< start address of next interleaved unit *=
/
+ uint16_t size; /**< size of next interleaved unit */
+ uint32_t vob_v_s_s_ptm; /**< video start ptm in vob */
+ uint32_t vob_v_e_e_ptm; /**< video end ptm in vob */
+ struct {
+ uint32_t stp_ptm1;
+ uint32_t stp_ptm2;
+ uint32_t gap_len1;
+ uint32_t gap_len2; =20
+ } vob_a[8];
+} ATTRIBUTE_PACKED sml_pbi_t;
+
+/**
+ * Seamless Angle Infromation for one angle
+ */
+typedef struct {
+ uint32_t address; /**< offset to next ILVU, high bit is before/after *=
/
+ uint16_t size; /**< byte size of the ILVU pointed to by address */
+} ATTRIBUTE_PACKED sml_agl_data_t;
+
+/**
+ * Seamless Angle Infromation
+ */
+typedef struct {
+ sml_agl_data_t data[9];
+} ATTRIBUTE_PACKED sml_agli_t;
+
+/**
+ * VOBU Search Information=20
+ */
+typedef struct {
+ uint32_t next_video; /**< Next vobu that contains video */
+ uint32_t fwda[19]; /**< Forwards, time */
+ uint32_t next_vobu;
+ uint32_t prev_vobu;
+ uint32_t bwda[19]; /**< Backwards, time */
+ uint32_t prev_video;
+} ATTRIBUTE_PACKED vobu_sri_t;
+
+#define SRI_END_OF_CELL 0x3fffffff
+
+/**
+ * Synchronous Information
+ */=20
+typedef struct {
+ uint16_t a_synca[8]; /**< offset to first audio packet for this VOBU=
*/
+ uint32_t sp_synca[32]; /**< offset to first subpicture packet */
+} ATTRIBUTE_PACKED synci_t;
+
+/**
+ * DSI packet
+ */
+typedef struct {
+ dsi_gi_t dsi_gi;
+ sml_pbi_t sml_pbi;
+ sml_agli_t sml_agli;
+ vobu_sri_t vobu_sri;
+ synci_t synci;
+ uint8_t zero1[471];
+} ATTRIBUTE_PACKED dsi_t;
+
+
+#if PRAGMA_PACK
+#pragma pack()
+#endif
+
+#endif /* NAV_TYPES_H_INCLUDED */
Added: trunk/DvdMenuXtractor/dmx/libdvdread/install-sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/install-sh 2007-03-10 21:38:29 U=
TC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/install-sh 2007-03-10 21:41:34 U=
TC (rev 1290)
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software an=
d its
+# documentation for any purpose is hereby granted without fee, provided =
that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising =
or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to preven=
t
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=3D"${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env.=
vars.
+
+mvprog=3D"${MVPROG-mv}"
+cpprog=3D"${CPPROG-cp}"
+chmodprog=3D"${CHMODPROG-chmod}"
+chownprog=3D"${CHOWNPROG-chown}"
+chgrpprog=3D"${CHGRPPROG-chgrp}"
+stripprog=3D"${STRIPPROG-strip}"
+rmprog=3D"${RMPROG-rm}"
+mkdirprog=3D"${MKDIRPROG-mkdir}"
+
+transformbasename=3D""
+transform_arg=3D""
+instcmd=3D"$mvprog"
+chmodcmd=3D"$chmodprog 0755"
+chowncmd=3D""
+chgrpcmd=3D""
+stripcmd=3D""
+rmcmd=3D"$rmprog -f"
+mvcmd=3D"$mvprog"
+src=3D""
+dst=3D""
+dir_arg=3D""
+
+while [ x"$1" !=3D x ]; do
+ case $1 in
+ -c) instcmd=3D"$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=3Dtrue
+ shift
+ continue;;
+
+ -m) chmodcmd=3D"$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd=3D"$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd=3D"$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=3D"$stripprog"
+ shift
+ continue;;
+
+ -t=3D*) transformarg=3D`echo $1 | sed 's/-t=3D//'`
+ shift
+ continue;;
+
+ -b=3D*) transformbasename=3D`echo $1 | sed 's/-b=3D//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" =3D x ]
+ then
+ src=3D$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=3D$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" =3D x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ :
+fi
+
+if [ x"$dir_arg" !=3D x ]; then
+ dst=3D$src
+ src=3D""
+=09
+ if [ -d $dst ]; then
+ instcmd=3D:
+ chmodcmd=3D""
+ else
+ instcmd=3D$mkdirprog
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad=20
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ :
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+=09
+ if [ x"$dst" =3D x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ :
+ fi
+
+# If destination is a directory, append the input filename; if your syst=
em
+# does not like double slashes in filenames, you may need to add some lo=
gic
+
+ if [ -d $dst ]
+ then
+ dst=3D"$dst"/`basename $src`
+ else
+ :
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=3D`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS=3D'
+ '
+IFS=3D"${IFS-${defaultIFS}}"
+
+oIFS=3D"${IFS}"
+# Some sh's can't handle IFS=3D/ for some reason.
+IFS=3D'%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=3D"${oIFS}"
+
+pathcomp=3D''
+
+while [ $# -ne 0 ] ; do
+ pathcomp=3D"${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ :
+ fi
+
+ pathcomp=3D"${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" !=3D x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" !=3D x ]; then $doit $chowncmd $dst; else : ; fi &&
+ if [ x"$chgrpcmd" !=3D x ]; then $doit $chgrpcmd $dst; else : ; fi &&
+ if [ x"$stripcmd" !=3D x ]; then $doit $stripcmd $dst; else : ; fi &&
+ if [ x"$chmodcmd" !=3D x ]; then $doit $chmodcmd $dst; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" =3D x ]=20
+ then
+ dstfile=3D`basename $dst`
+ else
+ dstfile=3D`basename $dst $transformbasename |=20
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" =3D x ]=20
+ then
+ dstfile=3D`basename $dst`
+ else
+ :
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=3D$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# 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 $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" !=3D x ]; then $doit $chowncmd $dsttmp; else :;fi &&
+ if [ x"$chgrpcmd" !=3D x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
+ if [ x"$stripcmd" !=3D x ]; then $doit $stripcmd $dsttmp; else :;fi &&
+ if [ x"$chmodcmd" !=3D x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile=20
+
+fi &&
+
+
+exit 0
Added: trunk/DvdMenuXtractor/dmx/libdvdread/libdvdread.proj
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/libdvdread.proj 2007-03-10 21:38=
:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/libdvdread.proj 2007-03-10 21:41=
:34 UTC (rev 1290)
@@ -0,0 +1,11 @@
+#include "*/*.proj"
+
+WORKSPACE dvdread
+{
+ USE dvdread
+ USE disc_id
+ USE filestat
+ USE ifo_dump
+ USE play_title
+ USE title_info
+}
Added: trunk/DvdMenuXtractor/dmx/libdvdread/ltmain.sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/ltmain.sh 2007-03-10 21:38:29 UT=
C (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/ltmain.sh 2007-03-10 21:41:34 UT=
C (rev 1290)
@@ -0,0 +1,4984 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun conf=
igure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 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., 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.
+
+# Check that we have a working $echo.
+if test "X$1" =3D X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" =3D X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" =3D '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
+
+if test "X$1" =3D X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+fi
+
+# The name of this program.
+progname=3D`$echo "$0" | sed 's%^.*/%%'`
+modename=3D"$progname"
+
+# Constants.
+PROGRAM=3Dltmain.sh
+PACKAGE=3Dlibtool
+VERSION=3D1.4.2
+TIMESTAMP=3D" (1.922.2.53 2001/09/11 03:18:52)"
+
+default_mode=3D
+help=3D"Try \`$progname --help' for more information."
+magic=3D"%%%MAGIC variable%%%"
+mkdir=3D"mkdir"
+mv=3D"mv -f"
+rm=3D"rm -f"
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed=3D'sed -e 1s/^X//'
+sed_quote_subst=3D's/\([\\`\\"$\\\\]\)/\\\1/g'
+SP2NL=3D'tr \040 \012'
+NL2SP=3D'tr \015\012 \040\040'
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understa=
nd
+# e.g. LANG=3DC (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" =3D set; then
+ save_LC_ALL=3D"$LC_ALL"; LC_ALL=3DC; export LC_ALL
+fi
+if test "${LANG+set}" =3D set; then
+ save_LANG=3D"$LANG"; LANG=3DC; export LANG
+fi
+
+# Make sure IFS has a sensible default
+: ${IFS=3D" "}
+
+if test "$build_libtool_libs" !=3D yes && test "$build_old_libs" !=3D ye=
s; then
+ echo "$modename: not configured to build any kind of library" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more infor=
mation." 1>&2
+ exit 1
+fi
+
+# Global variables.
+mode=3D$default_mode
+nonopt=3D
+prev=3D
+prevopt=3D
+run=3D
+show=3D"$echo"
+show_help=3D
+execute_dlfiles=3D
+lo2o=3D"s/\\.lo\$/.${objext}/"
+o2lo=3D"s/\\.${objext}\$/.lo/"
+
+# Parse our command line options once, thoroughly.
+while test $# -gt 0
+do
+ arg=3D"$1"
+ shift
+
+ case $arg in
+ -*=3D*) optarg=3D`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=3D//'` ;;
+ *) optarg=3D ;;
+ esac
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ execute_dlfiles)
+ execute_dlfiles=3D"$execute_dlfiles $arg"
+ ;;
+ *)
+ eval "$prev=3D\$arg"
+ ;;
+ esac
+
+ prev=3D
+ prevopt=3D
+ continue
+ fi
+
+ # Have we seen a non-optional argument yet?
+ case $arg in
+ --help)
+ show_help=3Dyes
+ ;;
+
+ --version)
+ echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+ exit 0
+ ;;
+
+ --config)
+ sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CO=
NFIG/,$d' $0
+ exit 0
+ ;;
+
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
+ --dry-run | -n)
+ run=3D:
+ ;;
+
+ --features)
+ echo "host: $host"
+ if test "$build_libtool_libs" =3D yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" =3D yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+ exit 0
+ ;;
+
+ --finish) mode=3D"finish" ;;
+
+ --mode) prevopt=3D"--mode" prev=3Dmode ;;
+ --mode=3D*) mode=3D"$optarg" ;;
+
+ --quiet | --silent)
+ show=3D:
+ ;;
+
+ -dlopen)
+ prevopt=3D"-dlopen"
+ prev=3Dexecute_dlfiles
+ ;;
+
+ -*)
+ $echo "$modename: unrecognized option \`$arg'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *)
+ nonopt=3D"$arg"
+ break
+ ;;
+ esac
+done
+
+if test -n "$prevopt"; then
+ $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+fi
+
+# 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=3D
+
+if test -z "$show_help"; then
+
+ # Infer the operation mode.
+ if test -z "$mode"; then
+ case $nonopt in
+ *cc | *++ | gcc* | *-gcc*)
+ mode=3Dlink
+ for arg
+ do
+ case $arg in
+ -c)
+ mode=3Dcompile
+ break
+ ;;
+ esac
+ done
+ ;;
+ *db | *dbx | *strace | *truss)
+ mode=3Dexecute
+ ;;
+ *install*|cp|mv)
+ mode=3Dinstall
+ ;;
+ *rm)
+ mode=3Duninstall
+ ;;
+ *)
+ # If we have no mode, but dlfiles were specified, then do execute =
mode.
+ test -n "$execute_dlfiles" && mode=3Dexecute
+
+ # 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-A=
RGS" 1>&2
+ fi
+ fi
+ ;;
+ esac
+ fi
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" !=3D execute; then
+ $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help=3D"$help"
+ help=3D"Try \`$modename --help --mode=3D$mode' for more information."
+
+ # These modes are in order of execution frequency so that they run qui=
ckly.
+ case $mode in
+ # libtool compile mode
+ compile)
+ modename=3D"$modename: compile"
+ # Get the compilation command and the source file.
+ base_compile=3D
+ prev=3D
+ lastarg=3D
+ srcfile=3D"$nonopt"
+ suppress_output=3D
+
+ user_target=3Dno
+ for arg
+ do
+ case $prev in
+ "") ;;
+ xcompiler)
+ # Aesthetically quote the previous argument.
+ prev=3D
+ lastarg=3D`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+
+ case $arg in
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg=3D"\"$arg\""
+ ;;
+ esac
+
+ # Add the previous argument to base_compile.
+ if test -z "$base_compile"; then
+ base_compile=3D"$lastarg"
+ else
+ base_compile=3D"$base_compile $lastarg"
+ fi
+ continue
+ ;;
+ esac
+
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ if test "$user_target" !=3D "no"; then
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+ exit 1
+ fi
+ user_target=3Dnext
+ ;;
+
+ -static)
+ build_old_libs=3Dyes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=3Dyes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=3Dno
+ continue
+ ;;
+
+ -Xcompiler)
+ prev=3Dxcompiler
+ continue
+ ;;
+
+ -Wc,*)
+ args=3D`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+ lastarg=3D
+ save_ifs=3D"$IFS"; IFS=3D','
+ for arg in $args; do
+ IFS=3D"$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=3D"\"$arg\""
+ ;;
+ esac
+ lastarg=3D"$lastarg $arg"
+ done
+ IFS=3D"$save_ifs"
+ lastarg=3D`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+ # Add the arguments to base_compile.
+ if test -z "$base_compile"; then
+ base_compile=3D"$lastarg"
+ else
+ base_compile=3D"$base_compile $lastarg"
+ fi
+ continue
+ ;;
+ esac
+
+ case $user_target in
+ next)
+ # The next one is the -o target name
+ user_target=3Dyes
+ continue
+ ;;
+ yes)
+ # We got the output file
+ user_target=3Dset
+ libobj=3D"$arg"
+ continue
+ ;;
+ esac
+
+ # Accept the current argument as the source file.
+ lastarg=3D"$srcfile"
+ srcfile=3D"$arg"
+
+ # Aesthetically quote the previous argument.
+
+ # Backslashify any backslashes, double quotes, and dollar signs.
+ # These are the only characters that are still specially
+ # interpreted inside of double-quoted scrings.
+ lastarg=3D`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ case $lastarg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ lastarg=3D"\"$lastarg\""
+ ;;
+ esac
+
+ # Add the previous argument to base_compile.
+ if test -z "$base_compile"; then
+ base_compile=3D"$lastarg"
+ else
+ base_compile=3D"$base_compile $lastarg"
+ fi
+ done
+
+ case $user_target in
+ set)
+ ;;
+ no)
+ # Get the name of the library object.
+ libobj=3D`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ ;;
+ *)
+ $echo "$modename: you must specify a target with \`-o'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ xform=3D'[cCFSfmso]'
+ case $libobj in
+ *.ada) xform=3Dada ;;
+ *.adb) xform=3Dadb ;;
+ *.ads) xform=3Dads ;;
+ *.asm) xform=3Dasm ;;
+ *.c++) xform=3Dc++ ;;
+ *.cc) xform=3Dcc ;;
+ *.cpp) xform=3Dcpp ;;
+ *.cxx) xform=3Dcxx ;;
+ *.f90) xform=3Df90 ;;
+ *.for) xform=3Dfor ;;
+ esac
+
+ libobj=3D`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+ case $libobj in
+ *.lo) obj=3D`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+ *)
+ $echo "$modename: cannot determine name of library object from \`$=
libobj'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test -z "$base_compile"; then
+ $echo "$modename: you must specify a compilation command" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" =3D yes; then
+ removelist=3D"$obj $libobj"
+ else
+ removelist=3D"$libobj"
+ fi
+
+ $run $rm $removelist
+ trap "$run $rm $removelist; exit 1" 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=3Ddefault
+ ;;
+ esac
+ if test $pic_mode =3D no && test "$deplibs_check_method" !=3D pass_a=
ll; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=3Ddefault
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" =3D no; then
+ output_obj=3D`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]=
*$%%'`.${objext}
+ lockfile=3D"$output_obj.lock"
+ removelist=3D"$removelist $output_obj $lockfile"
+ trap "$run $rm $removelist; exit 1" 1 2 15
+ else
+ need_locks=3Dno
+ lockfile=3D
+ 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" =3D yes; then
+ until $run ln "$0" "$lockfile" 2>/dev/null; do
+ $show "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" =3D 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 1
+ fi
+ echo $srcfile > "$lockfile"
+ fi
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=3D\"$fix_srcfile_path\"
+ fi
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" =3D yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=3D$base_compile
+
+ if test "$pic_mode" !=3D no; then
+ # All platforms use -DPIC, to notify preprocessed assembler code.
+ command=3D"$base_compile $srcfile $pic_flag -DPIC"
+ else
+ # Don't build PIC code
+ command=3D"$base_compile $srcfile"
+ fi
+ if test "$build_old_libs" =3D yes; then
+ lo_libobj=3D"$libobj"
+ dir=3D`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" =3D "X$libobj"; then
+ dir=3D"$objdir"
+ else
+ dir=3D"$dir/$objdir"
+ fi
+ libobj=3D"$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+
+ if test -d "$dir"; then
+ $show "$rm $libobj"
+ $run $rm $libobj
+ else
+ $show "$mkdir $dir"
+ $run $mkdir $dir
+ status=3D$?
+ if test $status -ne 0 && test ! -d $dir; then
+ exit $status
+ fi
+ fi
+ fi
+ if test "$compiler_o_lo" =3D yes; then
+ output_obj=3D"$libobj"
+ command=3D"$command -o $output_obj"
+ elif test "$compiler_c_o" =3D yes; then
+ output_obj=3D"$obj"
+ command=3D"$command -o $output_obj"
+ fi
+
+ $run $rm "$output_obj"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ test -n "$output_obj" && $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" =3D warn &&
+ test x"`cat $lockfile 2>/dev/null`" !=3D 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 1
+ fi
+
+ # Just move the object if needed, then go on to compile the next o=
ne
+ if test x"$output_obj" !=3D x"$libobj"; then
+ $show "$mv $output_obj $libobj"
+ if $run $mv $output_obj $libobj; then :
+ else
+ error=3D$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # If we have no pic_flag, then copy the object into place and fini=
sh.
+ if (test -z "$pic_flag" || test "$pic_mode" !=3D default) &&
+ test "$build_old_libs" =3D yes; then
+ # Rename the .lo from within objdir to obj
+ if test -f $obj; then
+ $show $rm $obj
+ $run $rm $obj
+ fi
+
+ $show "$mv $libobj $obj"
+ if $run $mv $libobj $obj; then :
+ else
+ error=3D$?
+ $run $rm $removelist
+ exit $error
+ fi
+
+ xdir=3D`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" =3D "X$obj"; then
+ xdir=3D"."
+ else
+ xdir=3D"$xdir"
+ fi
+ baseobj=3D`$echo "X$obj" | $Xsed -e "s%.*/%%"`
+ libobj=3D`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+ # Now arrange that obj and lo_libobj become the same file
+ $show "(cd $xdir && $LN_S $baseobj $libobj)"
+ if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
+ # Unlock the critical section if it was locked
+ if test "$need_locks" !=3D no; then
+ $run $rm "$lockfile"
+ fi
+ exit 0
+ else
+ error=3D$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Allow error messages only from the first compilation.
+ suppress_output=3D' >/dev/null 2>&1'
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" =3D yes; then
+ if test "$pic_mode" !=3D yes; then
+ # Don't build PIC code
+ command=3D"$base_compile $srcfile"
+ else
+ # All platforms use -DPIC, to notify preprocessed assembler code.
+ command=3D"$base_compile $srcfile $pic_flag -DPIC"
+ fi
+ if test "$compiler_c_o" =3D yes; then
+ command=3D"$command -o $obj"
+ output_obj=3D"$obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command=3D"$command$suppress_output"
+ $run $rm "$output_obj"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" =3D warn &&
+ test x"`cat $lockfile 2>/dev/null`" !=3D 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 1
+ fi
+
+ # Just move the object if needed
+ if test x"$output_obj" !=3D x"$obj"; then
+ $show "$mv $output_obj $obj"
+ if $run $mv $output_obj $obj; then :
+ else
+ error=3D$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we do not
+ # accidentally link it into a program.
+ if test "$build_libtool_libs" !=3D yes; then
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > \$libobj" || exit $?
+ else
+ # Move the .lo from within objdir
+ $show "$mv $libobj $lo_libobj"
+ if $run $mv $libobj $lo_libobj; then :
+ else
+ error=3D$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+ fi
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" !=3D no; then
+ $run $rm "$lockfile"
+ fi
+
+ exit 0
+ ;;
+
+ # libtool link mode
+ link | relink)
+ modename=3D"$modename: link"
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invokation.
+ # allow_undefined=3Dno
+
+ # FIXME: Unfortunately, there are problems with the above when try=
ing
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static librar=
y.
+ allow_undefined=3Dyes
+ ;;
+ *)
+ allow_undefined=3Dyes
+ ;;
+ esac
+ libtool_args=3D"$nonopt"
+ compile_command=3D"$nonopt"
+ finalize_command=3D"$nonopt"
+
+ compile_rpath=3D
+ finalize_rpath=3D
+ compile_shlibpath=3D
+ finalize_shlibpath=3D
+ convenience=3D
+ old_convenience=3D
+ deplibs=3D
+ old_deplibs=3D
+ compiler_flags=3D
+ linker_flags=3D
+ dllsearchpath=3D
+ lib_search_path=3D`pwd`
+
+ avoid_version=3Dno
+ dlfiles=3D
+ dlprefiles=3D
+ dlself=3Dno
+ export_dynamic=3Dno
+ export_symbols=3D
+ export_symbols_regex=3D
+ generated=3D
+ libobjs=3D
+ ltlibs=3D
+ module=3Dno
+ no_install=3Dno
+ objs=3D
+ prefer_static_libs=3Dno
+ preload=3Dno
+ prev=3D
+ prevarg=3D
+ release=3D
+ rpath=3D
+ xrpath=3D
+ perm_rpath=3D
+ temp_rpath=3D
+ thread_safe=3Dno
+ vinfo=3D
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -all-static | -static)
+ if test "X$arg" =3D "X-all-static"; then
+ if test "$build_libtool_libs" =3D yes && test -z "$link_static_flag";=
then
+ $echo "$modename: warning: complete static linking is impossible in=
this configuration" 1>&2
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=3D$dlopen_self_static
+ fi
+ else
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=3D$dlopen_self_static
+ fi
+ fi
+ build_libtool_libs=3Dno
+ build_old_libs=3Dyes
+ prefer_static_libs=3Dyes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=3Dyes
+
+ # Go through the arguments, transforming them on the way.
+ while test $# -gt 0; do
+ arg=3D"$1"
+ shift
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ qarg=3D\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite:=
skip nested quoting test
+ ;;
+ *) qarg=3D$arg ;;
+ esac
+ libtool_args=3D"$libtool_args $qarg"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ compile_command=3D"$compile_command @OUTPUT@"
+ finalize_command=3D"$finalize_command @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ dlfiles|dlprefiles)
+ if test "$preload" =3D no; then
+ # Add the symbol object into the linking commands.
+ compile_command=3D"$compile_command @SYMFILE@"
+ finalize_command=3D"$finalize_command @SYMFILE@"
+ preload=3Dyes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" =3D no; then
+ dlself=3Dneedless
+ export_dynamic=3Dyes
+ fi
+ prev=3D
+ continue
+ ;;
+ self)
+ if test "$prev" =3D dlprefiles; then
+ dlself=3Dyes
+ elif test "$prev" =3D dlfiles && test "$dlopen_self" !=3D yes; then
+ dlself=3Dyes
+ else
+ dlself=3Dneedless
+ export_dynamic=3Dyes
+ fi
+ prev=3D
+ continue
+ ;;
+ *)
+ if test "$prev" =3D dlfiles; then
+ dlfiles=3D"$dlfiles $arg"
+ else
+ dlprefiles=3D"$dlprefiles $arg"
+ fi
+ prev=3D
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols=3D"$arg"
+ if test ! -f "$arg"; then
+ $echo "$modename: symbol file \`$arg' does not exist"
+ exit 1
+ fi
+ prev=3D
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex=3D"$arg"
+ prev=3D
+ continue
+ ;;
+ release)
+ release=3D"-$arg"
+ prev=3D
+ 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 1
+ ;;
+ esac
+ if test "$prev" =3D rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath=3D"$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath=3D"$xrpath $arg" ;;
+ esac
+ fi
+ prev=3D
+ continue
+ ;;
+ xcompiler)
+ compiler_flags=3D"$compiler_flags $qarg"
+ prev=3D
+ compile_command=3D"$compile_command $qarg"
+ finalize_command=3D"$finalize_command $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags=3D"$linker_flags $qarg"
+ compiler_flags=3D"$compiler_flags $wl$qarg"
+ prev=3D
+ compile_command=3D"$compile_command $wl$qarg"
+ finalize_command=3D"$finalize_command $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=3D\"\$arg\""
+ prev=3D
+ continue
+ ;;
+ esac
+ fi # test -n $prev
+
+ prevarg=3D"$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ compile_command=3D"$compile_command $link_static_flag"
+ finalize_command=3D"$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 d=
efault" 1>&2
+ continue
+ ;;
+
+ -avoid-version)
+ avoid_version=3Dyes
+ continue
+ ;;
+
+ -dlopen)
+ prev=3Ddlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=3Ddlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=3Dyes
+ 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 all=
owed"
+ exit 1
+ fi
+ if test "X$arg" =3D "X-export-symbols"; then
+ prev=3Dexpsyms
+ else
+ prev=3Dexpsyms_regex
+ fi
+ 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*)
+ compile_command=3D"$compile_command $arg"
+ finalize_command=3D"$finalize_command $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ dir=3D`$echo "X$arg" | $Xsed -e 's/^-L//'`
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=3D`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: cannot determine absolute directory name of \`$di=
r'" 1>&2
+ exit 1
+ fi
+ dir=3D"$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs=3D"$deplibs -L$dir"
+ lib_search_path=3D"$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ *) dllsearchpath=3D"$dllsearchpath:$dir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" =3D "X-lc" || test "X$arg" =3D "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-mingw* | *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" =3D "X-lc" && continue
+ ;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" =3D "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" =3D "X-lc_r"; then
+ case $host in
+ *-*-openbsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs=3D"$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=3Dyes
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=3Dno
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # 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=3Dno
+ ;;
+ *) no_install=3Dyes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=3Dno
+ continue
+ ;;
+
+ -o) prev=3Doutput ;;
+
+ -release)
+ prev=3Drelease
+ continue
+ ;;
+
+ -rpath)
+ prev=3Drpath
+ continue
+ ;;
+
+ -R)
+ prev=3Dxrpath
+ continue
+ ;;
+
+ -R*)
+ dir=3D`$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 1
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath=3D"$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -static)
+ # 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=3Dyes
+ continue
+ ;;
+
+ -version-info)
+ prev=3Dvinfo
+ continue
+ ;;
+
+ -Wc,*)
+ args=3D`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+ arg=3D
+ save_ifs=3D"$IFS"; IFS=3D','
+ for flag in $args; do
+ IFS=3D"$save_ifs"
+ case $flag in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ flag=3D"\"$flag\""
+ ;;
+ esac
+ arg=3D"$arg $wl$flag"
+ compiler_flags=3D"$compiler_flags $flag"
+ done
+ IFS=3D"$save_ifs"
+ arg=3D`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
+ -Wl,*)
+ args=3D`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+ arg=3D
+ save_ifs=3D"$IFS"; IFS=3D','
+ for flag in $args; do
+ IFS=3D"$save_ifs"
+ case $flag in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ flag=3D"\"$flag\""
+ ;;
+ esac
+ arg=3D"$arg $wl$flag"
+ compiler_flags=3D"$compiler_flags $wl$flag"
+ linker_flags=3D"$linker_flags $flag"
+ done
+ IFS=3D"$save_ifs"
+ arg=3D`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
+ -Xcompiler)
+ prev=3Dxcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=3Dxlinker
+ 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=3D`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg=3D"\"$arg\""
+ ;;
+ esac
+ ;;
+
+ *.lo | *.$objext)
+ # A library or standard object.
+ if test "$prev" =3D dlfiles; then
+ # This file was specified with -dlopen.
+ if test "$build_libtool_libs" =3D yes && test "$dlopen_support" =3D y=
es; then
+ dlfiles=3D"$dlfiles $arg"
+ prev=3D
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=3Ddlprefiles
+ fi
+ fi
+
+ if test "$prev" =3D dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles=3D"$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
+ prev=3D
+ else
+ case $arg in
+ *.lo) libobjs=3D"$libobjs $arg" ;;
+ *) objs=3D"$objs $arg" ;;
+ esac
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs=3D"$deplibs $arg"
+ old_deplibs=3D"$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" =3D dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles=3D"$dlfiles $arg"
+ prev=3D
+ elif test "$prev" =3D dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles=3D"$dlprefiles $arg"
+ prev=3D
+ else
+ deplibs=3D"$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=3D`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg=3D"\"$arg\""
+ ;;
+ esac
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ compile_command=3D"$compile_command $arg"
+ finalize_command=3D"$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 1
+ fi
+
+ if test "$export_dynamic" =3D yes && test -n "$export_dynamic_flag_s=
pec"; then
+ eval arg=3D\"$export_dynamic_flag_spec\"
+ compile_command=3D"$compile_command $arg"
+ finalize_command=3D"$finalize_command $arg"
+ fi
+
+ # calculate the name of the file, without its directory
+ outputname=3D`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+ libobjs_save=3D"$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=3D\`\$echo \"X\${$shlibpath_var}\" \| \$Xse=
d -e \'s/:/ /g\'\`
+ else
+ shlib_search_path=3D
+ fi
+ eval sys_lib_search_path=3D\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=3D\"$sys_lib_dlsearch_path_spec\"
+
+ output_objdir=3D`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" =3D "X$output"; then
+ output_objdir=3D"$objdir"
+ else
+ output_objdir=3D"$output_objdir/$objdir"
+ fi
+ # Create the object directory.
+ if test ! -d $output_objdir; then
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=3D$?
+ if test $status -ne 0 && test ! -d $output_objdir; then
+ 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 1
+ ;;
+ *.$libext) linkmode=3Doldlib ;;
+ *.lo | *.$objext) linkmode=3Dobj ;;
+ *.la) linkmode=3Dlib ;;
+ *) linkmode=3Dprog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=3D
+ libs=3D
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ case "$libs " in
+ *" $deplib "*) specialdeplibs=3D"$specialdeplibs $deplib" ;;
+ esac
+ libs=3D"$libs $deplib"
+ done
+ deplibs=3D
+ newdependency_libs=3D
+ newlib_search_path=3D
+ need_relink=3Dno # whether we're linking any uninstalled libtool lib=
raries
+ notinst_deplibs=3D # not-installed libtool libraries
+ notinst_path=3D # paths that contain not-installed libtool libraries
+ case $linkmode in
+ lib)
+ passes=3D"conv link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ $echo "$modename: libraries can \`-dlopen' only libtool libraries: =
$file" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=3D
+ finalize_deplibs=3D
+ alldeplibs=3Dno
+ newdlfiles=3D
+ newdlprefiles=3D
+ passes=3D"conv scan dlopen dlpreopen link"
+ ;;
+ *) passes=3D"conv"
+ ;;
+ esac
+ for pass in $passes; do
+ if test $linkmode =3D prog; then
+ # Determine which files to process
+ case $pass in
+ dlopen)
+ libs=3D"$dlfiles"
+ save_deplibs=3D"$deplibs" # Collect dlpreopened libraries
+ deplibs=3D
+ ;;
+ dlpreopen) libs=3D"$dlprefiles" ;;
+ link) libs=3D"$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ for deplib in $libs; do
+ lib=3D
+ found=3Dno
+ case $deplib in
+ -l*)
+ if test $linkmode =3D oldlib && test $linkmode =3D obj; then
+ $echo "$modename: warning: \`-l' is ignored for archives/objects: $=
deplib" 1>&2
+ continue
+ fi
+ if test $pass =3D conv; then
+ deplibs=3D"$deplib $deplibs"
+ continue
+ fi
+ name=3D`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+ for searchdir in $newlib_search_path $lib_search_path $sys_lib_search=
_path $shlib_search_path; do
+ # Search the libtool library
+ lib=3D"$searchdir/lib${name}.la"
+ if test -f "$lib"; then
+ found=3Dyes
+ break
+ fi
+ done
+ if test "$found" !=3D yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" =3D "prog,link"; then
+ compile_deplibs=3D"$deplib $compile_deplibs"
+ finalize_deplibs=3D"$deplib $finalize_deplibs"
+ else
+ deplibs=3D"$deplib $deplibs"
+ test $linkmode =3D lib && newdependency_libs=3D"$deplib $newdepen=
dency_libs"
+ fi
+ continue
+ fi
+ ;; # -l
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs=3D"$deplib $deplibs"
+ test $pass =3D conv && continue
+ newdependency_libs=3D"$deplib $newdependency_libs"
+ newlib_search_path=3D"$newlib_search_path "`$echo "X$deplib" | $Xse=
d -e 's/^-L//'`
+ ;;
+ prog)
+ if test $pass =3D conv; then
+ deplibs=3D"$deplib $deplibs"
+ continue
+ fi
+ if test $pass =3D scan; then
+ deplibs=3D"$deplib $deplibs"
+ newlib_search_path=3D"$newlib_search_path "`$echo "X$deplib" | $X=
sed -e 's/^-L//'`
+ else
+ compile_deplibs=3D"$deplib $compile_deplibs"
+ finalize_deplibs=3D"$deplib $finalize_deplibs"
+ fi
+ ;;
+ *)
+ $echo "$modename: warning: \`-L' is ignored for archives/objects: $=
deplib" 1>&2
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test $pass =3D link; then
+ dir=3D`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath=3D"$xrpath $dir" ;;
+ esac
+ fi
+ deplibs=3D"$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib=3D"$deplib" ;;
+ *.$libext)
+ if test $pass =3D conv; then
+ deplibs=3D"$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ if test "$deplibs_check_method" !=3D pass_all; then
+ echo
+ echo "*** Warning: This library needs some functionality provided=
by $deplib."
+ echo "*** I have the capability to make that library automaticall=
y link in when"
+ echo "*** you link to this library. But I can only do this if yo=
u have a"
+ echo "*** shared version of the library, which you do not appear =
to have."
+ else
+ echo
+ echo "*** Warning: Linking the shared library $output against the=
"
+ echo "*** static library $deplib is not portable!"
+ deplibs=3D"$deplib $deplibs"
+ fi
+ continue
+ ;;
+ prog)
+ if test $pass !=3D link; then
+ deplibs=3D"$deplib $deplibs"
+ else
+ compile_deplibs=3D"$deplib $compile_deplibs"
+ finalize_deplibs=3D"$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test $pass =3D dlpreopen || test "$dlopen_support" !=3D yes || tes=
t "$build_libtool_libs" =3D no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles=3D"$newdlprefiles $deplib"
+ compile_deplibs=3D"$deplib $compile_deplibs"
+ finalize_deplibs=3D"$deplib $finalize_deplibs"
+ else
+ newdlfiles=3D"$newdlfiles $deplib"
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=3Dyes
+ continue
+ ;;
+ esac # case $deplib
+ if test $found =3D yes || test -f "$lib"; then :
+ else
+ $echo "$modename: cannot find the library \`$lib'" 1>&2
+ exit 1
+ fi
+
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2=
>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+
+ ladir=3D`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$ladir" =3D "X$lib" && ladir=3D"."
+
+ dlname=3D
+ dlopen=3D
+ dlpreopen=3D
+ libdir=3D
+ library_names=3D
+ old_library=3D
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variable installed.
+ installed=3Dyes
+
+ # Read the .la file
+ case $lib in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+
+ if test "$linkmode,$pass" =3D "lib,link" ||
+ test "$linkmode,$pass" =3D "prog,scan" ||
+ { test $linkmode =3D oldlib && test $linkmode =3D obj; }; then
+ # Add dl[pre]opened files of deplib
+ test -n "$dlopen" && dlfiles=3D"$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles=3D"$dlprefiles $dlpreopen"
+ fi
+
+ if test $pass =3D conv; then
+ # Only check for convenience libraries
+ deplibs=3D"$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 1
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ convenience=3D"$convenience $ladir/$objdir/$old_library"
+ old_convenience=3D"$old_convenience $ladir/$objdir/$old_library"
+ tmp_libs=3D
+ for deplib in $dependency_libs; do
+ deplibs=3D"$deplib $deplibs"
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs=3D"$specialdeplibs $deplib" ;;
+ esac
+ tmp_libs=3D"$tmp_libs $deplib"
+ done
+ elif test $linkmode !=3D prog && test $linkmode !=3D lib; then
+ $echo "$modename: \`$lib' is not a convenience library" 1>&2
+ exit 1
+ fi
+ continue
+ fi # $pass =3D conv
+
+ # Get the name of the library we link against.
+ linklib=3D
+ for l in $old_library $library_names; do
+ linklib=3D"$l"
+ done
+ if test -z "$linklib"; then
+ $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+ exit 1
+ fi
+
+ # This library was specified with -dlopen.
+ if test $pass =3D dlopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>=
&2
+ exit 1
+ fi
+ if test -z "$dlname" || test "$dlopen_support" !=3D yes || test "$bui=
ld_libtool_libs" =3D no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload.
+ dlprefiles=3D"$dlprefiles $lib"
+ else
+ newdlfiles=3D"$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass =3D dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=3D"$ladir" ;;
+ *)
+ abs_ladir=3D`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 m=
ight fail" 1>&2
+ abs_ladir=3D"$ladir"
+ fi
+ ;;
+ esac
+ laname=3D`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" =3D Xyes; then
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; the=
n
+ $echo "$modename: warning: library \`$lib' was moved." 1>&2
+ dir=3D"$ladir"
+ absdir=3D"$abs_ladir"
+ libdir=3D"$abs_ladir"
+ else
+ dir=3D"$libdir"
+ absdir=3D"$libdir"
+ fi
+ else
+ dir=3D"$ladir/$objdir"
+ absdir=3D"$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path=3D"$notinst_path $abs_ladir"
+ fi # $installed =3D yes
+ name=3D`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+ # This library was specified with -dlpreopen.
+ if test $pass =3D dlpreopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'"=
1>&2
+ exit 1
+ fi
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles=3D"$newdlprefiles $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles=3D"$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles=3D"$newdlprefiles $dir/$linklib"
+ fi
+ fi # $pass =3D dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test $linkmode =3D lib; then
+ deplibs=3D"$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" =3D "prog,link"; then
+ compile_deplibs=3D"$dir/$old_library $compile_deplibs"
+ finalize_deplibs=3D"$dir/$old_library $finalize_deplibs"
+ else
+ deplibs=3D"$lib $deplibs"
+ fi
+ continue
+ fi
+
+ if test $linkmode =3D prog && test $pass !=3D link; then
+ newlib_search_path=3D"$newlib_search_path $ladir"
+ deplibs=3D"$lib $deplibs"
+
+ linkalldeplibs=3Dno
+ if test "$link_all_deplibs" !=3D no || test -z "$library_names" ||
+ test "$build_libtool_libs" =3D no; then
+ linkalldeplibs=3Dyes
+ fi
+
+ tmp_libs=3D
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) newlib_search_path=3D"$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 =3D yes; then
+ deplibs=3D"$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs=3D"$deplib $newdependency_libs"
+ fi
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs=3D"$specialdeplibs $deplib" ;;
+ esac
+ tmp_libs=3D"$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode =3D prog...
+
+ link_static=3Dno # Whether the deplib will be linked statically
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" =3D no || test -z "$old_library"; }; th=
en
+ # Link against this shared library
+
+ if test "$linkmode,$pass" =3D "prog,link" ||
+ { test $linkmode =3D lib && test $hardcode_into_libs =3D yes; }; the=
n
+ # 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=3D"$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath=3D"$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ if test $linkmode =3D prog; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *" $absdir "*) ;;
+ *) temp_rpath=3D"$temp_rpath $dir" ;;
+ esac
+ fi
+ fi
+ fi # $linkmode,$pass =3D prog,link...
+
+ if test "$alldeplibs" =3D yes &&
+ { test "$deplibs_check_method" =3D pass_all ||
+ { test "$build_libtool_libs" =3D yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+
+ if test "$installed" =3D no; then
+ notinst_deplibs=3D"$notinst_deplibs $lib"
+ need_relink=3Dyes
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ realname=3D"$2"
+ shift; shift
+ libname=3D`eval \\$echo \"$libname_spec\"`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname=3D"$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin*)
+ major=3D`expr $current - $age`
+ versuffix=3D"-$major"
+ ;;
+ esac
+ eval soname=3D\"$soname_spec\"
+ else
+ soname=3D"$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot=3D"$soname"
+ soname=3D`echo $soroot | sed -e 's/^.*\///'`
+ newlib=3D"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=3D"$IFS"; IFS=3D'~'
+ eval cmds=3D\"$extract_expsyms_cmds\"
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS=3D"$save_ifs"
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ $show "generating import library for \`$soname'"
+ save_ifs=3D"$IFS"; IFS=3D'~'
+ eval cmds=3D\"$old_archive_from_expsyms_cmds\"
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS=3D"$save_ifs"
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=3D$output_objdir
+ linklib=3D$newlib
+ fi # test -n $old_archive_from_expsyms_cmds
+
+ if test $linkmode =3D prog || test "$mode" !=3D relink; then
+ add_shlibpath=3D
+ add_dir=3D
+ add=3D
+ lib_linked=3Dyes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" =3D no; then
+ add=3D"$dir/$linklib"
+ elif test "$hardcode_minus_L" =3D no; then
+ case $host in
+ *-*-sunos*) add_shlibpath=3D"$dir" ;;
+ esac
+ add_dir=3D"-L$dir"
+ add=3D"-l$name"
+ elif test "$hardcode_shlibpath_var" =3D no; then
+ add_shlibpath=3D"$dir"
+ add=3D"-l$name"
+ else
+ lib_linked=3Dno
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" =3D yes; then
+ add=3D"$dir/$linklib"
+ elif test "$hardcode_minus_L" =3D yes; then
+ add_dir=3D"-L$dir"
+ add=3D"-l$name"
+ elif test "$hardcode_shlibpath_var" =3D yes; then
+ add_shlibpath=3D"$dir"
+ add=3D"-l$name"
+ else
+ lib_linked=3Dno
+ fi
+ ;;
+ *) lib_linked=3Dno ;;
+ esac
+
+ if test "$lib_linked" !=3D yes; then
+ $echo "$modename: configuration error: unsupported hardcode prope=
rties"
+ exit 1
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath=3D"$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+ if test $linkmode =3D prog; then
+ test -n "$add_dir" && compile_deplibs=3D"$add_dir $compile_deplib=
s"
+ test -n "$add" && compile_deplibs=3D"$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs=3D"$add_dir $deplibs"
+ test -n "$add" && deplibs=3D"$add $deplibs"
+ if test "$hardcode_direct" !=3D yes && \
+ test "$hardcode_minus_L" !=3D yes && \
+ test "$hardcode_shlibpath_var" =3D yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath=3D"$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test $linkmode =3D prog || test "$mode" =3D relink; then
+ add_shlibpath=3D
+ add_dir=3D
+ add=3D
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" =3D yes; then
+ add=3D"$libdir/$linklib"
+ elif test "$hardcode_minus_L" =3D yes; then
+ add_dir=3D"-L$libdir"
+ add=3D"-l$name"
+ elif test "$hardcode_shlibpath_var" =3D yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath=3D"$finalize_shlibpath$libdir:" ;;
+ esac
+ add=3D"-l$name"
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir=3D"-L$libdir"
+ add=3D"-l$name"
+ fi
+
+ if test $linkmode =3D prog; then
+ test -n "$add_dir" && finalize_deplibs=3D"$add_dir $finalize_depl=
ibs"
+ test -n "$add" && finalize_deplibs=3D"$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs=3D"$add_dir $deplibs"
+ test -n "$add" && deplibs=3D"$add $deplibs"
+ fi
+ fi
+ elif test $linkmode =3D prog; then
+ if test "$alldeplibs" =3D yes &&
+ { test "$deplibs_check_method" =3D pass_all ||
+ { test "$build_libtool_libs" =3D yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+
+ # Try to link the static library
+ # 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" !=3D unsupported; then
+ test -n "$old_library" && linklib=3D"$old_library"
+ compile_deplibs=3D"$dir/$linklib $compile_deplibs"
+ finalize_deplibs=3D"$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs=3D"-l$name -L$dir $compile_deplibs"
+ finalize_deplibs=3D"-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" =3D yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" !=3D 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 library needs some functionality provided b=
y $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" =3D yes; then
+ echo "*** Therefore, libtool will create a static module, that sh=
ould work "
+ echo "*** as long as the dlopening 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 useles=
s."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" =3D no; then
+ build_libtool_libs=3Dmodule
+ build_old_libs=3Dyes
+ else
+ build_libtool_libs=3Dno
+ fi
+ fi
+ else
+ convenience=3D"$convenience $dir/$old_library"
+ old_convenience=3D"$old_convenience $dir/$old_library"
+ deplibs=3D"$dir/$old_library $deplibs"
+ link_static=3Dyes
+ fi
+ fi # link shared/static library?
+
+ if test $linkmode =3D lib; then
+ if test -n "$dependency_libs" &&
+ { test $hardcode_into_libs !=3D yes || test $build_old_libs =3D ye=
s ||
+ test $link_static =3D yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=3D
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) temp_xrpath=3D`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath=3D"$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs=3D"$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs=3D"$temp_deplibs"
+ fi
+
+ newlib_search_path=3D"$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" =3D no && newdependency_libs=3D"$abs_ladir/$lanam=
e $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=3D
+ for deplib in $dependency_libs; do
+ newdependency_libs=3D"$deplib $newdependency_libs"
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs=3D"$specialdeplibs $deplib" ;;
+ esac
+ tmp_libs=3D"$tmp_libs $deplib"
+ done
+
+ if test $link_all_deplibs !=3D no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) path=3D"$deplib" ;;
+ *.la)
+ dir=3D`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" =3D "X$deplib" && dir=3D"."
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir=3D"$dir" ;;
+ *)
+ absdir=3D`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: warning: cannot determine absolute directory nam=
e of \`$dir'" 1>&2
+ absdir=3D"$dir"
+ fi
+ ;;
+ esac
+ if grep "^installed=3Dno" $deplib > /dev/null; then
+ path=3D"-L$absdir/$objdir"
+ else
+ eval libdir=3D`sed -n -e 's/^libdir=3D\(.*\)$/\1/p' $deplib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ if test "$absdir" !=3D "$libdir"; then
+ $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+ fi
+ path=3D"-L$absdir"
+ fi
+ ;;
+ *) continue ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs=3D"$deplibs $path" ;;
+ esac
+ done
+ fi # link_all_deplibs !=3D no
+ fi # linkmode =3D lib
+ done # for deplib in $libs
+ if test $pass =3D dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs=3D"$deplib $deplibs"
+ done
+ fi
+ if test $pass !=3D dlopen; then
+ test $pass !=3D scan && dependency_libs=3D"$newdependency_libs"
+ if test $pass !=3D conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=3D
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path=3D"$lib_search_path $dir" ;;
+ esac
+ done
+ newlib_search_path=3D
+ fi
+
+ if test "$linkmode,$pass" !=3D "prog,link"; then
+ vars=3D"deplibs"
+ else
+ vars=3D"compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=3D\"\$$var\"
+ new_libs=3D
+ for deplib in $tmp_libs; do
+ case $deplib in
+ -L*) new_libs=3D"$deplib $new_libs" ;;
+ *)
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs=3D"$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs=3D"$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=3D
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs=3D"$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs=3D"$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=3D\"$tmp_libs\"
+ done # for var
+ fi
+ if test "$pass" =3D "conv" &&
+ { test "$linkmode" =3D "lib" || test "$linkmode" =3D "prog"; }; t=
hen
+ libs=3D"$deplibs" # reset libs
+ deplibs=3D
+ fi
+ done # for pass
+ if test $linkmode =3D prog; then
+ dlfiles=3D"$newdlfiles"
+ dlprefiles=3D"$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" !=3D 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' 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"; t=
hen
+ $echo "$modename: warning: \`-export-symbols' is ignored for archives" =
1>&2
+ fi
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=3Dno
+ oldlibs=3D"$output"
+ objs=3D"$objs$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ name=3D`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ eval libname=3D\"$libname_spec\"
+ ;;
+ *)
+ if test "$module" =3D no; then
+ $echo "$modename: libtool library \`$output' must begin with \`lib'" =
1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ if test "$need_lib_prefix" !=3D no; then
+ # Add the "lib" prefix for modules if required
+ name=3D`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ eval libname=3D\"$libname_spec\"
+ else
+ libname=3D`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" !=3D pass_all; then
+ $echo "$modename: cannot build libtool library \`$output' from non-li=
btool objects on this host:$objs" 2>&1
+ exit 1
+ else
+ echo
+ echo "*** Warning: Linking the shared library $output against the non=
-libtool"
+ echo "*** objects $objs is not portable!"
+ libobjs=3D"$libobjs $objs"
+ fi
+ fi
+
+ if test "$dlself" !=3D no; then
+ $echo "$modename: warning: \`-dlopen self' is ignored for libtool libra=
ries" 1>&2
+ fi
+
+ set dummy $rpath
+ if test $# -gt 2; then
+ $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool l=
ibrary" 1>&2
+ fi
+ install_libdir=3D"$2"
+
+ oldlibs=3D
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" =3D yes; then
+ # Building a libtool convenience library.
+ libext=3Dal
+ oldlibs=3D"$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=3Dconvenience
+ build_old_libs=3Dyes
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for convenienc=
e libraries" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for convenience lib=
raries" 1>&2
+ fi
+ else
+
+ # Parse the version information argument.
+ save_ifs=3D"$IFS"; IFS=3D':'
+ set dummy $vinfo 0 0 0
+ IFS=3D"$save_ifs"
+
+ if test -n "$8"; then
+ $echo "$modename: too many parameters to \`-version-info'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ current=3D"$2"
+ revision=3D"$3"
+ age=3D"$4"
+
+ # 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]) ;;
+ *)
+ $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1=
>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case $revision in
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+ *)
+ $echo "$modename: REVISION \`$revision' is not a nonnegative integer"=
1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case $age in
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+ *)
+ $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test $age -gt $current; then
+ $echo "$modename: AGE \`$age' is greater than the current interface n=
umber \`$current'" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ fi
+
+ # Calculate the version variables.
+ major=3D
+ versuffix=3D
+ verstring=3D
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ major=3D.`expr $current - $age`
+ versuffix=3D"$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ minor_current=3D`expr $current + 1`
+ verstring=3D"-compatibility_version $minor_current -current_version $=
minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=3D".$current"
+ versuffix=3D".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=3D".$current"
+ versuffix=3D".$current";
+ ;;
+
+ irix)
+ major=3D`expr $current - $age + 1`
+ verstring=3D"sgi$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=3D$revision
+ while test $loop !=3D 0; do
+ iface=3D`expr $revision - $loop`
+ loop=3D`expr $loop - 1`
+ verstring=3D"sgi$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=3D.$major
+ versuffix=3D"$major.$revision"
+ ;;
+
+ linux)
+ major=3D.`expr $current - $age`
+ versuffix=3D"$major.$age.$revision"
+ ;;
+
+ osf)
+ major=3D`expr $current - $age`
+ versuffix=3D".$current.$age.$revision"
+ verstring=3D"$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=3D$age
+ while test $loop !=3D 0; do
+ iface=3D`expr $current - $loop`
+ loop=3D`expr $loop - 1`
+ verstring=3D"$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring=3D"$verstring:${current}.0"
+ ;;
+
+ sunos)
+ major=3D".$current"
+ versuffix=3D".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ major=3D`expr $current - $age`
+ versuffix=3D"-$major"
+ ;;
+
+ *)
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more info=
rmation." 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=3D
+ verstring=3D"0.0"
+ 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=3D""
+ ;;
+ *)
+ verstring=3D"0.0"
+ ;;
+ esac
+ if test "$need_version" =3D no; then
+ versuffix=3D
+ else
+ versuffix=3D".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" =3D yes && test "$need_version" =3D no; then
+ major=3D
+ versuffix=3D
+ verstring=3D""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" =3D yes; then
+ if test "$allow_undefined_flag" =3D unsupported; then
+ $echo "$modename: warning: undefined symbols not allowed in $host s=
hared libraries" 1>&2
+ build_libtool_libs=3Dno
+ build_old_libs=3Dyes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag=3D"$no_undefined_flag"
+ fi
+ fi
+
+ if test "$mode" !=3D relink; then
+ # Remove our outputs.
+ $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $out=
put_objdir/${libname}${release}.*"
+ $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $outpu=
t_objdir/${libname}${release}.*
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" =3D yes && test "$build_libtool_libs" !=3D=
convenience ; then
+ oldlibs=3D"$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs=3D"$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=3D`echo "$lib_search_path " | sed -e 's% $path % %g'`
+ deplibs=3D`echo "$deplibs " | sed -e 's% -L$path % %g'`
+ dependency_libs=3D`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=3D
+ for libdir in $xrpath; do
+ temp_xrpath=3D"$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath=3D"$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test $hardcode_into_libs !=3D yes || test $build_old_libs =3D yes; t=
hen
+ dependency_libs=3D"$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpre=
opened
+ old_dlfiles=3D"$dlfiles"
+ dlfiles=3D
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles=3D"$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles=3D"$dlprefiles"
+ dlprefiles=3D
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles=3D"$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" =3D 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=3D"$deplibs -framework System"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test $build_libtool_need_lc =3D "yes"; then
+ deplibs=3D"$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=3D$name
+ libname_save=3D$libname
+ release_save=3D$release
+ versuffix_save=3D$versuffix
+ major_save=3D$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=3D""
+ versuffix=3D""
+ major=3D""
+ newdeplibs=3D
+ droppeddeps=3Dno
+ 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 behaviour.
+ newdeplibs=3D$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 <<EOF
+ int main() { return 0; }
+EOF
+ $rm conftest
+ $CC -o conftest conftest.c $deplibs
+ if test $? -eq 0 ; then
+ ldd_output=3D`ldd conftest`
+ for i in $deplibs; do
+ name=3D"`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" !=3D "0"; then
+ libname=3D`eval \\$echo \"$libname_spec\"`
+ deplib_matches=3D`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=3D$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs=3D"$newdeplibs $i"
+ else
+ droppeddeps=3Dyes
+ echo
+ echo "*** Warning: This library needs some functionality provided by=
$i."
+ echo "*** I have the capability to make that library automatically l=
ink in when"
+ echo "*** you link to this library. But I can only do this if you h=
ave a"
+ echo "*** shared version of the library, which you do not appear to =
have."
+ fi
+ else
+ newdeplibs=3D"$newdeplibs $i"
+ fi
+ done
+ else
+ # Error occured in the first compile. Let's try to salvage the sit=
uation:
+ # Compile a seperate program for each library.
+ for i in $deplibs; do
+ name=3D"`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" !=3D "0"; then
+ $rm conftest
+ $CC -o conftest conftest.c $i
+ # Did it work?
+ if test $? -eq 0 ; then
+ ldd_output=3D`ldd conftest`
+ libname=3D`eval \\$echo \"$libname_spec\"`
+ deplib_matches=3D`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=3D$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs=3D"$newdeplibs $i"
+ else
+ droppeddeps=3Dyes
+ echo
+ echo "*** Warning: This library needs some functionality provided =
by $i."
+ 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 t=
o have."
+ fi
+ else
+ droppeddeps=3Dyes
+ echo
+ echo "*** Warning! Library $i is needed by this library but I was n=
ot able to"
+ echo "*** make it link in! You will probably need to install it or=
some"
+ echo "*** library that it depends on before this library will be ful=
ly"
+ echo "*** functional. Installing it before continuing would be even=
better."
+ fi
+ else
+ newdeplibs=3D"$newdeplibs $i"
+ fi
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method
+ file_magic_regex=3D`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ for a_deplib in $deplibs; do
+ name=3D"`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" !=3D "0"; then
+ libname=3D`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path=
; do
+ potential_libs=3D`ls $i/$libname[.-]* 2>/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=3D"$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=3D`ls -ld $potlib | sed 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib=3D"$potliblink";;
+ *) potlib=3D`$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=3D"$newdeplibs $a_deplib"
+ a_deplib=3D""
+ break 2
+ fi
+ done
+ done
+ if test -n "$a_deplib" ; then
+ droppeddeps=3Dyes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $=
a_deplib."
+ echo "*** I have the capability to make that library automatically lin=
k in when"
+ echo "*** you link to this library. But I can only do this if you hav=
e a"
+ echo "*** shared version of the library, which you do not appear to ha=
ve."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs=3D"$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method
+ match_pattern_regex=3D`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ for a_deplib in $deplibs; do
+ name=3D"`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" !=3D "0"; then
+ libname=3D`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path=
; do
+ potential_libs=3D`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ if eval echo \"$potent_lib\" 2>/dev/null \
+ | sed 10q \
+ | egrep "$match_pattern_regex" > /dev/null; then
+ newdeplibs=3D"$newdeplibs $a_deplib"
+ a_deplib=3D""
+ break 2
+ fi
+ done
+ done
+ if test -n "$a_deplib" ; then
+ droppeddeps=3Dyes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $=
a_deplib."
+ echo "*** I have the capability to make that library automatically lin=
k in when"
+ echo "*** you link to this library. But I can only do this if you hav=
e a"
+ echo "*** shared version of the library, which you do not appear to ha=
ve."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs=3D"$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=3D""
+ if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
+ grep . >/dev/null; then
+ echo
+ if test "X$deplibs_check_method" =3D "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported i=
n 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=3Dyes
+ fi
+ ;;
+ esac
+ versuffix=3D$versuffix_save
+ major=3D$major_save
+ release=3D$release_save
+ libname=3D$libname_save
+ name=3D$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ newdeplibs=3D`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework S=
ystem /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" =3D yes; then
+ if test "$module" =3D yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-lib=
rary"
+ echo "*** dependencies of module $libname. Therefore, libtool will=
create"
+ echo "*** a static module, that should work as long as the dlopenin=
g"
+ 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 ex=
tract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but li=
btool could"
+ echo "*** not find such a program. So, this module is probably u=
seless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" =3D no; then
+ oldlibs=3D"$output_objdir/$libname.$libext"
+ build_libtool_libs=3Dmodule
+ build_old_libs=3Dyes
+ else
+ build_libtool_libs=3Dno
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped her=
e will be"
+ echo "*** automatically added whenever a program is linked with thi=
s library"
+ echo "*** or is declared to -dlopen it."
+
+ if test $allow_undefined =3D 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" =3D no; then
+ oldlibs=3D"$output_objdir/$libname.$libext"
+ build_libtool_libs=3Dmodule
+ build_old_libs=3Dyes
+ else
+ build_libtool_libs=3Dno
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=3D$newdeplibs
+ fi
+
+ # All the library-specific variables (install_libdir is set above)=
.
+ library_names=3D
+ old_library=3D
+ dlname=3D
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" =3D yes; then
+ if test $hardcode_into_libs =3D yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=3D
+ dep_rpath=3D
+ rpath=3D"$finalize_rpath"
+ test "$mode" !=3D relink && rpath=3D"$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=3D"$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_sep=
arator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs=3D"$hardcode_libdirs$hardcode_libdir_separator$li=
bdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=3D\"$hardcode_libdir_flag_spec\"
+ dep_rpath=3D"$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath=3D"$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=3D"$hardcode_libdirs"
+ eval dep_rpath=3D\"$hardcode_libdir_flag_spec\"
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=3D
+ for dir in $perm_rpath; do
+ rpath=3D"$rpath$dir:"
+ done
+ eval "$runpath_var=3D'$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs=3D"$dep_rpath $deplibs"
+ fi
+
+ shlibpath=3D"$finalize_shlibpath"
+ test "$mode" !=3D relink && shlibpath=3D"$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var=3D'$shlibpath\$$shlibpath_var'; export $shlibpat=
h_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval library_names=3D\"$library_names_spec\"
+ set dummy $library_names
+ realname=3D"$2"
+ shift; shift
+
+ if test -n "$soname_spec"; then
+ eval soname=3D\"$soname_spec\"
+ else
+ soname=3D"$realname"
+ fi
+ test -z "$dlname" && dlname=3D$soname
+
+ lib=3D"$output_objdir/$realname"
+ for link
+ do
+ linknames=3D"$linknames $link"
+ done
+
+ # Ensure that we have .o objects for linkers which dislike .lo
+ # (e.g. aix) in case we are running --disable-static
+ for obj in $libobjs; do
+ xdir=3D`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" =3D "X$obj"; then
+ xdir=3D"."
+ else
+ xdir=3D"$xdir"
+ fi
+ baseobj=3D`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ oldobj=3D`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+ if test ! -f $xdir/$oldobj; then
+ $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
+ $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
+ fi
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=3D`$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" =3D yes || test -n "$export_symbols_=
regex"; then
+ $show "generating symbol list for \`$libname.la'"
+ export_symbols=3D"$output_objdir/$libname.exp"
+ $run $rm $export_symbols
+ eval cmds=3D\"$export_symbols_cmds\"
+ save_ifs=3D"$IFS"; IFS=3D'~'
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS=3D"$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
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval libobjs=3D\"\$libobjs $whole_archive_flag_spec\"
+ else
+ gentop=3D"$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=3D$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated=3D"$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs=3D"$xlib" ;;
+ *) xabs=3D`pwd`"/$xlib" ;;
+ esac
+ xlib=3D`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir=3D"$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=3D$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ libobjs=3D"$libobjs "`find $xdir -name \*.o -print -o -name \*.lo=
-print | $NL2SP`
+ done
+ fi
+ fi
+
+ if test "$thread_safe" =3D yes && test -n "$thread_safe_flag_spec"; the=
n
+ eval flag=3D\"$thread_safe_flag_spec\"
+ linker_flags=3D"$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" =3D relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${=
realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval cmds=3D\"$archive_expsym_cmds\"
+ else
+ eval cmds=3D\"$archive_cmds\"
+ fi
+ save_ifs=3D"$IFS"; IFS=3D'~'
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS=3D"$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" =3D relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${=
realname}T && $mv "$realname"U $realname)' || exit $?
+ exit 0
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" !=3D "$linkname"; then
+ $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $link=
name)"
+ $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" =3D yes || test "$export_dynamic" =3D yes; then
+ # On all known operating systems, these are identical.
+ dlname=3D"$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" !=3D 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-lib=
tool objects" 1>&2
+ exit 1
+ fi
+ libobj=3D"$output"
+ obj=3D`$echo "X$output" | $Xsed -e "$lo2o"`
+ ;;
+ *)
+ libobj=3D
+ obj=3D"$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=3D
+ gentop=3D
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec
+ wl=3D
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval reload_conv_objs=3D\"\$reload_objs $whole_archive_flag_spec\"
+ else
+ gentop=3D"$output_objdir/${obj}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=3D$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated=3D"$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs=3D"$xlib" ;;
+ *) xabs=3D`pwd`"/$xlib" ;;
+ esac
+ xlib=3D`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir=3D"$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=3D$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ reload_conv_objs=3D"$reload_objs "`find $xdir -name \*.o -print -o =
-name \*.lo -print | $NL2SP`
+ done
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs=3D"$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $X=
sed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_c=
onv_objs" ### testsuite: skip nested quoting test
+
+ output=3D"$obj"
+ eval cmds=3D\"$reload_cmds\"
+ save_ifs=3D"$IFS"; IFS=3D'~'
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS=3D"$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 0
+ fi
+
+ if test "$build_libtool_libs" !=3D 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 0
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" !=3D default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs=3D"$libobjs $reload_conv_objs"
+ output=3D"$libobj"
+ eval cmds=3D\"$reload_cmds\"
+ save_ifs=3D"$IFS"; IFS=3D'~'
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS=3D"$save_ifs"
+ else
+ # Just create a symlink.
+ $show $rm $libobj
+ $run $rm $libobj
+ xdir=3D`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" =3D "X$libobj"; then
+ xdir=3D"."
+ else
+ xdir=3D"$xdir"
+ fi
+ baseobj=3D`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+ oldobj=3D`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+ $show "(cd $xdir && $LN_S $oldobj $baseobj)"
+ $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
+ fi
+
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ exit 0
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) output=3D`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" =3D yes; then
+ if test "$dlopen_support" =3D unknown && test "$dlopen_self" =3D unknow=
n &&
+ test "$dlopen_self_static" =3D 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=3D`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -fra=
mework System /'`
+ finalize_deplibs=3D`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -f=
ramework System /'`
+ ;;
+ esac
+
+ compile_command=3D"$compile_command $compile_deplibs"
+ finalize_command=3D"$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=3D"$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=3D
+ hardcode_libdirs=3D
+ 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=3D"$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=3D"$hardcode_libdirs$hardcode_libdir_separator$libdir=
"
+ ;;
+ esac
+ fi
+ else
+ eval flag=3D\"$hardcode_libdir_flag_spec\"
+ rpath=3D"$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath=3D"$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ *) dllsearchpath=3D"$dllsearchpath:$libdir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=3D"$hardcode_libdirs"
+ eval rpath=3D\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath=3D"$rpath"
+
+ rpath=3D
+ hardcode_libdirs=3D
+ 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=3D"$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=3D"$hardcode_libdirs$hardcode_libdir_separator$libdir=
"
+ ;;
+ esac
+ fi
+ else
+ eval flag=3D\"$hardcode_libdir_flag_spec\"
+ rpath=3D"$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath=3D"$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=3D"$hardcode_libdirs"
+ eval rpath=3D\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath=3D"$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" =3D yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=3D`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o=
" | $NL2SP`
+ finalize_command=3D`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo=
2o" | $NL2SP`
+ fi
+
+ dlsyms=3D
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" !=3D no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ dlsyms=3D"${outputname}S.c"
+ else
+ $echo "$modename: not configured to extract global symbols from dlpre=
opened files" 1>&2
+ fi
+ fi
+
+ if test -n "$dlsyms"; then
+ case $dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist=3D"$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" =3D yes; then
+ $show "generating symbol list for \`$output'"
+
+ test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=3D`$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=3D"$output_objdir/$output.exp"
+ $run $rm $export_symbols
+ $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "=
'< "$nlist" > "$export_symbols"'
+ else
+ $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'=
"' < "$export_symbols" > "$output_objdir/$output.exp"'
+ $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nl=
ist"T'
+ $run eval 'mv "$nlist"T "$nlist"'
+ fi
+ fi
+
+ for arg in $dlprefiles; do
+ $show "extracting global C symbols from \`$arg'"
+ name=3D`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" | sort +2 | 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/$d=
lsyms"'
+ 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. */
+const struct {
+ const char *name;
+ lt_ptr address;
+}
+lt_preloaded_symbols[] =3D
+{\
+"
+
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objd=
ir/$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=3D
+ 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=3D" $pic_flag -DPIC -DFREEBSD_WORKAROUND";=
;
+ esac;;
+ *-*-hpux*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=3D" $pic_flag -DPIC";;
+ esac
+ esac
+
+ # Now compile the dynamic symbol file.
+ $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symt=
able \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $CC -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.
+ compile_command=3D`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%=
$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=3D`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE=
@%$output_objdir/${outputname}S.${objext}%"`
+ ;;
+ *)
+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+ exit 1
+ ;;
+ 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=3D`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%=
"`
+ finalize_command=3D`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@=
%%"`
+ fi
+
+ if test $need_relink =3D no || test "$build_libtool_libs" !=3D yes=
; then
+ # Replace the output file specification.
+ compile_command=3D`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$=
output"'%g'`
+ link_command=3D"$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ $show "$link_command"
+ $run eval "$link_command"
+ status=3D$?
+
+ # 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 $status
+ fi
+
+ if test -n "$shlibpath_var"; then
+ # We should set the shlibpath_var
+ rpath=3D
+ for dir in $temp_rpath; do
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*)
+ # Absolute path.
+ rpath=3D"$rpath$dir:"
+ ;;
+ *)
+ # Relative path: add a thisdir entry.
+ rpath=3D"$rpath\$thisdir/$dir:"
+ ;;
+ esac
+ done
+ temp_rpath=3D"$rpath"
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command=3D"$shlibpath_var=3D\"$compile_shlibpath$finalize_shlib=
path\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command=3D"$shlibpath_var=3D\"$finalize_shlibpath\$$shlibpath_=
var\" $finalize_command"
+ fi
+
+ compile_var=3D
+ finalize_var=3D
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=3D
+ for dir in $perm_rpath; do
+ rpath=3D"$rpath$dir:"
+ done
+ compile_var=3D"$runpath_var=3D\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=3D
+ for dir in $finalize_perm_rpath; do
+ rpath=3D"$rpath$dir:"
+ done
+ finalize_var=3D"$runpath_var=3D\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" =3D yes; then
+ # We don't need to create a wrapper script.
+ link_command=3D"$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=3D`$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 0
+ fi
+
+ if test "$hardcode_action" =3D relink; then
+ # Fast installation is not supported
+ link_command=3D"$compile_var$compile_command$compile_rpath"
+ relink_command=3D"$finalize_var$finalize_command$finalize_rpath"
+
+ $echo "$modename: warning: this platform does not like uninstalled shar=
ed libraries" 1>&2
+ $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ else
+ if test "$fast_install" !=3D no; then
+ link_command=3D"$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" =3D yes; then
+ relink_command=3D`$echo "X$compile_var$compile_command$compile_rpat=
h" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=3D
+ fi
+ else
+ link_command=3D"$compile_var$compile_command$compile_rpath"
+ relink_command=3D"$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=3D`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$o=
utput_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $run $rm $output $output_objdir/$outputname $output_objdir/lt-$out=
putname
+
+ $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=3D"{ test -z \"\${$var+set}\" || unset $var || { $va=
r=3D; export $var; }; }; $relink_command"
+ elif eval var_value=3D\$$var; test -z "$var_value"; then
+ relink_command=3D"$var=3D; export $var; $relink_command"
+ else
+ var_value=3D`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+ relink_command=3D"$var=3D\"$var_value\"; export $var; $relink_comma=
nd"
+ fi
+ done
+ relink_command=3D"cd `pwd`; $relink_command"
+ relink_command=3D`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst=
"`
+ fi
+
+ # Quote $echo for shipping.
+ if test "X$echo" =3D "X$SHELL $0 --fallback-echo"; then
+ case $0 in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho=3D"$SHELL $0 --fallback-echo";;
+ *) qecho=3D"$SHELL `pwd`/$0 --fallback-echo";;
+ esac
+ qecho=3D`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=3D`$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=3D`echo $output|sed 's,.exe$,,'` ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*) exeext=3D.exe ;;
+ *) exeext=3D ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit 1" 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=3D'sed -e 1s/^X//'
+sed_quote_subst=3D'$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" =3D set; then CDPATH=3D:; export CDPATH; fi
+
+relink_command=3D\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" =3D \"$magic\"; then
+ # install mode needs the following variable:
+ notinst_deplibs=3D'$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$echo are already s=
et.
+ if test \"\$libtool_execute_magic\" !=3D \"$magic\"; then
+ echo=3D\"$qecho\"
+ file=3D\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" =3D X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`(\$echo '\t') 2>/dev/null\`\" =3D '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=3D\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" =3D \"x\$file\" && thisdir=3D.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=3D\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=3D\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" !=3D \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=3D\"\$destdir\" ;;
+ *) thisdir=3D\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=3D\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=3D\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+ done
+
+ # Try to get the absolute directory name.
+ absdir=3D\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=3D\"\$absdir\"
+"
+
+ if test "$fast_install" =3D yes; then
+ echo >> $output "\
+ program=3Dlt-'$outputname'$exeext
+ progdir=3D\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" || \\
+ { file=3D\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program=
\" 2>/dev/null | sed 1q\`; \\
+ test \"X\$file\" !=3D \"X\$progdir/\$program\"; }; then
+
+ file=3D\"\$\$-\$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=3D\`eval \$relink_command 2>&1\`; then :
+ else
+ $echo \"\$relink_command_output\" >&2
+ $rm \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $rm \"\$progdir/\$program\";
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $rm \"\$progdir/\$file\"
+ fi"
+ else
+ echo >> $output "\
+ program=3D'$outputname'
+ progdir=3D\"\$thisdir/$objdir\"
+"
+ fi
+
+ echo >> $output "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" =3D yes && test -n "$shlibpath_v=
ar" && test -n "$temp_rpath"; then
+ $echo >> $output "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=3D\"$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=3D\`\$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=3D$dllsearchpath:\$PATH
+"
+ fi
+
+ $echo >> $output "\
+ if test \"\$libtool_execute_magic\" !=3D \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # win32 systems need to use the prog path for dll
+ # lookup to work
+ *-*-cygwin* | *-*-pw32*)
+ $echo >> $output "\
+ exec \$progdir/\$program \${1+\"\$@\"}
+"
+ ;;
+
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2*)
+ $echo >> $output "\
+ exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $echo >> $output "\
+ # Export the path to the program.
+ PATH=3D\"\$progdir:\$PATH\"
+ export PATH
+
+ exec \$program \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $echo >> $output "\
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+ \$echo \"This script is just a wrapper for \$program.\" 1>&2
+ echo \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+ chmod +x $output
+ fi
+ exit 0
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" =3D convenience; then
+ oldobjs=3D"$libobjs_save"
+ addlibs=3D"$convenience"
+ build_libtool_libs=3Dno
+ else
+ if test "$build_libtool_libs" =3D module; then
+ oldobjs=3D"$libobjs_save"
+ build_libtool_libs=3Dno
+ else
+ oldobjs=3D"$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xse=
d -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+ fi
+ addlibs=3D"$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop=3D"$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=3D$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated=3D"$generated $gentop"
+
+ # Add in members from convenience archives.
+ for xlib in $addlibs; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs=3D"$xlib" ;;
+ *) xabs=3D`pwd`"/$xlib" ;;
+ esac
+ xlib=3D`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir=3D"$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=3D$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ oldobjs=3D"$oldobjs "`find $xdir -name \*.${objext} -print -o -name \=
*.lo -print | $NL2SP`
+ done
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_li=
bs" =3D yes; then
+ eval cmds=3D\"$old_archive_from_new_cmds\"
+ else
+ # Ensure that we have .o objects in place in case we decided
+ # not to build a shared library, and have fallen back to building
+ # static libs even though --disable-static was passed!
+ for oldobj in $oldobjs; do
+ if test ! -f $oldobj; then
+ xdir=3D`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" =3D "X$oldobj"; then
+ xdir=3D"."
+ else
+ xdir=3D"$xdir"
+ fi
+ baseobj=3D`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
+ obj=3D`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+ $show "(cd $xdir && ${LN_S} $obj $baseobj)"
+ $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
+ fi
+ done
+
+ eval cmds=3D\"$old_archive_cmds\"
+ fi
+ save_ifs=3D"$IFS"; IFS=3D'~'
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS=3D"$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=3D
+ test "$build_old_libs" =3D yes && old_library=3D"$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=3D"{ test -z \"\${$var+set}\" || unset $var || { $var=3D=
; export $var; }; }; $relink_command"
+ elif eval var_value=3D\$$var; test -z "$var_value"; then
+ relink_command=3D"$var=3D; export $var; $relink_command"
+ else
+ var_value=3D`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+ relink_command=3D"$var=3D\"$var_value\"; export $var; $relink_command=
"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command=3D"cd `pwd`; $SHELL $0 --mode=3Drelink $libtool_arg=
s"
+ relink_command=3D`$echo "X$relink_command" | $Xsed -e "$sed_quote_=
subst"`
+
+ # Only create the output if not a dry run.
+ if test -z "$run"; then
+ for installed in no yes; do
+ if test "$installed" =3D yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output=3D"$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=3D
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ name=3D`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=3D`sed -n -e 's/^libdir=3D\(.*\)$/\1/p' $deplib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ newdependency_libs=3D"$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs=3D"$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs=3D"$newdependency_libs"
+ newdlfiles=3D
+ for lib in $dlfiles; do
+ name=3D`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=3D`sed -n -e 's/^libdir=3D\(.*\)$/\1/p' $lib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ newdlfiles=3D"$newdlfiles $libdir/$name"
+ done
+ dlfiles=3D"$newdlfiles"
+ newdlprefiles=3D
+ for lib in $dlprefiles; do
+ name=3D`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=3D`sed -n -e 's/^libdir=3D\(.*\)$/\1/p' $lib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ newdlprefiles=3D"$newdlprefiles $libdir/$name"
+ done
+ dlprefiles=3D"$newdlprefiles"
+ fi
+ $rm $output
+ # place dlname in correct position for cygwin
+ tdlname=3D$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll) tdlname=3D../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=3D'$tdlname'
+
+# Names of this library.
+library_names=3D'$library_names'
+
+# The name of the static archive.
+old_library=3D'$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs=3D'$dependency_libs'
+
+# Version information for $libname.
+current=3D$current
+age=3D$age
+revision=3D$revision
+
+# Is this an already installed library?
+installed=3D$installed
+
+# Files to dlopen/dlpreopen
+dlopen=3D'$dlfiles'
+dlpreopen=3D'$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir=3D'$install_libdir'"
+ if test "$installed" =3D no && test $need_relink =3D yes; then
+ $echo >> $output "\
+relink_command=3D\"$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 ../$outputna=
me $outputname)"
+ $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outp=
utname $outputname)' || exit $?
+ ;;
+ esac
+ exit 0
+ ;;
+
+ # libtool install mode
+ install)
+ modename=3D"$modename: install"
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" =3D "$SHELL" || test "$nonopt" =3D /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+ # Aesthetically quote it.
+ arg=3D`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg=3D"\"$arg\""
+ ;;
+ esac
+ install_prog=3D"$arg "
+ arg=3D"$1"
+ shift
+ else
+ install_prog=3D
+ arg=3D"$nonopt"
+ fi
+
+ # The real first argument should be the name of the installation pro=
gram.
+ # Aesthetically quote it.
+ arg=3D`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg=3D"\"$arg\""
+ ;;
+ esac
+ install_prog=3D"$install_prog$arg"
+
+ # We need to accept at least all the BSD install flags.
+ dest=3D
+ files=3D
+ opts=3D
+ prev=3D
+ install_type=3D
+ isdir=3Dno
+ stripme=3D
+ for arg
+ do
+ if test -n "$dest"; then
+ files=3D"$files $dest"
+ dest=3D"$arg"
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=3Dyes ;;
+ -f) prev=3D"-f" ;;
+ -g) prev=3D"-g" ;;
+ -m) prev=3D"-m" ;;
+ -o) prev=3D"-o" ;;
+ -s)
+ stripme=3D" -s"
+ continue
+ ;;
+ -*) ;;
+
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=3D
+ else
+ dest=3D"$arg"
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ arg=3D`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg=3D"\"$arg\""
+ ;;
+ esac
+ install_prog=3D"$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 1
+ fi
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prev' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ 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 1
+ fi
+
+ # Strip any trailing slash from the destination.
+ dest=3D`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=3Dyes
+ if test "$isdir" =3D yes; then
+ destdir=3D"$dest"
+ destname=3D
+ else
+ destdir=3D`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$destdir" =3D "X$dest" && destdir=3D.
+ destname=3D`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+ # Not a directory, so check to see that there is only one file spe=
cified.
+ set dummy $files
+ if test $# -gt 2; then
+ $echo "$modename: \`$dest' is not a directory" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ 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 1
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=3D"$magic"
+
+ staticlibs=3D
+ future_libdirs=3D
+ current_libdirs=3D
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs=3D"$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# 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 1
+ fi
+
+ library_names=3D
+ old_library=3D
+ relink_command=3D
+ # 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" =3D "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs=3D"$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs=3D"$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ dir=3D`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+ test "X$dir" =3D "X$file/" && dir=3D
+ dir=3D"$dir$objdir"
+
+ if test -n "$relink_command"; then
+ $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 bef=
ore installing it" 1>&2
+ continue
+ fi
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names
+ if test -n "$2"; then
+ realname=3D"$2"
+ shift
+ shift
+
+ srcname=3D"$realname"
+ test -n "$relink_command" && srcname=3D"$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.
+ for linkname
+ do
+ if test "$linkname" !=3D "$realname"; then
+ $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)=
"
+ fi
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib=3D"$destdir/$realname"
+ eval cmds=3D\"$postinstall_cmds\"
+ save_ifs=3D"$IFS"; IFS=3D'~'
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS=3D"$save_ifs"
+ fi
+
+ # Install the pseudo-library for information purposes.
+ name=3D`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ instname=3D"$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=3D"$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=3D"$destdir/$destname"
+ else
+ destfile=3D`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile=3D"$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ staticdest=3D`$echo "X$destfile" | $Xsed -e "$lo2o"`
+ ;;
+ *.$objext)
+ staticdest=3D"$destfile"
+ destfile=3D
+ ;;
+ *)
+ $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ 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" =3D yes; then
+ # Deduce the name of the old-style object file.
+ staticobj=3D`$echo "X$file" | $Xsed -e "$lo2o"`
+
+ $show "$install_prog $staticobj $staticdest"
+ $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+ fi
+ exit 0
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=3D"$destdir/$destname"
+ else
+ destfile=3D`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile=3D"$destdir/$destfile"
+ fi
+
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null =
2>&1; then
+ notinst_deplibs=3D
+ relink_command=3D
+
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Check the variables that should have been set.
+ if test -z "$notinst_deplibs"; then
+ $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+ exit 1
+ fi
+
+ finalize=3Dyes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=3D
+ if test -f "$lib"; then
+ # If there is no directory component, then add one.
+ case $lib in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ fi
+ libfile=3D"$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### test=
suite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ $echo "$modename: warning: \`$lib' has not been installed in \`$l=
ibdir'" 1>&2
+ finalize=3Dno
+ fi
+ done
+
+ relink_command=3D
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ outputname=3D
+ if test "$fast_install" =3D no && test -n "$relink_command"; then
+ if test "$finalize" =3D yes && test -z "$run"; then
+ tmpdir=3D"/tmp"
+ test -n "$TMPDIR" && tmpdir=3D"$TMPDIR"
+ tmpdir=3D"$tmpdir/libtool-$$"
+ if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+ else
+ $echo "$modename: error: cannot create temporary directory \`$tmpdir'"=
1>&2
+ continue
+ fi
+ file=3D`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ outputname=3D"$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=3D`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@=
%'"$outputname"'%g'`
+
+ $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=3D"$outputname"
+ else
+ $echo "$modename: warning: cannot relink \`$file'" 1>&2
+ fi
+ else
+ # Install the binary that we compiled earlier.
+ file=3D`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyways
+ case $install_prog,$host in
+ /usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=3D$destfile.exe
+ ;;
+ *:*.exe)
+ destfile=3D`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=3D`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+ # Set up the ranlib parameters.
+ oldlib=3D"$destdir/$name"
+
+ $show "$install_prog $file $oldlib"
+ $run eval "$install_prog \$file \$oldlib" || exit $?
+
+ if test -n "$stripme" && test -n "$striplib"; then
+ $show "$old_striplib $oldlib"
+ $run eval "$old_striplib $oldlib" || exit $?
+ fi
+
+ # Do each command in the postinstall commands.
+ eval cmds=3D\"$old_postinstall_cmds\"
+ save_ifs=3D"$IFS"; IFS=3D'~'
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS=3D"$save_ifs"
+ done
+
+ if test -n "$future_libdirs"; then
+ $echo "$modename: warning: remember to run \`$progname --finish$fu=
ture_libdirs'" 1>&2
+ fi
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ test -n "$run" && current_libdirs=3D" -n$current_libdirs"
+ exec_cmd=3D'$SHELL $0 --finish$current_libdirs'
+ else
+ exit 0
+ fi
+ ;;
+
+ # libtool finish mode
+ finish)
+ modename=3D"$modename: finish"
+ libdirs=3D"$nonopt"
+ admincmds=3D
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs=3D"$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ eval cmds=3D\"$finish_cmds\"
+ save_ifs=3D"$IFS"; IFS=3D'~'
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || admincmds=3D"$admincmds
+ $cmd"
+ done
+ IFS=3D"$save_ifs"
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=3D\"$finish_eval\"
+ $run eval "$cmds" || admincmds=3D"$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ test "$show" =3D ":" && exit 0
+
+ echo "--------------------------------------------------------------=
--------"
+ 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 \`-LLIBDI=
R'"
+ 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 variabl=
e"
+ 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=3DLIBDIR
+ eval flag=3D\"$hardcode_libdir_flag_spec\"
+
+ echo " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ echo " - have your system administrator run these commands:$admi=
ncmds"
+ 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 "--------------------------------------------------------------=
--------"
+ exit 0
+ ;;
+
+ # libtool execute mode
+ execute)
+ modename=3D"$modename: execute"
+
+ # The first argument is the command name.
+ cmd=3D"$nonopt"
+ if test -z "$cmd"; then
+ $echo "$modename: you must specify a COMMAND" 1>&2
+ $echo "$help"
+ exit 1
+ 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 1
+ fi
+
+ dir=3D
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# 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 1
+ fi
+
+ # Read the libtool library.
+ dlname=3D
+ library_names=3D
+
+ # 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 n=
ot linked with \`-export-dynamic'"
+ continue
+ fi
+
+ dir=3D`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" =3D "X$file" && dir=3D.
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir=3D"$dir/$objdir"
+ else
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir=
'" 1>&2
+ exit 1
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ dir=3D`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" =3D "X$file" && dir=3D.
+ ;;
+
+ *)
+ $echo "$modename: warning \`-dlopen' is ignored for non-libtool librari=
es and objects" 1>&2
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=3D`cd "$dir" && pwd`
+ test -n "$absdir" && dir=3D"$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=3D\"\$dir\""
+ else
+ eval "$shlibpath_var=3D\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic=3D"$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=3D
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# 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=3D"$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ file=3D`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+ args=3D"$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 enviroment variables
+ if test "${save_LC_ALL+set}" =3D set; then
+ LC_ALL=3D"$save_LC_ALL"; export LC_ALL
+ fi
+ if test "${save_LANG+set}" =3D set; then
+ LANG=3D"$save_LANG"; export LANG
+ fi
+
+ # Now prepare to actually exec the command.
+ exec_cmd=3D'"$cmd"$args'
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$echo \"\$shlibpath_var=3D\$$shlibpath_var\""
+ $echo "export $shlibpath_var"
+ fi
+ $echo "$cmd$args"
+ exit 0
+ fi
+ ;;
+
+ # libtool clean and uninstall mode
+ clean | uninstall)
+ modename=3D"$modename: $mode"
+ rm=3D"$nonopt"
+ files=3D
+ rmforce=3D
+ exit_status=3D0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=3D"$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) rm=3D"$rm $arg"; rmforce=3Dyes ;;
+ -*) rm=3D"$rm $arg" ;;
+ *) files=3D"$files $arg" ;;
+ esac
+ done
+
+ if test -z "$rm"; then
+ $echo "$modename: you must specify an RM program" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ rmdirs=3D
+
+ for file in $files; do
+ dir=3D`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" =3D "X$file"; then
+ dir=3D.
+ objdir=3D"$objdir"
+ else
+ objdir=3D"$dir/$objdir"
+ fi
+ name=3D`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ test $mode =3D uninstall && objdir=3D"$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplic=
ates
+ if test $mode =3D clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs=3D"$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=3D1
+ continue
+ elif test "$rmforce" =3D yes; then
+ continue
+ fi
+
+ rmfiles=3D"$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null =
2>&1; then
+ . $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles=3D"$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles=3D"$rmfiles $objdir/$old_library"
+ test $mode =3D clean && rmfiles=3D"$rmfiles $objdir/$name $objdir/${n=
ame}i"
+
+ if test $mode =3D uninstall; then
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ eval cmds=3D\"$postuninstall_cmds\"
+ save_ifs=3D"$IFS"; IFS=3D'~'
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ if test $? !=3D 0 && test "$rmforce" !=3D yes; then
+ exit_status=3D1
+ fi
+ done
+ IFS=3D"$save_ifs"
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ eval cmds=3D\"$old_postuninstall_cmds\"
+ save_ifs=3D"$IFS"; IFS=3D'~'
+ for cmd in $cmds; do
+ IFS=3D"$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ if test $? !=3D 0 && test "$rmforce" !=3D yes; then
+ exit_status=3D1
+ fi
+ done
+ IFS=3D"$save_ifs"
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ fi
+ fi
+ ;;
+
+ *.lo)
+ if test "$build_old_libs" =3D yes; then
+ oldobj=3D`$echo "X$name" | $Xsed -e "$lo2o"`
+ rmfiles=3D"$rmfiles $dir/$oldobj"
+ fi
+ ;;
+
+ *)
+ # Do a test to see if this is a libtool program.
+ if test $mode =3D clean &&
+ (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null =
2>&1; then
+ relink_command=3D
+ . $dir/$file
+
+ rmfiles=3D"$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" =3D yes && test -n "$relink_command"; then
+ rmfiles=3D"$rmfiles $objdir/lt-$name"
+ fi
+ fi
+ ;;
+ esac
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles || exit_status=3D1
+ done
+
+ # Try to remove the ${objdir}s in the directories where we deleted f=
iles
+ 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 1
+ ;;
+ esac
+
+ if test -z "$exec_cmd"; then
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+ fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+ eval exec $exec_cmd
+ exit 1
+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=3Dfinish'
+ --help display this help message and exit
+ --mode=3DMODE use operation mode MODE [default=3Dinferred from=
MODE-ARGS]
+ --quiet same as \`--silent'
+ --silent don't print informational messages
+ --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=3DM=
ODE' for
+a more detailed description of MODE."
+ exit 0
+ ;;
+
+clean)
+ $echo \
+"Usage: $modename [OPTION]... --mode=3Dclean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with eac=
h FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be pa=
ssed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associate=
d
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+compile)
+ $echo \
+"Usage: $modename [OPTION]... --mode=3Dcompile COMPILE-COMMAND... SOURCE=
FILE
+
+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 linkin=
g
+
+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 f=
rom
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+execute)
+ $echo \
+"Usage: $modename [OPTION]... --mode=3Dexecute 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 pat=
h
+
+This mode sets the library path environment variable according to \`-dlo=
pen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are transl=
ated
+into their corresponding uninstalled binary, and any of their required l=
ibrary
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+finish)
+ $echo \
+"Usage: $modename [OPTION]... --mode=3Dfinish [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=3Dinstall 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=3Dlink 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 cre=
ate
+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 runti=
me
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_sym=
bols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with d=
lsym(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 sy=
mbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -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 libra=
ries
+ -static 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' a=
re
+treated as uninstalled libtool libraries, other files are standard or li=
brary
+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 crea=
ted
+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=3Duninstall RM [RM-OPTION]... FILE.=
..
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with eac=
h FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be pa=
ssed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are delet=
ed.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+*)
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+esac
+
+echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
Added: trunk/DvdMenuXtractor/dmx/libdvdread/makefile.vc
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/makefile.vc 2007-03-10 21:38:29 =
UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/makefile.vc 2007-03-10 21:41:34 =
UTC (rev 1290)
@@ -0,0 +1,195 @@
+# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+# This makefile was generated by
+# Bakefile 0.1.4 (http://bakefile.sourceforge.net)
+# Do not modify, all changes will be overwritten!
+# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+
+
+
+# ----------------------------------------------------------------------=
---
+# These are configurable options:
+# ----------------------------------------------------------------------=
---
+
+# C compiler=20
+CC =3D cl
+
+# Standard flags for CC=20
+CFLAGS =3D=20
+
+# Standard preprocessor flags (common for CC and CXX)=20
+CPPFLAGS =3D=20
+
+# Standard linker flags=20
+LDFLAGS =3D=20
+
+# Type of compiled binaries [debug,release]
+BUILD =3D release
+
+# Link the debug output somewhere else=20
+LOG_ERROR =3D internal_error
+
+
+
+# ----------------------------------------------------------------------=
---
+# Do not modify the rest of this file!
+# ----------------------------------------------------------------------=
---
+
+### Variables: ###
+
+LIBDVDREAD_CFLAGS =3D /MD$(__DEBUG_FLAG_8) /DWIN32 $(__DEBUG_FLAG) \
+ /Fdbuild\libdvdread.pdb $(____DEBUG_FLAG) $(__OPTIMIZE) /DHAVE_CONFIG_H=
\
+ /DLOG_ERROR=3D$(LOG_ERROR) /Iwin32 /I. $(CPPFLAGS) $(CFLAGS)
+LIBDVDREAD_OBJECTS =3D \
+ build\libdvdread_ifo_read.obj \
+ build\libdvdread_dvd_udf.obj \
+ build\libdvdread_ifo_print.obj \
+ build\libdvdread_nav_read.obj \
+ build\libdvdread_nav_print.obj \
+ build\libdvdread_md5.obj \
+ build\libdvdread_dvd_reader.obj \
+ build\libdvdread_dvd_input.obj \
+ build\libdvdread_dirent.obj
+DISC_ID_CFLAGS =3D /MD$(__DEBUG_FLAG_8) /DWIN32 $(__DEBUG_FLAG) \
+ /Fdbuild\disc_id.pdb $(____DEBUG_FLAG) $(__OPTIMIZE) /Iwin32 /I. $(CPPF=
LAGS) \
+ $(CFLAGS)
+DISC_ID_OBJECTS =3D \
+ build\disc_id_disc_id.obj
+IFO_DUMP_CFLAGS =3D /MD$(__DEBUG_FLAG_8) /DWIN32 $(__DEBUG_FLAG) \
+ /Fdbuild\ifo_dump.pdb $(____DEBUG_FLAG) $(__OPTIMIZE) /Iwin32 /I. $(CPP=
FLAGS) \
+ $(CFLAGS)
+IFO_DUMP_OBJECTS =3D \
+ build\ifo_dump_ifo_dump.obj
+PLAY_TITLE_CFLAGS =3D /MD$(__DEBUG_FLAG_8) /DWIN32 $(__DEBUG_FLAG) \
+ /Fdbuild\play_title.pdb $(____DEBUG_FLAG) $(__OPTIMIZE) /Iwin32 /I. \
+ $(CPPFLAGS) $(CFLAGS)
+PLAY_TITLE_OBJECTS =3D \
+ build\play_title_play_title.obj
+TITLE_INFO_CFLAGS =3D /MD$(__DEBUG_FLAG_8) /DWIN32 $(__DEBUG_FLAG) \
+ /Fdbuild\title_info.pdb $(____DEBUG_FLAG) $(__OPTIMIZE) /Iwin32 /I. \
+ $(CPPFLAGS) $(CFLAGS)
+TITLE_INFO_OBJECTS =3D \
+ build\title_info_title_info.obj
+
+### Conditionally set variables: ###
+
+!if "$(BUILD)" =3D=3D "debug"
+__DEBUG_FLAG =3D /Zi
+!endif
+!if "$(BUILD)" =3D=3D "release"
+__DEBUG_FLAG =3D=20
+!endif
+!if "$(BUILD)" =3D=3D "debug"
+__DEBUG_FLAG_7 =3D /DEBUG
+!endif
+!if "$(BUILD)" =3D=3D "release"
+__DEBUG_FLAG_7 =3D=20
+!endif
+!if "$(BUILD)" =3D=3D "debug"
+____DEBUG_FLAG =3D /D_DEBUG
+!endif
+!if "$(BUILD)" =3D=3D "release"
+____DEBUG_FLAG =3D=20
+!endif
+!if "$(BUILD)" =3D=3D "debug"
+__DEBUG_FLAG_8 =3D d
+!endif
+!if "$(BUILD)" =3D=3D "release"
+__DEBUG_FLAG_8 =3D=20
+!endif
+!if "$(BUILD)" =3D=3D "debug"
+__OPTIMIZE =3D /Od
+!endif
+!if "$(BUILD)" =3D=3D "release"
+__OPTIMIZE =3D /O2
+!endif
+
+
+all: build
+build:
+ -if not exist build mkdir build
+
+### Targets: ###
+
+all: build\libdvdread.lib build\disc_id.exe build\ifo_dump.exe build\pla=
y_title.exe build\title_info.exe
+
+clean:=20
+ -if exist build\*.obj del build\*.obj
+ -if exist build\*.res del build\*.res
+ -if exist build\libdvdread.lib del build\libdvdread.lib
+ -if exist build\disc_id.exe del build\disc_id.exe
+ -if exist build\disc_id.ilk del build\disc_id.ilk
+ -if exist build\disc_id.pdb del build\disc_id.pdb
+ -if exist build\ifo_dump.exe del build\ifo_dump.exe
+ -if exist build\ifo_dump.ilk del build\ifo_dump.ilk
+ -if exist build\ifo_dump.pdb del build\ifo_dump.pdb
+ -if exist build\play_title.exe del build\play_title.exe
+ -if exist build\play_title.ilk del build\play_title.ilk
+ -if exist build\play_title.pdb del build\play_title.pdb
+ -if exist build\title_info.exe del build\title_info.exe
+ -if exist build\title_info.ilk del build\title_info.ilk
+ -if exist build\title_info.pdb del build\title_info.pdb
+
+build\libdvdread.lib: $(LIBDVDREAD_OBJECTS)
+ if exist $@ del $@
+ lib /NOLOGO /OUT:$@ @<<
+ $(LIBDVDREAD_OBJECTS)
+<<
+
+build\disc_id.exe: $(DISC_ID_OBJECTS) build\libdvdread.lib
+ link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUG_FLAG_7) /LIBPATH:build @<<
+ $(DISC_ID_OBJECTS) libdvdread.lib
+<<
+
+build\ifo_dump.exe: $(IFO_DUMP_OBJECTS) build\libdvdread.lib
+ link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUG_FLAG_7) /LIBPATH:build @<<
+ $(IFO_DUMP_OBJECTS) libdvdread.lib
+<<
+
+build\play_title.exe: $(PLAY_TITLE_OBJECTS) build\libdvdread.lib
+ link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUG_FLAG_7) /LIBPATH:build @<<
+ $(PLAY_TITLE_OBJECTS) libdvdread.lib
+<<
+
+build\title_info.exe: $(TITLE_INFO_OBJECTS) build\libdvdread.lib
+ link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUG_FLAG_7) /LIBPATH:build @<<
+ $(TITLE_INFO_OBJECTS) libdvdread.lib
+<<
+
+build\libdvdread_ifo_read.obj: .\dvdread\ifo_read.c
+ $(CC) /c /nologo /TC /Fo$@ $(LIBDVDREAD_CFLAGS) $**
+
+build\libdvdread_dvd_udf.obj: .\dvdread\dvd_udf.c
+ $(CC) /c /nologo /TC /Fo$@ $(LIBDVDREAD_CFLAGS) $**
+
+build\libdvdread_ifo_print.obj: .\dvdread\ifo_print.c
+ $(CC) /c /nologo /TC /Fo$@ $(LIBDVDREAD_CFLAGS) $**
+
+build\libdvdread_nav_read.obj: .\dvdread\nav_read.c
+ $(CC) /c /nologo /TC /Fo$@ $(LIBDVDREAD_CFLAGS) $**
+
+build\libdvdread_nav_print.obj: .\dvdread\nav_print.c
+ $(CC) /c /nologo /TC /Fo$@ $(LIBDVDREAD_CFLAGS) $**
+
+build\libdvdread_md5.obj: .\dvdread\md5.c
+ $(CC) /c /nologo /TC /Fo$@ $(LIBDVDREAD_CFLAGS) $**
+
+build\libdvdread_dvd_reader.obj: .\dvdread\dvd_reader.c
+ $(CC) /c /nologo /TC /Fo$@ $(LIBDVDREAD_CFLAGS) $**
+
+build\libdvdread_dvd_input.obj: .\dvdread\dvd_input.c
+ $(CC) /c /nologo /TC /Fo$@ $(LIBDVDREAD_CFLAGS) $**
+
+build\libdvdread_dirent.obj: .\win32\dirent.c
+ $(CC) /c /nologo /TC /Fo$@ $(LIBDVDREAD_CFLAGS) $**
+
+build\disc_id_disc_id.obj: .\src\disc_id.c
+ $(CC) /c /nologo /TC /Fo$@ $(DISC_ID_CFLAGS) $**
+
+build\ifo_dump_ifo_dump.obj: .\src\ifo_dump.c
+ $(CC) /c /nologo /TC /Fo$@ $(IFO_DUMP_CFLAGS) $**
+
+build\play_title_play_title.obj: .\src\play_title.c
+ $(CC) /c /nologo /TC /Fo$@ $(PLAY_TITLE_CFLAGS) $**
+
+build\title_info_title_info.obj: .\src\title_info.c
+ $(CC) /c /nologo /TC /Fo$@ $(TITLE_INFO_CFLAGS) $**
Added: trunk/DvdMenuXtractor/dmx/libdvdread/missing
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/missing 2007-03-10 21:38:29 UTC =
(rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/missing 2007-03-10 21:41:34 UTC =
(rev 1290)
@@ -0,0 +1,336 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, I=
nc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=3D:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=3Dconfigure.ac
+else
+ configure_ac=3Dconfigure.in
+fi
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=3D
+ shift
+ "$@" && exit 0
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return a=
n
+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 fai=
ls
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flag=
s
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing 0.4 - GNU automake"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might =
want
+ to install the \`Automake' and \`Perl' packages. Grab them fro=
m
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might wa=
nt
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=3D`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${con=
figure_ac}`
+ test -z "$files" && files=3D"config.h"
+ touch_files=3D
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files=3D"$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files=3D"$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_a=
c}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=3D`echo "$*" | sed -n 's/.*--output[ =3D]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=3D`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*=
/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG=3D"\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=3D`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=3D`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG=3D"\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=3D`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=3D`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=3D`echo "$*" | sed -n 's/.*--output=3D\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+ # We have makeinfo, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AI=
X,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site=
."
+ file=3D`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=3D`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=3D`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' =
$file`
+ fi
+ touch $file
+ ;;
+
+ tar)
+ shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg=3D"$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=3D`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=3D`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' fi=
le,
+ it often tells you about the needed prerequirements for install=
ing
+ this package. You may also peek at any GNU archive site, in ca=
se
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
Added: trunk/DvdMenuXtractor/dmx/libdvdread/mkinstalldirs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/mkinstalldirs 2007-03-10 21:38:2=
9 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/mkinstalldirs 2007-03-10 21:41:3=
4 UTC (rev 1290)
@@ -0,0 +1,101 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman at prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
+
+errstatus=3D0
+dirmode=3D""
+
+usage=3D"\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+ case "${1}" in
+ -h | --help | --h* ) # -h for help
+ echo "${usage}" 1>&2; exit 0 ;;
+ -m ) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
+ dirmode=3D"${1}"
+ shift ;;
+ -- ) shift; break ;; # stop option processing
+ -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
+ * ) break ;; # first non-opt arg
+ esac
+done
+
+for file
+do
+ if test -d "$file"; then
+ shift
+ else
+ break
+ fi
+done
+
+case $# in
+0) exit 0 ;;
+esac
+
+case $dirmode in
+'')
+ if mkdir -p -- . 2>/dev/null; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ fi ;;
+*)
+ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ fi ;;
+esac
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\/=
/;p'`
+ shift
+
+ pathcomp=3D
+ for d
+ do
+ pathcomp=3D"$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=3D./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=3D$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=3D$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+
+ lasterr=3D""
+ chmod "$dirmode" "$pathcomp" || lasterr=3D$?
+
+ if test ! -z "$lasterr"; then
+ errstatus=3D$lasterr
+ fi
+ fi
+ fi
+ fi
+
+ pathcomp=3D"$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 3
+# End:
+# mkinstalldirs ends here
Added: trunk/DvdMenuXtractor/dmx/libdvdread/src/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/src/Makefile.am 2007-03-10 21:38=
:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/src/Makefile.am 2007-03-10 21:41=
:34 UTC (rev 1290)
@@ -0,0 +1,23 @@
+#=20
+# There really shouldn't be any need to use @DL_LIBS@ and @CSS_LIBS@
+# here but old versions of libtool failed to do the correct thing
+
+INCLUDES =3D -I$(top_srcdir)
+
+noinst_PROGRAMS =3D ifo_dump play_title title_info disc_id filestat
+
+ifo_dump_SOURCES =3D ifo_dump.c
+ifo_dump_LDADD =3D $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CSS_=
LIBS@
+
+play_title_SOURCES =3D play_title.c
+play_title_LDADD =3D $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CS=
S_LIBS@
+
+title_info_SOURCES =3D title_info.c
+title_info_LDADD =3D $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CS=
S_LIBS@
+
+disc_id_SOURCES =3D disc_id.c
+disc_id_LDADD =3D $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CSS_L=
IBS@
+
+filestat_SOURCES =3D filestat.c
+filestat_LDADD =3D $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CSS_=
LIBS@
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/src/Makefile.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/src/Makefile.in 2007-03-10 21:38=
:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/src/Makefile.in 2007-03-10 21:41=
:34 UTC (rev 1290)
@@ -0,0 +1,470 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 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.
+
+ at SET_MAKE@
+
+#=20
+# There really shouldn't be any need to use @DL_LIBS@ and @CSS_LIBS@
+# here but old versions of libtool failed to do the correct thing
+
+srcdir =3D @srcdir@
+top_srcdir =3D @top_srcdir@
+VPATH =3D @srcdir@
+pkgdatadir =3D $(datadir)/@PACKAGE@
+pkglibdir =3D $(libdir)/@PACKAGE@
+pkgincludedir =3D $(includedir)/@PACKAGE@
+top_builddir =3D ..
+am__cd =3D CDPATH=3D"$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL =3D @INSTALL@
+install_sh_DATA =3D $(install_sh) -c -m 644
+install_sh_PROGRAM =3D $(install_sh) -c
+install_sh_SCRIPT =3D $(install_sh) -c
+INSTALL_HEADER =3D $(INSTALL_DATA)
+transform =3D $(program_transform_name)
+NORMAL_INSTALL =3D :
+PRE_INSTALL =3D :
+POST_INSTALL =3D :
+NORMAL_UNINSTALL =3D :
+PRE_UNINSTALL =3D :
+POST_UNINSTALL =3D :
+build_triplet =3D @build@
+host_triplet =3D @host@
+noinst_PROGRAMS =3D ifo_dump$(EXEEXT) play_title$(EXEEXT) \
+ title_info$(EXEEXT) disc_id$(EXEEXT) filestat$(EXEEXT)
+subdir =3D src
+DIST_COMMON =3D $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 =3D $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps =3D $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps =3D $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) =
\
+ $(ACLOCAL_M4)
+mkinstalldirs =3D $(install_sh) -d
+CONFIG_HEADER =3D $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =3D
+PROGRAMS =3D $(noinst_PROGRAMS)
+am_disc_id_OBJECTS =3D disc_id.$(OBJEXT)
+disc_id_OBJECTS =3D $(am_disc_id_OBJECTS)
+disc_id_DEPENDENCIES =3D $(top_builddir)/dvdread/libdvdread.la
+am_filestat_OBJECTS =3D filestat.$(OBJEXT)
+filestat_OBJECTS =3D $(am_filestat_OBJECTS)
+filestat_DEPENDENCIES =3D $(top_builddir)/dvdread/libdvdread.la
+am_ifo_dump_OBJECTS =3D ifo_dump.$(OBJEXT)
+ifo_dump_OBJECTS =3D $(am_ifo_dump_OBJECTS)
+ifo_dump_DEPENDENCIES =3D $(top_builddir)/dvdread/libdvdread.la
+am_play_title_OBJECTS =3D play_title.$(OBJEXT)
+play_title_OBJECTS =3D $(am_play_title_OBJECTS)
+play_title_DEPENDENCIES =3D $(top_builddir)/dvdread/libdvdread.la
+am_title_info_OBJECTS =3D title_info.$(OBJEXT)
+title_info_OBJECTS =3D $(am_title_info_OBJECTS)
+title_info_DEPENDENCIES =3D $(top_builddir)/dvdread/libdvdread.la
+DEFAULT_INCLUDES =3D -I. -I$(srcdir) -I$(top_builddir)
+depcomp =3D $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe =3D depfiles
+COMPILE =3D $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS)=
\
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE =3D $(LIBTOOL) --tag=3DCC --mode=3Dcompile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD =3D $(CC)
+LINK =3D $(LIBTOOL) --tag=3DCC --mode=3Dlink $(CCLD) $(AM_CFLAGS) $(CFLA=
GS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES =3D $(disc_id_SOURCES) $(filestat_SOURCES) $(ifo_dump_SOURCES) \
+ $(play_title_SOURCES) $(title_info_SOURCES)
+DIST_SOURCES =3D $(disc_id_SOURCES) $(filestat_SOURCES) \
+ $(ifo_dump_SOURCES) $(play_title_SOURCES) \
+ $(title_info_SOURCES)
+ETAGS =3D etags
+CTAGS =3D ctags
+DISTFILES =3D $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL =3D @ACLOCAL@
+AMDEP_FALSE =3D @AMDEP_FALSE@
+AMDEP_TRUE =3D @AMDEP_TRUE@
+AMTAR =3D @AMTAR@
+AR =3D @AR@
+AUTOCONF =3D @AUTOCONF@
+AUTOHEADER =3D @AUTOHEADER@
+AUTOMAKE =3D @AUTOMAKE@
+AWK =3D @AWK@
+CC =3D @CC@
+CCDEPMODE =3D @CCDEPMODE@
+CFLAGS =3D @CFLAGS@
+CPP =3D @CPP@
+CPPFLAGS =3D @CPPFLAGS@
+CSS_CFLAGS =3D @CSS_CFLAGS@
+CSS_LIBS =3D @CSS_LIBS@
+CXX =3D @CXX@
+CXXCPP =3D @CXXCPP@
+CXXDEPMODE =3D @CXXDEPMODE@
+CXXFLAGS =3D @CXXFLAGS@
+CYGPATH_W =3D @CYGPATH_W@
+DEFS =3D @DEFS@
+DEPDIR =3D @DEPDIR@
+DL_LIBS =3D @DL_LIBS@
+ECHO =3D @ECHO@
+ECHO_C =3D @ECHO_C@
+ECHO_N =3D @ECHO_N@
+ECHO_T =3D @ECHO_T@
+EGREP =3D @EGREP@
+EXEEXT =3D @EXEEXT@
+F77 =3D @F77@
+FFLAGS =3D @FFLAGS@
+INSTALL_DATA =3D @INSTALL_DATA@
+INSTALL_PROGRAM =3D @INSTALL_PROGRAM@
+INSTALL_SCRIPT =3D @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM =3D @INSTALL_STRIP_PROGRAM@
+LDFLAGS =3D @LDFLAGS@
+LIBOBJS =3D @LIBOBJS@
+LIBS =3D @LIBS@
+LIBTOOL =3D @LIBTOOL@
+LN_S =3D @LN_S@
+LTLIBOBJS =3D @LTLIBOBJS@
+MAINT =3D @MAINT@
+MAINTAINER_MODE_FALSE =3D @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE =3D @MAINTAINER_MODE_TRUE@
+MAKEINFO =3D @MAKEINFO@
+OBJEXT =3D @OBJEXT@
+PACKAGE =3D @PACKAGE@
+PACKAGE_BUGREPORT =3D @PACKAGE_BUGREPORT@
+PACKAGE_NAME =3D @PACKAGE_NAME@
+PACKAGE_STRING =3D @PACKAGE_STRING@
+PACKAGE_TARNAME =3D @PACKAGE_TARNAME@
+PACKAGE_VERSION =3D @PACKAGE_VERSION@
+PATH_SEPARATOR =3D @PATH_SEPARATOR@
+RANLIB =3D @RANLIB@
+SET_MAKE =3D @SET_MAKE@
+SHELL =3D @SHELL@
+STRIP =3D @STRIP@
+VERSION =3D @VERSION@
+ac_ct_AR =3D @ac_ct_AR@
+ac_ct_CC =3D @ac_ct_CC@
+ac_ct_CXX =3D @ac_ct_CXX@
+ac_ct_F77 =3D @ac_ct_F77@
+ac_ct_RANLIB =3D @ac_ct_RANLIB@
+ac_ct_STRIP =3D @ac_ct_STRIP@
+am__fastdepCC_FALSE =3D @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE =3D @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE =3D @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE =3D @am__fastdepCXX_TRUE@
+am__include =3D @am__include@
+am__leading_dot =3D @am__leading_dot@
+am__quote =3D @am__quote@
+am__tar =3D @am__tar@
+am__untar =3D @am__untar@
+bindir =3D @bindir@
+build =3D @build@
+build_alias =3D @build_alias@
+build_cpu =3D @build_cpu@
+build_os =3D @build_os@
+build_vendor =3D @build_vendor@
+datadir =3D @datadir@
+exec_prefix =3D @exec_prefix@
+host =3D @host@
+host_alias =3D @host_alias@
+host_cpu =3D @host_cpu@
+host_os =3D @host_os@
+host_vendor =3D @host_vendor@
+includedir =3D @includedir@
+infodir =3D @infodir@
+install_sh =3D @install_sh@
+libdir =3D @libdir@
+libexecdir =3D @libexecdir@
+localstatedir =3D @localstatedir@
+mandir =3D @mandir@
+mkdir_p =3D @mkdir_p@
+oldincludedir =3D @oldincludedir@
+prefix =3D @prefix@
+program_transform_name =3D @program_transform_name@
+sbindir =3D @sbindir@
+sharedstatedir =3D @sharedstatedir@
+sysconfdir =3D @sysconfdir@
+target_alias =3D @target_alias@
+INCLUDES =3D -I$(top_srcdir)
+ifo_dump_SOURCES =3D ifo_dump.c
+ifo_dump_LDADD =3D $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CSS_=
LIBS@
+play_title_SOURCES =3D play_title.c
+play_title_LDADD =3D $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CS=
S_LIBS@
+title_info_SOURCES =3D title_info.c
+title_info_LDADD =3D $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CS=
S_LIBS@
+disc_id_SOURCES =3D disc_id.c
+disc_id_LDADD =3D $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CSS_L=
IBS@
+filestat_SOURCES =3D filestat.c
+filestat_LDADD =3D $(top_builddir)/dvdread/libdvdread.la @DL_LIBS@ @CSS_=
LIBS@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(a=
m__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__d=
epfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_D=
EPENDENCIES)
+ 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-noinstPROGRAMS:
+ @list=3D'$(noinst_PROGRAMS)'; for p in $$list; do \
+ f=3D`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+disc_id$(EXEEXT): $(disc_id_OBJECTS) $(disc_id_DEPENDENCIES)=20
+ @rm -f disc_id$(EXEEXT)
+ $(LINK) $(disc_id_LDFLAGS) $(disc_id_OBJECTS) $(disc_id_LDADD) $(LIBS)
+filestat$(EXEEXT): $(filestat_OBJECTS) $(filestat_DEPENDENCIES)=20
+ @rm -f filestat$(EXEEXT)
+ $(LINK) $(filestat_LDFLAGS) $(filestat_OBJECTS) $(filestat_LDADD) $(LIB=
S)
+ifo_dump$(EXEEXT): $(ifo_dump_OBJECTS) $(ifo_dump_DEPENDENCIES)=20
+ @rm -f ifo_dump$(EXEEXT)
+ $(LINK) $(ifo_dump_LDFLAGS) $(ifo_dump_OBJECTS) $(ifo_dump_LDADD) $(LIB=
S)
+play_title$(EXEEXT): $(play_title_OBJECTS) $(play_title_DEPENDENCIES)=20
+ @rm -f play_title$(EXEEXT)
+ $(LINK) $(play_title_LDFLAGS) $(play_title_OBJECTS) $(play_title_LDADD)=
$(LIBS)
+title_info$(EXEEXT): $(title_info_OBJECTS) $(title_info_DEPENDENCIES)=20
+ @rm -f title_info$(EXEEXT)
+ $(LINK) $(title_info_LDFLAGS) $(title_info_OBJECTS) $(title_info_LDADD)=
$(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/disc_id.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/filestat.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ifo_dump.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/play_title.Po at am__quote=
@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/title_info.Po at am__quote=
@
+
+.c.o:
+ at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo"=
-c -o $@ $<; \
+ at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; el=
se rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source=3D'$<' object=3D'$@' libtool=3D=
no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=3D$(DEPDIR) $(CCDEPMODE) $(depc=
omp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo"=
-c -o $@ `$(CYGPATH_W) '$<'`; \
+ at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; el=
se rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source=3D'$<' object=3D'$@' libtool=3D=
no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=3D$(DEPDIR) $(CCDEPMODE) $(depc=
omp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tp=
o" -c -o $@ $<; \
+ at am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; e=
lse rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source=3D'$<' object=3D'$@' libtool=3D=
yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=3D$(DEPDIR) $(CCDEPMODE) $(depc=
omp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list=3D'$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=3D`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] =3D 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=3D; \
+ here=3D`pwd`; \
+ list=3D'$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=3D`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] =3D 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=3D$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=3D; \
+ here=3D`pwd`; \
+ list=3D'$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=3D`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] =3D 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=3D`$(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=3D`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=3D`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list=3D'$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=3D`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=3D`echo "$$file" | sed "s|^$$topsrcdirstrip/|=
$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=3D.; else d=3D$(srcdir); =
fi; \
+ dir=3D`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" !=3D "$$file" && test "$$dir" !=3D "."; then \
+ dir=3D"/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=3D''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d !=3D $(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:
+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=3D"$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM=3D"$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=3D=
-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=3DSTRIPPROG=3D'$(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-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+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-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS 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-exec \
+ install-exec-am install-info install-info-am install-man \
+ 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-info-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:
Added: trunk/DvdMenuXtractor/dmx/libdvdread/src/disc_id.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/src/disc_id.c 2007-03-10 21:38:2=
9 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/src/disc_id.c 2007-03-10 21:41:3=
4 UTC (rev 1290)
@@ -0,0 +1,79 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (C) 2000 Bj=F6rn Englund <d4bjorn at dtek.chalmers.se>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <errno.h>
+#include <string.h>
+
+#include <dvdread/dvd_reader.h>
+
+static char *program_name;
+
+void usage(void)
+{
+ fprintf(stderr, "Usage: %s <dvd path>\n", program_name);
+}
+
+int main(int argc, char *argv[])
+{
+ int i;
+ int err =3D 0;
+ unsigned char disc_id[16];
+ dvd_reader_t *dvd;
+
+ program_name =3D argv[0];
+ =20
+ if(argc !=3D 2) {
+ usage();
+ return 1;
+ }
+
+ dvd =3D DVDOpen( argv[ 1 ] );
+ if( dvd ) {
+ if( DVDDiscID( dvd, disc_id ) =3D=3D 0) {
+ for(i =3D 0; i < 16; i++) {
+ printf( "%02x", disc_id[i] );
+ }
+ printf( "\n" );
+ } else {
+ fprintf( stderr, "Error getting disc id from disc '%s': %s\n",
+ argv[ 1 ], strerror(errno) );
+ =20
+ err =3D -1;
+ }
+
+ DVDClose(dvd);
+ } else {
+ fprintf( stderr, "Can't open disc '%s': %s\n",
+ argv[ 1 ], strerror(errno) );
+ err =3D -1;
+ }
+
+ DVDFinish();
+ return err; =20
+}
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/src/filestat.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/src/filestat.c 2007-03-10 21:38:=
29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/src/filestat.c 2007-03-10 21:41:=
34 UTC (rev 1290)
@@ -0,0 +1,174 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (C) 2006 Bj=F6rn Englund <d4bjorn at dtek.chalmers.se>
+ *=20
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 program is a demo of the DVDFileStat() call.
+ */
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <errno.h>
+#include <string.h>
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#include <dvdread/dvd_reader.h>
+#include <dvdread/ifo_read.h>
+
+static char *program_name;
+
+void usage(void)
+{
+ fprintf(stderr, "Usage: %s <dvd path>\n", program_name);
+}
+
+
+void print_stat(dvd_stat_t *buf)
+{
+ =20
+ printf("size: %lld", buf->size);
+ if(buf->nr_parts > 1) {
+ int n;
+ for(n =3D 0; n < buf->nr_parts; n++) {
+ printf(", [%lld]", buf->parts_size[n]);
+ }
+ }
+}
+
+void print_size(dvd_reader_t *dvd, int titlenum,=20
+ dvd_read_domain_t dom)=20
+{
+ dvd_stat_t buf;
+ char filename[256];
+ =20
+ if(titlenum =3D=3D 0) {
+ switch(dom) {
+ case DVD_READ_INFO_FILE:
+ sprintf(filename, "VIDEO_TS.IFO");
+ break;
+ case DVD_READ_INFO_BACKUP_FILE:
+ sprintf(filename, "VIDEO_TS.BUP");
+ break;
+ case DVD_READ_MENU_VOBS:
+ sprintf(filename, "VIDEO_TS.VOB");
+ break;
+ default:
+ sprintf(filename, "illegal");
+ }
+ } else {
+ switch(dom) {
+ case DVD_READ_INFO_FILE:
+ sprintf(filename, "VTS_%02d_0.IFO", titlenum);
+ break;
+ case DVD_READ_INFO_BACKUP_FILE:
+ sprintf(filename, "VTS_%02d_0.BUP", titlenum);
+ break;
+ case DVD_READ_MENU_VOBS:
+ sprintf(filename, "VTS_%02d_0.VOB", titlenum);
+ break;
+ case DVD_READ_TITLE_VOBS:
+ sprintf(filename, "VTS_%02d_[1-9].VOB", titlenum);
+ break;
+ default:
+ sprintf(filename, "illegal");
+ } =20
+ }
+
+ if(!DVDFileStat(dvd, titlenum, dom, &buf)) {
+ printf("\n%s: ", filename);
+ print_stat(&buf);
+ } else {
+ fprintf(stderr, "stat(%s): %s\n", filename, strerror(errno));
+ }
+}
+
+
+int main(int argc, char *argv[])
+{
+ //int i;
+ int err =3D 0;
+
+ dvd_reader_t *dvd;
+
+ program_name =3D argv[0];
+ =20
+ if(argc !=3D 2) {
+ usage();
+ return 1;
+ }
+
+ dvd =3D DVDOpen( argv[ 1 ] );
+
+ if( dvd ) {
+ ifo_handle_t *vmg_ifo;
+ int title_sets;
+ //dvd_stat_t buf;
+ int n;
+
+
+ vmg_ifo =3D ifoOpen( dvd, 0);
+ if(!vmg_ifo) {
+ return 1;
+ }
+
+ title_sets =3D vmg_ifo->vmgi_mat->vmg_nr_of_title_sets;
+ =20
+ ifoClose(vmg_ifo);
+
+ // VIDEO_TS.IFO
+ print_size(dvd, 0, DVD_READ_INFO_FILE);
+ // VIDEO_TS.VOB
+ print_size(dvd, 0, DVD_READ_MENU_VOBS);
+ // VIDEO_TS.BUP
+ print_size(dvd, 0, DVD_READ_INFO_BACKUP_FILE);
+
+ for(n =3D 0; n < title_sets; n++) {
+ // foreach titleset
+ // VTS_??_0.IFO
+ print_size(dvd, n+1, DVD_READ_INFO_FILE);
+ // VTS_??_0.VOB
+ print_size(dvd, n+1, DVD_READ_MENU_VOBS);
+ // VTS_??_[1-9].VOB
+ print_size(dvd, n+1, DVD_READ_TITLE_VOBS);
+ // VTS_??_0.BUP
+ print_size(dvd, n+1, DVD_READ_INFO_BACKUP_FILE);
+ }
+ printf("\n");
+ DVDClose(dvd);
+ } else {
+ fprintf( stderr, "Can't open disc '%s': %s\n",
+ argv[ 1 ], strerror(errno) );
+ err =3D -1;
+ }
+
+ DVDFinish();
+
+ return err; =20
+}
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/src/ifo_dump.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/src/ifo_dump.c 2007-03-10 21:38:=
29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/src/ifo_dump.c 2007-03-10 21:41:=
34 UTC (rev 1290)
@@ -0,0 +1,68 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (C) 2000 Bj=F6rn Englund <d4bjorn at dtek.chalmers.se>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public 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 "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#include <dvdread/dvd_reader.h>
+#include <dvdread/ifo_print.h>
+
+static char *program_name;
+
+void usage(void)
+{
+ fprintf(stderr, "Usage: %s <dvd path> <title number>\n", program_name)=
;
+}
+
+int main(int argc, char *argv[])
+{
+ dvd_reader_t *dvd;
+ program_name =3D argv[0];
+ =20
+ if(argc !=3D 3) {
+ usage();
+ return 1;
+ }
+
+ dvd =3D DVDOpen( argv[ 1 ] );
+ if( !dvd ) {
+ fprintf( stderr, "Can't open disc %s!\n", argv[ 1 ] );
+ return -1;
+ }
+
+ ifoPrint( dvd, atoi( argv[ 2 ] ) );
+ DVDClose(dvd);
+
+ DVDFinish(); //to keep memory checkers from complaining=20
+ return 0; =20
+}
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/src/play_title.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/src/play_title.c 2007-03-10 21:3=
8:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/src/play_title.c 2007-03-10 21:4=
1:34 UTC (rev 1290)
@@ -0,0 +1,302 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (C) 2001 Billy Biggs <vektor at dumbterm.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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#include <dvdread/dvd_reader.h>
+#include <dvdread/ifo_types.h>
+#include <dvdread/ifo_read.h>
+#include <dvdread/dvd_udf.h>
+#include <dvdread/nav_read.h>
+#include <dvdread/nav_print.h>
+
+
+/**
+ * Returns true if the pack is a NAV pack. This check is clearly insuff=
icient,
+ * and sometimes we incorrectly think that valid other packs are NAV pac=
ks. I
+ * need to make this stronger.
+ */
+int is_nav_pack( unsigned char *buffer )
+{
+ return ( buffer[ 41 ] =3D=3D 0xbf && buffer[ 1027 ] =3D=3D 0xbf );
+}
+
+
+int main( int argc, char **argv )
+{
+ int titleid, chapid, pgc_id, len, start_cell, cur_cell;
+ unsigned int cur_pack;
+ int angle, ttn, pgn, next_cell;
+ unsigned char data[ 1024 * DVD_VIDEO_LB_LEN ];
+ dvd_reader_t *dvd;
+ dvd_file_t *title;
+ ifo_handle_t *vmg_file;
+ tt_srpt_t *tt_srpt;
+ ifo_handle_t *vts_file;
+ vts_ptt_srpt_t *vts_ptt_srpt;
+ pgc_t *cur_pgc;
+
+
+ /**
+ * Usage.
+ */
+ if( argc !=3D 5 ) {
+ fprintf( stderr, "Usage: %s <dvd path> <title number> "
+ "<start chapter> <angle>\n\n"
+ "Title Number [1-X]: Movie Title on Disc.\n"
+ "Start Chapter [1-X]: Chapter to start at.\n"
+ "Angle Number [1-X]: Which angle to show.\n\n"
+ "This app outputs an MPEG2 system stream.\n"
+ "Make sure you redirect the output somewhere.\n=
\n"
+ "Example: %s /dev/dvd 1 1 1 | xine stdin://mpeg=
2\n",
+ argv[ 0 ], argv[ 0 ] );
+ return -1;
+ }
+
+ titleid =3D atoi( argv[ 2 ] ) - 1;
+ chapid =3D atoi( argv[ 3 ] ) - 1;
+ angle =3D atoi( argv[ 4 ] ) - 1;
+
+
+ /**
+ * Open the disc.
+ */
+ dvd =3D DVDOpen( argv[ 1 ] );
+ if( !dvd ) {
+ fprintf( stderr, "Couldn't open DVD: %s\n", argv[ 1 ] );
+ return -1;
+ }
+
+
+ /**
+ * Load the video manager to find out the information about the titl=
es on
+ * this disc.
+ */
+ vmg_file =3D ifoOpen( dvd, 0 );
+ if( !vmg_file ) {
+ fprintf( stderr, "Can't open VMG info.\n" );
+ DVDClose( dvd );
+ return -1;
+ }
+ tt_srpt =3D vmg_file->tt_srpt;
+
+
+ /**
+ * Make sure our title number is valid.
+ */
+ fprintf( stderr, "There are %d titles on this DVD.\n",
+ tt_srpt->nr_of_srpts );
+ if( titleid < 0 || titleid >=3D tt_srpt->nr_of_srpts ) {
+ fprintf( stderr, "Invalid title %d.\n", titleid + 1 );
+ ifoClose( vmg_file );
+ DVDClose( dvd );
+ return -1;
+ }
+
+
+ /**
+ * Make sure the chapter number is valid for this title.
+ */
+ fprintf( stderr, "There are %d chapters in this title.\n",
+ tt_srpt->title[ titleid ].nr_of_ptts );
+
+ if( chapid < 0 || chapid >=3D tt_srpt->title[ titleid ].nr_of_ptts )=
{
+ fprintf( stderr, "Invalid chapter %d\n", chapid + 1 );
+ ifoClose( vmg_file );
+ DVDClose( dvd );
+ return -1;
+ }
+
+
+ /**
+ * Make sure the angle number is valid for this title.
+ */
+ fprintf( stderr, "There are %d angles in this title.\n",
+ tt_srpt->title[ titleid ].nr_of_angles );
+ if( angle < 0 || angle >=3D tt_srpt->title[ titleid ].nr_of_angles )=
{
+ fprintf( stderr, "Invalid angle %d\n", angle + 1 );
+ ifoClose( vmg_file );
+ DVDClose( dvd );
+ return -1;
+ }
+
+
+ /**
+ * Load the VTS information for the title set our title is in.
+ */
+ vts_file =3D ifoOpen( dvd, tt_srpt->title[ titleid ].title_set_nr );
+ if( !vts_file ) {
+ fprintf( stderr, "Can't open the title %d info file.\n",
+ tt_srpt->title[ titleid ].title_set_nr );
+ ifoClose( vmg_file );
+ DVDClose( dvd );
+ return -1;
+ }
+
+
+ /**
+ * Determine which program chain we want to watch. This is based on=
the
+ * chapter number.
+ */
+ ttn =3D tt_srpt->title[ titleid ].vts_ttn;
+ vts_ptt_srpt =3D vts_file->vts_ptt_srpt;
+ pgc_id =3D vts_ptt_srpt->title[ ttn - 1 ].ptt[ chapid ].pgcn;
+ pgn =3D vts_ptt_srpt->title[ ttn - 1 ].ptt[ chapid ].pgn;
+ cur_pgc =3D vts_file->vts_pgcit->pgci_srp[ pgc_id - 1 ].pgc;
+ start_cell =3D cur_pgc->program_map[ pgn - 1 ] - 1;
+
+
+ /**
+ * We've got enough info, time to open the title set data.
+ */
+ title =3D DVDOpenFile( dvd, tt_srpt->title[ titleid ].title_set_nr,
+ DVD_READ_TITLE_VOBS );
+ if( !title ) {
+ fprintf( stderr, "Can't open title VOBS (VTS_%02d_1.VOB).\n",
+ tt_srpt->title[ titleid ].title_set_nr );
+ ifoClose( vts_file );
+ ifoClose( vmg_file );
+ DVDClose( dvd );
+ return -1;
+ }
+
+ /**
+ * Playback by cell in this pgc, starting at the cell for our chapte=
r.
+ */
+ next_cell =3D start_cell;
+ for( cur_cell =3D start_cell; next_cell < cur_pgc->nr_of_cells; ) {
+
+ cur_cell =3D next_cell;
+
+ /* Check if we're entering an angle block. */
+ if( cur_pgc->cell_playback[ cur_cell ].block_type
+ =3D=3D BLOCK_TYPE_ANGLE_BLOCK ) =
{
+ int i;
+
+ cur_cell +=3D angle;
+ for( i =3D 0;; ++i ) {
+ if( cur_pgc->cell_playback[ cur_cell + i ].block_mode
+ =3D=3D BLOCK_MODE_LAST_CELL ) =
{
+ next_cell =3D cur_cell + i + 1;
+ break;
+ }
+ }
+ } else {
+ next_cell =3D cur_cell + 1;
+ }
+
+
+ /**
+ * We loop until we're out of this cell.
+ */
+ for( cur_pack =3D cur_pgc->cell_playback[ cur_cell ].first_secto=
r;
+ cur_pack < cur_pgc->cell_playback[ cur_cell ].last_sector; =
) {
+
+ dsi_t dsi_pack;
+ unsigned int next_vobu, next_ilvu_start, cur_output_size;
+
+
+ /**
+ * Read NAV packet.
+ */
+ len =3D DVDReadBlocks( title, (int) cur_pack, 1, data );
+ if( len !=3D 1 ) {
+ fprintf( stderr, "Read failed for block %d\n", cur_pack =
);
+ ifoClose( vts_file );
+ ifoClose( vmg_file );
+ DVDCloseFile( title );
+ DVDClose( dvd );
+ return -1;
+ }
+ assert( is_nav_pack( data ) );
+
+
+ /**
+ * Parse the contained dsi packet.
+ */
+ navRead_DSI( &dsi_pack, &(data[ DSI_START_BYTE ]) );
+ assert( cur_pack =3D=3D dsi_pack.dsi_gi.nv_pck_lbn );
+
+
+ /**
+ * Determine where we go next. These values are the ones we=
mostly
+ * care about.
+ */
+ next_ilvu_start =3D cur_pack
+ + dsi_pack.sml_agli.data[ angle ].address;
+ cur_output_size =3D dsi_pack.dsi_gi.vobu_ea;
+
+
+ /**
+ * If we're not at the end of this cell, we can determine th=
e next
+ * VOBU to display using the VOBU_SRI information section of=
the
+ * DSI. Using this value correctly follows the current angl=
e,
+ * avoiding the doubled scenes in The Matrix, and makes our =
life
+ * really happy.
+ *
+ * Otherwise, we set our next address past the end of this c=
ell to
+ * force the code above to go to the next cell in the progra=
m.
+ */
+ if( dsi_pack.vobu_sri.next_vobu !=3D SRI_END_OF_CELL ) {
+ next_vobu =3D cur_pack
+ + ( dsi_pack.vobu_sri.next_vobu & 0x7fffffff=
);
+ } else {
+ next_vobu =3D cur_pack + cur_output_size + 1;
+ }
+
+ assert( cur_output_size < 1024 );
+ cur_pack++;
+
+ /**
+ * Read in and output cursize packs.
+ */
+ len =3D DVDReadBlocks( title, (int)cur_pack, cur_output_size=
, data );
+ if( len !=3D (int) cur_output_size ) {
+ fprintf( stderr, "Read failed for %d blocks at %d\n",
+ cur_output_size, cur_pack );
+ ifoClose( vts_file );
+ ifoClose( vmg_file );
+ DVDCloseFile( title );
+ DVDClose( dvd );
+ return -1;
+ }
+
+ fwrite( data, cur_output_size, DVD_VIDEO_LB_LEN, stdout );
+ cur_pack =3D next_vobu;
+ }
+ }
+
+ ifoClose( vts_file );
+ ifoClose( vmg_file );
+ DVDCloseFile( title );
+ DVDClose( dvd );
+ DVDFinish();
+ return 0;
+}
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/src/src.proj
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/src/src.proj 2007-03-10 21:38:29=
UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/src/src.proj 2007-03-10 21:41:34=
UTC (rev 1290)
@@ -0,0 +1,51 @@
+#include "*/*.proj"
+
+CON disc_id
+{
+ USE dvdread
+
+ SOURCE disc_id.c
+ =20
+ INCLUDE(TARGET_WIN) ../win32
+ INCLUDE ..
+}
+
+CON filestat
+{
+ USE dvdread
+
+ SOURCE filestat.c
+ =20
+ INCLUDE(TARGET_WIN) ../win32
+ INCLUDE ..
+}
+
+CON ifo_dump
+{
+ USE dvdread
+
+ SOURCE ifo_dump.c
+ =20
+ INCLUDE(TARGET_WIN) ../win32
+ INCLUDE ..
+}
+
+CON play_title
+{
+ USE dvdread
+
+ SOURCE play_title.c
+ =20
+ INCLUDE(TARGET_WIN) ../win32
+ INCLUDE ..
+}
+
+CON title_info
+{
+ USE dvdread
+
+ SOURCE title_info.c
+ =20
+ INCLUDE(TARGET_WIN) ../win32
+ INCLUDE ..
+}
Added: trunk/DvdMenuXtractor/dmx/libdvdread/src/title_info.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/src/title_info.c 2007-03-10 21:3=
8:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/src/title_info.c 2007-03-10 21:4=
1:34 UTC (rev 1290)
@@ -0,0 +1,112 @@
+/* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */
+/*
+ * Copyright (C) 2001 Billy Biggs <vektor at dumbterm.net>,
+ * H=E5kan Hjort <d95hjort at dtek.chalmers.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You 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 "config.h"
+
+#include <stdio.h>
+
+#if defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+#include <stdint.h>
+#endif
+
+#include <dvdread/dvd_reader.h>
+#include <dvdread/ifo_types.h>
+#include <dvdread/ifo_read.h>
+
+int main( int argc, char **argv )
+{
+ dvd_reader_t *dvd;
+ ifo_handle_t *ifo_file;
+ tt_srpt_t *tt_srpt;
+ int i, j;
+
+ /**
+ * Usage.
+ */
+ if( argc !=3D 2 ) {
+ fprintf( stderr, "Usage: %s <dvd path>\n", argv[ 0 ] );
+ return -1;
+ }
+
+ dvd =3D DVDOpen( argv[ 1 ] );
+ if( !dvd ) {
+ fprintf( stderr, "Couldn't open DVD: %s\n", argv[ 1 ] );
+ return -1;
+ }
+
+ ifo_file =3D ifoOpen( dvd, 0 );
+ if( !ifo_file ) {
+ fprintf( stderr, "Can't open VMG info.\n" );
+ DVDClose( dvd );
+ return -1;
+ }
+ tt_srpt =3D ifo_file->tt_srpt;
+
+ printf( "There are %d titles.\n", tt_srpt->nr_of_srpts );
+ for( i =3D 0; i < tt_srpt->nr_of_srpts; ++i ) {
+ ifo_handle_t *vts_file;
+ vts_ptt_srpt_t *vts_ptt_srpt;
+ pgc_t *cur_pgc;
+ int vtsnum, ttnnum, pgcnum, chapts;
+=09
+ vtsnum =3D tt_srpt->title[ i ].title_set_nr;
+ ttnnum =3D tt_srpt->title[ i ].vts_ttn;
+ chapts =3D tt_srpt->title[ i ].nr_of_ptts;
+=09
+ printf( "\nTitle %d:\n", i + 1 );
+ printf( "\tIn VTS: %d [TTN %d]\n", vtsnum, ttnnum );
+ printf( "\n" );
+ printf( "\tTitle has %d chapters and %d angles\n", chapts,
+ tt_srpt->title[ i ].nr_of_angles );
+
+ vts_file =3D ifoOpen( dvd, vtsnum );
+ if( !vts_file ) {
+ fprintf( stderr, "Can't open info file for title %d.\n", vts=
num );
+ DVDClose( dvd );
+ return -1;
+ }
+
+ vts_ptt_srpt =3D vts_file->vts_ptt_srpt;
+ for( j =3D 0; j < chapts; ++j ) {
+ int start_cell;
+ int pgn;
+
+ pgcnum =3D vts_ptt_srpt->title[ ttnnum - 1 ].ptt[ j ].pgcn;
+ pgn =3D vts_ptt_srpt->title[ ttnnum - 1 ].ptt[ j ].pgn;
+ cur_pgc =3D vts_file->vts_pgcit->pgci_srp[ pgcnum - 1 ].pgc;
+ start_cell =3D cur_pgc->program_map[ pgn - 1 ] - 1;
+=09
+ printf( "\tChapter %3d [PGC %2d, PG %2d] starts at Cell %2d =
[sector %x-%x]\n",
+ j, pgcnum, pgn, start_cell,
+ cur_pgc->cell_playback[ start_cell ].first_sector,
+ cur_pgc->cell_playback[ start_cell ].last_sector );
+ }
+
+ ifoClose( vts_file );
+ }
+
+ ifoClose( ifo_file );
+ DVDClose( dvd );
+ DVDFinish();
+ return 0;
+}
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/win32/config.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/win32/config.h 2007-03-10 21:38:=
29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/win32/config.h 2007-03-10 21:41:=
34 UTC (rev 1290)
@@ -0,0 +1,95 @@
+/* config.h. Generated manually from config.h.in */
+
+/* Define to 1 if you have the <byteswap.h> header file. */
+#undef HAVE_BYTESWAP_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <dvdcss/dvdcss.h> header file. */
+#undef HAVE_DVDCSS_DVDCSS_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/bswap.h> header file. */
+#undef HAVE_SYS_BSWAP_H
+
+/* Define to 1 if you have the <sys/endian.h> header file. */
+#undef HAVE_SYS_ENDIAN_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if the system has the type `uintptr_t'. */
+#define HAVE_UINTPTR_T 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#define PACKAGE libdvdread-1.9.7
+
+/* Define to the address where bug reports for this package should be se=
nt. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME libdvdread
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING libdvdread-1.9.7
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION 1.9.7
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION 1.9.7
+
+/* 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
+
+/* Have a Mac OS X system */
+#undef __DARWIN__
+
+/* 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
+#define inline __inline
+#endif
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+//#undef size_t
Added: trunk/DvdMenuXtractor/dmx/libdvdread/win32/dirent.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/win32/dirent.c 2007-03-10 21:38:=
29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/win32/dirent.c 2007-03-10 21:41:=
34 UTC (rev 1290)
@@ -0,0 +1,297 @@
+/*
+ * dirent.c
+ *
+ * Derived from DIRLIB.C by Matt J. Weinstein=20
+ * This note appears in the DIRLIB.H
+ * DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89
+ *
+ * Updated by Jeremy Bettis <jeremy at hksys.com>
+ * Significantly revised and rewinddir, seekdir and telldir added by Col=
in
+ * Peters <colin at fu.is.saga-u.ac.jp>
+ *
+ * Resource leaks fixed by <steve.lhomme at free.fr>
+ *
+ *=09
+ * $Revision: 1.1 $
+ * $Author: ds $
+ * $Date: 2004/04/29 02:52:21 $
+ *
+ */
+
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <io.h>
+#include <direct.h>
+#include "dirent.h"
+#define SLASH "\\"
+#define SUFFIX "*"
+
+#include <stdio.h>
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h> /* for GetFileAttributes */
+
+/*
+ * opendir
+ *
+ * Returns a pointer to a DIR structure appropriately filled in to begin
+ * searching a directory.
+ */
+DIR *
+opendir (const char * szPath)
+{
+ DIR *nd;
+ unsigned int rc;
+ char szFullPath[MAX_PATH];
+
+ errno =3D 0;
+
+ if (!szPath) {
+ errno =3D EFAULT;
+ return (DIR *) 0;
+ }
+
+ if (szPath[0] =3D=3D '\0') {
+ errno =3D ENOTDIR;
+ return (DIR *) 0;
+ }
+
+ /* Attempt to determine if the given path really is a directory. */
+ rc =3D GetFileAttributesA (szPath);
+ if (rc =3D=3D (unsigned int) -1) {
+ /* call GetLastError for more error info */
+ errno =3D ENOENT;
+ return (DIR *) 0;
+ }
+ if (!(rc & FILE_ATTRIBUTE_DIRECTORY)) {
+ /* Error, entry exists but not a directory. */
+ errno =3D ENOTDIR;
+ return (DIR *) 0;
+ }
+
+ /* Make an absolute pathname. */
+ _fullpath (szFullPath, szPath, MAX_PATH);
+
+ /* Allocate enough space to store DIR structure and the complete
+ * directory path given. */
+ nd =3D (DIR *) malloc (sizeof (DIR) + (strlen (szFullPath) +
+ strlen (SLASH) + strlen (SUFFIX) + 1) * sizeof (char));
+
+ if (!nd) {
+ /* Error, out of memory. */
+ errno =3D ENOMEM;
+ return (DIR *) 0;
+ }
+
+ /* Create the search expression. */
+ strcpy (nd->dd_name, szFullPath);
+
+ /* Add on a slash if the path does not end with one. */
+ if (nd->dd_name[0] !=3D '\0' &&
+ nd->dd_name[strlen (nd->dd_name) - 1] !=3D '/'&&
+ nd->dd_name[strlen (nd->dd_name) - 1] !=3D '\\') {
+ strcat_s (nd->dd_name, MAX_PATH, SLASH);
+ }
+
+ /* Add on the search pattern */
+ strcat (nd->dd_name, SUFFIX);
+
+ /* Initialize handle to -1 so that a premature closedir doesn't try
+ * to call _findclose on it. */
+ nd->dd_handle =3D -1;
+
+ /* Initialize the status. */
+ nd->dd_stat =3D 0;
+
+ /* Initialize the dirent structure. ino and reclen are invalid under
+ * Win32, and name simply points at the appropriate part of the
+ * findfirst_t structure. */
+ nd->dd_dir.d_ino =3D 0;
+ nd->dd_dir.d_reclen =3D 0;
+ nd->dd_dir.d_namlen =3D 0;
+ // Added by jcsston 02/04/2004, memset was writing to a bad pointer
+ nd->dd_dir.d_name =3D malloc (FILENAME_MAX);
+ // End add
+ memset (nd->dd_dir.d_name, 0, FILENAME_MAX);
+
+ return nd;
+}
+
+
+/*
+ * readdir
+ *
+ * Return a pointer to a dirent structure filled with the information on=
the
+ * next entry in the directory.
+ */
+struct dirent *
+readdir (DIR * dirp)
+{
+ errno =3D 0;
+
+ /* Check for valid DIR struct. */
+ if (!dirp) {
+ errno =3D EFAULT;
+ return (struct dirent *) 0;
+ }
+
+ if (dirp->dd_stat < 0) {
+ /* We have already returned all files in the directory
+ * (or the structure has an invalid dd_stat). */
+ return (struct dirent *) 0;
+ } else if (dirp->dd_stat =3D=3D 0) {
+ /* We haven't started the search yet. */
+ /* Start the search */
+ dirp->dd_handle =3D _findfirst (dirp->dd_name, &(dirp->dd_dta));
+
+ if (dirp->dd_handle =3D=3D -1) {
+ /* Whoops! Seems there are no files in that
+ * directory. */
+ dirp->dd_stat =3D -1;
+ } else {
+ dirp->dd_stat =3D 1;
+ }
+ } else {
+ /* Get the next search entry. */
+ if (_findnext (dirp->dd_handle, &(dirp->dd_dta))) {
+ /* We are off the end or otherwise error. =20
+ _findnext sets errno to ENOENT if no more file
+ Undo this. */
+ DWORD winerr =3D GetLastError ();
+
+ if (winerr =3D=3D ERROR_NO_MORE_FILES)
+ errno =3D 0;
+ _findclose (dirp->dd_handle);
+ dirp->dd_handle =3D -1;
+ dirp->dd_stat =3D -1;
+ } else {
+ /* Update the status to indicate the correct
+ * number. */
+ dirp->dd_stat++;
+ }
+ }
+
+ if (dirp->dd_stat > 0) {
+ /* Successfully got an entry. Everything about the file is
+ * already appropriately filled in except the length of the
+ * file name. */
+ dirp->dd_dir.d_namlen =3D strlen (dirp->dd_dta.name);
+ strcpy (dirp->dd_dir.d_name, dirp->dd_dta.name);
+ return &dirp->dd_dir;
+ }
+
+ return (struct dirent *) 0;
+}
+
+
+/*
+ * closedir
+ *
+ * Frees up resources allocated by opendir.
+ */
+int
+closedir (DIR * dirp)
+{
+ int rc;
+
+ errno =3D 0;
+ rc =3D 0;
+
+ if (!dirp) {
+ errno =3D EFAULT;
+ return -1;
+ }
+
+ if (dirp->dd_handle !=3D -1) {
+ rc =3D _findclose (dirp->dd_handle);
+ }
+
+ if (dirp->dd_dir.d_name)
+ free(dirp->dd_dir.d_name);
+
+ /* Delete the dir structure. */
+ free (dirp);
+
+ return rc;
+}
+
+/*
+ * rewinddir
+ *
+ * Return to the beginning of the directory "stream". We simply call fin=
dclose
+ * and then reset things like an opendir.
+ */
+void
+rewinddir (DIR * dirp)
+{
+ errno =3D 0;
+
+ if (!dirp) {
+ errno =3D EFAULT;
+ return;
+ }
+
+ if (dirp->dd_handle !=3D -1) {
+ _findclose (dirp->dd_handle);
+ }
+
+ dirp->dd_handle =3D -1;
+ dirp->dd_stat =3D 0;
+}
+
+/*
+ * telldir
+ *
+ * Returns the "position" in the "directory stream" which can be used wi=
th
+ * seekdir to go back to an old entry. We simply return the value in sta=
t.
+ */
+long
+telldir (DIR * dirp)
+{
+ errno =3D 0;
+
+ if (!dirp) {
+ errno =3D EFAULT;
+ return -1;
+ }
+ return dirp->dd_stat;
+}
+
+/*
+ * seekdir
+ *
+ * Seek to an entry previously returned by telldir. We rewind the direct=
ory
+ * and call readdir repeatedly until either dd_stat is the position numb=
er
+ * or -1 (off the end). This is not perfect, in that the directory may
+ * have changed while we weren't looking. But that is probably the case =
with
+ * any such system.
+ */
+void
+seekdir (DIR * dirp, long lPos)
+{
+ errno =3D 0;
+
+ if (!dirp) {
+ errno =3D EFAULT;
+ return;
+ }
+
+ if (lPos < -1) {
+ /* Seeking to an invalid position. */
+ errno =3D EINVAL;
+ return;
+ } else if (lPos =3D=3D -1) {
+ /* Seek past end. */
+ if (dirp->dd_handle !=3D -1) {
+ _findclose (dirp->dd_handle);
+ }
+ dirp->dd_handle =3D -1;
+ dirp->dd_stat =3D -1;
+ } else {
+ /* Rewind and read forward to the appropriate index. */
+ rewinddir (dirp);
+
+ while ((dirp->dd_stat < lPos) && readdir (dirp));
+ }
+}
Added: trunk/DvdMenuXtractor/dmx/libdvdread/win32/dirent.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/win32/dirent.h 2007-03-10 21:38:=
29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/win32/dirent.h 2007-03-10 21:41:=
34 UTC (rev 1290)
@@ -0,0 +1,147 @@
+/*
+ * DIRENT.H (formerly DIRLIB.H)
+ *
+ * by M. J. Weinstein Released to public domain 1-Jan-89
+ *
+ * Because I have heard that this feature (opendir, readdir, closedir)
+ * it so useful for programmers coming from UNIX or attempting to port
+ * UNIX code, and because it is reasonably light weight, I have included
+ * it in the Mingw32 package. I have also added an implementation of
+ * rewinddir, seekdir and telldir.
+ * - Colin Peters <colin at bird.fu.is.saga-u.ac.jp>
+ *
+ * This code is distributed in the hope that is will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includeds but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * $Revision: 1.1 $
+ * $Author: ds $
+ * $Date: 2004/04/29 02:52:21 $
+ *
+ */
+
+#ifndef __STRICT_ANSI__
+
+#ifndef _DIRENT_H_
+#define _DIRENT_H_
+
+/* All the headers include this file. */
+/*#include <_mingw.h>*/
+
+#include <io.h>
+
+#ifndef RC_INVOKED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct dirent
+{
+ long d_ino; /* Always zero. */
+ unsigned short d_reclen; /* Always zero. */
+ unsigned short d_namlen; /* Length of name in d_name. */
+ char* d_name; /* File name. */
+ /* NOTE: The name in the dirent structure points to the name in the
+ * finddata_t structure in the DIR. */
+};
+
+/*
+ * This is an internal data structure. Good programmers will not use it
+ * except as an argument to one of the functions below.
+ * dd_stat field is now int (was short in older versions).
+ */
+typedef struct
+{
+ /* disk transfer area for this dir */
+ struct _finddata_t dd_dta;
+
+ /* dirent struct to return from dir (NOTE: this makes this thread
+ * safe as long as only one thread uses a particular DIR struct at
+ * a time) */
+ struct dirent dd_dir;
+
+ /* _findnext handle */
+ long dd_handle;
+
+ /*
+ * Status of search:
+ * 0 =3D not started yet (next entry to read is first entry)
+ * -1 =3D off the end
+ * positive =3D 0 based index of next entry
+ */
+ int dd_stat;
+
+ /* given path for dir with search pattern (struct is extended) */
+ char dd_name[1];
+} DIR;
+
+DIR* opendir (const char*);
+struct dirent* readdir (DIR*);
+int closedir (DIR*);
+void rewinddir (DIR*);
+long telldir (DIR*);
+void seekdir (DIR*, long);
+
+
+/* wide char versions */
+
+struct _wdirent
+{
+ long d_ino; /* Always zero. */
+ unsigned short d_reclen; /* Always zero. */
+ unsigned short d_namlen; /* Length of name in d_name. */
+ wchar_t* d_name; /* File name. */
+ /* NOTE: The name in the dirent structure points to the name in the * =
wfinddata_t structure in the _WDIR. */
+};
+
+/*
+ * This is an internal data structure. Good programmers will not use it
+ * except as an argument to one of the functions below.
+ */
+typedef struct
+{
+ /* disk transfer area for this dir */
+ struct _wfinddata_t dd_dta;
+
+ /* dirent struct to return from dir (NOTE: this makes this thread
+ * safe as long as only one thread uses a particular DIR struct at
+ * a time) */
+ struct _wdirent dd_dir;
+
+ /* _findnext handle */
+ long dd_handle;
+
+ /*
+ * Status of search:
+ * 0 =3D not started yet (next entry to read is first entry)
+ * -1 =3D off the end
+ * positive =3D 0 based index of next entry
+ */
+ int dd_stat;
+
+ /* given path for dir with search pattern (struct is extended) */
+ wchar_t dd_name[1];
+} _WDIR;
+
+
+
+_WDIR* _wopendir (const wchar_t*);
+struct _wdirent* _wreaddir (_WDIR*);
+int _wclosedir (_WDIR*);
+void _wrewinddir (_WDIR*);
+long _wtelldir (_WDIR*);
+void _wseekdir (_WDIR*, long);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* Not RC_INVOKED */
+
+#endif /* Not _DIRENT_H_ */
+
+#endif /* Not __STRICT_ANSI__ */
+
Added: trunk/DvdMenuXtractor/dmx/libdvdread/win32/inttypes.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/win32/inttypes.h 2007-03-10 21:3=
8:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/win32/inttypes.h 2007-03-10 21:4=
1:34 UTC (rev 1290)
@@ -0,0 +1,303 @@
+// ISO C9x compliant inttypes.h for Miscrosoft Visual Studio
+// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124=20
+//=20
+// Copyright (c) 2006 Alexander Chemeris
+//=20
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions ar=
e met:
+//=20
+// 1. Redistributions of source code must retain the above copyright n=
otice,
+// this list of conditions and the following disclaimer.
+//=20
+// 2. Redistributions in binary form must reproduce the above copyrigh=
t
+// notice, this list of conditions and the following disclaimer in =
the
+// documentation and/or other materials provided with the distribut=
ion.
+//=20
+// 3. The name of the author may be used to endorse or promote product=
s
+// derived from this software without specific prior written permis=
sion.
+//=20
+// 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 LIMI=
TED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PR=
OFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILI=
TY,=20
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE =
OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN I=
F
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//=20
+////////////////////////////////////////////////////////////////////////=
///////
+
+#ifndef _MSC_VER // [
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif // _MSC_VER ]
+
+#ifndef _MSC_INTTYPES_H_ // [
+#define _MSC_INTTYPES_H_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#include "stdint.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// 7.8 Format conversion of integer types
+
+typedef struct {
+ intmax_t quot;
+ intmax_t rem;
+} imaxdiv_t;
+
+// 7.8.1 Macros for format specifiers
+
+// The fprintf macros for signed integers are:
+#define PRId8 "d"
+#define PRIi8 "i"
+#define PRIdLEAST8 "d"
+#define PRIiLEAST8 "i"
+#define PRIdFAST8 "d"
+#define PRIiFAST8 "i"
+
+#define PRId16 "hd"
+#define PRIi16 "hi"
+#define PRIdLEAST16 "hd"
+#define PRIiLEAST16 "hi"
+#define PRIdFAST16 "hd"
+#define PRIiFAST16 "hi"
+
+#define PRId32 "I32d"
+#define PRIi32 "I32i"
+#define PRIdLEAST32 "I32d"
+#define PRIiLEAST32 "I32i"
+#define PRIdFAST32 "I32d"
+#define PRIiFAST32 "I32i"
+
+#define PRId64 "I64d"
+#define PRIi64 "I64i"
+#define PRIdLEAST64 "I64d"
+#define PRIiLEAST64 "I64i"
+#define PRIdFAST64 "I64d"
+#define PRIiFAST64 "I64i"
+
+#define PRIdMAX "I64d"
+#define PRIiMAX "I64i"
+
+#define PRIdPTR "Id"
+#define PRIiPTR "Ii"
+
+// The fprintf macros for unsigned integers are:
+#define PRIo8 "o"
+#define PRIu8 "u"
+#define PRIx8 "x"
+#define PRIX8 "X"
+#define PRIoLEAST8 "o"
+#define PRIuLEAST8 "u"
+#define PRIxLEAST8 "x"
+#define PRIXLEAST8 "X"
+#define PRIoFAST8 "o"
+#define PRIuFAST8 "u"
+#define PRIxFAST8 "x"
+#define PRIXFAST8 "X"
+
+#define PRIo16 "ho"
+#define PRIu16 "hu"
+#define PRIx16 "hx"
+#define PRIX16 "hX"
+#define PRIoLEAST16 "ho"
+#define PRIuLEAST16 "hu"
+#define PRIxLEAST16 "hx"
+#define PRIXLEAST16 "hX"
+#define PRIoFAST16 "ho"
+#define PRIuFAST16 "hu"
+#define PRIxFAST16 "hx"
+#define PRIXFAST16 "hX"
+
+#define PRIo32 "I32o"
+#define PRIu32 "I32u"
+#define PRIx32 "I32x"
+#define PRIX32 "I32X"
+#define PRIoLEAST32 "I32o"
+#define PRIuLEAST32 "I32u"
+#define PRIxLEAST32 "I32x"
+#define PRIXLEAST32 "I32X"
+#define PRIoFAST32 "I32o"
+#define PRIuFAST32 "I32u"
+#define PRIxFAST32 "I32x"
+#define PRIXFAST32 "I32X"
+
+#define PRIo64 "I64o"
+#define PRIu64 "I64u"
+#define PRIx64 "I64x"
+#define PRIX64 "I64X"
+#define PRIoLEAST64 "I64o"
+#define PRIuLEAST64 "I64u"
+#define PRIxLEAST64 "I64x"
+#define PRIXLEAST64 "I64X"
+#define PRIoFAST64 "I64o"
+#define PRIuFAST64 "I64u"
+#define PRIxFAST64 "I64x"
+#define PRIXFAST64 "I64X"
+
+#define PRIoMAX "I64o"
+#define PRIuMAX "I64u"
+#define PRIxMAX "I64x"
+#define PRIXMAX "I64X"
+
+#define PRIoPTR "Io"
+#define PRIuPTR "Iu"
+#define PRIxPTR "Ix"
+#define PRIXPTR "IX"
+
+// The fscanf macros for signed integers are:
+#define SCNd8 "d"
+#define SCNi8 "i"
+#define SCNdLEAST8 "d"
+#define SCNiLEAST8 "i"
+#define SCNdFAST8 "d"
+#define SCNiFAST8 "i"
+
+#define SCNd16 "hd"
+#define SCNi16 "hi"
+#define SCNdLEAST16 "hd"
+#define SCNiLEAST16 "hi"
+#define SCNdFAST16 "hd"
+#define SCNiFAST16 "hi"
+
+#define SCNd32 "ld"
+#define SCNi32 "li"
+#define SCNdLEAST32 "ld"
+#define SCNiLEAST32 "li"
+#define SCNdFAST32 "ld"
+#define SCNiFAST32 "li"
+
+#define SCNd64 "I64d"
+#define SCNi64 "I64i"
+#define SCNdLEAST64 "I64d"
+#define SCNiLEAST64 "I64i"
+#define SCNdFAST64 "I64d"
+#define SCNiFAST64 "I64i"
+
+#define SCNdMAX "I64d"
+#define SCNiMAX "I64i"
+
+#ifdef _WIN64 // [
+# define SCNdPTR "I64d"
+# define SCNiPTR "I64i"
+#else // _WIN64 ][
+# define SCNdPTR "ld"
+# define SCNiPTR "li"
+#endif // _WIN64 ]
+
+// The fscanf macros for unsigned integers are:
+#define SCNo8 "o"
+#define SCNu8 "u"
+#define SCNx8 "x"
+#define SCNX8 "X"
+#define SCNoLEAST8 "o"
+#define SCNuLEAST8 "u"
+#define SCNxLEAST8 "x"
+#define SCNXLEAST8 "X"
+#define SCNoFAST8 "o"
+#define SCNuFAST8 "u"
+#define SCNxFAST8 "x"
+#define SCNXFAST8 "X"
+
+#define SCNo16 "ho"
+#define SCNu16 "hu"
+#define SCNx16 "hx"
+#define SCNX16 "hX"
+#define SCNoLEAST16 "ho"
+#define SCNuLEAST16 "hu"
+#define SCNxLEAST16 "hx"
+#define SCNXLEAST16 "hX"
+#define SCNoFAST16 "ho"
+#define SCNuFAST16 "hu"
+#define SCNxFAST16 "hx"
+#define SCNXFAST16 "hX"
+
+#define SCNo32 "lo"
+#define SCNu32 "lu"
+#define SCNx32 "lx"
+#define SCNX32 "lX"
+#define SCNoLEAST32 "lo"
+#define SCNuLEAST32 "lu"
+#define SCNxLEAST32 "lx"
+#define SCNXLEAST32 "lX"
+#define SCNoFAST32 "lo"
+#define SCNuFAST32 "lu"
+#define SCNxFAST32 "lx"
+#define SCNXFAST32 "lX"
+
+#define SCNo64 "I64o"
+#define SCNu64 "I64u"
+#define SCNx64 "I64x"
+#define SCNX64 "I64X"
+#define SCNoLEAST64 "I64o"
+#define SCNuLEAST64 "I64u"
+#define SCNxLEAST64 "I64x"
+#define SCNXLEAST64 "I64X"
+#define SCNoFAST64 "I64o"
+#define SCNuFAST64 "I64u"
+#define SCNxFAST64 "I64x"
+#define SCNXFAST64 "I64X"
+
+#define SCNoMAX "I64o"
+#define SCNuMAX "I64u"
+#define SCNxMAX "I64x"
+#define SCNXMAX "I64X"
+
+#ifdef _WIN64 // [
+# define SCNoPTR "I64o"
+# define SCNuPTR "I64u"
+# define SCNxPTR "I64x"
+# define SCNXPTR "I64X"
+#else // _WIN64 ][
+# define SCNoPTR "lo"
+# define SCNuPTR "lu"
+# define SCNxPTR "lx"
+# define SCNXPTR "lX"
+#endif // _WIN64 ]
+
+// 7.8.2 Functions for greatest-width integer types
+
+// 7.8.2.1 The imaxabs function
+#define imaxabs _abs64
+
+// 7.8.2.2 The imaxdiv function
+
+// This is modified version of div() function from Microsoft's div.c fou=
nd
+// in %MSVC.NET%\crt\src\div.c
+static _inline imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
+{
+ imaxdiv_t result;
+
+ result.quot =3D numer / denom;
+ result.rem =3D numer % denom;
+
+ if (numer < 0 && result.rem > 0) {
+ // did division wrong; must fix up
+ ++result.quot;
+ result.rem -=3D denom;
+ }
+
+ return result;
+}
+
+// 7.8.2.3 The strtoimax and strtoumax functions
+#define strtoimax _strtoi64
+#define strtoumax _strtoui64
+
+// 7.8.2.4 The wcstoimax and wcstoumax functions
+#define wcstoimax _wcstoi64
+#define wcstoumax _wcstoui64
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _MSC_INTTYPES_H_ ]
Added: trunk/DvdMenuXtractor/dmx/libdvdread/win32/posix.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/win32/posix.h 2007-03-10 21:38:2=
9 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/win32/posix.h 2007-03-10 21:41:3=
4 UTC (rev 1290)
@@ -0,0 +1,39 @@
+#ifndef _MSC_VER
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif
+
+#ifndef _MSC_POSIX_H_
+#define _MSC_POSIX_H_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#include <sys/stat.h>
+#ifndef S_ISREG
+#define S_ISREG(mode) (0)
+#endif
+#ifndef S_ISDIR
+#define S_ISDIR(mode) ((mode)&_S_IFDIR)
+#endif
+#ifndef S_ISCHR
+#define S_ISCHR(mode) (0)
+#endif
+#ifndef S_ISSOCK
+#define S_ISSOCK(x) (0)
+#endif
+#ifndef S_ISBLK
+#define S_ISBLK(x) (0)
+#endif
+
+#include <stdlib.h>
+
+#define PATH_MAX _MAX_PATH
+#define strcasecmp(x, y) stricmp(x, y)
+#define strncasecmp(x, y, z) strnicmp(x, y, z)
+
+#include <windows.h>
+#define dlclose(x) FreeLibrary(x)
+#define dlsym(x,y) GetProcAddress(x,y)
+
+#endif // _MSC_POSIX_H_
Added: trunk/DvdMenuXtractor/dmx/libdvdread/win32/stdint.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/win32/stdint.h 2007-03-10 21:38:=
29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/win32/stdint.h 2007-03-10 21:41:=
34 UTC (rev 1290)
@@ -0,0 +1,208 @@
+// ISO C9x compliant stdint.h for Miscrosoft Visual Studio
+// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124=20
+//=20
+// Copyright (c) 2006 Alexander Chemeris
+//=20
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions ar=
e met:
+//=20
+// 1. Redistributions of source code must retain the above copyright n=
otice,
+// this list of conditions and the following disclaimer.
+//=20
+// 2. Redistributions in binary form must reproduce the above copyrigh=
t
+// notice, this list of conditions and the following disclaimer in =
the
+// documentation and/or other materials provided with the distribut=
ion.
+//=20
+// 3. The name of the author may be used to endorse or promote product=
s
+// derived from this software without specific prior written permis=
sion.
+//=20
+// 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 LIMI=
TED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PR=
OFITS;
+// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILI=
TY,=20
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE =
OR
+// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN I=
F
+// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//=20
+////////////////////////////////////////////////////////////////////////=
///////
+
+#ifndef _MSC_VER // [
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif // _MSC_VER ]
+
+#ifndef _MSC_STDINT_H_ // [
+#define _MSC_STDINT_H_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#include <BaseTsd.h>
+#include <limits.h>
+#include <wchar.h>
+
+// 7.18.1 Integer types
+
+// 7.18.1.1 Exact-width integer types
+typedef signed __int8 int8_t;
+typedef signed __int16 int16_t;
+typedef signed __int32 int32_t;
+typedef signed __int64 int64_t;
+typedef unsigned __int8 uint8_t;
+typedef unsigned __int16 uint16_t;
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+
+// 7.18.1.2 Minimum-width integer types
+typedef int8_t int_least8_t;
+typedef int16_t int_least16_t;
+typedef int32_t int_least32_t;
+typedef int64_t int_least64_t;
+typedef uint8_t uint_least8_t;
+typedef uint16_t uint_least16_t;
+typedef uint32_t uint_least32_t;
+typedef uint64_t uint_least64_t;
+
+// 7.18.1.3 Fastest minimum-width integer types
+typedef int8_t int_fast8_t;
+typedef int16_t int_fast16_t;
+typedef int32_t int_fast32_t;
+typedef int64_t int_fast64_t;
+typedef uint8_t uint_fast8_t;
+typedef uint16_t uint_fast16_t;
+typedef uint32_t uint_fast32_t;
+typedef uint64_t uint_fast64_t;
+
+// 7.18.1.4 Integer types capable of holding object pointers
+typedef INT_PTR intptr_t;
+typedef UINT_PTR uintptr_t;
+
+// 7.18.1.5 Greatest-width integer types
+typedef int64_t intmax_t;
+typedef uint64_t uintmax_t;
+
+
+// 7.18.2 Limits of specified-width integer types
+
+#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See foo=
tnote 220 at page 257 and footnote 221 at page 259
+
+// 7.18.2.1 Limits of exact-width integer types
+#define INT8_MIN _I8_MIN
+#define INT8_MAX _I8_MAX
+#define INT16_MIN _I16_MIN
+#define INT16_MAX _I16_MAX
+#define INT32_MIN _I32_MIN
+#define INT32_MAX _I32_MAX
+#define INT64_MIN _I64_MIN
+#define INT64_MAX _I64_MAX
+#define UINT8_MAX _UI8_MAX
+#define UINT16_MAX _UI16_MAX
+#define UINT32_MAX _UI32_MAX
+#define UINT64_MAX _UI64_MAX
+
+// 7.18.2.2 Limits of minimum-width integer types
+#define INT_LEAST8_MIN INT8_MIN
+#define INT_LEAST8_MAX INT8_MAX
+#define INT_LEAST16_MIN INT16_MIN
+#define INT_LEAST16_MAX INT16_MAX
+#define INT_LEAST32_MIN INT32_MIN
+#define INT_LEAST32_MAX INT32_MAX
+#define INT_LEAST64_MIN INT64_MIN
+#define INT_LEAST64_MAX INT64_MAX
+#define UINT_LEAST8_MAX UINT8_MAX
+#define UINT_LEAST16_MAX UINT16_MAX
+#define UINT_LEAST32_MAX UINT32_MAX
+#define UINT_LEAST64_MAX UINT64_MAX
+
+// 7.18.2.3 Limits of fastest minimum-width integer types
+#define INT_FAST8_MIN INT8_MIN
+#define INT_FAST8_MAX INT8_MAX
+#define INT_FAST16_MIN INT16_MIN
+#define INT_FAST16_MAX INT16_MAX
+#define INT_FAST32_MIN INT32_MIN
+#define INT_FAST32_MAX INT32_MAX
+#define INT_FAST64_MIN INT64_MIN
+#define INT_FAST64_MAX INT64_MAX
+#define UINT_FAST8_MAX UINT8_MAX
+#define UINT_FAST16_MAX UINT16_MAX
+#define UINT_FAST32_MAX UINT32_MAX
+#define UINT_FAST64_MAX UINT64_MAX
+
+// 7.18.2.4 Limits of integer types capable of holding object pointers
+#ifdef _WIN64 // [
+# define INTPTR_MIN INT64_MIN
+# define INTPTR_MAX INT64_MAX
+# define UINTPTR_MAX UINT64_MAX
+#else // _WIN64 ][
+# define INTPTR_MIN INT32_MIN
+# define INTPTR_MAX INT32_MAX
+# define UINTPTR_MAX UINT32_MAX
+#endif // _WIN64 ]
+
+// 7.18.2.5 Limits of greatest-width integer types
+#define INTMAX_MIN INT64_MIN
+#define INTMAX_MAX INT64_MAX
+#define UINTMAX_MAX UINT64_MAX
+
+// 7.18.3 Limits of other integer types
+
+#ifdef _WIN64 // [
+# define PTRDIFF_MIN _I64_MIN
+# define PTRDIFF_MAX _I64_MAX
+#else // _WIN64 ][
+# define PTRDIFF_MIN _I32_MIN
+# define PTRDIFF_MAX _I32_MAX
+#endif // _WIN64 ]
+
+#define SIG_ATOMIC_MIN INT_MIN
+#define SIG_ATOMIC_MAX INT_MAX
+
+#ifndef SIZE_MAX // [
+# ifdef _WIN64 // [
+# define SIZE_MAX _UI64_MAX
+# else // _WIN64 ][
+# define SIZE_MAX _UI32_MAX
+# endif // _WIN64 ]
+#endif // SIZE_MAX ]
+
+// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
+#ifndef WCHAR_MIN // [
+# define WCHAR_MIN 0
+#endif // WCHAR_MIN ]
+#ifndef WCHAR_MAX // [
+# define WCHAR_MAX _UI16_MAX
+#endif // WCHAR_MAX ]
+
+#define WINT_MIN 0
+#define WINT_MAX _UI16_MAX
+
+#endif // __STDC_LIMIT_MACROS ]
+
+
+// 7.18.4 Limits of other integer types
+
+#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See =
footnote 224 at page 260
+
+// 7.18.4.1 Macros for minimum-width integer constants
+
+#define INT8_C(val) val
+#define INT16_C(val) val
+#define INT32_C(val) val##L
+#define INT64_C(val) val##i64
+
+#define UINT8_C(val) val
+#define UINT16_C(val) val
+#define UINT32_C(val) val##UL
+#define UINT64_C(val) val##Ui64
+
+// 7.18.4.2 Macros for greatest-width integer constants
+#define INTMAX_C INT64_C
+#define UINTMAX_C UINT64_C
+
+#endif // __STDC_CONSTANT_MACROS ]
+
+
+#endif // _MSC_STDINT_H_ ]
Added: trunk/DvdMenuXtractor/dmx/libdvdread/win32/win32.proj
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/DvdMenuXtractor/dmx/libdvdread/win32/win32.proj 2007-03-10 21:3=
8:29 UTC (rev 1289)
+++ trunk/DvdMenuXtractor/dmx/libdvdread/win32/win32.proj 2007-03-10 21:4=
1:34 UTC (rev 1290)
@@ -0,0 +1,17 @@
+#include "*/*.proj"
+
+GROUP posixmsvc
+{
+ SOURCE dirent.c
+ DEFINE _CRT_NON_CONFORMING_SWPRINTFS
+
+ HEADER dirent.h
+ HEADER gtchar.h
+ HEADER posix.h
+}
+
+GROUP c99msvc
+{
+ HEADER inttypes.h
+ HEADER stdint.h
+}
More information about the Matroska-cvs
mailing list