From 5fc8d99062f93c1d823ef44569549781d4a8e36b Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 10 Nov 2009 10:29:43 +0000 Subject: towards TL2010: texk/dvipng git-svn-id: svn://tug.org/texlive/trunk@15970 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipng/COPYING | 674 - Build/source/texk/dvipng/COPYING.LESSER | 165 - Build/source/texk/dvipng/ChangeLog | 1152 +- Build/source/texk/dvipng/ChangeLog.0 | 903 - Build/source/texk/dvipng/ChangeLog.TL | 127 - Build/source/texk/dvipng/INSTALL | 168 - Build/source/texk/dvipng/Makefile.am | 134 +- Build/source/texk/dvipng/Makefile.in | 370 +- Build/source/texk/dvipng/Makefile.in.orig | 168 - Build/source/texk/dvipng/README | 128 - Build/source/texk/dvipng/RELEASE | 22 - Build/source/texk/dvipng/aclocal.m4 | 4 +- Build/source/texk/dvipng/aclocal.m4.orig | 237 - Build/source/texk/dvipng/color.c | 436 - Build/source/texk/dvipng/commands.h | 196 - Build/source/texk/dvipng/config.h.in | 20 +- Build/source/texk/dvipng/configure | 16626 +++++++------------ Build/source/texk/dvipng/configure.ac | 121 +- Build/source/texk/dvipng/configure.ac.orig | 227 - Build/source/texk/dvipng/doc/Makefile.am | 43 +- Build/source/texk/dvipng/doc/Makefile.in | 71 +- Build/source/texk/dvipng/draw.c | 388 - Build/source/texk/dvipng/dvi.c | 479 - Build/source/texk/dvipng/dvipng-1.12-patches | 539 - Build/source/texk/dvipng/dvipng-1.12/COPYING | 674 + .../source/texk/dvipng/dvipng-1.12/COPYING.LESSER | 165 + Build/source/texk/dvipng/dvipng-1.12/ChangeLog | 1103 ++ Build/source/texk/dvipng/dvipng-1.12/ChangeLog.0 | 903 + Build/source/texk/dvipng/dvipng-1.12/INSTALL | 168 + Build/source/texk/dvipng/dvipng-1.12/Makefile.in | 168 + Build/source/texk/dvipng/dvipng-1.12/README | 128 + Build/source/texk/dvipng/dvipng-1.12/RELEASE | 22 + Build/source/texk/dvipng/dvipng-1.12/aclocal.m4 | 237 + Build/source/texk/dvipng/dvipng-1.12/color.c | 438 + Build/source/texk/dvipng/dvipng-1.12/commands.h | 196 + Build/source/texk/dvipng/dvipng-1.12/config.h.in | 247 + Build/source/texk/dvipng/dvipng-1.12/configure | 9197 ++++++++++ Build/source/texk/dvipng/dvipng-1.12/configure.ac | 227 + Build/source/texk/dvipng/dvipng-1.12/draw.c | 388 + Build/source/texk/dvipng/dvipng-1.12/dvi.c | 479 + Build/source/texk/dvipng/dvipng-1.12/dvipng.1 | 508 + Build/source/texk/dvipng/dvipng-1.12/dvipng.c | 164 + Build/source/texk/dvipng/dvipng-1.12/dvipng.h | 581 + Build/source/texk/dvipng/dvipng-1.12/enc.c | 124 + Build/source/texk/dvipng/dvipng-1.12/font.c | 377 + Build/source/texk/dvipng/dvipng-1.12/fontmap.c | 342 + Build/source/texk/dvipng/dvipng-1.12/ft.c | 174 + Build/source/texk/dvipng/dvipng-1.12/miktex.h | 272 + Build/source/texk/dvipng/dvipng-1.12/miktex.mak | 196 + Build/source/texk/dvipng/dvipng-1.12/misc.c | 836 + Build/source/texk/dvipng/dvipng-1.12/papersiz.c | 73 + Build/source/texk/dvipng/dvipng-1.12/pk.c | 407 + Build/source/texk/dvipng/dvipng-1.12/ppagelist.c | 189 + Build/source/texk/dvipng/dvipng-1.12/set.c | 300 + Build/source/texk/dvipng/dvipng-1.12/sfd.c | 170 + Build/source/texk/dvipng/dvipng-1.12/special.c | 796 + Build/source/texk/dvipng/dvipng-1.12/t1.c | 193 + .../source/texk/dvipng/dvipng-1.12/test_dvipng.tex | 49 + Build/source/texk/dvipng/dvipng-1.12/tfm.c | 79 + Build/source/texk/dvipng/dvipng-1.12/vf.c | 143 + Build/source/texk/dvipng/dvipng.c | 164 - Build/source/texk/dvipng/dvipng.h | 581 - Build/source/texk/dvipng/dvipng.test | 2 +- Build/source/texk/dvipng/enc.c | 124 - Build/source/texk/dvipng/font.c | 377 - Build/source/texk/dvipng/fontmap.c | 342 - Build/source/texk/dvipng/ft.c | 174 - Build/source/texk/dvipng/help/Makefile.in | 3 +- Build/source/texk/dvipng/miktex.h | 272 - Build/source/texk/dvipng/miktex.mak | 196 - Build/source/texk/dvipng/misc.c | 836 - Build/source/texk/dvipng/papersiz.c | 72 - Build/source/texk/dvipng/pk.c | 407 - Build/source/texk/dvipng/ppagelist.c | 184 - Build/source/texk/dvipng/set.c | 300 - Build/source/texk/dvipng/sfd.c | 170 - Build/source/texk/dvipng/special.c | 785 - Build/source/texk/dvipng/t1.c | 193 - Build/source/texk/dvipng/test_dvipng.tex | 49 - Build/source/texk/dvipng/tfm.c | 79 - Build/source/texk/dvipng/vf.c | 143 - 81 files changed, 27204 insertions(+), 22360 deletions(-) delete mode 100644 Build/source/texk/dvipng/COPYING delete mode 100644 Build/source/texk/dvipng/COPYING.LESSER delete mode 100644 Build/source/texk/dvipng/ChangeLog.0 delete mode 100644 Build/source/texk/dvipng/ChangeLog.TL delete mode 100644 Build/source/texk/dvipng/INSTALL delete mode 100644 Build/source/texk/dvipng/Makefile.in.orig delete mode 100644 Build/source/texk/dvipng/README delete mode 100644 Build/source/texk/dvipng/RELEASE delete mode 100644 Build/source/texk/dvipng/aclocal.m4.orig delete mode 100644 Build/source/texk/dvipng/color.c delete mode 100644 Build/source/texk/dvipng/commands.h delete mode 100644 Build/source/texk/dvipng/configure.ac.orig delete mode 100644 Build/source/texk/dvipng/draw.c delete mode 100644 Build/source/texk/dvipng/dvi.c delete mode 100644 Build/source/texk/dvipng/dvipng-1.12-patches create mode 100644 Build/source/texk/dvipng/dvipng-1.12/COPYING create mode 100644 Build/source/texk/dvipng/dvipng-1.12/COPYING.LESSER create mode 100644 Build/source/texk/dvipng/dvipng-1.12/ChangeLog create mode 100644 Build/source/texk/dvipng/dvipng-1.12/ChangeLog.0 create mode 100644 Build/source/texk/dvipng/dvipng-1.12/INSTALL create mode 100644 Build/source/texk/dvipng/dvipng-1.12/Makefile.in create mode 100644 Build/source/texk/dvipng/dvipng-1.12/README create mode 100644 Build/source/texk/dvipng/dvipng-1.12/RELEASE create mode 100644 Build/source/texk/dvipng/dvipng-1.12/aclocal.m4 create mode 100644 Build/source/texk/dvipng/dvipng-1.12/color.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/commands.h create mode 100644 Build/source/texk/dvipng/dvipng-1.12/config.h.in create mode 100755 Build/source/texk/dvipng/dvipng-1.12/configure create mode 100644 Build/source/texk/dvipng/dvipng-1.12/configure.ac create mode 100644 Build/source/texk/dvipng/dvipng-1.12/draw.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/dvi.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/dvipng.1 create mode 100644 Build/source/texk/dvipng/dvipng-1.12/dvipng.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/dvipng.h create mode 100644 Build/source/texk/dvipng/dvipng-1.12/enc.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/font.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/fontmap.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/ft.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/miktex.h create mode 100644 Build/source/texk/dvipng/dvipng-1.12/miktex.mak create mode 100644 Build/source/texk/dvipng/dvipng-1.12/misc.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/papersiz.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/pk.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/ppagelist.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/set.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/sfd.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/special.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/t1.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/test_dvipng.tex create mode 100644 Build/source/texk/dvipng/dvipng-1.12/tfm.c create mode 100644 Build/source/texk/dvipng/dvipng-1.12/vf.c delete mode 100644 Build/source/texk/dvipng/dvipng.c delete mode 100644 Build/source/texk/dvipng/dvipng.h delete mode 100644 Build/source/texk/dvipng/enc.c delete mode 100644 Build/source/texk/dvipng/font.c delete mode 100644 Build/source/texk/dvipng/fontmap.c delete mode 100644 Build/source/texk/dvipng/ft.c delete mode 100644 Build/source/texk/dvipng/miktex.h delete mode 100644 Build/source/texk/dvipng/miktex.mak delete mode 100644 Build/source/texk/dvipng/misc.c delete mode 100644 Build/source/texk/dvipng/papersiz.c delete mode 100644 Build/source/texk/dvipng/pk.c delete mode 100644 Build/source/texk/dvipng/ppagelist.c delete mode 100644 Build/source/texk/dvipng/set.c delete mode 100644 Build/source/texk/dvipng/sfd.c delete mode 100644 Build/source/texk/dvipng/special.c delete mode 100644 Build/source/texk/dvipng/t1.c delete mode 100644 Build/source/texk/dvipng/test_dvipng.tex delete mode 100644 Build/source/texk/dvipng/tfm.c delete mode 100644 Build/source/texk/dvipng/vf.c (limited to 'Build/source/texk') diff --git a/Build/source/texk/dvipng/COPYING b/Build/source/texk/dvipng/COPYING deleted file mode 100644 index 94a9ed024d3..00000000000 --- a/Build/source/texk/dvipng/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. 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 -them 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 prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. 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. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey 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; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If 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 convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/Build/source/texk/dvipng/COPYING.LESSER b/Build/source/texk/dvipng/COPYING.LESSER deleted file mode 100644 index fc8a5de7edf..00000000000 --- a/Build/source/texk/dvipng/COPYING.LESSER +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Build/source/texk/dvipng/ChangeLog b/Build/source/texk/dvipng/ChangeLog index 225b3f63b6c..d8e0396c9a9 100644 --- a/Build/source/texk/dvipng/ChangeLog +++ b/Build/source/texk/dvipng/ChangeLog @@ -1,1103 +1,141 @@ -2009-02-23 Jan-Ake Larsson +2009-11-03 Peter Breitenlohner - * Release 1.12 + * Makefile.am, configure.ac: Proxy build system for TeX Live, + using the dvipng-1.12 distribution tree. + * dvipng-1.12-PATCHES: New directory with patches applied to + the dvipng-1.12 distribution. + * dvipng.test: Adapted. -2009-02-23 Jan-Ake Larsson +2009-06-12 Peter Breitenlohner - * INSTALL, README, install.texi, readme.texi, special.c: Correct - date for copyright + Avoid compiler warnings. + * color.c, dvi.c, dvipng.h, fontmap.c, misc.c, papersiz.c, + ppagelist.c, special.c: ANSI C function definitions. Declare + various param strings as const. + * special.c (SetSpecial): Avoid assigning a literal string to + the non-const string variable 'special' (somewhat clumsy). - * RELEASE, configure.ac, dvipng.1, dvipng.texi: Prepare for 1.12 +2009-06-12 Peter Breitenlohner -2009-01-23 Jan-Ake Larsson + * help/Makefile.am: do not even try to rebuild doc/dvipng.help + unless dvipng$(EXEEXT) has been rebuilt. - * special.c: Keep transparent background in rescaled included - bitmaps +2009-06-09 Peter Breitenlohner -2008-06-04 Jan-Ake Larsson + Avoid warnings when compiling with 'gcc --Wmissing-prototypes'. + * color.c (NewColor, LoadColornameFile, ClearXColorPrologue, + LoadXColorPrologue): declare as static. + * draw.c (DrawPage): declare as static. + * dvi.c (DVIInit, SkipPage, InitPage, DelPageList): declare as + static. + * enc.c (InitEncoding): declare as static. + * font.c (ActualFactor, kpse_find_t1_or_tt, FontFind, DoneFont): + declare as static. + * fontmap.c (newword, find_format, SearchPSFontMap, + ReadPSFontMap): declare as static. + * ft.c (UnLoadFT): declare as static. + * papersiz.c (myatodim): declare as static. + * pk.c (getnyb, pk_packed_num, skip_specials, UnLoadPK): declare + as static. + * ppagelist.c (ListPage): declare as static. + * set.c (ChangeColor): declare as static. + * sfd.c (ReadSubfont): declare as static. + * special.c (PSCodeInit, writepscode, ps2png, rescale, + newpsheader): declare as static. + * t1.c (UnLoadT1): declare as static. - * special.c: Add the color PostScript prologue +2009-03-25 Peter Breitenlohner -2008-06-03 Jan-Ake Larsson + * dvipng-1.12-patches (new): patches applied to dvipng-1.12. - * dvipng.h, special.c: Support xcolor PostScript prologue +2009-03-25 Peter Breitenlohner - * color.c: Support x11nam.def, fix handling of xcolor - multiple-model color values, and xcolor PostScript prologue + * color.c, dvipng.h, fontmap.c, ft.c, misc.c, pk.c, set.c, + t1.c, tfm.c: "#if HAVE_ALLOCA_H" => "#ifdef HAVE_ALLOCA_H" + and similar, to avoid preprocessor warnings. -2008-06-02 Jan-Ake Larsson +2009-03-24 Peter Breitenlohner - * special.c: Some (most?) literal PostScript specials seem to - depend on tex.pro and possibly special.pro, always load these + * Imported release 1.12 from savannah.nongnu.org. + * *-1.11 (removed), *-1.12 (new): Original files. - * configure.ac: Fix gs checks + * Makefile.am, configure.ac: New TeX Live build system. - * misc.c: Correct last mmap element + From Vladimir Volovich + * special.c: portability fix - put variable declarations + at the beginning of the block. -2008-05-27 Jan-Ake Larsson +2008-05-15 Peter Breitenlohner - * readme.texi: Mention new color models in xcolor + * Imported release 1.11 from savannah.nongnu.org. + * *-1.10 (removed), *-1.11 (new): Original files. + * configure.ac: Updated for release 1.11. - * color.c: Adjust for new version of xcolor, mainly color prefixes + From Vladimir Volovich + * misc.c: fix the field name: mmap => data (oversight from + old code?) + * special.c: portability fix - put variable declarations + at the beginning of the block. -2008-05-14 Jan-Ake Larsson +2008-05-14 Peter Breitenlohner - * Release 1.11 - - * configure.ac, dvipng.1, dvipng.texi, RELEASE: Prepare for 1.11 + * Imported release 1.10 from savannah.nongnu.org. - * special.c: Fix PS inclusion regression + * Makefile.in-1.10, aclocal.m4-1.10, config.h.in-1.10, + configure.ac-1.10, configure-1.10 (all new): Original files + from release 1.10. -2008-05-09 Jan-Ake Larsson + * acinclude.m4 (new): M4 macros extracted from aclocal.m4-1.10. - * Release 1.10 - - * RELEASE: Prepare for 1.10 + * Makefile.in, configure.ac: Adapted for TeX Live. -2008-05-08 Jan-Ake Larsson + * aclocal.m4, config.h.in, configure: Regenerated. - * special.c: Add warning about DVI code in PS environment + * dvipng.{dvi,help,info}: Updated generated files. -2008-05-07 Jan-Ake Larsson +2008-05-01 Vladimir Volovich - * README, readme.texi: Mention gs interpreter lib in TODO + * misc.c: #include dvipng.h again at the top, since the mmap + clash is resolved. - * aclocal.m4, configure.ac: Move gs device check so that it can be - called from different points +2008-04-29 Vladimir Volovich -2008-05-05 Jan-Ake Larsson + * misc.c: #include dvipng.h after sys/mman.h, for AIX. - * draw.c, dvi.c, dvipng.h: Revert creation of dvi command struct +2008-04-06 Peter Breitenlohner - * draw.c, dvi.c: Init dvi command struct + * configure.ac: respect library dependencies. - * draw.c, dvi.c, dvipng.h: Create dvi command struct +2008-04-02 Peter Breitenlohner - * special.c: Rearrange code + * configure.ac: fix (system and included) library dependencies. - * color.c, dvipng.h, enc.c, fontmap.c, misc.c, pk.c, sfd.c, - special.c, tfm.c, vf.c: Change name of fmmap struct element +2008-03-31 Peter Breitenlohner -2008-04-29 Jan-Ake Larsson + * special.c: allow for libgd without jpeg support. + * configure.ac, config.h.in, configure: adapt. - * dvipng.1: Prepare for 1.10 +2008-02-20 Peter Breitenlohner - * configure.ac: Prepare for 1.10, check for gdImageCreateJpeg + * configure.ac: Use AC_SEARCH_LIBS such that -lm and -lgen are + automatically appended to LIBS if needed. + Quote first arg of of AC_DEFUN. - * aclocal.m4: Cosmetic changes +2006-12-24 Karl Berry - * special.c: Change to HAVE_...JPEG + * dvipng.h: don't try stdbool if we have kpathsea, Staszek's old + machine doesn't define false. - * dvipng.h: Remove c++ comment +2006-12-11 Karl Berry - * dvipng.texi: Prepare for 1.10. Use 'active' in the 'preview' - package, remove unused text + * Makefile.in (MKINSTALLDIRS): is in $(srcdir). - * Makefile.in: - Install dvipng.1 from the tarball, mark maintainer targets +2006-12-09 Karl Berry -2008-02-08 Jan-Ake Larsson + * dvipng.h (alloca) [_AIX]: #define as _alloca, per the autoconf + manual. - * Makefile.in, INSTALL, README, color.c, commands.h, configure.ac, - * draw.c, dvi.c, dvipng.1, dvipng.c, dvipng.h, dvipng.texi, enc.c, - * font.c, fontmap.c, ft.c, install.texi, macros.texi, miktex.h, - * misc.c, papersiz.c, pk.c, ppagelist.c, readme.texi, set.c, sfd.c, - * special.c, t1.c, test_dvipng.tex, tfm.c, vf.c, COPYING, - * COPYING.LESSER: Change to LGPLv3 +2006-12-05 Karl Berry - * install.texi: - * README: - * dvipng.texi: Add blurb about MediaWiki, and cosmetic changes + * Imported release 1.9. -2008-01-10 Jan-Ake Larsson - - * set.c: Correct typo - -2007-12-12 Jan-Ake Larsson - - * special.c: Correct header test, add proper ps::[start] and - ps::[end] detection, add code to make tikz/pgf dvips (~PostScript) - specials work - -2007-10-26 Jan-Ake Larsson - - * draw.c: - * dvi.c: - * special.c: Change DVIGetCommand so that the command is - zero-terminated. This simplifies string operations on specials and - makes the length argument to SetSpecial unnecessary. Handle - preview-bop-hook correctly - - * special.c: Simplify PostScript header and multi-special - handling - - * color.c: - * draw.c: - * dvi.c: - * dvipng.h: - * font.c: - * ft.c: - * misc.c: - * set.c: - * special.c: - * t1.c: Split the flags variable into page_flags, option_flags and - dvi->flags - - * dvi.c: - * dvipng.c: dvi->flags resets now when the dvi is reopened - -2007-08-06 Jan-Ake Larsson - - * ft.c: - * misc.c: - * t1.c: - * tfm.c: - * vf.c: Memory fixes - -2007-07-24 Jan-Ake Larsson - - * special.c: Fix PostScript header usage - -2007-07-22 Jan-Ake Larsson - - * misc.c: Change version info slightly - - * ft.c: Change debug info slightly - -2007-07-21 Jan-Ake Larsson - - * special.c: Rewrite to allow for raw PostScript specials, also - use PostScript headers - - * dvipng.h: - * dvi.c: Add read-ahead for PostScript specials - - * config.h.in: - * configure.ac: Add test for gd pointer->image conversion - -2007-03-19 Jan-Ake Larsson - - * draw.c: Better handling of glyph index bounds - - * set.c: Check bounds for glyph index - -2006-12-11 Jan-Ake Larsson - - * readme.texi: Fix TODO, mention MediaWiki - - * dvipng.h: Fix for alloca under AIX - - * Makefile.in: mkinstalldirs is in $(srcdir) - -2006-11-11 Jan-Ake Larsson - - * Release 1.9 - - * INSTALL: - * README: Update for 1.9 - - * Makefile.in: Make the test fail if fonts not found - - * configure.ac: Don't use "which". Add info about the selfauto - stuff. Report if CJK support present - - * test_dvipng.tex: Remove the (intentional) failing special - -2006-11-07 Jan-Ake Larsson - - * fontmap.c: Don't warn if ttfonts.map is missing, fix pointer - - * Makefile.in: Adjust manpage target so manual intervention isn't - needed anymore - - * dvipng.1: Update manpage - - * dvipng.texi: Update for 1.9 - - * COPYING, Makefile.in, color.c, commands.h, configure.ac, draw.c, - dvi.c, dvipng.c, dvipng.h, dvipng.texi, enc.c, font.c, fontmap.c, - ft.c, macros.texi, miktex.h, miktex.mak, misc.c, papersiz.c, pk.c, - ppagelist.c, set.c, sfd.c, special.c, t1.c, test_dvipng.tex, - tfm.c, vf.c: Update FSF address - - * fontmap.c: Add ttfonts.map to the searched font maps - - * RELEASE: Prepare for 1.9 - -2006-11-02 Jan-Ake Larsson - - * dvipng.texi: Nitpicking on bitmapped graphics - -2006-10-13 Jan-Ake Larsson - - * readme.texi: Add note about subfont (CJK) support - - * install.texi: Add that FreeType2 is needed for subfont (CJK) support - -2006-10-12 Jan-Ake Larsson - - * readme.texi: Fix todo - -2006-10-11 Jan-Ake Larsson - - * sfd.c: Change && to || so that multiple subfonts work - - * ft.c: Adjust debug output - - * configure.ac: Add sfd.o - -2006-10-04 Jan-Ake Larsson - - * configure.ac: Prepare for 1.9 - - * sfd.c: Only look for subfont file on recent kpathsea - - * dvipng.c, ft.c, fontmap.c, dvipng.h: Prepare for subfonts (CJK) - - * sfd.c: Added. Used for subfonts (CJK) - - * configure.ac: Change wording of gs helptext - - * ft.c: Adjust debug message, and encoding selection - - * special.c: Adjust debug messages - - * dvipng.texi: Document the --strict option - - * dvipng.c: Fix timer - - * Makefile.in: Add dist target, simplify distclean - - * fontmap.c: Remove segfault occuring for non-existent font - -2006-08-08 Jan-Ake Larsson - - * special.c: Make showpage flag static - - * special.c: - Fix bug with -dSAFER and non-. paths, and bug with pngalpha and - background color - -2006-05-17 Jan-Ake Larsson - - * fontmap.c: Rearrange, simplify, speed up - -2006-05-16 Jan-Ake Larsson - - * ft.c: FT_LOAD_TARGET_LIGHT does not work in some cases, fall - back to FT_LOAD_NO_HINTING - -2006-05-08 Jan-Ake Larsson - - * dvipng.texi: Add credit - - * Makefile.in: add www target - - * README: - * readme.texi: Update capabilities info and preview-latex link - -2006-03-30 Jan-Ake Larsson - - * Release 1.8 - - * RELEASE: Update for 1.8 - - * set.c: - * readme.texi: - * install.texi: - * ft.c: - * dvi.c: - * draw.c: - * README: - * INSTALL: Update copyright - -2006-03-29 Jan-Ake Larsson - - * dvipng.1: - * dvipng.texi: Document new switch, new PostScript inclusion, - rearrange and adjust - - * misc.c: - * INSTALL: - * README: - * install.texi: - * readme.texi: Minimal documentation adjustments - -2006-03-27 Jan-Ake Larsson - - * ft.c: Change to FT_LOAD_TARGET_LIGHT - - * draw.c: Fix segfault in debug mode - - * aclocal.m4: Make sure the kpse_enc_format test fails for the - right reason only - -2006-02-27 Jan-Ake Larsson - - * special.c: Use gs' pngalpha device, render without clipping, - adjust image position - - * set.c: Simplify code, make color cache (page-)persistent - - * draw.c: Reset new flag - - * misc.c: New switch, remove some old switches from fast-help, use - new flag name - - * dvipng.h: New flags - - * configure.ac: - * config.h.in: Simplify gd tests - - * configure.ac: - * aclocal.m4: Check gs devices - -2006-02-10 Jan-Ake Larsson - - * special.c: Use execlp for gs call - -2006-02-03 Jan-Ake Larsson - * special.c: - Revert message about file type, debug information is enough - - * special.c: Warn for nonexistent image decoder - -2006-02-01 Jan-Ake Larsson - - * special.c: Warn with file type when unable to load included image - - * special.c: Read the first byte of file to be included and - compare with magic number - -2006-01-31 Jan-Ake Larsson - - * special.c: Temporary version, just try the different image - decoders and see - - * special.c: Use correct variables - -2006-01-29 Jan-Ake Larsson - - * special.c: Add code to check image access permission - -2006-01-28 Jan-Ake Larsson - - * special.c: Simplify some code - - * papersiz.c: Fix rounding error for length calculation - -2006-01-26 Jan-Ake Larsson - - * color.c: Fix typo that gave a segfault - - * config.h.in: Remove unneeded function check - - * configure.ac: Update for 1.8, remove unneeded function check - - * dvipng.h: Switch debug numbers to coincide with the manual - - * misc.c: Remove isdigit - - * special.c: Add code to include PNG, JPEG and GIF images - -2006-01-12 Jan-Ake Larsson - - * special.c: Add a space in message - - * misc.c: Do more tests for numeric-parameter options - - * dvi.c: Outfilename: only remove .dvi extension, not others - -2005-10-11 Jan-Ake Larsson - - * Release 1.7 - - * INSTALL: Typographic changes - - * README: - * RELEASE: - * configure.ac: - * dvipng.1: - * dvipng.texi: Adjust for 1.7 - - * install.texi: Insert space - - * miktex.h: Adjust for 1.7, I am uncertain which of the new calls - are available in the MIKTeX environment - - * readme.texi: Remove reference to my old laptop - -2005-09-30 Jan-Ake Larsson - - * config.h.in, configure.ac, ft.c: - Only use FT_Library_Version if available - -2005-07-05 jalar - - * Makefile.in: Enable srcdir != builddir - -2005-07-04 jalar - - * font.c: Add length check for font name - -2005-06-28 Jan-Ake Larsson - - * special.c: Read preview-latex version - -2005-06-27 Jan-Ake Larsson - - * Release 1.6 - - * RELEASE: Report what fixes have been done - - * dvipng.texi: Document xcolor adaptations - - * misc.c: Add 'Transparent' in the quick-help - - * special.c: Cosmetics, do a _small_ message for bop-hook redef - -2005-06-16 Jan-Ake Larsson - - * dvipng.h: - * dvipng.c: - * color.c: Revamp colorname interpreter for xcolor - -2005-06-14 Jan-Ake Larsson - - * misc.c: Adjust MIKTeX stuff - -2005-06-13 Jan-Ake Larsson - - * color.c: Don't use strtok, adjust for xcolor - - * special.c: Don't use strtok - -2005-04-25 Jan-Ake Larsson - - * config.h.in: - * configure.ac: - * set.c: Don't do alpha blending in truecolor mode, write alpha - channel to file - -2005-04-20 Jan-Ake Larsson - - * dvipng.texi: Add Credits - -2005-04-19 Jan-Ake Larsson - - * dvipng.h: Fix for sys/types.h conflict in old IRIX systems - - * special.c: Adjust tightpage test - -2005-04-04 Jan-Ake Larsson - - * special.c: Make tightpage option backwards compatible - - * RELEASE: Prepare for 1.6 - - * dvipng.1: Regenerate man page - - * configure.ac: - * dvipng.texi: - * miktex.h: Update version info - - * configure.ac: - * dvipng.texi: - * README: - * readme.texi: Update mailing list address - - * configure.ac: - * config.h.in: - * special.c: Simplify string search - -2005-04-03 Jan-Ake Larsson - - * special.c: Try to detect all preview-latex versions tightpage - code - -2005-03-02 Jan-Ake Larsson - - * set.c: Remove extra debug printout - - * t1.c: Sizes are given in big points in T1lib, in TeX points in - DVI files - - * ft.c: Sizes are given in big points in FreeType, in TeX points - in DVI files - - * dvipng.h: Fix boolean type again - -2005-02-10 Jan-Ake Larsson - - * config.h.in: - * configure.ac: - * dvipng.texi: - * dvipng.h: - * misc.c: - * set.c: Add proper alpha channel - -2005-02-04 Jan-Ake Larsson - - * color.c: - * draw.c: - * dvi.c: - * dvipng.c: - * font.c: - * ft.c: - * misc.c: - * papersiz.c: - * pk.c: - * set.c: - * special.c: - * t1.c: - * tfm.c: - * vf.c: Cosmetic changes to warnings and fatals - - * Release 1.5 - - * RELEASE: Prepare for 1.5 - - * INSTALL: - * Makefile.in: - * README: - * color.c: - * commands.h: - * configure.ac: - * draw.c: - * dvi.c: - * dvipng.1: - * dvipng.c: - * dvipng.h: - * dvipng.texi: - * enc.c: - * font.c: - * fontmap.c: - * ft.c: - * install.texi: - * macros.texi: - * miktex.h: - * misc.c: - * papersiz.c: - * pk.c: - * ppagelist.c: - * readme.texi: - * set.c: - * special.c: - * t1.c: - * test_dvipng.tex: - * tfm.c: - * vf.c: Update Copyright, set version 1.5 - -2005-02-03 Jan-Ake Larsson - - * draw.c: - * dvipng.h: - * set.c: Fix bug in --picky mode - -2005-01-27 Jan-Ake Larsson - - * dvipng.c: Restore --mfmode and --bdpi functionality - -2005-01-25 Jan-Ake Larsson - - * color.c: Fix segfault when trying to find nonexisting dvipsnam - color - - * dvipng.c: Make dvipsnam colors available on command line - -2004-12-10 Jan-Ake Larsson - - * Release 1.4 - - * RELEASE: - * configure.ac: - * dvipng.1: - * dvipng.texi: Set version 1.4 - - * README: Fix formatting - - * misc.c: Use mmap test. Hopefully, it will fail on ULTRIX, mmap - only works on character special devices (and not on regular files) - -2004-12-02 Jan-Ake Larsson - - * config.h.in: - * configure.ac: - * dvipng.h: Move int64_t and uint64_t tests entirely to autoconf - - * dvi.c: Fix signedness - -2004-11-30 Jan-Ake Larsson - - * misc.c: Fix NULL dereference. - -2004-11-25 Jan-Ake Larsson - - * Release 1.3 - - * Makefile.in, README, dvipng.1, readme.texi: Fix dvigif - installation and docs - - * INSTALL: - * README: Add license - - * dvipng.c: Remove duplicate copyright - - * config.h.in: - * configure.ac: Add some tests - - * dvipng.1: - * dvipng.texi: Add some minor things - -2004-11-24 Jan-Ake Larsson - - * config.h.in: - * configure.ac: Test for 64-bit types. - - * dvipng.h: Use char* arithmetic, not void*. And enable use of - gcc -ansi -pedantic. - - * special.c: Don't use C++ comments. - - * papersiz.c: Rewrite - - * draw.c: - * dvi.c: - * font.c: - * ft.c: - * misc.c: - * pk.c: - * tfm.c: - * vf.c: Fix signedness - -2004-11-15 Reiner Steib - - * draw.c, dvipng.c, enc.c, font.c, ft.c, pk.c, special.c, t1.c: - Don't use C++ comments. - -2004-11-05 David Kastrup - - * Makefile.in (install-dvigif): Don't fail if dvigif already - exists. - -2004-11-02 Jan-Åke Larsson - - * dvipng.h: Fix boolean type - -2004-11-01 Jan-Åke Larsson - - * RELEASE: Update for 1.3 - - * dvipng.h: Load alloca.h when available - - * font.c: - * fontmap.c: Remove inline - - * Makefile.in: - * commands.h: - * config.h.in: - * configure.ac: - * install.texi: - * macros.texi: - * miktex.h: - * readme.texi: - * test_dvipng.tex: Add copyright notice - - * color.c: - * draw.c: - * dvi.c: - * dvipng.c: - * dvipng.h: - * enc.c: - * font.c: - * fontmap.c: - * ft.c: - * misc.c: - * papersiz.c: - * pk.c: - * ppagelist.c: - * set.c: - * special.c: - * t1.c: - * tfm.c: - * vf.c: Change c-in-a-circle to (C) - -2004-10-27 Jan-Åke Larsson - - * dvipng.1: - * dvipng.texi: Amend docs - - * misc.c: Amend helptext - -2004-10-26 Jan-Åke Larsson - - * set.c: - * misc.c: - * dvipng.h: Change background transparency - - * configure.ac: Bump version, add test for libz - -2004-10-07 Jan-Åke Larsson - - * dvipng.texi: document change in -o switch - -2004-10-06 Jan-Åke Larsson - - * set.c: Allow longer pagenumbers in output file (e.g., %06d) - -2004-08-18 Jan-Åke Larsson - - * Release 1.2 - - * RELEASE: Change for 1.2 - - * config.h.in: Update - - * dvipng.1: change help text - - * dvipng.texi: update mailing list text. And version. - - * README: - * readme.texi: update info and todo list - - * draw.c, misc.c, dvipng.c, dvipng.h: - Add an intermediate exit status - -2004-08-17 Jan-Åke Larsson - - * misc.c: add --gamma switch - - * special.c: Fix comment - - * set.c: - * dvipng.h: new Gamma function - - * configure.ac: libm is needed by new gamma code - - * dvipng.1: - * dvipng.texi: document new switches - - * draw.c: change name of picky flag - - * special.c: do not call ghostscript when switch given - - * misc.c: add picky and ghostscript switches - - * dvipng.h: add picky and ghostscript flags - -2004-08-06 Jan-Åke Larsson - - * dvipng.texi: Document --png, --gif, and --picky - - * .cvsignore: Add *.gif - - * Makefile.in: Install 'dvigif' if we have GIF support - - * configure.ac: Test for gdImageGif and 'ln -s' - - * config.h.in: GIF support - - * set.c: GIF writing - - * misc.c: basename fixes, --png and --gif fixes, - --no-image-on-warn changes name to --picky - - * dvi.c: basename fixes - - * dvipng.h: Portability fixes, add GIF image flag - -2004-08-02 Jan-Åke Larsson - - * draw.c: Fix behaviour of --no-image-on-warn - -2004-07-01 Jan-Åke Larsson - - * miktex.mak: New, for MIKTeX - - * dvi.c: - * dvipng.c: - * dvipng.h: - * special.c: Adjust for MIKTeX - - * color.c: - * enc.c: - * font.c: - * fontmap.c: - * misc.c: - * pk.c: - * tfm.c: - * vf.c: Move file-mmapping to misc.c, adjust it for MIKTeX - -2004-06-29 Jan-Åke Larsson - - * configure.ac: - * dvipng.h: inttypes.h not available on all platforms - - * special.c: Remove snprintf, not available on certain platforms - -2004-06-27 Jan-Åke Larsson - - * dvipng.c: Fix case of missing font libs - - * fontmap.c: Remove debug printf - - * draw.c: Fix for case of absent font lib(s), correct typo - -2004-06-24 Jan-Åke Larsson - - * fontmap.c: - * pk.c: - * vf.c: More memory fixes - -2004-06-21 Jan-Åke Larsson - - * config.h.in: - * configure.ac: Test for stdbool, munmap and strtol - - * test_dvipng.tex: Change color test - - * dvipng.h: - * misc.c: - * ppagelist.c: Fix -r switch - - * dvipng.h: - * font.c: - * misc.c: - * ppagelist.c: - * special.c: - * t1.c: - * tfm.c: Use stdbool - - * color.c: - * dvi.c: - * dvipng.c: - * dvipng.h: - * enc.c: - * font.c: - * fontmap.c: - * ppagelist.c: - * special.c: Fix memory leak(s) - - * color.c: - * draw.c: - * dvi.c: - * dvipng.h: - * misc.c: - * set.c: - * special.c: Fix color stack - - * draw.c: - * dvipng.h: - * ft.c: - * pk.c: - * set.c: - * t1.c: - * tfm.c: - * vf.c: Simplify char structs - - * color.c: - * draw.c: - * dvi.c: - * dvipng.c: - * dvipng.h: - * enc.c: - * font.c: - * fontmap.c: - * ft.c: - * misc.c: - * papersiz.c: - * pk.c: - * ppagelist.c: - * set.c: - * special.c: - * t1.c: - * tfm.c: - * vf.c: Add copyright notice - -2004-05-31 Jan-Åke Larsson - - * dvipng.1: - * configure.ac: - * RELEASE: - * INSTALL: Release 1.1 - -2004-05-26 Jan-Åke Larsson - - * special.c: Handle source specials - - * test_dvipng.tex: Add failing special and color test - - * dvipng.c: Adjust coment about SELFAUTO... - - * dvi.c: Fix possible overflow - -2004-05-24 Jan-Åke Larsson - - * misc.c: Remove -t, it is not implemented yet - - * dvipng.h: Undef malloc, if defined - -2004-05-18 Jan-Åke Larsson - - * dvipng.texi: Fix build - -2004-05-14 Jan-Åke Larsson - - * config.h.in: Use more tests - - * dvipng.1: Add documentation - - * dvipng.texi: Fix build. Revert to four-argument @node, my - makeinfo cannot handle the one-argument form (yet). - -2004-05-11 Jan-Åke Larsson - - * configure.ac: More tests - -2004-05-09 Jan-Åke Larsson - - * install.texi: T1lib docs - - * dvipng.1: - * dvipng.texi: Add documentation, and spellcheck - - * special.c: - * color.c: Make colors work again. - -2004-05-08 David Kastrup - - * Create new ChangeLog for dvipng - -2004-05-05 Jan-Åke Larsson - - * fontmap.c: Use both kpse_fontmap_format and - _dvips_header_ - - * enc.c: Use configure test - - * configure.ac: Add test for kpse_enc_format, reorder gd - and png tests - - * aclocal.m4: Add test for kpse_enc_format - - * special.c: More informative warnings - -2004-05-04 Jan-Åke Larsson - - * enc.c: - Use the new kpathsea search format kpse_enc_format if available, - otherwise use kpse_tex_ps_header_format - - * fontmap.c: - Fix new kpathsea search type kpse_fontmap_format, use - kpse_dvips_config_format if not available - - * ft.c: Fix sizing - - * draw.c: Simplify LoadT1 call - - * t1.c: Shorten call, fix sizing - - * dvipng.h: Simplify char-storing structure - -2004-05-03 Jan-Åke Larsson - - * fontmap.c, font.c, t1.c, ft.c: - Fix for ps fonts not in psfontmap - -2004-05-02 Jan-Åke Larsson - - * Makefile.in: - * config.h.in: - * configure.ac: - * draw.c: - * dvipng.c: - * dvipng.h: - * enc.c: - * font.c: - * fontmap.c: - * ft.c: - * t1.c: - * misc.c: Add t1lib support - -2004-04-05 Jan-Åke Larsson - - * dvipng.1: - * readme.texi: - * dvipng.texi: - * Makefile.in: Add man page - -2004-03-27 Jan-Åke Larsson - - * dvipng.texi: Fix debug documentations - - * dvipng.c: Dont fail on --mode without --bdpi, output a warning. - -2004-03-26 Jan-Åke Larsson - - * papersiz.c: Remove compiler warning - - * dvipng.texi: - * misc.c: Change year - -2004-03-25 Jan-Åke Larsson - - * special.c: Revert change, not only resolution but also - offset is needed when generating png from ps - - * misc.c: Change helptext - - * configure.ac: Change version number - - * README: Checkin updated README - - * pk.c: - * ft.c: Speed up color cache - - * dvipng.texi: Add info on resolution, change version number - -2004-03-24 Jan-Åke Larsson - - * special.c: Fix missing 'showpage' and a memory leak - - * font.c: Adjust error message - - * dvipng.h: - * ft.c: - * pk.c: Change ink darkness map - - * draw.c: Output page numbers more often. If the user has a - slow terminal he's to blame himself, not me. - - * tfm.c: Include alloca.h if present - -2004-03-23 Jan-Åke Larsson - - * dvipng.texi: Adjust for the new -D option - -2004-03-19 dakas - - * RELEASE: Remove spurious blanks. - -2004-03-19 Jan-Åke Larsson - - * RELEASE: Update, shorten - -2004-03-18 Jan-Åke Larsson - - * RELEASE: - * dvi.c: - * dvipng.c: - * dvipng.h: - * font.c: - * misc.c: - * papersiz.c: - * special.c: Change the behaviour of the -D switch - -2004-03-08 Jan-Åke Larsson - - * font.c: Don't retry on PK generation failure - -2004-03-02 David Kastrup - - * dvi.c (DVIOpen): Fix a buffer overrun error. diff --git a/Build/source/texk/dvipng/ChangeLog.0 b/Build/source/texk/dvipng/ChangeLog.0 deleted file mode 100644 index 3c4689ad8c4..00000000000 --- a/Build/source/texk/dvipng/ChangeLog.0 +++ /dev/null @@ -1,903 +0,0 @@ -2004-01-16 Jan-Åke Larsson - - * font.c: fix compile without FT2 - -2004-01-12 Jan-Ake Larsson - - * RELEASE: Prepare for 0.9 - - * misc.c: Enable --expand-bbox - - * color.c: - * draw.c: - * dvipng.h: - * font.c: - * misc.c: - * special.c: Enable --no-image-on-warn - - * draw.c: - * dvi.c: - * dvipng.c: - * dvipng.h: - * readme.texi: - * special.c: Fix tightpage behaviour - -2004-01-09 Jan-Ake Larsson - - * special.c: Add preview-latex's "tightpage" code - -2004-01-08 Jan-Ake Larsson - - * dvipng.texi: - * configure.ac: Prepare for 0.9 - - * Makefile.in: clean target - -2004-01-07 Jan-Ake Larsson - - * color.c: - * draw.c: - * dvi.c: - * dvipng.c: - * dvipng.h: - * enc.c: - * font.c: - * fontmap.c: - * ft.c: - * pk.c: - * set.c: - * special.c: - * tfm.c: - * vf.c: Speedup DEBUG - - * pk.c: Fix subpixel offsets - - * dvipng.c: - * dvipng.h: - * font.c: - * misc.c: - * set.c: - * special.c: Fix flags - - * draw.c: Fix bbox - - * dvipng.h: Adjust for freetype >= 2.1.6 - -2003-12-15 Jan-Ake Larsson - - * tfm.c: - * fontmap.c: - * font.c: Fix freeeeeeeeeing - -2003-12-08 Jan-Ake Larsson - - * dvipng.texi: - * configure.ac: - * RELEASE: Prepare for 0.8 - - * ft.c: Fix debug output - - * draw.c: - * dvipng.h: - * dvipng.texi: - * misc.c: Add --height option - - * test_dvipng.tex: A nice equation is true. Behave! - -2003-12-07 Jan-Ake Larsson - - * enc.c: Encodings are _ps_header_s - -2003-12-05 Jan-Åke Larsson - - * misc.c: - * dvipng.texi: - * dvipng.h: - * draw.c: Change --baseline to --depth - -2003-12-01 Jan-Ake Larsson - - * draw.c: - * dvipng.h: - * misc.c: Change to physical pagenumbers, instead of DVI - pagenumbers. DVI pagenumbers will be indicated on STDOUT if they - differ from physical pagenumbers, but the numbering of PNG files - is physical pagenumbers. Old behaviour can be chosen with the - option -dvinum. - - * ppagelist.c: - * misc.c: - * dvipng.texi: Make negative pages render. Now -pp handles - negative pages gracefully too. Remove -pp code taken from dvips. - -2003-11-30 Jan-Ake Larsson - - * draw.c: - * dvipng.c: - * dvipng.h: - * font.c: - * ft.c: - * misc.c: - * pk.c: - * set.c: - * tfm.c: - * vf.c: Include alloca.h when necessary, start preparing - transition to subpixel rendering, do proper cleanup on exit - -2003-11-18 Jan-Åke Larsson - - * enc.c: Fix bug - - * ft.c: - * tfm.c: - * font.c: - * dvipng.h: Add fallback from FT to PK - -2003-11-14 Jan-Åke Larsson - - * Makefile.in: Use $DESTDIR - -2003-11-06 Jan-Åke Larsson - - * special.c: Fix postscript inclusion: placement and - background color - -2003-10-17 Jan-Åke Larsson - - * misc.c: - * font.c: - * dvipng.texi: - * dvipng.h: Add option for freetype activation - - * configure.ac: Add message when freetype is present - - * ft.c: Apparently FreeType hinting is a no-no. Load glyphs - with FT_LOAD_NO_HINTING. Only then output is acceptable. - -2003-10-15 Jan-Åke Larsson - - * fontmap.c: Remove erroneous match - -2003-10-13 Jan-Åke Larsson - - * font.c: Fix font searching order - - * RELEASE: Prepare for 0.7 - - * fontmap.c: - * psfontmap.c: - * configure.ac: Rename psfontmap.c to fontmap.c - -2003-10-08 Jan-Ake Larsson - - * psfontmap.c: Add third bare word: encoding - -2003-10-07 Jan-Ake Larsson - - * misc.c: - * dvipng.texi: Allow for -- on options - - * configure.ac: Prepare for 0.7 - - * Makefile.in: Adjust hint - - * configure.ac: - * config.h.in: Fix helptext in config.h.in - - * test_dvipng.tex: Add some tests for ligatures and sizes - -2003-10-03 Jan-Åke Larsson - - * readme.texi: Document new font support and switches - - * psfontmap.c: Redesign psfontmap loading to use the syntax - from dvips' docs - - * font.c: Enhance TrueType font finding - - * draw.c: Warn if setting char from null font - - * dvipng.h: - * color.c: Load and use psnames.def - -2003-09-28 Jan-Ake Larsson - - * misc.c: Warn for all bad options - -2003-09-24 Jan-Ake Larsson - - * dvipng.texi: - * install.texi: - * misc.c: Fix documentation - -2003-09-23 Jan-Ake Larsson - - * ft.c: - * enc.c: - * dvipng.h: Only load encodings once - -2003-09-18 Jan-Åke Larsson - - * draw.c: - * dvipng.h: - * misc.c: Add -baseline switch - -2003-09-17 Jan-Ake Larsson - - * font.c: Remove compiler warning - - * config.h.in: - * psfontmap.c: - * dvipng.c: - * configure.ac: Fix SELFAUTO... variables if dvipng is not - being installed in main texmf tree. This will make it find config - files and fonts anyway. - -2003-09-16 Jan-Ake Larsson - - * tfm.c: - * psfontmap.c: - * ft.c: - * enc.c: Added for postscript font handling with freetype - - * font.c: Use freetype font loading - - * dvipng.h: Add freetype-related types and declarations, - and simplify glyph rendering - - * pk.c: Simplify glyph rendering - - * dvipng.c: Init freetype - - * dvi.c: Fix strlen bugs - - * draw.c: Add FONT_TYPE_FT drawing - - * configure.ac: - * config.h.in: - * Makefile.in: Adjust for freetype things - -2003-08-29 Jan-Åke Larsson - - * special.c: fix color handling - - * dvipng.c: Increase TIMING output - - * misc.c: - * draw.c: small speedups - - * dvipng.h: - * configure.ac: - * config.h.in: - * Makefile.in: Change handling of the DEBUG and TIMING - flags - -2003-08-26 Jan-Åke Larsson - - * RELEASE, dvipng.texi, configure.ac: - prepare for 0.6 - - * Makefile.in: another install-docs fix - -2003-08-13 Jan-Åke Larsson - - * configure.ac: new test (ps inclusion speedup) - - * draw.c: simplify preprocessor processing, fix SetSpecial - call - - * special.c: speedup for ps image inclusion, fix SetSpecial - call - - * Makefile.in: fix install-docs - -2003-08-04 Jan-Åke Larsson - - * special.c: Argh!, fix compilation for non-truecolor version - - * dvipng.h: Argh!, fix image cache - - * dvipng.texi: - * configure.ac: - * RELEASE: Prepare for 0.5 - - * misc.c: - * dvipng.h: - * set.c: Add preliminary truecolor support - - * pk.c: Benchmark truecolor rendering, no real code change - - * special.c: - * misc.c: - * dvipng.h: Add preliminary image cacheing - - * draw.c: Small adjustments - -2003-07-30 Jan-Åke Larsson - - * draw.c: Fix two bugs so that bounding box again is - correct - - * configure.ac: configuration printout improved - - -2003-07-02 Jan-Åke Larsson - - * dvipng.h: Add prototypes - - * draw.c: minor change - - * RELEASE: prepare for 0.4 - -2003-07-01 Jan-Åke Larsson - - * draw.c, set.c: - Fix rules (again), this time taking maxdrift into account. - - * pk.c: Unfortunately gdImageColorResolveAlpha only works - on truecolor images. Some other day, then. I did fix the - performance of PROPER_OVERSTRIKE, though. - - * readme.texi: Add todo - -2003-06-30 Jan-Åke Larsson - - * dvipng.texi: small fixes - - * vf.c: Speedup macro start/end - - * set.c: Handle offset in draw.c only, allow choice of - compression if gd can do this - - * pk.c: Handle overstrike, either with gd alpha level, if - support exists for that, or "manually". The latter is active if - PROPER_OVERSTRIKE is #defined, currently yes, at roughly 5% - performance loss. - - * misc.c: -z option: choose compression if gd can do this - - * dvipng.h: Proper rounding, gd bells and whistles - - * draw.c: Allow drift a la dvitype, maxdrift=1, handle - offset here only, speedup vf macro start/end - - * config.h.in: - * configure.ac: New tests for gd bells and whistles - - * Makefile.in: Clean README - - * .cvsignore: More files - -2003-06-23 Jan-Åke Larsson - - * configure.ac: - * config.h.in: Added tests for newly added C code - - * Makefile.in: - * dvipng.texi: Reflect move of readme - - * README: - * readme.texi: Moved from README to readme.texi - -2003-06-19 Jan-Åke Larsson - - * special.c: Fix crash on file not found - - * set.c: Code reformatting - - * misc.c: Fix switches, and send warnings/errors to stderr. - - * vf.c: - * pk.c: - * draw.c: Include header only used in this file, here. - - * commands.h: Make draw.c compile without -DDEBUG - - * Makefile.in: Use --disable-debug, fix docs - generation/install, and add 'test' target. - - * README: Update info - - * configure.ac: Add --disable-debug - - * install.texi: Minor changes - - * dvipng.texi: Document difference between -pp and -p + -l - - * dvipng.h: Fix FreeBSD non-C99 header issue - -2003-06-12 Jan-Åke Larsson - - * Makefile.in: Fix SunOS make suffix rule wierdness - - * color.c: Change comment - - * dvi.c (DVIOpen): bugfix ".dvi" completion - - * dvipng.h (PIXROUND): Round down instead of up, SetRule - now has its own rounding mechanism - - * set.c (SetRule): Refine rule drawing, make sure rule is - inside bounding box - -2003-06-10 Jan-Åke Larsson - - * README: - * RELEASE: - * Makefile.in: - * configure.ac: - * dvipng.texi: Prepare for 0.3 - - * vf.c: - * set.c: - * pk.c: - * font.c: - * dvi.c: - * draw.c: simplify DEBUG_PRINT - - * configure.ac: Look for gs - - * special.c: Fixes to gs interaction - - * set.c: Enable -o for output file, no segfault on empty - image, reposition rule to match dvips - - * draw.c: simplify DEBUG_PRINT macro - - * dvi.c: - * misc.c: Enable -o for output file - - * dvipng.h: Enable -o for output file, simplify DEBUG_PRINT - macro - -2003-04-17 Jan-Ake Larsson - - * install.texi: - * dvipng.texi: Rewrite stuff - - * dvipng.h: New debug flag - - * configure.ac: - * config.h.in: Configure GS_PATH - - * special.c: No tempfiles anymore. Communicate with child - through two pipes. - - * configure.ac: - * Makefile.in: Make docs - -2003-04-15 Jan-Åke Larsson - - * macros.texi: Added - - * install.texi, dvipng.texi: Initial version - -2003-03-28 Jan-Åke Larsson - - * README: - * RELEASE: Release 0.2, PostScript type1 font support and - PostScript inclusion. - - * configure.ac: Added configure error message about where - to find libgd. - - * dvipng.h: - * draw.c (DrawCommand): - * special.c (SetSpecial): Postscript inclusion now works. - - * misc.c (DecodeArgs): Fix --help message - - * COPYING: - * RELEASE: - * README: Added files to repository - -2003-03-12 Jan-Åke Larsson - - * dvi.c (DVIFollowToggle): - * misc.c (DecodeArgs): - * dvipng.h: Added '-follow' switch, and code that - implements a follow mode. - -2003-02-27 Jan-Åke Larsson - - * draw.c (DrawPages): - * misc.c (Message): Speed up slightly when not in DEBUG - mode. - - * misc.c (DecodeArgs): Adjust copyright notice. - - * set.c (SetRule): Reposition rules, one dot up. - -2003-01-30 Jan-Åke Larsson - - * Makefile.in: - * configure.ac: Fix includes and linking - - * draw.c: - * font.c: - * pk.c: - * vf.c: - * dvipng.h (font_entry): remove unnamed union - - * dvipng.h: simplify includes - -2003-01-15 Jan-Ake Larsson - - * misc.c: Use autoconf's stuff, use atoi, fix warning - message - - * dvipng.c: - * dvipng.h: Localize position and spacing to draw.c. Fix - timing - - * pk.c: - * set.c: - * special.c: - * vf.c: - * draw.c: Localize position and spacing to draw.c - - * configure.ac: Require gd and kpathsea - -2002-12-03 Jan-Ake Larsson - - * draw.c: unfinished change: repairing - - * draw.c: - * font.c: - * vf.c: use void* in function call - - * dvipng.h: - * draw.c: - * color.c: - * set.c: change names of some functions - - * dvipng.h: - * draw.c: - * dvi.c: - * ppagelist.c: make dvi data more local - - * .cvsignore: - * dvipng.h: - * special.c: - * font.c: - * misc.c: - * dvipng.c: - * configure.ac: - * config.h.in: - * Makefile.in: autoconfiscate - -2002-11-07 Jan-Ake Larsson - - * dvipng.h: - * dvipng.c (main): - * dvi.c (DVIReOpen): Don't re-init, re-open - -2002-10-31 Jan-Ake Larsson - - * dvipng.h: - * dvi.c: Remove globals and Reopen DVI on change (check - mtime) - - * dvipng.c: Reopen DVI on change (check mtime) - -2002-10-30 Jan-Ake Larsson - - * pk.c: Declaration moved here from dvipng.h - - * Makefile: No io.c, no pagequeue.c but ppagelist.c - - * dvipng.h: Rearranged, some new declarations - - * dvipng.c (main): minor changes - - * draw.c (DoPages): use new page-finding mechanisms - - * dvi.c: outfilename handling fixed, page-finding - mechanisms added. - - * misc.c: Ppagelist handling improved, outfilename now - works, added functionality from io.c - - * ppagelist.c: Added. Functionality slightly different from - pagequeue.c - - * pagequeue.c: Revamped. Functionality changed and moved to - ppagelist.c - - * io.c: Removed. Functionality in misc.c - - * .cvsignore: Additions - -2002-10-24 Jan-Ake Larsson - - * dvipng.c (main): - * dvipng.h: - * misc.c (DecodeString): Improve stdin parser - -2002-10-21 Jan-Ake Larsson - - * dvipng.h: Remove globals, fix message output - - * vf.c (SetVF, InitVF), - * font.c (FontDef), - * draw.c (DrawCommand): Bugfix VF handling, fix message - output - - * pk.c (SetPK, InitPK), - * dvi.c (DVIOpen): Fix message output - - * papersiz.c: use int32_t, fix overflow - - * misc.c (DecodeArgs, Message): Fix -d option, remove - globals, fix message output - -2002-10-16 Jan-Ake Larsson - - * dvipng.h: Remove globals - - * dvipng.c (main): Remove globals, improve stdin parser - - * misc.c (DecodeArgs): remove globals, fix helptext - - * pagequeue.c (FindQdPage, QueuePage, QueueParse): - remove globals - - * dvi.c (FindPage): Remove unnecessary test - - * draw.c (DoPages): Do more normal read-ahead - -2002-10-15 Jan-Ake Larsson - - * pk.c, font.c: Minor change - - * misc.c: Simplify, remove (some) globals, fix helptext - - * pagequeue.c, dvipng.h, dvipng.c, - dvi.c, draw.c: Simplify, remove (some) globals - -2002-10-14 Jan-Ake Larsson - - * misc.c, dvipng.h, draw.c: - Added '-T tight' switch - -2002-10-11 Angus Leeming - - * draw.c: - * dvi.c: - * dvipng.[ch]: - * font.c: - * io.c: - * misc.c: - * pagequeue.c: - * papersiz.c: - * pk.c: - * set.c: - * special.c: - * vf.c: remove function prototype macros. - - * dvi.c (DVIGetCommand, CommandLength): - * set.c (SetChar): add a 'break' to the end of the switch - statements (prevents a warning with gcc 3.2). - -2002-10-11 Jan-Ake Larsson - - * special.c: Fix DEBUG, prototypes, and code pruning - - * vf.c, set.c, pk.c, io.c, - font.c, draw.c: Fix DEBUG - - * misc.c, dvi.c, pagequeue.c, - dvipng.h, dvipng.c: Fix pagelist and DEBUG - - -2002-09-20 Jan-Ake Larsson - - * dvipng.h: change font structures, add dvi struct, remove old - global variables, include relevant bits of config.h, restructure - somewhat - - * dvipng.c: remove explicit vf stack - - * special.c: use dvi struct - - * misc.c: minor changes - - * io.c: close file descriptors, not FILE pointers. - - * draw.c: simplify, remove explicit vf stack. - - * set.c: use dvi struct, remove explicit dvi stack. - - * vf.c: use mmap, remove explicit vf stack. - - * pk.c: use mmap - - * font.c: enable dvi struct, prepare for mmap (file descriptors, - not FILE pointers), explicit vf stack removed. - - * dvi.c: use dvi struct - - * Makefile: config.h removed - - * config.h, klibtool, klibtool.config: removed. - -2002-08-30 Jan-Ake Larsson - - * dvi.c: fix bug in STRSIZE zap - - * vf.c: simplify, fix debug info, zap STRSIZE limit - - * misc.c: Fix background transparency - - * dvipng.h, draw.c: Fix FormFeed bug (outfilename - wrong) - - * set.c: Fix FormFeed bug (outfilename wrong), and background - transparency - -2002-08-29 Jan-Ake Larsson - - * dvipng.h: type changes, dvi-io abstraction - - * color.c: comment changed - - * dvipng.c: dvi-io abstraction - - * font.c: type changes, STRSIZE killed - - * io.c: ReadCommand and CommandLength moved to dvi.c, preparations - for mmap - - * set.c: type changes - - * vf.c, pk.c: prepare for mmap, type changes - - * pagequeue.c: type change - - * misc.c: dvi fopen moved to dvi.c, type changes - - * Makefile: pagelist.o gone, dvi.o new - - * draw.c: SetVF moved to vf.c, type and dvi-io abstraction - changes - - * commands.h: added length and debug texts - - * dvi.c: Functionality moved from pagelist.c and misc.c to - dvi.c. Still needs work, but is initial stab at proper abstraction - of dvi-reading stuff. STRSIZE killed. - - * pagelist.c: Functionality moved to dvi.c - - * special.c: DoSpecial now takes a const char* argument, as - opposed to before. - -2002-08-19 Jan-Ake Larsson - - * misc.c: Added -mode switch - -2002-08-14 Jan-Ake Larsson - - * dvipng.h: VF additions, general cleanup - - * dvipng.c: Small adjustments connected to the VF support - - * config.h: Remove unnecessary things - - * pagelist.c: Simplifications - - * color.c: Comment changed - - * special.c, set.c: Scale always equal h/v - - * Makefile: Make vf.o - - * io.c: Start pre-conversion to mmap. Much still to be done. - - * misc.c, set.c, font.c, pk.c, draw.c: Adjust for VF support - - * vf.c: VF support added to dvipng - -2002-06-24 Jan-Ake Larsson - - * Makefile: Cleaned. Vacuumed, in fact. - -2002-06-19 Jan-Ake Larsson - - * pagelist.c: remove Debug bug (!) - -2002-06-13 Jan-Ake Larsson - - * Makefile: new object files - - * special.c, set.c, dvipng.h: cleanup - - * misc.c (ActualFactor): moved to font.c + cleanup - - * font.c (ActualFactor): moved here from misc.c - - * draw.c, dvipng.c, pagelist.c: functionality from dvipng.c spread - to these three - - * pagequeue.c, pages.c: functionality moved from pages.c to - pagequeue.c - - * commands.h: minor adjustments - -2002-06-12 Jan-Ake Larsson - - * special.c: on unimplemented \special, give pixel position - - * misc.c: Bugfix + literal response on stdin interface - - * font.c, dvipng.h: Font handling fixed - - * dvipng.c: prompt on stdin interface - -2002-06-11 Jan-Ake Larsson - - * set.c (SetChar): load chars on PASS_DRAW - -T -O bug fixed - -2002-06-11 Jan-Ake Larsson - - * set.c: Cleanup. Still buggy wrt -O, though. - - * Makefile: DEBUG on for now, postamble.? removed - - * postamble.c: Postamble is no longer read - - * pages.c: Improve page handling: now a queue, not an unordered - set - - * font.c: Improve font handling: search for fonts only when used - - * dvipng.h: Cleanup - - * dvipng.c: Major rewrite: page handling improved - - * misc.c: Fix DVI init + cleanup - -2002-05-30 Jan-Ake Larsson - - * misc.c: Transparent border: '-bd' - - * dvipng.h, set.c: Tiding up + transparent border - - * dvipng.c, font.c: Tidying up - -2002-05-29 Jan-Ake Larsson - - * color.c: Fix cmyk->rgb. - - * misc.c: Add '-fg' and '-bg'. - - * font.c: Tidy up - -2002-05-29 Jan-Ake Larsson - - * dvipng.h: Tidying up, and new global vars - - * io.c: Tidying up - - * papersiz.c: Pagesize matters, adapted from dvips - - * pages.c: Page choosing, from dvips. Not sufficient for our - purposes, but a start - - * dvipng.c, color.c, Makefile, misc.c, set.c: Changed to make - pagesize (-T), offset (-O), page choosing (-pp), and output file - (-o) work. - -2002-05-27 Jan-Ake Larsson - - * pk.c: Changed comments - - * .cvsignore, special.c, set.c, postamble.c, pk.c, misc.c, io.c, - font.c, dvipng.c, color.c, commands.h, dvipng.h: Initial version - - * config.h, Makefile: Initial version, to be replaced by - autoconf'ism - - * klibtool.config, klibtool: Included for now. To be - removed. diff --git a/Build/source/texk/dvipng/ChangeLog.TL b/Build/source/texk/dvipng/ChangeLog.TL deleted file mode 100644 index 97f09ab44ee..00000000000 --- a/Build/source/texk/dvipng/ChangeLog.TL +++ /dev/null @@ -1,127 +0,0 @@ -ChangeLog.TL: TeX Live (TL) changes for dvipng -============================================== - -2009-06-12 Peter Breitenlohner - - * help/Makefile.am: do not even try to rebuild doc/dvipng.help - unless dvipng$(EXEEXT) has been rebuilt. - -2009-06-09 Peter Breitenlohner - - Avoid warnings when compiling with 'gcc --Wmissing-prototypes'. - * color.c (NewColor, LoadColornameFile, ClearXColorPrologue, - LoadXColorPrologue): declare as static. - * draw.c (DrawPage): declare as static. - * dvi.c (DVIInit, SkipPage, InitPage, DelPageList): declare as - static. - * enc.c (InitEncoding): declare as static. - * font.c (ActualFactor, kpse_find_t1_or_tt, FontFind, DoneFont): - declare as static. - * fontmap.c (newword, find_format, SearchPSFontMap, - ReadPSFontMap): declare as static. - * ft.c (UnLoadFT): declare as static. - * papersiz.c (myatodim): declare as static. - * pk.c (getnyb, pk_packed_num, skip_specials, UnLoadPK): declare - as static. - * ppagelist.c (ListPage): declare as static. - * set.c (ChangeColor): declare as static. - * sfd.c (ReadSubfont): declare as static. - * special.c (PSCodeInit, writepscode, ps2png, rescale, - newpsheader): declare as static. - * t1.c (UnLoadT1): declare as static. - -2009-03-25 Peter Breitenlohner - - * dvipng-1.12-patches (new): patches applied to dvipng-1.12. - -2009-03-25 Peter Breitenlohner - - * color.c, dvipng.h, fontmap.c, ft.c, misc.c, pk.c, set.c, - t1.c, tfm.c: "#if HAVE_ALLOCA_H" => "#ifdef HAVE_ALLOCA_H" - and similar, to avoid preprocessor warnings. - -2009-03-24 Peter Breitenlohner - - * Imported release 1.12 from savannah.nongnu.org. - * *-1.11 (removed), *-1.12 (new): Original files. - - * Makefile.am, configure.ac: New TeX Live build system. - - From Vladimir Volovich - * special.c: portability fix - put variable declarations - at the beginning of the block. - -2008-05-15 Peter Breitenlohner - - * Imported release 1.11 from savannah.nongnu.org. - * *-1.10 (removed), *-1.11 (new): Original files. - * configure.ac: Updated for release 1.11. - - From Vladimir Volovich - * misc.c: fix the field name: mmap => data (oversight from - old code?) - * special.c: portability fix - put variable declarations - at the beginning of the block. - -2008-05-14 Peter Breitenlohner - - * Imported release 1.10 from savannah.nongnu.org. - - * Makefile.in-1.10, aclocal.m4-1.10, config.h.in-1.10, - configure.ac-1.10, configure-1.10 (all new): Original files - from release 1.10. - - * acinclude.m4 (new): M4 macros extracted from aclocal.m4-1.10. - - * Makefile.in, configure.ac: Adapted for TeX Live. - - * aclocal.m4, config.h.in, configure: Regenerated. - - * dvipng.{dvi,help,info}: Updated generated files. - -2008-05-01 Vladimir Volovich - - * misc.c: #include dvipng.h again at the top, since the mmap - clash is resolved. - -2008-04-29 Vladimir Volovich - - * misc.c: #include dvipng.h after sys/mman.h, for AIX. - -2008-04-06 Peter Breitenlohner - - * configure.ac: respect library dependencies. - -2008-04-02 Peter Breitenlohner - - * configure.ac: fix (system and included) library dependencies. - -2008-03-31 Peter Breitenlohner - - * special.c: allow for libgd without jpeg support. - * configure.ac, config.h.in, configure: adapt. - -2008-02-20 Peter Breitenlohner - - * configure.ac: Use AC_SEARCH_LIBS such that -lm and -lgen are - automatically appended to LIBS if needed. - Quote first arg of of AC_DEFUN. - -2006-12-24 Karl Berry - - * dvipng.h: don't try stdbool if we have kpathsea, Staszek's old - machine doesn't define false. - -2006-12-11 Karl Berry - - * Makefile.in (MKINSTALLDIRS): is in $(srcdir). - -2006-12-09 Karl Berry - - * dvipng.h (alloca) [_AIX]: #define as _alloca, per the autoconf - manual. - -2006-12-05 Karl Berry - - * Imported release 1.9. - diff --git a/Build/source/texk/dvipng/INSTALL b/Build/source/texk/dvipng/INSTALL deleted file mode 100644 index bef302aebd8..00000000000 --- a/Build/source/texk/dvipng/INSTALL +++ /dev/null @@ -1,168 +0,0 @@ -Installing dvipng -***************** - -Installing dvipng should be simple: merely `./configure', `make', and -`make install'. - -Prerequisites -============= - - * The GD Graphics Draw library, libgd - - The drawing library `libgd' is necessary, and is downloadable at - `http://www.boutell.com/gd', and there are binary packages for - most operating systems from their respective distributors. In any - case, the latest version of the library installs using `autoconf' - so it should not be difficult for you to install it from source, - and then proceed with installing dvipng. - - * The path-searching library kpathsea - - Kpathsea is most likely included in your LaTeX installation, but it - may happen that ./configure does not find it; see below. If you do - not have it, download it from `http://www.ctan.org' and compile it. - I have no experience with this, so I cannot help much here. - - * The font-rendering library FreeType 2 - - While not strictly necessary, a recent FreeType 2 is recommended - since dvipng currently will produce better-quality images when - this library is available. To take advantage of this, you should - have at least FreeType 2.1.9. - - FreeType 2 will enable direct support for PostScript and TrueType - fonts, so that dvipng will not need to generate bitmapped variants - on disk of the TeX fonts since modern TeX distributions include - PostScript versions of them. Then, you can render images at - different (and unusual) resolutions without cluttering the disk - with lots of bitmapped fonts. - - Finally, it will enable subfont support in dvipng. That is, if you - want to render CJK-LaTeX characters, you must have FreeType 2 - installed. - - * The font-rendering library T1lib - - An alternative to FreeType 2 is T1lib, but this will enable only - PostScript fonts in dvipng and will not include subfont support. - Also here, you can render images at different (and unusual) - resolutions without cluttering the disk with lots of bitmapped - fonts. If both FreeType 2 and T1lib are present, FreeType will be - internally preferred by dvipng but T1lib can be chosen at runtime. - - * libpng and libz - - To be able to compress and write PNG files to disk, dvipng (or - really libgd) uses libpng which in turn uses libz. These should be - available on any modern system, if not, download them and install - them. - - * The `texinfo' package - - This is needed for building the documentation. - -Configure -========= - -The first step is to configure the source code, telling it where -various files will be. To do so, run - - ./configure OPTIONS - - (Note: if you have fetched dvipng from CVS rather than a regular -release, you will have to first generate `./configure' by running -`autoconf' 2.53 or later.) - - On many machines, you will not need to specify any options, but if -`configure' cannot determine something on its own, you'll need to help -it out. For a list of the options type - - ./configure --help - - On some machines, the libraries will be installed in directories that -are not in the linker's search path. This will generate an error when -running `./configure', indicating that it cannot find libgd or -libkpathsea (most likely). You then need to specify the path to the -respective library's object files. They are typically called e.g., -`libgd.a' or `libgd.so'. If they are located in e.g., `/sw/local/lib', -do - - ./configure LDFLAGS=-L/sw/local/lib - - If the library is available as a shared object file (`.so'), the -runtime linker may also need to be told where to find the library, then -use - - ./configure LDFLAGS='-L/sw/local/lib -R/sw/local/lib' - - When either of these is necessary, it is likely that the C header -files are also installed in directories that are not in the C -preprocessor's search path. This will also generate an error when -running `./configure', indicating that it cannot find e.g., `gd.h' or -`kpathsea.h' (most likely). You then need to specify the path to the -respective library's C header files. If they are located in e.g., -`/sw/local/include', do - - ./configure CPPFLAGS=-I/sw/local/include - - On my SUN Solaris workstation, I had to combine this into - - ./configure CPPFLAGS='-I/sw/local/include -I/sw/tex/teTeX/1.0/include'\ - LDFLAGS='-L/sw/local/lib -R/sw/local/lib -L/sw/tex/teTeX/1.0/lib/' - -where the backslash denotes a continuation of the line. - -Build/install -============= - -Once `configure' has been run, simply enter - - make - -at the prompt to compile the C code, and build the documentation files. -To install the files into the locations chosen earlier, type - - make install - -You may need special privileges to install, e.g., if you are installing -into system directories. - -Installation outside the texmf tree -=================================== - -In some cases, a dvipng binary installed outside the texmf tree will -not be able to find virtual fonts, or the PostScript font maps -(normally used by dvips). This may be because _only_ $SELFAUTOLOC, -$SELFAUTODIR, and $SELFAUTOPARENT are used in the texmf tree -configuration file `texmf.cnf'. If so, give the switch -`--enable-selfauto-set' to `./configure'. This will make dvipng adjust -these three internally so that kpathsea thinks that dvipng _is_ -installed in the texmf tree. - -Installation for non-privileged users -===================================== - -Often people without system administration privileges want to install -software for their private use. In that case you need to specify more -options to the `configure' script, usually this is done by using the -`--prefix' option to the `configure' script, and let it point to the -personal home directory. In that way, resulting binaries will be -installed under the `bin' subdirectory of your home directory, manual -pages under `man' and so on. That way, it is reasonably easy to -maintain a bunch of additional packages, since the prefix argument is -supported by most `configure' scripts. - - You'll have to add something like `/home/myself/bin' to your `PATH' -shell variable, if it isn't there already, and similarly set the -`INFOPATH' and `MANPATH' variables to be able to access the -documentation. - -Copying -======= - -This program is released under the GNU Lesser General Public License -version 3, see the COPYING file in the dvipng distribution or -`http://www.gnu.org/licenses/'. - - Copyright (C) 2002-2009 Jan-AAke Larsson - diff --git a/Build/source/texk/dvipng/Makefile.am b/Build/source/texk/dvipng/Makefile.am index 7f6af504800..433264f432e 100644 --- a/Build/source/texk/dvipng/Makefile.am +++ b/Build/source/texk/dvipng/Makefile.am @@ -1,34 +1,34 @@ +## Makefile.am for the TeX Live subdirectory texk/dvipng/ +## +## Copyright (C) 2009 Peter Breitenlohner +## You may freely use, modify and/or distribute this file. ## #************************************************************************ # -# Part of the dvipng distribution -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program. If not, see -# . -# +# Adapted for TeX Live from dvipng-1.12/Makefile.in # Copyright (C) 2002-2008 Jan-Åke Larsson # #************************************************************************ -# -# Adapted for TeX Live by Peter Breitenlohner -# All settings here are our fault, don't blame the dvipng maintainer for it. -# -#************************************************************************ ## ACLOCAL_AMFLAGS = -I ../../m4 -I m4 -INCLUDES = $(KPATHSEA_INCLUDES) $(FREETYPE2_INCLUDES) $(GD_INCLUDES) +## We want to re-distribute the whole original dvipng source tree. +## +## With current automake (1.10.2) 'make distcheck' fails when +## DISTFILES contains a directory and files in that directory. +## Thus nodist_* for all files in $(DVIPNG_TREE). +EXTRA_DIST = $(DVIPNG_TREE) + +## Patches applied to the original source tree +## +EXTRA_DIST += $(DVIPNG_TREE)-PATCHES + +# in case of an SVN repository +dist-hook: + rm -rf `find $(distdir) -name .svn` + +INCLUDES = -I$(top_srcdir)/$(DVIPNG_TREE) +INCLUDES += $(KPATHSEA_INCLUDES) $(FREETYPE2_INCLUDES) $(GD_INCLUDES) INCLUDES += $(T1LIB_INCLUDES) $(LIBPNG_INCLUDES) $(ZLIB_INCLUDES) AM_CFLAGS = $(WARNING_CFLAGS) @@ -38,43 +38,53 @@ TEXI2HTML = texi2html # In order that `make distcheck' succeeds, we must not attempt to rebuild # dvipng.info if dvipng.help has not changed, Thus we delegate rebuilding -# dvipng.help and dvipng.info, if necessary, to subdirectories. +# dvipng.help and dvipng.info, if necessary, to subdirectories. SUBDIRS = . help doc -## #################################### The program -## bin_PROGRAMS = dvipng -dvipng_SOURCES = \ - color.c \ - commands.h \ - draw.c \ - dvi.c \ - dvipng.c \ - dvipng.h \ - font.c \ - misc.c \ - papersiz.c \ - pk.c \ - ppagelist.c \ - set.c \ - special.c \ - vf.c +nodist_dvipng_SOURCES = \ + $(DVIPNG_TREE)/color.c \ + $(DVIPNG_TREE)/draw.c \ + $(DVIPNG_TREE)/dvi.c \ + $(DVIPNG_TREE)/dvipng.c \ + $(DVIPNG_TREE)/font.c \ + $(DVIPNG_TREE)/misc.c \ + $(DVIPNG_TREE)/papersiz.c \ + $(DVIPNG_TREE)/pk.c \ + $(DVIPNG_TREE)/ppagelist.c \ + $(DVIPNG_TREE)/set.c \ + $(DVIPNG_TREE)/special.c \ + $(DVIPNG_TREE)/vf.c if have_t1 -dvipng_SOURCES += t1.c +nodist_dvipng_SOURCES += \ + $(DVIPNG_TREE)/t1.c endif have_t1 if have_ft2 -dvipng_SOURCES += ft.c sfd.c +nodist_dvipng_SOURCES += \ + $(DVIPNG_TREE)/ft.c \ + $(DVIPNG_TREE)/sfd.c endif have_ft2 if have_ft2_or_t1 -dvipng_SOURCES += enc.c fontmap.c tfm.c +nodist_dvipng_SOURCES += \ + $(DVIPNG_TREE)/enc.c \ + $(DVIPNG_TREE)/fontmap.c \ + $(DVIPNG_TREE)/tfm.c endif have_ft2_or_t1 -dvipng_DEPENDENCIES = $(KPATHSEA_DEPEND) $(FREETYPE2_DEPEND) $(GD_DEPEND) -dvipng_DEPENDENCIES += $(T1LIB_DEPEND) $(LIBPNG_DEPEND) $(ZLIB_DEPEND) +dvipng_dependencies = $(KPATHSEA_DEPEND) $(ZLIB_DEPEND) $(LIBPNG_DEPEND) +dvipng_dependencies += $(T1LIB_DEPEND) $(FREETYPE2_DEPEND) $(GD_DEPEND) + +$(dvipng_OBJECTS): config.force + +config.force: $(dvipng_dependencies) + echo timestamp >config.force + $(SHELL) ./config.status --recheck + +DISTCLEANFILES = config.force LDADD = $(KPATHSEA_LIBS) $(FREETYPE2_LIBS) $(GD_LIBS) LDADD += $(T1LIB_LIBS) $(LIBPNG_LIBS) $(ZLIB_LIBS) @@ -101,40 +111,10 @@ uninstall-hook: rm -f $(DESTDIR)$(bindir)/dvigif$(EXEEXT) endif have_gif -## #################################### The test -## -test: test_dvipng.dvi dvipng$(EXEEXT) - ./dvipng -T tight -strict test_dvipng - echo View the result e.g. with xv test_dvipng\*.png - -test_dvipng.dvi: test_dvipng.tex - latex $(srcdir)/test_dvipng.tex - TESTS = dvipng.test +TESTS_ENVIRONMENT = DVIPNG_TREE='$(DVIPNG_TREE)' -EXTRA_DIST = dvipng.test test_dvipng.tex +EXTRA_DIST += dvipng.test CLEANFILES = missfont.log test_dvipng.aux test_dvipng.dvi test_dvipng.log test_dvipng*.png -## #################################### Maintainer targets -## -## Make sure INSTALL and README exist -## -EXTRA_DIST += ChangeLog.0 INSTALL README RELEASE - -## Not used -## -EXTRA_DIST += miktex.h miktex.mak - -## #################################### Build as part of the TeX Live tree -## -EXTRA_DIST += ChangeLog.TL - -## Patches applied to the dvipng-1.12 distribution -## -EXTRA_DIST += dvipng-1.12-patches - -## Original files from the dvipng distribution -## -EXTRA_DIST += Makefile.in.orig aclocal.m4.orig configure.ac.orig - diff --git a/Build/source/texk/dvipng/Makefile.in b/Build/source/texk/dvipng/Makefile.in index 0e61e9008d2..36b294ffe27 100644 --- a/Build/source/texk/dvipng/Makefile.in +++ b/Build/source/texk/dvipng/Makefile.in @@ -35,11 +35,20 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = dvipng$(EXEEXT) -@have_t1_TRUE@am__append_1 = t1.c -@have_ft2_TRUE@am__append_2 = ft.c sfd.c -@have_ft2_or_t1_TRUE@am__append_3 = enc.c fontmap.c tfm.c +@have_t1_TRUE@am__append_1 = \ +@have_t1_TRUE@ $(DVIPNG_TREE)/t1.c + +@have_ft2_TRUE@am__append_2 = \ +@have_ft2_TRUE@ $(DVIPNG_TREE)/ft.c \ +@have_ft2_TRUE@ $(DVIPNG_TREE)/sfd.c + +@have_ft2_or_t1_TRUE@am__append_3 = \ +@have_ft2_or_t1_TRUE@ $(DVIPNG_TREE)/enc.c \ +@have_ft2_or_t1_TRUE@ $(DVIPNG_TREE)/fontmap.c \ +@have_ft2_or_t1_TRUE@ $(DVIPNG_TREE)/tfm.c + subdir = . -DIST_COMMON = README $(am__configure_deps) \ +DIST_COMMON = $(am__configure_deps) \ $(srcdir)/../../build-aux/config.guess \ $(srcdir)/../../build-aux/config.sub \ $(srcdir)/../../build-aux/depcomp \ @@ -52,8 +61,7 @@ DIST_COMMON = README $(am__configure_deps) \ ../../build-aux/config.sub ../../build-aux/depcomp \ ../../build-aux/install-sh ../../build-aux/ltmain.sh \ ../../build-aux/missing ../../build-aux/mkinstalldirs \ - ../../build-aux/texinfo.tex ../../build-aux/ylwrap COPYING \ - COPYING.LESSER ChangeLog INSTALL + ../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gs-device.m4 \ $(top_srcdir)/m4/makeinfo.m4 \ @@ -81,21 +89,21 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am__dvipng_SOURCES_DIST = color.c commands.h draw.c dvi.c dvipng.c \ - dvipng.h font.c misc.c papersiz.c pk.c ppagelist.c set.c \ - special.c vf.c t1.c ft.c sfd.c enc.c fontmap.c tfm.c @have_t1_TRUE@am__objects_1 = t1.$(OBJEXT) @have_ft2_TRUE@am__objects_2 = ft.$(OBJEXT) sfd.$(OBJEXT) @have_ft2_or_t1_TRUE@am__objects_3 = enc.$(OBJEXT) fontmap.$(OBJEXT) \ @have_ft2_or_t1_TRUE@ tfm.$(OBJEXT) -am_dvipng_OBJECTS = color.$(OBJEXT) draw.$(OBJEXT) dvi.$(OBJEXT) \ +nodist_dvipng_OBJECTS = color.$(OBJEXT) draw.$(OBJEXT) dvi.$(OBJEXT) \ dvipng.$(OBJEXT) font.$(OBJEXT) misc.$(OBJEXT) \ papersiz.$(OBJEXT) pk.$(OBJEXT) ppagelist.$(OBJEXT) \ set.$(OBJEXT) special.$(OBJEXT) vf.$(OBJEXT) $(am__objects_1) \ $(am__objects_2) $(am__objects_3) -dvipng_OBJECTS = $(am_dvipng_OBJECTS) +dvipng_OBJECTS = $(nodist_dvipng_OBJECTS) dvipng_LDADD = $(LDADD) am__DEPENDENCIES_1 = +dvipng_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp am__depfiles_maybe = depfiles @@ -109,8 +117,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(dvipng_SOURCES) -DIST_SOURCES = $(am__dvipng_SOURCES_DIST) +SOURCES = $(nodist_dvipng_SOURCES) +DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -160,7 +168,7 @@ am__relativize = \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print @@ -183,6 +191,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ +DVIPNG_TREE = @DVIPNG_TREE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ @@ -207,7 +216,6 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ -KPSEWHICH = @KPSEWHICH@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -233,6 +241,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ @@ -304,52 +313,38 @@ top_srcdir = @top_srcdir@ #************************************************************************ # -# Part of the dvipng distribution -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program. If not, see -# . -# +# Adapted for TeX Live from dvipng-1.12/Makefile.in # Copyright (C) 2002-2008 Jan-Åke Larsson # #************************************************************************ -# -# Adapted for TeX Live by Peter Breitenlohner -# All settings here are our fault, don't blame the dvipng maintainer for it. -# -#************************************************************************ ACLOCAL_AMFLAGS = -I ../../m4 -I m4 -INCLUDES = $(KPATHSEA_INCLUDES) $(FREETYPE2_INCLUDES) $(GD_INCLUDES) \ - $(T1LIB_INCLUDES) $(LIBPNG_INCLUDES) $(ZLIB_INCLUDES) +EXTRA_DIST = $(DVIPNG_TREE) $(DVIPNG_TREE)-PATCHES dvipng.test +INCLUDES = -I$(top_srcdir)/$(DVIPNG_TREE) $(KPATHSEA_INCLUDES) \ + $(FREETYPE2_INCLUDES) $(GD_INCLUDES) $(T1LIB_INCLUDES) \ + $(LIBPNG_INCLUDES) $(ZLIB_INCLUDES) AM_CFLAGS = $(WARNING_CFLAGS) DVIPS = dvips -Ppdf TEXI2HTML = texi2html # In order that `make distcheck' succeeds, we must not attempt to rebuild # dvipng.info if dvipng.help has not changed, Thus we delegate rebuilding -# dvipng.help and dvipng.info, if necessary, to subdirectories. +# dvipng.help and dvipng.info, if necessary, to subdirectories. SUBDIRS = . help doc -dvipng_SOURCES = color.c commands.h draw.c dvi.c dvipng.c dvipng.h \ - font.c misc.c papersiz.c pk.c ppagelist.c set.c special.c vf.c \ - $(am__append_1) $(am__append_2) $(am__append_3) -dvipng_DEPENDENCIES = $(KPATHSEA_DEPEND) $(FREETYPE2_DEPEND) \ - $(GD_DEPEND) $(T1LIB_DEPEND) $(LIBPNG_DEPEND) $(ZLIB_DEPEND) +nodist_dvipng_SOURCES = $(DVIPNG_TREE)/color.c $(DVIPNG_TREE)/draw.c \ + $(DVIPNG_TREE)/dvi.c $(DVIPNG_TREE)/dvipng.c \ + $(DVIPNG_TREE)/font.c $(DVIPNG_TREE)/misc.c \ + $(DVIPNG_TREE)/papersiz.c $(DVIPNG_TREE)/pk.c \ + $(DVIPNG_TREE)/ppagelist.c $(DVIPNG_TREE)/set.c \ + $(DVIPNG_TREE)/special.c $(DVIPNG_TREE)/vf.c $(am__append_1) \ + $(am__append_2) $(am__append_3) +dvipng_dependencies = $(KPATHSEA_DEPEND) $(ZLIB_DEPEND) \ + $(LIBPNG_DEPEND) $(T1LIB_DEPEND) $(FREETYPE2_DEPEND) \ + $(GD_DEPEND) +DISTCLEANFILES = config.force LDADD = $(KPATHSEA_LIBS) $(FREETYPE2_LIBS) $(GD_LIBS) $(T1LIB_LIBS) \ $(LIBPNG_LIBS) $(ZLIB_LIBS) TESTS = dvipng.test -EXTRA_DIST = dvipng.test test_dvipng.tex ChangeLog.0 INSTALL README \ - RELEASE miktex.h miktex.mak ChangeLog.TL dvipng-1.12-patches \ - Makefile.in.orig aclocal.m4.orig configure.ac.orig +TESTS_ENVIRONMENT = DVIPNG_TREE='$(DVIPNG_TREE)' CLEANFILES = missfont.log test_dvipng.aux test_dvipng.dvi test_dvipng.log test_dvipng*.png all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -500,6 +495,258 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +color.o: $(DVIPNG_TREE)/color.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT color.o -MD -MP -MF $(DEPDIR)/color.Tpo -c -o color.o `test -f '$(DVIPNG_TREE)/color.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/color.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/color.Tpo $(DEPDIR)/color.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/color.c' object='color.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o color.o `test -f '$(DVIPNG_TREE)/color.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/color.c + +color.obj: $(DVIPNG_TREE)/color.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT color.obj -MD -MP -MF $(DEPDIR)/color.Tpo -c -o color.obj `if test -f '$(DVIPNG_TREE)/color.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/color.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/color.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/color.Tpo $(DEPDIR)/color.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/color.c' object='color.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o color.obj `if test -f '$(DVIPNG_TREE)/color.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/color.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/color.c'; fi` + +draw.o: $(DVIPNG_TREE)/draw.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT draw.o -MD -MP -MF $(DEPDIR)/draw.Tpo -c -o draw.o `test -f '$(DVIPNG_TREE)/draw.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/draw.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/draw.Tpo $(DEPDIR)/draw.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/draw.c' object='draw.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o draw.o `test -f '$(DVIPNG_TREE)/draw.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/draw.c + +draw.obj: $(DVIPNG_TREE)/draw.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT draw.obj -MD -MP -MF $(DEPDIR)/draw.Tpo -c -o draw.obj `if test -f '$(DVIPNG_TREE)/draw.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/draw.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/draw.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/draw.Tpo $(DEPDIR)/draw.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/draw.c' object='draw.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o draw.obj `if test -f '$(DVIPNG_TREE)/draw.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/draw.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/draw.c'; fi` + +dvi.o: $(DVIPNG_TREE)/dvi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dvi.o -MD -MP -MF $(DEPDIR)/dvi.Tpo -c -o dvi.o `test -f '$(DVIPNG_TREE)/dvi.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/dvi.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dvi.Tpo $(DEPDIR)/dvi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/dvi.c' object='dvi.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dvi.o `test -f '$(DVIPNG_TREE)/dvi.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/dvi.c + +dvi.obj: $(DVIPNG_TREE)/dvi.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dvi.obj -MD -MP -MF $(DEPDIR)/dvi.Tpo -c -o dvi.obj `if test -f '$(DVIPNG_TREE)/dvi.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/dvi.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/dvi.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dvi.Tpo $(DEPDIR)/dvi.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/dvi.c' object='dvi.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dvi.obj `if test -f '$(DVIPNG_TREE)/dvi.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/dvi.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/dvi.c'; fi` + +dvipng.o: $(DVIPNG_TREE)/dvipng.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dvipng.o -MD -MP -MF $(DEPDIR)/dvipng.Tpo -c -o dvipng.o `test -f '$(DVIPNG_TREE)/dvipng.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/dvipng.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dvipng.Tpo $(DEPDIR)/dvipng.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/dvipng.c' object='dvipng.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dvipng.o `test -f '$(DVIPNG_TREE)/dvipng.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/dvipng.c + +dvipng.obj: $(DVIPNG_TREE)/dvipng.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dvipng.obj -MD -MP -MF $(DEPDIR)/dvipng.Tpo -c -o dvipng.obj `if test -f '$(DVIPNG_TREE)/dvipng.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/dvipng.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/dvipng.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/dvipng.Tpo $(DEPDIR)/dvipng.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/dvipng.c' object='dvipng.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dvipng.obj `if test -f '$(DVIPNG_TREE)/dvipng.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/dvipng.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/dvipng.c'; fi` + +font.o: $(DVIPNG_TREE)/font.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT font.o -MD -MP -MF $(DEPDIR)/font.Tpo -c -o font.o `test -f '$(DVIPNG_TREE)/font.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/font.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/font.Tpo $(DEPDIR)/font.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/font.c' object='font.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o font.o `test -f '$(DVIPNG_TREE)/font.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/font.c + +font.obj: $(DVIPNG_TREE)/font.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT font.obj -MD -MP -MF $(DEPDIR)/font.Tpo -c -o font.obj `if test -f '$(DVIPNG_TREE)/font.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/font.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/font.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/font.Tpo $(DEPDIR)/font.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/font.c' object='font.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o font.obj `if test -f '$(DVIPNG_TREE)/font.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/font.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/font.c'; fi` + +misc.o: $(DVIPNG_TREE)/misc.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT misc.o -MD -MP -MF $(DEPDIR)/misc.Tpo -c -o misc.o `test -f '$(DVIPNG_TREE)/misc.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/misc.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/misc.Tpo $(DEPDIR)/misc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/misc.c' object='misc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o misc.o `test -f '$(DVIPNG_TREE)/misc.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/misc.c + +misc.obj: $(DVIPNG_TREE)/misc.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT misc.obj -MD -MP -MF $(DEPDIR)/misc.Tpo -c -o misc.obj `if test -f '$(DVIPNG_TREE)/misc.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/misc.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/misc.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/misc.Tpo $(DEPDIR)/misc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/misc.c' object='misc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o misc.obj `if test -f '$(DVIPNG_TREE)/misc.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/misc.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/misc.c'; fi` + +papersiz.o: $(DVIPNG_TREE)/papersiz.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT papersiz.o -MD -MP -MF $(DEPDIR)/papersiz.Tpo -c -o papersiz.o `test -f '$(DVIPNG_TREE)/papersiz.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/papersiz.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/papersiz.Tpo $(DEPDIR)/papersiz.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/papersiz.c' object='papersiz.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o papersiz.o `test -f '$(DVIPNG_TREE)/papersiz.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/papersiz.c + +papersiz.obj: $(DVIPNG_TREE)/papersiz.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT papersiz.obj -MD -MP -MF $(DEPDIR)/papersiz.Tpo -c -o papersiz.obj `if test -f '$(DVIPNG_TREE)/papersiz.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/papersiz.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/papersiz.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/papersiz.Tpo $(DEPDIR)/papersiz.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/papersiz.c' object='papersiz.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o papersiz.obj `if test -f '$(DVIPNG_TREE)/papersiz.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/papersiz.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/papersiz.c'; fi` + +pk.o: $(DVIPNG_TREE)/pk.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pk.o -MD -MP -MF $(DEPDIR)/pk.Tpo -c -o pk.o `test -f '$(DVIPNG_TREE)/pk.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/pk.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pk.Tpo $(DEPDIR)/pk.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/pk.c' object='pk.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pk.o `test -f '$(DVIPNG_TREE)/pk.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/pk.c + +pk.obj: $(DVIPNG_TREE)/pk.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pk.obj -MD -MP -MF $(DEPDIR)/pk.Tpo -c -o pk.obj `if test -f '$(DVIPNG_TREE)/pk.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/pk.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/pk.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pk.Tpo $(DEPDIR)/pk.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/pk.c' object='pk.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pk.obj `if test -f '$(DVIPNG_TREE)/pk.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/pk.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/pk.c'; fi` + +ppagelist.o: $(DVIPNG_TREE)/ppagelist.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ppagelist.o -MD -MP -MF $(DEPDIR)/ppagelist.Tpo -c -o ppagelist.o `test -f '$(DVIPNG_TREE)/ppagelist.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/ppagelist.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ppagelist.Tpo $(DEPDIR)/ppagelist.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/ppagelist.c' object='ppagelist.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ppagelist.o `test -f '$(DVIPNG_TREE)/ppagelist.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/ppagelist.c + +ppagelist.obj: $(DVIPNG_TREE)/ppagelist.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ppagelist.obj -MD -MP -MF $(DEPDIR)/ppagelist.Tpo -c -o ppagelist.obj `if test -f '$(DVIPNG_TREE)/ppagelist.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/ppagelist.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/ppagelist.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ppagelist.Tpo $(DEPDIR)/ppagelist.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/ppagelist.c' object='ppagelist.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ppagelist.obj `if test -f '$(DVIPNG_TREE)/ppagelist.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/ppagelist.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/ppagelist.c'; fi` + +set.o: $(DVIPNG_TREE)/set.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT set.o -MD -MP -MF $(DEPDIR)/set.Tpo -c -o set.o `test -f '$(DVIPNG_TREE)/set.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/set.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/set.Tpo $(DEPDIR)/set.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/set.c' object='set.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o set.o `test -f '$(DVIPNG_TREE)/set.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/set.c + +set.obj: $(DVIPNG_TREE)/set.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT set.obj -MD -MP -MF $(DEPDIR)/set.Tpo -c -o set.obj `if test -f '$(DVIPNG_TREE)/set.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/set.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/set.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/set.Tpo $(DEPDIR)/set.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/set.c' object='set.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o set.obj `if test -f '$(DVIPNG_TREE)/set.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/set.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/set.c'; fi` + +special.o: $(DVIPNG_TREE)/special.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT special.o -MD -MP -MF $(DEPDIR)/special.Tpo -c -o special.o `test -f '$(DVIPNG_TREE)/special.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/special.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/special.Tpo $(DEPDIR)/special.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/special.c' object='special.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o special.o `test -f '$(DVIPNG_TREE)/special.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/special.c + +special.obj: $(DVIPNG_TREE)/special.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT special.obj -MD -MP -MF $(DEPDIR)/special.Tpo -c -o special.obj `if test -f '$(DVIPNG_TREE)/special.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/special.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/special.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/special.Tpo $(DEPDIR)/special.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/special.c' object='special.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o special.obj `if test -f '$(DVIPNG_TREE)/special.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/special.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/special.c'; fi` + +vf.o: $(DVIPNG_TREE)/vf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vf.o -MD -MP -MF $(DEPDIR)/vf.Tpo -c -o vf.o `test -f '$(DVIPNG_TREE)/vf.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/vf.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vf.Tpo $(DEPDIR)/vf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/vf.c' object='vf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vf.o `test -f '$(DVIPNG_TREE)/vf.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/vf.c + +vf.obj: $(DVIPNG_TREE)/vf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vf.obj -MD -MP -MF $(DEPDIR)/vf.Tpo -c -o vf.obj `if test -f '$(DVIPNG_TREE)/vf.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/vf.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/vf.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vf.Tpo $(DEPDIR)/vf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/vf.c' object='vf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vf.obj `if test -f '$(DVIPNG_TREE)/vf.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/vf.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/vf.c'; fi` + +t1.o: $(DVIPNG_TREE)/t1.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT t1.o -MD -MP -MF $(DEPDIR)/t1.Tpo -c -o t1.o `test -f '$(DVIPNG_TREE)/t1.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/t1.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/t1.Tpo $(DEPDIR)/t1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/t1.c' object='t1.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o t1.o `test -f '$(DVIPNG_TREE)/t1.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/t1.c + +t1.obj: $(DVIPNG_TREE)/t1.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT t1.obj -MD -MP -MF $(DEPDIR)/t1.Tpo -c -o t1.obj `if test -f '$(DVIPNG_TREE)/t1.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/t1.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/t1.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/t1.Tpo $(DEPDIR)/t1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/t1.c' object='t1.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o t1.obj `if test -f '$(DVIPNG_TREE)/t1.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/t1.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/t1.c'; fi` + +ft.o: $(DVIPNG_TREE)/ft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ft.o -MD -MP -MF $(DEPDIR)/ft.Tpo -c -o ft.o `test -f '$(DVIPNG_TREE)/ft.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/ft.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ft.Tpo $(DEPDIR)/ft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/ft.c' object='ft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ft.o `test -f '$(DVIPNG_TREE)/ft.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/ft.c + +ft.obj: $(DVIPNG_TREE)/ft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ft.obj -MD -MP -MF $(DEPDIR)/ft.Tpo -c -o ft.obj `if test -f '$(DVIPNG_TREE)/ft.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/ft.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/ft.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/ft.Tpo $(DEPDIR)/ft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/ft.c' object='ft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ft.obj `if test -f '$(DVIPNG_TREE)/ft.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/ft.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/ft.c'; fi` + +sfd.o: $(DVIPNG_TREE)/sfd.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sfd.o -MD -MP -MF $(DEPDIR)/sfd.Tpo -c -o sfd.o `test -f '$(DVIPNG_TREE)/sfd.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/sfd.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sfd.Tpo $(DEPDIR)/sfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/sfd.c' object='sfd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sfd.o `test -f '$(DVIPNG_TREE)/sfd.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/sfd.c + +sfd.obj: $(DVIPNG_TREE)/sfd.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sfd.obj -MD -MP -MF $(DEPDIR)/sfd.Tpo -c -o sfd.obj `if test -f '$(DVIPNG_TREE)/sfd.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/sfd.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/sfd.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sfd.Tpo $(DEPDIR)/sfd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/sfd.c' object='sfd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sfd.obj `if test -f '$(DVIPNG_TREE)/sfd.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/sfd.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/sfd.c'; fi` + +enc.o: $(DVIPNG_TREE)/enc.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enc.o -MD -MP -MF $(DEPDIR)/enc.Tpo -c -o enc.o `test -f '$(DVIPNG_TREE)/enc.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/enc.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/enc.Tpo $(DEPDIR)/enc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/enc.c' object='enc.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enc.o `test -f '$(DVIPNG_TREE)/enc.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/enc.c + +enc.obj: $(DVIPNG_TREE)/enc.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enc.obj -MD -MP -MF $(DEPDIR)/enc.Tpo -c -o enc.obj `if test -f '$(DVIPNG_TREE)/enc.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/enc.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/enc.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/enc.Tpo $(DEPDIR)/enc.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/enc.c' object='enc.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enc.obj `if test -f '$(DVIPNG_TREE)/enc.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/enc.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/enc.c'; fi` + +fontmap.o: $(DVIPNG_TREE)/fontmap.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fontmap.o -MD -MP -MF $(DEPDIR)/fontmap.Tpo -c -o fontmap.o `test -f '$(DVIPNG_TREE)/fontmap.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/fontmap.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fontmap.Tpo $(DEPDIR)/fontmap.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/fontmap.c' object='fontmap.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fontmap.o `test -f '$(DVIPNG_TREE)/fontmap.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/fontmap.c + +fontmap.obj: $(DVIPNG_TREE)/fontmap.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fontmap.obj -MD -MP -MF $(DEPDIR)/fontmap.Tpo -c -o fontmap.obj `if test -f '$(DVIPNG_TREE)/fontmap.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/fontmap.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/fontmap.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fontmap.Tpo $(DEPDIR)/fontmap.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/fontmap.c' object='fontmap.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fontmap.obj `if test -f '$(DVIPNG_TREE)/fontmap.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/fontmap.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/fontmap.c'; fi` + +tfm.o: $(DVIPNG_TREE)/tfm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tfm.o -MD -MP -MF $(DEPDIR)/tfm.Tpo -c -o tfm.o `test -f '$(DVIPNG_TREE)/tfm.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/tfm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tfm.Tpo $(DEPDIR)/tfm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/tfm.c' object='tfm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tfm.o `test -f '$(DVIPNG_TREE)/tfm.c' || echo '$(srcdir)/'`$(DVIPNG_TREE)/tfm.c + +tfm.obj: $(DVIPNG_TREE)/tfm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tfm.obj -MD -MP -MF $(DEPDIR)/tfm.Tpo -c -o tfm.obj `if test -f '$(DVIPNG_TREE)/tfm.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/tfm.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/tfm.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/tfm.Tpo $(DEPDIR)/tfm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(DVIPNG_TREE)/tfm.c' object='tfm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tfm.obj `if test -f '$(DVIPNG_TREE)/tfm.c'; then $(CYGPATH_W) '$(DVIPNG_TREE)/tfm.c'; else $(CYGPATH_W) '$(srcdir)/$(DVIPNG_TREE)/tfm.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -796,6 +1043,9 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ @@ -805,6 +1055,7 @@ distdir: $(DISTFILES) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) + dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) @@ -832,7 +1083,6 @@ dist-zip: distdir dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then @@ -941,6 +1191,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1029,9 +1280,9 @@ uninstall-am: uninstall-binPROGRAMS .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-TESTS check-am clean \ clean-binPROGRAMS clean-generic clean-libtool ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzma \ - dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \ + dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ + distclean distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ @@ -1046,6 +1297,16 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binPROGRAMS uninstall-hook +# in case of an SVN repository +dist-hook: + rm -rf `find $(distdir) -name .svn` + +$(dvipng_OBJECTS): config.force + +config.force: $(dvipng_dependencies) + echo timestamp >config.force + $(SHELL) ./config.status --recheck + @KPATHSEA_RULE@ @FREETYPE2_RULE@ @GD_RULE@ @@ -1060,13 +1321,6 @@ uninstall-am: uninstall-binPROGRAMS @have_gif_TRUE@uninstall-hook: @have_gif_TRUE@ rm -f $(DESTDIR)$(bindir)/dvigif$(EXEEXT) -test: test_dvipng.dvi dvipng$(EXEEXT) - ./dvipng -T tight -strict test_dvipng - echo View the result e.g. with xv test_dvipng\*.png - -test_dvipng.dvi: test_dvipng.tex - latex $(srcdir)/test_dvipng.tex - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/Build/source/texk/dvipng/Makefile.in.orig b/Build/source/texk/dvipng/Makefile.in.orig deleted file mode 100644 index 0e2ce2eaa00..00000000000 --- a/Build/source/texk/dvipng/Makefile.in.orig +++ /dev/null @@ -1,168 +0,0 @@ -# Makefile is generated by 'configure' from Makefile.in - -#************************************************************************ -# -# Part of the dvipng distribution -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program. If not, see -# . -# -# Copyright (C) 2002-2008 Jan-Åke Larsson -# -#************************************************************************ - -PACKAGE_STRING="@PACKAGE_STRING@" - -CC = @CC@ -CFLAGS = @CFLAGS@ -Wall -CPPFLAGS = @CPPFLAGS@ -I. -LN_S = @LN_S@ - -LIBS = @LIBS@ -LDFLAGS = @LDFLAGS@ - -srcdir = @srcdir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -infodir = @infodir@ -mandir = @mandir@ -DESTDIR= -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -MKINSTALLDIRS = $(srcdir)/mkinstalldirs - -MAKEINFO=@MAKEINFO@ @MAKEINFO_MACROS@ -INSTALL_INFO=@INSTALL_INFO@ -TEX=tex -TEXIDVI=texi2dvi -TEXIHTML=texi2html -DVIPS=dvips -TEXIFILES = dvipng.texi readme.texi install.texi macros.texi dvipng.help - -objects = dvipng.o color.o draw.o dvi.o font.o misc.o pk.o \ - set.o special.o papersiz.o ppagelist.o \ - vf.o @PSFONTS_O@ - -all: dvipng docs - -install: @INSTALL_BIN_TARGET@ @INSTALL_BIN_TARGET@-docs - -####################################### The program - -dvipng: $(objects) - $(CC) $(LDFLAGS) $(objects) -o dvipng $(LIBS) - -$(objects): dvipng.h commands.h config.h - -install-dvipng: dvipng - -$(MKINSTALLDIRS) $(DESTDIR)$(bindir) - $(INSTALL) dvipng $(DESTDIR)$(bindir) - -install-dvigif: install-dvipng - (cd $(DESTDIR)$(bindir) && rm -f dvigif && $(LN_S) dvipng dvigif) - -####################################### The documentation - -docs: dvipng.dvi dvipng.info - -dvipng.dvi: $(TEXIFILES) - -$(TEXIDVI) -I $(srcdir) $(srcdir)/dvipng.texi - -dvipng.ps: dvipng.dvi - $(DVIPS) -Ppdf dvipng.dvi - -dvipng.info: $(TEXIFILES) dvipng.help - -$(MAKEINFO) -I$(srcdir) $(srcdir)/dvipng.texi - -dvipng.help: dvipng - -./dvipng > dvipng.tmp - ( test -r dvipng.help && diff dvipng.tmp dvipng.help ) \ - || cp dvipng.tmp dvipng.help - rm -f dvipng.tmp - -www: $(TEXIFILES) dvipng.help - texi2html -split chapter -nosec-nav -subdir html \ - -I $(srcdir) $(srcdir)/dvipng.texi - (cd html; for i in *; do \ - sed -e "s/Jan-A/Jan-\Å\;/g" $$i > ../www/$$i; \ - done) - cp www/dvipng.html www/index.html - rm -rf html - -dvipng_mono.html: $(TEXIFILES) dvipng.help - texi2html --monolithic -nomenu -nosec_nav -o dvipng_mono.html \ - -I $(srcdir) $(srcdir)/dvipng.texi - -install-docs: docs - -$(MKINSTALLDIRS) $(DESTDIR)$(infodir) - for x in dvipng.info* ; do \ - $(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \ - done - -$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) dvipng.info - -$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1 - $(INSTALL_DATA) $(srcdir)/dvipng.1 $(DESTDIR)$(mandir)/man1 - -install-dvipng-docs: install-docs - -install-dvigif-docs: install-docs - (cd $(DESTDIR)$(mandir)/man1 && rm -f dvigif.1 && $(LN_S) dvipng.1 dvigif.1) - -####################################### The test - -test: test_dvipng.dvi dvipng - ./dvipng -T tight -strict test_dvipng - echo View the result e.g. with xv test_dvipng\*.png - -test_dvipng.dvi: test_dvipng.tex - latex $(srcdir)/test_dvipng.tex - -####################################### The cleaning up - -clean: - rm -f *.o dvipng *.help *.info* *dvipng.dvi *.aux *.log - rm -f *dvipng.ps *.cp *.fn *.ky *~ \#*\# \ - *.tp *.vr *.pg *.toc *.tp *.bak *.cps *.kys *.tps \ - *.fns *.vrs *.pgs *.html *.tmp - -distclean: clean - rm -f Makefile - rm -f config.status config.log config.cache c-auto.h - -####################################### Maintainer targets - -INSTALL: install.texi - -$(MAKEINFO) -D rawfile --no-headers --no-validate \ - --no-number-sections \ - -I$(srcdir) $(srcdir)/install.texi --output INSTALL - -README: readme.texi - -$(MAKEINFO) -D rawfile --no-headers --no-validate \ - --no-number-sections \ - -I$(srcdir) $(srcdir)/readme.texi --output README - -dvipng.1: dvipng.texi readme.texi - texi2pod.pl -D man $(srcdir)/dvipng.texi | \ - sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod - pod2man --center="User commands" --release=$(PACKAGE_STRING)\ - dvipng.pod > dvipng.1 - rm dvipng.pod - -dist: INSTALL README dvipng.1 distclean - -# SunOS make suffix rule wierdness -.cps.h: - diff --git a/Build/source/texk/dvipng/README b/Build/source/texk/dvipng/README deleted file mode 100644 index da9ba557f4c..00000000000 --- a/Build/source/texk/dvipng/README +++ /dev/null @@ -1,128 +0,0 @@ -dvipng -****** - -This program makes PNG and/or GIF graphics from DVI files as obtained -from TeX and its relatives. - - If GIF support is enabled, GIF output is chosen by using the -`dvigif' binary or with the `--gif' option. - - It is intended to produce anti-aliased screen-resolution images as -fast as is possible. The target audience is people who need to generate -and regenerate many images again and again. The primary target is the -preview-latex (X)Emacs package, a package to preview formulas from -within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs -buffer, see `http://www.gnu.org/software/auctex/preview-latex.html'. - - Another example is WeBWorK, an internet-based method for delivering -homework problems to students over the internet, giving students -instant feedback as to whether or not their answers are correct, see -`http://webwork.math.rochester.edu'. - - A more recent addition to the dvipng-using applications out there is -MediaWiki, the software behind Wikipedia and many other wikis out -there. Dvipng is used to render mathematical formulae from version -1.8.0 of MediaWiki, see `http://www.mediawiki.org'. - - Other applications may also benefit, like web applications as -latex2html and WYSIWYG editors like LyX. - -Benefits of dvipng -================== - - The benefits of `dvipng'/`dvigif' include - - * Speed. It is a very fast bitmap-rendering code for DVI files, which - makes it suitable for generating large amounts of images - on-the-fly, as needed in preview-latex, WeBWorK and others. - - * It does not read the postamble, so it can be started before TeX - finishes. There is a `--follow' switch that makes dvipng wait at - end-of-file for further output, unless it finds the POST marker - that indicates the end of the DVI. - - * Interactive query of options. dvipng can read options interactively - through stdin, and all options are usable. It is even possible to - change the input file through this interface. - - * Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts - (i.e., as used in CJK-LaTeX), color specials, and inclusion of - PostScript, PNG, JPEG or GIF images. - - * and more... - - -Installation -============ - -Read `INSTALL', included in the distribution. - -Usage -===== - -To use dvipng at its simplest, simply type - - dvipng foo - -where `foo.dvi' is the output of TeX that you want to convert to PNG -format. If there are four pages in `foo.dvi', those pages will be -output as `foo1.png', `foo2.png', `foo3.png', and `foo4.png', -respectively. - - Many options are available (see the info manual). For a brief -summary of available options, just type - - dvipng --help - -Availability -============ - -The dvipng package is available at Savannah, the GNU project site. Since -dvipng is not part of the GNU project, although released under the GNU -GPL, the web address is `http://savannah.nongnu.org/projects/dvipng'. -Instructions for anonymous CVS access can be found at -`http://savannah.nongnu.org/cvs/?group=dvipng'. - -Contacts -======== - -Bug reports should be sent to . - - Questions, suggestions for new features, pleas for help, and/or -praise should go to . For more information on this -mailing list, send a message with just the word `help' as subject or -body to or look at -`http://lists.nongnu.org/mailman/listinfo/dvipng'. - - Offers to support further development will be appreciated. For -developer access, ask on . - -Copying -======= - -This program is released under the GNU Lesser General Public License -version 3, see the COPYING file in the dvipng distribution or -`http://www.gnu.org/licenses/'. - - Copyright (C) 2002-2009 Jan-AAke Larsson - -Todo -==== - - * Use gs interpreter library for speed and possibly for - functionality. - - * Add more color models for xcolor compatibility - - * Fix T1lib and PK rendering so it is on par with Freetype. - - * Enable a named pipe as DVI - - * Further speed improvements. - - * Other output specials and source specials. - - * Clean internal structures. Overhaul file handling. - - * Fix the SELFAUTO stuff at runtime rather than at build time - diff --git a/Build/source/texk/dvipng/RELEASE b/Build/source/texk/dvipng/RELEASE deleted file mode 100644 index 95decb747c3..00000000000 --- a/Build/source/texk/dvipng/RELEASE +++ /dev/null @@ -1,22 +0,0 @@ -Release notes for version 1.12 of the dvipng package: - -This program makes PNG graphics from DVI files as obtained from TeX -and its relatives. - - -The main code addition in v 1.12 is to allow usage of recent versions -of the xcolor package, which also will reenable much of the PSTricks -package. - -Still it is the case that dvipng can only handle drawing PostScript -code at the moment, not PostScript code intended to make dvips + gs -scale, rotate, or move DVI glyphs (characters). This is because the -graphics state cannot be communicated back to dvipng from gs. So no -guarantees. Also, the performance in terms of runtime could be better. - -Other changes include a fix for inclusion of bitmaps with transparent -background and a typo in the file-handling code on machines that do -not have mmap. - - -Report any bugs you find, see README for instructions. diff --git a/Build/source/texk/dvipng/aclocal.m4 b/Build/source/texk/dvipng/aclocal.m4 index a7725766726..581dd664965 100644 --- a/Build/source/texk/dvipng/aclocal.m4 +++ b/Build/source/texk/dvipng/aclocal.m4 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, -[m4_warning([this file was generated for autoconf 2.63. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, +[m4_warning([this file was generated for autoconf 2.64. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff --git a/Build/source/texk/dvipng/aclocal.m4.orig b/Build/source/texk/dvipng/aclocal.m4.orig deleted file mode 100644 index 0cd4eddf92e..00000000000 --- a/Build/source/texk/dvipng/aclocal.m4.orig +++ /dev/null @@ -1,237 +0,0 @@ -# aclocal.m4 generated automatically by aclocal 1.6.3 -*- 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. - -# Configure paths for FreeType2 -# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor - -dnl AC_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS -dnl -AC_DEFUN(AC_CHECK_FT2, -[dnl -dnl Get the cflags and libraries from the freetype-config script -dnl -AC_ARG_WITH(ft-prefix, -[ --with-ft-prefix=PREFIX - Prefix where FreeType is installed (optional)], - ft_config_prefix="$withval", ft_config_prefix="") -AC_ARG_WITH(ft-exec-prefix, -[ --with-ft-exec-prefix=PREFIX - Exec prefix where FreeType is installed (optional)], - ft_config_exec_prefix="$withval", ft_config_exec_prefix="") -AC_ARG_ENABLE(freetypetest, -[ --disable-freetypetest Do not try to compile and run - a test FreeType program], - [], enable_fttest=yes) - -if test x$ft_config_exec_prefix != x ; then - ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" - if test x${FT2_CONFIG+set} != xset ; then - FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config - fi -fi -if test x$ft_config_prefix != x ; then - ft_config_args="$ft_config_args --prefix=$ft_config_prefix" - if test x${FT2_CONFIG+set} != xset ; then - FT2_CONFIG=$ft_config_prefix/bin/freetype-config - fi -fi -AC_PATH_PROG(FT2_CONFIG, freetype-config, no) - -min_ft_version=ifelse([$1], ,6.1.0,$1) -AC_MSG_CHECKING(for FreeType - version >= $min_ft_version) -no_ft="" -if test "$FT2_CONFIG" = "no" ; then - no_ft=yes -else - FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` - FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` - ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - ft_min_major_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - ft_min_minor_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - ft_min_micro_version=`echo $min_ft_version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test x$enable_fttest = xyes ; then - ft_config_is_lt="" - if test $ft_config_major_version -lt $ft_min_major_version ; then - ft_config_is_lt=yes - else - if test $ft_config_major_version -eq $ft_min_major_version ; then - if test $ft_config_minor_version -lt $ft_min_minor_version ; then - ft_config_is_lt=yes - else - if test $ft_config_minor_version -eq $ft_min_minor_version ; then - if test $ft_config_micro_version -lt $ft_min_micro_version ; then - ft_config_is_lt=yes - fi - fi - fi - fi - fi - if test x$ft_config_is_lt = xyes ; then - no_ft=yes - else - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $FT2_CFLAGS" - LIBS="$FT2_LIBS $LIBS" -dnl -dnl Sanity checks for the results of freetype-config to some extent -dnl - AC_TRY_RUN([ -#include -#include FT_FREETYPE_H -#include -#include - -int -main() -{ - FT_Library library; - FT_Error error; - - error = FT_Init_FreeType(&library); - - if (error) - return 1; - else - { - FT_Done_FreeType(library); - return 0; - } -} -],, no_ft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi # test $ft_config_version -lt $ft_min_version - fi # test x$enable_fttest = xyes -fi # test "$FT2_CONFIG" = "no" -if test x$no_ft = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) -else - AC_MSG_RESULT(no) - if test "$FT2_CONFIG" = "no" ; then - echo "*** The freetype-config script installed by FreeType 2 could not be found." - echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the FT2_CONFIG environment variable to the" - echo "*** full path to freetype-config." - else - if test x$ft_config_is_lt = xyes ; then - echo "*** Your installed version of the FreeType 2 library is too old." - echo "*** If you have different versions of FreeType 2, make sure that" - echo "*** correct values for --with-ft-prefix or --with-ft-exec-prefix" - echo "*** are used, or set the FT2_CONFIG environment variable to the" - echo "*** full path to freetype-config." - else - echo "*** The FreeType test program failed to run. If your system uses" - echo "*** shared libraries and they are installed outside the normal" - echo "*** system library path, make sure the variable LD_LIBRARY_PATH" - echo "*** (or whatever is appropiate for your system) is correctly set." - fi - fi - FT2_CFLAGS="" - FT2_LIBS="" - ifelse([$3], , :, [$3]) -fi -AC_SUBST(FT2_CFLAGS) -AC_SUBST(FT2_LIBS) -]) - - -dnl -dnl MAKEINFO_CHECK_MACRO( MACRO, [ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND]]) -dnl -AC_DEFUN(MAKEINFO_CHECK_MACRO, -[if test -n "$MAKEINFO" -a "$makeinfo" != ":"; then - AC_MSG_CHECKING([for @$1{}]) - echo \\\\input texinfo > conftest.texi - echo @$1{test} >> conftest.texi - if $MAKEINFO conftest.texi > /dev/null 2> /dev/null; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - ifelse([$3], , :, [$3]) - fi - rm -f conftest.texi conftest.info -fi -]) - -dnl -dnl MAKEINFO_CHECK_MACROS( MACRO ... [, ACTION-IF-FOUND -dnl [, ACTION-IF-NOT-FOUND]]) -dnl -AC_DEFUN(MAKEINFO_CHECK_MACROS, -[for ac_macro in $1; do - MAKEINFO_CHECK_MACRO($ac_macro, $2, - [MAKEINFO_MACROS="-D no-$ac_macro $MAKEINFO_MACROS" - $3])dnl - done -AC_SUBST(MAKEINFO_MACROS) -]) - - -dnl -dnl Check for enc, cmap, sfd formats -dnl -AC_DEFUN(AC_HAS_KPSE_ENC_FORMATS, - [AC_MSG_CHECKING([for kpse_enc_format]) - AC_TRY_COMPILE([ - #include - #include ], - [kpse_enc_format;kpse_cmap_format;kpse_sfd_format], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KPSE_ENC_FORMATS, 1, - [Define to 1 if your kpathsea has kpse_enc_format])], - [AC_MSG_RESULT(no)])]) - - -dnl -dnl Check devices for GS -dnl AC_GS_HAS_DEVICE(DEVICE,ACTION-IF-FAILED) -dnl -AC_DEFUN(AC_GS_HAS_DEVICE, - [AC_MSG_CHECKING([whether $GS has the $1 device]) - if $GS -h | grep $1 >/dev/null; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - $2 - fi -]) - -dnl -dnl GS_CHECK_DEVICES -dnl -AC_DEFUN(GS_CHECK_DEVICES, - [GS_WARN="" - AC_GS_HAS_DEVICE(pngalpha, - [GS_WARN="Your EPS inclusions will be cropped to the - boundingbox, and rendered on an opaque background. - Upgrade GhostScript to avoid this." - AC_GS_HAS_DEVICE(png16m, - [GS_WARN="Your EPS inclusions may not work. - Upgrade/install GhostScript to avoid this."])]) - if test -n "$GS_WARN"; then - AC_MSG_WARN([$GS_WARN]) - fi -]) diff --git a/Build/source/texk/dvipng/color.c b/Build/source/texk/dvipng/color.c deleted file mode 100644 index f3430ca616d..00000000000 --- a/Build/source/texk/dvipng/color.c +++ /dev/null @@ -1,436 +0,0 @@ -/* color.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" -#ifdef HAVE_ALLOCA_H -# include -#endif - -/* - * Color. We delete and recreate the gdImage for each new page. This - * means that the stack must contain rgb value not color index. - * Besides, the current antialiasing implementation needs rgb anyway. -*/ - -struct colorname { - struct colorname *next; - char* color; - char name[1]; -} *colornamep=NULL,*xcp=NULL; - -char *colordef[]={"xcolor.sty","dvipsnam.def", - "svgnam.def","x11nam.def",NULL}; -char *xcpname=NULL; - -void initcolor() -{ - csp = 1; - cstack[0].red=255; - cstack[0].green=255; - cstack[0].blue=255; - cstack[1].red=0; - cstack[1].green=0; - cstack[1].blue=0; -} - -static struct colorname * NewColor(char* prefix, int nprefix, - char* name, int nname, - char* model, int nmodel, - char* values, int nvalues) -{ - struct colorname *tmp = - malloc(sizeof(struct colorname)+3+nprefix+nname+nmodel+nvalues); - if (tmp==NULL) - Fatal("Cannot allocate space for color name"); - tmp->color=tmp->name+nprefix+nname+1; - strncpy(tmp->name,prefix,nprefix); - strncpy(tmp->name+nprefix,name,nname); - tmp->name[nprefix+nname]='\0'; - strncpy(tmp->color,model,nmodel); - tmp->color[nmodel]=' '; - strncpy(tmp->color+nmodel+1,values,nvalues); - tmp->color[nmodel+nvalues+1]='\0'; - model=tmp->color; - while(*model!='\0') { - if (*model==',') - *model=' '; - model++; - } - DEBUG_PRINT(DEBUG_COLOR,("\n COLOR NAME:\t'%s' '%s'", - tmp->name,tmp->color)); - return(tmp); -} - -#define FINDWORD(s) while(snext=list; - list=tmp; - } else if ((pos+15next=list; - list=tmp; - FINDWORD(pos); - } - } else { - pos++; - while (posnext; - free(xcp); - xcp=next; - } - if (xcpname!=NULL) { - free(xcpname); - xcpname=NULL; - } -} - -void ClearColorNames(void) -{ - struct colorname *next; - while (colornamep) { - next=colornamep->next; - free(colornamep); - colornamep=next; - } - ClearXColorPrologue(); -} - -void InitXColorPrologue(char* name) -{ - ClearXColorPrologue(); - xcpname=malloc(strlen(name)+1); - if (xcpname==NULL) - Fatal("cannot malloc memory for xcolor prologue name"); - strcpy(xcpname,name); -} - -static struct colorname* LoadXColorPrologue(void) -{ - struct colorname *list=NULL,*tmp=NULL; - char *filepath,*pos,*max; - char *prefix="",*name,*values,*model; - int nprefix=0,nname,nvalues,nmodel; - struct filemmap fmmap; - - TEMPSTR(filepath,kpse_find_file(xcpname,kpse_program_text_format,false)); - if (filepath == NULL) - return NULL; - DEBUG_PRINT(DEBUG_COLOR,("\n OPEN XCOLOR PROLOGUE:\t'%s'", filepath)); - if (MmapFile(filepath,&fmmap)) return NULL; - pos=fmmap.data; - max=fmmap.data+fmmap.size; - while(posnext=list; - list=tmp; - } - } - UnMmapFile(&fmmap); - return(list); -} - -#define FTO255(a) ((int) (255*a+0.5)) -#define WARN_IF_FAILED(a,b) if (a==b) { page_flags |= PAGE_GAVE_WARN; \ - Warning("missing color-specification value, treated as zero"); } - -#define SKIPSPACES(s) while(s && *s==' ' && *s!='\0') s++ -#define NEXTFLOAT255(c) FTO255(strtod(c,&end)); WARN_IF_FAILED(c,end); c=end -#define NEXTFLOAT(c) strtod(c,&end); WARN_IF_FAILED(c,end); c=end -#define NEXTINT(c) strtol(c,&end,10); WARN_IF_FAILED(c,end); c=end -#define NEXTHEX(c) strtol(c,&end,16); WARN_IF_FAILED(c,end); c=end - -void stringrgb(char* color,int *r,int *g,int *b) -{ - char* end; - static int unloaded=1; - - DEBUG_PRINT(DEBUG_COLOR,("\n COLOR SPEC:\t'%s' (",color)); - SKIPSPACES(color); - if (strcmp(color,"Black")==0) { - *r = *g = *b = 0; - } else if (strcmp(color,"White")==0) { - *r = *g = *b = 255; - } else if (strncmp(color,"gray ",5)==0) { - color+=5; - *r = *g = *b = NEXTFLOAT255(color); - } else if (strncmp(color,"rgb ",4)==0) { - color+=4; - *r = NEXTFLOAT255(color); - *g = NEXTFLOAT255(color); - *b = NEXTFLOAT255(color); - } else if (strncmp(color,"Gray ",5)==0) { - color+=5; - *r = *g = *b = NEXTINT(color); - } else if (strncmp(color,"RGB ",4)==0) { - color+=4; - *r = NEXTINT(color); - *g = NEXTINT(color); - *b = NEXTINT(color); - } else if (strncmp(color,"HTML ",5)==0) { - color+=5; - *b = NEXTHEX(color); - *r = *b/65536; - *g = *b/256; - *b -= *g*256; - *g -= *r*256; - } else if (strncmp(color,"cmy ",4)==0 - || strncmp(color,"cmyk ",5)==0) { - int c,m,y,k; - color+=3; - k=(*color=='k'); - if (k) - color++; - c = NEXTFLOAT255(color); - m = NEXTFLOAT255(color); - y = NEXTFLOAT255(color); - if (k) - k = NEXTFLOAT255(color); - *r = c+k<255 ? 255-(c+k) : 0; - *g = m+k<255 ? 255-(m+k) : 0; - *b = y+k<255 ? 255-(y+k) : 0; - } else if (strncmp(color,"hsb ",4)==0 - || strncmp(color,"HSB ",4)==0) { - /* The hsb and HSB models really need more presicion. - Use double and convert back*/ - double hu,sa,br,f,R,G,B; - int i; - if (*color=='h') { - color+=4; - hu = NEXTFLOAT(color); - sa = NEXTFLOAT(color); - br = NEXTFLOAT(color); - } else { - color+=4; - hu = (float)NEXTINT(color); hu /= 255; - sa = (float)NEXTINT(color); sa /= 255; - br = (float)NEXTINT(color); br /= 255; - } - i=6*hu; - f=6*hu-i; - switch(i) { - case 0: - R = br*(1-sa*0); G = br*(1-sa*(1-f)); B = br*(1-sa*1); break; - case 1: - R = br*(1-sa*f); G = br*(1-sa*0); B = br*(1-sa*1); break; - case 2: - R = br*(1-sa*1); G = br*(1-sa*0); B = br*(1-sa*(1-f)); break; - case 3: - R = br*(1-sa*1); G = br*(1-sa*f); B = br*(1-sa*0); break; - case 4: - R = br*(1-sa*(1-f)); G = br*(1-sa*1); B = br*(1-sa*0); break; - case 5: - R = br*(1-sa*0); G = br*(1-sa*1); B = br*(1-sa*f); break; - default: - R = br*(1-sa*0); G = br*(1-sa*1); B = br*(1-sa*1); - } - *r=FTO255(R); - *g=FTO255(G); - *b=FTO255(B); - } else { - /* Model not found, probably a color name */ - struct colorname *tmp; - - if (xcp==NULL && xcpname!=NULL) - xcp=LoadXColorPrologue(); - tmp=xcp; - while(tmp!=NULL && strcmp(color,tmp->name)!=0) - tmp=tmp->next; - if (tmp==NULL) { - if (colornamep==NULL) - colornamep=LoadColornameFile(colordef[0]); - tmp=colornamep; - while((tmp->next!=NULL || colordef[unloaded]!=NULL) - && strcmp(color,tmp->name)!=0) { - if (tmp->next==NULL) - tmp->next=LoadColornameFile(colordef[unloaded++]); - tmp=tmp->next; - } - } - if (strcmp(color,tmp->name)==0) { - /* Found: one-level recursion */ - DEBUG_PRINT(DEBUG_COLOR,("\n ---RECURSION--- ")) - stringrgb(tmp->color,r,g,b); - } else { - /* Not found, warn */ - page_flags |= PAGE_GAVE_WARN; - Warning("unimplemented color specification '%s'",color); - } - } - DEBUG_PRINT(DEBUG_COLOR,("%d %d %d) ",*r,*g,*b)) -} - -void background(char* p) -{ - stringrgb(p, &cstack[0].red, &cstack[0].green, &cstack[0].blue); - DEBUG_PRINT(DEBUG_COLOR,("\n BACKGROUND:\t(%d %d %d) ", - cstack[0].red, cstack[0].green, cstack[0].blue)); -} - -void pushcolor(char * p) -{ - if ( ++csp == STACK_SIZE ) - Fatal("out of color stack space") ; - stringrgb(p, &cstack[csp].red, &cstack[csp].green, &cstack[csp].blue); - DEBUG_PRINT(DEBUG_COLOR,("\n COLOR PUSH:\t(%d %d %d) ", - cstack[csp].red, cstack[csp].green, cstack[csp].blue)) -} - -void popcolor() -{ - if (csp > 1) csp--; /* Last color is global */ - DEBUG_PRINT(DEBUG_COLOR,("\n COLOR POP\t")) -} - -void resetcolorstack(char * p) -{ - if ( csp > 1 ) - Warning("global color change within nested colors"); - csp=0; - pushcolor(p) ; - DEBUG_PRINT(DEBUG_COLOR,("\n RESET COLOR:\tbottom of stack:")) -} - -void StoreColorStack(struct page_list *tpagep) -{ - int i=0; - - DEBUG_PRINT(DEBUG_COLOR,("\n STORE COLOR STACK:\t %d ", csp)); - tpagep->csp=csp; - while ( i <= csp ) { - DEBUG_PRINT(DEBUG_COLOR,("\n COLOR STACK:\t %d (%d %d %d) ",i, - cstack[i].red, cstack[i].green, cstack[i].blue)); - tpagep->cstack[i].red = cstack[i].red; - tpagep->cstack[i].green = cstack[i].green; - tpagep->cstack[i].blue = cstack[i].blue; - i++; - } -} - -void ReadColorStack(struct page_list *tpagep) -{ - int i=0; - - DEBUG_PRINT(DEBUG_COLOR,("\n READ COLOR STACK:\t %d ", tpagep->csp)); - csp=tpagep->csp; - while ( i <= tpagep->csp ) { - DEBUG_PRINT(DEBUG_COLOR,("\n COLOR STACK:\t %d (%d %d %d) ",i, - cstack[i].red, cstack[i].green, cstack[i].blue)); - cstack[i].red = tpagep->cstack[i].red; - cstack[i].green = tpagep->cstack[i].green; - cstack[i].blue = tpagep->cstack[i].blue; - i++; - } -} - -void StoreBackgroundColor(struct page_list *tpagep) -{ - /* Background color changes affect the _whole_ page */ - tpagep->cstack[0].red = cstack[0].red; - tpagep->cstack[0].green = cstack[0].green; - tpagep->cstack[0].blue = cstack[0].blue; -} diff --git a/Build/source/texk/dvipng/commands.h b/Build/source/texk/dvipng/commands.h deleted file mode 100644 index e2a5404bb32..00000000000 --- a/Build/source/texk/dvipng/commands.h +++ /dev/null @@ -1,196 +0,0 @@ -/* commands.h */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -/* DVI COMMANDS */ -#define DVIFORMAT 2 - -#define SETC_000 0 /* typeset character 0 and move right */ -#define SETC_127 127 /* typeset character 127 and move right */ -#define SET1 128 /* typeset a character and move right */ -#define SET2 129 /* ??? */ -#define SET3 130 /* ??? */ -#define SET4 131 /* ??? */ -#define SET_RULE 132 /* typeset a rule and move right */ -#define PUT1 133 /* typeset a character */ -#define PUT2 134 /* ??? */ -#define PUT3 135 /* ??? */ -#define PUT4 136 /* ??? */ -#define PUT_RULE 137 /* typeset a rule */ -#define NOP 138 /* no operation */ -#define BOP 139 /* beginning of page */ -#define EOP 140 /* ending of page */ -#define PUSH 141 /* save the current positions */ -#define POP 142 /* restore previous positions */ -#define RIGHT1 143 /* move right */ -#define RIGHT2 144 /* ??? */ -#define RIGHT3 145 /* ??? */ -#define RIGHT4 146 /* ??? */ -#define W0 147 /* move right by |w| */ -#define W1 148 /* move right and set |w| */ -#define W2 149 /* ??? */ -#define W3 150 /* ??? */ -#define W4 151 /* ??? */ -#define X0 152 /* move right by |x| */ -#define X1 153 /* move right and set |x| */ -#define X2 154 /* ??? */ -#define X3 155 /* ??? */ -#define X4 156 /* ??? */ -#define DOWN1 157 /* move down */ -#define DOWN2 158 /* ??? */ -#define DOWN3 159 /* ??? */ -#define DOWN4 160 /* ??? */ -#define Y0 161 /* move down by |y| */ -#define Y1 162 /* move down and set |y| */ -#define Y2 163 /* ??? */ -#define Y3 164 /* ??? */ -#define Y4 165 /* ??? */ -#define Z0 166 /* move down by |z| */ -#define Z1 167 /* move down and set |z| */ -#define Z2 168 /* ??? */ -#define Z3 169 /* ??? */ -#define Z4 170 /* ??? */ -#define FONT_00 171 /* set current font to 0 */ -#define FONT_63 234 /* set current font to 63 */ -#define FNT1 235 /* set current font */ -#define FNT2 236 /* Same as FNT1, except that arg is 2 bytes */ -#define FNT3 237 /* Same as FNT1, except that arg is 3 bytes */ -#define FNT4 238 /* Same as FNT1, except that arg is 4 bytes */ -#define XXX1 239 /* extension to \.DVI primitives */ -#define XXX2 240 /* Like XXX1, but 0<=k<65536 */ -#define XXX3 241 /* Like XXX1, but 0<=k<@t$2^{24}$@> */ -#define XXX4 242 /* potentially long extension to \.DVI - primitives */ -#define FNT_DEF1 243 /* define the meaning of a font number */ -#define FNT_DEF2 244 /* ??? */ -#define FNT_DEF3 245 /* ??? */ -#define FNT_DEF4 246 /* ??? */ -#define PRE 247 /* preamble */ -#define POST 248 /* postamble beginning */ -#define POST_POST 249 /* postamble ending */ - -/* undefined_commands 250,251,252,253,254,255 */ - -EXTERN const int8_t dvi_commandlength[256] -#ifdef MAIN -={ - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1, /* SETC_000 --- SETC_127 */ - 2,3,4,5,9, /* SET1 --- SET4, SET_RULE */ - 2,3,4,5,9, /* PUT1 --- PUT4, PUT_RULE */ - 1,45,1,1,1, /* NOP, BOP, EOP, PUSH, POP */ - 2,3,4,5, /* RIGHT1 --- RIGHT4 */ - 1,2,3,4,5, /* W0 --- W4 */ - 1,2,3,4,5, /* X0 --- X4 */ - 2,3,4,5, /* DOWN1 --- DOWN4 */ - 1,2,3,4,5, /* Y0 --- Y4 */ - 1,2,3,4,5, /* Z0 --- Z4 */ - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1, - 1,1,1,1, /* FONT_00 --- FONT_63 */ - 2,3,4,5, /* FNT1 --- FNT4 */ - 2,3,4,5, /* XXX1 --- XXX4 + special string */ - 16,17,18,19, /* FNT_DEF1 --- FNT_DEF4 + font name */ - 15, /* PRE + TeX comment */ - 29, /* POST */ - 10, /* POST_POST minimum */ - -1,-1,-1,-1,-1,-1 /* undefined */ -} -#endif -; - -EXTERN const char* dvi_commands[256] -#ifdef MAIN -={ -"SETC_000","SETC_001","SETC_002","SETC_003","SETC_004", -"SETC_005","SETC_006","SETC_007","SETC_008","SETC_009", -"SETC_010","SETC_011","SETC_012","SETC_013","SETC_014", -"SETC_015","SETC_016","SETC_017","SETC_018","SETC_019", -"SETC_020","SETC_021","SETC_022","SETC_023","SETC_024", -"SETC_025","SETC_026","SETC_027","SETC_028","SETC_029", -"SETC_030","SETC_031","SETC_032","SETC_033","SETC_034", -"SETC_035","SETC_036","SETC_037","SETC_038","SETC_039", -"SETC_040","SETC_041","SETC_042","SETC_043","SETC_044", -"SETC_045","SETC_046","SETC_047","SETC_048","SETC_049", -"SETC_050","SETC_051","SETC_052","SETC_053","SETC_054", -"SETC_055","SETC_056","SETC_057","SETC_058","SETC_059", -"SETC_060","SETC_061","SETC_062","SETC_063","SETC_064", -"SETC_065","SETC_066","SETC_067","SETC_068","SETC_069", -"SETC_070","SETC_071","SETC_072","SETC_073","SETC_074", -"SETC_075","SETC_076","SETC_077","SETC_078","SETC_079", -"SETC_080","SETC_081","SETC_082","SETC_083","SETC_084", -"SETC_085","SETC_086","SETC_087","SETC_088","SETC_089", -"SETC_090","SETC_091","SETC_092","SETC_093","SETC_094", -"SETC_095","SETC_096","SETC_097","SETC_098","SETC_099", -"SETC_100","SETC_101","SETC_102","SETC_103","SETC_104", -"SETC_105","SETC_106","SETC_107","SETC_108","SETC_109", -"SETC_110","SETC_111","SETC_112","SETC_113","SETC_114", -"SETC_115","SETC_116","SETC_117","SETC_118","SETC_119", -"SETC_120","SETC_121","SETC_122","SETC_123","SETC_124", -"SETC_125","SETC_126","SETC_127", -"SET1","SET2","SET3","SET4","SET_RULE", -"PUT1","PUT2","PUT3","PUT4","PUT_RULE", -"NOP","BOP","EOP","PUSH","POP", -"RIGHT1","RIGHT2","RIGHT3","RIGHT4", -"W0","W1","W2","W3","W4", -"X0","X1","X2","X3","X4", -"DOWN1","DOWN2","DOWN3","DOWN4", -"Y0","Y1","Y2","Y3","Y4", -"Z0","Z1","Z2","Z3","Z4", -"FONT_00","FONT_01","FONT_02","FONT_03","FONT_04", -"FONT_05","FONT_06","FONT_07","FONT_08","FONT_09", -"FONT_10","FONT_11","FONT_12","FONT_13","FONT_14", -"FONT_15","FONT_16","FONT_17","FONT_18","FONT_19", -"FONT_20","FONT_21","FONT_22","FONT_23","FONT_24", -"FONT_25","FONT_26","FONT_27","FONT_28","FONT_29", -"FONT_30","FONT_31","FONT_32","FONT_33","FONT_34", -"FONT_35","FONT_36","FONT_37","FONT_38","FONT_39", -"FONT_40","FONT_41","FONT_42","FONT_43","FONT_44", -"FONT_45","FONT_46","FONT_47","FONT_48","FONT_49", -"FONT_50","FONT_51","FONT_52","FONT_53","FONT_54", -"FONT_55","FONT_56","FONT_57","FONT_58","FONT_59", -"FONT_60","FONT_61","FONT_62","FONT_63", -"FNT1","FNT2","FNT3","FNT4", -"XXX1","XXX2","XXX3","XXX4", -"FNT_DEF1","FNT_DEF2","FNT_DEF3","FNT_DEF4", -"PRE","POST","POST_POST", -"UNDEF_250","UNDEF_251","UNDEF_252","UNDEF_253","UNDEF_254","UNDEF_255" -} -#endif -; - diff --git a/Build/source/texk/dvipng/config.h.in b/Build/source/texk/dvipng/config.h.in index b9267c4815f..3f334ea16eb 100644 --- a/Build/source/texk/dvipng/config.h.in +++ b/Build/source/texk/dvipng/config.h.in @@ -14,15 +14,6 @@ /* Define as 1 to get the debug (-d) option. */ #undef DEBUG -/* The environment setting for $SELFAUTODIR */ -#undef ENV_SELFAUTODIR - -/* The environment setting for $SELFAUTOLOC */ -#undef ENV_SELFAUTOLOC - -/* The environment setting for $SELFAUTOPARENT */ -#undef ENV_SELFAUTOPARENT - /* Define as the path to GhostScript. */ #undef GS_PATH @@ -155,6 +146,12 @@ /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET +/* Define to 1 if you have the `mkstemp' function. */ +#undef HAVE_MKSTEMP + +/* Define to 1 if you have the `mktemp' function. */ +#undef HAVE_MKTEMP + /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP @@ -213,7 +210,7 @@ /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL -/* Define to 1 if `st_mtim' is member of `struct stat'. */ +/* Define to 1 if `struct stat' is a member of `st_mtim'. */ #undef HAVE_STRUCT_STAT_ST_MTIM /* Define to 1 if you have the header file, and it defines `DIR'. @@ -282,6 +279,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff --git a/Build/source/texk/dvipng/configure b/Build/source/texk/dvipng/configure index f17937ec43e..014493a98ad 100755 --- a/Build/source/texk/dvipng/configure +++ b/Build/source/texk/dvipng/configure @@ -1,20 +1,22 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for dvipng 1.12. +# Generated by GNU Autoconf 2.64 for dvipng 1.12. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Foundation, Inc. +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -22,23 +24,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -46,7 +40,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -57,7 +57,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -80,13 +80,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -96,15 +89,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -116,12 +109,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -133,7 +130,249 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and tex-k@tug.org +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -147,8 +386,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -168,409 +411,120 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit } -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null fi - -if as_func_ret_success; then - : +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi else - exitcode=1 - echo as_func_ret_success failed. + as_ln_s='cp -p' fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - exitcode=1 - echo positional parameters were not saved. + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in #( + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi +as_executable_p=$as_test_x -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" @@ -740,7 +694,6 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='dvipng' @@ -748,8 +701,9 @@ PACKAGE_TARNAME='dvipng' PACKAGE_VERSION='1.12' PACKAGE_STRING='dvipng 1.12' PACKAGE_BUGREPORT='tex-k@tug.org' +PACKAGE_URL='' -ac_unique_file="dvipng.c" +ac_unique_file="dvipng-1.12/dvipng.c" # Factoring default headers for most tests. ac_includes_default="\ #include @@ -789,6 +743,7 @@ ac_includes_default="\ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +DVIPNG_TREE have_gif_FALSE have_gif_TRUE have_ft2_or_t1_FALSE @@ -822,7 +777,6 @@ KPATHSEA_RULE KPATHSEA_DEPEND KPATHSEA_LIBS KPATHSEA_INCLUDES -KPSEWHICH INSTALL_INFO AM_MAKEINFOFLAGS POW_LIB @@ -930,6 +884,7 @@ bindir program_transform_name prefix exec_prefix +PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -953,7 +908,6 @@ enable_compiler_warnings enable_debug enable_timing with_gs -enable_selfauto_set with_system_kpathsea with_kpathsea_includes with_kpathsea_libdir @@ -1088,8 +1042,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1115,8 +1068,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1320,8 +1272,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1337,8 +1288,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1368,17 +1318,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1395,15 +1345,13 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1426,8 +1374,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1457,11 +1404,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1500,13 +1445,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1620,20 +1563,11 @@ Optional Features: --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files - --enable-compiler-warnings=[no|min|yes|max] + --enable-compiler-warnings=[no|min|yes|max|all] Turn on compiler warnings [default: yes if maintainer-mode, min otherwise] --disable-debug Compile without debug (-d) option --enable-timing Output execution time of dvipng - --enable-selfauto-set This option will make the final binary explicitly - set the $SELFAUTO... variables to make it look as - dvipng is installed in the main texmf tree, even if - it isn't. This is necessary when texmf.cnf only uses - $SELFAUTO... variables and dvipng is not installed - in the texmf tree. Otherwise, dvipng may not be able - to find virtual fonts, or psfonts.map. To find out, - first build the binary and do 'make test'. If the - test fails, you need this switch. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1743,538 +1677,1096 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF dvipng configure 1.12 -generated by GNU Autoconf 2.63 +generated by GNU Autoconf 2.64 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -It was created by dvipng $as_me 1.12, which was -generated by GNU Autoconf 2.63. Invocation command line was - - $ $0 $@ +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## -_ACEOF -exec 5>>config.log +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +} # ac_fn_c_try_compile -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval -## ----------- ## -## Core tests. ## -## ----------- ## +} # ac_fn_c_try_link +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_header_compile -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo +} # ac_fn_c_try_cpp - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + return $ac_retval -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h +} # ac_fn_c_try_run -# Predefined preprocessor variables. +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +#undef $2 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" +int +main () +{ +return $2 (); + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_func -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> _ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_header_preproc=no fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -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 - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( cat <<\_ASBOX +## ---------------------------- ## +## Report this to tex-k@tug.org ## +## ---------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file + eval "$3=\$ac_header_compiler" fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_header_mongrel +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_member +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_check_type +# ac_fn_c_find_intX_t LINENO BITS VAR +# ----------------------------------- +# Finds a signed integer type with width BITS, setting cache variable VAR +# accordingly. +ac_fn_c_find_intX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 +$as_echo_n "checking for int$2_t... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + for ac_type in int$2_t 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1))]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 1) + < ($ac_type) (((($ac_type) 1 << ($2 - 2)) - 1) * 2 + 2))]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +else + case $ac_type in #( + int$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval as_val=\$$3 + if test "x$as_val" = x""no; then : +else + break +fi + done +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_find_intX_t +# ac_fn_c_find_uintX_t LINENO BITS VAR +# ------------------------------------ +# Finds an unsigned integer type with width BITS, setting cache variable VAR +# accordingly. +ac_fn_c_find_uintX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 +$as_echo_n "checking for uint$2_t... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(($ac_type) -1 >> ($2 - 1) == 1)]; +test_array [0] = 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + case $ac_type in #( + uint$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval as_val=\$$3 + if test "x$as_val" = x""no; then : +else + break +fi + done +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +} # ac_fn_c_find_uintX_t +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +It was created by dvipng $as_me 1.12, which was +generated by GNU Autoconf 2.64. Invocation command line was + $ $0 $@ +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` +_ASUNAME +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +} >&5 +cat >&5 <<_ACEOF +## ----------- ## +## Core tests. ## +## ----------- ## -ac_aux_dir= -for ac_dir in ../../build-aux "$srcdir"/../../build-aux; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../../build-aux \"$srcdir\"/../../build-aux" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in ../../build-aux \"$srcdir\"/../../build-aux" >&2;} - { (exit 1); exit 1; }; } -fi +_ACEOF -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo -# Common code for all programs using libkpathsea. -am__api_version='1.11' + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done -IFS=$as_save_IFS +ac_signal=0 -rm -rf conftest.one conftest.two conftest.dir +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +$as_echo "/* confdefs.h */" > confdefs.h -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +# Predefined preprocessor variables. -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in ../../build-aux "$srcdir"/../../build-aux; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done +done +if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in ../../build-aux \"$srcdir\"/../../build-aux" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +# Common code for all programs using libkpathsea. +am__api_version='1.11' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 -$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 -$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2296,11 +2788,8 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file @@ -2309,13 +2798,10 @@ then # Ok. : else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" @@ -2343,7 +2829,7 @@ if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi @@ -2364,9 +2850,9 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then +if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -2377,24 +2863,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2404,9 +2890,9 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -2417,24 +2903,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2443,7 +2929,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2456,10 +2942,10 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then + if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2467,7 +2953,7 @@ for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do + for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( @@ -2479,7 +2965,7 @@ do esac done done -done + done IFS=$as_save_IFS fi @@ -2495,7 +2981,7 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" @@ -2508,9 +2994,9 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then +if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2521,24 +3007,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2546,11 +3032,11 @@ fi test -n "$AWK" && break done -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2568,11 +3054,11 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2588,7 +3074,7 @@ rmdir .tst 2>/dev/null case `pwd` in *\ * | *\ *) - { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac @@ -2613,35 +3099,27 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then +if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2657,28 +3135,24 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then +if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2706,7 +3180,7 @@ am__doit: .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= @@ -2734,12 +3208,12 @@ if test "$am__include" = "#"; then fi -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi @@ -2764,9 +3238,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2777,24 +3251,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2804,9 +3278,9 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2817,24 +3291,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2843,7 +3317,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2857,9 +3331,9 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2870,24 +3344,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2897,9 +3371,9 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2911,18 +3385,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2941,10 +3415,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2956,9 +3430,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2969,24 +3443,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3000,9 +3474,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3013,24 +3487,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -3043,7 +3517,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -3054,73 +3528,55 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + rm -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` @@ -3137,17 +3593,17 @@ do done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3164,7 +3620,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3183,84 +3639,75 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then +if test -z "$ac_file"; then : $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } fi - ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (case "(($ac_try" in + { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. +as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +See \`config.log' for more details." "$LINENO" 5; } fi fi fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3275,32 +3722,24 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then +if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3312,17 +3751,17 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3335,31 +3774,23 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then +if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3373,37 +3804,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -3412,20 +3822,16 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then +if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3436,35 +3842,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3475,36 +3857,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3515,42 +3873,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -3567,18 +3900,14 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3635,32 +3964,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3671,17 +3977,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3691,9 +3999,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -3801,7 +4109,7 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type @@ -3816,9 +4124,9 @@ else fi -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then +if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -3826,7 +4134,7 @@ else ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - $as_unset ac_script || ac_script= + { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -3835,7 +4143,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue @@ -3855,7 +4163,7 @@ case `"$ac_path_SED" --version 2>&1` in $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" @@ -3870,19 +4178,17 @@ esac $ac_path_SED_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -3900,9 +4206,9 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then +if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3913,7 +4219,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue @@ -3933,7 +4239,7 @@ case `"$ac_path_GREP" --version 2>&1` in $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -3948,26 +4254,24 @@ esac $ac_path_GREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then +if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -3981,7 +4285,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue @@ -4001,7 +4305,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -4016,12 +4320,10 @@ esac $ac_path_EGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4029,14 +4331,14 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then +if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -4050,7 +4352,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do + for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue @@ -4070,7 +4372,7 @@ case `"$ac_path_FGREP" --version 2>&1` in $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" @@ -4085,12 +4387,10 @@ esac $ac_path_FGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4098,7 +4398,7 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -4124,7 +4424,7 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no @@ -4133,7 +4433,7 @@ fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) @@ -4163,13 +4463,13 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then +if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -4200,18 +4500,16 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - { $as_echo "$as_me:$LINENO: result: $LD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then +if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -4224,7 +4522,7 @@ case `$LD -v 2>&1 &5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -4236,9 +4534,9 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then +if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -4285,7 +4583,7 @@ else : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" @@ -4296,9 +4594,9 @@ else do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then +if test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -4309,24 +4607,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4340,9 +4638,9 @@ if test -z "$DUMPBIN"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then +if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -4353,24 +4651,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4383,7 +4681,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -4403,44 +4701,44 @@ test -z "$NM" && NM=nm -{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then +if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4413: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4711: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4416: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4714: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4419: output\"" >&5) + (eval echo "\"\$as_me:4717: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then +if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 @@ -4558,10 +4856,10 @@ else fi if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:$LINENO: result: none" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -4575,7 +4873,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no @@ -4585,17 +4883,17 @@ xsi_shell=no && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes -{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes -{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } @@ -4630,14 +4928,14 @@ esac -{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then +if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in @@ -4666,9 +4964,9 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then +if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -4679,24 +4977,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4706,9 +5004,9 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -4719,24 +5017,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4745,7 +5043,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -4765,9 +5063,9 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then +if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -4961,7 +5259,7 @@ tpf*) esac fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method @@ -4981,9 +5279,9 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then +if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -4994,24 +5292,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5021,9 +5319,9 @@ if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -5034,24 +5332,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5060,7 +5358,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5086,9 +5384,9 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then +if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -5099,24 +5397,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5126,9 +5424,9 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -5139,24 +5437,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5165,7 +5463,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5185,9 +5483,9 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then +if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -5198,24 +5496,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5225,9 +5523,9 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -5238,24 +5536,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5264,7 +5562,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5342,9 +5640,9 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -5460,18 +5758,18 @@ void nm_test_func(void){} int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -5524,11 +5822,11 @@ _LT_EOF lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" @@ -5562,10 +5860,10 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:$LINENO: result: failed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else - { $as_echo "$as_me:$LINENO: result: ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi @@ -5592,7 +5890,7 @@ fi # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then +if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi @@ -5604,11 +5902,11 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" @@ -5622,12 +5920,12 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5625 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + echo '#line 5923 "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) @@ -5661,11 +5959,11 @@ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in @@ -5714,9 +6012,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then +if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -5725,11 +6023,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5740,38 +6034,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5779,7 +6048,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf @@ -5789,11 +6058,11 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in @@ -5819,9 +6088,9 @@ need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then +if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -5832,24 +6101,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5859,9 +6128,9 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then +if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -5872,24 +6141,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5898,7 +6167,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -5911,9 +6180,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then +if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -5924,24 +6193,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5951,9 +6220,9 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then +if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -5964,24 +6233,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5990,7 +6259,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6003,9 +6272,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then +if test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -6016,24 +6285,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6043,9 +6312,9 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then +if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -6056,24 +6325,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6082,7 +6351,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6095,9 +6364,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then +if test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -6108,24 +6377,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6135,9 +6404,9 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then +if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -6148,24 +6417,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6174,7 +6443,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6187,9 +6456,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then +if test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -6200,24 +6469,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6227,9 +6496,9 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then +if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -6240,24 +6509,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6266,7 +6535,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -6302,9 +6571,9 @@ fi - { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then +if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -6329,22 +6598,18 @@ else rm -f conftest.* fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then +if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6355,42 +6620,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no + lt_cv_ld_exported_symbols_list=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) @@ -6432,14 +6672,14 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -6454,11 +6694,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -6467,78 +6703,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +if $ac_preproc_ok; then : break fi @@ -6550,7 +6742,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -6561,11 +6753,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -6574,87 +6762,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -6664,16 +6805,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -6688,48 +6825,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -6739,18 +6851,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -6760,14 +6868,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -6794,118 +6898,34 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -6915,62 +6935,13 @@ fi done - for ac_header in dlfcn.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_DLFCN_H 1 _ACEOF fi @@ -6978,30 +6949,28 @@ fi done # Check whether --enable-compiler-warnings was given. -if test "${enable_compiler_warnings+set}" = set; then +if test "${enable_compiler_warnings+set}" = set; then : enableval=$enable_compiler_warnings; fi -case $enable_compiler_warnings in - no | min | yes | max) : ;; - *) if test "x$enable_maintainer_mode" = xyes; then +case $enable_compiler_warnings in #( + no | min | yes | max | all) : + ;; #( + *) : + if test "x$enable_maintainer_mode" = xyes; then : enable_compiler_warnings=yes else enable_compiler_warnings=min -fi - ;; +fi ;; esac - if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -7058,16 +7027,16 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then +if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi - { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= @@ -7094,7 +7063,7 @@ fi # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -7125,7 +7094,7 @@ fi # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -7157,7 +7126,7 @@ fi # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then +if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default @@ -7173,7 +7142,7 @@ test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then +if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -7254,9 +7223,9 @@ if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then +if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -7269,7 +7238,7 @@ else fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir @@ -7362,9 +7331,9 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -7415,10 +7384,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7428,9 +7397,9 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:$LINENO: checking for file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -7481,10 +7450,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7565,9 +7534,9 @@ lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' - { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -7583,11 +7552,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7586: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7555: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7590: \$? = $ac_status" >&5 + echo "$as_me:7559: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7600,7 +7569,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then @@ -7620,7 +7589,7 @@ fi lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then @@ -7892,7 +7861,7 @@ case $host_os in lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } @@ -7904,9 +7873,9 @@ $as_echo "$lt_prog_compiler_pic" >&6; } # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then +if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -7922,11 +7891,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7925: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7894: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7929: \$? = $ac_status" >&5 + echo "$as_me:7898: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7939,7 +7908,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then @@ -7963,9 +7932,9 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then +if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -7991,7 +7960,7 @@ else LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then @@ -8006,9 +7975,9 @@ fi - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8027,11 +7996,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8030: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7999: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8034: \$? = $ac_status" >&5 + echo "$as_me:8003: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8053,7 +8022,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -8061,9 +8030,9 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8082,11 +8051,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8085: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8054: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8089: \$? = $ac_status" >&5 + echo "$as_me:8058: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8108,7 +8077,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -8117,7 +8086,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* @@ -8125,10 +8094,10 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi @@ -8141,7 +8110,7 @@ fi - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= @@ -8583,11 +8552,7 @@ _LT_EOF allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8598,27 +8563,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -8632,16 +8577,9 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -8654,11 +8592,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi else # Determine the default libpath from the value encoded in an # empty executable. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -8669,27 +8603,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -8703,16 +8617,9 @@ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpat if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -8924,42 +8831,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ int foo(void) {} _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' @@ -9215,7 +9096,7 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ fi fi -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no @@ -9252,16 +9133,16 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext @@ -9275,11 +9156,11 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } then archive_cmds_need_lc=no else @@ -9290,7 +9171,7 @@ $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } cat conftest.err 1>&5 fi $RM conftest* - { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac @@ -9454,7 +9335,7 @@ esac - { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then @@ -9729,1463 +9610,397 @@ freebsd* | dragonfly*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. - postinstall_cmds='chmod 555 $lib' - ;; - -interix[3-9]*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be Linux ELF. -linux* | k*bsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then - shlibpath_overrides_runpath=yes -fi - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - ;; - -*nto* | *qnx*) - version_type=qnx - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - version_type=linux - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' - shlibpath_var=LD_LIBRARY_PATH - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - version_type=linux - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dl_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 -$as_echo_n "checking for shl_load... " >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case declares shl_load. - For example, HP-UX 11i declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -$as_echo "$ac_cv_func_shl_load" >&6; } -if test "x$ac_cv_func_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dld_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case declares dlopen. - For example, HP-UX 11i declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -$as_echo "$ac_cv_func_dlopen" >&6; } -if test "x$ac_cv_func_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dl_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_svld_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dld_dld_link=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 10885 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line 10981 "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -void fnord() { int i=42;} -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ + freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; -fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' ;; esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac +interix[3-9]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - fi + irix5* | nonstopux*) + libsuff= shlibsuff= ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac ;; esac -fi - - - - - - - - - + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # Report which library types will actually be built - { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } +int +main () +{ - { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : + shlibpath_overrides_runpath=yes +fi +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi - { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; -CC="$lt_save_CC" +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +$as_echo "$dynamic_linker" >&6; } +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi @@ -11197,1203 +10012,335 @@ CC="$lt_save_CC" - ac_config_commands="$ac_config_commands libtool" -# Only expand once: -# Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then - enableval=$enable_largefile; -fi -if test "$enable_largefile" != no; then - { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 -$as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - ac_save_CC=$CC - while :; do - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext - CC="$CC -n32" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_sys_largefile_CC=' -n32'; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext - break - done - CC=$ac_save_CC - rm -f conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 -$as_echo "$ac_cv_sys_largefile_CC" >&6; } - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then - $as_echo_n "(cached) " >&6 -else - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_sys_file_offset_bits=no; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _FILE_OFFSET_BITS 64 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_sys_file_offset_bits=64; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_file_offset_bits=unknown - break -done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 -$as_echo "$ac_cv_sys_file_offset_bits" >&6; } -case $ac_cv_sys_file_offset_bits in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits -_ACEOF -;; -esac -rm -rf conftest* - if test $ac_cv_sys_file_offset_bits = unknown; then - { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 -$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then - $as_echo_n "(cached) " >&6 -else - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_sys_large_files=no; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _LARGE_FILES 1 -#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply define LARGE_OFF_T to be 9223372036854775807, - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_sys_large_files=1; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_sys_large_files=unknown - break -done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 -$as_echo "$ac_cv_sys_large_files" >&6; } -case $ac_cv_sys_large_files in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGE_FILES $ac_cv_sys_large_files -_ACEOF -;; -esac -rm -rf conftest* - fi -fi -{ $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then - $as_echo_n "(cached) " >&6 -else - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_sys_largefile_source=no; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define _LARGEFILE_SOURCE 1 -#include /* for off_t */ - #include -int -main () -{ -int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_sys_largefile_source=1; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_cv_sys_largefile_source=unknown - break -done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 -$as_echo "$ac_cv_sys_largefile_source" >&6; } -case $ac_cv_sys_largefile_source in #( - no | unknown) ;; - *) -cat >>confdefs.h <<_ACEOF -#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source -_ACEOF -;; -esac -rm -rf conftest* -# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -# in glibc 2.1.3, but that breaks too many other things. -# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -if test $ac_cv_sys_largefile_source != unknown; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_FSEEKO 1 -_ACEOF -fi -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 -$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include <$ac_hdr> -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF -ac_header_dirent=$ac_hdr; break -fi -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' dir; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_opendir=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then - : -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -fi -else - { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 -$as_echo_n "checking for library containing opendir... " >&6; } -if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char opendir (); -int -main () -{ -return opendir (); - ; - return 0; -} -_ACEOF -for ac_lib in '' x; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_opendir=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_opendir+set}" = set; then - break -fi -done -if test "${ac_cv_search_opendir+set}" = set; then - : -else - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 -$as_echo "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -fi -fi -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +$as_echo_n "checking how to hardcode library paths into programs... " >&6; } +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || + test -n "$runpath_var" || + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi else - ac_cv_header_stdc=no + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported fi -rm -f conftest* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +$as_echo "$hardcode_action" >&6; } +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless fi -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* -fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : + + + if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); int main () { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; +return dlopen (); + ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no + ac_cv_lib_dl_dlopen=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF -fi + ;; -{ $as_echo "$as_me:$LINENO: checking whether closedir returns void" >&5 -$as_echo_n "checking whether closedir returns void... " >&6; } -if test "${ac_cv_func_closedir_void+set}" = set; then - $as_echo_n "(cached) " >&6 + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = x""yes; then : + lt_cv_dlopen="shl_load" else - if test "$cross_compiling" = yes; then - ac_cv_func_closedir_void=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if test "${ac_cv_lib_dld_shl_load+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header_dirent> -#ifndef __cplusplus -int closedir (); -#endif +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); int main () { -return closedir (opendir (".")) != 0; +return shl_load (); ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_closedir_void=no +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_closedir_void=yes -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + ac_cv_lib_dld_shl_load=no fi - - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5 -$as_echo "$ac_cv_func_closedir_void" >&6; } -if test $ac_cv_func_closedir_void = yes; then - -cat >>confdefs.h <<\_ACEOF -#define CLOSEDIR_VOID 1 -_ACEOF - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - - - - - - - - - - - -for ac_header in assert.h float.h limits.h memory.h pwd.h stdlib.h \ - string.h strings.h sys/param.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + ac_cv_lib_dl_dlopen=no fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------- ## -## Report this to tex-k@tug.org ## -## ---------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi - -done - - - - - -for ac_func in putenv strcasecmp strtol strstr -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -12401,1672 +10348,1025 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - +char dld_link (); int main () { -return $ac_func (); +return dld_link (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" +fi + -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + fi -done +fi +fi +fi + ;; + esac + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" -for ac_func in bcmp bcopy bzero getcwd getwd index memcmp memcpy rindex strchr strrchr -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +$as_echo_n "checking whether a program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10421 "configure" +#include "confdefs.h" -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +#if HAVE_DLFCN_H +#include +#endif -#ifdef __STDC__ -# include +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL #else -# include +# 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 -#undef $ac_func +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +} +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +$as_echo "$lt_cv_dlopen_self" >&6; } + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } +if test "${lt_cv_dlopen_self_static+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +#line 10517 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include #endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif #endif -int -main () -{ -return $ac_func (); - ; - return 0; +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; } -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +_LT_EOF + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 + (eval $ac_link) 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&5 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi fi +rm -fr conftest* -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF fi -done - -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +$as_echo "$lt_cv_dlopen_self_static" >&6; } + fi - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_const=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac - ac_cv_c_const=no + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then -cat >>confdefs.h <<\_ACEOF -#define const /**/ -_ACEOF -fi -{ $as_echo "$as_me:$LINENO: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for struct stat.st_mtim" >&5 -$as_echo_n "checking for struct stat.st_mtim... " >&6; } -if test "${ac_cv_member_struct_stat_st_mtim+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static struct stat ac_aggr; -if (ac_aggr.st_mtim) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_mtim=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static struct stat ac_aggr; -if (sizeof ac_aggr.st_mtim) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_stat_st_mtim=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_member_struct_stat_st_mtim=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +striplib= +old_striplib= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +$as_echo_n "checking whether stripping libraries is possible... " >&6; } +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + ;; + esac fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_mtim" >&5 -$as_echo "$ac_cv_member_struct_stat_st_mtim" >&6; } -if test "x$ac_cv_member_struct_stat_st_mtim" = x""yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_MTIM 1 -_ACEOF -fi -{ $as_echo "$as_me:$LINENO: checking whether the compiler accepts prototypes" >&5 -$as_echo_n "checking whether the compiler accepts prototypes... " >&6; } -if test "${kb_cv_c_prototypes+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -extern void foo(int i,...); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - kb_cv_c_prototypes=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - kb_cv_c_prototypes=no -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $kb_cv_c_prototypes" >&5 -$as_echo "$kb_cv_c_prototypes" >&6; } -if test "x$kb_cv_c_prototypes" = xno; then - { { $as_echo "$as_me:$LINENO: error: Sorry, your compiler does not understand prototypes." >&5 -$as_echo "$as_me: error: Sorry, your compiler does not understand prototypes." >&2;} - { (exit 1); exit 1; }; } -fi -{ $as_echo "$as_me:$LINENO: checking whether program_invocation_name is predefined" >&5 -$as_echo_n "checking whether program_invocation_name is predefined... " >&6; } -if test "${kb_cv_var_program_inv_name+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ -extern char *program_invocation_name; - program_invocation_name = "love"; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - kb_cv_var_program_inv_name=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - kb_cv_var_program_inv_name=no -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $kb_cv_var_program_inv_name" >&5 -$as_echo "$kb_cv_var_program_inv_name" >&6; } -if test "$kb_cv_var_program_inv_name" = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PROGRAM_INVOCATION_NAME 1 -_ACEOF -fi -{ $as_echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5 -$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } -if test "${kpse_cv_warning_cflags+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$enable_compiler_warnings" = xno; then - kpse_cv_warning_cflags= -elif test "x$GCC" = xyes; then - kpse_cv_warning_cflags="-Wall -Wunused" - case `$CC -dumpversion` in - 3.4.* | 4.*) kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; -esac - case `$CC -dumpversion` in - 3.[234].* | 4.*) kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; -esac + # Report which library types will actually be built + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +$as_echo_n "checking if libtool supports shared libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +$as_echo "$can_build_shared" >&6; } - if test "x$enable_compiler_warnings" != xmin; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" - if test "x$enable_compiler_warnings" != xyes; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wimplicit -Wparentheses -Wreturn-type" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wswitch -Wtrigraphs -Wshadow -Wpointer-arith" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" - case `$CC -dumpversion` in - 3.4.* | 4.*) kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; -esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +$as_echo_n "checking whether to build shared libraries... " >&6; } + test "$can_build_shared" = "no" && enable_shared=no + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' fi - fi -else - : # FIXME: warning flags for non-gcc compilers -fi -fi -{ $as_echo "$as_me:$LINENO: result: $kpse_cv_warning_cflags" >&5 -$as_echo "$kpse_cv_warning_cflags" >&6; } -WARNING_CFLAGS=$kpse_cv_warning_cflags + ;; + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +$as_echo_n "checking whether to build static libraries... " >&6; } + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +$as_echo "$enable_static" >&6; } -# Configure options for dvipng also shown at the TeX Live top-level. -## texk/dvipng/ac/dvipng.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipng/ -## configure options for dvipng -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then - enableval=$enable_debug; -fi -# Check whether --enable-timing was given. -if test "${enable_timing+set}" = set; then - enableval=$enable_timing; fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +CC="$lt_save_CC" -# Check whether --with-gs was given. -if test "${with_gs+set}" = set; then - withval=$with_gs; -fi -if test "x$enable_debug" != xno; then - enable_debug=yes -cat >>confdefs.h <<\_ACEOF -#define DEBUG 1 -_ACEOF -fi -if test "x$enable_timing" = xyes; then -cat >>confdefs.h <<\_ACEOF -#define TIMING 1 -_ACEOF -fi -# Checks for programs. -# For a native TeX Live build '--with-gs' is ignored. -if test "x$enable_native_texlive_build" = xyes; then - with_gs= -fi -case $with_gs in - "" | yes | no) # Extract the first word of "gs", so it can be a program name with args. -set dummy gs; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_GS+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$GS"; then - ac_cv_prog_GS="$GS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_GS="gs" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS -fi -fi -GS=$ac_cv_prog_GS -if test -n "$GS"; then - { $as_echo "$as_me:$LINENO: result: $GS" >&5 -$as_echo "$GS" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - ;; - *) # Extract the first word of ""$with_gs"", so it can be a program name with args. -set dummy "$with_gs"; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GS+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $GS in - [\\/]* | ?:[\\/]*) - ac_cv_path_GS="$GS" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_GS="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + ac_config_commands="$ac_config_commands libtool" - ;; -esac -fi -GS=$ac_cv_path_GS -if test -n "$GS"; then - { $as_echo "$as_me:$LINENO: result: $GS" >&5 -$as_echo "$GS" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + + + +# Only expand once: + + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; fi - ;; -esac +if test "$enable_largefile" != no; then -if test -n "$GS"; then - GS_WARN= -{ $as_echo "$as_me:$LINENO: checking whether $GS has the pngalpha device" >&5 -$as_echo_n "checking whether $GS has the pngalpha device... " >&6; } -if $GS -h | grep pngalpha >/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - GS_WARN="Your EPS inclusions will be cropped to the - boundingbox, and rendered on an opaque background. - Upgrade GhostScript to avoid this." - { $as_echo "$as_me:$LINENO: checking whether $GS has the png16m device" >&5 -$as_echo_n "checking whether $GS has the png16m device... " >&6; } -if $GS -h | grep png16m >/dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - GS_WARN="Your EPS inclusions may not work. - Upgrade/install GhostScript to avoid this." -fi + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break fi - -if test -n "$GS_WARN"; then - { $as_echo "$as_me:$LINENO: WARNING: $GS_WARN" >&5 -$as_echo "$as_me: WARNING: $GS_WARN" >&2;} +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:$LINENO: WARNING: Cannot find GhostScript in your PATH" >&5 -$as_echo "$as_me: WARNING: Cannot find GhostScript in your PATH" >&2;} - GS=gs -fi + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) cat >>confdefs.h <<_ACEOF -#define GS_PATH "$GS" +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF - - -# Checks for libraries. -{ $as_echo "$as_me:$LINENO: checking for library containing pow" >&5 -$as_echo_n "checking for library containing pow... " >&6; } -if test "${ac_cv_search_pow+set}" = set; then +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pow (); +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { -return pow (); + ; return 0; } _ACEOF -for ac_lib in '' m; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_pow=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_pow+set}" = set; then - break + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break done -if test "${ac_cv_search_pow+set}" = set; then - : -else - ac_cv_search_pow=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_pow" >&5 -$as_echo "$ac_cv_search_pow" >&6; } -ac_res=$ac_cv_search_pow -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi fi -{ $as_echo "$as_me:$LINENO: checking for library containing basename" >&5 -$as_echo_n "checking for library containing basename... " >&6; } -if test "${ac_cv_search_basename+set}" = set; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 +$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_source+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include /* for off_t */ + #include +int +main () +{ +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=no; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char basename (); +#define _LARGEFILE_SOURCE 1 +#include /* for off_t */ + #include int main () { -return basename (); +int (*fp) (FILE *, off_t, int) = fseeko; + return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF -for ac_lib in '' gen; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_search_basename=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=1; break fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_basename+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown break -fi done -if test "${ac_cv_search_basename+set}" = set; then - : -else - ac_cv_search_basename=no fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_basename" >&5 -$as_echo "$ac_cv_search_basename" >&6; } -ac_res=$ac_cv_search_basename -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 +$as_echo "$ac_cv_sys_largefile_source" >&6; } +case $ac_cv_sys_largefile_source in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source +_ACEOF +;; +esac +rm -rf conftest* + +# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug +# in glibc 2.1.3, but that breaks too many other things. +# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. +if test $ac_cv_sys_largefile_source != unknown; then -fi +$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h +fi -# Checks for header files. -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include +#include +#include <$ac_hdr> int main () { - +if ((DIR *) 0) +return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_ac_Header=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + eval "$as_ac_Header=no" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - +eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* +ac_header_dirent=$ac_hdr; break fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); int main () { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; +return opendir (); + ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - - - -for ac_header in fcntl.h sys/time.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then : + break fi +done +if test "${ac_cv_search_opendir+set}" = set; then : -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------- ## -## Report this to tex-k@tug.org ## -## ---------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + ac_cv_search_opendir=no fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -done - -{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 -$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#ifndef WEXITSTATUS -# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) -#endif -#ifndef WIFEXITED -# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) -#endif +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); int main () { - int s; - wait (&s); - s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; +return opendir (); ; return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_sys_wait_h=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_sys_wait_h=no +} +_ACEOF +for ac_lib in '' x; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_opendir+set}" = set; then : + break fi +done +if test "${ac_cv_search_opendir+set}" = set; then : -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + ac_cv_search_opendir=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -$as_echo "$ac_cv_header_sys_wait_h" >&6; } -if test $ac_cv_header_sys_wait_h = yes; then +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_WAIT_H 1 -_ACEOF +fi fi -{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include +#include +#include +#include +#include int main () { -if ((struct tm *) 0) -return 0; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_time=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : - ac_cv_header_time=no +else + ac_cv_header_stdc=no fi +rm -f conftest* -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + _ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : +else + ac_cv_header_stdc=no fi +rm -f conftest* -{ $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 -$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if test "${ac_cv_header_stdbool_h+set}" = set; then - $as_echo_n "(cached) " >&6 +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#include -#ifndef bool - "error: bool is not defined" -#endif -#ifndef false - "error: false is not defined" -#endif -#if false - "error: false is not 0" -#endif -#ifndef true - "error: true is not defined" -#endif -#if true != 1 - "error: true is not 1" -#endif -#ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - bool e = &s; - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; -# if defined __xlc__ || defined __GNUC__ - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 - reported by James Lemley on 2005-10-05; see - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - This test is not quite right, since xlc is allowed to - reject this program, as the initializer for xlcbug is - not one of the forms that C requires support for. - However, doing the test right would require a runtime - test, and that would make cross-compilation harder. - Let us hope that IBM fixes the xlc bug, and also adds - support for this kind of constant expression. In the - meantime, this test will reject xlc, which is OK, since - our stdbool.h substitute should suffice. We also test - this with GCC, where it should work, to detect more - quickly whether someone messes up the test in the - future. */ - char digs[] = "0123456789"; - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); -# endif - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { - - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - - ; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdbool_h=yes +if ac_fn_c_try_run "$LINENO"; then : + else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - ac_cv_header_stdbool_h=no fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 -$as_echo "$ac_cv_header_stdbool_h" >&6; } -{ $as_echo "$as_me:$LINENO: checking for _Bool" >&5 -$as_echo_n "checking for _Bool... " >&6; } -if test "${ac_cv_type__Bool+set}" = set; then + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 +$as_echo_n "checking whether closedir returns void... " >&6; } +if test "${ac_cv_func_closedir_void+set}" = set; then : $as_echo_n "(cached) " >&6 else - ac_cv_type__Bool=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (_Bool)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then : + ac_cv_func_closedir_void=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default +#include <$ac_header_dirent> +#ifndef __cplusplus +int closedir (); +#endif + int main () { -if (sizeof ((_Bool))) - return 0; +return closedir (opendir (".")) != 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_closedir_void=no else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type__Bool=yes + ac_cv_func_closedir_void=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5 +$as_echo "$ac_cv_func_closedir_void" >&6; } +if test $ac_cv_func_closedir_void = yes; then +$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +for ac_header in assert.h float.h limits.h memory.h pwd.h stdlib.h \ + string.h strings.h sys/param.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 -$as_echo "$ac_cv_type__Bool" >&6; } -if test "x$ac_cv_type__Bool" = x""yes; then -cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 +done + +for ac_func in putenv strcasecmp strtol strstr +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF - fi +done -if test $ac_cv_header_stdbool_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_STDBOOL_H 1 +for ac_func in bcmp bcopy bzero getcwd getwd index memcmp memcpy mkstemp mktemp rindex strchr strrchr +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi +done - -# Checks for typedefs, structures, and compiler characteristics. -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then +if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -14126,668 +11426,357 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no + ac_cv_c_const=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -cat >>confdefs.h <<\_ACEOF -#define const /**/ -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 -$as_echo_n "checking for pid_t... " >&6; } -if test "${ac_cv_type_pid_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_pid_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (pid_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((pid_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_pid_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -$as_echo "$ac_cv_type_pid_t" >&6; } -if test "x$ac_cv_type_pid_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 -$as_echo_n "checking for size_t... " >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_size_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (size_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((size_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -$as_echo "$ac_cv_type_size_t" >&6; } -if test "x$ac_cv_type_size_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - - - { $as_echo "$as_me:$LINENO: checking for int64_t" >&5 -$as_echo_n "checking for int64_t... " >&6; } -if test "${ac_cv_c_int64_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_c_int64_t=no - for ac_type in 'int64_t' 'int' 'long int' \ - 'long long int' 'short int' 'signed char'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1) - < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - case $ac_type in - int64_t) ac_cv_c_int64_t=yes ;; - *) ac_cv_c_int64_t=$ac_type ;; -esac - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi +$as_echo "#define const /**/" >>confdefs.h -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_int64_t" != no && break - done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5 -$as_echo "$ac_cv_c_int64_t" >&6; } - case $ac_cv_c_int64_t in #( - no|yes) ;; #( - *) - -cat >>confdefs.h <<_ACEOF -#define int64_t $ac_cv_c_int64_t -_ACEOF -;; - esac - - { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5 -$as_echo_n "checking for uint64_t... " >&6; } -if test "${ac_cv_c_uint64_t+set}" = set; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if test "${ac_cv_c_inline+set}" = set; then : $as_echo_n "(cached) " >&6 -else - ac_cv_c_uint64_t=no - for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \ - 'unsigned long long int' 'unsigned short int' 'unsigned char'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - case $ac_type in - uint64_t) ac_cv_c_uint64_t=yes ;; - *) ac_cv_c_uint64_t=$ac_type ;; -esac - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_uint64_t" != no && break - done + test "$ac_cv_c_inline" != no && break +done + fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5 -$as_echo "$ac_cv_c_uint64_t" >&6; } - case $ac_cv_c_uint64_t in #( - no|yes) ;; #( - *) +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } -cat >>confdefs.h <<\_ACEOF -#define _UINT64_T 1 +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif _ACEOF + ;; +esac +ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim" "ac_cv_member_struct_stat_st_mtim" "$ac_includes_default" +if test "x$ac_cv_member_struct_stat_st_mtim" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define uint64_t $ac_cv_c_uint64_t +#define HAVE_STRUCT_STAT_ST_MTIM 1 _ACEOF -;; - esac -# Checks for library functions. -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts prototypes" >&5 +$as_echo_n "checking whether the compiler accepts prototypes... " >&6; } +if test "${kb_cv_c_prototypes+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include int main () { -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; +extern void foo(int i,...); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_working_alloca_h=yes +if ac_fn_c_try_link "$LINENO"; then : + kb_cv_c_prototypes=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_working_alloca_h=no + kb_cv_c_prototypes=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA_H 1 -_ACEOF - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kb_cv_c_prototypes" >&5 +$as_echo "$kb_cv_c_prototypes" >&6; } +if test "x$kb_cv_c_prototypes" = xno; then + as_fn_error "Sorry, your compiler does not understand prototypes." "$LINENO" 5 fi - -{ $as_echo "$as_me:$LINENO: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is predefined" >&5 +$as_echo_n "checking whether program_invocation_name is predefined... " >&6; } +if test "${kb_cv_var_program_inv_name+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif int main () { -char *p = (char *) alloca (1); - if (p) return 0; +extern char *program_invocation_name; + program_invocation_name = "love"; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; +if ac_fn_c_try_link "$LINENO"; then : + kb_cv_var_program_inv_name=yes +else + kb_cv_var_program_inv_name=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kb_cv_var_program_inv_name" >&5 +$as_echo "$kb_cv_var_program_inv_name" >&6; } +if test "x$kb_cv_var_program_inv_name" = xyes; then + +$as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C compiler" >&5 +$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } +if test "${kpse_cv_warning_cflags+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cflags= +elif test "x$GCC" = xyes; then + kpse_cv_warning_cflags="-Wall -Wunused" +case `$CC -dumpversion` in #( + 3.4.* | 4.*) : + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; #( + *) : + ;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_alloca_works=yes +case `$CC -dumpversion` in #( + 3.[234].* | 4.*) : + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; #( + *) : + ;; +esac +if test "x$enable_compiler_warnings" != xmin; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wimplicit -Wparentheses -Wreturn-type" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wswitch -Wtrigraphs -Wpointer-arith" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" + case `$CC -dumpversion` in #( + 3.4.* | 4.*) : + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; #( + *) : + ;; +esac + if test "x$enable_compiler_warnings" != xmax; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow" + fi + fi +fi else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + : # FIXME: warning flags for non-GNU C compilers +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_warning_cflags" >&5 +$as_echo "$kpse_cv_warning_cflags" >&6; } +WARNING_CFLAGS=$kpse_cv_warning_cflags + + + - ac_cv_func_alloca_works=no + + +# Configure options for dvipng also shown at the TeX Live top-level. +## texk/dvipng/ac/dvipng.ac: configure.ac fragment for the TeX Live subdirectory texk/dvipng/ +## configure options for dvipng +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +# Check whether --enable-timing was given. +if test "${enable_timing+set}" = set; then : + enableval=$enable_timing; fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } -if test $ac_cv_func_alloca_works = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA 1 -_ACEOF +# Check whether --with-gs was given. +if test "${with_gs+set}" = set; then : + withval=$with_gs; +fi + + +if test "x$enable_debug" != xno; then + enable_debug=yes + +$as_echo "#define DEBUG 1" >>confdefs.h + +fi + +if test "x$enable_timing" = xyes; then + +$as_echo "#define TIMING 1" >>confdefs.h + +fi + +# Checks for programs. +# For a native TeX Live build '--with-gs' is ignored. +if test "x$enable_native_texlive_build" = xyes; then : + with_gs= +fi +case $with_gs in #( + "" | yes | no) : + # Extract the first word of "gs", so it can be a program name with args. +set dummy gs; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_GS+set}" = set; then : + $as_echo_n "(cached) " >&6 else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. + if test -n "$GS"; then + ac_cv_prog_GS="$GS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_GS="gs" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext +fi +fi +GS=$ac_cv_prog_GS +if test -n "$GS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GS" >&5 +$as_echo "$GS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + ;; #( + *) : + # Extract the first word of ""$with_gs"", so it can be a program name with args. +set dummy "$with_gs"; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_GS+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $GS in + [\\/]* | ?:[\\/]*) + ac_cv_path_GS="$GS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GS="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GS=$ac_cv_path_GS +if test -n "$GS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GS" >&5 +$as_echo "$GS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + ;; +esac +if test -n "$GS"; then : + GS_WARN= +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GS has the pngalpha device" >&5 +$as_echo_n "checking whether $GS has the pngalpha device... " >&6; } +if $GS -h | grep pngalpha >/dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + GS_WARN="Your EPS inclusions will be cropped to the + boundingbox, and rendered on an opaque background. + Upgrade GhostScript to avoid this." + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GS has the png16m device" >&5 +$as_echo_n "checking whether $GS has the png16m device... " >&6; } +if $GS -h | grep png16m >/dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + GS_WARN="Your EPS inclusions may not work. + Upgrade/install GhostScript to avoid this." +fi -cat >>confdefs.h <<\_ACEOF -#define C_ALLOCA 1 -_ACEOF +fi +if test -n "$GS_WARN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $GS_WARN" >&5 +$as_echo "$as_me: WARNING: $GS_WARN" >&2;} +fi -{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then - $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find GhostScript in your PATH" >&5 +$as_echo "$as_me: WARNING: Cannot find GhostScript in your PATH" >&2;} + GS=gs +fi +cat >>confdefs.h <<_ACEOF +#define GS_PATH "$GS" _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + +# Checks for libraries. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5 +$as_echo_n "checking for library containing pow... " >&6; } +if test "${ac_cv_search_pow+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -14795,2006 +11784,1353 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - +char pow (); int main () { -return $ac_func (); +return pow (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_pow=$ac_res fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_pow+set}" = set; then : + break fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF +done +if test "${ac_cv_search_pow+set}" = set; then : - break +else + ac_cv_search_pow=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5 +$as_echo "$ac_cv_search_pow" >&6; } +ac_res=$ac_cv_search_pow +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - done fi -{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing basename" >&5 +$as_echo_n "checking for library containing basename... " >&6; } +if test "${ac_cv_search_basename+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - ac_cv_c_stack_direction=0 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char basename (); int main () { - return find_stack_direction () < 0; +return basename (); + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_stack_direction=1 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_stack_direction=-1 +for ac_lib in '' gen; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_basename=$ac_res fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if test "${ac_cv_search_basename+set}" = set; then : + break fi +done +if test "${ac_cv_search_basename+set}" = set; then : - +else + ac_cv_search_basename=no fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } - -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF - +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_basename" >&5 +$as_echo "$ac_cv_search_basename" >&6; } +ac_res=$ac_cv_search_basename +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -for ac_header in vfork.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +# Checks for header files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi +#include +#include +#include +#include -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +int +main () +{ -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + ac_cv_header_stdc=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------- ## -## Report this to tex-k@tug.org ## -## ---------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : +else + ac_cv_header_stdc=no fi +rm -f conftest* -done +fi +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : -for ac_func in fork vfork -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func + ac_cv_header_stdc=no +fi +rm -f conftest* -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +fi -#ifdef __STDC__ -# include +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { -return $ac_func (); - ; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" +if ac_fn_c_try_run "$LINENO"; then : + else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - eval "$as_ac_var=no" fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + +for ac_header in fcntl.h sys/time.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi + done -if test "x$ac_cv_func_fork" = xyes; then - { $as_echo "$as_me:$LINENO: checking for working fork" >&5 -$as_echo_n "checking for working fork... " >&6; } -if test "${ac_cv_func_fork_works+set}" = set; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 +$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_fork_works=cross -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + int main () { - - /* By Ruediger Kuhlmann. */ - return fork () < 0; - + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_fork_works=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_sys_wait_h=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_fork_works=no + ac_cv_header_sys_wait_h=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 +$as_echo "$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then +$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 -$as_echo "$ac_cv_func_fork_works" >&6; } -else - ac_cv_func_fork_works=$ac_cv_func_fork -fi -if test "x$ac_cv_func_fork_works" = xcross; then - case $host in - *-*-amigaos* | *-*-msdosdjgpp*) - # Override, as these systems have only a dummy fork() stub - ac_cv_func_fork_works=no - ;; - *) - ac_cv_func_fork_works=yes - ;; - esac - { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} -fi -ac_cv_func_vfork_works=$ac_cv_func_vfork -if test "x$ac_cv_func_vfork" = xyes; then - { $as_echo "$as_me:$LINENO: checking for working vfork" >&5 -$as_echo_n "checking for working vfork... " >&6; } -if test "${ac_cv_func_vfork_works+set}" = set; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if test "${ac_cv_header_time+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_vfork_works=cross -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Thanks to Paul Eggert for this test. */ -$ac_includes_default -#include -#ifdef HAVE_VFORK_H -# include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. The compiler - is told about this with #include , but some compilers - (e.g. gcc -O) don't grok . Test for this by using a - static variable whose address is put into a register that is - clobbered by the vfork. */ -static void -#ifdef __cplusplus -sparc_address_test (int arg) -# else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} +#include +#include +#include int main () { - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (0); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. This - test uses lots of local variables, at least as many local - variables as main has allocated so far including compiler - temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris - 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should - reuse the register of parent for one of the local variables, - since it will think that parent can't possibly be used any more - in this routine. Assigning to the local variable will thus - munge parent in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent - from child file descriptors. If the child closes a descriptor - before it execs or exits, this munges the parent's descriptor - as well. Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - return ( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } +if ((struct tm *) 0) +return 0; + ; + return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_vfork_works=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_vfork_works=no + ac_cv_header_time=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 -$as_echo "$ac_cv_func_vfork_works" >&6; } - -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} -fi - -if test "x$ac_cv_func_vfork_works" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_WORKING_VFORK 1 -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if test "${ac_cv_header_stdbool_h+set}" = set; then : + $as_echo_n "(cached) " >&6 else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -cat >>confdefs.h <<\_ACEOF -#define vfork fork -_ACEOF +#include +#ifndef bool + "error: bool is not defined" +#endif +#ifndef false + "error: false is not defined" +#endif +#if false + "error: false is not 0" +#endif +#ifndef true + "error: true is not defined" +#endif +#if true != 1 + "error: true is not 1" +#endif +#ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" +#endif -fi -if test "x$ac_cv_func_fork_works" = xyes; then + struct s { _Bool s: 1; _Bool t; } s; -cat >>confdefs.h <<\_ACEOF -#define HAVE_WORKING_FORK 1 -_ACEOF + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + bool e = &s; + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; +# if defined __xlc__ || defined __GNUC__ + /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 + reported by James Lemley on 2005-10-05; see + http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html + This test is not quite right, since xlc is allowed to + reject this program, as the initializer for xlcbug is + not one of the forms that C requires support for. + However, doing the test right would require a runtime + test, and that would make cross-compilation harder. + Let us hope that IBM fixes the xlc bug, and also adds + support for this kind of constant expression. In the + meantime, this test will reject xlc, which is OK, since + our stdbool.h substitute should suffice. We also test + this with GCC, where it should work, to detect more + quickly whether someone messes up the test in the + future. */ + char digs[] = "0123456789"; + int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); +# endif + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; -fi +int +main () +{ + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); -for ac_header in stdlib.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdbool_h=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + ac_cv_header_stdbool_h=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } +ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = x""yes; then : -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +cat >>confdefs.h <<_ACEOF +#define HAVE__BOOL 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------- ## -## Report this to tex-k@tug.org ## -## ---------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +if test $ac_cv_header_stdbool_h = yes; then + +$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi -done -{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 -$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then +# Checks for typedefs, structures, and compiler characteristics. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_malloc_0_nonnull=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif int main () { -return ! malloc (0); +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_malloc_0_nonnull=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_const=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_malloc_0_nonnull=no + ac_cv_c_const=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +$as_echo "#define const /**/" >>confdefs.h + fi +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = x""yes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 1 -_ACEOF +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = x""yes; then : else - cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 0 + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int _ACEOF - case " $LIBOBJS " in - *" malloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS malloc.$ac_objext" - ;; -esac +fi +ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" +case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) -cat >>confdefs.h <<\_ACEOF -#define malloc rpl_malloc +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t _ACEOF +;; +esac -fi +ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" +case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) +$as_echo "#define _UINT64_T 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define uint64_t $ac_cv_c_uint64_t +_ACEOF +;; + esac -for ac_header in stdlib.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +# Checks for library functions. +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if test "${ac_cv_working_alloca_h+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <$ac_header> +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + ac_cv_working_alloca_h=no fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------- ## -## Report this to tex-k@tug.org ## -## ---------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -done - - -for ac_func in getpagesize -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if test "${ac_cv_func_alloca_works+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include +#ifdef __GNUC__ +# define alloca __builtin_alloca #else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif #endif int main () { -return $ac_func (); +char *p = (char *) alloca (1); + if (p) return 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + ac_cv_func_alloca_works=no fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } -{ $as_echo "$as_me:$LINENO: checking for working mmap" >&5 -$as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_mmap_fixed_mapped=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -/* malloc might have been renamed as rpl_malloc. */ -#undef malloc +if test $ac_cv_func_alloca_works = yes; then -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. -#include -#include +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H -char *malloc (); -#endif +$as_echo "#define C_ALLOCA 1" >>confdefs.h -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if test "${ac_cv_os_cray+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif -#endif /* no HAVE_GETPAGESIZE */ +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* -int -main () -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : - pagesize = getpagesize (); +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - return 1; - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - return 1; - if (write (fd, data, pagesize) != pagesize) - return 1; - close (fd); + break +fi - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - return 1; - data2 = (char *) malloc (2 * pagesize); - if (!data2) - return 1; - data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 1; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - return 1; + done +fi - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - return 1; - if (read (fd, data3, pagesize) != pagesize) - return 1; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - return 1; - close (fd); - return 0; +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if test "${ac_cv_c_stack_direction+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} + +int +main () +{ + return find_stack_direction () < 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_mmap_fixed_mapped=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -( exit $ac_status ) -ac_cv_func_mmap_fixed_mapped=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + fi +for ac_header in vfork.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" +if test "x$ac_cv_header_vfork_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VFORK_H 1 +_ACEOF fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 -$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } -if test $ac_cv_func_mmap_fixed_mapped = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_MMAP 1 +done + +for ac_func in fork vfork +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi -rm -f conftest.mmap +done -{ $as_echo "$as_me:$LINENO: checking for working strtod" >&5 -$as_echo_n "checking for working strtod... " >&6; } -if test "${ac_cv_func_strtod+set}" = set; then +if test "x$ac_cv_func_fork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 +$as_echo_n "checking for working fork... " >&6; } +if test "${ac_cv_func_fork_works+set}" = set; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_strtod=no + if test "$cross_compiling" = yes; then : + ac_cv_func_fork_works=cross else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - $ac_includes_default -#ifndef strtod -double strtod (); -#endif int -main() +main () { - { - /* Some versions of Linux strtod mis-parse strings with leading '+'. */ - char *string = " +69"; - char *term; - double value; - value = strtod (string, &term); - if (value != 69 || term != (string + 4)) - return 1; - } - { - /* Under Solaris 2.4, strtod returns the wrong value for the - terminating character under some conditions. */ - char *string = "NaN"; - char *term; - strtod (string, &term); - if (term != string && *(term - 1) == 0) - return 1; - } + /* By Ruediger Kuhlmann. */ + return fork () < 0; + + ; return 0; } - _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_strtod=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_fork_works=yes else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_strtod=no + ac_cv_func_fork_works=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 +$as_echo "$ac_cv_func_fork_works" >&6; } +else + ac_cv_func_fork_works=$ac_cv_func_fork fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 -$as_echo "$ac_cv_func_strtod" >&6; } -if test $ac_cv_func_strtod = no; then - case " $LIBOBJS " in - *" strtod.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS strtod.$ac_objext" - ;; -esac +if test "x$ac_cv_func_fork_works" = xcross; then + case $host in + *-*-amigaos* | *-*-msdosdjgpp*) + # Override, as these systems have only a dummy fork() stub + ac_cv_func_fork_works=no + ;; + *) + ac_cv_func_fork_works=yes + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} +fi +ac_cv_func_vfork_works=$ac_cv_func_vfork +if test "x$ac_cv_func_vfork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 +$as_echo_n "checking for working vfork... " >&6; } +if test "${ac_cv_func_vfork_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_vfork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Thanks to Paul Eggert for this test. */ +$ac_includes_default +#include +#ifdef HAVE_VFORK_H +# include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. The compiler + is told about this with #include , but some compilers + (e.g. gcc -O) don't grok . Test for this by using a + static variable whose address is put into a register that is + clobbered by the vfork. */ +static void +#ifdef __cplusplus +sparc_address_test (int arg) +# else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} + +int +main () +{ + pid_t parent = getpid (); + pid_t child; -{ $as_echo "$as_me:$LINENO: checking for pow" >&5 -$as_echo_n "checking for pow... " >&6; } -if test "${ac_cv_func_pow+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define pow to an innocuous variant, in case declares pow. - For example, HP-UX 11i declares gettimeofday. */ -#define pow innocuous_pow + sparc_address_test (0); -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char pow (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + child = vfork (); -#ifdef __STDC__ -# include -#else -# include -#endif + if (child == 0) { + /* Here is another test for sparc vfork register problems. This + test uses lots of local variables, at least as many local + variables as main has allocated so far including compiler + temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris + 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should + reuse the register of parent for one of the local variables, + since it will think that parent can't possibly be used any more + in this routine. Assigning to the local variable will thus + munge parent in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + _exit(1); -#undef pow + /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent + from child file descriptors. If the child closes a descriptor + before it execs or exits, this munges the parent's descriptor + as well. Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; + struct stat st; -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pow (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_pow || defined __stub___pow -choke me -#endif + while (wait(&status) != child) + ; + return ( + /* Was there some problem with vforking? */ + child < 0 -int -main () -{ -return pow (); - ; - return 0; + /* Did the child fail? (This shouldn't happen.) */ + || status + + /* Did the vfork/compiler bug occur? */ + || parent != getpid() + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_pow=yes +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_vfork_works=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_vfork_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi - ac_cv_func_pow=no fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 +$as_echo "$ac_cv_func_vfork_works" >&6; } -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +fi; +if test "x$ac_cv_func_fork_works" = xcross; then + ac_cv_func_vfork_works=$ac_cv_func_vfork + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5 -$as_echo "$ac_cv_func_pow" >&6; } -if test $ac_cv_func_pow = no; then - { $as_echo "$as_me:$LINENO: checking for pow in -lm" >&5 -$as_echo_n "checking for pow in -lm... " >&6; } -if test "${ac_cv_lib_m_pow+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +if test "x$ac_cv_func_vfork_works" = xyes; then + +$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pow (); -int -main () -{ -return pow (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_m_pow=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_m_pow=no -fi +$as_echo "#define vfork fork" >>confdefs.h -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5 -$as_echo "$ac_cv_lib_m_pow" >&6; } -if test "x$ac_cv_lib_m_pow" = x""yes; then - POW_LIB=-lm -else - { $as_echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5 -$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} fi +if test "x$ac_cv_func_fork_works" = xyes; then + +$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi +for ac_header in stdlib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STDLIB_H 1 +_ACEOF + fi +done -for ac_func in vprintf -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 +$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then : + ac_cv_func_malloc_0_nonnull=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include #else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me +char *malloc (); #endif int main () { -return $ac_func (); +return ! malloc (0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_malloc_0_nonnull=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + ac_cv_func_malloc_0_nonnull=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF -{ $as_echo "$as_me:$LINENO: checking for _doprnt" >&5 -$as_echo_n "checking for _doprnt... " >&6; } -if test "${ac_cv_func__doprnt+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define _doprnt to an innocuous variant, in case declares _doprnt. - For example, HP-UX 11i declares gettimeofday. */ -#define _doprnt innocuous__doprnt +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 +$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then : -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char _doprnt (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +$as_echo "#define HAVE_MALLOC 1" >>confdefs.h -#ifdef __STDC__ -# include -#else -# include -#endif +else + $as_echo "#define HAVE_MALLOC 0" >>confdefs.h -#undef _doprnt + case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS malloc.$ac_objext" + ;; +esac -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _doprnt (); -/* 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__doprnt || defined __stub____doprnt -choke me -#endif -int -main () -{ -return _doprnt (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func__doprnt=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +$as_echo "#define malloc rpl_malloc" >>confdefs.h - ac_cv_func__doprnt=no fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 -$as_echo "$ac_cv_func__doprnt" >&6; } -if test "x$ac_cv_func__doprnt" = x""yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_DOPRNT 1 +for ac_header in stdlib.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi +done + +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPAGESIZE 1 +_ACEOF + fi done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_mmap_fixed_mapped=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ +#include +#include +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ +#endif /* no HAVE_GETPAGESIZE */ +int +main () +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + pagesize = getpagesize (); + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 1; + if (write (fd, data, pagesize) != pagesize) + return 1; + close (fd); + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 1; + data2 = (char *) malloc (2 * pagesize); + if (!data2) + return 1; + data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 1; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 1; -for ac_func in dup2 memset munmap pow putenv strchr strrchr strtol strstr -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 1; + if (read (fd, data3, pagesize) != pagesize) + return 1; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 1; + close (fd); + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_mmap_fixed_mapped=yes +else + ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then -#ifdef __STDC__ -# include -#else -# include -#endif +$as_echo "#define HAVE_MMAP 1" >>confdefs.h -#undef $ac_func +fi +rm -f conftest.mmap -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 +$as_echo_n "checking for working strtod... " >&6; } +if test "${ac_cv_func_strtod+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_strtod=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#ifndef strtod +double strtod (); +#endif int -main () +main() { -return $ac_func (); - ; + { + /* Some versions of Linux strtod mis-parse strings with leading '+'. */ + char *string = " +69"; + char *term; + double value; + value = strtod (string, &term); + if (value != 69 || term != (string + 4)) + return 1; + } + + { + /* Under Solaris 2.4, strtod returns the wrong value for the + terminating character under some conditions. */ + char *string = "NaN"; + char *term; + strtod (string, &term); + if (term != string && *(term - 1) == 0) + return 1; + } return 0; } + _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_strtod=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" + ac_cv_func_strtod=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF fi -done - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 +$as_echo "$ac_cv_func_strtod" >&6; } +if test $ac_cv_func_strtod = no; then + case " $LIBOBJS " in + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; +esac -if test "x$enable_timing" = xyes; then +ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" +if test "x$ac_cv_func_pow" = x""yes; then : +fi -for ac_func in ftime gettimeofday -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +if test $ac_cv_func_pow = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 +$as_echo_n "checking for pow in -lm... " >&6; } +if test "${ac_cv_lib_m_pow+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me +extern "C" #endif - +char pow (); int main () { -return $ac_func (); +return pow (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_pow=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_m_pow=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 +$as_echo "$ac_cv_lib_m_pow" >&6; } +if test "x$ac_cv_lib_m_pow" = x""yes; then : + POW_LIB=-lm +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 +$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} +fi - eval "$as_ac_var=no" fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + +for ac_func in vprintf +do : + ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" +if test "x$ac_cv_func_vprintf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VPRINTF 1 +_ACEOF + +ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" +if test "x$ac_cv_func__doprnt" = x""yes; then : + +$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h + +fi + +fi +done + + +for ac_func in dup2 memset munmap pow putenv strchr strrchr strtol strstr +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +if test "x$enable_timing" = xyes; then + for ac_func in ftime gettimeofday +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -16807,9 +13143,9 @@ fi # Documentation-related checks. # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MAKEINFO+set}" = set; then +if test "${ac_cv_path_MAKEINFO+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAKEINFO in @@ -16822,14 +13158,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO=":" @@ -16838,25 +13174,25 @@ esac fi MAKEINFO=$ac_cv_path_MAKEINFO if test -n "$MAKEINFO"; then - { $as_echo "$as_me:$LINENO: result: $MAKEINFO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 $as_echo "$MAKEINFO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_macro in acronym env option; do if test -n "$MAKEINFO" -a "$MAKEINFO" != ":"; then - { $as_echo "$as_me:$LINENO: checking if $MAKEINFO understands @$ac_macro{}" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MAKEINFO understands @$ac_macro{}" >&5 $as_echo_n "checking if $MAKEINFO understands @$ac_macro{}... " >&6; } echo \\\\input texinfo > conftest.texi echo @$ac_macro{test} >> conftest.texi if $MAKEINFO conftest.texi > /dev/null 2> /dev/null; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } AM_MAKEINFOFLAGS="-D no-$ac_macro $AM_MAKEINFOFLAGS" @@ -16869,9 +13205,9 @@ done # Extract the first word of "install-info", so it can be a program name with args. set dummy install-info; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INSTALL_INFO+set}" = set; then +if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : $as_echo_n "(cached) " >&6 else case $INSTALL_INFO in @@ -16884,14 +13220,14 @@ for as_dir in $PATH /usr/sbin /sbin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" @@ -16900,135 +13236,16 @@ esac fi INSTALL_INFO=$ac_cv_path_INSTALL_INFO if test -n "$INSTALL_INFO"; then - { $as_echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5 $as_echo "$INSTALL_INFO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -# SELFAUTO -# When dvipng is built as part of the TeX Live tree, the option -# '--enable-texlive-build' is automatically passed from the top-level. -# In that case we silently assume '--disable-selfauto-set'. -test "x$enable_texlive_build" = xyes && enable_selfauto_set=no -# Check whether --enable-selfauto-set was given. -if test "${enable_selfauto_set+set}" = set; then - enableval=$enable_selfauto_set; if test "$enableval" = yes ; then - { $as_echo "$as_me:$LINENO: checking for \$SELFAUTOLOC" >&5 -$as_echo_n "checking for \$SELFAUTOLOC... " >&6; } - SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC` - -cat >>confdefs.h <<_ACEOF -#define ENV_SELFAUTOLOC "SELFAUTOLOC=$SELFAUTOLOC" -_ACEOF - - { $as_echo "$as_me:$LINENO: result: $SELFAUTOLOC" >&5 -$as_echo "$SELFAUTOLOC" >&6; } - { $as_echo "$as_me:$LINENO: checking for \$SELFAUTODIR" >&5 -$as_echo_n "checking for \$SELFAUTODIR... " >&6; } - SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR` - -cat >>confdefs.h <<_ACEOF -#define ENV_SELFAUTODIR "SELFAUTODIR=$SELFAUTODIR" -_ACEOF - - { $as_echo "$as_me:$LINENO: result: $SELFAUTODIR" >&5 -$as_echo "$SELFAUTODIR" >&6; } - { $as_echo "$as_me:$LINENO: checking for \$SELFAUTOPARENT" >&5 -$as_echo_n "checking for \$SELFAUTOPARENT... " >&6; } - SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT` - -cat >>confdefs.h <<_ACEOF -#define ENV_SELFAUTOPARENT "SELFAUTOPARENT=$SELFAUTOPARENT" -_ACEOF - - { $as_echo "$as_me:$LINENO: result: $SELFAUTOPARENT" >&5 -$as_echo "$SELFAUTOPARENT" >&6; } - fi -else - { $as_echo "$as_me:$LINENO: checking for texmf.cnf" >&5 -$as_echo_n "checking for texmf.cnf... " >&6; } - TEXMF_CNF=`kpsewhich texmf.cnf` - { $as_echo "$as_me:$LINENO: result: $TEXMF_CNF" >&5 -$as_echo "$TEXMF_CNF" >&6; } - # Extract the first word of "kpsewhich", so it can be a program name with args. -set dummy kpsewhich; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_KPSEWHICH+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $KPSEWHICH in - [\\/]* | ?:[\\/]*) - ac_cv_path_KPSEWHICH="$KPSEWHICH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_KPSEWHICH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -KPSEWHICH=$ac_cv_path_KPSEWHICH -if test -n "$KPSEWHICH"; then - { $as_echo "$as_me:$LINENO: result: $KPSEWHICH" >&5 -$as_echo "$KPSEWHICH" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - { $as_echo "$as_me:$LINENO: checking for psfonts.map" >&5 -$as_echo_n "checking for psfonts.map... " >&6; } - cp $KPSEWHICH . - PSFONTS_MAP=`./kpsewhich psfonts.map` - rm -f ./kpsewhich - if test -n "$PSFONTS_MAP"; then - { $as_echo "$as_me:$LINENO: result: $PSFONTS_MAP" >&5 -$as_echo "$PSFONTS_MAP" >&6; } - else - { $as_echo "$as_me:$LINENO: result: not found from outside the texmf tree" >&5 -$as_echo "not found from outside the texmf tree" >&6; } - { $as_echo "$as_me:$LINENO: checking for \$SELFAUTO in texmf.cnf" >&5 -$as_echo_n "checking for \$SELFAUTO in texmf.cnf... " >&6; } - if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then - { $as_echo "$as_me:$LINENO: result: yes -*************************************************************** -texmf.cnf is using \$SELFAUTO... variables. If you are going to -install dvipng outside the texmf tree, you may need to use ---enable-selfauto-set. To find out, do 'make ; make test'. If the test -is unsuccessful, add the mentioned switch and rebuild. -***************************************************************" >&5 -$as_echo "yes -*************************************************************** -texmf.cnf is using \$SELFAUTO... variables. If you are going to -install dvipng outside the texmf tree, you may need to use ---enable-selfauto-set. To find out, do 'make ; make test'. If the test -is unsuccessful, add the mentioned switch and rebuild. -***************************************************************" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - fi - fi -fi +# SELFAUTO -- not used when built as part of the TeX Live tree. # We have to check properties of libraries, either installed (system) # libraries or unistalled (possibly libtool) ones from the TeX Live tree. @@ -17040,7 +13257,7 @@ kpse_SRC=`(cd "$srcdir/../../." && pwd)` ## _KPSE_USE_LIBTOOL: Generate a libtool script for use in configure tests : ${CONFIG_LT=./config.lt} -{ $as_echo "$as_me:$LINENO: creating $CONFIG_LT" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_LT" >&5 $as_echo "$as_me: creating $CONFIG_LT" >&6;} cat >"$CONFIG_LT" <<_LTEOF #! $SHELL @@ -17052,13 +13269,13 @@ SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -17066,23 +13283,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -17090,7 +13299,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -17101,7 +13316,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -17124,13 +13339,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -17140,15 +13348,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -17160,12 +13368,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -17177,7 +13389,90 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -17191,8 +13486,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -17212,107 +13511,103 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { { $as_echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -$as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file else - as_expr=false + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" "$LINENO" 5 -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -17331,10 +13626,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -17374,7 +13669,7 @@ Report bugs to ." lt_cl_version="\ dvipng config.lt 1.12 -configured by $0, generated by GNU Autoconf 2.63. +configured by $0, generated by GNU Autoconf 2.64. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation @@ -17392,17 +13687,11 @@ do --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; - -*) { { $as_echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -$as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) { { $as_echo "$as_me:$LINENO: error: unrecognized argument: $1 -Try \`$0 --help' for more information." >&5 -$as_echo "$as_me: error: unrecognized argument: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; + -*) as_fn_error "unrecognized option: $1 +Try \`$0 --help' for more information." "$LINENO" 5 ;; + + *) as_fn_error "unrecognized argument: $1 +Try \`$0 --help' for more information." "$LINENO" 5 ;; esac shift done @@ -17671,7 +13960,7 @@ fi _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF -{ $as_echo "$as_me:$LINENO: creating $ofile" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5 $as_echo "$as_me: creating $ofile" >&6;} @@ -17733,2083 +14022,1126 @@ macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# The host system. -host_alias=$host_alias -host=$host -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method == "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# The archiver. -AR=$lt_AR -AR_FLAGS=$lt_AR_FLAGS - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL - -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl +# Whether or not to build static libraries. +build_old_libs=$enable_static -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic +# What type of objects to build. +pic_mode=$pic_mode -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes +# A sed program that does not truncate output. +SED=$lt_SED -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="\$SED -e 1s/^X//" -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec +# A grep program that handles long lines. +GREP=$lt_GREP -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object +# An ERE matcher. +EGREP=$lt_EGREP -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds +# A literal string matcher. +FGREP=$lt_FGREP -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds +# A BSD- or MS-compatible name lister. +NM=$lt_NM -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds +# Whether we need soft or hard links. +LN_S=$lt_LN_S -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds +# What is the maximum length of a command? +max_cmd_len=$max_cmd_len -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld +# Object file suffix (normally "o"). +objext=$ac_objext -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag +# Executable file suffix (normally ""). +exeext=$exeext -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag +# whether the shell understands "unset". +lt_unset=$lt_unset -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec +# turn spaces into newlines. +SP2NL=$lt_lt_SP2NL -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld +# turn newlines into spaces. +NL2SP=$lt_lt_NL2SP -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct +# An object symbol dumper. +OBJDUMP=$lt_OBJDUMP -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L +# Command to use when deplibs_check_method == "file_magic". +file_magic_cmd=$lt_file_magic_cmd -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic +# A symbol stripping program. +STRIP=$lt_STRIP -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath +# Commands used to install an old-style archive. +RANLIB=$lt_RANLIB +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs +# A C compiler. +LTCC=$lt_CC -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path +# LTCC compiler flags. +LTCFLAGS=$lt_CFLAGS -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds +# Transform the output of nm in a proper C declaration. +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms +# Transform the output of nm in a C name address pair. +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms +# Transform the output of nm in a C name address pair when lib prefix is needed. +global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds +# The name of the directory that contains temporary libtool files. +objdir=$objdir -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action +# An echo program that does not interpret backslashes. +ECHO=$lt_ECHO -# ### END LIBTOOL CONFIG +# Used to examine libraries when file_magic_cmd begins with "file". +MAGIC_CMD=$MAGIC_CMD -_LT_EOF +# Must we lock files when doing compilation? +need_locks=$lt_need_locks - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac +# Tool to manipulate archived DWARF debug symbol files on Mac OS X. +DSYMUTIL=$lt_DSYMUTIL +# Tool to change global to local symbols on Mac OS X. +NMEDIT=$lt_NMEDIT -ltmain="$ac_aux_dir/ltmain.sh" +# Tool to manipulate fat objects and archives on Mac OS X. +LIPO=$lt_LIPO +# ldd/readelf like tool for Mach-O binaries on Mac OS X. +OTOOL=$lt_OTOOL - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) +# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. +OTOOL64=$lt_OTOOL64 - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" +# Old archive suffix (normally "a"). +libext=$libext -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} +# Shared library suffix (normally ".so"). +shrext_cmds=$lt_shrext_cmds -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} +# Variables whose values should be saved in libtool wrapper scripts and +# restored at link time. +variables_saved_for_relink=$lt_variables_saved_for_relink -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} +# Do we need the "lib" prefix for modules? +need_lib_prefix=$need_lib_prefix -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} +# Do we need a version for libraries? +need_version=$need_version -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} +# Library versioning type. +version_type=$version_type -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} +# Shared library runtime path variable. +runpath_var=$runpath_var -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} +# Shared library path variable. +shlibpath_var=$shlibpath_var -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" +# Format of library name prefix. +libname_spec=$lt_libname_spec -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME +library_names_spec=$lt_library_names_spec -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec +# Command to use after installation of a shared archive. +postinstall_cmds=$lt_postinstall_cmds -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} +# Command to use after uninstallation of a shared archive. +postuninstall_cmds=$lt_postuninstall_cmds -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} +# As "finish_cmds", except a single script fragment to be evaled but +# not shown. +finish_eval=$lt_finish_eval -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} +# Compile-time system search path for libraries. +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} +# Whether dlopen is supported. +dlopen_support=$enable_dlopen -_LT_EOF -esac +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} -_LT_EOF - ;; - esac +# The linker used to build libraries. +LD=$lt_LD +# Commands used to build an old-style archive. +old_archive_cmds=$lt_old_archive_cmds - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) +# A language specific compiler. +CC=$lt_compiler - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" +# Is the compiler the GNU compiler? +with_gcc=$GCC +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -{ (exit 0); exit 0; } -_LTEOF -chmod +x "$CONFIG_LT" +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec 5>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec 5>>config.log - $lt_cl_success || { (exit 1); exit 1; } -fi +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_link="./libtool --mode=link --tag=CC $ac_link" +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static -## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o -# Check whether --with-system-kpathsea was given. -if test "${with_system_kpathsea+set}" = set; then - withval=$with_system_kpathsea; -fi +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc -# Check whether --with-kpathsea-includes was given. -if test "${with_kpathsea_includes+set}" = set; then - withval=$with_kpathsea_includes; -fi +# Whether or not to disallow shared libs when runtime libs are static. +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes -# Check whether --with-kpathsea-libdir was given. -if test "${with_kpathsea_libdir+set}" = set; then - withval=$with_kpathsea_libdir; -fi -if test "x$with_system_kpathsea" = xyes; then - if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then - KPATHSEA_INCLUDES="-I$with_kpathsea_includes" -fi -KPATHSEA_LIBS="-lkpathsea" -if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then - KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS" -fi -else - KPATHSEA_INCLUDES=`echo '-IBLD/texk -ISRC/texk' | sed \ - -e "s,SRC/,$kpse_SRC/,g" \ - -e "s,BLD/,$kpse_BLD/,g"` - KPATHSEA_LIBS=`echo 'BLD/texk/kpathsea/libkpathsea.la' | sed \ - -e "s,BLD/,$kpse_BLD/,g"` +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - KPATHSEA_DEPEND=`echo 'BLD/texk/kpathsea/libkpathsea.la' | sed \ - -e 's,BLD/texk/,${top_builddir}/../,g'` - KPATHSEA_RULE='# Rebuild libkpathsea -$(KPATHSEA_DEPEND): ${top_srcdir}/../kpathsea/*.[ch] ${top_builddir}/../kpathsea/paths.h - cd ${top_builddir}/../kpathsea && $(MAKE) $(AM_MAKEFLAGS) -${top_builddir}/../kpathsea/paths.h: - cd ${top_builddir}/../kpathsea && $(MAKE) $(AM_MAKEFLAGS)' -fi +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Whether the compiler copes with passing no objects directly. +compiler_needs_object=$lt_compiler_needs_object + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds -## _KPSE_LIB_FLAGS: Setup zlib (-lz) flags +# Commands used to build a loadable module if different from building +# a shared archive. +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds -# Check whether --with-system-zlib was given. -if test "${with_system_zlib+set}" = set; then - withval=$with_system_zlib; -fi +# Whether we are building with GNU ld or not. +with_gnu_ld=$lt_with_gnu_ld -# Check whether --with-zlib-includes was given. -if test "${with_zlib_includes+set}" = set; then - withval=$with_zlib_includes; -fi +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag -# Check whether --with-zlib-libdir was given. -if test "${with_zlib_libdir+set}" = set; then - withval=$with_zlib_libdir; -fi -if test "x$with_system_zlib" = xyes; then - if test "x$with_zlib_includes" != x && test "x$with_zlib_includes" != xyes; then - ZLIB_INCLUDES="-I$with_zlib_includes" -fi -ZLIB_LIBS="-lz" -if test "x$with_zlib_libdir" != x && test "x$with_zlib_libdir" != xyes; then - ZLIB_LIBS="-L$with_zlib_libdir $ZLIB_LIBS" -fi -else - ZLIB_INCLUDES=`echo '-IBLD/libs/zlib' | sed \ - -e "s,SRC/,$kpse_SRC/,g" \ - -e "s,BLD/,$kpse_BLD/,g"` - ZLIB_LIBS=`echo 'BLD/libs/zlib/libz.a' | sed \ - -e "s,BLD/,$kpse_BLD/,g"` +# Flag that enforces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag - ZLIB_DEPEND=`echo 'BLD/libs/zlib/libz.a' | sed \ - -e 's,BLD/,${top_builddir}/../../,g'` - ZLIB_RULE='# Rebuild libz -$(ZLIB_DEPEND): ${top_builddir}/../../libs/zlib/zlib.h ${top_builddir}/../../libs/zlib/zconf.h - cd ${top_builddir}/../../libs/zlib && $(MAKE) $(AM_MAKEFLAGS) -${top_builddir}/../../libs/zlib/zlib.h ${top_builddir}/../../libs/zlib/zconf.h: - cd ${top_builddir}/../../libs/zlib && $(MAKE) $(AM_MAKEFLAGS)' -fi +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -## _KPSE_LIB_FLAGS: Setup libpng (-lpng) flags +# If ld is used when linking, flag to hardcode \$libdir into a binary +# during linking. This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld -# Check whether --with-system-libpng was given. -if test "${with_system_libpng+set}" = set; then - withval=$with_system_libpng; -fi +# Whether we need a single "-rpath" flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator -# Check whether --with-libpng-includes was given. -if test "${with_libpng_includes+set}" = set; then - withval=$with_libpng_includes; -fi +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary. +hardcode_direct=$hardcode_direct -# Check whether --with-libpng-libdir was given. -if test "${with_libpng_libdir+set}" = set; then - withval=$with_libpng_libdir; -fi -if test "x$with_system_libpng" = xyes; then - if test "x$with_libpng_includes" != x && test "x$with_libpng_includes" != xyes; then - LIBPNG_INCLUDES="-I$with_libpng_includes" -fi -LIBPNG_LIBS="-lpng" -if test "x$with_libpng_libdir" != x && test "x$with_libpng_libdir" != xyes; then - LIBPNG_LIBS="-L$with_libpng_libdir $LIBPNG_LIBS" -fi -else - LIBPNG_INCLUDES=`echo '-IBLD/libs/libpng' | sed \ - -e "s,SRC/,$kpse_SRC/,g" \ - -e "s,BLD/,$kpse_BLD/,g"` - LIBPNG_LIBS=`echo 'BLD/libs/libpng/libpng.a' | sed \ - -e "s,BLD/,$kpse_BLD/,g"` +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# DIR into the resulting binary and the resulting library dependency is +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# library is relocated. +hardcode_direct_absolute=$hardcode_direct_absolute - LIBPNG_DEPEND=`echo 'BLD/libs/libpng/libpng.a' | sed \ - -e 's,BLD/,${top_builddir}/../../,g'` - LIBPNG_RULE='# Rebuild libpng -$(LIBPNG_DEPEND): ${top_builddir}/../../libs/libpng/png.h ${top_builddir}/../../libs/libpng/pngconf.h - cd ${top_builddir}/../../libs/libpng && $(MAKE) $(AM_MAKEFLAGS) -${top_builddir}/../../libs/libpng/png.h ${top_builddir}/../../libs/libpng/pngconf.h: - cd ${top_builddir}/../../libs/libpng && $(MAKE) $(AM_MAKEFLAGS)' -fi +# Set to "yes" if using the -LDIR flag during linking hardcodes DIR +# into the resulting binary. +hardcode_minus_L=$hardcode_minus_L -## _KPSE_LIB_FLAGS: Setup t1lib (-lt1) flags +# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR +# into the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var -# Check whether --with-system-t1lib was given. -if test "${with_system_t1lib+set}" = set; then - withval=$with_system_t1lib; -fi +# Set to "yes" if building a shared library automatically hardcodes DIR +# into the library and all subsequent libraries and executables linked +# against it. +hardcode_automatic=$hardcode_automatic -# Check whether --with-t1lib-includes was given. -if test "${with_t1lib_includes+set}" = set; then - withval=$with_t1lib_includes; -fi +# Set to yes if linker adds runtime paths of dependent libraries +# to runtime path list. +inherit_rpath=$inherit_rpath -# Check whether --with-t1lib-libdir was given. -if test "${with_t1lib_libdir+set}" = set; then - withval=$with_t1lib_libdir; -fi -if test "x$with_system_t1lib" = xyes; then - if test "x$with_t1lib_includes" != x && test "x$with_t1lib_includes" != xyes; then - T1LIB_INCLUDES="-I$with_t1lib_includes" -fi -T1LIB_LIBS="-lt1" -if test "x$with_t1lib_libdir" != x && test "x$with_t1lib_libdir" != xyes; then - T1LIB_LIBS="-L$with_t1lib_libdir $T1LIB_LIBS" -fi -else - T1LIB_INCLUDES=`echo '-IBLD/libs/t1lib' | sed \ - -e "s,SRC/,$kpse_SRC/,g" \ - -e "s,BLD/,$kpse_BLD/,g"` - T1LIB_LIBS=`echo 'BLD/libs/t1lib/libt1.a' | sed \ - -e "s,BLD/,$kpse_BLD/,g"` +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs - T1LIB_DEPEND=`echo 'BLD/libs/t1lib/libt1.a' | sed \ - -e 's,BLD/,${top_builddir}/../../,g'` - T1LIB_RULE='# Rebuild libt1 -$(T1LIB_DEPEND): ${top_builddir}/../../libs/t1lib/t1lib.h - cd ${top_builddir}/../../libs/t1lib && $(MAKE) $(AM_MAKEFLAGS) -${top_builddir}/../../libs/t1lib/t1lib.h: - cd ${top_builddir}/../../libs/t1lib && $(MAKE) $(AM_MAKEFLAGS)' -fi +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}freetype-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}freetype-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_FT2_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$FT2_CONFIG"; then - ac_cv_prog_FT2_CONFIG="$FT2_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_FT2_CONFIG="${ac_tool_prefix}freetype-config" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +# Set to "yes" if exported symbols are required. +always_export_symbols=$always_export_symbols -fi -fi -FT2_CONFIG=$ac_cv_prog_FT2_CONFIG -if test -n "$FT2_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $FT2_CONFIG" >&5 -$as_echo "$FT2_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms -fi -if test -z "$ac_cv_prog_FT2_CONFIG"; then - ac_ct_FT2_CONFIG=$FT2_CONFIG - # Extract the first word of "freetype-config", so it can be a program name with args. -set dummy freetype-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_FT2_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_FT2_CONFIG"; then - ac_cv_prog_ac_ct_FT2_CONFIG="$ac_ct_FT2_CONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_FT2_CONFIG="freetype-config" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms -fi -fi -ac_ct_FT2_CONFIG=$ac_cv_prog_ac_ct_FT2_CONFIG -if test -n "$ac_ct_FT2_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_FT2_CONFIG" >&5 -$as_echo "$ac_ct_FT2_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi +# Commands necessary for linking programs (against libraries) with templates. +prelink_cmds=$lt_prelink_cmds - if test "x$ac_ct_FT2_CONFIG" = x; then - FT2_CONFIG="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FT2_CONFIG=$ac_ct_FT2_CONFIG - fi -else - FT2_CONFIG="$ac_cv_prog_FT2_CONFIG" -fi +# Specify filename containing input files. +file_list_spec=$lt_file_list_spec -## _KPSE_LIB_FLAGS: Setup freetype2 (-lfreetype) flags +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action -# Check whether --with-system-freetype2 was given. -if test "${with_system_freetype2+set}" = set; then - withval=$with_system_freetype2; -fi -if test "x$with_system_freetype2" = xyes; then - if $FT2_CONFIG --ftversion >/dev/null 2>&1; then - FREETYPE2_INCLUDES=`$FT2_CONFIG --cflags` - FREETYPE2_LIBS=`$FT2_CONFIG --libs` -elif test "x$need_freetype2:$with_system_freetype2" = 'xyes:yes'; then - { { $as_echo "$as_me:$LINENO: error: did not find freetype-config required for system freetype2 library" >&5 -$as_echo "$as_me: error: did not find freetype-config required for system freetype2 library" >&2;} - { (exit 1); exit 1; }; } -fi -else - FREETYPE2_INCLUDES=`echo 'BLD/libs/freetype2' | sed \ - -e "s,SRC/,$kpse_SRC/,g" \ - -e "s,BLD/,$kpse_BLD/,g"` - FREETYPE2_LIBS=`echo 'BLD/libs/freetype2/libfreetype.a' | sed \ - -e "s,BLD/,$kpse_BLD/,g"` - FREETYPE2_LIBS=`cat $FREETYPE2_INCLUDES/ft-libs` - FREETYPE2_INCLUDES=`cat $FREETYPE2_INCLUDES/ft-includes` - FREETYPE2_DEPEND=`echo 'BLD/libs/freetype2/libfreetype.a' | sed \ - -e 's,BLD/,${top_builddir}/../../,g'` - FREETYPE2_RULE='# Rebuild libfreetype -$(FREETYPE2_DEPEND): ${top_builddir}/../../libs/freetype2/ft2build.h - cd ${top_builddir}/../../libs/freetype2 && $(MAKE) $(AM_MAKEFLAGS) -${top_builddir}/../../libs/freetype2/ft2build.h: - cd ${top_builddir}/../../libs/freetype2 && $(MAKE) $(AM_MAKEFLAGS)' -fi +# ### END LIBTOOL CONFIG -## _KPSE_LIB_FLAGS: Setup gd (-lgd) flags +_LT_EOF -# Check whether --with-system-gd was given. -if test "${with_system_gd+set}" = set; then - withval=$with_system_gd; + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES fi +_LT_EOF + ;; + esac -# Check whether --with-gd-includes was given. -if test "${with_gd_includes+set}" = set; then - withval=$with_gd_includes; -fi -# Check whether --with-gd-libdir was given. -if test "${with_gd_libdir+set}" = set; then - withval=$with_gd_libdir; -fi -if test "x$with_system_gd" = xyes; then - if test "x$with_gd_includes" != x && test "x$with_gd_includes" != xyes; then - GD_INCLUDES="-I$with_gd_includes" -fi -GD_LIBS="-lgd" -if test "x$with_gd_libdir" != x && test "x$with_gd_libdir" != xyes; then - GD_LIBS="-L$with_gd_libdir $GD_LIBS" -fi -else - GD_INCLUDES=`echo '-IBLD/libs/gd' | sed \ - -e "s,SRC/,$kpse_SRC/,g" \ - -e "s,BLD/,$kpse_BLD/,g"` - GD_LIBS=`echo 'BLD/libs/gd/libgd.a' | sed \ - -e "s,BLD/,$kpse_BLD/,g"` +ltmain="$ac_aux_dir/ltmain.sh" - GD_DEPEND=`echo 'BLD/libs/gd/libgd.a' | sed \ - -e 's,BLD/,${top_builddir}/../../,g'` - GD_RULE='# Rebuild libgd -$(GD_DEPEND): ${top_builddir}/../../libs/gd/gd.h - cd ${top_builddir}/../../libs/gd && $(MAKE) $(AM_MAKEFLAGS) -${top_builddir}/../../libs/gd/gd.h: - cd ${top_builddir}/../../libs/gd && $(MAKE) $(AM_MAKEFLAGS)' -fi + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) -# Checks for more libraries. -kpse_save_CPPFLAGS=$CPPFLAGS -kpse_save_LIBS=$LIBS + case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" -CPPFLAGS="$CPPFLAGS $ZLIB_INCLUDES" -LIBS="$ZLIB_LIBS $LIBS" +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac +} -{ $as_echo "$as_me:$LINENO: checking for deflate" >&5 -$as_echo_n "checking for deflate... " >&6; } -if test "${ac_cv_func_deflate+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define deflate to an innocuous variant, in case declares deflate. - For example, HP-UX 11i declares gettimeofday. */ -#define deflate innocuous_deflate +# func_basename file +func_basename () +{ + func_basename_result="${1##*/}" +} -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char deflate (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}" +} -#ifdef __STDC__ -# include -#else -# include -#endif +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +func_stripname () +{ + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"} +} -#undef deflate +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=${1%%=*} + func_opt_split_arg=${1#*=} +} -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char deflate (); -/* 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_deflate || defined __stub___deflate -choke me -#endif +# func_lo2o object +func_lo2o () +{ + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac +} -int -main () +# func_xform libobj-or-source +func_xform () { -return deflate (); - ; - return 0; + func_xform_result=${1%.*}.lo } -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_deflate=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_deflate=no -fi +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=$(( $* )) +} -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_deflate" >&5 -$as_echo "$ac_cv_func_deflate" >&6; } -if test "x$ac_cv_func_deflate" = x""yes; then +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=${#1} +} -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBZ 1 -_ACEOF +_LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" -fi +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` +} -CPPFLAGS="$CPPFLAGS $LIBPNG_INCLUDES" -LIBS="$LIBPNG_LIBS $LIBS" -{ $as_echo "$as_me:$LINENO: checking for png_read_image" >&5 -$as_echo_n "checking for png_read_image... " >&6; } -if test "${ac_cv_func_png_read_image+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define png_read_image to an innocuous variant, in case declares png_read_image. - For example, HP-UX 11i declares gettimeofday. */ -#define png_read_image innocuous_png_read_image +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "X${3}" \ + | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; + esac +} -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char png_read_image (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +# sed scripts: +my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' +my_sed_long_arg='1s/^-[^=]*=//' -#ifdef __STDC__ -# include -#else -# include -#endif +# func_opt_split +func_opt_split () +{ + func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` + func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` +} -#undef png_read_image +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` +} -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char png_read_image (); -/* 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_png_read_image || defined __stub___png_read_image -choke me -#endif +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` +} -int -main () +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "$@"` +} + +# func_len string +# STRING may not start with a hyphen. +func_len () { -return png_read_image (); - ; - return 0; + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; + +_LT_EOF esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_png_read_image=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_png_read_image=no -fi +case $lt_shell_append in + yes) + cat << \_LT_EOF >> "$cfgfile" -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_png_read_image" >&5 -$as_echo "$ac_cv_func_png_read_image" >&6; } -if test "x$ac_cv_func_png_read_image" = x""yes; then +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1+=\$2" +} +_LT_EOF + ;; + *) + cat << \_LT_EOF >> "$cfgfile" -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBPNG 1 -_ACEOF +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "$1=\$$1\$2" +} -else - if test "x$enable_build" = xno; then - { $as_echo "$as_me:$LINENO: WARNING: building dvipng has been disabled and would fail because -cannot find/use libpng" >&5 -$as_echo "$as_me: WARNING: building dvipng has been disabled and would fail because -cannot find/use libpng" >&2;} -else - { { $as_echo "$as_me:$LINENO: error: cannot find/use libpng" >&5 -$as_echo "$as_me: error: cannot find/use libpng" >&2;} - { (exit 1); exit 1; }; } -fi +_LT_EOF + ;; + esac -fi + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" -CPPFLAGS="$CPPFLAGS $FREETYPE2_INCLUDES" -LIBS="$FREETYPE2_LIBS $LIBS" -CPPFLAGS="$CPPFLAGS $GD_INCLUDES" -LIBS="$GD_LIBS $LIBS" +as_fn_exit 0 +_LTEOF +chmod +x "$CONFIG_LT" -{ $as_echo "$as_me:$LINENO: checking for gdImageCreate" >&5 -$as_echo_n "checking for gdImageCreate... " >&6; } -if test "${ac_cv_func_gdImageCreate+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gdImageCreate to an innocuous variant, in case declares gdImageCreate. - For example, HP-UX 11i declares gettimeofday. */ -#define gdImageCreate innocuous_gdImageCreate +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +if test "$no_create" != yes; then + lt_cl_success=: + test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" + exec 5>/dev/null + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false + exec 5>>config.log + $lt_cl_success || as_fn_exit 1 +fi -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gdImageCreate (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_link="./libtool --mode=link --tag=CC $ac_link" -#ifdef __STDC__ -# include -#else -# include -#endif +## _KPSE_LIB_FLAGS: Setup kpathsea (-lkpathsea) flags -#undef gdImageCreate +# Check whether --with-system-kpathsea was given. +if test "${with_system_kpathsea+set}" = set; then : + withval=$with_system_kpathsea; +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gdImageCreate (); -/* 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_gdImageCreate || defined __stub___gdImageCreate -choke me -#endif +# Check whether --with-kpathsea-includes was given. +if test "${with_kpathsea_includes+set}" = set; then : + withval=$with_kpathsea_includes; +fi -int -main () -{ -return gdImageCreate (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_gdImageCreate=yes +# Check whether --with-kpathsea-libdir was given. +if test "${with_kpathsea_libdir+set}" = set; then : + withval=$with_kpathsea_libdir; +fi +if test "x$with_system_kpathsea" = xyes; then + if test "x$with_kpathsea_includes" != x && test "x$with_kpathsea_includes" != xyes; then + KPATHSEA_INCLUDES="-I$with_kpathsea_includes" +fi +KPATHSEA_LIBS="-lkpathsea" +if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; then + KPATHSEA_LIBS="-L$with_kpathsea_libdir $KPATHSEA_LIBS" +fi else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + KPATHSEA_INCLUDES=`echo '-IBLD/texk -ISRC/texk' | sed \ + -e "s,SRC/,$kpse_SRC/,g" \ + -e "s,BLD/,$kpse_BLD/,g"` + KPATHSEA_LIBS=`echo 'BLD/texk/kpathsea/libkpathsea.la' | sed \ + -e "s,BLD/,$kpse_BLD/,g"` - ac_cv_func_gdImageCreate=no + KPATHSEA_DEPEND=`echo 'BLD/texk/kpathsea/libkpathsea.la' | sed \ + -e 's,BLD/texk/,${top_builddir}/../,g'` + KPATHSEA_RULE='# Rebuild libkpathsea +$(KPATHSEA_DEPEND): ${top_srcdir}/../kpathsea/*.[ch] ${top_builddir}/../kpathsea/paths.h + cd ${top_builddir}/../kpathsea && $(MAKE) $(AM_MAKEFLAGS) rebuild +${top_builddir}/../kpathsea/paths.h: + cd ${top_builddir}/../kpathsea && $(MAKE) $(AM_MAKEFLAGS) rebuild' fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gdImageCreate" >&5 -$as_echo "$ac_cv_func_gdImageCreate" >&6; } -if test "x$ac_cv_func_gdImageCreate" = x""yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBGD 1 -_ACEOF +## _KPSE_LIB_FLAGS: Setup zlib (-lz) flags -else - if test "x$enable_build" = xno; then - { $as_echo "$as_me:$LINENO: WARNING: building dvipng has been disabled and would fail because -cannot find/use libgd -This drawing library can be downloaded at http://www.boutell.com/gd" >&5 -$as_echo "$as_me: WARNING: building dvipng has been disabled and would fail because -cannot find/use libgd -This drawing library can be downloaded at http://www.boutell.com/gd" >&2;} -else - { { $as_echo "$as_me:$LINENO: error: cannot find/use libgd -This drawing library can be downloaded at http://www.boutell.com/gd" >&5 -$as_echo "$as_me: error: cannot find/use libgd -This drawing library can be downloaded at http://www.boutell.com/gd" >&2;} - { (exit 1); exit 1; }; } +# Check whether --with-system-zlib was given. +if test "${with_system_zlib+set}" = set; then : + withval=$with_system_zlib; fi - +# Check whether --with-zlib-includes was given. +if test "${with_zlib_includes+set}" = set; then : + withval=$with_zlib_includes; fi - -CPPFLAGS="$CPPFLAGS $KPATHSEA_INCLUDES" -LIBS="$KPATHSEA_LIBS $LIBS" - -{ $as_echo "$as_me:$LINENO: checking for kpse_set_progname" >&5 -$as_echo_n "checking for kpse_set_progname... " >&6; } -if test "${ac_cv_func_kpse_set_progname+set}" = set; then - $as_echo_n "(cached) " >&6 +# Check whether --with-zlib-libdir was given. +if test "${with_zlib_libdir+set}" = set; then : + withval=$with_zlib_libdir; +fi +if test "x$with_system_zlib" = xyes; then + if test "x$with_zlib_includes" != x && test "x$with_zlib_includes" != xyes; then + ZLIB_INCLUDES="-I$with_zlib_includes" +fi +ZLIB_LIBS="-lz" +if test "x$with_zlib_libdir" != x && test "x$with_zlib_libdir" != xyes; then + ZLIB_LIBS="-L$with_zlib_libdir $ZLIB_LIBS" +fi else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define kpse_set_progname to an innocuous variant, in case declares kpse_set_progname. - For example, HP-UX 11i declares gettimeofday. */ -#define kpse_set_progname innocuous_kpse_set_progname + ZLIB_INCLUDES=`echo '-IBLD/libs/zlib' | sed \ + -e "s,SRC/,$kpse_SRC/,g" \ + -e "s,BLD/,$kpse_BLD/,g"` + ZLIB_LIBS=`echo 'BLD/libs/zlib/libz.a' | sed \ + -e "s,BLD/,$kpse_BLD/,g"` -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char kpse_set_progname (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + ZLIB_DEPEND=`echo 'BLD/libs/zlib/libz.a' | sed \ + -e 's,BLD/,${top_builddir}/../../,g'` + ZLIB_RULE='# Rebuild libz +$(ZLIB_DEPEND): ${top_builddir}/../../libs/zlib/zlib.h ${top_builddir}/../../libs/zlib/zconf.h + cd ${top_builddir}/../../libs/zlib && $(MAKE) $(AM_MAKEFLAGS) rebuild +${top_builddir}/../../libs/zlib/zlib.h ${top_builddir}/../../libs/zlib/zconf.h: + cd ${top_builddir}/../../libs/zlib && $(MAKE) $(AM_MAKEFLAGS) rebuild' +fi -#ifdef __STDC__ -# include -#else -# include -#endif +## _KPSE_LIB_FLAGS: Setup libpng (-lpng) flags -#undef kpse_set_progname +# Check whether --with-system-libpng was given. +if test "${with_system_libpng+set}" = set; then : + withval=$with_system_libpng; +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char kpse_set_progname (); -/* 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_kpse_set_progname || defined __stub___kpse_set_progname -choke me -#endif +# Check whether --with-libpng-includes was given. +if test "${with_libpng_includes+set}" = set; then : + withval=$with_libpng_includes; +fi -int -main () -{ -return kpse_set_progname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_kpse_set_progname=yes +# Check whether --with-libpng-libdir was given. +if test "${with_libpng_libdir+set}" = set; then : + withval=$with_libpng_libdir; +fi +if test "x$with_system_libpng" = xyes; then + if test "x$with_libpng_includes" != x && test "x$with_libpng_includes" != xyes; then + LIBPNG_INCLUDES="-I$with_libpng_includes" +fi +LIBPNG_LIBS="-lpng" +if test "x$with_libpng_libdir" != x && test "x$with_libpng_libdir" != xyes; then + LIBPNG_LIBS="-L$with_libpng_libdir $LIBPNG_LIBS" +fi else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + LIBPNG_INCLUDES=`echo '-IBLD/libs/libpng' | sed \ + -e "s,SRC/,$kpse_SRC/,g" \ + -e "s,BLD/,$kpse_BLD/,g"` + LIBPNG_LIBS=`echo 'BLD/libs/libpng/libpng.a' | sed \ + -e "s,BLD/,$kpse_BLD/,g"` + + LIBPNG_DEPEND=`echo 'BLD/libs/libpng/libpng.a' | sed \ + -e 's,BLD/,${top_builddir}/../../,g'` + LIBPNG_RULE='# Rebuild libpng +$(LIBPNG_DEPEND): ${top_builddir}/../../libs/libpng/png.h ${top_builddir}/../../libs/libpng/pngconf.h + cd ${top_builddir}/../../libs/libpng && $(MAKE) $(AM_MAKEFLAGS) rebuild +${top_builddir}/../../libs/libpng/png.h ${top_builddir}/../../libs/libpng/pngconf.h: + cd ${top_builddir}/../../libs/libpng && $(MAKE) $(AM_MAKEFLAGS) rebuild' +fi - ac_cv_func_kpse_set_progname=no +## _KPSE_LIB_FLAGS: Setup t1lib (-lt1) flags + +# Check whether --with-system-t1lib was given. +if test "${with_system_t1lib+set}" = set; then : + withval=$with_system_t1lib; fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +# Check whether --with-t1lib-includes was given. +if test "${with_t1lib_includes+set}" = set; then : + withval=$with_t1lib_includes; fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_kpse_set_progname" >&5 -$as_echo "$ac_cv_func_kpse_set_progname" >&6; } -if test "x$ac_cv_func_kpse_set_progname" = x""yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBKPATHSEA 1 -_ACEOF -else - if test "x$enable_build" = xno; then - { $as_echo "$as_me:$LINENO: WARNING: building dvipng has been disabled and would fail because -cannot find/use libkpathsea" >&5 -$as_echo "$as_me: WARNING: building dvipng has been disabled and would fail because -cannot find/use libkpathsea" >&2;} -else - { { $as_echo "$as_me:$LINENO: error: cannot find/use libkpathsea" >&5 -$as_echo "$as_me: error: cannot find/use libkpathsea" >&2;} - { (exit 1); exit 1; }; } +# Check whether --with-t1lib-libdir was given. +if test "${with_t1lib_libdir+set}" = set; then : + withval=$with_t1lib_libdir; fi - - +if test "x$with_system_t1lib" = xyes; then + if test "x$with_t1lib_includes" != x && test "x$with_t1lib_includes" != xyes; then + T1LIB_INCLUDES="-I$with_t1lib_includes" +fi +T1LIB_LIBS="-lt1" +if test "x$with_t1lib_libdir" != x && test "x$with_t1lib_libdir" != xyes; then + T1LIB_LIBS="-L$with_t1lib_libdir $T1LIB_LIBS" fi +else + T1LIB_INCLUDES=`echo '-IBLD/libs/t1lib' | sed \ + -e "s,SRC/,$kpse_SRC/,g" \ + -e "s,BLD/,$kpse_BLD/,g"` + T1LIB_LIBS=`echo 'BLD/libs/t1lib/libt1.a' | sed \ + -e "s,BLD/,$kpse_BLD/,g"` + T1LIB_DEPEND=`echo 'BLD/libs/t1lib/libt1.a' | sed \ + -e 's,BLD/,${top_builddir}/../../,g'` + T1LIB_RULE='# Rebuild libt1 +$(T1LIB_DEPEND): ${top_builddir}/../../libs/t1lib/t1lib.h + cd ${top_builddir}/../../libs/t1lib && $(MAKE) $(AM_MAKEFLAGS) rebuild +${top_builddir}/../../libs/t1lib/t1lib.h: + cd ${top_builddir}/../../libs/t1lib && $(MAKE) $(AM_MAKEFLAGS) rebuild' +fi -# We need enc, cmap, and sfd formats. -# Introduced together with opentype format (Dec 2003). -{ $as_echo "$as_me:$LINENO: checking whether kpathsea declares the kpse_opentype_format" >&5 -$as_echo_n "checking whether kpathsea declares the kpse_opentype_format... " >&6; } -if test "${kpse_cv_have_opentype_format+set}" = set; then +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}freetype-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}freetype-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_FT2_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -kpse_opentype_format - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - kpse_cv_have_opentype_format=yes + if test -n "$FT2_CONFIG"; then + ac_cv_prog_FT2_CONFIG="$FT2_CONFIG" # Let the user override the test. else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_FT2_CONFIG="${ac_tool_prefix}freetype-config" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - kpse_cv_have_opentype_format=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $kpse_cv_have_opentype_format" >&5 -$as_echo "$kpse_cv_have_opentype_format" >&6; } -if test "x$kpse_cv_have_opentype_format" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_KPSE_ENC_FORMATS 1 -_ACEOF - +FT2_CONFIG=$ac_cv_prog_FT2_CONFIG +if test -n "$FT2_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FT2_CONFIG" >&5 +$as_echo "$FT2_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -CPPFLAGS="$CPPFLAGS $T1LIB_INCLUDES" -LIBS="$T1LIB_LIBS $LIBS" - -{ $as_echo "$as_me:$LINENO: checking for T1_InitLib" >&5 -$as_echo_n "checking for T1_InitLib... " >&6; } -if test "${ac_cv_func_T1_InitLib+set}" = set; then +fi +if test -z "$ac_cv_prog_FT2_CONFIG"; then + ac_ct_FT2_CONFIG=$FT2_CONFIG + # Extract the first word of "freetype-config", so it can be a program name with args. +set dummy freetype-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_FT2_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define T1_InitLib to an innocuous variant, in case declares T1_InitLib. - For example, HP-UX 11i declares gettimeofday. */ -#define T1_InitLib innocuous_T1_InitLib - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char T1_InitLib (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef T1_InitLib - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char T1_InitLib (); -/* 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_T1_InitLib || defined __stub___T1_InitLib -choke me -#endif - -int -main () -{ -return T1_InitLib (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_T1_InitLib=yes + if test -n "$ac_ct_FT2_CONFIG"; then + ac_cv_prog_ac_ct_FT2_CONFIG="$ac_ct_FT2_CONFIG" # Let the user override the test. else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_FT2_CONFIG="freetype-config" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - ac_cv_func_T1_InitLib=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_T1_InitLib" >&5 -$as_echo "$ac_cv_func_T1_InitLib" >&6; } -if test "x$ac_cv_func_T1_InitLib" = x""yes; then - have_ft2_or_t1=yes - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBT1 1 -_ACEOF - +ac_ct_FT2_CONFIG=$ac_cv_prog_ac_ct_FT2_CONFIG +if test -n "$ac_ct_FT2_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FT2_CONFIG" >&5 +$as_echo "$ac_ct_FT2_CONFIG" >&6; } else - have_ft2_or_t1=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - if test "x$ac_cv_func_T1_InitLib" = xyes; then - have_t1_TRUE= - have_t1_FALSE='#' + if test "x$ac_ct_FT2_CONFIG" = x; then + FT2_CONFIG="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FT2_CONFIG=$ac_ct_FT2_CONFIG + fi else - have_t1_TRUE='#' - have_t1_FALSE= + FT2_CONFIG="$ac_cv_prog_FT2_CONFIG" fi +## _KPSE_LIB_FLAGS: Setup freetype2 (-lfreetype) flags -CPPFLAGS="$CPPFLAGS $FREETYPE2_INCLUDES" -LIBS="$FREETYPE2_LIBS $LIBS" - -{ $as_echo "$as_me:$LINENO: checking for FT_Init_FreeType" >&5 -$as_echo_n "checking for FT_Init_FreeType... " >&6; } -if test "${ac_cv_func_FT_Init_FreeType+set}" = set; then - $as_echo_n "(cached) " >&6 +# Check whether --with-system-freetype2 was given. +if test "${with_system_freetype2+set}" = set; then : + withval=$with_system_freetype2; +fi +if test "x$with_system_freetype2" = xyes; then + if $FT2_CONFIG --ftversion >/dev/null 2>&1; then + FREETYPE2_INCLUDES=`$FT2_CONFIG --cflags` + FREETYPE2_LIBS=`$FT2_CONFIG --libs` +elif test "x$need_freetype2:$with_system_freetype2" = 'xyes:yes'; then + as_fn_error "did not find freetype-config required for system freetype2 library" "$LINENO" 5 +fi else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define FT_Init_FreeType to an innocuous variant, in case declares FT_Init_FreeType. - For example, HP-UX 11i declares gettimeofday. */ -#define FT_Init_FreeType innocuous_FT_Init_FreeType - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char FT_Init_FreeType (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ + FREETYPE2_INCLUDES=`echo 'BLD/libs/freetype2' | sed \ + -e "s,SRC/,$kpse_SRC/,g" \ + -e "s,BLD/,$kpse_BLD/,g"` + FREETYPE2_LIBS=`echo 'BLD/libs/freetype2/libfreetype.a' | sed \ + -e "s,BLD/,$kpse_BLD/,g"` + FREETYPE2_LIBS="\`cat $FREETYPE2_INCLUDES/ft-libs\`" + FREETYPE2_INCLUDES="\`cat $FREETYPE2_INCLUDES/ft-includes\`" + FREETYPE2_DEPEND=`echo 'BLD/libs/freetype2/libfreetype.a' | sed \ + -e 's,BLD/,${top_builddir}/../../,g'` + FREETYPE2_RULE='# Rebuild libfreetype +$(FREETYPE2_DEPEND): ${top_builddir}/../../libs/freetype2/ft2build.h + cd ${top_builddir}/../../libs/freetype2 && $(MAKE) $(AM_MAKEFLAGS) rebuild +${top_builddir}/../../libs/freetype2/ft2build.h: + cd ${top_builddir}/../../libs/freetype2 && $(MAKE) $(AM_MAKEFLAGS) rebuild' +fi -#ifdef __STDC__ -# include -#else -# include -#endif +## _KPSE_LIB_FLAGS: Setup gd (-lgd) flags -#undef FT_Init_FreeType +# Check whether --with-system-gd was given. +if test "${with_system_gd+set}" = set; then : + withval=$with_system_gd; +fi -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char FT_Init_FreeType (); -/* 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_FT_Init_FreeType || defined __stub___FT_Init_FreeType -choke me -#endif +# Check whether --with-gd-includes was given. +if test "${with_gd_includes+set}" = set; then : + withval=$with_gd_includes; +fi -int -main () -{ -return FT_Init_FreeType (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_FT_Init_FreeType=yes +# Check whether --with-gd-libdir was given. +if test "${with_gd_libdir+set}" = set; then : + withval=$with_gd_libdir; +fi +if test "x$with_system_gd" = xyes; then + if test "x$with_gd_includes" != x && test "x$with_gd_includes" != xyes; then + GD_INCLUDES="-I$with_gd_includes" +fi +GD_LIBS="-lgd" +if test "x$with_gd_libdir" != x && test "x$with_gd_libdir" != xyes; then + GD_LIBS="-L$with_gd_libdir $GD_LIBS" +fi else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + GD_INCLUDES=`echo '-IBLD/libs/gd' | sed \ + -e "s,SRC/,$kpse_SRC/,g" \ + -e "s,BLD/,$kpse_BLD/,g"` + GD_LIBS=`echo 'BLD/libs/gd/libgd.a' | sed \ + -e "s,BLD/,$kpse_BLD/,g"` - ac_cv_func_FT_Init_FreeType=no + GD_DEPEND=`echo 'BLD/libs/gd/libgd.a' | sed \ + -e 's,BLD/,${top_builddir}/../../,g'` + GD_RULE='# Rebuild libgd +$(GD_DEPEND): ${top_builddir}/../../libs/gd/gd.h + cd ${top_builddir}/../../libs/gd && $(MAKE) $(AM_MAKEFLAGS) rebuild +${top_builddir}/../../libs/gd/gd.h: + cd ${top_builddir}/../../libs/gd && $(MAKE) $(AM_MAKEFLAGS) rebuild' fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_FT_Init_FreeType" >&5 -$as_echo "$ac_cv_func_FT_Init_FreeType" >&6; } -if test "x$ac_cv_func_FT_Init_FreeType" = x""yes; then - have_ft2_or_t1=yes -cat >>confdefs.h <<\_ACEOF -#define HAVE_FT2 1 -_ACEOF +if test "x$enable_build" != xno || test -f config.force; then -fi +# Checks for more libraries. +kpse_save_CPPFLAGS=$CPPFLAGS +kpse_save_LIBS=$LIBS - if test "x$ac_cv_func_FT_Init_FreeType" = xyes; then - have_ft2_TRUE= - have_ft2_FALSE='#' -else - have_ft2_TRUE='#' - have_ft2_FALSE= -fi +eval CPPFLAGS=\"$ZLIB_INCLUDES \$CPPFLAGS\" +eval LIBS=\"$ZLIB_LIBS \$LIBS\" + +ac_fn_c_check_func "$LINENO" "deflate" "ac_cv_func_deflate" +if test "x$ac_cv_func_deflate" = x""yes; then : + +$as_echo "#define HAVE_LIBZ 1" >>confdefs.h - if test "x$have_ft2_or_t1" = xyes; then - have_ft2_or_t1_TRUE= - have_ft2_or_t1_FALSE='#' -else - have_ft2_or_t1_TRUE='#' - have_ft2_or_t1_FALSE= fi -# Checks for more header files. +eval CPPFLAGS=\"$LIBPNG_INCLUDES \$CPPFLAGS\" +eval LIBS=\"$LIBPNG_LIBS \$LIBS\" +ac_fn_c_check_func "$LINENO" "png_read_image" "ac_cv_func_png_read_image" +if test "x$ac_cv_func_png_read_image" = x""yes; then : +$as_echo "#define HAVE_LIBPNG 1" >>confdefs.h -for ac_header in gd.h png.h kpathsea/kpathsea.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no + as_fn_error "cannot find/use libpng" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +eval CPPFLAGS=\"$FREETYPE2_INCLUDES \$CPPFLAGS\" +eval LIBS=\"$FREETYPE2_LIBS \$LIBS\" - ac_header_preproc=no -fi +eval CPPFLAGS=\"$GD_INCLUDES \$CPPFLAGS\" +eval LIBS=\"$GD_LIBS \$LIBS\" -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +ac_fn_c_check_func "$LINENO" "gdImageCreate" "ac_cv_func_gdImageCreate" +if test "x$ac_cv_func_gdImageCreate" = x""yes; then : + +$as_echo "#define HAVE_LIBGD 1" >>confdefs.h -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------- ## -## Report this to tex-k@tug.org ## -## ---------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + as_fn_error "cannot find/use libgd +This drawing library can be downloaded at http://www.boutell.com/gd" "$LINENO" 5 fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF -else - if test "x$enable_build" = xno; then - { $as_echo "$as_me:$LINENO: WARNING: building dvipng has been disabled and would fail because -cannot find/use $ac_header" >&5 -$as_echo "$as_me: WARNING: building dvipng has been disabled and would fail because -cannot find/use $ac_header" >&2;} -else - { { $as_echo "$as_me:$LINENO: error: cannot find/use $ac_header" >&5 -$as_echo "$as_me: error: cannot find/use $ac_header" >&2;} - { (exit 1); exit 1; }; } -fi +eval CPPFLAGS=\"$KPATHSEA_INCLUDES \$CPPFLAGS\" +eval LIBS=\"$KPATHSEA_LIBS \$LIBS\" +ac_fn_c_check_func "$LINENO" "kpse_set_progname" "ac_cv_func_kpse_set_progname" +if test "x$ac_cv_func_kpse_set_progname" = x""yes; then : -fi +$as_echo "#define HAVE_LIBKPATHSEA 1" >>confdefs.h -done +else + as_fn_error "cannot find/use libkpathsea" "$LINENO" 5 +fi -for ac_header in t1lib.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +# We need enc, cmap, and sfd formats. +# Introduced together with opentype format (Dec 2003). +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kpathsea declares the kpse_opentype_format" >&5 +$as_echo_n "checking whether kpathsea declares the kpse_opentype_format... " >&6; } +if test "${kpse_cv_have_opentype_format+set}" = set; then : $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +#include +int +main () +{ +kpse_opentype_format + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes +if ac_fn_c_try_link "$LINENO"; then : + kpse_cv_have_opentype_format=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + kpse_cv_have_opentype_format=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_opentype_format" >&5 +$as_echo "$kpse_cv_have_opentype_format" >&6; } +if test "x$kpse_cv_have_opentype_format" = xyes; then : + +$as_echo "#define HAVE_KPSE_ENC_FORMATS 1" >>confdefs.h - ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +eval CPPFLAGS=\"$T1LIB_INCLUDES \$CPPFLAGS\" +eval LIBS=\"$T1LIB_LIBS \$LIBS\" - ac_header_preproc=no -fi +ac_fn_c_check_func "$LINENO" "T1_InitLib" "ac_cv_func_T1_InitLib" +if test "x$ac_cv_func_T1_InitLib" = x""yes; then : + have_ft2_or_t1=yes -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } +$as_echo "#define HAVE_LIBT1 1" >>confdefs.h -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ---------------------------- ## -## Report this to tex-k@tug.org ## -## ---------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 else - eval "$as_ac_Header=\$ac_header_preproc" + have_ft2_or_t1=no fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + + +eval CPPFLAGS=\"$FREETYPE2_INCLUDES \$CPPFLAGS\" +eval LIBS=\"$FREETYPE2_LIBS \$LIBS\" + +ac_fn_c_check_func "$LINENO" "FT_Init_FreeType" "ac_cv_func_FT_Init_FreeType" +if test "x$ac_cv_func_FT_Init_FreeType" = x""yes; then : + have_ft2_or_t1=yes + +$as_echo "#define HAVE_FT2 1" >>confdefs.h fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then + + +# Checks for more header files. +for ac_header in gd.h png.h kpathsea/kpathsea.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF +else + as_fn_error "cannot find/use $ac_header" "$LINENO" 5 fi done +for ac_header in t1lib.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "t1lib.h" "ac_cv_header_t1lib_h" "$ac_includes_default" +if test "x$ac_cv_header_t1lib_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_T1LIB_H 1 +_ACEOF -# Checks for more library functions. - - - +fi +done +# Checks for more library functions. for ac_func in gdImageCreateTrueColor gdImageCreateFromJpeg gdImagePngEx gdImageCreateFromPngPtr gdImageGif FT_Library_Version -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +done - eval "$as_ac_var=no" + +CPPFLAGS=$kpse_save_CPPFLAGS +LIBS=$kpse_save_LIBS + + +echo timestamp >config.force fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + if test "x$ac_cv_func_T1_InitLib" = xyes; then + have_t1_TRUE= + have_t1_FALSE='#' +else + have_t1_TRUE='#' + have_t1_FALSE= fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + if test "x$ac_cv_func_FT_Init_FreeType" = xyes; then + have_ft2_TRUE= + have_ft2_FALSE='#' +else + have_ft2_TRUE='#' + have_ft2_FALSE= fi -done + if test "x$have_ft2_or_t1" = xyes; then + have_ft2_or_t1_TRUE= + have_ft2_or_t1_FALSE='#' +else + have_ft2_or_t1_TRUE='#' + have_ft2_or_t1_FALSE= +fi if test "x$ac_cv_func_gdImageGif" = xyes; then have_gif_TRUE= @@ -19820,11 +15152,7 @@ else fi -CPPFLAGS=$kpse_save_CPPFLAGS -LIBS=$kpse_save_LIBS - - -{ $as_echo "$as_me:$LINENO: result: +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ** Configuration summary for $PACKAGE_STRING: The -d (debug) switch is enabled: $enable_debug @@ -19872,6 +15200,9 @@ $as_echo " ac_config_headers="$ac_config_headers config.h" +DVIPNG_TREE=dvipng-1.12 + + ac_config_files="$ac_config_files Makefile help/Makefile doc/Makefile" @@ -19902,13 +15233,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -19916,8 +15247,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -19940,11 +15271,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi @@ -19964,8 +15295,8 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -19981,62 +15312,42 @@ else fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${have_t1_TRUE}" && test -z "${have_t1_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"have_t1\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"have_t1\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"have_t1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${have_ft2_TRUE}" && test -z "${have_ft2_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"have_ft2\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"have_ft2\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"have_ft2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${have_ft2_or_t1_TRUE}" && test -z "${have_ft2_or_t1_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"have_ft2_or_t1\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"have_ft2_or_t1\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"have_ft2_or_t1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${have_gif_TRUE}" && test -z "${have_gif_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"have_gif\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"have_gif\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error "conditional \"have_gif\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -20046,17 +15357,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -20064,23 +15376,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -20088,7 +15392,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -20099,7 +15409,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -20122,13 +15432,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -20138,15 +15441,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -20158,12 +15461,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -20175,7 +15482,89 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with status $?, using 1 if that was 0. +as_fn_error () +{ + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + fi + $as_echo "$as_me: error: $1" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -20189,8 +15578,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -20210,76 +15603,25 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -20308,8 +15650,56 @@ fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -20328,10 +15718,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in + case $1 in #( -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -20346,13 +15736,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by dvipng $as_me 1.12, which was -generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -20384,10 +15780,11 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTION]... [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit @@ -20409,16 +15806,16 @@ $config_headers Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ dvipng config.status 1.12 -configured by $0, generated by GNU Autoconf 2.63, +configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -20461,20 +15858,19 @@ do case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; + as_fn_error "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -20482,11 +15878,10 @@ Try \`$0 --help' for more information." >&2 ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -20800,9 +16195,7 @@ do "help/Makefile") CONFIG_FILES="$CONFIG_FILES help/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -20829,7 +16222,7 @@ $debug || trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -20840,11 +16233,7 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -20852,10 +16241,16 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr=' ' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' + ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi @@ -20869,24 +16264,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -20975,9 +16364,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), @@ -21018,9 +16405,7 @@ for ac_last_try in false false :; do if test -z "$ac_t"; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -21105,9 +16490,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -21120,9 +16503,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -21150,12 +16531,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -21166,7 +16545,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -21179,9 +16558,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -21209,47 +16586,7 @@ $as_echo X"$ac_file" | q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -21306,7 +16643,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - ac_sed_dataroot=' /datarootdir/ { p @@ -21316,12 +16652,11 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -21331,7 +16666,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -21360,14 +16695,12 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} @@ -21377,9 +16710,7 @@ which seems to be undefined. Please make sure it is defined." >&2;} -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -21390,25 +16721,19 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;} $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -21446,7 +16771,7 @@ $as_echo X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -21541,47 +16866,7 @@ $as_echo X"$file" | q } s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done @@ -22228,15 +17513,12 @@ _LT_EOF done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -22257,10 +17539,10 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/Build/source/texk/dvipng/configure.ac b/Build/source/texk/dvipng/configure.ac index 76c9f6e5dca..e5d36443bb8 100644 --- a/Build/source/texk/dvipng/configure.ac +++ b/Build/source/texk/dvipng/configure.ac @@ -6,37 +6,17 @@ dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -m4_define([dvipng_version], [1.12]) +dnl ********************************************************************* dnl -#************************************************************************ -# -# Part of the dvipng distribution -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program. If not, see -# . -# -# Copyright (C) 2002-2009 Jan-Åke Larsson -# -#************************************************************************ -# -# Adapted for TeX Live -# All settings here are our fault, don't blame the dvipng maintainer for it. -# -#************************************************************************ +dnl Adapted for TeX Live from dvipng-1.12/configure.ac +dnl Copyright (C) 2002-2008 Jan-Åke Larsson +dnl +dnl ********************************************************************* +dnl +m4_define([dvipng_version], [1.12])[]dnl using unmodified dvipng source tree AC_INIT([dvipng], dvipng_version, [tex-k@tug.org]) AC_PREREQ([2.63]) -AC_CONFIG_SRCDIR([dvipng.c]) +AC_CONFIG_SRCDIR([dvipng-]dvipng_version[/dvipng.c]) AC_CONFIG_AUX_DIR([../../build-aux]) AC_CONFIG_MACRO_DIR([../../m4]) @@ -103,62 +83,7 @@ AC_PATH_PROG([MAKEINFO], [makeinfo], [:]) MAKEINFO_CHECK_MACROS([acronym env option]) AC_PATH_PROG([INSTALL_INFO], [install-info], [:], [$PATH /usr/sbin /sbin]) -# SELFAUTO -# When dvipng is built as part of the TeX Live tree, the option -# '--enable-texlive-build' is automatically passed from the top-level. -# In that case we silently assume '--disable-selfauto-set'. -test "x$enable_texlive_build" = xyes && enable_selfauto_set=no -AC_ARG_ENABLE([selfauto-set], - AC_HELP_STRING([--enable-selfauto-set], - [This option will make the final binary explicitly set the - $SELFAUTO... variables to make it look as dvipng is installed in the - main texmf tree, even if it isn't. This is necessary when texmf.cnf - only uses $SELFAUTO... variables and dvipng is not installed in the - texmf tree. Otherwise, dvipng may not be able to find virtual - fonts, or psfonts.map. To find out, first build the binary and do - 'make test'. If the test fails, you need this switch.]), - [ if test "$enableval" = yes ; then - AC_MSG_CHECKING([for \$SELFAUTOLOC]) - SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC` - AC_DEFINE_UNQUOTED([ENV_SELFAUTOLOC], ["SELFAUTOLOC=$SELFAUTOLOC"], - [The environment setting for $SELFAUTOLOC]) - AC_MSG_RESULT([$SELFAUTOLOC]) - AC_MSG_CHECKING([for \$SELFAUTODIR]) - SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR` - AC_DEFINE_UNQUOTED([ENV_SELFAUTODIR], ["SELFAUTODIR=$SELFAUTODIR"], - [The environment setting for $SELFAUTODIR]) - AC_MSG_RESULT([$SELFAUTODIR]) - AC_MSG_CHECKING([for \$SELFAUTOPARENT]) - SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT` - AC_DEFINE_UNQUOTED([ENV_SELFAUTOPARENT], ["SELFAUTOPARENT=$SELFAUTOPARENT"], - [The environment setting for $SELFAUTOPARENT]) - AC_MSG_RESULT([$SELFAUTOPARENT]) - fi ], - [AC_MSG_CHECKING([for texmf.cnf]) - TEXMF_CNF=`kpsewhich texmf.cnf` - AC_MSG_RESULT([$TEXMF_CNF]) - AC_PATH_PROG([KPSEWHICH], [kpsewhich]) - AC_MSG_CHECKING([for psfonts.map]) - cp $KPSEWHICH . - PSFONTS_MAP=`./kpsewhich psfonts.map` - rm -f ./kpsewhich - if test -n "$PSFONTS_MAP"; then - AC_MSG_RESULT([$PSFONTS_MAP]) - else - AC_MSG_RESULT([not found from outside the texmf tree]) - AC_MSG_CHECKING([for \$SELFAUTO in texmf.cnf]) - if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then - AC_MSG_RESULT([yes -*************************************************************** -texmf.cnf is using \$SELFAUTO... variables. If you are going to -install dvipng outside the texmf tree, you may need to use ---enable-selfauto-set. To find out, do 'make ; make test'. If the test -is unsuccessful, add the mentioned switch and rebuild. -***************************************************************]) - else - AC_MSG_RESULT([no]) - fi - fi]) +# SELFAUTO -- not used when built as part of the TeX Live tree. # We have to check properties of libraries, either installed (system) # libraries or unistalled (possibly libtool) ones from the TeX Live tree. @@ -171,6 +96,8 @@ KPSE_T1LIB_FLAGS KPSE_FREETYPE2_FLAGS KPSE_GD_FLAGS +if test "x$enable_build" != xno || test -f config.force; then + # Checks for more libraries. KPSE_ADD_FLAGS([zlib]) AC_CHECK_FUNC([deflate], @@ -181,21 +108,21 @@ KPSE_ADD_FLAGS([libpng]) AC_CHECK_FUNC([png_read_image], [AC_DEFINE([HAVE_LIBPNG], 1, [Define to 1 if you have the `png' library (-lpng).])], - [KPSE_MSG_ERROR([dvipng], [cannot find/use libpng])]) + [AC_MSG_ERROR([cannot find/use libpng])]) KPSE_ADD_FLAGS([freetype2]) KPSE_ADD_FLAGS([gd]) AC_CHECK_FUNC([gdImageCreate], [AC_DEFINE([HAVE_LIBGD], 1, [Define to 1 if you have the `gd' library (-lgd).])], - [KPSE_MSG_ERROR([dvipng], [cannot find/use libgd + [AC_MSG_ERROR([cannot find/use libgd This drawing library can be downloaded at http://www.boutell.com/gd])]) KPSE_ADD_FLAGS([kpathsea]) AC_CHECK_FUNC([kpse_set_progname], [AC_DEFINE([HAVE_LIBKPATHSEA], 1, [Define to 1 if you have the `kpathsea' library (-lkpathsea).])], - [KPSE_MSG_ERROR([dvipng], [cannot find/use libkpathsea])]) + [AC_MSG_ERROR([cannot find/use libkpathsea])]) # We need enc, cmap, and sfd formats. # Introduced together with opentype format (Dec 2003). @@ -209,28 +136,31 @@ AC_CHECK_FUNC([T1_InitLib], AC_DEFINE([HAVE_LIBT1], 1, [Define to 1 if you have the `t1' library (-lt1).])], [have_ft2_or_t1=no]) -AM_CONDITIONAL([have_t1], [test "x$ac_cv_func_T1_InitLib" = xyes]) KPSE_ADD_FLAGS([freetype2]) AC_CHECK_FUNC([FT_Init_FreeType], [have_ft2_or_t1=yes AC_DEFINE([HAVE_FT2], 1, [Define to 1 if you have freetype2.])]) -AM_CONDITIONAL([have_ft2], [test "x$ac_cv_func_FT_Init_FreeType" = xyes]) -AM_CONDITIONAL([have_ft2_or_t1], [test "x$have_ft2_or_t1" = xyes]) # Checks for more header files. AC_CHECK_HEADERS([gd.h png.h kpathsea/kpathsea.h], , - [KPSE_MSG_ERROR([dvipng], [cannot find/use $ac_header])]) + [AC_MSG_ERROR([cannot find/use $ac_header])]) AC_CHECK_HEADERS([t1lib.h]) # Checks for more library functions. AC_CHECK_FUNCS([gdImageCreateTrueColor gdImageCreateFromJpeg gdImagePngEx gdImageCreateFromPngPtr gdImageGif FT_Library_Version]) -AM_CONDITIONAL([have_gif], [test "x$ac_cv_func_gdImageGif" = xyes]) - KPSE_RESTORE_FLAGS +echo timestamp >config.force +fi + +AM_CONDITIONAL([have_t1], [test "x$ac_cv_func_T1_InitLib" = xyes]) +AM_CONDITIONAL([have_ft2], [test "x$ac_cv_func_FT_Init_FreeType" = xyes]) +AM_CONDITIONAL([have_ft2_or_t1], [test "x$have_ft2_or_t1" = xyes]) +AM_CONDITIONAL([have_gif], [test "x$ac_cv_func_gdImageGif" = xyes]) + AC_MSG_RESULT([ ** Configuration summary for $PACKAGE_STRING: @@ -254,7 +184,10 @@ AC_MSG_RESULT([ T1lib font rendering available: $ac_cv_func_T1_InitLib ]) -AC_CONFIG_HEADER([config.h]) +AC_CONFIG_HEADERS([config.h]) + +DVIPNG_TREE=[dvipng-]dvipng_version +AC_SUBST([DVIPNG_TREE]) AC_CONFIG_FILES([Makefile help/Makefile doc/Makefile]) diff --git a/Build/source/texk/dvipng/configure.ac.orig b/Build/source/texk/dvipng/configure.ac.orig deleted file mode 100644 index 509591c93ba..00000000000 --- a/Build/source/texk/dvipng/configure.ac.orig +++ /dev/null @@ -1,227 +0,0 @@ -# configure.ac - -#************************************************************************ -# -# Part of the dvipng distribution -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this program. If not, see -# . -# -# Copyright (C) 2002-2009 Jan-Åke Larsson -# -#************************************************************************ - -# Process this file with autoconf to produce a configure script. -AC_INIT([dvipng], [1.12], [dvipng@nongnu.org]) -AC_CONFIG_SRCDIR([dvipng.c]) - -AC_ARG_ENABLE(debug, - AC_HELP_STRING([--disable-debug],[Compile without debug (-d) option]), - [ if test "$enableval" = yes ; then - AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.]) - fi ], - [ enable_debug="yes"; - AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.])]) -AC_ARG_ENABLE(timing, - AC_HELP_STRING([--enable-timing],[Output execution time of dvipng]), - [ if test "$enableval" = yes ; then - AC_DEFINE(TIMING, 1, [Define as 1 to get execution time output.]) - fi ]) - -# Checks for programs. -AC_SET_MAKE -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_LN_S -AC_ARG_WITH(gs, - AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Hard-wire the location of GhostScript]), - [if test "x$withval" != xno ; then - AC_PATH_PROG(GS,["$withval"]) - AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.]) - GS_CHECK_DEVICES - fi], - [AC_CHECK_PROG(GS,gs,gs) - AC_DEFINE_UNQUOTED(GS_PATH, "gs", [Define as the path to GhostScript.]) - if test -n "$GS"; then - GS_CHECK_DEVICES - else - AC_MSG_WARN([Cannot find GhostScript in your PATH]) - fi -]) - -# Checks for libraries. -AC_CHECK_LIB(m, pow) -AC_CHECK_LIB(z, deflate) -AC_CHECK_LIB(gen, basename) -AC_CHECK_LIB([png], [png_read_image],, - [AC_MSG_ERROR([cannot find/use libpng])]) -AC_CHECK_LIB([gd], [gdImageCreate],, - [AC_MSG_ERROR([cannot find/use libgd -This drawing library can be downloaded at http://www.boutell.com/gd])]) -AC_CHECK_LIB([kpathsea], [kpse_set_progname],, - AC_MSG_ERROR([cannot find/use libkpathsea])) -AC_CHECK_LIB([t1], [T1_InitLib]) -PSFONTS_O="" -if test "$ac_cv_lib_t1_T1_InitLib" = yes; then - PSFONTS_O="t1.o" -fi -AC_SUBST(PSFONTS_O) - -# Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS([gd.h png.h kpathsea/kpathsea.h],, - [AC_MSG_ERROR([cannot find/use $ac_header])]) -AC_CHECK_HEADERS([t1lib.h]) -AC_CHECK_FT2(,[CFLAGS="$FT2_CFLAGS $CFLAGS" - LIBS="$FT2_LIBS $LIBS" - PSFONTS_O="$PSFONTS_O sfd.o ft.o" - AC_DEFINE(HAVE_FT2, 1, [Define to 1 if you have freetype2]) - ac_have_freetype2="yes"], - [ac_have_freetype2="no"]) -if test -n "$PSFONTS_O"; then - PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o" -fi -AC_HEADER_SYS_WAIT -AC_HEADER_TIME -AC_HEADER_STDBOOL -AC_CHECK_HEADERS([fcntl.h sys/time.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_PID_T -AC_TYPE_SIZE_T -if test "$ac_cv_header_inttypes_h" = "yes"; then - # Sometimes we want to use gcc -ansi -pedantic as a portability test - # The typedef of int64_t is not in the system header file in that - # case. Then, #define int64_t as "long long", which is non-ansi, but - # is present in most modern compilers. Using a #define rather than a - # typedef can be a problem, but in dvipng int64_t is only used as - # typecast, and there are no problems. autoconf 2.13 equivalent: - # AC_CHECK_TYPE(int64_t, long long) - # AC_CHECK_TYPE(uint64_t, unsigned long long) - AC_CHECK_TYPE([int64_t],, - [AC_DEFINE_UNQUOTED([int64_t], [long long], - [Define to `long long' if - does not define it.])]) - AC_CHECK_TYPE([uint64_t],, - [AC_DEFINE_UNQUOTED([uint64_t], [unsigned long long], - [Define to `unsigned long long' if - does not define it.])]) -fi -AC_HAS_KPSE_ENC_FORMATS - - -# Checks for library functions. -AC_FUNC_ALLOCA -AC_FUNC_FORK -AC_FUNC_MALLOC -AC_FUNC_MMAP -AC_FUNC_STRTOD -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([dup2 memset munmap pow putenv strchr strrchr strtol strstr]) -if test "$enable_timing" = "yes"; then - AC_CHECK_FUNCS([ftime gettimeofday]) -fi -AC_CHECK_FUNCS([gdImageCreateTrueColor gdImageCreateFromJpeg gdImagePngEx gdImageCreateFromPngPtr gdImageGif FT_Library_Version]) -if test "$ac_cv_func_gdImageGif" = "yes"; then - INSTALL_BIN_TARGET="install-dvigif" -else - INSTALL_BIN_TARGET="install-dvipng" -fi -AC_SUBST(INSTALL_BIN_TARGET) - -# Documentation-related checks -AC_PATH_PROG(MAKEINFO, makeinfo, :) -MAKEINFO_CHECK_MACROS(acronym env option) -AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH /usr/sbin /sbin) - -# SELFAUTO -AC_ARG_ENABLE(selfauto-set, - AC_HELP_STRING([--enable-selfauto-set], - [This option will make the final binary explicitly set the - $SELFAUTO... variables to make it look as dvipng is installed in the - main texmf tree, even if it isn't. This is necessary when texmf.cnf - only uses $SELFAUTO... variables and dvipng is not installed in the - texmf tree. Otherwise, dvipng may not be able to find virtual - fonts, or psfonts.map. To find out, first build the binary and do - 'make test'. If the test fails, you need this switch.]), - [ if test "$enableval" = yes ; then - AC_MSG_CHECKING([for \$SELFAUTOLOC]) - SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC` - AC_DEFINE_UNQUOTED(ENV_SELFAUTOLOC,["SELFAUTOLOC=$SELFAUTOLOC"], - [The environment setting for $SELFAUTOLOC]) - AC_MSG_RESULT([$SELFAUTOLOC]) - AC_MSG_CHECKING([for \$SELFAUTODIR]) - SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR` - AC_DEFINE_UNQUOTED(ENV_SELFAUTODIR,["SELFAUTODIR=$SELFAUTODIR"], - [The environment setting for $SELFAUTODIR]) - AC_MSG_RESULT([$SELFAUTODIR]) - AC_MSG_CHECKING([for \$SELFAUTOPARENT]) - SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT` - AC_DEFINE_UNQUOTED(ENV_SELFAUTOPARENT,["SELFAUTOPARENT=$SELFAUTOPARENT"], - [The environment setting for $SELFAUTOPARENT]) - AC_MSG_RESULT([$SELFAUTOPARENT]) - fi ], - [AC_MSG_CHECKING([for texmf.cnf]) - TEXMF_CNF=`kpsewhich texmf.cnf` - AC_MSG_RESULT([$TEXMF_CNF]) - AC_PATH_PROG(KPSEWHICH, kpsewhich) - AC_MSG_CHECKING([for psfonts.map]) - cp $KPSEWHICH . - PSFONTS_MAP=`./kpsewhich psfonts.map` - rm -f ./kpsewhich - if test -n "$PSFONTS_MAP"; then - AC_MSG_RESULT([$PSFONTS_MAP]) - else - AC_MSG_RESULT([not found from outside the texmf tree]) - AC_MSG_CHECKING([for \$SELFAUTO in texmf.cnf]) - if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then - AC_MSG_RESULT([yes -*************************************************************** -texmf.cnf is using \$SELFAUTO... variables. If you are going to -install dvipng outside the texmf tree, you may need to use ---enable-selfauto-set. To find out, do 'make ; make test'. If the test -is unsuccessful, add the mentioned switch and rebuild. -***************************************************************]) - else - AC_MSG_RESULT([no]) - fi - fi]) - -AC_MSG_RESULT([ -** Configuration summary for $PACKAGE_STRING: - - The -d (debug) switch is enabled: $enable_debug - Your gd is new enough (>=2.0) to enable - the --truecolor switch, full alpha - transparency, proper rescaling of - included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor - Your gd has jpeg inclusion enabled: $ac_cv_func_gdImageCreateFromJpeg - Your gd is new enough (>=2.0.12) to - enable transparent backgrounds for EPS - inclusion and the -z (compression) - switch: $ac_cv_func_gdImagePngEx - Your gd is new enough (>=2.0.21) to - allow image creation from memory $ac_cv_func_gdImageCreateFromPngPtr - Your gd is new enough (>=2.0.28) to - enable gif inclusion and output - (dvigif): $ac_cv_func_gdImageGif - FreeType font rendering available: $ac_have_freetype2 - Support for subfonts (CJK-LaTeX): $ac_have_freetype2 - T1lib font rendering available: $ac_cv_lib_t1_T1_InitLib -]) - -AC_CONFIG_HEADER([config.h]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT diff --git a/Build/source/texk/dvipng/doc/Makefile.am b/Build/source/texk/dvipng/doc/Makefile.am index 0753c9c460a..e8d336c2e73 100644 --- a/Build/source/texk/dvipng/doc/Makefile.am +++ b/Build/source/texk/dvipng/doc/Makefile.am @@ -3,10 +3,13 @@ ## Copyright (C) 2009 Peter Breitenlohner ## You may freely use, modify and/or distribute this file. # -## #################################### Documentation -## -info_TEXINFOS = dvipng.texi -dvipng_TEXINFOS = readme.texi install.texi macros.texi dvipng.help +info_TEXINFOS = \ + dvipng.texi +dvipng_TEXINFOS = \ + readme.texi \ + install.texi \ + macros.texi \ + dvipng.help dist_noinst_SCRIPTS = texi2pod.pl @@ -18,24 +21,6 @@ dvipng.1: dvipng.texi readme.texi dvipng.pod > dvipng.1 rm dvipng.pod -www: dvipng.texi $(dvipng_TEXINFOS) - $(mkdir_p) www - $(TEXI2HTML) -split chapter -nosec-nav -subdir html \ - -I $(srcdir) $(srcdir)/dvipng.texi - (cd html; for i in *; do \ - sed -e "s/Jan-A/Jan-\Å\;/g" $$i > ../www/$$i; \ - done) - cp www/dvipng.html www/index.html - rm -rf html - -dvipng_mono.html: dvipng.texi $(dvipng_TEXINFOS) - $(TEXI2HTML) --monolithic -nomenu -nosec_nav -o dvipng_mono.html \ - -I $(srcdir) $(srcdir)/dvipng.texi - -distclean-local: - rm -rf www - rm -f dvipng_mono.html - if have_gif install-data-hook: cd $(DESTDIR)$(man1dir) && \ @@ -45,17 +30,3 @@ uninstall-hook: rm -f $(DESTDIR)$(man1dir)/dvigif.1 endif have_gif -## #################################### Maintainer targets -## -am-local: ../INSTALL ../README RELEASE - -../INSTALL: install.texi - -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -D rawfile --no-headers --no-validate --no-number-sections \ - -o $@ $< - -../README: readme.texi - -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -D rawfile --no-headers --no-validate --no-number-sections \ - -o $@ $< - diff --git a/Build/source/texk/dvipng/doc/Makefile.in b/Build/source/texk/dvipng/doc/Makefile.in index e31e9676632..0421853d843 100644 --- a/Build/source/texk/dvipng/doc/Makefile.in +++ b/Build/source/texk/dvipng/doc/Makefile.in @@ -121,6 +121,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ +DVIPNG_TREE = @DVIPNG_TREE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ @@ -145,7 +146,6 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ -KPSEWHICH = @KPSEWHICH@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -171,6 +171,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ @@ -241,8 +242,15 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # -info_TEXINFOS = dvipng.texi -dvipng_TEXINFOS = readme.texi install.texi macros.texi dvipng.help +info_TEXINFOS = \ + dvipng.texi + +dvipng_TEXINFOS = \ + readme.texi \ + install.texi \ + macros.texi \ + dvipng.help + dist_noinst_SCRIPTS = texi2pod.pl dist_man1_MANS = dvipng.1 all: all-am @@ -559,7 +567,7 @@ clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-local +distclean-am: clean-am distclean-generic dvi: dvi-am @@ -706,19 +714,18 @@ uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ clean-libtool dist-info distclean distclean-generic \ - distclean-libtool distclean-local distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-aminfo \ - maintainer-clean-generic mostlyclean mostlyclean-aminfo \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-dvi-am uninstall-hook \ - uninstall-html-am uninstall-info-am uninstall-man \ - uninstall-man1 uninstall-pdf-am uninstall-ps-am + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-data-hook install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man1 install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ + mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-dvi-am \ + uninstall-hook uninstall-html-am uninstall-info-am \ + uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am dvipng.1: dvipng.texi readme.texi $(srcdir)/texi2pod.pl -D man $(srcdir)/dvipng.texi | \ @@ -727,24 +734,6 @@ dvipng.1: dvipng.texi readme.texi dvipng.pod > dvipng.1 rm dvipng.pod -www: dvipng.texi $(dvipng_TEXINFOS) - $(mkdir_p) www - $(TEXI2HTML) -split chapter -nosec-nav -subdir html \ - -I $(srcdir) $(srcdir)/dvipng.texi - (cd html; for i in *; do \ - sed -e "s/Jan-A/Jan-\Å\;/g" $$i > ../www/$$i; \ - done) - cp www/dvipng.html www/index.html - rm -rf html - -dvipng_mono.html: dvipng.texi $(dvipng_TEXINFOS) - $(TEXI2HTML) --monolithic -nomenu -nosec_nav -o dvipng_mono.html \ - -I $(srcdir) $(srcdir)/dvipng.texi - -distclean-local: - rm -rf www - rm -f dvipng_mono.html - @have_gif_TRUE@install-data-hook: @have_gif_TRUE@ cd $(DESTDIR)$(man1dir) && \ @have_gif_TRUE@ rm -f dvigif.1 && \ @@ -752,18 +741,6 @@ distclean-local: @have_gif_TRUE@uninstall-hook: @have_gif_TRUE@ rm -f $(DESTDIR)$(man1dir)/dvigif.1 -am-local: ../INSTALL ../README RELEASE - -../INSTALL: install.texi - -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -D rawfile --no-headers --no-validate --no-number-sections \ - -o $@ $< - -../README: readme.texi - -$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -D rawfile --no-headers --no-validate --no-number-sections \ - -o $@ $< - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/Build/source/texk/dvipng/draw.c b/Build/source/texk/dvipng/draw.c deleted file mode 100644 index 699fdae9f90..00000000000 --- a/Build/source/texk/dvipng/draw.c +++ /dev/null @@ -1,388 +0,0 @@ -/* draw.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" - -#ifdef DEBUG -#include /* isprint */ -#endif - -struct stack_entry { - dviunits h, v, w, x, y, z; /* stack entry */ - subpixels hh,vv; -} stack[STACK_SIZE+1]; /* stack + space for current pos */ -struct stack_entry* dvi_stack=stack; - -#define MAXDRIFT 1 -#define CHECK_MAXDRIFT(x,xx) \ - if ( xx-PIXROUND(x,dvi->conv*shrinkfactor) < -MAXDRIFT ) { \ - DEBUG_PRINT(DEBUG_DVI,(" add 1 to")); \ - xx += 1; \ - } \ - if ( xx-PIXROUND(x,dvi->conv*shrinkfactor) > MAXDRIFT ) { \ - DEBUG_PRINT(DEBUG_DVI,(" sub 1 to")); \ - xx -= 1; \ - } \ - if (PIXROUND(dvi_stack->h,dvi->conv*shrinkfactor) != dvi_stack->hh \ - || PIXROUND(dvi_stack->v,dvi->conv*shrinkfactor) != dvi_stack->vv)\ - DEBUG_PRINT(DEBUG_DVI, \ - (" drift (%d,%d)", \ - dvi_stack->hh-PIXROUND(dvi_stack->h,dvi->conv*shrinkfactor), \ - dvi_stack->vv-PIXROUND(dvi_stack->v,dvi->conv*shrinkfactor))); - -#define MoveRight(x) \ - temp=x; dvi_stack->h += temp; \ - if ( currentfont==NULL \ - || temp > currentfont->s/6 || temp < -currentfont->s/6*4 ) \ - dvi_stack->hh = PIXROUND(dvi_stack->h,dvi->conv*shrinkfactor); \ - else \ - dvi_stack->hh += PIXROUND( temp,dvi->conv*shrinkfactor ); \ - CHECK_MAXDRIFT(dvi_stack->h,dvi_stack->hh) - -#define MoveDown(x) \ - temp=x; dvi_stack->v += temp; \ - if ( currentfont==NULL \ - || temp > currentfont->s/6*5 || temp < currentfont->s/6*(-5) ) \ - dvi_stack->vv = PIXROUND(dvi_stack->v,dvi->conv*shrinkfactor); \ - else \ - dvi_stack->vv += PIXROUND( temp,dvi->conv*shrinkfactor ); \ - CHECK_MAXDRIFT(dvi_stack->v,dvi_stack->vv) - -#define DO_VFCONV(a) ((((struct font_entry*) parent)->type==DVI_TYPE)?a:\ - (dviunits)((int64_t) a * ((struct font_entry*) parent)->s / (1 << 20))) - - -dviunits SetChar(int32_t c) -{ - struct char_entry* ptr=NULL; - - if (currentfont==NULL) - Fatal("faulty DVI, trying to set character from null font"); - - if (c>=0 && c<=LASTFNTCHAR) - ptr = currentfont->chr[c]; -#ifdef DEBUG - switch (currentfont->type) { - case FONT_TYPE_VF: DEBUG_PRINT(DEBUG_DVI,("\n VF CHAR:\t")); break; - case FONT_TYPE_PK: DEBUG_PRINT(DEBUG_DVI,("\n PK CHAR:\t")); break; - case FONT_TYPE_T1: DEBUG_PRINT(DEBUG_DVI,("\n T1 CHAR:\t")); break; - case FONT_TYPE_FT: DEBUG_PRINT(DEBUG_DVI,("\n FT CHAR:\t")); break; - default: DEBUG_PRINT(DEBUG_DVI,("\n NO CHAR:\t")) - } - if (isprint(c)) - DEBUG_PRINT(DEBUG_DVI,("'%c' ",c)); - DEBUG_PRINT(DEBUG_DVI,("%d at (%d,%d) tfmw %d", c, - dvi_stack->hh,dvi_stack->vv,ptr?ptr->tfmw:0)); -#endif - if (currentfont->type==FONT_TYPE_VF) { - return(SetVF(c)); - } else { - if (ptr!=NULL && ptr->data == NULL) - switch(currentfont->type) { - case FONT_TYPE_PK: LoadPK(c, ptr); break; -#ifdef HAVE_LIBT1 - case FONT_TYPE_T1: LoadT1(c, ptr); break; -#endif -#ifdef HAVE_FT2 - case FONT_TYPE_FT: LoadFT(c, ptr); break; -#endif - default: - Fatal("undefined fonttype %d",currentfont->type); - } - if (page_imagep != NULL) - return(SetGlyph(c, dvi_stack->hh, dvi_stack->vv)); - else if (ptr!=NULL) { - /* Expand bounding box if necessary */ - min(x_min,dvi_stack->hh - ptr->xOffset/shrinkfactor); - min(y_min,dvi_stack->vv - ptr->yOffset/shrinkfactor); - max(x_max,dvi_stack->hh - ptr->xOffset/shrinkfactor + ptr->w); - max(y_max,dvi_stack->vv - ptr->yOffset/shrinkfactor + ptr->h); - return(ptr->tfmw); - } - } - return(0); -} - -void DrawCommand(unsigned char* command, void* parent /* dvi/vf */) - /* To be used both in plain DVI drawing and VF drawing */ -{ - dviunits temp; - - if (/*command >= SETC_000 &&*/ *command <= SETC_127) { - temp = SetChar((int32_t)*command); - dvi_stack->h += temp; - dvi_stack->hh += PIXROUND(temp,dvi->conv*shrinkfactor); - CHECK_MAXDRIFT(dvi_stack->h,dvi_stack->hh); - } else if (*command >= FONT_00 && *command <= FONT_63) { - SetFntNum((int32_t)*command - FONT_00,parent); - } else switch (*command) { - case PUT1: case PUT2: case PUT3: case PUT4: - DEBUG_PRINT(DEBUG_DVI,(" %d", - UNumRead(command+1, dvi_commandlength[*command]-1))); - (void) SetChar(UNumRead(command+1, dvi_commandlength[*command]-1)); - break; - case SET1: case SET2: case SET3: case SET4: - DEBUG_PRINT(DEBUG_DVI,(" %d", - UNumRead(command+1, dvi_commandlength[*command]-1))); - { - temp = SetChar(UNumRead(command+1, dvi_commandlength[*command]-1)); - dvi_stack->h += temp; - dvi_stack->hh += PIXROUND(temp,dvi->conv*shrinkfactor); - CHECK_MAXDRIFT(dvi_stack->h,dvi_stack->hh); - } - break; - case SET_RULE: - DEBUG_PRINT(DEBUG_DVI,(" %d %d", - UNumRead(command+1, 4), UNumRead(command+5, 4))); - temp = SetRule(DO_VFCONV(UNumRead(command+1, 4)), - DO_VFCONV(UNumRead(command+5, 4)), - dvi_stack->hh, dvi_stack->vv); - dvi_stack->h += temp; - dvi_stack->hh += PIXROUND(temp,dvi->conv*shrinkfactor); - CHECK_MAXDRIFT(dvi_stack->h,dvi_stack->hh); - break; - case PUT_RULE: - DEBUG_PRINT(DEBUG_DVI,(" %d %d", - UNumRead(command+1, 4), UNumRead(command+5, 4))); - (void) SetRule(DO_VFCONV(UNumRead(command+1, 4)), - DO_VFCONV(UNumRead(command+5, 4)), - dvi_stack->hh, dvi_stack->vv); - break; - case BOP: - Fatal("BOP occurs within page"); - break; - case EOP: - break; - case PUSH: - /* is next item on stack? */ - if (dvi_stack == &stack[STACK_SIZE-1]) - Fatal("DVI stack overflow"); - { - struct stack_entry *next=dvi_stack+1; - next->h = dvi_stack->h; - next->v = dvi_stack->v; - next->w = dvi_stack->w; - next->x = dvi_stack->x; - next->y = dvi_stack->y; - next->z = dvi_stack->z; - next->hh = dvi_stack->hh; - next->vv = dvi_stack->vv; - dvi_stack=next; - } - break; - case POP: - if (dvi_stack == stack) - Fatal("DVI stack underflow"); - dvi_stack--; - break; - case RIGHT1: case RIGHT2: case RIGHT3: case RIGHT4: - DEBUG_PRINT(DEBUG_DVI,(" %d", - SNumRead(command+1, dvi_commandlength[*command]-1))); - MoveRight(DO_VFCONV(SNumRead(command+1, dvi_commandlength[*command]-1))); - break; - case W1: case W2: case W3: case W4: - dvi_stack->w = SNumRead(command+1, dvi_commandlength[*command]-1); - DEBUG_PRINT(DEBUG_DVI,(" %d",dvi_stack->w)); - case W0: - MoveRight(DO_VFCONV(dvi_stack->w)); - break; - case X1: case X2: case X3: case X4: - dvi_stack->x = SNumRead(command+1, dvi_commandlength[*command]-1); - DEBUG_PRINT(DEBUG_DVI,(" %d",dvi_stack->x)); - case X0: - MoveRight(DO_VFCONV(dvi_stack->x)); - break; - case DOWN1: case DOWN2: case DOWN3: case DOWN4: - DEBUG_PRINT(DEBUG_DVI,(" %d", - SNumRead(command+1, dvi_commandlength[*command]-1))); - MoveDown(DO_VFCONV(SNumRead(command+1, dvi_commandlength[*command]-1))); - break; - case Y1: case Y2: case Y3: case Y4: - dvi_stack->y = SNumRead(command+1, dvi_commandlength[*command]-1); - DEBUG_PRINT(DEBUG_DVI,(" %d",dvi_stack->y)); - case Y0: - MoveDown(DO_VFCONV(dvi_stack->y)); - break; - case Z1: case Z2: case Z3: case Z4: - dvi_stack->z = SNumRead(command+1, dvi_commandlength[*command]-1); - DEBUG_PRINT(DEBUG_DVI,(" %d",dvi_stack->z)); - case Z0: - MoveDown(DO_VFCONV(dvi_stack->z)); - break; - case FNT1: case FNT2: case FNT3: case FNT4: - DEBUG_PRINT(DEBUG_DVI,(" %d", - UNumRead(command+1, dvi_commandlength[*command]-1))); - SetFntNum(UNumRead(command+1, dvi_commandlength[*command]-1),parent); - break; - case XXX1: case XXX2: case XXX3: case XXX4: - DEBUG_PRINT(DEBUG_DVI,(" %d", - UNumRead(command+1, dvi_commandlength[*command]-1))); - SetSpecial((char*)command + dvi_commandlength[*command], - dvi_stack->hh,dvi_stack->vv); - break; - case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: - if (((struct font_entry*)parent)->type==DVI_TYPE) { - FontDef(command, parent); - } else { - Fatal("%s within VF macro from %s",dvi_commands[*command], - ((struct font_entry*)parent)->name); - } - break; - case PRE: case POST: case POST_POST: - Fatal("%s occurs within page",dvi_commands[*command]); - break; - case NOP: - break; - default: - Fatal("%s is an undefined command",dvi_commands[*command]); - break; - } -} - -void BeginVFMacro(struct font_entry* currentvf) -{ - struct stack_entry *next=dvi_stack+1; - if (dvi_stack == &stack[STACK_SIZE-1]) - Fatal("DVI stack overflow"); - next->h = dvi_stack->h; - next->v = dvi_stack->v; - next->w = next->x = next->y = next->z = 0; - next->hh = dvi_stack->hh; - next->vv = dvi_stack->vv; - dvi_stack = next; - DEBUG_PRINT(DEBUG_DVI,("\n START VF:\tPUSH, W = X = Y = Z = 0")); - SetFntNum(currentvf->defaultfont,currentvf); -} - -void EndVFMacro(void) -{ - if (dvi_stack == stack) - Fatal("DVI stack underflow"); - dvi_stack--; - DEBUG_PRINT(DEBUG_DVI,("\n END VF:\tPOP ")); -} - - -static void DrawPage(dviunits hoffset, dviunits voffset) - /* To be used after having read BOP and will exit cleanly when - * encountering EOP. - */ -{ - unsigned char* command; /* current command */ - - dvi_stack->h = hoffset; - dvi_stack->v = voffset; - dvi_stack->w = dvi_stack->x = dvi_stack->y = dvi_stack->z = 0; - dvi_stack->hh = PIXROUND( dvi_stack->h , dvi->conv*shrinkfactor ); - dvi_stack->vv = PIXROUND( dvi_stack->v , dvi->conv*shrinkfactor ); - currentfont = NULL; /* No default font */ - - command=DVIGetCommand(dvi); - DEBUG_PRINT(DEBUG_DVI,("DRAW CMD:\t%s", dvi_commands[*command])); - while (*command != EOP) { - DrawCommand(command,dvi); - command=DVIGetCommand(dvi); - DEBUG_PRINT(DEBUG_DVI,("DRAW CMD:\t%s", dvi_commands[*command])); - } -} - -void DrawPages(void) -{ - struct page_list *dvi_pos; - pixels x_width,y_width,x_offset,y_offset; - int pagecounter=(option_flags & DVI_PAGENUM)?0:10; - - dvi_pos=NextPPage(dvi,NULL); - if (dvi_pos!=NULL) { - while(dvi_pos!=NULL) { - SeekPage(dvi,dvi_pos); - Message(BE_NONQUIET,"[%d", dvi_pos->count[pagecounter]); - if (dvi_pos->count[pagecounter]!=dvi_pos->count[0]) - Message(BE_NONQUIET," (%d)", dvi_pos->count[0]); - x_max = y_max = INT32_MIN; - x_min = y_min = INT32_MAX; - DrawPage((dviunits)0,(dviunits)0); - /* Store background color. Background color of a page is given - by the color at EOP rather than the color at BOP. */ - StoreBackgroundColor(dvi_pos); - /* Store pagesize */ - if (dvi->flags & DVI_PREVIEW_LATEX_TIGHTPAGE) { - x_width_def=x_width_tightpage; - y_width_def=y_width_tightpage; - x_offset_def=x_offset_tightpage; - y_offset_def=y_offset_tightpage; - } - if (x_width_def >= 0) { /* extend BBOX */ - min(x_min,-x_offset_def); - max(x_max,x_min + x_width_def); - min(y_min,-y_offset_def); - max(y_max,y_min + y_width_def); - } - if (x_width_def <= 0 || option_flags & EXPAND_BBOX) { - x_width = x_max-x_min; - y_width = y_max-y_min; - x_offset = -x_min; /* offset by moving topleft corner */ - y_offset = -y_min; /* offset by moving topleft corner */ - } else { - x_width=x_width_def; - y_width=y_width_def; - x_offset=x_offset_def; - y_offset=y_offset_def; - } - DEBUG_PRINT(DEBUG_DVI,("\n IMAGE:\t%dx%d",x_width,y_width)); - SeekPage(dvi,dvi_pos); - CreateImage(x_width,y_width); -#ifdef DEBUG - DEBUG_PRINT(DEBUG_DVI,("\n@%d PAGE START:\tBOP",dvi_pos->offset)); - { - int i; - for (i=0;i<10;i++) - DEBUG_PRINT(DEBUG_DVI,(" %d",dvi_pos->count[i])); - DEBUG_PRINT(DEBUG_DVI,(" (%d)\n",dvi_pos->count[10])); - } -#endif - Message(REPORT_DEPTH," depth=%d", y_width-y_offset-1); - Message(REPORT_HEIGHT," height=%d", y_offset+1); - page_flags &= ~PAGE_PREVIEW_BOP; - DrawPage(x_offset*dvi->conv*shrinkfactor, - y_offset*dvi->conv*shrinkfactor); - if ( ! (option_flags & MODE_PICKY && page_flags & PAGE_GAVE_WARN )) { - WriteImage(dvi->outname,dvi_pos->count[pagecounter]); -#ifdef TIMING - ++ndone; -#endif - } else { - exitcode=EXIT_FAILURE; - Message(BE_NONQUIET,"(page not rendered)"); - DestroyImage(); - } - Message(BE_NONQUIET,"] "); - fflush(stdout); - page_flags = 0; - dvi_pos=NextPPage(dvi,dvi_pos); - } - Message(BE_NONQUIET,"\n"); - ClearPpList(); - } -} diff --git a/Build/source/texk/dvipng/dvi.c b/Build/source/texk/dvipng/dvi.c deleted file mode 100644 index a6dfc20fc51..00000000000 --- a/Build/source/texk/dvipng/dvi.c +++ /dev/null @@ -1,479 +0,0 @@ -/* dvi.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" -#ifdef MIKTEX -# include -# define SLEEP Sleep(1000) -#else /* MIKTEX */ -# ifdef HAVE_LIBGEN_H -# include -# else -# define basename xbasename -#endif -# define SLEEP sleep(1) -#endif /* MIKTEX */ -#include - -bool followmode=0; - -bool DVIFollowToggle() -{ - return followmode = ! followmode; -} - -static unsigned char fgetc_follow(FILE* fp) -{ - int got=fgetc(fp); - - while(followmode && got==EOF) { - SLEEP; - got=fgetc(fp); - } - if (got==EOF) - Fatal("DVI file ends prematurely"); - return (unsigned char)got; -} - -static void DVIInit(struct dvi_data* dvi) -{ - int k; - unsigned char* pre; - struct stat stat; - - fseek(dvi->filep,0,SEEK_SET); - pre=DVIGetCommand(dvi); - if (*pre != PRE) { - Fatal("PRE does not occur first - are you sure this is a DVI file?"); - } - k = UNumRead(pre+1,1); - DEBUG_PRINT(DEBUG_DVI,("DVI START:\tPRE %d",k)); - if (k != DVIFORMAT) { - Fatal("DVI format = %d, can only process DVI format %d files", - k, DVIFORMAT); - } - dvi->num = UNumRead(pre+2, 4); - dvi->den = UNumRead(pre+6, 4); - DEBUG_PRINT(DEBUG_DVI,(" %d/%d",dvi->num,dvi->den)); - dvi->mag = UNumRead(pre+10, 4); /*FIXME, see font.c*/ - DEBUG_PRINT(DEBUG_DVI,(" %d",dvi->mag)); - if ( usermag > 0 && usermag != dvi->mag ) { - Warning("DVI magnification of %d over-ridden by user (%ld)", - (long)dvi->mag, usermag ); - dvi->mag = usermag; - } - dvi->conv = (1.0/(((double)dvi->num / (double)dvi->den) * - ((double)dvi->mag / 1000.0) * - ((double)dpi*shrinkfactor/254000.0)))+0.5; - DEBUG_PRINT(DEBUG_DVI,(" (%d)",dvi->conv)); - k = UNumRead(pre+14,1); - DEBUG_PRINT(DEBUG_DVI,(" '%.*s'",k,pre+15)); - Message(BE_VERBOSE,"'%.*s' -> %s\n",k,pre+15,dvi->outname); - fstat(fileno(dvi->filep), &stat); - dvi->mtime = stat.st_mtime; - dvi->pagelistp=NULL; - dvi->flags = 0; -} - -struct dvi_data* DVIOpen(char* dviname,char* outname) -{ - char* tmpstring; - struct dvi_data* dvi; - - if ((dvi = calloc(1,sizeof(struct dvi_data)))==NULL) - Fatal("cannot allocate memory for DVI struct"); - - dvi->type = DVI_TYPE; - dvi->fontnump=NULL; - - dvi->name = malloc(strlen(dviname)+5); - if (dvi->name==NULL) - Fatal("cannot allocate space for DVI filename"); - strcpy(dvi->name, dviname); - tmpstring = strrchr(dvi->name, '.'); - if (tmpstring == NULL || strcmp(tmpstring,".dvi") != 0) - strcat(dvi->name, ".dvi"); - - if (outname==NULL) { - dvi->outname = malloc(strlen(basename(dviname))+7); - if (dvi->outname==NULL) { - free(dvi->name); - free(dvi); - Fatal("cannot allocate space for output filename"); - } - strcpy(dvi->outname,basename(dviname)); - tmpstring = strrchr(dvi->outname, '.'); - if (tmpstring != NULL && strcmp(tmpstring,".dvi") == 0) - *tmpstring = '\0'; - strcat(dvi->outname, "%d.png"); - } else { - dvi->outname = malloc(strlen(outname)+1); - if (dvi->outname==NULL) { - free(dvi->name); - free(dvi); - Fatal("cannot allocate space for output filename"); - } - strcpy(dvi->outname,outname); - } - - if ((dvi->filep = fopen(dvi->name,"rb")) == NULL) { - /* do not insist on .dvi */ - tmpstring = strrchr(dvi->name, '.'); - *tmpstring='\0'; - dvi->filep = fopen(dvi->name,"rb"); - } - while((dvi->filep == NULL) && followmode) { - SLEEP; - *tmpstring='.'; - if ((dvi->filep = fopen(dvi->name,"rb")) == NULL) { - /* do not insist on .dvi */ - *tmpstring='\0'; - dvi->filep = fopen(dvi->name,"rb"); - } - } - if (dvi->filep == NULL) { - free(dvi->name); - free(dvi->outname); - free(dvi); - perror(dviname); - exit (EXIT_FAILURE); - } - DEBUG_PRINT(DEBUG_DVI,("OPEN FILE\t%s", dvi->name)); - DVIInit(dvi); - return(dvi); -} - -unsigned char* DVIGetCommand(struct dvi_data* dvi) - /* This function reads in and stores the next dvi command. */ - /* Mmap is not appropriate here, we may want to read from - half-written files. */ -{ - static unsigned char* command=NULL; - static uint32_t commlen=0; - unsigned char *current = command; - int length; - uint32_t strlength=0; - - if (commlen==0) { - commlen=STRSIZE; - if ((current=command=malloc(commlen))==NULL) - Fatal("cannot allocate memory for DVI command"); - } - DEBUG_PRINT(DEBUG_DVI,("\n@%ld ", ftell(dvi->filep))); - *(current++) = fgetc_follow(dvi->filep); - length = dvi_commandlength[*command]; - if (length < 0) - Fatal("undefined DVI op-code %d",*command); - while(current < command+length) - *(current++) = fgetc_follow(dvi->filep); - switch (*command) { - case XXX4: - strlength = *(current - 4); - case XXX3: - strlength = strlength * 256 + *(current - 3); - case XXX2: - strlength = strlength * 256 + *(current - 2); - case XXX1: - strlength = strlength * 256 + *(current - 1); - break; - case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: - strlength = *(current - 1) + *(current - 2); - break; - case PRE: - strlength = *(current - 1); - break; - } - if (strlength > 0) { /* Read string */ - if (strlength+1 + (uint32_t)length > commlen) { - /* string + command length exceeds that of buffer */ - commlen=strlength+1 + (uint32_t)length; - if ((command=realloc(command,commlen))==NULL) - Fatal("cannot allocate memory for DVI command"); - current = command + length; - } - while(current < command+length+strlength) - *(current++) = fgetc_follow(dvi->filep); - *current='\0'; - } - return(command); -} - -bool DVIIsNextPSSpecial(struct dvi_data* dvi) - /* This function checks if the next dvi command is a raw PS - special */ - /* Mmap is not appropriate here, we may want to read from - half-written files. */ -{ - long fpos; - uint32_t strlength=0; - bool israwps=false; - - DEBUG_PRINT(DEBUG_DVI,("\n CHECKING NEXT DVI COMMAND ")); - fpos=ftell(dvi->filep); - switch (fgetc_follow(dvi->filep)) { - case XXX4: - strlength = fgetc_follow(dvi->filep); - case XXX3: - strlength = strlength * 256 + fgetc_follow(dvi->filep); - case XXX2: - strlength = strlength * 256 + fgetc_follow(dvi->filep); - case XXX1: - strlength = strlength * 256 + fgetc_follow(dvi->filep); - } - if (strlength > 0) { - switch(fgetc_follow(dvi->filep)) { - case 'p': - if (strlength > 2 - && fgetc_follow(dvi->filep)=='s' - && fgetc_follow(dvi->filep)==':') - israwps=true; - break; - case '"': - israwps=true; - } - } - fseek(dvi->filep,fpos,SEEK_SET); - return(israwps); -} - -uint32_t CommandLength(unsigned char* command) -{ - /* generally 2^32+5 bytes max, but in practice 32 bit numbers suffice */ - uint32_t length=0; - - length = dvi_commandlength[*command]; - switch (*command) { - case XXX1: case XXX2: case XXX3: case XXX4: - length += UNumRead(command + 1,length - 1); - break; - case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: - length += *(command + length - 1) + *(command + length - 2); - break; - case PRE: - length += *(command + length - 1); - break; - } - return(length); -} - -static void SkipPage(struct dvi_data* dvi) -{ - /* Skip present page */ - unsigned char* command; - - command=DVIGetCommand(dvi); - while (*command != EOP) { - switch (*command) { - case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: - DEBUG_PRINT(DEBUG_DVI,("NOSKIP CMD:\t%s", dvi_commands[*command])); - FontDef(command,dvi); - break; - case XXX1: case XXX2: case XXX3: case XXX4: - DEBUG_PRINT(DEBUG_DVI,("NOSKIP CMD:\t%s %d", dvi_commands[*command], - UNumRead(command+1, dvi_commandlength[*command]-1))); - SetSpecial((char*)command + dvi_commandlength[*command],0,0); - break; - case BOP: case PRE: case POST: case POST_POST: - Fatal("%s occurs within page", dvi_commands[*command]); - break; -#ifdef DEBUG - default: - DEBUG_PRINT(DEBUG_DVI,("SKIP CMD:\t%s", dvi_commands[*command])); -#endif - } - command=DVIGetCommand(dvi); - } /* while */ - DEBUG_PRINT(DEBUG_DVI,("SKIP CMD:\t%s", dvi_commands[*command])); -} - -static struct page_list* InitPage(struct dvi_data* dvi) -{ - /* Find page start, return pointer to page_list entry if found */ - struct page_list* tpagelistp=NULL; - unsigned char* command; - - command=DVIGetCommand(dvi); - /* Skip until page start or postamble */ - while((*command != BOP) && (*command != POST)) { - switch(*command) { - case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: - DEBUG_PRINT(DEBUG_DVI,("NOPAGE CMD:\t%s", dvi_commands[*command])); - FontDef(command,dvi); - break; - case NOP: - DEBUG_PRINT(DEBUG_DVI,("NOPAGE CMD:\tNOP")); - break; - default: - Fatal("%s occurs outside page", dvi_commands[*command]); - } - command=DVIGetCommand(dvi); - } - if ((tpagelistp = - malloc(sizeof(struct page_list) - +(csp+1-2)*sizeof(struct dvi_color)))==NULL) - Fatal("cannot allocate memory for new page entry"); - tpagelistp->next = NULL; - if ( *command == BOP ) { /* Init page */ - int i; - DEBUG_PRINT(DEBUG_DVI,("PAGE START:\tBOP")); - StoreColorStack(tpagelistp); - tpagelistp->offset = ftell(dvi->filep)-45; - for (i = 0; i <= 9; i++) { - tpagelistp->count[i] = UNumRead(command + 1 + i*4, 4); - DEBUG_PRINT(DEBUG_DVI,(" %d",tpagelistp->count[i])); - } - if (dvi->pagelistp==NULL) - tpagelistp->count[10] = 1; - else - tpagelistp->count[10] = dvi->pagelistp->count[10]+1; - DEBUG_PRINT(DEBUG_DVI,(" (%d)", tpagelistp->count[10])); - } else { - DEBUG_PRINT(DEBUG_DVI,("DVI END:\tPOST")); - tpagelistp->offset = ftell(dvi->filep)-1; - tpagelistp->count[0] = PAGE_POST; /* POST */ - tpagelistp->count[10] = PAGE_POST; /* POST */ - } - return(tpagelistp); -} - -int SeekPage(struct dvi_data* dvi, struct page_list* page) -{ - ReadColorStack(page); - return(fseek(dvi->filep, - page->offset+((page->count[0]==PAGE_POST) ? 1L : 45L), - SEEK_SET)); -} - -struct page_list* NextPage(struct dvi_data* dvi, struct page_list* page) -{ - struct page_list* tpagelistp; - - /* if page points to POST there is no next page */ - if (page!=NULL && page->count[0]==PAGE_POST) - return(NULL); - - /* If we have read past the last page in our current list or the - * list is empty, sneak a look at the next page - */ - if (dvi->pagelistp==NULL - || dvi->pagelistp->offset+45L < ftell(dvi->filep)) { - tpagelistp=dvi->pagelistp; - dvi->pagelistp=InitPage(dvi); - dvi->pagelistp->next=tpagelistp; - } - - if (page!=dvi->pagelistp) { - /* also works if page==NULL, we'll get the first page then */ - tpagelistp=dvi->pagelistp; - while(tpagelistp!=NULL && tpagelistp->next!=page) - tpagelistp=tpagelistp->next; - } else { - /* dvi->pagelistp points to the last page we've read so far, - * the last page that we know where it is, so to speak - * So look at the next - */ - (void)SeekPage(dvi,dvi->pagelistp); - SkipPage(dvi); - tpagelistp=dvi->pagelistp; - dvi->pagelistp=InitPage(dvi); - dvi->pagelistp->next=tpagelistp; - tpagelistp=dvi->pagelistp; - } - return(tpagelistp); -} - -struct page_list* PrevPage(struct dvi_data* dvi, struct page_list* page) -{ - return(page->next); -} - - -struct page_list* FindPage(struct dvi_data* dvi, int32_t pagenum, bool abspage) - /* Find first page of certain number, - absolute number if abspage is set */ -{ - struct page_list* page=NextPage(dvi, NULL); - - if (pagenum==PAGE_LASTPAGE || pagenum==PAGE_POST) { - while(page!=NULL && page->count[0]!=PAGE_POST) - page=NextPage(dvi,page); - if (pagenum==PAGE_LASTPAGE) - page=PrevPage(dvi,page); - } else - if (pagenum!=PAGE_FIRSTPAGE) - while(page != NULL && pagenum != page->count[abspage ? 0 : 10]) - page=NextPage(dvi,page); - return(page); -} - - -static void DelPageList(struct dvi_data* dvi) -{ - struct page_list* temp; - - /* Delete the page list */ - - temp=dvi->pagelistp; - while(temp!=NULL) { - dvi->pagelistp=dvi->pagelistp->next; - free(temp); - temp=dvi->pagelistp; - } -} - -void DVIClose(struct dvi_data* dvi) -{ - if (dvi!=NULL) { - fclose(dvi->filep); - DelPageList(dvi); - ClearPSHeaders(); - free(dvi->outname); - free(dvi->name); - free(dvi); - } -} - -bool DVIReOpen(struct dvi_data* dvi) -{ - struct stat stat; - fstat(fileno(dvi->filep), &stat); - if (dvi->mtime != stat.st_mtime) { - fclose(dvi->filep); - dvi->filep=NULL; - DelPageList(dvi); - ClearPSHeaders(); - while(((dvi->filep = fopen(dvi->name,"rb")) == NULL) && followmode) { - SLEEP; - } - if (dvi->filep == NULL) { - perror(dvi->name); - exit(EXIT_FAILURE); - } - Message(PARSE_STDIN,"Reopened file\n"); - DEBUG_PRINT(DEBUG_DVI,("\nREOPEN FILE\t%s", dvi->name)); - DVIInit(dvi); - return(true); - } - return(false); -} diff --git a/Build/source/texk/dvipng/dvipng-1.12-patches b/Build/source/texk/dvipng/dvipng-1.12-patches deleted file mode 100644 index edb933c19e6..00000000000 --- a/Build/source/texk/dvipng/dvipng-1.12-patches +++ /dev/null @@ -1,539 +0,0 @@ -diff -ur dvipng-1.12/color.c dvipng/color.c ---- dvipng-1.12/color.c 2008-06-03 19:29:31.000000000 +0200 -+++ dvipng/color.c 2009-03-25 14:03:10.000000000 +0100 -@@ -23,7 +23,7 @@ - ************************************************************************/ - - #include "dvipng.h" --#if HAVE_ALLOCA_H -+#ifdef HAVE_ALLOCA_H - # include - #endif - -diff -ur dvipng-1.12/dvipng.h dvipng/dvipng.h ---- dvipng-1.12/dvipng.h 2008-06-03 19:30:18.000000000 +0200 -+++ dvipng/dvipng.h 2009-03-25 14:04:41.000000000 +0100 -@@ -478,11 +478,11 @@ - - /************************timing stuff*********************/ - #ifdef TIMING --#if TIME_WITH_SYS_TIME -+#ifdef TIME_WITH_SYS_TIME - # include - # include - #else --# if HAVE_SYS_TIME_H -+# ifdef HAVE_SYS_TIME_H - # include - # else - # include -diff -ur dvipng-1.12/fontmap.c dvipng/fontmap.c ---- dvipng-1.12/fontmap.c 2008-05-05 20:58:00.000000000 +0200 -+++ dvipng/fontmap.c 2009-04-22 14:14:06.000000000 +0200 -@@ -25,7 +25,7 @@ - #include "dvipng.h" - - static struct filemmap psfont_mmap; --#if HAVE_FT2 -+#ifdef HAVE_FT2 - static struct filemmap ttfont_mmap; - #endif - static struct psfontmap *psfontmap=NULL; -@@ -106,10 +106,10 @@ - newentry->psfile = copyword(copyfrom->psfile); - newentry->encname = copyword(copyfrom->encname); - newentry->encoding = copyfrom->encoding; --#if HAVE_LIBT1 -+#ifdef HAVE_LIBT1 - newentry->t1_transformp = copyfrom->t1_transformp; - #endif --#if HAVE_FT2 -+#ifdef HAVE_FT2 - newentry->ft_transformp = copyfrom->ft_transformp; - newentry->subfont = copyfrom->subfont; - #endif -@@ -120,10 +120,10 @@ - newentry->psfile = NULL; - newentry->encname = NULL; - newentry->encoding = NULL; --#if HAVE_LIBT1 -+#ifdef HAVE_LIBT1 - newentry->t1_transformp = NULL; - #endif --#if HAVE_FT2 -+#ifdef HAVE_FT2 - newentry->ft_transformp = NULL; - newentry->subfont = NULL; - #endif -@@ -249,14 +249,14 @@ - } - free(word); - } --#if HAVE_FT2 -+#ifdef HAVE_FT2 - entry->ft_transformp=&(entry->ft_transform); - entry->ft_transform.xx=(FT_Fixed)(cxx*0x10000); - entry->ft_transform.xy=(FT_Fixed)(cxy*0x10000); - entry->ft_transform.yx=0; - entry->ft_transform.yy=0x10000; - #endif --#if HAVE_LIBT1 -+#ifdef HAVE_LIBT1 - entry->t1_transformp=&(entry->t1_transform); - entry->t1_transform.cxx=cxx; - entry->t1_transform.cxy=cxy; -@@ -316,6 +316,7 @@ - } - #endif - } -+#ifdef HAVE_FT2 - if(entry==NULL) { - struct psfontmap* entry_subfont=NULL; - entry=psfontmap; -@@ -331,6 +332,7 @@ - } - } - } -+#endif - if (entry!=NULL && entry->psfile==NULL) - ReadPSFontMap(entry); - if (entry!=NULL && entry->encname!=NULL && entry->encoding==NULL) -diff -ur dvipng-1.12/ft.c dvipng/ft.c ---- dvipng-1.12/ft.c 2008-02-08 14:45:24.000000000 +0100 -+++ dvipng/ft.c 2009-03-25 14:05:41.000000000 +0100 -@@ -23,7 +23,7 @@ - ************************************************************************/ - - #include "dvipng.h" --#if HAVE_ALLOCA_H -+#ifdef HAVE_ALLOCA_H - # include - #endif - -diff -ur dvipng-1.12/misc.c dvipng/misc.c ---- dvipng-1.12/misc.c 2008-06-02 21:29:33.000000000 +0200 -+++ dvipng/misc.c 2009-03-25 14:05:54.000000000 +0100 -@@ -195,7 +195,7 @@ - } - break ; - case 't': /* specify paper format, only for cropmarks */ --#if HAVE_GDIMAGECREATETRUECOLOR -+#ifdef HAVE_GDIMAGECREATETRUECOLOR - /* Truecolor */ - if (strncmp(p,"ruecolor",8)==0) { - if (p[8] != '0') { -diff -ur dvipng-1.12/pk.c dvipng/pk.c ---- dvipng-1.12/pk.c 2008-05-05 20:58:00.000000000 +0200 -+++ dvipng/pk.c 2009-03-25 14:06:03.000000000 +0100 -@@ -23,7 +23,7 @@ - ************************************************************************/ - - #include "dvipng.h" --#if HAVE_ALLOCA_H -+#ifdef HAVE_ALLOCA_H - # include - #endif - -diff -ur dvipng-1.12/set.c dvipng/set.c ---- dvipng-1.12/set.c 2008-02-08 14:45:23.000000000 +0100 -+++ dvipng/set.c 2009-03-25 14:06:11.000000000 +0100 -@@ -23,7 +23,7 @@ - ************************************************************************/ - - #include "dvipng.h" --#if HAVE_ALLOCA_H -+#ifdef HAVE_ALLOCA_H - # include - #endif - #include -diff -ur dvipng-1.12/special.c dvipng/special.c ---- dvipng-1.12/special.c 2009-02-23 14:48:50.000000000 +0100 -+++ dvipng/special.c 2009-03-24 21:44:50.000000000 +0100 -@@ -632,9 +632,9 @@ - - if (dvi->flags & DVI_PREVIEW_BOP_HOOK && ~page_flags & PAGE_PREVIEW_BOP - && strncmp(special,"ps::",4)==0) { -+ dviunits adj_llx,adj_lly,adj_urx,adj_ury,ht,dp,wd; - page_flags |= PAGE_PREVIEW_BOP; - /* Hokay, decode bounding box */ -- dviunits adj_llx,adj_lly,adj_urx,adj_ury,ht,dp,wd; - adj_llx = strtol(special+4,&special,10); - adj_lly = strtol(special,&special,10); - adj_urx = strtol(special,&special,10); -diff -ur dvipng-1.12/t1.c dvipng/t1.c ---- dvipng-1.12/t1.c 2008-02-08 14:45:23.000000000 +0100 -+++ dvipng/t1.c 2009-03-25 14:06:17.000000000 +0100 -@@ -23,7 +23,7 @@ - ************************************************************************/ - - #include "dvipng.h" --#if HAVE_ALLOCA_H -+#ifdef HAVE_ALLOCA_H - # include - #endif - -diff -ur dvipng-1.12/tfm.c dvipng/tfm.c ---- dvipng-1.12/tfm.c 2008-05-05 20:58:00.000000000 +0200 -+++ dvipng/tfm.c 2009-03-25 14:06:21.000000000 +0100 -@@ -23,7 +23,7 @@ - ************************************************************************/ - - #include "dvipng.h" --#if HAVE_ALLOCA_H -+#ifdef HAVE_ALLOCA_H - # include - #endif - -Index: color.c -=================================================================== ---- color.c (revision 13607) -+++ color.c (working copy) -@@ -54,7 +54,7 @@ - cstack[1].blue=0; - } - --struct colorname * NewColor(char* prefix, int nprefix, -+static struct colorname * NewColor(char* prefix, int nprefix, - char* name, int nname, - char* model, int nmodel, - char* values, int nvalues) -@@ -92,7 +92,7 @@ - #define FINDPSNAMEEND(s,n) n=0; while(stype) { - case FONT_TYPE_PK: -Index: fontmap.c -=================================================================== ---- fontmap.c (revision 13607) -+++ fontmap.c (working copy) -@@ -30,7 +30,7 @@ - #endif - static struct psfontmap *psfontmap=NULL; - --char* newword(char** buffer, char* end) -+static char* newword(char** buffer, char* end) - { - char *word,*pos=*buffer; - -@@ -55,7 +55,7 @@ - return(word); - } - --char* find_format(char* name) -+static char* find_format(char* name) - { - /* Cater for both new (first case) and old (second case) kpathsea */ - char* format = -@@ -134,7 +134,7 @@ - return(newentry); - } - --struct psfontmap *SearchPSFontMap(char* fontname, -+static struct psfontmap *SearchPSFontMap(char* fontname, - struct filemmap* search_mmap) - { - static char *pos=NULL,*end=NULL; -@@ -196,7 +196,7 @@ - #endif - } - --void ReadPSFontMap(struct psfontmap *entry) -+static void ReadPSFontMap(struct psfontmap *entry) - { - char *pos,*end,*psname; - int nameno = 0; -Index: ft.c -=================================================================== ---- ft.c (revision 13607) -+++ ft.c (working copy) -@@ -145,7 +145,7 @@ - } - - --void UnLoadFT(struct char_entry *ptr) -+static void UnLoadFT(struct char_entry *ptr) - { - if (ptr->data!=NULL) - free(ptr->data); -Index: papersiz.c -=================================================================== ---- papersiz.c (revision 13607) -+++ papersiz.c (working copy) -@@ -36,7 +36,7 @@ - * Advance the passed pointer as well. - */ - --int32_t myatodim(char ** p) -+static int32_t myatodim(char ** p) - { - double tmp; /* double accuracy is enough, I think */ - int i=0; -Index: pk.c -=================================================================== ---- pk.c (revision 13607) -+++ pk.c (working copy) -@@ -35,7 +35,7 @@ - int repeatcount; - int poshalf; - --unsigned char getnyb(unsigned char** pos) -+static unsigned char getnyb(unsigned char** pos) - { - if (poshalf == 0) { - poshalf=1; -@@ -46,7 +46,7 @@ - } - } - --uint32_t pk_packed_num(unsigned char** pos) -+static uint32_t pk_packed_num(unsigned char** pos) - { - register int i; - uint32_t j; -@@ -77,7 +77,7 @@ - } - } - --unsigned char* skip_specials(unsigned char* pos) -+static unsigned char* skip_specials(unsigned char* pos) - { - uint32_t i; - -@@ -384,7 +384,7 @@ - } - } - --void UnLoadPK(struct char_entry *ptr) -+static void UnLoadPK(struct char_entry *ptr) - { - if (ptr->data!=NULL) - free(ptr->data); -Index: ppagelist.c -=================================================================== ---- ppagelist.c (revision 13607) -+++ ppagelist.c (working copy) -@@ -107,7 +107,7 @@ - return(false); - } - --void ListPage(int32_t pslow, int32_t pshigh) -+static void ListPage(int32_t pslow, int32_t pshigh) - { - register struct pp_list *pl; - -Index: set.c -=================================================================== ---- set.c (revision 13607) -+++ set.c (working copy) -@@ -84,7 +84,7 @@ - } - - --void ChangeColor(gdImagePtr imagep,int x1,int y1, -+static void ChangeColor(gdImagePtr imagep,int x1,int y1, - int x2,int y2,int color1,int color2) - /* In the given rectangle, change color1 to color2 */ - { -Index: sfd.c -=================================================================== ---- sfd.c (revision 13607) -+++ sfd.c (working copy) -@@ -25,7 +25,7 @@ - #include "dvipng.h" - struct subfont* subfontp=NULL; - --struct subfont* ReadSubfont(char* sfdname, char *infix) -+static struct subfont* ReadSubfont(char* sfdname, char *infix) - { - char *pos,*max,*sfdfile=NULL; - struct subfont* sfdp=NULL; -Index: special.c -=================================================================== ---- special.c (revision 13607) -+++ special.c (working copy) -@@ -40,7 +40,7 @@ - - struct pscode* psheaderp=NULL; /* static, DVI-specific header list */ - --void PSCodeInit(struct pscode *entry, char *special) -+static void PSCodeInit(struct pscode *entry, char *special) - { - entry->next=NULL; - entry->special=special; -@@ -91,7 +91,7 @@ - } - } - --void writepscode(struct pscode* pscodep, FILE* psstream) -+static void writepscode(struct pscode* pscodep, FILE* psstream) - { - while (pscodep!=NULL) { - if (pscodep->code!=NULL) { -@@ -131,7 +131,7 @@ - } - - --gdImagePtr -+static gdImagePtr - ps2png(struct pscode* pscodep, char *device, int hresolution, int vresolution, - int llx, int lly, int urx, int ury, int bgred, int bggreen, int bgblue) - { -@@ -274,7 +274,7 @@ - return psimage; - } - --gdImagePtr -+static gdImagePtr - rescale(gdImagePtr psimage, int pngwidth, int pngheight) - { - gdImagePtr scaledimage=psimage; -@@ -305,7 +305,7 @@ - return(scaledimage); - } - --void newpsheader(char* special) { -+static void newpsheader(char* special) { - struct pscode* tmp; - char* txt; - -Index: t1.c -=================================================================== ---- t1.c (revision 13607) -+++ t1.c (working copy) -@@ -164,7 +164,7 @@ - } - - --void UnLoadT1(struct char_entry *ptr) -+static void UnLoadT1(struct char_entry *ptr) - { - if (ptr->data!=NULL) - free(ptr->data); diff --git a/Build/source/texk/dvipng/dvipng-1.12/COPYING b/Build/source/texk/dvipng/dvipng-1.12/COPYING new file mode 100644 index 00000000000..94a9ed024d3 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/Build/source/texk/dvipng/dvipng-1.12/COPYING.LESSER b/Build/source/texk/dvipng/dvipng-1.12/COPYING.LESSER new file mode 100644 index 00000000000..fc8a5de7edf --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/COPYING.LESSER @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Build/source/texk/dvipng/dvipng-1.12/ChangeLog b/Build/source/texk/dvipng/dvipng-1.12/ChangeLog new file mode 100644 index 00000000000..225b3f63b6c --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/ChangeLog @@ -0,0 +1,1103 @@ +2009-02-23 Jan-Ake Larsson + + * Release 1.12 + +2009-02-23 Jan-Ake Larsson + + * INSTALL, README, install.texi, readme.texi, special.c: Correct + date for copyright + + * RELEASE, configure.ac, dvipng.1, dvipng.texi: Prepare for 1.12 + +2009-01-23 Jan-Ake Larsson + + * special.c: Keep transparent background in rescaled included + bitmaps + +2008-06-04 Jan-Ake Larsson + + * special.c: Add the color PostScript prologue + +2008-06-03 Jan-Ake Larsson + + * dvipng.h, special.c: Support xcolor PostScript prologue + + * color.c: Support x11nam.def, fix handling of xcolor + multiple-model color values, and xcolor PostScript prologue + +2008-06-02 Jan-Ake Larsson + + * special.c: Some (most?) literal PostScript specials seem to + depend on tex.pro and possibly special.pro, always load these + + * configure.ac: Fix gs checks + + * misc.c: Correct last mmap element + +2008-05-27 Jan-Ake Larsson + + * readme.texi: Mention new color models in xcolor + + * color.c: Adjust for new version of xcolor, mainly color prefixes + +2008-05-14 Jan-Ake Larsson + + * Release 1.11 + + * configure.ac, dvipng.1, dvipng.texi, RELEASE: Prepare for 1.11 + + * special.c: Fix PS inclusion regression + +2008-05-09 Jan-Ake Larsson + + * Release 1.10 + + * RELEASE: Prepare for 1.10 + +2008-05-08 Jan-Ake Larsson + + * special.c: Add warning about DVI code in PS environment + +2008-05-07 Jan-Ake Larsson + + * README, readme.texi: Mention gs interpreter lib in TODO + + * aclocal.m4, configure.ac: Move gs device check so that it can be + called from different points + +2008-05-05 Jan-Ake Larsson + + * draw.c, dvi.c, dvipng.h: Revert creation of dvi command struct + + * draw.c, dvi.c: Init dvi command struct + + * draw.c, dvi.c, dvipng.h: Create dvi command struct + + * special.c: Rearrange code + + * color.c, dvipng.h, enc.c, fontmap.c, misc.c, pk.c, sfd.c, + special.c, tfm.c, vf.c: Change name of fmmap struct element + +2008-04-29 Jan-Ake Larsson + + * dvipng.1: Prepare for 1.10 + + * configure.ac: Prepare for 1.10, check for gdImageCreateJpeg + + * aclocal.m4: Cosmetic changes + + * special.c: Change to HAVE_...JPEG + + * dvipng.h: Remove c++ comment + + * dvipng.texi: Prepare for 1.10. Use 'active' in the 'preview' + package, remove unused text + + * Makefile.in: + Install dvipng.1 from the tarball, mark maintainer targets + +2008-02-08 Jan-Ake Larsson + + * Makefile.in, INSTALL, README, color.c, commands.h, configure.ac, + * draw.c, dvi.c, dvipng.1, dvipng.c, dvipng.h, dvipng.texi, enc.c, + * font.c, fontmap.c, ft.c, install.texi, macros.texi, miktex.h, + * misc.c, papersiz.c, pk.c, ppagelist.c, readme.texi, set.c, sfd.c, + * special.c, t1.c, test_dvipng.tex, tfm.c, vf.c, COPYING, + * COPYING.LESSER: Change to LGPLv3 + + * install.texi: + * README: + * dvipng.texi: Add blurb about MediaWiki, and cosmetic changes + +2008-01-10 Jan-Ake Larsson + + * set.c: Correct typo + +2007-12-12 Jan-Ake Larsson + + * special.c: Correct header test, add proper ps::[start] and + ps::[end] detection, add code to make tikz/pgf dvips (~PostScript) + specials work + +2007-10-26 Jan-Ake Larsson + + * draw.c: + * dvi.c: + * special.c: Change DVIGetCommand so that the command is + zero-terminated. This simplifies string operations on specials and + makes the length argument to SetSpecial unnecessary. Handle + preview-bop-hook correctly + + * special.c: Simplify PostScript header and multi-special + handling + + * color.c: + * draw.c: + * dvi.c: + * dvipng.h: + * font.c: + * ft.c: + * misc.c: + * set.c: + * special.c: + * t1.c: Split the flags variable into page_flags, option_flags and + dvi->flags + + * dvi.c: + * dvipng.c: dvi->flags resets now when the dvi is reopened + +2007-08-06 Jan-Ake Larsson + + * ft.c: + * misc.c: + * t1.c: + * tfm.c: + * vf.c: Memory fixes + +2007-07-24 Jan-Ake Larsson + + * special.c: Fix PostScript header usage + +2007-07-22 Jan-Ake Larsson + + * misc.c: Change version info slightly + + * ft.c: Change debug info slightly + +2007-07-21 Jan-Ake Larsson + + * special.c: Rewrite to allow for raw PostScript specials, also + use PostScript headers + + * dvipng.h: + * dvi.c: Add read-ahead for PostScript specials + + * config.h.in: + * configure.ac: Add test for gd pointer->image conversion + +2007-03-19 Jan-Ake Larsson + + * draw.c: Better handling of glyph index bounds + + * set.c: Check bounds for glyph index + +2006-12-11 Jan-Ake Larsson + + * readme.texi: Fix TODO, mention MediaWiki + + * dvipng.h: Fix for alloca under AIX + + * Makefile.in: mkinstalldirs is in $(srcdir) + +2006-11-11 Jan-Ake Larsson + + * Release 1.9 + + * INSTALL: + * README: Update for 1.9 + + * Makefile.in: Make the test fail if fonts not found + + * configure.ac: Don't use "which". Add info about the selfauto + stuff. Report if CJK support present + + * test_dvipng.tex: Remove the (intentional) failing special + +2006-11-07 Jan-Ake Larsson + + * fontmap.c: Don't warn if ttfonts.map is missing, fix pointer + + * Makefile.in: Adjust manpage target so manual intervention isn't + needed anymore + + * dvipng.1: Update manpage + + * dvipng.texi: Update for 1.9 + + * COPYING, Makefile.in, color.c, commands.h, configure.ac, draw.c, + dvi.c, dvipng.c, dvipng.h, dvipng.texi, enc.c, font.c, fontmap.c, + ft.c, macros.texi, miktex.h, miktex.mak, misc.c, papersiz.c, pk.c, + ppagelist.c, set.c, sfd.c, special.c, t1.c, test_dvipng.tex, + tfm.c, vf.c: Update FSF address + + * fontmap.c: Add ttfonts.map to the searched font maps + + * RELEASE: Prepare for 1.9 + +2006-11-02 Jan-Ake Larsson + + * dvipng.texi: Nitpicking on bitmapped graphics + +2006-10-13 Jan-Ake Larsson + + * readme.texi: Add note about subfont (CJK) support + + * install.texi: Add that FreeType2 is needed for subfont (CJK) support + +2006-10-12 Jan-Ake Larsson + + * readme.texi: Fix todo + +2006-10-11 Jan-Ake Larsson + + * sfd.c: Change && to || so that multiple subfonts work + + * ft.c: Adjust debug output + + * configure.ac: Add sfd.o + +2006-10-04 Jan-Ake Larsson + + * configure.ac: Prepare for 1.9 + + * sfd.c: Only look for subfont file on recent kpathsea + + * dvipng.c, ft.c, fontmap.c, dvipng.h: Prepare for subfonts (CJK) + + * sfd.c: Added. Used for subfonts (CJK) + + * configure.ac: Change wording of gs helptext + + * ft.c: Adjust debug message, and encoding selection + + * special.c: Adjust debug messages + + * dvipng.texi: Document the --strict option + + * dvipng.c: Fix timer + + * Makefile.in: Add dist target, simplify distclean + + * fontmap.c: Remove segfault occuring for non-existent font + +2006-08-08 Jan-Ake Larsson + + * special.c: Make showpage flag static + + * special.c: + Fix bug with -dSAFER and non-. paths, and bug with pngalpha and + background color + +2006-05-17 Jan-Ake Larsson + + * fontmap.c: Rearrange, simplify, speed up + +2006-05-16 Jan-Ake Larsson + + * ft.c: FT_LOAD_TARGET_LIGHT does not work in some cases, fall + back to FT_LOAD_NO_HINTING + +2006-05-08 Jan-Ake Larsson + + * dvipng.texi: Add credit + + * Makefile.in: add www target + + * README: + * readme.texi: Update capabilities info and preview-latex link + +2006-03-30 Jan-Ake Larsson + + * Release 1.8 + + * RELEASE: Update for 1.8 + + * set.c: + * readme.texi: + * install.texi: + * ft.c: + * dvi.c: + * draw.c: + * README: + * INSTALL: Update copyright + +2006-03-29 Jan-Ake Larsson + + * dvipng.1: + * dvipng.texi: Document new switch, new PostScript inclusion, + rearrange and adjust + + * misc.c: + * INSTALL: + * README: + * install.texi: + * readme.texi: Minimal documentation adjustments + +2006-03-27 Jan-Ake Larsson + + * ft.c: Change to FT_LOAD_TARGET_LIGHT + + * draw.c: Fix segfault in debug mode + + * aclocal.m4: Make sure the kpse_enc_format test fails for the + right reason only + +2006-02-27 Jan-Ake Larsson + + * special.c: Use gs' pngalpha device, render without clipping, + adjust image position + + * set.c: Simplify code, make color cache (page-)persistent + + * draw.c: Reset new flag + + * misc.c: New switch, remove some old switches from fast-help, use + new flag name + + * dvipng.h: New flags + + * configure.ac: + * config.h.in: Simplify gd tests + + * configure.ac: + * aclocal.m4: Check gs devices + +2006-02-10 Jan-Ake Larsson + + * special.c: Use execlp for gs call + +2006-02-03 Jan-Ake Larsson + * special.c: + Revert message about file type, debug information is enough + + * special.c: Warn for nonexistent image decoder + +2006-02-01 Jan-Ake Larsson + + * special.c: Warn with file type when unable to load included image + + * special.c: Read the first byte of file to be included and + compare with magic number + +2006-01-31 Jan-Ake Larsson + + * special.c: Temporary version, just try the different image + decoders and see + + * special.c: Use correct variables + +2006-01-29 Jan-Ake Larsson + + * special.c: Add code to check image access permission + +2006-01-28 Jan-Ake Larsson + + * special.c: Simplify some code + + * papersiz.c: Fix rounding error for length calculation + +2006-01-26 Jan-Ake Larsson + + * color.c: Fix typo that gave a segfault + + * config.h.in: Remove unneeded function check + + * configure.ac: Update for 1.8, remove unneeded function check + + * dvipng.h: Switch debug numbers to coincide with the manual + + * misc.c: Remove isdigit + + * special.c: Add code to include PNG, JPEG and GIF images + +2006-01-12 Jan-Ake Larsson + + * special.c: Add a space in message + + * misc.c: Do more tests for numeric-parameter options + + * dvi.c: Outfilename: only remove .dvi extension, not others + +2005-10-11 Jan-Ake Larsson + + * Release 1.7 + + * INSTALL: Typographic changes + + * README: + * RELEASE: + * configure.ac: + * dvipng.1: + * dvipng.texi: Adjust for 1.7 + + * install.texi: Insert space + + * miktex.h: Adjust for 1.7, I am uncertain which of the new calls + are available in the MIKTeX environment + + * readme.texi: Remove reference to my old laptop + +2005-09-30 Jan-Ake Larsson + + * config.h.in, configure.ac, ft.c: + Only use FT_Library_Version if available + +2005-07-05 jalar + + * Makefile.in: Enable srcdir != builddir + +2005-07-04 jalar + + * font.c: Add length check for font name + +2005-06-28 Jan-Ake Larsson + + * special.c: Read preview-latex version + +2005-06-27 Jan-Ake Larsson + + * Release 1.6 + + * RELEASE: Report what fixes have been done + + * dvipng.texi: Document xcolor adaptations + + * misc.c: Add 'Transparent' in the quick-help + + * special.c: Cosmetics, do a _small_ message for bop-hook redef + +2005-06-16 Jan-Ake Larsson + + * dvipng.h: + * dvipng.c: + * color.c: Revamp colorname interpreter for xcolor + +2005-06-14 Jan-Ake Larsson + + * misc.c: Adjust MIKTeX stuff + +2005-06-13 Jan-Ake Larsson + + * color.c: Don't use strtok, adjust for xcolor + + * special.c: Don't use strtok + +2005-04-25 Jan-Ake Larsson + + * config.h.in: + * configure.ac: + * set.c: Don't do alpha blending in truecolor mode, write alpha + channel to file + +2005-04-20 Jan-Ake Larsson + + * dvipng.texi: Add Credits + +2005-04-19 Jan-Ake Larsson + + * dvipng.h: Fix for sys/types.h conflict in old IRIX systems + + * special.c: Adjust tightpage test + +2005-04-04 Jan-Ake Larsson + + * special.c: Make tightpage option backwards compatible + + * RELEASE: Prepare for 1.6 + + * dvipng.1: Regenerate man page + + * configure.ac: + * dvipng.texi: + * miktex.h: Update version info + + * configure.ac: + * dvipng.texi: + * README: + * readme.texi: Update mailing list address + + * configure.ac: + * config.h.in: + * special.c: Simplify string search + +2005-04-03 Jan-Ake Larsson + + * special.c: Try to detect all preview-latex versions tightpage + code + +2005-03-02 Jan-Ake Larsson + + * set.c: Remove extra debug printout + + * t1.c: Sizes are given in big points in T1lib, in TeX points in + DVI files + + * ft.c: Sizes are given in big points in FreeType, in TeX points + in DVI files + + * dvipng.h: Fix boolean type again + +2005-02-10 Jan-Ake Larsson + + * config.h.in: + * configure.ac: + * dvipng.texi: + * dvipng.h: + * misc.c: + * set.c: Add proper alpha channel + +2005-02-04 Jan-Ake Larsson + + * color.c: + * draw.c: + * dvi.c: + * dvipng.c: + * font.c: + * ft.c: + * misc.c: + * papersiz.c: + * pk.c: + * set.c: + * special.c: + * t1.c: + * tfm.c: + * vf.c: Cosmetic changes to warnings and fatals + + * Release 1.5 + + * RELEASE: Prepare for 1.5 + + * INSTALL: + * Makefile.in: + * README: + * color.c: + * commands.h: + * configure.ac: + * draw.c: + * dvi.c: + * dvipng.1: + * dvipng.c: + * dvipng.h: + * dvipng.texi: + * enc.c: + * font.c: + * fontmap.c: + * ft.c: + * install.texi: + * macros.texi: + * miktex.h: + * misc.c: + * papersiz.c: + * pk.c: + * ppagelist.c: + * readme.texi: + * set.c: + * special.c: + * t1.c: + * test_dvipng.tex: + * tfm.c: + * vf.c: Update Copyright, set version 1.5 + +2005-02-03 Jan-Ake Larsson + + * draw.c: + * dvipng.h: + * set.c: Fix bug in --picky mode + +2005-01-27 Jan-Ake Larsson + + * dvipng.c: Restore --mfmode and --bdpi functionality + +2005-01-25 Jan-Ake Larsson + + * color.c: Fix segfault when trying to find nonexisting dvipsnam + color + + * dvipng.c: Make dvipsnam colors available on command line + +2004-12-10 Jan-Ake Larsson + + * Release 1.4 + + * RELEASE: + * configure.ac: + * dvipng.1: + * dvipng.texi: Set version 1.4 + + * README: Fix formatting + + * misc.c: Use mmap test. Hopefully, it will fail on ULTRIX, mmap + only works on character special devices (and not on regular files) + +2004-12-02 Jan-Ake Larsson + + * config.h.in: + * configure.ac: + * dvipng.h: Move int64_t and uint64_t tests entirely to autoconf + + * dvi.c: Fix signedness + +2004-11-30 Jan-Ake Larsson + + * misc.c: Fix NULL dereference. + +2004-11-25 Jan-Ake Larsson + + * Release 1.3 + + * Makefile.in, README, dvipng.1, readme.texi: Fix dvigif + installation and docs + + * INSTALL: + * README: Add license + + * dvipng.c: Remove duplicate copyright + + * config.h.in: + * configure.ac: Add some tests + + * dvipng.1: + * dvipng.texi: Add some minor things + +2004-11-24 Jan-Ake Larsson + + * config.h.in: + * configure.ac: Test for 64-bit types. + + * dvipng.h: Use char* arithmetic, not void*. And enable use of + gcc -ansi -pedantic. + + * special.c: Don't use C++ comments. + + * papersiz.c: Rewrite + + * draw.c: + * dvi.c: + * font.c: + * ft.c: + * misc.c: + * pk.c: + * tfm.c: + * vf.c: Fix signedness + +2004-11-15 Reiner Steib + + * draw.c, dvipng.c, enc.c, font.c, ft.c, pk.c, special.c, t1.c: + Don't use C++ comments. + +2004-11-05 David Kastrup + + * Makefile.in (install-dvigif): Don't fail if dvigif already + exists. + +2004-11-02 Jan-Åke Larsson + + * dvipng.h: Fix boolean type + +2004-11-01 Jan-Åke Larsson + + * RELEASE: Update for 1.3 + + * dvipng.h: Load alloca.h when available + + * font.c: + * fontmap.c: Remove inline + + * Makefile.in: + * commands.h: + * config.h.in: + * configure.ac: + * install.texi: + * macros.texi: + * miktex.h: + * readme.texi: + * test_dvipng.tex: Add copyright notice + + * color.c: + * draw.c: + * dvi.c: + * dvipng.c: + * dvipng.h: + * enc.c: + * font.c: + * fontmap.c: + * ft.c: + * misc.c: + * papersiz.c: + * pk.c: + * ppagelist.c: + * set.c: + * special.c: + * t1.c: + * tfm.c: + * vf.c: Change c-in-a-circle to (C) + +2004-10-27 Jan-Åke Larsson + + * dvipng.1: + * dvipng.texi: Amend docs + + * misc.c: Amend helptext + +2004-10-26 Jan-Åke Larsson + + * set.c: + * misc.c: + * dvipng.h: Change background transparency + + * configure.ac: Bump version, add test for libz + +2004-10-07 Jan-Åke Larsson + + * dvipng.texi: document change in -o switch + +2004-10-06 Jan-Åke Larsson + + * set.c: Allow longer pagenumbers in output file (e.g., %06d) + +2004-08-18 Jan-Åke Larsson + + * Release 1.2 + + * RELEASE: Change for 1.2 + + * config.h.in: Update + + * dvipng.1: change help text + + * dvipng.texi: update mailing list text. And version. + + * README: + * readme.texi: update info and todo list + + * draw.c, misc.c, dvipng.c, dvipng.h: + Add an intermediate exit status + +2004-08-17 Jan-Åke Larsson + + * misc.c: add --gamma switch + + * special.c: Fix comment + + * set.c: + * dvipng.h: new Gamma function + + * configure.ac: libm is needed by new gamma code + + * dvipng.1: + * dvipng.texi: document new switches + + * draw.c: change name of picky flag + + * special.c: do not call ghostscript when switch given + + * misc.c: add picky and ghostscript switches + + * dvipng.h: add picky and ghostscript flags + +2004-08-06 Jan-Åke Larsson + + * dvipng.texi: Document --png, --gif, and --picky + + * .cvsignore: Add *.gif + + * Makefile.in: Install 'dvigif' if we have GIF support + + * configure.ac: Test for gdImageGif and 'ln -s' + + * config.h.in: GIF support + + * set.c: GIF writing + + * misc.c: basename fixes, --png and --gif fixes, + --no-image-on-warn changes name to --picky + + * dvi.c: basename fixes + + * dvipng.h: Portability fixes, add GIF image flag + +2004-08-02 Jan-Åke Larsson + + * draw.c: Fix behaviour of --no-image-on-warn + +2004-07-01 Jan-Åke Larsson + + * miktex.mak: New, for MIKTeX + + * dvi.c: + * dvipng.c: + * dvipng.h: + * special.c: Adjust for MIKTeX + + * color.c: + * enc.c: + * font.c: + * fontmap.c: + * misc.c: + * pk.c: + * tfm.c: + * vf.c: Move file-mmapping to misc.c, adjust it for MIKTeX + +2004-06-29 Jan-Åke Larsson + + * configure.ac: + * dvipng.h: inttypes.h not available on all platforms + + * special.c: Remove snprintf, not available on certain platforms + +2004-06-27 Jan-Åke Larsson + + * dvipng.c: Fix case of missing font libs + + * fontmap.c: Remove debug printf + + * draw.c: Fix for case of absent font lib(s), correct typo + +2004-06-24 Jan-Åke Larsson + + * fontmap.c: + * pk.c: + * vf.c: More memory fixes + +2004-06-21 Jan-Åke Larsson + + * config.h.in: + * configure.ac: Test for stdbool, munmap and strtol + + * test_dvipng.tex: Change color test + + * dvipng.h: + * misc.c: + * ppagelist.c: Fix -r switch + + * dvipng.h: + * font.c: + * misc.c: + * ppagelist.c: + * special.c: + * t1.c: + * tfm.c: Use stdbool + + * color.c: + * dvi.c: + * dvipng.c: + * dvipng.h: + * enc.c: + * font.c: + * fontmap.c: + * ppagelist.c: + * special.c: Fix memory leak(s) + + * color.c: + * draw.c: + * dvi.c: + * dvipng.h: + * misc.c: + * set.c: + * special.c: Fix color stack + + * draw.c: + * dvipng.h: + * ft.c: + * pk.c: + * set.c: + * t1.c: + * tfm.c: + * vf.c: Simplify char structs + + * color.c: + * draw.c: + * dvi.c: + * dvipng.c: + * dvipng.h: + * enc.c: + * font.c: + * fontmap.c: + * ft.c: + * misc.c: + * papersiz.c: + * pk.c: + * ppagelist.c: + * set.c: + * special.c: + * t1.c: + * tfm.c: + * vf.c: Add copyright notice + +2004-05-31 Jan-Åke Larsson + + * dvipng.1: + * configure.ac: + * RELEASE: + * INSTALL: Release 1.1 + +2004-05-26 Jan-Åke Larsson + + * special.c: Handle source specials + + * test_dvipng.tex: Add failing special and color test + + * dvipng.c: Adjust coment about SELFAUTO... + + * dvi.c: Fix possible overflow + +2004-05-24 Jan-Åke Larsson + + * misc.c: Remove -t, it is not implemented yet + + * dvipng.h: Undef malloc, if defined + +2004-05-18 Jan-Åke Larsson + + * dvipng.texi: Fix build + +2004-05-14 Jan-Åke Larsson + + * config.h.in: Use more tests + + * dvipng.1: Add documentation + + * dvipng.texi: Fix build. Revert to four-argument @node, my + makeinfo cannot handle the one-argument form (yet). + +2004-05-11 Jan-Åke Larsson + + * configure.ac: More tests + +2004-05-09 Jan-Åke Larsson + + * install.texi: T1lib docs + + * dvipng.1: + * dvipng.texi: Add documentation, and spellcheck + + * special.c: + * color.c: Make colors work again. + +2004-05-08 David Kastrup + + * Create new ChangeLog for dvipng + +2004-05-05 Jan-Åke Larsson + + * fontmap.c: Use both kpse_fontmap_format and + _dvips_header_ + + * enc.c: Use configure test + + * configure.ac: Add test for kpse_enc_format, reorder gd + and png tests + + * aclocal.m4: Add test for kpse_enc_format + + * special.c: More informative warnings + +2004-05-04 Jan-Åke Larsson + + * enc.c: + Use the new kpathsea search format kpse_enc_format if available, + otherwise use kpse_tex_ps_header_format + + * fontmap.c: + Fix new kpathsea search type kpse_fontmap_format, use + kpse_dvips_config_format if not available + + * ft.c: Fix sizing + + * draw.c: Simplify LoadT1 call + + * t1.c: Shorten call, fix sizing + + * dvipng.h: Simplify char-storing structure + +2004-05-03 Jan-Åke Larsson + + * fontmap.c, font.c, t1.c, ft.c: + Fix for ps fonts not in psfontmap + +2004-05-02 Jan-Åke Larsson + + * Makefile.in: + * config.h.in: + * configure.ac: + * draw.c: + * dvipng.c: + * dvipng.h: + * enc.c: + * font.c: + * fontmap.c: + * ft.c: + * t1.c: + * misc.c: Add t1lib support + +2004-04-05 Jan-Åke Larsson + + * dvipng.1: + * readme.texi: + * dvipng.texi: + * Makefile.in: Add man page + +2004-03-27 Jan-Åke Larsson + + * dvipng.texi: Fix debug documentations + + * dvipng.c: Dont fail on --mode without --bdpi, output a warning. + +2004-03-26 Jan-Åke Larsson + + * papersiz.c: Remove compiler warning + + * dvipng.texi: + * misc.c: Change year + +2004-03-25 Jan-Åke Larsson + + * special.c: Revert change, not only resolution but also + offset is needed when generating png from ps + + * misc.c: Change helptext + + * configure.ac: Change version number + + * README: Checkin updated README + + * pk.c: + * ft.c: Speed up color cache + + * dvipng.texi: Add info on resolution, change version number + +2004-03-24 Jan-Åke Larsson + + * special.c: Fix missing 'showpage' and a memory leak + + * font.c: Adjust error message + + * dvipng.h: + * ft.c: + * pk.c: Change ink darkness map + + * draw.c: Output page numbers more often. If the user has a + slow terminal he's to blame himself, not me. + + * tfm.c: Include alloca.h if present + +2004-03-23 Jan-Åke Larsson + + * dvipng.texi: Adjust for the new -D option + +2004-03-19 dakas + + * RELEASE: Remove spurious blanks. + +2004-03-19 Jan-Åke Larsson + + * RELEASE: Update, shorten + +2004-03-18 Jan-Åke Larsson + + * RELEASE: + * dvi.c: + * dvipng.c: + * dvipng.h: + * font.c: + * misc.c: + * papersiz.c: + * special.c: Change the behaviour of the -D switch + +2004-03-08 Jan-Åke Larsson + + * font.c: Don't retry on PK generation failure + +2004-03-02 David Kastrup + + * dvi.c (DVIOpen): Fix a buffer overrun error. diff --git a/Build/source/texk/dvipng/dvipng-1.12/ChangeLog.0 b/Build/source/texk/dvipng/dvipng-1.12/ChangeLog.0 new file mode 100644 index 00000000000..3c4689ad8c4 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/ChangeLog.0 @@ -0,0 +1,903 @@ +2004-01-16 Jan-Åke Larsson + + * font.c: fix compile without FT2 + +2004-01-12 Jan-Ake Larsson + + * RELEASE: Prepare for 0.9 + + * misc.c: Enable --expand-bbox + + * color.c: + * draw.c: + * dvipng.h: + * font.c: + * misc.c: + * special.c: Enable --no-image-on-warn + + * draw.c: + * dvi.c: + * dvipng.c: + * dvipng.h: + * readme.texi: + * special.c: Fix tightpage behaviour + +2004-01-09 Jan-Ake Larsson + + * special.c: Add preview-latex's "tightpage" code + +2004-01-08 Jan-Ake Larsson + + * dvipng.texi: + * configure.ac: Prepare for 0.9 + + * Makefile.in: clean target + +2004-01-07 Jan-Ake Larsson + + * color.c: + * draw.c: + * dvi.c: + * dvipng.c: + * dvipng.h: + * enc.c: + * font.c: + * fontmap.c: + * ft.c: + * pk.c: + * set.c: + * special.c: + * tfm.c: + * vf.c: Speedup DEBUG + + * pk.c: Fix subpixel offsets + + * dvipng.c: + * dvipng.h: + * font.c: + * misc.c: + * set.c: + * special.c: Fix flags + + * draw.c: Fix bbox + + * dvipng.h: Adjust for freetype >= 2.1.6 + +2003-12-15 Jan-Ake Larsson + + * tfm.c: + * fontmap.c: + * font.c: Fix freeeeeeeeeing + +2003-12-08 Jan-Ake Larsson + + * dvipng.texi: + * configure.ac: + * RELEASE: Prepare for 0.8 + + * ft.c: Fix debug output + + * draw.c: + * dvipng.h: + * dvipng.texi: + * misc.c: Add --height option + + * test_dvipng.tex: A nice equation is true. Behave! + +2003-12-07 Jan-Ake Larsson + + * enc.c: Encodings are _ps_header_s + +2003-12-05 Jan-Åke Larsson + + * misc.c: + * dvipng.texi: + * dvipng.h: + * draw.c: Change --baseline to --depth + +2003-12-01 Jan-Ake Larsson + + * draw.c: + * dvipng.h: + * misc.c: Change to physical pagenumbers, instead of DVI + pagenumbers. DVI pagenumbers will be indicated on STDOUT if they + differ from physical pagenumbers, but the numbering of PNG files + is physical pagenumbers. Old behaviour can be chosen with the + option -dvinum. + + * ppagelist.c: + * misc.c: + * dvipng.texi: Make negative pages render. Now -pp handles + negative pages gracefully too. Remove -pp code taken from dvips. + +2003-11-30 Jan-Ake Larsson + + * draw.c: + * dvipng.c: + * dvipng.h: + * font.c: + * ft.c: + * misc.c: + * pk.c: + * set.c: + * tfm.c: + * vf.c: Include alloca.h when necessary, start preparing + transition to subpixel rendering, do proper cleanup on exit + +2003-11-18 Jan-Åke Larsson + + * enc.c: Fix bug + + * ft.c: + * tfm.c: + * font.c: + * dvipng.h: Add fallback from FT to PK + +2003-11-14 Jan-Åke Larsson + + * Makefile.in: Use $DESTDIR + +2003-11-06 Jan-Åke Larsson + + * special.c: Fix postscript inclusion: placement and + background color + +2003-10-17 Jan-Åke Larsson + + * misc.c: + * font.c: + * dvipng.texi: + * dvipng.h: Add option for freetype activation + + * configure.ac: Add message when freetype is present + + * ft.c: Apparently FreeType hinting is a no-no. Load glyphs + with FT_LOAD_NO_HINTING. Only then output is acceptable. + +2003-10-15 Jan-Åke Larsson + + * fontmap.c: Remove erroneous match + +2003-10-13 Jan-Åke Larsson + + * font.c: Fix font searching order + + * RELEASE: Prepare for 0.7 + + * fontmap.c: + * psfontmap.c: + * configure.ac: Rename psfontmap.c to fontmap.c + +2003-10-08 Jan-Ake Larsson + + * psfontmap.c: Add third bare word: encoding + +2003-10-07 Jan-Ake Larsson + + * misc.c: + * dvipng.texi: Allow for -- on options + + * configure.ac: Prepare for 0.7 + + * Makefile.in: Adjust hint + + * configure.ac: + * config.h.in: Fix helptext in config.h.in + + * test_dvipng.tex: Add some tests for ligatures and sizes + +2003-10-03 Jan-Åke Larsson + + * readme.texi: Document new font support and switches + + * psfontmap.c: Redesign psfontmap loading to use the syntax + from dvips' docs + + * font.c: Enhance TrueType font finding + + * draw.c: Warn if setting char from null font + + * dvipng.h: + * color.c: Load and use psnames.def + +2003-09-28 Jan-Ake Larsson + + * misc.c: Warn for all bad options + +2003-09-24 Jan-Ake Larsson + + * dvipng.texi: + * install.texi: + * misc.c: Fix documentation + +2003-09-23 Jan-Ake Larsson + + * ft.c: + * enc.c: + * dvipng.h: Only load encodings once + +2003-09-18 Jan-Åke Larsson + + * draw.c: + * dvipng.h: + * misc.c: Add -baseline switch + +2003-09-17 Jan-Ake Larsson + + * font.c: Remove compiler warning + + * config.h.in: + * psfontmap.c: + * dvipng.c: + * configure.ac: Fix SELFAUTO... variables if dvipng is not + being installed in main texmf tree. This will make it find config + files and fonts anyway. + +2003-09-16 Jan-Ake Larsson + + * tfm.c: + * psfontmap.c: + * ft.c: + * enc.c: Added for postscript font handling with freetype + + * font.c: Use freetype font loading + + * dvipng.h: Add freetype-related types and declarations, + and simplify glyph rendering + + * pk.c: Simplify glyph rendering + + * dvipng.c: Init freetype + + * dvi.c: Fix strlen bugs + + * draw.c: Add FONT_TYPE_FT drawing + + * configure.ac: + * config.h.in: + * Makefile.in: Adjust for freetype things + +2003-08-29 Jan-Åke Larsson + + * special.c: fix color handling + + * dvipng.c: Increase TIMING output + + * misc.c: + * draw.c: small speedups + + * dvipng.h: + * configure.ac: + * config.h.in: + * Makefile.in: Change handling of the DEBUG and TIMING + flags + +2003-08-26 Jan-Åke Larsson + + * RELEASE, dvipng.texi, configure.ac: + prepare for 0.6 + + * Makefile.in: another install-docs fix + +2003-08-13 Jan-Åke Larsson + + * configure.ac: new test (ps inclusion speedup) + + * draw.c: simplify preprocessor processing, fix SetSpecial + call + + * special.c: speedup for ps image inclusion, fix SetSpecial + call + + * Makefile.in: fix install-docs + +2003-08-04 Jan-Åke Larsson + + * special.c: Argh!, fix compilation for non-truecolor version + + * dvipng.h: Argh!, fix image cache + + * dvipng.texi: + * configure.ac: + * RELEASE: Prepare for 0.5 + + * misc.c: + * dvipng.h: + * set.c: Add preliminary truecolor support + + * pk.c: Benchmark truecolor rendering, no real code change + + * special.c: + * misc.c: + * dvipng.h: Add preliminary image cacheing + + * draw.c: Small adjustments + +2003-07-30 Jan-Åke Larsson + + * draw.c: Fix two bugs so that bounding box again is + correct + + * configure.ac: configuration printout improved + + +2003-07-02 Jan-Åke Larsson + + * dvipng.h: Add prototypes + + * draw.c: minor change + + * RELEASE: prepare for 0.4 + +2003-07-01 Jan-Åke Larsson + + * draw.c, set.c: + Fix rules (again), this time taking maxdrift into account. + + * pk.c: Unfortunately gdImageColorResolveAlpha only works + on truecolor images. Some other day, then. I did fix the + performance of PROPER_OVERSTRIKE, though. + + * readme.texi: Add todo + +2003-06-30 Jan-Åke Larsson + + * dvipng.texi: small fixes + + * vf.c: Speedup macro start/end + + * set.c: Handle offset in draw.c only, allow choice of + compression if gd can do this + + * pk.c: Handle overstrike, either with gd alpha level, if + support exists for that, or "manually". The latter is active if + PROPER_OVERSTRIKE is #defined, currently yes, at roughly 5% + performance loss. + + * misc.c: -z option: choose compression if gd can do this + + * dvipng.h: Proper rounding, gd bells and whistles + + * draw.c: Allow drift a la dvitype, maxdrift=1, handle + offset here only, speedup vf macro start/end + + * config.h.in: + * configure.ac: New tests for gd bells and whistles + + * Makefile.in: Clean README + + * .cvsignore: More files + +2003-06-23 Jan-Åke Larsson + + * configure.ac: + * config.h.in: Added tests for newly added C code + + * Makefile.in: + * dvipng.texi: Reflect move of readme + + * README: + * readme.texi: Moved from README to readme.texi + +2003-06-19 Jan-Åke Larsson + + * special.c: Fix crash on file not found + + * set.c: Code reformatting + + * misc.c: Fix switches, and send warnings/errors to stderr. + + * vf.c: + * pk.c: + * draw.c: Include header only used in this file, here. + + * commands.h: Make draw.c compile without -DDEBUG + + * Makefile.in: Use --disable-debug, fix docs + generation/install, and add 'test' target. + + * README: Update info + + * configure.ac: Add --disable-debug + + * install.texi: Minor changes + + * dvipng.texi: Document difference between -pp and -p + -l + + * dvipng.h: Fix FreeBSD non-C99 header issue + +2003-06-12 Jan-Åke Larsson + + * Makefile.in: Fix SunOS make suffix rule wierdness + + * color.c: Change comment + + * dvi.c (DVIOpen): bugfix ".dvi" completion + + * dvipng.h (PIXROUND): Round down instead of up, SetRule + now has its own rounding mechanism + + * set.c (SetRule): Refine rule drawing, make sure rule is + inside bounding box + +2003-06-10 Jan-Åke Larsson + + * README: + * RELEASE: + * Makefile.in: + * configure.ac: + * dvipng.texi: Prepare for 0.3 + + * vf.c: + * set.c: + * pk.c: + * font.c: + * dvi.c: + * draw.c: simplify DEBUG_PRINT + + * configure.ac: Look for gs + + * special.c: Fixes to gs interaction + + * set.c: Enable -o for output file, no segfault on empty + image, reposition rule to match dvips + + * draw.c: simplify DEBUG_PRINT macro + + * dvi.c: + * misc.c: Enable -o for output file + + * dvipng.h: Enable -o for output file, simplify DEBUG_PRINT + macro + +2003-04-17 Jan-Ake Larsson + + * install.texi: + * dvipng.texi: Rewrite stuff + + * dvipng.h: New debug flag + + * configure.ac: + * config.h.in: Configure GS_PATH + + * special.c: No tempfiles anymore. Communicate with child + through two pipes. + + * configure.ac: + * Makefile.in: Make docs + +2003-04-15 Jan-Åke Larsson + + * macros.texi: Added + + * install.texi, dvipng.texi: Initial version + +2003-03-28 Jan-Åke Larsson + + * README: + * RELEASE: Release 0.2, PostScript type1 font support and + PostScript inclusion. + + * configure.ac: Added configure error message about where + to find libgd. + + * dvipng.h: + * draw.c (DrawCommand): + * special.c (SetSpecial): Postscript inclusion now works. + + * misc.c (DecodeArgs): Fix --help message + + * COPYING: + * RELEASE: + * README: Added files to repository + +2003-03-12 Jan-Åke Larsson + + * dvi.c (DVIFollowToggle): + * misc.c (DecodeArgs): + * dvipng.h: Added '-follow' switch, and code that + implements a follow mode. + +2003-02-27 Jan-Åke Larsson + + * draw.c (DrawPages): + * misc.c (Message): Speed up slightly when not in DEBUG + mode. + + * misc.c (DecodeArgs): Adjust copyright notice. + + * set.c (SetRule): Reposition rules, one dot up. + +2003-01-30 Jan-Åke Larsson + + * Makefile.in: + * configure.ac: Fix includes and linking + + * draw.c: + * font.c: + * pk.c: + * vf.c: + * dvipng.h (font_entry): remove unnamed union + + * dvipng.h: simplify includes + +2003-01-15 Jan-Ake Larsson + + * misc.c: Use autoconf's stuff, use atoi, fix warning + message + + * dvipng.c: + * dvipng.h: Localize position and spacing to draw.c. Fix + timing + + * pk.c: + * set.c: + * special.c: + * vf.c: + * draw.c: Localize position and spacing to draw.c + + * configure.ac: Require gd and kpathsea + +2002-12-03 Jan-Ake Larsson + + * draw.c: unfinished change: repairing + + * draw.c: + * font.c: + * vf.c: use void* in function call + + * dvipng.h: + * draw.c: + * color.c: + * set.c: change names of some functions + + * dvipng.h: + * draw.c: + * dvi.c: + * ppagelist.c: make dvi data more local + + * .cvsignore: + * dvipng.h: + * special.c: + * font.c: + * misc.c: + * dvipng.c: + * configure.ac: + * config.h.in: + * Makefile.in: autoconfiscate + +2002-11-07 Jan-Ake Larsson + + * dvipng.h: + * dvipng.c (main): + * dvi.c (DVIReOpen): Don't re-init, re-open + +2002-10-31 Jan-Ake Larsson + + * dvipng.h: + * dvi.c: Remove globals and Reopen DVI on change (check + mtime) + + * dvipng.c: Reopen DVI on change (check mtime) + +2002-10-30 Jan-Ake Larsson + + * pk.c: Declaration moved here from dvipng.h + + * Makefile: No io.c, no pagequeue.c but ppagelist.c + + * dvipng.h: Rearranged, some new declarations + + * dvipng.c (main): minor changes + + * draw.c (DoPages): use new page-finding mechanisms + + * dvi.c: outfilename handling fixed, page-finding + mechanisms added. + + * misc.c: Ppagelist handling improved, outfilename now + works, added functionality from io.c + + * ppagelist.c: Added. Functionality slightly different from + pagequeue.c + + * pagequeue.c: Revamped. Functionality changed and moved to + ppagelist.c + + * io.c: Removed. Functionality in misc.c + + * .cvsignore: Additions + +2002-10-24 Jan-Ake Larsson + + * dvipng.c (main): + * dvipng.h: + * misc.c (DecodeString): Improve stdin parser + +2002-10-21 Jan-Ake Larsson + + * dvipng.h: Remove globals, fix message output + + * vf.c (SetVF, InitVF), + * font.c (FontDef), + * draw.c (DrawCommand): Bugfix VF handling, fix message + output + + * pk.c (SetPK, InitPK), + * dvi.c (DVIOpen): Fix message output + + * papersiz.c: use int32_t, fix overflow + + * misc.c (DecodeArgs, Message): Fix -d option, remove + globals, fix message output + +2002-10-16 Jan-Ake Larsson + + * dvipng.h: Remove globals + + * dvipng.c (main): Remove globals, improve stdin parser + + * misc.c (DecodeArgs): remove globals, fix helptext + + * pagequeue.c (FindQdPage, QueuePage, QueueParse): + remove globals + + * dvi.c (FindPage): Remove unnecessary test + + * draw.c (DoPages): Do more normal read-ahead + +2002-10-15 Jan-Ake Larsson + + * pk.c, font.c: Minor change + + * misc.c: Simplify, remove (some) globals, fix helptext + + * pagequeue.c, dvipng.h, dvipng.c, + dvi.c, draw.c: Simplify, remove (some) globals + +2002-10-14 Jan-Ake Larsson + + * misc.c, dvipng.h, draw.c: + Added '-T tight' switch + +2002-10-11 Angus Leeming + + * draw.c: + * dvi.c: + * dvipng.[ch]: + * font.c: + * io.c: + * misc.c: + * pagequeue.c: + * papersiz.c: + * pk.c: + * set.c: + * special.c: + * vf.c: remove function prototype macros. + + * dvi.c (DVIGetCommand, CommandLength): + * set.c (SetChar): add a 'break' to the end of the switch + statements (prevents a warning with gcc 3.2). + +2002-10-11 Jan-Ake Larsson + + * special.c: Fix DEBUG, prototypes, and code pruning + + * vf.c, set.c, pk.c, io.c, + font.c, draw.c: Fix DEBUG + + * misc.c, dvi.c, pagequeue.c, + dvipng.h, dvipng.c: Fix pagelist and DEBUG + + +2002-09-20 Jan-Ake Larsson + + * dvipng.h: change font structures, add dvi struct, remove old + global variables, include relevant bits of config.h, restructure + somewhat + + * dvipng.c: remove explicit vf stack + + * special.c: use dvi struct + + * misc.c: minor changes + + * io.c: close file descriptors, not FILE pointers. + + * draw.c: simplify, remove explicit vf stack. + + * set.c: use dvi struct, remove explicit dvi stack. + + * vf.c: use mmap, remove explicit vf stack. + + * pk.c: use mmap + + * font.c: enable dvi struct, prepare for mmap (file descriptors, + not FILE pointers), explicit vf stack removed. + + * dvi.c: use dvi struct + + * Makefile: config.h removed + + * config.h, klibtool, klibtool.config: removed. + +2002-08-30 Jan-Ake Larsson + + * dvi.c: fix bug in STRSIZE zap + + * vf.c: simplify, fix debug info, zap STRSIZE limit + + * misc.c: Fix background transparency + + * dvipng.h, draw.c: Fix FormFeed bug (outfilename + wrong) + + * set.c: Fix FormFeed bug (outfilename wrong), and background + transparency + +2002-08-29 Jan-Ake Larsson + + * dvipng.h: type changes, dvi-io abstraction + + * color.c: comment changed + + * dvipng.c: dvi-io abstraction + + * font.c: type changes, STRSIZE killed + + * io.c: ReadCommand and CommandLength moved to dvi.c, preparations + for mmap + + * set.c: type changes + + * vf.c, pk.c: prepare for mmap, type changes + + * pagequeue.c: type change + + * misc.c: dvi fopen moved to dvi.c, type changes + + * Makefile: pagelist.o gone, dvi.o new + + * draw.c: SetVF moved to vf.c, type and dvi-io abstraction + changes + + * commands.h: added length and debug texts + + * dvi.c: Functionality moved from pagelist.c and misc.c to + dvi.c. Still needs work, but is initial stab at proper abstraction + of dvi-reading stuff. STRSIZE killed. + + * pagelist.c: Functionality moved to dvi.c + + * special.c: DoSpecial now takes a const char* argument, as + opposed to before. + +2002-08-19 Jan-Ake Larsson + + * misc.c: Added -mode switch + +2002-08-14 Jan-Ake Larsson + + * dvipng.h: VF additions, general cleanup + + * dvipng.c: Small adjustments connected to the VF support + + * config.h: Remove unnecessary things + + * pagelist.c: Simplifications + + * color.c: Comment changed + + * special.c, set.c: Scale always equal h/v + + * Makefile: Make vf.o + + * io.c: Start pre-conversion to mmap. Much still to be done. + + * misc.c, set.c, font.c, pk.c, draw.c: Adjust for VF support + + * vf.c: VF support added to dvipng + +2002-06-24 Jan-Ake Larsson + + * Makefile: Cleaned. Vacuumed, in fact. + +2002-06-19 Jan-Ake Larsson + + * pagelist.c: remove Debug bug (!) + +2002-06-13 Jan-Ake Larsson + + * Makefile: new object files + + * special.c, set.c, dvipng.h: cleanup + + * misc.c (ActualFactor): moved to font.c + cleanup + + * font.c (ActualFactor): moved here from misc.c + + * draw.c, dvipng.c, pagelist.c: functionality from dvipng.c spread + to these three + + * pagequeue.c, pages.c: functionality moved from pages.c to + pagequeue.c + + * commands.h: minor adjustments + +2002-06-12 Jan-Ake Larsson + + * special.c: on unimplemented \special, give pixel position + + * misc.c: Bugfix + literal response on stdin interface + + * font.c, dvipng.h: Font handling fixed + + * dvipng.c: prompt on stdin interface + +2002-06-11 Jan-Ake Larsson + + * set.c (SetChar): load chars on PASS_DRAW + -T -O bug fixed + +2002-06-11 Jan-Ake Larsson + + * set.c: Cleanup. Still buggy wrt -O, though. + + * Makefile: DEBUG on for now, postamble.? removed + + * postamble.c: Postamble is no longer read + + * pages.c: Improve page handling: now a queue, not an unordered + set + + * font.c: Improve font handling: search for fonts only when used + + * dvipng.h: Cleanup + + * dvipng.c: Major rewrite: page handling improved + + * misc.c: Fix DVI init + cleanup + +2002-05-30 Jan-Ake Larsson + + * misc.c: Transparent border: '-bd' + + * dvipng.h, set.c: Tiding up + transparent border + + * dvipng.c, font.c: Tidying up + +2002-05-29 Jan-Ake Larsson + + * color.c: Fix cmyk->rgb. + + * misc.c: Add '-fg' and '-bg'. + + * font.c: Tidy up + +2002-05-29 Jan-Ake Larsson + + * dvipng.h: Tidying up, and new global vars + + * io.c: Tidying up + + * papersiz.c: Pagesize matters, adapted from dvips + + * pages.c: Page choosing, from dvips. Not sufficient for our + purposes, but a start + + * dvipng.c, color.c, Makefile, misc.c, set.c: Changed to make + pagesize (-T), offset (-O), page choosing (-pp), and output file + (-o) work. + +2002-05-27 Jan-Ake Larsson + + * pk.c: Changed comments + + * .cvsignore, special.c, set.c, postamble.c, pk.c, misc.c, io.c, + font.c, dvipng.c, color.c, commands.h, dvipng.h: Initial version + + * config.h, Makefile: Initial version, to be replaced by + autoconf'ism + + * klibtool.config, klibtool: Included for now. To be + removed. diff --git a/Build/source/texk/dvipng/dvipng-1.12/INSTALL b/Build/source/texk/dvipng/dvipng-1.12/INSTALL new file mode 100644 index 00000000000..bef302aebd8 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/INSTALL @@ -0,0 +1,168 @@ +Installing dvipng +***************** + +Installing dvipng should be simple: merely `./configure', `make', and +`make install'. + +Prerequisites +============= + + * The GD Graphics Draw library, libgd + + The drawing library `libgd' is necessary, and is downloadable at + `http://www.boutell.com/gd', and there are binary packages for + most operating systems from their respective distributors. In any + case, the latest version of the library installs using `autoconf' + so it should not be difficult for you to install it from source, + and then proceed with installing dvipng. + + * The path-searching library kpathsea + + Kpathsea is most likely included in your LaTeX installation, but it + may happen that ./configure does not find it; see below. If you do + not have it, download it from `http://www.ctan.org' and compile it. + I have no experience with this, so I cannot help much here. + + * The font-rendering library FreeType 2 + + While not strictly necessary, a recent FreeType 2 is recommended + since dvipng currently will produce better-quality images when + this library is available. To take advantage of this, you should + have at least FreeType 2.1.9. + + FreeType 2 will enable direct support for PostScript and TrueType + fonts, so that dvipng will not need to generate bitmapped variants + on disk of the TeX fonts since modern TeX distributions include + PostScript versions of them. Then, you can render images at + different (and unusual) resolutions without cluttering the disk + with lots of bitmapped fonts. + + Finally, it will enable subfont support in dvipng. That is, if you + want to render CJK-LaTeX characters, you must have FreeType 2 + installed. + + * The font-rendering library T1lib + + An alternative to FreeType 2 is T1lib, but this will enable only + PostScript fonts in dvipng and will not include subfont support. + Also here, you can render images at different (and unusual) + resolutions without cluttering the disk with lots of bitmapped + fonts. If both FreeType 2 and T1lib are present, FreeType will be + internally preferred by dvipng but T1lib can be chosen at runtime. + + * libpng and libz + + To be able to compress and write PNG files to disk, dvipng (or + really libgd) uses libpng which in turn uses libz. These should be + available on any modern system, if not, download them and install + them. + + * The `texinfo' package + + This is needed for building the documentation. + +Configure +========= + +The first step is to configure the source code, telling it where +various files will be. To do so, run + + ./configure OPTIONS + + (Note: if you have fetched dvipng from CVS rather than a regular +release, you will have to first generate `./configure' by running +`autoconf' 2.53 or later.) + + On many machines, you will not need to specify any options, but if +`configure' cannot determine something on its own, you'll need to help +it out. For a list of the options type + + ./configure --help + + On some machines, the libraries will be installed in directories that +are not in the linker's search path. This will generate an error when +running `./configure', indicating that it cannot find libgd or +libkpathsea (most likely). You then need to specify the path to the +respective library's object files. They are typically called e.g., +`libgd.a' or `libgd.so'. If they are located in e.g., `/sw/local/lib', +do + + ./configure LDFLAGS=-L/sw/local/lib + + If the library is available as a shared object file (`.so'), the +runtime linker may also need to be told where to find the library, then +use + + ./configure LDFLAGS='-L/sw/local/lib -R/sw/local/lib' + + When either of these is necessary, it is likely that the C header +files are also installed in directories that are not in the C +preprocessor's search path. This will also generate an error when +running `./configure', indicating that it cannot find e.g., `gd.h' or +`kpathsea.h' (most likely). You then need to specify the path to the +respective library's C header files. If they are located in e.g., +`/sw/local/include', do + + ./configure CPPFLAGS=-I/sw/local/include + + On my SUN Solaris workstation, I had to combine this into + + ./configure CPPFLAGS='-I/sw/local/include -I/sw/tex/teTeX/1.0/include'\ + LDFLAGS='-L/sw/local/lib -R/sw/local/lib -L/sw/tex/teTeX/1.0/lib/' + +where the backslash denotes a continuation of the line. + +Build/install +============= + +Once `configure' has been run, simply enter + + make + +at the prompt to compile the C code, and build the documentation files. +To install the files into the locations chosen earlier, type + + make install + +You may need special privileges to install, e.g., if you are installing +into system directories. + +Installation outside the texmf tree +=================================== + +In some cases, a dvipng binary installed outside the texmf tree will +not be able to find virtual fonts, or the PostScript font maps +(normally used by dvips). This may be because _only_ $SELFAUTOLOC, +$SELFAUTODIR, and $SELFAUTOPARENT are used in the texmf tree +configuration file `texmf.cnf'. If so, give the switch +`--enable-selfauto-set' to `./configure'. This will make dvipng adjust +these three internally so that kpathsea thinks that dvipng _is_ +installed in the texmf tree. + +Installation for non-privileged users +===================================== + +Often people without system administration privileges want to install +software for their private use. In that case you need to specify more +options to the `configure' script, usually this is done by using the +`--prefix' option to the `configure' script, and let it point to the +personal home directory. In that way, resulting binaries will be +installed under the `bin' subdirectory of your home directory, manual +pages under `man' and so on. That way, it is reasonably easy to +maintain a bunch of additional packages, since the prefix argument is +supported by most `configure' scripts. + + You'll have to add something like `/home/myself/bin' to your `PATH' +shell variable, if it isn't there already, and similarly set the +`INFOPATH' and `MANPATH' variables to be able to access the +documentation. + +Copying +======= + +This program is released under the GNU Lesser General Public License +version 3, see the COPYING file in the dvipng distribution or +`http://www.gnu.org/licenses/'. + + Copyright (C) 2002-2009 Jan-AAke Larsson + diff --git a/Build/source/texk/dvipng/dvipng-1.12/Makefile.in b/Build/source/texk/dvipng/dvipng-1.12/Makefile.in new file mode 100644 index 00000000000..0e2ce2eaa00 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/Makefile.in @@ -0,0 +1,168 @@ +# Makefile is generated by 'configure' from Makefile.in + +#************************************************************************ +# +# Part of the dvipng distribution +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program. If not, see +# . +# +# Copyright (C) 2002-2008 Jan-Åke Larsson +# +#************************************************************************ + +PACKAGE_STRING="@PACKAGE_STRING@" + +CC = @CC@ +CFLAGS = @CFLAGS@ -Wall +CPPFLAGS = @CPPFLAGS@ -I. +LN_S = @LN_S@ + +LIBS = @LIBS@ +LDFLAGS = @LDFLAGS@ + +srcdir = @srcdir@ +VPATH = @srcdir@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +infodir = @infodir@ +mandir = @mandir@ +DESTDIR= +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = $(srcdir)/mkinstalldirs + +MAKEINFO=@MAKEINFO@ @MAKEINFO_MACROS@ +INSTALL_INFO=@INSTALL_INFO@ +TEX=tex +TEXIDVI=texi2dvi +TEXIHTML=texi2html +DVIPS=dvips +TEXIFILES = dvipng.texi readme.texi install.texi macros.texi dvipng.help + +objects = dvipng.o color.o draw.o dvi.o font.o misc.o pk.o \ + set.o special.o papersiz.o ppagelist.o \ + vf.o @PSFONTS_O@ + +all: dvipng docs + +install: @INSTALL_BIN_TARGET@ @INSTALL_BIN_TARGET@-docs + +####################################### The program + +dvipng: $(objects) + $(CC) $(LDFLAGS) $(objects) -o dvipng $(LIBS) + +$(objects): dvipng.h commands.h config.h + +install-dvipng: dvipng + -$(MKINSTALLDIRS) $(DESTDIR)$(bindir) + $(INSTALL) dvipng $(DESTDIR)$(bindir) + +install-dvigif: install-dvipng + (cd $(DESTDIR)$(bindir) && rm -f dvigif && $(LN_S) dvipng dvigif) + +####################################### The documentation + +docs: dvipng.dvi dvipng.info + +dvipng.dvi: $(TEXIFILES) + -$(TEXIDVI) -I $(srcdir) $(srcdir)/dvipng.texi + +dvipng.ps: dvipng.dvi + $(DVIPS) -Ppdf dvipng.dvi + +dvipng.info: $(TEXIFILES) dvipng.help + -$(MAKEINFO) -I$(srcdir) $(srcdir)/dvipng.texi + +dvipng.help: dvipng + -./dvipng > dvipng.tmp + ( test -r dvipng.help && diff dvipng.tmp dvipng.help ) \ + || cp dvipng.tmp dvipng.help + rm -f dvipng.tmp + +www: $(TEXIFILES) dvipng.help + texi2html -split chapter -nosec-nav -subdir html \ + -I $(srcdir) $(srcdir)/dvipng.texi + (cd html; for i in *; do \ + sed -e "s/Jan-A/Jan-\Å\;/g" $$i > ../www/$$i; \ + done) + cp www/dvipng.html www/index.html + rm -rf html + +dvipng_mono.html: $(TEXIFILES) dvipng.help + texi2html --monolithic -nomenu -nosec_nav -o dvipng_mono.html \ + -I $(srcdir) $(srcdir)/dvipng.texi + +install-docs: docs + -$(MKINSTALLDIRS) $(DESTDIR)$(infodir) + for x in dvipng.info* ; do \ + $(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \ + done + -$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) dvipng.info + -$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1 + $(INSTALL_DATA) $(srcdir)/dvipng.1 $(DESTDIR)$(mandir)/man1 + +install-dvipng-docs: install-docs + +install-dvigif-docs: install-docs + (cd $(DESTDIR)$(mandir)/man1 && rm -f dvigif.1 && $(LN_S) dvipng.1 dvigif.1) + +####################################### The test + +test: test_dvipng.dvi dvipng + ./dvipng -T tight -strict test_dvipng + echo View the result e.g. with xv test_dvipng\*.png + +test_dvipng.dvi: test_dvipng.tex + latex $(srcdir)/test_dvipng.tex + +####################################### The cleaning up + +clean: + rm -f *.o dvipng *.help *.info* *dvipng.dvi *.aux *.log + rm -f *dvipng.ps *.cp *.fn *.ky *~ \#*\# \ + *.tp *.vr *.pg *.toc *.tp *.bak *.cps *.kys *.tps \ + *.fns *.vrs *.pgs *.html *.tmp + +distclean: clean + rm -f Makefile + rm -f config.status config.log config.cache c-auto.h + +####################################### Maintainer targets + +INSTALL: install.texi + -$(MAKEINFO) -D rawfile --no-headers --no-validate \ + --no-number-sections \ + -I$(srcdir) $(srcdir)/install.texi --output INSTALL + +README: readme.texi + -$(MAKEINFO) -D rawfile --no-headers --no-validate \ + --no-number-sections \ + -I$(srcdir) $(srcdir)/readme.texi --output README + +dvipng.1: dvipng.texi readme.texi + texi2pod.pl -D man $(srcdir)/dvipng.texi | \ + sed -es/@//g -es/previewlatex/preview-latex/g -es/{}//g > dvipng.pod + pod2man --center="User commands" --release=$(PACKAGE_STRING)\ + dvipng.pod > dvipng.1 + rm dvipng.pod + +dist: INSTALL README dvipng.1 distclean + +# SunOS make suffix rule wierdness +.cps.h: + diff --git a/Build/source/texk/dvipng/dvipng-1.12/README b/Build/source/texk/dvipng/dvipng-1.12/README new file mode 100644 index 00000000000..da9ba557f4c --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/README @@ -0,0 +1,128 @@ +dvipng +****** + +This program makes PNG and/or GIF graphics from DVI files as obtained +from TeX and its relatives. + + If GIF support is enabled, GIF output is chosen by using the +`dvigif' binary or with the `--gif' option. + + It is intended to produce anti-aliased screen-resolution images as +fast as is possible. The target audience is people who need to generate +and regenerate many images again and again. The primary target is the +preview-latex (X)Emacs package, a package to preview formulas from +within (X)Emacs. Yes, you get to see your formulas in the (X)Emacs +buffer, see `http://www.gnu.org/software/auctex/preview-latex.html'. + + Another example is WeBWorK, an internet-based method for delivering +homework problems to students over the internet, giving students +instant feedback as to whether or not their answers are correct, see +`http://webwork.math.rochester.edu'. + + A more recent addition to the dvipng-using applications out there is +MediaWiki, the software behind Wikipedia and many other wikis out +there. Dvipng is used to render mathematical formulae from version +1.8.0 of MediaWiki, see `http://www.mediawiki.org'. + + Other applications may also benefit, like web applications as +latex2html and WYSIWYG editors like LyX. + +Benefits of dvipng +================== + + The benefits of `dvipng'/`dvigif' include + + * Speed. It is a very fast bitmap-rendering code for DVI files, which + makes it suitable for generating large amounts of images + on-the-fly, as needed in preview-latex, WeBWorK and others. + + * It does not read the postamble, so it can be started before TeX + finishes. There is a `--follow' switch that makes dvipng wait at + end-of-file for further output, unless it finds the POST marker + that indicates the end of the DVI. + + * Interactive query of options. dvipng can read options interactively + through stdin, and all options are usable. It is even possible to + change the input file through this interface. + + * Supports PK, VF, PostScript Type1, and TrueType fonts, subfonts + (i.e., as used in CJK-LaTeX), color specials, and inclusion of + PostScript, PNG, JPEG or GIF images. + + * and more... + + +Installation +============ + +Read `INSTALL', included in the distribution. + +Usage +===== + +To use dvipng at its simplest, simply type + + dvipng foo + +where `foo.dvi' is the output of TeX that you want to convert to PNG +format. If there are four pages in `foo.dvi', those pages will be +output as `foo1.png', `foo2.png', `foo3.png', and `foo4.png', +respectively. + + Many options are available (see the info manual). For a brief +summary of available options, just type + + dvipng --help + +Availability +============ + +The dvipng package is available at Savannah, the GNU project site. Since +dvipng is not part of the GNU project, although released under the GNU +GPL, the web address is `http://savannah.nongnu.org/projects/dvipng'. +Instructions for anonymous CVS access can be found at +`http://savannah.nongnu.org/cvs/?group=dvipng'. + +Contacts +======== + +Bug reports should be sent to . + + Questions, suggestions for new features, pleas for help, and/or +praise should go to . For more information on this +mailing list, send a message with just the word `help' as subject or +body to or look at +`http://lists.nongnu.org/mailman/listinfo/dvipng'. + + Offers to support further development will be appreciated. For +developer access, ask on . + +Copying +======= + +This program is released under the GNU Lesser General Public License +version 3, see the COPYING file in the dvipng distribution or +`http://www.gnu.org/licenses/'. + + Copyright (C) 2002-2009 Jan-AAke Larsson + +Todo +==== + + * Use gs interpreter library for speed and possibly for + functionality. + + * Add more color models for xcolor compatibility + + * Fix T1lib and PK rendering so it is on par with Freetype. + + * Enable a named pipe as DVI + + * Further speed improvements. + + * Other output specials and source specials. + + * Clean internal structures. Overhaul file handling. + + * Fix the SELFAUTO stuff at runtime rather than at build time + diff --git a/Build/source/texk/dvipng/dvipng-1.12/RELEASE b/Build/source/texk/dvipng/dvipng-1.12/RELEASE new file mode 100644 index 00000000000..95decb747c3 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/RELEASE @@ -0,0 +1,22 @@ +Release notes for version 1.12 of the dvipng package: + +This program makes PNG graphics from DVI files as obtained from TeX +and its relatives. + + +The main code addition in v 1.12 is to allow usage of recent versions +of the xcolor package, which also will reenable much of the PSTricks +package. + +Still it is the case that dvipng can only handle drawing PostScript +code at the moment, not PostScript code intended to make dvips + gs +scale, rotate, or move DVI glyphs (characters). This is because the +graphics state cannot be communicated back to dvipng from gs. So no +guarantees. Also, the performance in terms of runtime could be better. + +Other changes include a fix for inclusion of bitmaps with transparent +background and a typo in the file-handling code on machines that do +not have mmap. + + +Report any bugs you find, see README for instructions. diff --git a/Build/source/texk/dvipng/dvipng-1.12/aclocal.m4 b/Build/source/texk/dvipng/dvipng-1.12/aclocal.m4 new file mode 100644 index 00000000000..0cd4eddf92e --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/aclocal.m4 @@ -0,0 +1,237 @@ +# aclocal.m4 generated automatically by aclocal 1.6.3 -*- 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. + +# Configure paths for FreeType2 +# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor + +dnl AC_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS +dnl +AC_DEFUN(AC_CHECK_FT2, +[dnl +dnl Get the cflags and libraries from the freetype-config script +dnl +AC_ARG_WITH(ft-prefix, +[ --with-ft-prefix=PREFIX + Prefix where FreeType is installed (optional)], + ft_config_prefix="$withval", ft_config_prefix="") +AC_ARG_WITH(ft-exec-prefix, +[ --with-ft-exec-prefix=PREFIX + Exec prefix where FreeType is installed (optional)], + ft_config_exec_prefix="$withval", ft_config_exec_prefix="") +AC_ARG_ENABLE(freetypetest, +[ --disable-freetypetest Do not try to compile and run + a test FreeType program], + [], enable_fttest=yes) + +if test x$ft_config_exec_prefix != x ; then + ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" + if test x${FT2_CONFIG+set} != xset ; then + FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config + fi +fi +if test x$ft_config_prefix != x ; then + ft_config_args="$ft_config_args --prefix=$ft_config_prefix" + if test x${FT2_CONFIG+set} != xset ; then + FT2_CONFIG=$ft_config_prefix/bin/freetype-config + fi +fi +AC_PATH_PROG(FT2_CONFIG, freetype-config, no) + +min_ft_version=ifelse([$1], ,6.1.0,$1) +AC_MSG_CHECKING(for FreeType - version >= $min_ft_version) +no_ft="" +if test "$FT2_CONFIG" = "no" ; then + no_ft=yes +else + FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` + FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` + ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + ft_min_major_version=`echo $min_ft_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + ft_min_minor_version=`echo $min_ft_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + ft_min_micro_version=`echo $min_ft_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test x$enable_fttest = xyes ; then + ft_config_is_lt="" + if test $ft_config_major_version -lt $ft_min_major_version ; then + ft_config_is_lt=yes + else + if test $ft_config_major_version -eq $ft_min_major_version ; then + if test $ft_config_minor_version -lt $ft_min_minor_version ; then + ft_config_is_lt=yes + else + if test $ft_config_minor_version -eq $ft_min_minor_version ; then + if test $ft_config_micro_version -lt $ft_min_micro_version ; then + ft_config_is_lt=yes + fi + fi + fi + fi + fi + if test x$ft_config_is_lt = xyes ; then + no_ft=yes + else + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $FT2_CFLAGS" + LIBS="$FT2_LIBS $LIBS" +dnl +dnl Sanity checks for the results of freetype-config to some extent +dnl + AC_TRY_RUN([ +#include +#include FT_FREETYPE_H +#include +#include + +int +main() +{ + FT_Library library; + FT_Error error; + + error = FT_Init_FreeType(&library); + + if (error) + return 1; + else + { + FT_Done_FreeType(library); + return 0; + } +} +],, no_ft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi # test $ft_config_version -lt $ft_min_version + fi # test x$enable_fttest = xyes +fi # test "$FT2_CONFIG" = "no" +if test x$no_ft = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) + if test "$FT2_CONFIG" = "no" ; then + echo "*** The freetype-config script installed by FreeType 2 could not be found." + echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the FT2_CONFIG environment variable to the" + echo "*** full path to freetype-config." + else + if test x$ft_config_is_lt = xyes ; then + echo "*** Your installed version of the FreeType 2 library is too old." + echo "*** If you have different versions of FreeType 2, make sure that" + echo "*** correct values for --with-ft-prefix or --with-ft-exec-prefix" + echo "*** are used, or set the FT2_CONFIG environment variable to the" + echo "*** full path to freetype-config." + else + echo "*** The FreeType test program failed to run. If your system uses" + echo "*** shared libraries and they are installed outside the normal" + echo "*** system library path, make sure the variable LD_LIBRARY_PATH" + echo "*** (or whatever is appropiate for your system) is correctly set." + fi + fi + FT2_CFLAGS="" + FT2_LIBS="" + ifelse([$3], , :, [$3]) +fi +AC_SUBST(FT2_CFLAGS) +AC_SUBST(FT2_LIBS) +]) + + +dnl +dnl MAKEINFO_CHECK_MACRO( MACRO, [ACTION-IF-FOUND +dnl [, ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN(MAKEINFO_CHECK_MACRO, +[if test -n "$MAKEINFO" -a "$makeinfo" != ":"; then + AC_MSG_CHECKING([for @$1{}]) + echo \\\\input texinfo > conftest.texi + echo @$1{test} >> conftest.texi + if $MAKEINFO conftest.texi > /dev/null 2> /dev/null; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + ifelse([$3], , :, [$3]) + fi + rm -f conftest.texi conftest.info +fi +]) + +dnl +dnl MAKEINFO_CHECK_MACROS( MACRO ... [, ACTION-IF-FOUND +dnl [, ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN(MAKEINFO_CHECK_MACROS, +[for ac_macro in $1; do + MAKEINFO_CHECK_MACRO($ac_macro, $2, + [MAKEINFO_MACROS="-D no-$ac_macro $MAKEINFO_MACROS" + $3])dnl + done +AC_SUBST(MAKEINFO_MACROS) +]) + + +dnl +dnl Check for enc, cmap, sfd formats +dnl +AC_DEFUN(AC_HAS_KPSE_ENC_FORMATS, + [AC_MSG_CHECKING([for kpse_enc_format]) + AC_TRY_COMPILE([ + #include + #include ], + [kpse_enc_format;kpse_cmap_format;kpse_sfd_format], + [AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KPSE_ENC_FORMATS, 1, + [Define to 1 if your kpathsea has kpse_enc_format])], + [AC_MSG_RESULT(no)])]) + + +dnl +dnl Check devices for GS +dnl AC_GS_HAS_DEVICE(DEVICE,ACTION-IF-FAILED) +dnl +AC_DEFUN(AC_GS_HAS_DEVICE, + [AC_MSG_CHECKING([whether $GS has the $1 device]) + if $GS -h | grep $1 >/dev/null; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + $2 + fi +]) + +dnl +dnl GS_CHECK_DEVICES +dnl +AC_DEFUN(GS_CHECK_DEVICES, + [GS_WARN="" + AC_GS_HAS_DEVICE(pngalpha, + [GS_WARN="Your EPS inclusions will be cropped to the + boundingbox, and rendered on an opaque background. + Upgrade GhostScript to avoid this." + AC_GS_HAS_DEVICE(png16m, + [GS_WARN="Your EPS inclusions may not work. + Upgrade/install GhostScript to avoid this."])]) + if test -n "$GS_WARN"; then + AC_MSG_WARN([$GS_WARN]) + fi +]) diff --git a/Build/source/texk/dvipng/dvipng-1.12/color.c b/Build/source/texk/dvipng/dvipng-1.12/color.c new file mode 100644 index 00000000000..a1a302fa8e4 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/color.c @@ -0,0 +1,438 @@ +/* color.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" +#ifdef HAVE_ALLOCA_H +# include +#endif + +/* + * Color. We delete and recreate the gdImage for each new page. This + * means that the stack must contain rgb value not color index. + * Besides, the current antialiasing implementation needs rgb anyway. +*/ + +struct colorname { + struct colorname *next; + char* color; + char name[1]; +} *colornamep=NULL,*xcp=NULL; + +const char *colordef[]={"xcolor.sty","dvipsnam.def", + "svgnam.def","x11nam.def",NULL}; +char *xcpname=NULL; + +void initcolor(void) +{ + csp = 1; + cstack[0].red=255; + cstack[0].green=255; + cstack[0].blue=255; + cstack[1].red=0; + cstack[1].green=0; + cstack[1].blue=0; +} + +static struct colorname * NewColor(const char* prefix, int nprefix, + char* name, int nname, + char* model, int nmodel, + char* values, int nvalues) +{ + struct colorname *tmp = + malloc(sizeof(struct colorname)+3+nprefix+nname+nmodel+nvalues); + if (tmp==NULL) + Fatal("Cannot allocate space for color name"); + tmp->color=tmp->name+nprefix+nname+1; + strncpy(tmp->name,prefix,nprefix); + strncpy(tmp->name+nprefix,name,nname); + tmp->name[nprefix+nname]='\0'; + strncpy(tmp->color,model,nmodel); + tmp->color[nmodel]=' '; + strncpy(tmp->color+nmodel+1,values,nvalues); + tmp->color[nmodel+nvalues+1]='\0'; + model=tmp->color; + while(*model!='\0') { + if (*model==',') + *model=' '; + model++; + } + DEBUG_PRINT(DEBUG_COLOR,("\n COLOR NAME:\t'%s' '%s'", + tmp->name,tmp->color)); + return(tmp); +} + +#define FINDWORD(s) while(snext=list; + list=tmp; + } else if ((pos+15next=list; + list=tmp; + FINDWORD(pos); + } + } else { + pos++; + while (posnext; + free(xcp); + xcp=next; + } + if (xcpname!=NULL) { + free(xcpname); + xcpname=NULL; + } +} + +void ClearColorNames(void) +{ + struct colorname *next; + while (colornamep) { + next=colornamep->next; + free(colornamep); + colornamep=next; + } + ClearXColorPrologue(); +} + +void InitXColorPrologue(const char* name) +{ + ClearXColorPrologue(); + xcpname=malloc(strlen(name)+1); + if (xcpname==NULL) + Fatal("cannot malloc memory for xcolor prologue name"); + strcpy(xcpname,name); +} + +static struct colorname* LoadXColorPrologue(void) +{ + struct colorname *list=NULL,*tmp=NULL; + char *filepath,*pos,*max; + const char *prefix=""; + char *name,*values,*model; + int nprefix=0,nname,nvalues,nmodel; + struct filemmap fmmap; + + TEMPSTR(filepath,kpse_find_file(xcpname,kpse_program_text_format,false)); + if (filepath == NULL) + return NULL; + DEBUG_PRINT(DEBUG_COLOR,("\n OPEN XCOLOR PROLOGUE:\t'%s'", filepath)); + if (MmapFile(filepath,&fmmap)) return NULL; + pos=fmmap.data; + max=fmmap.data+fmmap.size; + while(posnext=list; + list=tmp; + } + } + UnMmapFile(&fmmap); + return(list); +} + +#define FTO255(a) ((int) (255*a+0.5)) +#define WARN_IF_FAILED(a,b) if (a==b) { page_flags |= PAGE_GAVE_WARN; \ + Warning("missing color-specification value, treated as zero"); } + +#define SKIPSPACES(s) while(s && *s==' ' && *s!='\0') s++ +#define NEXTFLOAT255(c) FTO255(strtod(c,&end)); WARN_IF_FAILED(c,end); c=end +#define NEXTFLOAT(c) strtod(c,&end); WARN_IF_FAILED(c,end); c=end +#define NEXTINT(c) strtol(c,&end,10); WARN_IF_FAILED(c,end); c=end +#define NEXTHEX(c) strtol(c,&end,16); WARN_IF_FAILED(c,end); c=end + +void stringrgb(const char* color,int *r,int *g,int *b) +{ + char* end; + static int unloaded=1; + + DEBUG_PRINT(DEBUG_COLOR,("\n COLOR SPEC:\t'%s' (",color)); + SKIPSPACES(color); + if (strcmp(color,"Black")==0) { + *r = *g = *b = 0; + } else if (strcmp(color,"White")==0) { + *r = *g = *b = 255; + } else if (strncmp(color,"gray ",5)==0) { + color+=5; + *r = *g = *b = NEXTFLOAT255(color); + } else if (strncmp(color,"rgb ",4)==0) { + color+=4; + *r = NEXTFLOAT255(color); + *g = NEXTFLOAT255(color); + *b = NEXTFLOAT255(color); + } else if (strncmp(color,"Gray ",5)==0) { + color+=5; + *r = *g = *b = NEXTINT(color); + } else if (strncmp(color,"RGB ",4)==0) { + color+=4; + *r = NEXTINT(color); + *g = NEXTINT(color); + *b = NEXTINT(color); + } else if (strncmp(color,"HTML ",5)==0) { + color+=5; + *b = NEXTHEX(color); + *r = *b/65536; + *g = *b/256; + *b -= *g*256; + *g -= *r*256; + } else if (strncmp(color,"cmy ",4)==0 + || strncmp(color,"cmyk ",5)==0) { + int c,m,y,k; + color+=3; + k=(*color=='k'); + if (k) + color++; + c = NEXTFLOAT255(color); + m = NEXTFLOAT255(color); + y = NEXTFLOAT255(color); + if (k) + k = NEXTFLOAT255(color); + *r = c+k<255 ? 255-(c+k) : 0; + *g = m+k<255 ? 255-(m+k) : 0; + *b = y+k<255 ? 255-(y+k) : 0; + } else if (strncmp(color,"hsb ",4)==0 + || strncmp(color,"HSB ",4)==0) { + /* The hsb and HSB models really need more presicion. + Use double and convert back*/ + double hu,sa,br,f,R,G,B; + int i; + if (*color=='h') { + color+=4; + hu = NEXTFLOAT(color); + sa = NEXTFLOAT(color); + br = NEXTFLOAT(color); + } else { + color+=4; + hu = (float)NEXTINT(color); hu /= 255; + sa = (float)NEXTINT(color); sa /= 255; + br = (float)NEXTINT(color); br /= 255; + } + i=6*hu; + f=6*hu-i; + switch(i) { + case 0: + R = br*(1-sa*0); G = br*(1-sa*(1-f)); B = br*(1-sa*1); break; + case 1: + R = br*(1-sa*f); G = br*(1-sa*0); B = br*(1-sa*1); break; + case 2: + R = br*(1-sa*1); G = br*(1-sa*0); B = br*(1-sa*(1-f)); break; + case 3: + R = br*(1-sa*1); G = br*(1-sa*f); B = br*(1-sa*0); break; + case 4: + R = br*(1-sa*(1-f)); G = br*(1-sa*1); B = br*(1-sa*0); break; + case 5: + R = br*(1-sa*0); G = br*(1-sa*1); B = br*(1-sa*f); break; + default: + R = br*(1-sa*0); G = br*(1-sa*1); B = br*(1-sa*1); + } + *r=FTO255(R); + *g=FTO255(G); + *b=FTO255(B); + } else { + /* Model not found, probably a color name */ + struct colorname *tmp; + + if (xcp==NULL && xcpname!=NULL) + xcp=LoadXColorPrologue(); + tmp=xcp; + while(tmp!=NULL && strcmp(color,tmp->name)!=0) + tmp=tmp->next; + if (tmp==NULL) { + if (colornamep==NULL) + colornamep=LoadColornameFile(colordef[0]); + tmp=colornamep; + while((tmp->next!=NULL || colordef[unloaded]!=NULL) + && strcmp(color,tmp->name)!=0) { + if (tmp->next==NULL) + tmp->next=LoadColornameFile(colordef[unloaded++]); + tmp=tmp->next; + } + } + if (strcmp(color,tmp->name)==0) { + /* Found: one-level recursion */ + DEBUG_PRINT(DEBUG_COLOR,("\n ---RECURSION--- ")) + stringrgb(tmp->color,r,g,b); + } else { + /* Not found, warn */ + page_flags |= PAGE_GAVE_WARN; + Warning("unimplemented color specification '%s'",color); + } + } + DEBUG_PRINT(DEBUG_COLOR,("%d %d %d) ",*r,*g,*b)) +} + +void background(const char* p) +{ + stringrgb(p, &cstack[0].red, &cstack[0].green, &cstack[0].blue); + DEBUG_PRINT(DEBUG_COLOR,("\n BACKGROUND:\t(%d %d %d) ", + cstack[0].red, cstack[0].green, cstack[0].blue)); +} + +void pushcolor(const char * p) +{ + if ( ++csp == STACK_SIZE ) + Fatal("out of color stack space") ; + stringrgb(p, &cstack[csp].red, &cstack[csp].green, &cstack[csp].blue); + DEBUG_PRINT(DEBUG_COLOR,("\n COLOR PUSH:\t(%d %d %d) ", + cstack[csp].red, cstack[csp].green, cstack[csp].blue)) +} + +void popcolor(void) +{ + if (csp > 1) csp--; /* Last color is global */ + DEBUG_PRINT(DEBUG_COLOR,("\n COLOR POP\t")) +} + +void resetcolorstack(const char * p) +{ + if ( csp > 1 ) + Warning("global color change within nested colors"); + csp=0; + pushcolor(p) ; + DEBUG_PRINT(DEBUG_COLOR,("\n RESET COLOR:\tbottom of stack:")) +} + +void StoreColorStack(struct page_list *tpagep) +{ + int i=0; + + DEBUG_PRINT(DEBUG_COLOR,("\n STORE COLOR STACK:\t %d ", csp)); + tpagep->csp=csp; + while ( i <= csp ) { + DEBUG_PRINT(DEBUG_COLOR,("\n COLOR STACK:\t %d (%d %d %d) ",i, + cstack[i].red, cstack[i].green, cstack[i].blue)); + tpagep->cstack[i].red = cstack[i].red; + tpagep->cstack[i].green = cstack[i].green; + tpagep->cstack[i].blue = cstack[i].blue; + i++; + } +} + +void ReadColorStack(struct page_list *tpagep) +{ + int i=0; + + DEBUG_PRINT(DEBUG_COLOR,("\n READ COLOR STACK:\t %d ", tpagep->csp)); + csp=tpagep->csp; + while ( i <= tpagep->csp ) { + DEBUG_PRINT(DEBUG_COLOR,("\n COLOR STACK:\t %d (%d %d %d) ",i, + cstack[i].red, cstack[i].green, cstack[i].blue)); + cstack[i].red = tpagep->cstack[i].red; + cstack[i].green = tpagep->cstack[i].green; + cstack[i].blue = tpagep->cstack[i].blue; + i++; + } +} + +void StoreBackgroundColor(struct page_list *tpagep) +{ + /* Background color changes affect the _whole_ page */ + tpagep->cstack[0].red = cstack[0].red; + tpagep->cstack[0].green = cstack[0].green; + tpagep->cstack[0].blue = cstack[0].blue; +} diff --git a/Build/source/texk/dvipng/dvipng-1.12/commands.h b/Build/source/texk/dvipng/dvipng-1.12/commands.h new file mode 100644 index 00000000000..e2a5404bb32 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/commands.h @@ -0,0 +1,196 @@ +/* commands.h */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +/* DVI COMMANDS */ +#define DVIFORMAT 2 + +#define SETC_000 0 /* typeset character 0 and move right */ +#define SETC_127 127 /* typeset character 127 and move right */ +#define SET1 128 /* typeset a character and move right */ +#define SET2 129 /* ??? */ +#define SET3 130 /* ??? */ +#define SET4 131 /* ??? */ +#define SET_RULE 132 /* typeset a rule and move right */ +#define PUT1 133 /* typeset a character */ +#define PUT2 134 /* ??? */ +#define PUT3 135 /* ??? */ +#define PUT4 136 /* ??? */ +#define PUT_RULE 137 /* typeset a rule */ +#define NOP 138 /* no operation */ +#define BOP 139 /* beginning of page */ +#define EOP 140 /* ending of page */ +#define PUSH 141 /* save the current positions */ +#define POP 142 /* restore previous positions */ +#define RIGHT1 143 /* move right */ +#define RIGHT2 144 /* ??? */ +#define RIGHT3 145 /* ??? */ +#define RIGHT4 146 /* ??? */ +#define W0 147 /* move right by |w| */ +#define W1 148 /* move right and set |w| */ +#define W2 149 /* ??? */ +#define W3 150 /* ??? */ +#define W4 151 /* ??? */ +#define X0 152 /* move right by |x| */ +#define X1 153 /* move right and set |x| */ +#define X2 154 /* ??? */ +#define X3 155 /* ??? */ +#define X4 156 /* ??? */ +#define DOWN1 157 /* move down */ +#define DOWN2 158 /* ??? */ +#define DOWN3 159 /* ??? */ +#define DOWN4 160 /* ??? */ +#define Y0 161 /* move down by |y| */ +#define Y1 162 /* move down and set |y| */ +#define Y2 163 /* ??? */ +#define Y3 164 /* ??? */ +#define Y4 165 /* ??? */ +#define Z0 166 /* move down by |z| */ +#define Z1 167 /* move down and set |z| */ +#define Z2 168 /* ??? */ +#define Z3 169 /* ??? */ +#define Z4 170 /* ??? */ +#define FONT_00 171 /* set current font to 0 */ +#define FONT_63 234 /* set current font to 63 */ +#define FNT1 235 /* set current font */ +#define FNT2 236 /* Same as FNT1, except that arg is 2 bytes */ +#define FNT3 237 /* Same as FNT1, except that arg is 3 bytes */ +#define FNT4 238 /* Same as FNT1, except that arg is 4 bytes */ +#define XXX1 239 /* extension to \.DVI primitives */ +#define XXX2 240 /* Like XXX1, but 0<=k<65536 */ +#define XXX3 241 /* Like XXX1, but 0<=k<@t$2^{24}$@> */ +#define XXX4 242 /* potentially long extension to \.DVI + primitives */ +#define FNT_DEF1 243 /* define the meaning of a font number */ +#define FNT_DEF2 244 /* ??? */ +#define FNT_DEF3 245 /* ??? */ +#define FNT_DEF4 246 /* ??? */ +#define PRE 247 /* preamble */ +#define POST 248 /* postamble beginning */ +#define POST_POST 249 /* postamble ending */ + +/* undefined_commands 250,251,252,253,254,255 */ + +EXTERN const int8_t dvi_commandlength[256] +#ifdef MAIN +={ + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1, /* SETC_000 --- SETC_127 */ + 2,3,4,5,9, /* SET1 --- SET4, SET_RULE */ + 2,3,4,5,9, /* PUT1 --- PUT4, PUT_RULE */ + 1,45,1,1,1, /* NOP, BOP, EOP, PUSH, POP */ + 2,3,4,5, /* RIGHT1 --- RIGHT4 */ + 1,2,3,4,5, /* W0 --- W4 */ + 1,2,3,4,5, /* X0 --- X4 */ + 2,3,4,5, /* DOWN1 --- DOWN4 */ + 1,2,3,4,5, /* Y0 --- Y4 */ + 1,2,3,4,5, /* Z0 --- Z4 */ + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1, + 1,1,1,1, /* FONT_00 --- FONT_63 */ + 2,3,4,5, /* FNT1 --- FNT4 */ + 2,3,4,5, /* XXX1 --- XXX4 + special string */ + 16,17,18,19, /* FNT_DEF1 --- FNT_DEF4 + font name */ + 15, /* PRE + TeX comment */ + 29, /* POST */ + 10, /* POST_POST minimum */ + -1,-1,-1,-1,-1,-1 /* undefined */ +} +#endif +; + +EXTERN const char* dvi_commands[256] +#ifdef MAIN +={ +"SETC_000","SETC_001","SETC_002","SETC_003","SETC_004", +"SETC_005","SETC_006","SETC_007","SETC_008","SETC_009", +"SETC_010","SETC_011","SETC_012","SETC_013","SETC_014", +"SETC_015","SETC_016","SETC_017","SETC_018","SETC_019", +"SETC_020","SETC_021","SETC_022","SETC_023","SETC_024", +"SETC_025","SETC_026","SETC_027","SETC_028","SETC_029", +"SETC_030","SETC_031","SETC_032","SETC_033","SETC_034", +"SETC_035","SETC_036","SETC_037","SETC_038","SETC_039", +"SETC_040","SETC_041","SETC_042","SETC_043","SETC_044", +"SETC_045","SETC_046","SETC_047","SETC_048","SETC_049", +"SETC_050","SETC_051","SETC_052","SETC_053","SETC_054", +"SETC_055","SETC_056","SETC_057","SETC_058","SETC_059", +"SETC_060","SETC_061","SETC_062","SETC_063","SETC_064", +"SETC_065","SETC_066","SETC_067","SETC_068","SETC_069", +"SETC_070","SETC_071","SETC_072","SETC_073","SETC_074", +"SETC_075","SETC_076","SETC_077","SETC_078","SETC_079", +"SETC_080","SETC_081","SETC_082","SETC_083","SETC_084", +"SETC_085","SETC_086","SETC_087","SETC_088","SETC_089", +"SETC_090","SETC_091","SETC_092","SETC_093","SETC_094", +"SETC_095","SETC_096","SETC_097","SETC_098","SETC_099", +"SETC_100","SETC_101","SETC_102","SETC_103","SETC_104", +"SETC_105","SETC_106","SETC_107","SETC_108","SETC_109", +"SETC_110","SETC_111","SETC_112","SETC_113","SETC_114", +"SETC_115","SETC_116","SETC_117","SETC_118","SETC_119", +"SETC_120","SETC_121","SETC_122","SETC_123","SETC_124", +"SETC_125","SETC_126","SETC_127", +"SET1","SET2","SET3","SET4","SET_RULE", +"PUT1","PUT2","PUT3","PUT4","PUT_RULE", +"NOP","BOP","EOP","PUSH","POP", +"RIGHT1","RIGHT2","RIGHT3","RIGHT4", +"W0","W1","W2","W3","W4", +"X0","X1","X2","X3","X4", +"DOWN1","DOWN2","DOWN3","DOWN4", +"Y0","Y1","Y2","Y3","Y4", +"Z0","Z1","Z2","Z3","Z4", +"FONT_00","FONT_01","FONT_02","FONT_03","FONT_04", +"FONT_05","FONT_06","FONT_07","FONT_08","FONT_09", +"FONT_10","FONT_11","FONT_12","FONT_13","FONT_14", +"FONT_15","FONT_16","FONT_17","FONT_18","FONT_19", +"FONT_20","FONT_21","FONT_22","FONT_23","FONT_24", +"FONT_25","FONT_26","FONT_27","FONT_28","FONT_29", +"FONT_30","FONT_31","FONT_32","FONT_33","FONT_34", +"FONT_35","FONT_36","FONT_37","FONT_38","FONT_39", +"FONT_40","FONT_41","FONT_42","FONT_43","FONT_44", +"FONT_45","FONT_46","FONT_47","FONT_48","FONT_49", +"FONT_50","FONT_51","FONT_52","FONT_53","FONT_54", +"FONT_55","FONT_56","FONT_57","FONT_58","FONT_59", +"FONT_60","FONT_61","FONT_62","FONT_63", +"FNT1","FNT2","FNT3","FNT4", +"XXX1","XXX2","XXX3","XXX4", +"FNT_DEF1","FNT_DEF2","FNT_DEF3","FNT_DEF4", +"PRE","POST","POST_POST", +"UNDEF_250","UNDEF_251","UNDEF_252","UNDEF_253","UNDEF_254","UNDEF_255" +} +#endif +; + diff --git a/Build/source/texk/dvipng/dvipng-1.12/config.h.in b/Build/source/texk/dvipng/dvipng-1.12/config.h.in new file mode 100644 index 00000000000..9906c92971d --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/config.h.in @@ -0,0 +1,247 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END + +/* Define to 1 if using `alloca.c'. */ +#undef C_ALLOCA + +/* Define as 1 to get the debug (-d) option. */ +#undef DEBUG + +/* The environment setting for $SELFAUTODIR */ +#undef ENV_SELFAUTODIR + +/* The environment setting for $SELFAUTOLOC */ +#undef ENV_SELFAUTOLOC + +/* The environment setting for $SELFAUTOPARENT */ +#undef ENV_SELFAUTOPARENT + +/* Define as the path to GhostScript. */ +#undef GS_PATH + +/* Define to 1 if you have `alloca', as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#undef HAVE_ALLOCA_H + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* Define to 1 if you have the `dup2' function. */ +#undef HAVE_DUP2 + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK + +/* Define to 1 if you have freetype2 */ +#undef HAVE_FT2 + +/* Define to 1 if you have the `ftime' function. */ +#undef HAVE_FTIME + +/* Define to 1 if you have the `FT_Library_Version' function. */ +#undef HAVE_FT_LIBRARY_VERSION + +/* Define to 1 if you have the `gdImageCreateFromJpeg' function. */ +#undef HAVE_GDIMAGECREATEFROMJPEG + +/* Define to 1 if you have the `gdImageCreateFromPngPtr' function. */ +#undef HAVE_GDIMAGECREATEFROMPNGPTR + +/* Define to 1 if you have the `gdImageCreateTrueColor' function. */ +#undef HAVE_GDIMAGECREATETRUECOLOR + +/* Define to 1 if you have the `gdImageGif' function. */ +#undef HAVE_GDIMAGEGIF + +/* Define to 1 if you have the `gdImagePngEx' function. */ +#undef HAVE_GDIMAGEPNGEX + +/* Define to 1 if you have the header file. */ +#undef HAVE_GD_H + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_KPATHSEA_KPATHSEA_H + +/* Define to 1 if your kpathsea has kpse_enc_format */ +#undef HAVE_KPSE_ENC_FORMATS + +/* Define to 1 if you have the `gd' library (-lgd). */ +#undef HAVE_LIBGD + +/* Define to 1 if you have the `gen' library (-lgen). */ +#undef HAVE_LIBGEN + +/* Define to 1 if you have the `kpathsea' library (-lkpathsea). */ +#undef HAVE_LIBKPATHSEA + +/* Define to 1 if you have the `m' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the `png' library (-lpng). */ +#undef HAVE_LIBPNG + +/* Define to 1 if you have the `t1' library (-lt1). */ +#undef HAVE_LIBT1 + +/* Define to 1 if you have the `z' library (-lz). */ +#undef HAVE_LIBZ + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#undef HAVE_MALLOC + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the `munmap' function. */ +#undef HAVE_MUNMAP + +/* Define to 1 if you have the header file. */ +#undef HAVE_PNG_H + +/* Define to 1 if you have the `pow' function. */ +#undef HAVE_POW + +/* Define to 1 if you have the `putenv' function. */ +#undef HAVE_PUTENV + +/* Define to 1 if stdbool.h conforms to C99. */ +#undef HAVE_STDBOOL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strrchr' function. */ +#undef HAVE_STRRCHR + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if you have the `strtol' function. */ +#undef HAVE_STRTOL + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_T1LIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK + +/* Define to 1 if you have the header file. */ +#undef HAVE_VFORK_H + +/* Define to 1 if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + +/* Define to 1 if `fork' works. */ +#undef HAVE_WORKING_FORK + +/* Define to 1 if `vfork' works. */ +#undef HAVE_WORKING_VFORK + +/* Define to 1 if the system has the type `_Bool'. */ +#undef HAVE__BOOL + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define as 1 to get execution time output. */ +#undef TIMING + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `long long' if does not define it. */ +#undef int64_t + +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to `unsigned int' if does not define. */ +#undef size_t + +/* Define to `unsigned long long' if does not define it. */ +#undef uint64_t + +/* Define as `fork' if `vfork' does not work. */ +#undef vfork diff --git a/Build/source/texk/dvipng/dvipng-1.12/configure b/Build/source/texk/dvipng/dvipng-1.12/configure new file mode 100755 index 00000000000..9a4629ef972 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/configure @@ -0,0 +1,9197 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for dvipng 1.12. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='dvipng' +PACKAGE_TARNAME='dvipng' +PACKAGE_VERSION='1.12' +PACKAGE_STRING='dvipng 1.12' +PACKAGE_BUGREPORT='dvipng@nongnu.org' + +ac_unique_file="dvipng.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +SET_MAKE +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +LN_S +GS +PSFONTS_O +CPP +GREP +EGREP +FT2_CONFIG +FT2_CFLAGS +FT2_LIBS +ALLOCA +LIBOBJS +POW_LIB +INSTALL_BIN_TARGET +MAKEINFO +MAKEINFO_MACROS +INSTALL_INFO +KPSEWHICH +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures dvipng 1.12 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/dvipng] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of dvipng 1.12:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-debug Compile without debug (-d) option + --enable-timing Output execution time of dvipng + --disable-freetypetest Do not try to compile and run + a test FreeType program + --enable-selfauto-set This option will make the final binary explicitly + set the $SELFAUTO... variables to make it look as + dvipng is installed in the main texmf tree, even if + it isn't. This is necessary when texmf.cnf only uses + $SELFAUTO... variables and dvipng is not installed + in the texmf tree. Otherwise, dvipng may not be able + to find virtual fonts, or psfonts.map. To find out, + first build the binary and do 'make test'. If the + test fails, you need this switch. + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gs=/PATH/TO/gs Hard-wire the location of GhostScript + --with-ft-prefix=PREFIX + Prefix where FreeType is installed (optional) + --with-ft-exec-prefix=PREFIX + Exec prefix where FreeType is installed (optional) + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +dvipng configure 1.12 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by dvipng $as_me 1.12, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; if test "$enableval" = yes ; then + +cat >>confdefs.h <<\_ACEOF +#define DEBUG 1 +_ACEOF + + fi +else + enable_debug="yes"; + +cat >>confdefs.h <<\_ACEOF +#define DEBUG 1 +_ACEOF + +fi + +# Check whether --enable-timing was given. +if test "${enable_timing+set}" = set; then + enableval=$enable_timing; if test "$enableval" = yes ; then + +cat >>confdefs.h <<\_ACEOF +#define TIMING 1 +_ACEOF + + fi +fi + + +# Checks for programs. +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + + +# Check whether --with-gs was given. +if test "${with_gs+set}" = set; then + withval=$with_gs; if test "x$withval" != xno ; then + # Extract the first word of ""$withval"", so it can be a program name with args. +set dummy "$withval"; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GS in + [\\/]* | ?:[\\/]*) + ac_cv_path_GS="$GS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GS="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +GS=$ac_cv_path_GS +if test -n "$GS"; then + { echo "$as_me:$LINENO: result: $GS" >&5 +echo "${ECHO_T}$GS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + +cat >>confdefs.h <<_ACEOF +#define GS_PATH "$GS" +_ACEOF + + GS_WARN="" + { echo "$as_me:$LINENO: checking whether $GS has the pngalpha device" >&5 +echo $ECHO_N "checking whether $GS has the pngalpha device... $ECHO_C" >&6; } + if $GS -h | grep pngalpha >/dev/null; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + GS_WARN="Your EPS inclusions will be cropped to the + boundingbox, and rendered on an opaque background. + Upgrade GhostScript to avoid this." + { echo "$as_me:$LINENO: checking whether $GS has the png16m device" >&5 +echo $ECHO_N "checking whether $GS has the png16m device... $ECHO_C" >&6; } + if $GS -h | grep png16m >/dev/null; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + GS_WARN="Your EPS inclusions may not work. + Upgrade/install GhostScript to avoid this." + fi + + fi + + if test -n "$GS_WARN"; then + { echo "$as_me:$LINENO: WARNING: $GS_WARN" >&5 +echo "$as_me: WARNING: $GS_WARN" >&2;} + fi + + fi +else + # Extract the first word of "gs", so it can be a program name with args. +set dummy gs; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_GS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$GS"; then + ac_cv_prog_GS="$GS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_GS="gs" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +GS=$ac_cv_prog_GS +if test -n "$GS"; then + { echo "$as_me:$LINENO: result: $GS" >&5 +echo "${ECHO_T}$GS" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + +cat >>confdefs.h <<_ACEOF +#define GS_PATH "gs" +_ACEOF + + if test -n "$GS"; then + GS_WARN="" + { echo "$as_me:$LINENO: checking whether $GS has the pngalpha device" >&5 +echo $ECHO_N "checking whether $GS has the pngalpha device... $ECHO_C" >&6; } + if $GS -h | grep pngalpha >/dev/null; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + GS_WARN="Your EPS inclusions will be cropped to the + boundingbox, and rendered on an opaque background. + Upgrade GhostScript to avoid this." + { echo "$as_me:$LINENO: checking whether $GS has the png16m device" >&5 +echo $ECHO_N "checking whether $GS has the png16m device... $ECHO_C" >&6; } + if $GS -h | grep png16m >/dev/null; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + GS_WARN="Your EPS inclusions may not work. + Upgrade/install GhostScript to avoid this." + fi + + fi + + if test -n "$GS_WARN"; then + { echo "$as_me:$LINENO: WARNING: $GS_WARN" >&5 +echo "$as_me: WARNING: $GS_WARN" >&2;} + fi + + else + { echo "$as_me:$LINENO: WARNING: Cannot find GhostScript in your PATH" >&5 +echo "$as_me: WARNING: Cannot find GhostScript in your PATH" >&2;} + fi + +fi + + +# Checks for libraries. + + +{ echo "$as_me:$LINENO: checking for pow in -lm" >&5 +echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_pow+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pow (); +int +main () +{ +return pow (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_m_pow=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_pow=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5 +echo "${ECHO_T}$ac_cv_lib_m_pow" >&6; } +if test $ac_cv_lib_m_pow = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + + +{ echo "$as_me:$LINENO: checking for deflate in -lz" >&5 +echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6; } +if test "${ac_cv_lib_z_deflate+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char deflate (); +int +main () +{ +return deflate (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_z_deflate=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_deflate=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 +echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6; } +if test $ac_cv_lib_z_deflate = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +fi + + +{ echo "$as_me:$LINENO: checking for basename in -lgen" >&5 +echo $ECHO_N "checking for basename in -lgen... $ECHO_C" >&6; } +if test "${ac_cv_lib_gen_basename+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgen $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char basename (); +int +main () +{ +return basename (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_gen_basename=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gen_basename=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gen_basename" >&5 +echo "${ECHO_T}$ac_cv_lib_gen_basename" >&6; } +if test $ac_cv_lib_gen_basename = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGEN 1 +_ACEOF + + LIBS="-lgen $LIBS" + +fi + + +{ echo "$as_me:$LINENO: checking for png_read_image in -lpng" >&5 +echo $ECHO_N "checking for png_read_image in -lpng... $ECHO_C" >&6; } +if test "${ac_cv_lib_png_png_read_image+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char png_read_image (); +int +main () +{ +return png_read_image (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_png_png_read_image=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_png_png_read_image=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_read_image" >&5 +echo "${ECHO_T}$ac_cv_lib_png_png_read_image" >&6; } +if test $ac_cv_lib_png_png_read_image = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPNG 1 +_ACEOF + + LIBS="-lpng $LIBS" + +else + { { echo "$as_me:$LINENO: error: cannot find/use libpng" >&5 +echo "$as_me: error: cannot find/use libpng" >&2;} + { (exit 1); exit 1; }; } +fi + + +{ echo "$as_me:$LINENO: checking for gdImageCreate in -lgd" >&5 +echo $ECHO_N "checking for gdImageCreate in -lgd... $ECHO_C" >&6; } +if test "${ac_cv_lib_gd_gdImageCreate+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gdImageCreate (); +int +main () +{ +return gdImageCreate (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_gd_gdImageCreate=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gd_gdImageCreate=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gd_gdImageCreate" >&5 +echo "${ECHO_T}$ac_cv_lib_gd_gdImageCreate" >&6; } +if test $ac_cv_lib_gd_gdImageCreate = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGD 1 +_ACEOF + + LIBS="-lgd $LIBS" + +else + { { echo "$as_me:$LINENO: error: cannot find/use libgd +This drawing library can be downloaded at http://www.boutell.com/gd" >&5 +echo "$as_me: error: cannot find/use libgd +This drawing library can be downloaded at http://www.boutell.com/gd" >&2;} + { (exit 1); exit 1; }; } +fi + + +{ echo "$as_me:$LINENO: checking for kpse_set_progname in -lkpathsea" >&5 +echo $ECHO_N "checking for kpse_set_progname in -lkpathsea... $ECHO_C" >&6; } +if test "${ac_cv_lib_kpathsea_kpse_set_progname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkpathsea $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char kpse_set_progname (); +int +main () +{ +return kpse_set_progname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_kpathsea_kpse_set_progname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_kpathsea_kpse_set_progname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_kpathsea_kpse_set_progname" >&5 +echo "${ECHO_T}$ac_cv_lib_kpathsea_kpse_set_progname" >&6; } +if test $ac_cv_lib_kpathsea_kpse_set_progname = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBKPATHSEA 1 +_ACEOF + + LIBS="-lkpathsea $LIBS" + +else + { { echo "$as_me:$LINENO: error: cannot find/use libkpathsea" >&5 +echo "$as_me: error: cannot find/use libkpathsea" >&2;} + { (exit 1); exit 1; }; } +fi + + +{ echo "$as_me:$LINENO: checking for T1_InitLib in -lt1" >&5 +echo $ECHO_N "checking for T1_InitLib in -lt1... $ECHO_C" >&6; } +if test "${ac_cv_lib_t1_T1_InitLib+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lt1 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char T1_InitLib (); +int +main () +{ +return T1_InitLib (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_t1_T1_InitLib=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_t1_T1_InitLib=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_t1_T1_InitLib" >&5 +echo "${ECHO_T}$ac_cv_lib_t1_T1_InitLib" >&6; } +if test $ac_cv_lib_t1_T1_InitLib = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBT1 1 +_ACEOF + + LIBS="-lt1 $LIBS" + +fi + +PSFONTS_O="" +if test "$ac_cv_lib_t1_T1_InitLib" = yes; then + PSFONTS_O="t1.o" +fi + + +# Checks for header files. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + +for ac_header in gd.h png.h kpathsea/kpathsea.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------- ## +## Report this to dvipng@nongnu.org ## +## -------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +else + { { echo "$as_me:$LINENO: error: cannot find/use $ac_header" >&5 +echo "$as_me: error: cannot find/use $ac_header" >&2;} + { (exit 1); exit 1; }; } +fi + +done + + +for ac_header in t1lib.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------- ## +## Report this to dvipng@nongnu.org ## +## -------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# Check whether --with-ft-prefix was given. +if test "${with_ft_prefix+set}" = set; then + withval=$with_ft_prefix; ft_config_prefix="$withval" +else + ft_config_prefix="" +fi + + +# Check whether --with-ft-exec-prefix was given. +if test "${with_ft_exec_prefix+set}" = set; then + withval=$with_ft_exec_prefix; ft_config_exec_prefix="$withval" +else + ft_config_exec_prefix="" +fi + +# Check whether --enable-freetypetest was given. +if test "${enable_freetypetest+set}" = set; then + enableval=$enable_freetypetest; +else + enable_fttest=yes +fi + + +if test x$ft_config_exec_prefix != x ; then + ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix" + if test x${FT2_CONFIG+set} != xset ; then + FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config + fi +fi +if test x$ft_config_prefix != x ; then + ft_config_args="$ft_config_args --prefix=$ft_config_prefix" + if test x${FT2_CONFIG+set} != xset ; then + FT2_CONFIG=$ft_config_prefix/bin/freetype-config + fi +fi +# Extract the first word of "freetype-config", so it can be a program name with args. +set dummy freetype-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_FT2_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $FT2_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_FT2_CONFIG="$FT2_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_FT2_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_FT2_CONFIG" && ac_cv_path_FT2_CONFIG="no" + ;; +esac +fi +FT2_CONFIG=$ac_cv_path_FT2_CONFIG +if test -n "$FT2_CONFIG"; then + { echo "$as_me:$LINENO: result: $FT2_CONFIG" >&5 +echo "${ECHO_T}$FT2_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + +min_ft_version=6.1.0 +{ echo "$as_me:$LINENO: checking for FreeType - version >= $min_ft_version" >&5 +echo $ECHO_N "checking for FreeType - version >= $min_ft_version... $ECHO_C" >&6; } +no_ft="" +if test "$FT2_CONFIG" = "no" ; then + no_ft=yes +else + FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags` + FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs` + ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + ft_min_major_version=`echo $min_ft_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + ft_min_minor_version=`echo $min_ft_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` + ft_min_micro_version=`echo $min_ft_version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` + if test x$enable_fttest = xyes ; then + ft_config_is_lt="" + if test $ft_config_major_version -lt $ft_min_major_version ; then + ft_config_is_lt=yes + else + if test $ft_config_major_version -eq $ft_min_major_version ; then + if test $ft_config_minor_version -lt $ft_min_minor_version ; then + ft_config_is_lt=yes + else + if test $ft_config_minor_version -eq $ft_min_minor_version ; then + if test $ft_config_micro_version -lt $ft_min_micro_version ; then + ft_config_is_lt=yes + fi + fi + fi + fi + fi + if test x$ft_config_is_lt = xyes ; then + no_ft=yes + else + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $FT2_CFLAGS" + LIBS="$FT2_LIBS $LIBS" + if test "$cross_compiling" = yes; then + echo $ac_n "cross compiling; assumed OK... $ac_c" +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include FT_FREETYPE_H +#include +#include + +int +main() +{ + FT_Library library; + FT_Error error; + + error = FT_Init_FreeType(&library); + + if (error) + return 1; + else + { + FT_Done_FreeType(library); + return 0; + } +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +no_ft=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi # test $ft_config_version -lt $ft_min_version + fi # test x$enable_fttest = xyes +fi # test "$FT2_CONFIG" = "no" +if test x$no_ft = x ; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + CFLAGS="$FT2_CFLAGS $CFLAGS" + LIBS="$FT2_LIBS $LIBS" + PSFONTS_O="$PSFONTS_O sfd.o ft.o" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FT2 1 +_ACEOF + + ac_have_freetype2="yes" +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + if test "$FT2_CONFIG" = "no" ; then + echo "*** The freetype-config script installed by FreeType 2 could not be found." + echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the FT2_CONFIG environment variable to the" + echo "*** full path to freetype-config." + else + if test x$ft_config_is_lt = xyes ; then + echo "*** Your installed version of the FreeType 2 library is too old." + echo "*** If you have different versions of FreeType 2, make sure that" + echo "*** correct values for --with-ft-prefix or --with-ft-exec-prefix" + echo "*** are used, or set the FT2_CONFIG environment variable to the" + echo "*** full path to freetype-config." + else + echo "*** The FreeType test program failed to run. If your system uses" + echo "*** shared libraries and they are installed outside the normal" + echo "*** system library path, make sure the variable LD_LIBRARY_PATH" + echo "*** (or whatever is appropiate for your system) is correctly set." + fi + fi + FT2_CFLAGS="" + FT2_LIBS="" + ac_have_freetype2="no" +fi + + + +if test -n "$PSFONTS_O"; then + PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o" +fi +{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_sys_wait_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_sys_wait_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_WAIT_H 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_time=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 +echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; } +if test "${ac_cv_header_stdbool_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#ifndef bool + "error: bool is not defined" +#endif +#ifndef false + "error: false is not defined" +#endif +#if false + "error: false is not 0" +#endif +#ifndef true + "error: true is not defined" +#endif +#if true != 1 + "error: true is not 1" +#endif +#ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" +#endif + + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + bool e = &s; + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; +# if defined __xlc__ || defined __GNUC__ + /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 + reported by James Lemley on 2005-10-05; see + http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html + This test is not quite right, since xlc is allowed to + reject this program, as the initializer for xlcbug is + not one of the forms that C requires support for. + However, doing the test right would require a runtime + test, and that would make cross-compilation harder. + Let us hope that IBM fixes the xlc bug, and also adds + support for this kind of constant expression. In the + meantime, this test will reject xlc, which is OK, since + our stdbool.h substitute should suffice. We also test + this with GCC, where it should work, to detect more + quickly whether someone messes up the test in the + future. */ + char digs[] = "0123456789"; + int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); +# endif + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; + +int +main () +{ + + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdbool_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdbool_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 +echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; } +{ echo "$as_me:$LINENO: checking for _Bool" >&5 +echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; } +if test "${ac_cv_type__Bool+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef _Bool ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type__Bool=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type__Bool=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 +echo "${ECHO_T}$ac_cv_type__Bool" >&6; } +if test $ac_cv_type__Bool = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE__BOOL 1 +_ACEOF + + +fi + +if test $ac_cv_header_stdbool_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STDBOOL_H 1 +_ACEOF + +fi + + + +for ac_header in fcntl.h sys/time.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------- ## +## Report this to dvipng@nongnu.org ## +## -------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# Checks for typedefs, structures, and compiler characteristics. +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef pid_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_pid_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_pid_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +if test $ac_cv_type_pid_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef size_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +if test "$ac_cv_header_inttypes_h" = "yes"; then + # Sometimes we want to use gcc -ansi -pedantic as a portability test + # The typedef of int64_t is not in the system header file in that + # case. Then, #define int64_t as "long long", which is non-ansi, but + # is present in most modern compilers. Using a #define rather than a + # typedef can be a problem, but in dvipng int64_t is only used as + # typecast, and there are no problems. autoconf 2.13 equivalent: + # AC_CHECK_TYPE(int64_t, long long) + # AC_CHECK_TYPE(uint64_t, unsigned long long) + { echo "$as_me:$LINENO: checking for int64_t" >&5 +echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; } +if test "${ac_cv_type_int64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef int64_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_int64_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_int64_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5 +echo "${ECHO_T}$ac_cv_type_int64_t" >&6; } +if test $ac_cv_type_int64_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define int64_t long long +_ACEOF + +fi + + { echo "$as_me:$LINENO: checking for uint64_t" >&5 +echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; } +if test "${ac_cv_type_uint64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef uint64_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_uint64_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_uint64_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 +echo "${ECHO_T}$ac_cv_type_uint64_t" >&6; } +if test $ac_cv_type_uint64_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define uint64_t unsigned long long +_ACEOF + +fi + +fi +{ echo "$as_me:$LINENO: checking for kpse_enc_format" >&5 +echo $ECHO_N "checking for kpse_enc_format... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #include +int +main () +{ +kpse_enc_format;kpse_cmap_format;kpse_sfd_format + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KPSE_ENC_FORMATS 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +# Checks for library functions. +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ echo "$as_me:$LINENO: checking for working alloca.h" >&5 +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } +if test "${ac_cv_working_alloca_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_working_alloca_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_working_alloca_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for alloca" >&5 +echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } +if test "${ac_cv_func_alloca_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_alloca_works=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_alloca_works=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; } + +if test $ac_cv_func_alloca_works = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA 1 +_ACEOF + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +cat >>confdefs.h <<\_ACEOF +#define C_ALLOCA 1 +_ACEOF + + +{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } +if test "${ac_cv_os_cray+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +echo "${ECHO_T}$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } +if test "${ac_cv_c_stack_direction+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} + +int +main () +{ + return find_stack_direction () < 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_stack_direction=1 +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_stack_direction=-1 +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } + +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + + +for ac_header in vfork.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------- ## +## Report this to dvipng@nongnu.org ## +## -------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_func in fork vfork +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +if test "x$ac_cv_func_fork" = xyes; then + { echo "$as_me:$LINENO: checking for working fork" >&5 +echo $ECHO_N "checking for working fork... $ECHO_C" >&6; } +if test "${ac_cv_func_fork_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_fork_works=cross +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* By Ruediger Kuhlmann. */ + return fork () < 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_fork_works=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_fork_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 +echo "${ECHO_T}$ac_cv_func_fork_works" >&6; } + +else + ac_cv_func_fork_works=$ac_cv_func_fork +fi +if test "x$ac_cv_func_fork_works" = xcross; then + case $host in + *-*-amigaos* | *-*-msdosdjgpp*) + # Override, as these systems have only a dummy fork() stub + ac_cv_func_fork_works=no + ;; + *) + ac_cv_func_fork_works=yes + ;; + esac + { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 +echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} +fi +ac_cv_func_vfork_works=$ac_cv_func_vfork +if test "x$ac_cv_func_vfork" = xyes; then + { echo "$as_me:$LINENO: checking for working vfork" >&5 +echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; } +if test "${ac_cv_func_vfork_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_vfork_works=cross +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Thanks to Paul Eggert for this test. */ +$ac_includes_default +#include +#ifdef HAVE_VFORK_H +# include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. The compiler + is told about this with #include , but some compilers + (e.g. gcc -O) don't grok . Test for this by using a + static variable whose address is put into a register that is + clobbered by the vfork. */ +static void +#ifdef __cplusplus +sparc_address_test (int arg) +# else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} + +int +main () +{ + pid_t parent = getpid (); + pid_t child; + + sparc_address_test (0); + + child = vfork (); + + if (child == 0) { + /* Here is another test for sparc vfork register problems. This + test uses lots of local variables, at least as many local + variables as main has allocated so far including compiler + temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris + 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should + reuse the register of parent for one of the local variables, + since it will think that parent can't possibly be used any more + in this routine. Assigning to the local variable will thus + munge parent in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + _exit(1); + + /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent + from child file descriptors. If the child closes a descriptor + before it execs or exits, this munges the parent's descriptor + as well. Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; + struct stat st; + + while (wait(&status) != child) + ; + return ( + /* Was there some problem with vforking? */ + child < 0 + + /* Did the child fail? (This shouldn't happen.) */ + || status + + /* Did the vfork/compiler bug occur? */ + || parent != getpid() + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_vfork_works=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_vfork_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 +echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; } + +fi; +if test "x$ac_cv_func_fork_works" = xcross; then + ac_cv_func_vfork_works=$ac_cv_func_vfork + { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 +echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} +fi + +if test "x$ac_cv_func_vfork_works" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WORKING_VFORK 1 +_ACEOF + +else + +cat >>confdefs.h <<\_ACEOF +#define vfork fork +_ACEOF + +fi +if test "x$ac_cv_func_fork_works" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WORKING_FORK 1 +_ACEOF + +fi + + +for ac_header in stdlib.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------- ## +## Report this to dvipng@nongnu.org ## +## -------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +{ echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 +echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } +if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_malloc_0_nonnull=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif + +int +main () +{ +return ! malloc (0); + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_malloc_0_nonnull=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_malloc_0_nonnull=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 +echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } +if test $ac_cv_func_malloc_0_nonnull = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC 1 +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define HAVE_MALLOC 0 +_ACEOF + + case " $LIBOBJS " in + *" malloc.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS malloc.$ac_objext" + ;; +esac + + +cat >>confdefs.h <<\_ACEOF +#define malloc rpl_malloc +_ACEOF + +fi + + + + + +for ac_header in stdlib.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## -------------------------------- ## +## Report this to dvipng@nongnu.org ## +## -------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_func in getpagesize +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +{ echo "$as_me:$LINENO: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; } +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#ifndef HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# ifndef HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# ifdef HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + return 1; + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + return 1; + if (write (fd, data, pagesize) != pagesize) + return 1; + close (fd); + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + return 1; + data2 = (char *) malloc (2 * pagesize); + if (!data2) + return 1; + data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + return 1; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + return 1; + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + return 1; + if (read (fd, data3, pagesize) != pagesize) + return 1; + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + return 1; + close (fd); + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_mmap_fixed_mapped=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; } +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP 1 +_ACEOF + +fi +rm -f conftest.mmap + +{ echo "$as_me:$LINENO: checking for working strtod" >&5 +echo $ECHO_N "checking for working strtod... $ECHO_C" >&6; } +if test "${ac_cv_func_strtod+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_strtod=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +$ac_includes_default +#ifndef strtod +double strtod (); +#endif +int +main() +{ + { + /* Some versions of Linux strtod mis-parse strings with leading '+'. */ + char *string = " +69"; + char *term; + double value; + value = strtod (string, &term); + if (value != 69 || term != (string + 4)) + return 1; + } + + { + /* Under Solaris 2.4, strtod returns the wrong value for the + terminating character under some conditions. */ + char *string = "NaN"; + char *term; + strtod (string, &term); + if (term != string && *(term - 1) == 0) + return 1; + } + return 0; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strtod=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_strtod=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5 +echo "${ECHO_T}$ac_cv_func_strtod" >&6; } +if test $ac_cv_func_strtod = no; then + case " $LIBOBJS " in + *" strtod.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS strtod.$ac_objext" + ;; +esac + +{ echo "$as_me:$LINENO: checking for pow" >&5 +echo $ECHO_N "checking for pow... $ECHO_C" >&6; } +if test "${ac_cv_func_pow+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define pow to an innocuous variant, in case declares pow. + For example, HP-UX 11i declares gettimeofday. */ +#define pow innocuous_pow + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char pow (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef pow + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pow (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_pow || defined __stub___pow +choke me +#endif + +int +main () +{ +return pow (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_pow=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_pow=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5 +echo "${ECHO_T}$ac_cv_func_pow" >&6; } + +if test $ac_cv_func_pow = no; then + { echo "$as_me:$LINENO: checking for pow in -lm" >&5 +echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_pow+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pow (); +int +main () +{ +return pow (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_m_pow=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_pow=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5 +echo "${ECHO_T}$ac_cv_lib_m_pow" >&6; } +if test $ac_cv_lib_m_pow = yes; then + POW_LIB=-lm +else + { echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5 +echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} +fi + +fi + +fi + + +for ac_func in vprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +{ echo "$as_me:$LINENO: checking for _doprnt" >&5 +echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } +if test "${ac_cv_func__doprnt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define _doprnt to an innocuous variant, in case declares _doprnt. + For example, HP-UX 11i declares gettimeofday. */ +#define _doprnt innocuous__doprnt + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _doprnt (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef _doprnt + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _doprnt (); +/* 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__doprnt || defined __stub____doprnt +choke me +#endif + +int +main () +{ +return _doprnt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func__doprnt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func__doprnt=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 +echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } +if test $ac_cv_func__doprnt = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DOPRNT 1 +_ACEOF + +fi + +fi +done + + + + + + + + + + + +for ac_func in dup2 memset munmap pow putenv strchr strrchr strtol strstr +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +if test "$enable_timing" = "yes"; then + + +for ac_func in ftime gettimeofday +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +fi + + + + + + +for ac_func in gdImageCreateTrueColor gdImageCreateFromJpeg gdImagePngEx gdImageCreateFromPngPtr gdImageGif FT_Library_Version +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +if test "$ac_cv_func_gdImageGif" = "yes"; then + INSTALL_BIN_TARGET="install-dvigif" +else + INSTALL_BIN_TARGET="install-dvipng" +fi + + +# Documentation-related checks +# Extract the first word of "makeinfo", so it can be a program name with args. +set dummy makeinfo; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_MAKEINFO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAKEINFO in + [\\/]* | ?:[\\/]*) + ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO=":" + ;; +esac +fi +MAKEINFO=$ac_cv_path_MAKEINFO +if test -n "$MAKEINFO"; then + { echo "$as_me:$LINENO: result: $MAKEINFO" >&5 +echo "${ECHO_T}$MAKEINFO" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +for ac_macro in acronym env option; do + if test -n "$MAKEINFO" -a "$makeinfo" != ":"; then + { echo "$as_me:$LINENO: checking for @$ac_macro{}" >&5 +echo $ECHO_N "checking for @$ac_macro{}... $ECHO_C" >&6; } + echo \\\\input texinfo > conftest.texi + echo @$ac_macro{test} >> conftest.texi + if $MAKEINFO conftest.texi > /dev/null 2> /dev/null; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + : + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + MAKEINFO_MACROS="-D no-$ac_macro $MAKEINFO_MACROS" + + fi + rm -f conftest.texi conftest.info +fi + done + + +# Extract the first word of "install-info", so it can be a program name with args. +set dummy install-info; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_INSTALL_INFO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $INSTALL_INFO in + [\\/]* | ?:[\\/]*) + ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH /usr/sbin /sbin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":" + ;; +esac +fi +INSTALL_INFO=$ac_cv_path_INSTALL_INFO +if test -n "$INSTALL_INFO"; then + { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5 +echo "${ECHO_T}$INSTALL_INFO" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + +# SELFAUTO +# Check whether --enable-selfauto-set was given. +if test "${enable_selfauto_set+set}" = set; then + enableval=$enable_selfauto_set; if test "$enableval" = yes ; then + { echo "$as_me:$LINENO: checking for \$SELFAUTOLOC" >&5 +echo $ECHO_N "checking for \$SELFAUTOLOC... $ECHO_C" >&6; } + SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC` + +cat >>confdefs.h <<_ACEOF +#define ENV_SELFAUTOLOC "SELFAUTOLOC=$SELFAUTOLOC" +_ACEOF + + { echo "$as_me:$LINENO: result: $SELFAUTOLOC" >&5 +echo "${ECHO_T}$SELFAUTOLOC" >&6; } + { echo "$as_me:$LINENO: checking for \$SELFAUTODIR" >&5 +echo $ECHO_N "checking for \$SELFAUTODIR... $ECHO_C" >&6; } + SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR` + +cat >>confdefs.h <<_ACEOF +#define ENV_SELFAUTODIR "SELFAUTODIR=$SELFAUTODIR" +_ACEOF + + { echo "$as_me:$LINENO: result: $SELFAUTODIR" >&5 +echo "${ECHO_T}$SELFAUTODIR" >&6; } + { echo "$as_me:$LINENO: checking for \$SELFAUTOPARENT" >&5 +echo $ECHO_N "checking for \$SELFAUTOPARENT... $ECHO_C" >&6; } + SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT` + +cat >>confdefs.h <<_ACEOF +#define ENV_SELFAUTOPARENT "SELFAUTOPARENT=$SELFAUTOPARENT" +_ACEOF + + { echo "$as_me:$LINENO: result: $SELFAUTOPARENT" >&5 +echo "${ECHO_T}$SELFAUTOPARENT" >&6; } + fi +else + { echo "$as_me:$LINENO: checking for texmf.cnf" >&5 +echo $ECHO_N "checking for texmf.cnf... $ECHO_C" >&6; } + TEXMF_CNF=`kpsewhich texmf.cnf` + { echo "$as_me:$LINENO: result: $TEXMF_CNF" >&5 +echo "${ECHO_T}$TEXMF_CNF" >&6; } + # Extract the first word of "kpsewhich", so it can be a program name with args. +set dummy kpsewhich; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_KPSEWHICH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $KPSEWHICH in + [\\/]* | ?:[\\/]*) + ac_cv_path_KPSEWHICH="$KPSEWHICH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_KPSEWHICH="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +KPSEWHICH=$ac_cv_path_KPSEWHICH +if test -n "$KPSEWHICH"; then + { echo "$as_me:$LINENO: result: $KPSEWHICH" >&5 +echo "${ECHO_T}$KPSEWHICH" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + { echo "$as_me:$LINENO: checking for psfonts.map" >&5 +echo $ECHO_N "checking for psfonts.map... $ECHO_C" >&6; } + cp $KPSEWHICH . + PSFONTS_MAP=`./kpsewhich psfonts.map` + rm -f ./kpsewhich + if test -n "$PSFONTS_MAP"; then + { echo "$as_me:$LINENO: result: $PSFONTS_MAP" >&5 +echo "${ECHO_T}$PSFONTS_MAP" >&6; } + else + { echo "$as_me:$LINENO: result: not found from outside the texmf tree" >&5 +echo "${ECHO_T}not found from outside the texmf tree" >&6; } + { echo "$as_me:$LINENO: checking for \$SELFAUTO in texmf.cnf" >&5 +echo $ECHO_N "checking for \$SELFAUTO in texmf.cnf... $ECHO_C" >&6; } + if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then + { echo "$as_me:$LINENO: result: yes +*************************************************************** +texmf.cnf is using \$SELFAUTO... variables. If you are going to +install dvipng outside the texmf tree, you may need to use +--enable-selfauto-set. To find out, do 'make ; make test'. If the test +is unsuccessful, add the mentioned switch and rebuild. +***************************************************************" >&5 +echo "${ECHO_T}yes +*************************************************************** +texmf.cnf is using \$SELFAUTO... variables. If you are going to +install dvipng outside the texmf tree, you may need to use +--enable-selfauto-set. To find out, do 'make ; make test'. If the test +is unsuccessful, add the mentioned switch and rebuild. +***************************************************************" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + fi +fi + + +{ echo "$as_me:$LINENO: result: +** Configuration summary for $PACKAGE_STRING: + + The -d (debug) switch is enabled: $enable_debug + Your gd is new enough (>=2.0) to enable + the --truecolor switch, full alpha + transparency, proper rescaling of + included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor + Your gd has jpeg inclusion enabled: $ac_cv_func_gdImageCreateFromJpeg + Your gd is new enough (>=2.0.12) to + enable transparent backgrounds for EPS + inclusion and the -z (compression) + switch: $ac_cv_func_gdImagePngEx + Your gd is new enough (>=2.0.21) to + allow image creation from memory $ac_cv_func_gdImageCreateFromPngPtr + Your gd is new enough (>=2.0.28) to + enable gif inclusion and output + (dvigif): $ac_cv_func_gdImageGif + FreeType font rendering available: $ac_have_freetype2 + Support for subfonts (CJK-LaTeX): $ac_have_freetype2 + T1lib font rendering available: $ac_cv_lib_t1_T1_InitLib +" >&5 +echo "${ECHO_T} +** Configuration summary for $PACKAGE_STRING: + + The -d (debug) switch is enabled: $enable_debug + Your gd is new enough (>=2.0) to enable + the --truecolor switch, full alpha + transparency, proper rescaling of + included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor + Your gd has jpeg inclusion enabled: $ac_cv_func_gdImageCreateFromJpeg + Your gd is new enough (>=2.0.12) to + enable transparent backgrounds for EPS + inclusion and the -z (compression) + switch: $ac_cv_func_gdImagePngEx + Your gd is new enough (>=2.0.21) to + allow image creation from memory $ac_cv_func_gdImageCreateFromPngPtr + Your gd is new enough (>=2.0.28) to + enable gif inclusion and output + (dvigif): $ac_cv_func_gdImageGif + FreeType font rendering available: $ac_have_freetype2 + Support for subfonts (CJK-LaTeX): $ac_have_freetype2 + T1lib font rendering available: $ac_cv_lib_t1_T1_InitLib +" >&6; } + +ac_config_headers="$ac_config_headers config.h" + +ac_config_files="$ac_config_files Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by dvipng $as_me 1.12, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +dvipng config.status 1.12 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +LN_S!$LN_S$ac_delim +GS!$GS$ac_delim +PSFONTS_O!$PSFONTS_O$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +FT2_CONFIG!$FT2_CONFIG$ac_delim +FT2_CFLAGS!$FT2_CFLAGS$ac_delim +FT2_LIBS!$FT2_LIBS$ac_delim +ALLOCA!$ALLOCA$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +POW_LIB!$POW_LIB$ac_delim +INSTALL_BIN_TARGET!$INSTALL_BIN_TARGET$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +MAKEINFO_MACROS!$MAKEINFO_MACROS$ac_delim +INSTALL_INFO!$INSTALL_INFO$ac_delim +KPSEWHICH!$KPSEWHICH$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 66; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" + ;; + + + esac + +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff --git a/Build/source/texk/dvipng/dvipng-1.12/configure.ac b/Build/source/texk/dvipng/dvipng-1.12/configure.ac new file mode 100644 index 00000000000..509591c93ba --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/configure.ac @@ -0,0 +1,227 @@ +# configure.ac + +#************************************************************************ +# +# Part of the dvipng distribution +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program. If not, see +# . +# +# Copyright (C) 2002-2009 Jan-Åke Larsson +# +#************************************************************************ + +# Process this file with autoconf to produce a configure script. +AC_INIT([dvipng], [1.12], [dvipng@nongnu.org]) +AC_CONFIG_SRCDIR([dvipng.c]) + +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--disable-debug],[Compile without debug (-d) option]), + [ if test "$enableval" = yes ; then + AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.]) + fi ], + [ enable_debug="yes"; + AC_DEFINE(DEBUG, 1, [Define as 1 to get the debug (-d) option.])]) +AC_ARG_ENABLE(timing, + AC_HELP_STRING([--enable-timing],[Output execution time of dvipng]), + [ if test "$enableval" = yes ; then + AC_DEFINE(TIMING, 1, [Define as 1 to get execution time output.]) + fi ]) + +# Checks for programs. +AC_SET_MAKE +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S +AC_ARG_WITH(gs, + AC_HELP_STRING([--with-gs=/PATH/TO/gs],[Hard-wire the location of GhostScript]), + [if test "x$withval" != xno ; then + AC_PATH_PROG(GS,["$withval"]) + AC_DEFINE_UNQUOTED(GS_PATH, "$GS", [Define as the path to GhostScript.]) + GS_CHECK_DEVICES + fi], + [AC_CHECK_PROG(GS,gs,gs) + AC_DEFINE_UNQUOTED(GS_PATH, "gs", [Define as the path to GhostScript.]) + if test -n "$GS"; then + GS_CHECK_DEVICES + else + AC_MSG_WARN([Cannot find GhostScript in your PATH]) + fi +]) + +# Checks for libraries. +AC_CHECK_LIB(m, pow) +AC_CHECK_LIB(z, deflate) +AC_CHECK_LIB(gen, basename) +AC_CHECK_LIB([png], [png_read_image],, + [AC_MSG_ERROR([cannot find/use libpng])]) +AC_CHECK_LIB([gd], [gdImageCreate],, + [AC_MSG_ERROR([cannot find/use libgd +This drawing library can be downloaded at http://www.boutell.com/gd])]) +AC_CHECK_LIB([kpathsea], [kpse_set_progname],, + AC_MSG_ERROR([cannot find/use libkpathsea])) +AC_CHECK_LIB([t1], [T1_InitLib]) +PSFONTS_O="" +if test "$ac_cv_lib_t1_T1_InitLib" = yes; then + PSFONTS_O="t1.o" +fi +AC_SUBST(PSFONTS_O) + +# Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS([gd.h png.h kpathsea/kpathsea.h],, + [AC_MSG_ERROR([cannot find/use $ac_header])]) +AC_CHECK_HEADERS([t1lib.h]) +AC_CHECK_FT2(,[CFLAGS="$FT2_CFLAGS $CFLAGS" + LIBS="$FT2_LIBS $LIBS" + PSFONTS_O="$PSFONTS_O sfd.o ft.o" + AC_DEFINE(HAVE_FT2, 1, [Define to 1 if you have freetype2]) + ac_have_freetype2="yes"], + [ac_have_freetype2="no"]) +if test -n "$PSFONTS_O"; then + PSFONTS_O="$PSFONTS_O enc.o fontmap.o tfm.o" +fi +AC_HEADER_SYS_WAIT +AC_HEADER_TIME +AC_HEADER_STDBOOL +AC_CHECK_HEADERS([fcntl.h sys/time.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_PID_T +AC_TYPE_SIZE_T +if test "$ac_cv_header_inttypes_h" = "yes"; then + # Sometimes we want to use gcc -ansi -pedantic as a portability test + # The typedef of int64_t is not in the system header file in that + # case. Then, #define int64_t as "long long", which is non-ansi, but + # is present in most modern compilers. Using a #define rather than a + # typedef can be a problem, but in dvipng int64_t is only used as + # typecast, and there are no problems. autoconf 2.13 equivalent: + # AC_CHECK_TYPE(int64_t, long long) + # AC_CHECK_TYPE(uint64_t, unsigned long long) + AC_CHECK_TYPE([int64_t],, + [AC_DEFINE_UNQUOTED([int64_t], [long long], + [Define to `long long' if + does not define it.])]) + AC_CHECK_TYPE([uint64_t],, + [AC_DEFINE_UNQUOTED([uint64_t], [unsigned long long], + [Define to `unsigned long long' if + does not define it.])]) +fi +AC_HAS_KPSE_ENC_FORMATS + + +# Checks for library functions. +AC_FUNC_ALLOCA +AC_FUNC_FORK +AC_FUNC_MALLOC +AC_FUNC_MMAP +AC_FUNC_STRTOD +AC_FUNC_VPRINTF +AC_CHECK_FUNCS([dup2 memset munmap pow putenv strchr strrchr strtol strstr]) +if test "$enable_timing" = "yes"; then + AC_CHECK_FUNCS([ftime gettimeofday]) +fi +AC_CHECK_FUNCS([gdImageCreateTrueColor gdImageCreateFromJpeg gdImagePngEx gdImageCreateFromPngPtr gdImageGif FT_Library_Version]) +if test "$ac_cv_func_gdImageGif" = "yes"; then + INSTALL_BIN_TARGET="install-dvigif" +else + INSTALL_BIN_TARGET="install-dvipng" +fi +AC_SUBST(INSTALL_BIN_TARGET) + +# Documentation-related checks +AC_PATH_PROG(MAKEINFO, makeinfo, :) +MAKEINFO_CHECK_MACROS(acronym env option) +AC_PATH_PROG(INSTALL_INFO, install-info, :, $PATH /usr/sbin /sbin) + +# SELFAUTO +AC_ARG_ENABLE(selfauto-set, + AC_HELP_STRING([--enable-selfauto-set], + [This option will make the final binary explicitly set the + $SELFAUTO... variables to make it look as dvipng is installed in the + main texmf tree, even if it isn't. This is necessary when texmf.cnf + only uses $SELFAUTO... variables and dvipng is not installed in the + texmf tree. Otherwise, dvipng may not be able to find virtual + fonts, or psfonts.map. To find out, first build the binary and do + 'make test'. If the test fails, you need this switch.]), + [ if test "$enableval" = yes ; then + AC_MSG_CHECKING([for \$SELFAUTOLOC]) + SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC` + AC_DEFINE_UNQUOTED(ENV_SELFAUTOLOC,["SELFAUTOLOC=$SELFAUTOLOC"], + [The environment setting for $SELFAUTOLOC]) + AC_MSG_RESULT([$SELFAUTOLOC]) + AC_MSG_CHECKING([for \$SELFAUTODIR]) + SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR` + AC_DEFINE_UNQUOTED(ENV_SELFAUTODIR,["SELFAUTODIR=$SELFAUTODIR"], + [The environment setting for $SELFAUTODIR]) + AC_MSG_RESULT([$SELFAUTODIR]) + AC_MSG_CHECKING([for \$SELFAUTOPARENT]) + SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT` + AC_DEFINE_UNQUOTED(ENV_SELFAUTOPARENT,["SELFAUTOPARENT=$SELFAUTOPARENT"], + [The environment setting for $SELFAUTOPARENT]) + AC_MSG_RESULT([$SELFAUTOPARENT]) + fi ], + [AC_MSG_CHECKING([for texmf.cnf]) + TEXMF_CNF=`kpsewhich texmf.cnf` + AC_MSG_RESULT([$TEXMF_CNF]) + AC_PATH_PROG(KPSEWHICH, kpsewhich) + AC_MSG_CHECKING([for psfonts.map]) + cp $KPSEWHICH . + PSFONTS_MAP=`./kpsewhich psfonts.map` + rm -f ./kpsewhich + if test -n "$PSFONTS_MAP"; then + AC_MSG_RESULT([$PSFONTS_MAP]) + else + AC_MSG_RESULT([not found from outside the texmf tree]) + AC_MSG_CHECKING([for \$SELFAUTO in texmf.cnf]) + if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then + AC_MSG_RESULT([yes +*************************************************************** +texmf.cnf is using \$SELFAUTO... variables. If you are going to +install dvipng outside the texmf tree, you may need to use +--enable-selfauto-set. To find out, do 'make ; make test'. If the test +is unsuccessful, add the mentioned switch and rebuild. +***************************************************************]) + else + AC_MSG_RESULT([no]) + fi + fi]) + +AC_MSG_RESULT([ +** Configuration summary for $PACKAGE_STRING: + + The -d (debug) switch is enabled: $enable_debug + Your gd is new enough (>=2.0) to enable + the --truecolor switch, full alpha + transparency, proper rescaling of + included bitmaps, and jpeg inclusion: $ac_cv_func_gdImageCreateTrueColor + Your gd has jpeg inclusion enabled: $ac_cv_func_gdImageCreateFromJpeg + Your gd is new enough (>=2.0.12) to + enable transparent backgrounds for EPS + inclusion and the -z (compression) + switch: $ac_cv_func_gdImagePngEx + Your gd is new enough (>=2.0.21) to + allow image creation from memory $ac_cv_func_gdImageCreateFromPngPtr + Your gd is new enough (>=2.0.28) to + enable gif inclusion and output + (dvigif): $ac_cv_func_gdImageGif + FreeType font rendering available: $ac_have_freetype2 + Support for subfonts (CJK-LaTeX): $ac_have_freetype2 + T1lib font rendering available: $ac_cv_lib_t1_T1_InitLib +]) + +AC_CONFIG_HEADER([config.h]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/Build/source/texk/dvipng/dvipng-1.12/draw.c b/Build/source/texk/dvipng/dvipng-1.12/draw.c new file mode 100644 index 00000000000..699fdae9f90 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/draw.c @@ -0,0 +1,388 @@ +/* draw.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" + +#ifdef DEBUG +#include /* isprint */ +#endif + +struct stack_entry { + dviunits h, v, w, x, y, z; /* stack entry */ + subpixels hh,vv; +} stack[STACK_SIZE+1]; /* stack + space for current pos */ +struct stack_entry* dvi_stack=stack; + +#define MAXDRIFT 1 +#define CHECK_MAXDRIFT(x,xx) \ + if ( xx-PIXROUND(x,dvi->conv*shrinkfactor) < -MAXDRIFT ) { \ + DEBUG_PRINT(DEBUG_DVI,(" add 1 to")); \ + xx += 1; \ + } \ + if ( xx-PIXROUND(x,dvi->conv*shrinkfactor) > MAXDRIFT ) { \ + DEBUG_PRINT(DEBUG_DVI,(" sub 1 to")); \ + xx -= 1; \ + } \ + if (PIXROUND(dvi_stack->h,dvi->conv*shrinkfactor) != dvi_stack->hh \ + || PIXROUND(dvi_stack->v,dvi->conv*shrinkfactor) != dvi_stack->vv)\ + DEBUG_PRINT(DEBUG_DVI, \ + (" drift (%d,%d)", \ + dvi_stack->hh-PIXROUND(dvi_stack->h,dvi->conv*shrinkfactor), \ + dvi_stack->vv-PIXROUND(dvi_stack->v,dvi->conv*shrinkfactor))); + +#define MoveRight(x) \ + temp=x; dvi_stack->h += temp; \ + if ( currentfont==NULL \ + || temp > currentfont->s/6 || temp < -currentfont->s/6*4 ) \ + dvi_stack->hh = PIXROUND(dvi_stack->h,dvi->conv*shrinkfactor); \ + else \ + dvi_stack->hh += PIXROUND( temp,dvi->conv*shrinkfactor ); \ + CHECK_MAXDRIFT(dvi_stack->h,dvi_stack->hh) + +#define MoveDown(x) \ + temp=x; dvi_stack->v += temp; \ + if ( currentfont==NULL \ + || temp > currentfont->s/6*5 || temp < currentfont->s/6*(-5) ) \ + dvi_stack->vv = PIXROUND(dvi_stack->v,dvi->conv*shrinkfactor); \ + else \ + dvi_stack->vv += PIXROUND( temp,dvi->conv*shrinkfactor ); \ + CHECK_MAXDRIFT(dvi_stack->v,dvi_stack->vv) + +#define DO_VFCONV(a) ((((struct font_entry*) parent)->type==DVI_TYPE)?a:\ + (dviunits)((int64_t) a * ((struct font_entry*) parent)->s / (1 << 20))) + + +dviunits SetChar(int32_t c) +{ + struct char_entry* ptr=NULL; + + if (currentfont==NULL) + Fatal("faulty DVI, trying to set character from null font"); + + if (c>=0 && c<=LASTFNTCHAR) + ptr = currentfont->chr[c]; +#ifdef DEBUG + switch (currentfont->type) { + case FONT_TYPE_VF: DEBUG_PRINT(DEBUG_DVI,("\n VF CHAR:\t")); break; + case FONT_TYPE_PK: DEBUG_PRINT(DEBUG_DVI,("\n PK CHAR:\t")); break; + case FONT_TYPE_T1: DEBUG_PRINT(DEBUG_DVI,("\n T1 CHAR:\t")); break; + case FONT_TYPE_FT: DEBUG_PRINT(DEBUG_DVI,("\n FT CHAR:\t")); break; + default: DEBUG_PRINT(DEBUG_DVI,("\n NO CHAR:\t")) + } + if (isprint(c)) + DEBUG_PRINT(DEBUG_DVI,("'%c' ",c)); + DEBUG_PRINT(DEBUG_DVI,("%d at (%d,%d) tfmw %d", c, + dvi_stack->hh,dvi_stack->vv,ptr?ptr->tfmw:0)); +#endif + if (currentfont->type==FONT_TYPE_VF) { + return(SetVF(c)); + } else { + if (ptr!=NULL && ptr->data == NULL) + switch(currentfont->type) { + case FONT_TYPE_PK: LoadPK(c, ptr); break; +#ifdef HAVE_LIBT1 + case FONT_TYPE_T1: LoadT1(c, ptr); break; +#endif +#ifdef HAVE_FT2 + case FONT_TYPE_FT: LoadFT(c, ptr); break; +#endif + default: + Fatal("undefined fonttype %d",currentfont->type); + } + if (page_imagep != NULL) + return(SetGlyph(c, dvi_stack->hh, dvi_stack->vv)); + else if (ptr!=NULL) { + /* Expand bounding box if necessary */ + min(x_min,dvi_stack->hh - ptr->xOffset/shrinkfactor); + min(y_min,dvi_stack->vv - ptr->yOffset/shrinkfactor); + max(x_max,dvi_stack->hh - ptr->xOffset/shrinkfactor + ptr->w); + max(y_max,dvi_stack->vv - ptr->yOffset/shrinkfactor + ptr->h); + return(ptr->tfmw); + } + } + return(0); +} + +void DrawCommand(unsigned char* command, void* parent /* dvi/vf */) + /* To be used both in plain DVI drawing and VF drawing */ +{ + dviunits temp; + + if (/*command >= SETC_000 &&*/ *command <= SETC_127) { + temp = SetChar((int32_t)*command); + dvi_stack->h += temp; + dvi_stack->hh += PIXROUND(temp,dvi->conv*shrinkfactor); + CHECK_MAXDRIFT(dvi_stack->h,dvi_stack->hh); + } else if (*command >= FONT_00 && *command <= FONT_63) { + SetFntNum((int32_t)*command - FONT_00,parent); + } else switch (*command) { + case PUT1: case PUT2: case PUT3: case PUT4: + DEBUG_PRINT(DEBUG_DVI,(" %d", + UNumRead(command+1, dvi_commandlength[*command]-1))); + (void) SetChar(UNumRead(command+1, dvi_commandlength[*command]-1)); + break; + case SET1: case SET2: case SET3: case SET4: + DEBUG_PRINT(DEBUG_DVI,(" %d", + UNumRead(command+1, dvi_commandlength[*command]-1))); + { + temp = SetChar(UNumRead(command+1, dvi_commandlength[*command]-1)); + dvi_stack->h += temp; + dvi_stack->hh += PIXROUND(temp,dvi->conv*shrinkfactor); + CHECK_MAXDRIFT(dvi_stack->h,dvi_stack->hh); + } + break; + case SET_RULE: + DEBUG_PRINT(DEBUG_DVI,(" %d %d", + UNumRead(command+1, 4), UNumRead(command+5, 4))); + temp = SetRule(DO_VFCONV(UNumRead(command+1, 4)), + DO_VFCONV(UNumRead(command+5, 4)), + dvi_stack->hh, dvi_stack->vv); + dvi_stack->h += temp; + dvi_stack->hh += PIXROUND(temp,dvi->conv*shrinkfactor); + CHECK_MAXDRIFT(dvi_stack->h,dvi_stack->hh); + break; + case PUT_RULE: + DEBUG_PRINT(DEBUG_DVI,(" %d %d", + UNumRead(command+1, 4), UNumRead(command+5, 4))); + (void) SetRule(DO_VFCONV(UNumRead(command+1, 4)), + DO_VFCONV(UNumRead(command+5, 4)), + dvi_stack->hh, dvi_stack->vv); + break; + case BOP: + Fatal("BOP occurs within page"); + break; + case EOP: + break; + case PUSH: + /* is next item on stack? */ + if (dvi_stack == &stack[STACK_SIZE-1]) + Fatal("DVI stack overflow"); + { + struct stack_entry *next=dvi_stack+1; + next->h = dvi_stack->h; + next->v = dvi_stack->v; + next->w = dvi_stack->w; + next->x = dvi_stack->x; + next->y = dvi_stack->y; + next->z = dvi_stack->z; + next->hh = dvi_stack->hh; + next->vv = dvi_stack->vv; + dvi_stack=next; + } + break; + case POP: + if (dvi_stack == stack) + Fatal("DVI stack underflow"); + dvi_stack--; + break; + case RIGHT1: case RIGHT2: case RIGHT3: case RIGHT4: + DEBUG_PRINT(DEBUG_DVI,(" %d", + SNumRead(command+1, dvi_commandlength[*command]-1))); + MoveRight(DO_VFCONV(SNumRead(command+1, dvi_commandlength[*command]-1))); + break; + case W1: case W2: case W3: case W4: + dvi_stack->w = SNumRead(command+1, dvi_commandlength[*command]-1); + DEBUG_PRINT(DEBUG_DVI,(" %d",dvi_stack->w)); + case W0: + MoveRight(DO_VFCONV(dvi_stack->w)); + break; + case X1: case X2: case X3: case X4: + dvi_stack->x = SNumRead(command+1, dvi_commandlength[*command]-1); + DEBUG_PRINT(DEBUG_DVI,(" %d",dvi_stack->x)); + case X0: + MoveRight(DO_VFCONV(dvi_stack->x)); + break; + case DOWN1: case DOWN2: case DOWN3: case DOWN4: + DEBUG_PRINT(DEBUG_DVI,(" %d", + SNumRead(command+1, dvi_commandlength[*command]-1))); + MoveDown(DO_VFCONV(SNumRead(command+1, dvi_commandlength[*command]-1))); + break; + case Y1: case Y2: case Y3: case Y4: + dvi_stack->y = SNumRead(command+1, dvi_commandlength[*command]-1); + DEBUG_PRINT(DEBUG_DVI,(" %d",dvi_stack->y)); + case Y0: + MoveDown(DO_VFCONV(dvi_stack->y)); + break; + case Z1: case Z2: case Z3: case Z4: + dvi_stack->z = SNumRead(command+1, dvi_commandlength[*command]-1); + DEBUG_PRINT(DEBUG_DVI,(" %d",dvi_stack->z)); + case Z0: + MoveDown(DO_VFCONV(dvi_stack->z)); + break; + case FNT1: case FNT2: case FNT3: case FNT4: + DEBUG_PRINT(DEBUG_DVI,(" %d", + UNumRead(command+1, dvi_commandlength[*command]-1))); + SetFntNum(UNumRead(command+1, dvi_commandlength[*command]-1),parent); + break; + case XXX1: case XXX2: case XXX3: case XXX4: + DEBUG_PRINT(DEBUG_DVI,(" %d", + UNumRead(command+1, dvi_commandlength[*command]-1))); + SetSpecial((char*)command + dvi_commandlength[*command], + dvi_stack->hh,dvi_stack->vv); + break; + case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: + if (((struct font_entry*)parent)->type==DVI_TYPE) { + FontDef(command, parent); + } else { + Fatal("%s within VF macro from %s",dvi_commands[*command], + ((struct font_entry*)parent)->name); + } + break; + case PRE: case POST: case POST_POST: + Fatal("%s occurs within page",dvi_commands[*command]); + break; + case NOP: + break; + default: + Fatal("%s is an undefined command",dvi_commands[*command]); + break; + } +} + +void BeginVFMacro(struct font_entry* currentvf) +{ + struct stack_entry *next=dvi_stack+1; + if (dvi_stack == &stack[STACK_SIZE-1]) + Fatal("DVI stack overflow"); + next->h = dvi_stack->h; + next->v = dvi_stack->v; + next->w = next->x = next->y = next->z = 0; + next->hh = dvi_stack->hh; + next->vv = dvi_stack->vv; + dvi_stack = next; + DEBUG_PRINT(DEBUG_DVI,("\n START VF:\tPUSH, W = X = Y = Z = 0")); + SetFntNum(currentvf->defaultfont,currentvf); +} + +void EndVFMacro(void) +{ + if (dvi_stack == stack) + Fatal("DVI stack underflow"); + dvi_stack--; + DEBUG_PRINT(DEBUG_DVI,("\n END VF:\tPOP ")); +} + + +static void DrawPage(dviunits hoffset, dviunits voffset) + /* To be used after having read BOP and will exit cleanly when + * encountering EOP. + */ +{ + unsigned char* command; /* current command */ + + dvi_stack->h = hoffset; + dvi_stack->v = voffset; + dvi_stack->w = dvi_stack->x = dvi_stack->y = dvi_stack->z = 0; + dvi_stack->hh = PIXROUND( dvi_stack->h , dvi->conv*shrinkfactor ); + dvi_stack->vv = PIXROUND( dvi_stack->v , dvi->conv*shrinkfactor ); + currentfont = NULL; /* No default font */ + + command=DVIGetCommand(dvi); + DEBUG_PRINT(DEBUG_DVI,("DRAW CMD:\t%s", dvi_commands[*command])); + while (*command != EOP) { + DrawCommand(command,dvi); + command=DVIGetCommand(dvi); + DEBUG_PRINT(DEBUG_DVI,("DRAW CMD:\t%s", dvi_commands[*command])); + } +} + +void DrawPages(void) +{ + struct page_list *dvi_pos; + pixels x_width,y_width,x_offset,y_offset; + int pagecounter=(option_flags & DVI_PAGENUM)?0:10; + + dvi_pos=NextPPage(dvi,NULL); + if (dvi_pos!=NULL) { + while(dvi_pos!=NULL) { + SeekPage(dvi,dvi_pos); + Message(BE_NONQUIET,"[%d", dvi_pos->count[pagecounter]); + if (dvi_pos->count[pagecounter]!=dvi_pos->count[0]) + Message(BE_NONQUIET," (%d)", dvi_pos->count[0]); + x_max = y_max = INT32_MIN; + x_min = y_min = INT32_MAX; + DrawPage((dviunits)0,(dviunits)0); + /* Store background color. Background color of a page is given + by the color at EOP rather than the color at BOP. */ + StoreBackgroundColor(dvi_pos); + /* Store pagesize */ + if (dvi->flags & DVI_PREVIEW_LATEX_TIGHTPAGE) { + x_width_def=x_width_tightpage; + y_width_def=y_width_tightpage; + x_offset_def=x_offset_tightpage; + y_offset_def=y_offset_tightpage; + } + if (x_width_def >= 0) { /* extend BBOX */ + min(x_min,-x_offset_def); + max(x_max,x_min + x_width_def); + min(y_min,-y_offset_def); + max(y_max,y_min + y_width_def); + } + if (x_width_def <= 0 || option_flags & EXPAND_BBOX) { + x_width = x_max-x_min; + y_width = y_max-y_min; + x_offset = -x_min; /* offset by moving topleft corner */ + y_offset = -y_min; /* offset by moving topleft corner */ + } else { + x_width=x_width_def; + y_width=y_width_def; + x_offset=x_offset_def; + y_offset=y_offset_def; + } + DEBUG_PRINT(DEBUG_DVI,("\n IMAGE:\t%dx%d",x_width,y_width)); + SeekPage(dvi,dvi_pos); + CreateImage(x_width,y_width); +#ifdef DEBUG + DEBUG_PRINT(DEBUG_DVI,("\n@%d PAGE START:\tBOP",dvi_pos->offset)); + { + int i; + for (i=0;i<10;i++) + DEBUG_PRINT(DEBUG_DVI,(" %d",dvi_pos->count[i])); + DEBUG_PRINT(DEBUG_DVI,(" (%d)\n",dvi_pos->count[10])); + } +#endif + Message(REPORT_DEPTH," depth=%d", y_width-y_offset-1); + Message(REPORT_HEIGHT," height=%d", y_offset+1); + page_flags &= ~PAGE_PREVIEW_BOP; + DrawPage(x_offset*dvi->conv*shrinkfactor, + y_offset*dvi->conv*shrinkfactor); + if ( ! (option_flags & MODE_PICKY && page_flags & PAGE_GAVE_WARN )) { + WriteImage(dvi->outname,dvi_pos->count[pagecounter]); +#ifdef TIMING + ++ndone; +#endif + } else { + exitcode=EXIT_FAILURE; + Message(BE_NONQUIET,"(page not rendered)"); + DestroyImage(); + } + Message(BE_NONQUIET,"] "); + fflush(stdout); + page_flags = 0; + dvi_pos=NextPPage(dvi,dvi_pos); + } + Message(BE_NONQUIET,"\n"); + ClearPpList(); + } +} diff --git a/Build/source/texk/dvipng/dvipng-1.12/dvi.c b/Build/source/texk/dvipng/dvipng-1.12/dvi.c new file mode 100644 index 00000000000..a4463bbdb2e --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/dvi.c @@ -0,0 +1,479 @@ +/* dvi.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" +#ifdef MIKTEX +# include +# define SLEEP Sleep(1000) +#else /* MIKTEX */ +# ifdef HAVE_LIBGEN_H +# include +# else +# define basename xbasename +#endif +# define SLEEP sleep(1) +#endif /* MIKTEX */ +#include + +bool followmode=0; + +bool DVIFollowToggle(void) +{ + return followmode = ! followmode; +} + +static unsigned char fgetc_follow(FILE* fp) +{ + int got=fgetc(fp); + + while(followmode && got==EOF) { + SLEEP; + got=fgetc(fp); + } + if (got==EOF) + Fatal("DVI file ends prematurely"); + return (unsigned char)got; +} + +static void DVIInit(struct dvi_data* dvi) +{ + int k; + unsigned char* pre; + struct stat stat; + + fseek(dvi->filep,0,SEEK_SET); + pre=DVIGetCommand(dvi); + if (*pre != PRE) { + Fatal("PRE does not occur first - are you sure this is a DVI file?"); + } + k = UNumRead(pre+1,1); + DEBUG_PRINT(DEBUG_DVI,("DVI START:\tPRE %d",k)); + if (k != DVIFORMAT) { + Fatal("DVI format = %d, can only process DVI format %d files", + k, DVIFORMAT); + } + dvi->num = UNumRead(pre+2, 4); + dvi->den = UNumRead(pre+6, 4); + DEBUG_PRINT(DEBUG_DVI,(" %d/%d",dvi->num,dvi->den)); + dvi->mag = UNumRead(pre+10, 4); /*FIXME, see font.c*/ + DEBUG_PRINT(DEBUG_DVI,(" %d",dvi->mag)); + if ( usermag > 0 && usermag != dvi->mag ) { + Warning("DVI magnification of %d over-ridden by user (%ld)", + (long)dvi->mag, usermag ); + dvi->mag = usermag; + } + dvi->conv = (1.0/(((double)dvi->num / (double)dvi->den) * + ((double)dvi->mag / 1000.0) * + ((double)dpi*shrinkfactor/254000.0)))+0.5; + DEBUG_PRINT(DEBUG_DVI,(" (%d)",dvi->conv)); + k = UNumRead(pre+14,1); + DEBUG_PRINT(DEBUG_DVI,(" '%.*s'",k,pre+15)); + Message(BE_VERBOSE,"'%.*s' -> %s\n",k,pre+15,dvi->outname); + fstat(fileno(dvi->filep), &stat); + dvi->mtime = stat.st_mtime; + dvi->pagelistp=NULL; + dvi->flags = 0; +} + +struct dvi_data* DVIOpen(char* dviname,char* outname) +{ + char* tmpstring; + struct dvi_data* dvi; + + if ((dvi = calloc(1,sizeof(struct dvi_data)))==NULL) + Fatal("cannot allocate memory for DVI struct"); + + dvi->type = DVI_TYPE; + dvi->fontnump=NULL; + + dvi->name = malloc(strlen(dviname)+5); + if (dvi->name==NULL) + Fatal("cannot allocate space for DVI filename"); + strcpy(dvi->name, dviname); + tmpstring = strrchr(dvi->name, '.'); + if (tmpstring == NULL || strcmp(tmpstring,".dvi") != 0) + strcat(dvi->name, ".dvi"); + + if (outname==NULL) { + dvi->outname = malloc(strlen(basename(dviname))+7); + if (dvi->outname==NULL) { + free(dvi->name); + free(dvi); + Fatal("cannot allocate space for output filename"); + } + strcpy(dvi->outname,basename(dviname)); + tmpstring = strrchr(dvi->outname, '.'); + if (tmpstring != NULL && strcmp(tmpstring,".dvi") == 0) + *tmpstring = '\0'; + strcat(dvi->outname, "%d.png"); + } else { + dvi->outname = malloc(strlen(outname)+1); + if (dvi->outname==NULL) { + free(dvi->name); + free(dvi); + Fatal("cannot allocate space for output filename"); + } + strcpy(dvi->outname,outname); + } + + if ((dvi->filep = fopen(dvi->name,"rb")) == NULL) { + /* do not insist on .dvi */ + tmpstring = strrchr(dvi->name, '.'); + *tmpstring='\0'; + dvi->filep = fopen(dvi->name,"rb"); + } + while((dvi->filep == NULL) && followmode) { + SLEEP; + *tmpstring='.'; + if ((dvi->filep = fopen(dvi->name,"rb")) == NULL) { + /* do not insist on .dvi */ + *tmpstring='\0'; + dvi->filep = fopen(dvi->name,"rb"); + } + } + if (dvi->filep == NULL) { + free(dvi->name); + free(dvi->outname); + free(dvi); + perror(dviname); + exit (EXIT_FAILURE); + } + DEBUG_PRINT(DEBUG_DVI,("OPEN FILE\t%s", dvi->name)); + DVIInit(dvi); + return(dvi); +} + +unsigned char* DVIGetCommand(struct dvi_data* dvi) + /* This function reads in and stores the next dvi command. */ + /* Mmap is not appropriate here, we may want to read from + half-written files. */ +{ + static unsigned char* command=NULL; + static uint32_t commlen=0; + unsigned char *current = command; + int length; + uint32_t strlength=0; + + if (commlen==0) { + commlen=STRSIZE; + if ((current=command=malloc(commlen))==NULL) + Fatal("cannot allocate memory for DVI command"); + } + DEBUG_PRINT(DEBUG_DVI,("\n@%ld ", ftell(dvi->filep))); + *(current++) = fgetc_follow(dvi->filep); + length = dvi_commandlength[*command]; + if (length < 0) + Fatal("undefined DVI op-code %d",*command); + while(current < command+length) + *(current++) = fgetc_follow(dvi->filep); + switch (*command) { + case XXX4: + strlength = *(current - 4); + case XXX3: + strlength = strlength * 256 + *(current - 3); + case XXX2: + strlength = strlength * 256 + *(current - 2); + case XXX1: + strlength = strlength * 256 + *(current - 1); + break; + case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: + strlength = *(current - 1) + *(current - 2); + break; + case PRE: + strlength = *(current - 1); + break; + } + if (strlength > 0) { /* Read string */ + if (strlength+1 + (uint32_t)length > commlen) { + /* string + command length exceeds that of buffer */ + commlen=strlength+1 + (uint32_t)length; + if ((command=realloc(command,commlen))==NULL) + Fatal("cannot allocate memory for DVI command"); + current = command + length; + } + while(current < command+length+strlength) + *(current++) = fgetc_follow(dvi->filep); + *current='\0'; + } + return(command); +} + +bool DVIIsNextPSSpecial(struct dvi_data* dvi) + /* This function checks if the next dvi command is a raw PS + special */ + /* Mmap is not appropriate here, we may want to read from + half-written files. */ +{ + long fpos; + uint32_t strlength=0; + bool israwps=false; + + DEBUG_PRINT(DEBUG_DVI,("\n CHECKING NEXT DVI COMMAND ")); + fpos=ftell(dvi->filep); + switch (fgetc_follow(dvi->filep)) { + case XXX4: + strlength = fgetc_follow(dvi->filep); + case XXX3: + strlength = strlength * 256 + fgetc_follow(dvi->filep); + case XXX2: + strlength = strlength * 256 + fgetc_follow(dvi->filep); + case XXX1: + strlength = strlength * 256 + fgetc_follow(dvi->filep); + } + if (strlength > 0) { + switch(fgetc_follow(dvi->filep)) { + case 'p': + if (strlength > 2 + && fgetc_follow(dvi->filep)=='s' + && fgetc_follow(dvi->filep)==':') + israwps=true; + break; + case '"': + israwps=true; + } + } + fseek(dvi->filep,fpos,SEEK_SET); + return(israwps); +} + +uint32_t CommandLength(unsigned char* command) +{ + /* generally 2^32+5 bytes max, but in practice 32 bit numbers suffice */ + uint32_t length=0; + + length = dvi_commandlength[*command]; + switch (*command) { + case XXX1: case XXX2: case XXX3: case XXX4: + length += UNumRead(command + 1,length - 1); + break; + case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: + length += *(command + length - 1) + *(command + length - 2); + break; + case PRE: + length += *(command + length - 1); + break; + } + return(length); +} + +static void SkipPage(struct dvi_data* dvi) +{ + /* Skip present page */ + unsigned char* command; + + command=DVIGetCommand(dvi); + while (*command != EOP) { + switch (*command) { + case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: + DEBUG_PRINT(DEBUG_DVI,("NOSKIP CMD:\t%s", dvi_commands[*command])); + FontDef(command,dvi); + break; + case XXX1: case XXX2: case XXX3: case XXX4: + DEBUG_PRINT(DEBUG_DVI,("NOSKIP CMD:\t%s %d", dvi_commands[*command], + UNumRead(command+1, dvi_commandlength[*command]-1))); + SetSpecial((char*)command + dvi_commandlength[*command],0,0); + break; + case BOP: case PRE: case POST: case POST_POST: + Fatal("%s occurs within page", dvi_commands[*command]); + break; +#ifdef DEBUG + default: + DEBUG_PRINT(DEBUG_DVI,("SKIP CMD:\t%s", dvi_commands[*command])); +#endif + } + command=DVIGetCommand(dvi); + } /* while */ + DEBUG_PRINT(DEBUG_DVI,("SKIP CMD:\t%s", dvi_commands[*command])); +} + +static struct page_list* InitPage(struct dvi_data* dvi) +{ + /* Find page start, return pointer to page_list entry if found */ + struct page_list* tpagelistp=NULL; + unsigned char* command; + + command=DVIGetCommand(dvi); + /* Skip until page start or postamble */ + while((*command != BOP) && (*command != POST)) { + switch(*command) { + case FNT_DEF1: case FNT_DEF2: case FNT_DEF3: case FNT_DEF4: + DEBUG_PRINT(DEBUG_DVI,("NOPAGE CMD:\t%s", dvi_commands[*command])); + FontDef(command,dvi); + break; + case NOP: + DEBUG_PRINT(DEBUG_DVI,("NOPAGE CMD:\tNOP")); + break; + default: + Fatal("%s occurs outside page", dvi_commands[*command]); + } + command=DVIGetCommand(dvi); + } + if ((tpagelistp = + malloc(sizeof(struct page_list) + +(csp+1-2)*sizeof(struct dvi_color)))==NULL) + Fatal("cannot allocate memory for new page entry"); + tpagelistp->next = NULL; + if ( *command == BOP ) { /* Init page */ + int i; + DEBUG_PRINT(DEBUG_DVI,("PAGE START:\tBOP")); + StoreColorStack(tpagelistp); + tpagelistp->offset = ftell(dvi->filep)-45; + for (i = 0; i <= 9; i++) { + tpagelistp->count[i] = UNumRead(command + 1 + i*4, 4); + DEBUG_PRINT(DEBUG_DVI,(" %d",tpagelistp->count[i])); + } + if (dvi->pagelistp==NULL) + tpagelistp->count[10] = 1; + else + tpagelistp->count[10] = dvi->pagelistp->count[10]+1; + DEBUG_PRINT(DEBUG_DVI,(" (%d)", tpagelistp->count[10])); + } else { + DEBUG_PRINT(DEBUG_DVI,("DVI END:\tPOST")); + tpagelistp->offset = ftell(dvi->filep)-1; + tpagelistp->count[0] = PAGE_POST; /* POST */ + tpagelistp->count[10] = PAGE_POST; /* POST */ + } + return(tpagelistp); +} + +int SeekPage(struct dvi_data* dvi, struct page_list* page) +{ + ReadColorStack(page); + return(fseek(dvi->filep, + page->offset+((page->count[0]==PAGE_POST) ? 1L : 45L), + SEEK_SET)); +} + +struct page_list* NextPage(struct dvi_data* dvi, struct page_list* page) +{ + struct page_list* tpagelistp; + + /* if page points to POST there is no next page */ + if (page!=NULL && page->count[0]==PAGE_POST) + return(NULL); + + /* If we have read past the last page in our current list or the + * list is empty, sneak a look at the next page + */ + if (dvi->pagelistp==NULL + || dvi->pagelistp->offset+45L < ftell(dvi->filep)) { + tpagelistp=dvi->pagelistp; + dvi->pagelistp=InitPage(dvi); + dvi->pagelistp->next=tpagelistp; + } + + if (page!=dvi->pagelistp) { + /* also works if page==NULL, we'll get the first page then */ + tpagelistp=dvi->pagelistp; + while(tpagelistp!=NULL && tpagelistp->next!=page) + tpagelistp=tpagelistp->next; + } else { + /* dvi->pagelistp points to the last page we've read so far, + * the last page that we know where it is, so to speak + * So look at the next + */ + (void)SeekPage(dvi,dvi->pagelistp); + SkipPage(dvi); + tpagelistp=dvi->pagelistp; + dvi->pagelistp=InitPage(dvi); + dvi->pagelistp->next=tpagelistp; + tpagelistp=dvi->pagelistp; + } + return(tpagelistp); +} + +struct page_list* PrevPage(struct dvi_data* dvi, struct page_list* page) +{ + return(page->next); +} + + +struct page_list* FindPage(struct dvi_data* dvi, int32_t pagenum, bool abspage) + /* Find first page of certain number, + absolute number if abspage is set */ +{ + struct page_list* page=NextPage(dvi, NULL); + + if (pagenum==PAGE_LASTPAGE || pagenum==PAGE_POST) { + while(page!=NULL && page->count[0]!=PAGE_POST) + page=NextPage(dvi,page); + if (pagenum==PAGE_LASTPAGE) + page=PrevPage(dvi,page); + } else + if (pagenum!=PAGE_FIRSTPAGE) + while(page != NULL && pagenum != page->count[abspage ? 0 : 10]) + page=NextPage(dvi,page); + return(page); +} + + +static void DelPageList(struct dvi_data* dvi) +{ + struct page_list* temp; + + /* Delete the page list */ + + temp=dvi->pagelistp; + while(temp!=NULL) { + dvi->pagelistp=dvi->pagelistp->next; + free(temp); + temp=dvi->pagelistp; + } +} + +void DVIClose(struct dvi_data* dvi) +{ + if (dvi!=NULL) { + fclose(dvi->filep); + DelPageList(dvi); + ClearPSHeaders(); + free(dvi->outname); + free(dvi->name); + free(dvi); + } +} + +bool DVIReOpen(struct dvi_data* dvi) +{ + struct stat stat; + fstat(fileno(dvi->filep), &stat); + if (dvi->mtime != stat.st_mtime) { + fclose(dvi->filep); + dvi->filep=NULL; + DelPageList(dvi); + ClearPSHeaders(); + while(((dvi->filep = fopen(dvi->name,"rb")) == NULL) && followmode) { + SLEEP; + } + if (dvi->filep == NULL) { + perror(dvi->name); + exit(EXIT_FAILURE); + } + Message(PARSE_STDIN,"Reopened file\n"); + DEBUG_PRINT(DEBUG_DVI,("\nREOPEN FILE\t%s", dvi->name)); + DVIInit(dvi); + return(true); + } + return(false); +} diff --git a/Build/source/texk/dvipng/dvipng-1.12/dvipng.1 b/Build/source/texk/dvipng/dvipng-1.12/dvipng.1 new file mode 100644 index 00000000000..7bc3889a947 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/dvipng.1 @@ -0,0 +1,508 @@ +.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "DVIPNG 1" +.TH DVIPNG 1 "2009-02-23" "dvipng 1.12" "User commands" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +dvipng \- A DVI\-to\-PNG translator +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +dvipng [options] filename +.PP +dvipng [options] [filename] \- +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +This program makes \s-1PNG\s0 and/or \s-1GIF\s0 graphics from \s-1DVI\s0 files as obtained +from TeX and its relatives. +.PP +If \s-1GIF\s0 support is enabled, \s-1GIF\s0 output is chosen by using the +\&\fBdvigif\fR binary or with the \fB\-\-gif\fR option. +.PP +The benefits of \fBdvipng\fR/\fBdvigif\fR include +.IP "\(bu" 4 +Speed. It is a very fast bitmap-rendering code for \s-1DVI\s0 files, which +makes it suitable for generating large amounts of images on-the-fly, +as needed in preview-latex, WeBWorK and others. +.IP "\(bu" 4 +It does not read the postamble, so it can be started before TeX +finishes. There is a \fB\-\-follow\fR switch that makes dvipng wait at +end-of-file for further output, unless it finds the \s-1POST\s0 marker that +indicates the end of the \s-1DVI\s0. +.IP "\(bu" 4 +Interactive query of options. dvipng can read options interactively +through stdin, and all options are usable. It is even possible to change +the input file through this interface. +.IP "\(bu" 4 +Supports \s-1PK\s0, \s-1VF\s0, PostScript Type1, and TrueType fonts, subfonts (i.e., +as used in CJK-LaTeX), color specials, and inclusion of PostScript, +\&\s-1PNG\s0, \s-1JPEG\s0 or \s-1GIF\s0 images. +.IP "\(bu" 4 +and more... +.SH "OPTIONS" +.IX Header "OPTIONS" +Many of the parameterless options listed here can be turned off by +suffixing the option with a zero (\fB0\fR); for instance, to turn off +page reversal, use \fB\-r0\fR. Such options are marked with a trailing +\&\fB*\fR. +.IP "\fB\-\fR" 4 +.IX Item "-" +Read additional options from standard input after processing the command +line. +.IP "\fB\-\-help\fR" 4 +.IX Item "--help" +Print a usage message and exit. +.IP "\fB\-\-version\fR" 4 +.IX Item "--version" +Print the version number and exit. +.IP "\fB\-bd\fR \fInum\fR" 4 +.IX Item "-bd num" +.PD 0 +.IP "\fB\-bd\fR \fIcolor_spec\fR" 4 +.IX Item "-bd color_spec" +.IP "\fB\-bd '\fR\fInum\fR\fB \fR\fIcolor_spec\fR\fB'\fR" 4 +.IX Item "-bd 'num color_spec'" +.PD +Set the pixel width of the transparent border (default 0). Using this +option will make the image edges transparent, but it only affects pixels +with the background color. Giving a \fIcolor_spec\fR will set the +fallback color, to be used in viewers that cannot handle transparency +(the default is the background color). The color spec should be in +TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. Setting the +fallback color makes the default border width 1 px. +.IP "\fB\-\-bdpi\fR \fInum\fR" 4 +.IX Item "--bdpi num" +Set the base (Metafont) resolution, both horizontal and vertical, to +\&\fInum\fR dpi (dots per inch). This option is necessary when manually +selecting Metafont mode with the \-\-mode option (see below). +.IP "\fB\-bg\fR \fIcolor_spec\fR" 4 +.IX Item "-bg color_spec" +Choose background color for the images. This option will be ignored if +there is a background color \especial in the \s-1DVI\s0. The color spec should +be in TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. You can +also specify 'Transparent' or 'transparent' which will give you a +transparent background with the normal background as a fallback color. A +capitalized 'Transparent' will give a full-alpha transparency, while an +all-lowercase 'transparent' will give a simple fully transparent +background with non-transparent antialiased pixels. The latter would be +suitable for viewers who cannot cope with a true alpha channel. \s-1GIF\s0 +images do not support full alpha transparency, so in case of \s-1GIF\s0 output, +both variants will use the latter behaviour. +.IP "\fB\-d\fR \fInum\fR" 4 +.IX Item "-d num" +Set the debug flags, showing what dvipng (thinks it) is doing. This will +work unless dvipng has been compiled without the \f(CW\*(C`DEBUG\*(C'\fR option +(not recommended). Set the flags as you need them, use \fB\-d \-1\fR as +the first option for maximum output. +.IP "\fB\-D\fR \fInum\fR" 4 +.IX Item "-D num" +Set the output resolution, both horizontal and vertical, to \fInum\fR +dpi (dots per inch). +.Sp +One may want to adjust this to fit a certain text font size (e.g., on +a web page), and for a text font height of \fIfont_px\fR pixels (in +Mozilla) the correct formula is +.Sp +.Vb 1 +\& = * 72.27 / 10 [px * TeXpt/in / TeXpt] +.Ve +.Sp +The last division by ten is due to the standard font height 10pt in +your document, if you use 12pt, divide by 12. Unfortunately, some +proprietary browsers have font height in pt (points), not pixels. You +have to rescale that to pixels, using the screen resolution (default +is usually 96 dpi) which means the formula is +.Sp +.Vb 1 +\& = * 96 / 72 [pt * px/in / (pt/in)] +.Ve +.Sp +On some high-res screens, the value is instead 120 dpi. Good luck! +.IP "\fB\-\-depth*\fR" 4 +.IX Item "--depth*" +Report the depth of the image. This only works reliably when the +LaTeX style \fIpreview.sty\fR from preview-latex is used with +the \fBactive\fR option. It reports the number of pixels from the +bottom of the image to the baseline of the image. This can be used for +vertical positioning of the image in, e.g., web documents, where one +would use (Cascading StyleSheets 1) +.Sp +.Vb 1 +\& +.Ve +.Sp +The depth is a negative offset in this case, so the minus sign is +necessary, and the unit is pixels (px). +.IP "\fB\-\-dvinum*\fR" 4 +.IX Item "--dvinum*" +Set this option to make the output page number be the TeX page +numbers rather than the physical page number. See the \fB\-o\fR switch. +.IP "\fB\-fg\fR \fIcolor_spec\fR" 4 +.IX Item "-fg color_spec" +Choose foreground color for the images. This option will be ignored if +there is a foreground color \especial in the \s-1DVI\s0. The color spec should +be in TeX color \especial syntax, e.g., 'rgb 1.0 0.0 0.0'. +.IP "\fB\-\-follow*\fR" 4 +.IX Item "--follow*" +Wait for data at end-of-file. One of the benefits of dvipng is that it +does not read the postamble, so it can be started before TeX +finishes. This switch makes dvipng wait at end-of-file for further +output, unless it finds the \s-1POST\s0 marker that indicates the end of the +\&\s-1DVI\s0. This is similar to \fBtail \-f\fR but for DVI-to-PNG conversion. +.IP "\fB\-\-freetype*\fR" 4 +.IX Item "--freetype*" +Enable/disable FreeType font rendering (default on). This option is +available if the FreeType2 font library was present at compilation time. +If this is the case, dvipng will have direct support for PostScript +Type1 and TrueType fonts internally, rather than using \fBgsftopk\fR +for rendering the fonts. If you have PostScript versions of Computer +Modern installed, there will be no need to generate bitmapped variants +on disk of these. Then, you can render images at different (and unusual) +resolutions without cluttering the disk with lots of bitmapped fonts. +Note that if you have both FreeType and T1lib on your system, FreeType +will be preferred by dvipng. If you for some reason would want to use +T1lib rendering, use this option. +.IP "\fB\-\-gamma\fR \fInum\fR" 4 +.IX Item "--gamma num" +Control the interpolation of colors in the greyscale anti-aliasing +color palette. Default value is 1.0. For 0 < \fInum\fR < 1, the +fonts will be lighter (more like the background), and for \fInum\fR > +1, the fonts will be darker (more like the foreground). +.IP "\fB\-\-gif*\fR" 4 +.IX Item "--gif*" +The images are output in the \s-1GIF\s0 format, if \s-1GIF\s0 support is enabled. +This is the default for the \fBdvigif\fR binary, which only will be +available when \s-1GIF\s0 support is enabled. \s-1GIF\s0 images are palette images +(see the \fB\-\-palette\fR option) and does not support true alpha +channels (see the \fB\-\-bg\fR option). See also the \fB\-\-png\fR +option. +.IP "\fB\-\-height*\fR" 4 +.IX Item "--height*" +Report the height of the image. This only works reliably when the +LaTeX style \fIpreview.sty\fR from preview-latex is used with +the \fBactive\fR option. It reports the number of pixels from the top +of the image to the baseline of the image. The total height of the +image is obtained as the sum of the values reported from +\&\fB\-\-height\fR and \fB\-\-depth\fR. +.IP "\fB\-l [=]\fR\fInum\fR" 4 +.IX Item "-l [=]num" +The last page printed will be the first one numbered \fInum\fR. Default +is the last page in the document. If \fInum\fR is prefixed by an equals +sign, then it (and the argument to the \fB\-p\fR option, if specified) +is treated as a physical (absolute) page number, rather than a value to +compare with the TeX \fB\ecount0\fR values stored in the \s-1DVI\s0 file. +Thus, using \fB\-l =9\fR will end with the ninth page of the document, +no matter what the pages are actually numbered. +.IP "\fB\-\-mode\fR \fImode\fR" 4 +.IX Item "--mode mode" +Use \fImode\fR as the Metafont device name for the \s-1PK\s0 fonts (both for +path searching and font generation). This needs to be augmented with the +base device resolution, given with the \fB\-\-bdpi\fR option. See the +file <\fBftp://ftp.tug.org/tex/modes.mf\fR> for a list of resolutions and +mode names for most devices. +.IP "\fB\-M*\fR" 4 +.IX Item "-M*" +Turns off automatic \s-1PK\s0 font generation (\fImktexpk\fR). This will have +no effect when using PostScript fonts, since no \s-1PK\s0 font generation will +be done anyway. +.IP "\fB\-\-noghostscript*\fR" 4 +.IX Item "--noghostscript*" +This switch prohibits the internal call to GhostScript for displaying +PostScript specials. \fB\-\-noghostscript0\fR turns the call back on. +.IP "\fB\-\-nogssafer*\fR" 4 +.IX Item "--nogssafer*" +Normally, if GhostScript is used to render PostScript specials, the +GhostScript interpreter is run with the option \fB\-dSAFER\fR. The +\&\fB\-\-nogssafer\fR option runs GhostScript without \fB\-dSAFER\fR. The +\&\fB\-dSAFER\fR option in Ghostscript disables PostScript operators such +as deletefile, to prevent possibly malicious PostScript programs from +having any effect. +.IP "\fB\-o\fR \fIname\fR" 4 +.IX Item "-o name" +Send output to the file \fIname\fR. A single occurrence of \fB\f(CB%d\fB\fR or +\&\fB\f(CB%01d\fB\fR, ..., \fB\f(CB%09d\fB\fR will be exchanged for the physical +page number (this can be changed, see the \fB\-\-dvinum\fR switch). The +default output filename is \fIfile\fR\fB\f(CB%d\fB.png\fR where the input \s-1DVI\s0 +file was \fIfile\fR\fB.dvi\fR. +.IP "\fB\-O\fR \fIx\-offset\fR\fB,\fR\fIy\-offset\fR" 4 +.IX Item "-O x-offset,y-offset" +Move the origin by \fIx\-offset\fR,\fIy\-offset\fR, a comma-separated +pair of dimensions such as \fB.1in,\-.3cm\fR. +The origin of the page is shifted from the default position +(of one inch down, one inch to the right from the upper left corner of +the paper) by this amount. +.IP "\fB\-p [=]\fR\fInum\fR" 4 +.IX Item "-p [=]num" +The first page printed will be the first one numbered \fInum\fR. Default +is the first page in the document. If \fInum\fR is prefixed by an +equals sign, then it (and the argument to the \fB\-l\fR option, if +specified) is treated as a physical (absolute) page number, rather than +a value to compare with the TeX \fB\ecount0\fR values stored in the +\&\s-1DVI\s0 file. Thus, using \fB\-p =3\fR will start with the third page of +the document, no matter what the pages are actually numbered. +.IP "\fB\-\-palette*\fR" 4 +.IX Item "--palette*" +Starting from \fBdvipng\fR 1.8, the output \s-1PNG\s0 will be a truecolor +png when an external image is included, to avoid unnecessary delay and +quality reduction, and enable the \s-1EPS\s0 translator to draw on a +transparent background and outside of the boundingbox. This switch +will force palette (256\-color) output and make \fBdvipng\fR revert to +the old behaviour, where included images were opaque and always +clipped to the boundingbox. This will also override the +\&\fB\-\-truecolor\fR switch if present. +.IP "\fB\-\-picky*\fR" 4 +.IX Item "--picky*" +No images are output when a warning occurs. Normally, dvipng will +output an image in spite of a warning, but there may be something +missing in this image. One reason to use this option would be if you +have a more complete but slower fallback converter. Mainly, this is +useful for failed figure inclusion and unknown \especial occurrences, +but warnings will also occur for missing or unknown color specs and +missing \s-1PK\s0 fonts. +.IP "\fB\-\-png*\fR" 4 +.IX Item "--png*" +The images are output in the \s-1PNG\s0 format. This is the default for the +\&\fBdvipng\fR binary. See also the \fB\-\-gif\fR option. +.IP "\fB\-pp\fR \fIfirstpage\fR\fB\-\fR\fIlastpage\fR" 4 +.IX Item "-pp firstpage-lastpage" +Print pages \fIfirstpage\fR through \fIlastpage\fR; but not quite +equivalent to \fB\-p\fR \fIfirstpage\fR \fB\-l\fR \fIlastpage\fR. For example, +when rendering a book, there may be several instances of a page in the +\&\s-1DVI\s0 file (one in \f(CW\*(C`\efrontmatter\*(C'\fR, one in \f(CW\*(C`\emainmatter\*(C'\fR, and one +in \f(CW\*(C`\ebackmatter\*(C'\fR). In case of several pages matching, \fB\-pp\fR +\&\fIfirstpage\fR\fB\-\fR\fIlastpage\fR will render \fIall\fR pages that +matches the specified range, while \fB\-p\fR \fIfirstpage\fR \fB\-l\fR +\&\fIlastpage\fR will render the pages from the \fIfirst\fR occurrence +of \fIfirstpage\fR to the \fIfirst\fR occurrence of \fIlastpage\fR. +This is the (undocumented) behaviour of dvips. In dvipng you can give +both kinds of options, in which case you get all pages that matches the +range in \fB\-pp\fR between the pages from \fB\-p\fR to \fB\-l\fR. Also +multiple \fB\-pp\fR options accumulate, unlike \fB\-p\fR and \fB\-l\fR. +The \fB\-\fR separator can also be \fB:\fR. Note that \fB\-pp \-1\fR +will be interpreted as \*(L"all pages up to and including 1\*(R", if you want a +page numbered \-1 (only the table of contents, say) put \fB\-pp \-1\-\-1\fR, +or more readable, \fB\-pp \-1:\-1\fR. +.IP "\fB\-q*\fR" 4 +.IX Item "-q*" +Run quietly. Don't chatter about pages converted, etc. to standard +output; report no warnings (only errors) to standard error. +.IP "\fB\-Q\fR \fInum\fR" 4 +.IX Item "-Q num" +Set the quality to \fInum\fR. That is, choose the number of antialiasing +levels for \s-1PK\s0 and T1lib rendering to be \fInum\fR*\fInum\fR+1. The default +value is 4 which gives 17 levels of antialiasing for antialiased fonts +from these two. If FreeType is available, its rendering is unaffected by +this option. +.IP "\fB\-r*\fR" 4 +.IX Item "-r*" +Toggle output of pages in reverse/forward order. By default, the first +page in the \s-1DVI\s0 is output first. +.IP "\fB\-\-strict*\fR" 4 +.IX Item "--strict*" +The program exits when a warning occurs. Normally, dvipng will output +an image in spite of a warning, but there may be something missing in +this image. One reason to use this option would be if you have a more +complete but slower fallback converter. See the \fB\-\-picky\fR option +above for a list of when warnings occur. +.IP "\fB\-T\fR \fIimage_size\fR" 4 +.IX Item "-T image_size" +Set the image size to \fIimage_size\fR which can be either of +\&\fBbbox\fR, \fBtight\fR, or a comma-separated pair of dimensions +\&\fIhsize\fR,\fIvsize\fR such as \fB.1in,.3cm\fR. The default is +\&\fBbbox\fR which produces a \s-1PNG\s0 that includes all ink put on the page +and in addition the \s-1DVI\s0 origin, located 1in from the top and 1in from +the left edge of the paper. This usually gives whitespace above and to +the left in the produced image. The value \fBtight\fR will make dvipng +only include all ink put on the page, producing neat images. +.IP "\fB\-\-t1lib*\fR" 4 +.IX Item "--t1lib*" +Enable/disable T1lib font rendering (default on). This option is +available if the T1lib font library was present at compilation time. If +this is the case, dvipng will have direct support for PostScript Type1 +fonts internally, rather than using \fBgsftopk\fR for rendering the +fonts. If you have PostScript versions of Computer Modern installed, +there will be no need to generate bitmapped variants on disk of these. +Then, you can render images at different (and unusual) resolutions +without cluttering the disk with lots of bitmapped fonts. Note that if +you have both FreeType and T1lib on your system FreeType will be +preferred by dvipng, and if you for some reason rather want to use +T1lib, give the option \fB\-\-freetype0\fR (see above). +.IP "\fB\-\-truecolor*\fR" 4 +.IX Item "--truecolor*" +This will make \fBdvipng\fR generate truecolor output. Note that +truecolor output is automatic if you include an external image in your +\&\s-1DVI\s0, e.g., via a PostScript special (i.e., the \fBgraphics\fR or +\&\fBgraphicx\fR package). This switch is overridden by the +\&\fB\-\-palette\fR switch. +.IP "\fB\-v*\fR" 4 +.IX Item "-v*" +Enable verbose operation. This will currently indicate what fonts is +used, in addition to the usual output. +.IP "\fB\-x\fR \fInum\fR" 4 +.IX Item "-x num" +Set the x magnification ratio to \fInum\fR/1000. Overrides +the magnification specified in the \s-1DVI\s0 file. Must be between 10 and +100000. It is recommended that you use standard magstep values (1095, +1200, 1440, 1728, 2074, 2488, 2986, and so on) to help reduce the total +number of \s-1PK\s0 files generated. \fInum\fR may be a real number, not an +integer, for increased precision. +.IP "\fB\-z\fR \fInum\fR" 4 +.IX Item "-z num" +Set the \s-1PNG\s0 compression level to \fInum\fR. This option is enabled if +your \fBlibgd\fR is new enough. The default compression level is 1, +which selects maximum speed at the price of slightly larger PNGs. For an +older \fBlibgd\fR, the hard-soldered value 5 is used. The include file +\&\fBpng.h\fR says +\&\*(L"Currently, valid values range from 0 \- 9, corresponding directly to +the zlib compression levels 0 \- 9 (0 \- no compression, 9 \- \*(R"maximal\*(L" +compression). Note that tests have shown that zlib compression levels +3\-6 usually perform as well as level 9 for \s-1PNG\s0 images, and do +considerably fewer calculations. In the future, these values may not +correspond directly to the zlib compression levels.\*(R" +.SH "NOTES" +.IX Header "NOTES" +The full manual is accessible in the info format, on most systems by typing +.PP +.Vb 1 +\& info dvipng +.Ve +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +This program is released under the \s-1GNU\s0 Lesser General Public License +version 3, see the \s-1COPYING\s0 file in the dvipng distribution or +<\fBhttp://www.gnu.org/licenses/gpl.html\fR>. +.PP +Copyright (c) 2002\-2008 Jan-AAke Larsson diff --git a/Build/source/texk/dvipng/dvipng-1.12/dvipng.c b/Build/source/texk/dvipng/dvipng-1.12/dvipng.c new file mode 100644 index 00000000000..78b07c1a81f --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/dvipng.c @@ -0,0 +1,164 @@ +/* dvipng.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +/* This program translates TeX's DVI-Code into Portable Network Graphics. */ + +#define MAIN +#include "dvipng.h" + +#ifdef MIKTEX +# define main __cdecl Main +#endif /* MIKTEX */ +/**********************************************************************/ +/******************************* main *******************************/ +/**********************************************************************/ +int main(int argc, char ** argv) +{ + bool parsestdin; + +#ifdef TIMING +# ifdef HAVE_GETTIMEOFDAY + gettimeofday(&Tp, NULL); + timer = Tp.tv_sec + Tp.tv_usec / 1000000.0; +# else +# ifdef HAVE_FTIME + ftime(&timebuffer); + timer = timebuffer.time + timebuffer.millitm / 1000.0; +# endif +# endif +#endif + /* setbuf(stderr, NULL); */ + +#ifdef HAVE_LIBKPATHSEA + /* Use extra paths as used by dvips */ + kpse_set_program_name(argv[0],"dvips"); + /* If dvipng is not installed in the texmf tree, and _only_ + * SELFAUTO... is used in texmf.cnf, kpathsea will not find a) + * Virtual fonts b) ps2pk.map or psfonts.map c) PostScript fonts + * + * We adjust these things here + */ + /* char selfautodir[MAXPATHLEN]; + FILE *self; + self = popen("kpsewhich -expand-var='$SELFAUTODIR'", "r"); + if (!self) + ... + if (!fgets(selfautodir, MAXPATHLEN, self)) + ... + fclose(self); */ +# ifdef ENV_SELFAUTOLOC + putenv(ENV_SELFAUTOLOC); +# endif +# ifdef ENV_SELFAUTODIR + putenv(ENV_SELFAUTODIR); +# endif +# ifdef ENV_SELFAUTOPARENT + putenv(ENV_SELFAUTOPARENT); +# endif + kpse_set_program_enabled (kpse_pk_format, makeTexPK, kpse_src_compile); +#endif + + initcolor(); + parsestdin = DecodeArgs(argc, argv); + +#ifdef HAVE_LIBKPATHSEA + if (user_mfmode) + if (user_bdpi) + kpse_init_prog("DVIPNG", user_bdpi, user_mfmode, "cmr10"); + else { + Warning("--mfmode given without --bdpi"); + /* this will give a lot of warnings but... */ + kpse_init_prog("DVIPNG", 300, user_mfmode, "cmr10"); + } + else + kpse_init_prog("DVIPNG", 300, "cx", "cmr10"); +#endif + +#ifdef HAVE_FT2_OR_LIBT1 + InitPSFontMap(); +#endif + + DrawPages(); + + if (parsestdin) { + char line[STRSIZE]; + + printf("%s> ",dvi!=NULL?dvi->name:""); + fgets(line,STRSIZE,stdin); + while(!feof(stdin)) { + DecodeString(line); + if (dvi!=NULL) { + DVIReOpen(dvi); + DrawPages(); + } + printf("%s> ",dvi!=NULL?dvi->name:""); + fgets(line,STRSIZE,stdin); + } + printf("\n"); + } + +#ifdef TIMING +# ifdef HAVE_GETTIMEOFDAY + gettimeofday(&Tp, NULL); + timer = Tp.tv_sec + Tp.tv_usec/1000000.0 - timer; +# else +# ifdef HAVE_FTIME + ftime(&timebuffer); + timer = timebuffer.time + timebuffer.millitm/1000.0 - timer; +# endif +# endif + + if (ndone > 0) + fprintf(stderr, + "Time of complete run: %.2f s, %d page(s), %.4f s/page.\n", + timer, ndone, timer / ndone); + if (my_toc >= 0.0001) + fprintf(stderr, + "Thereof in TIC/TOC region %.5f s.\n",my_toc); +#endif + + ClearFonts(); + DVIClose(dvi); + ClearColorNames(); +#ifdef HAVE_FT2_OR_LIBT1 + ClearPSFontMap(); + ClearEncoding(); +#endif +#ifdef HAVE_FT2 + ClearSubfont(); + if (libfreetype!=NULL && FT_Done_FreeType(libfreetype)) + Fatal("an error occured during freetype destruction"); + libfreetype = NULL; +#endif +#ifdef HAVE_LIBT1 + if (libt1!=NULL && T1_CloseLib()) + Fatal("an error occured during t1lib destruction"); + libt1 = NULL; +#endif + + exit(exitcode); +} + + + diff --git a/Build/source/texk/dvipng/dvipng-1.12/dvipng.h b/Build/source/texk/dvipng/dvipng-1.12/dvipng.h new file mode 100644 index 00000000000..406cf879ea6 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/dvipng.h @@ -0,0 +1,581 @@ +/* dvipng.h */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#ifndef DVIPNG_H +#define DVIPNG_H +#include "config.h" + +#define STRSIZE 255 /* stringsize for file specifications */ + +#define FIRSTFNTCHAR 0 +#define LASTFNTCHAR 255 +#define NFNTCHARS LASTFNTCHAR+1 + +#define STACK_SIZE 100 /* DVI-stack size */ + +#define DEFAULT_GAMMA 1.0 + +/* Name of the program which is called to generate missing pk files */ +#define MAKETEXPK "mktexpk" + +#ifdef HAVE_INTTYPES_H +# include +#else /* HAVE_INTTYPES_H */ +# ifndef __sgi +/* IRIX has the following types typedef'd in sys/types.h already, + * i.e., _old_ IRIX systems; newer ones have a working inttypes.h */ +typedef signed char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif /* ! __sgi */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +typedef long long int64_t; +typedef unsigned long long uint64_t; +#endif /* HAVE_INTTYPES_H */ + +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif + +#include + +#ifdef HAVE_KPATHSEA_KPATHSEA_H +# include +#else +# error: kpathsea/kpathsea.h is missing from your system +#endif + +#ifdef HAVE_FT2 +#define HAVE_FT2_OR_LIBT1 +#include +#include FT_FREETYPE_H +#endif + +#ifdef HAVE_LIBT1 +#define HAVE_FT2_OR_LIBT1 +#include +#endif + +#ifdef HAVE_STDBOOL_H +# include +#else +# ifdef HAVE_KPATHSEA_KPATHSEA_H +/* boolean is an enum type from kpathsea/types.h loaded in + kpathsea/kpathsea.h, use it as fallback */ +# define bool boolean +# else +typedef int bool; +# define true (bool) 1 +# define false (bool) 0 +# endif +#endif + +#ifndef HAVE_VPRINTF +# ifdef HAVE_DOPRNT +# define vfprintf(stream, message, args) _doprnt(message, args, stream) +# else +# error: vfprintf AND _doprnt are missing!!! + /* If we have neither, should fall back to fprintf with fixed args. */ +# endif +#endif + +/* Autoconf may define malloc to rpl_malloc, if the system does not + * have a GNU Libc-compatible malloc (for which malloc(0) gives a + * valid pointer). We don't need that (yet) */ +#ifdef malloc +# undef malloc +#endif + + +/*************************************************************/ +/************************* protos.h ************************/ +/*************************************************************/ + +typedef int pixels; +typedef int32_t subpixels; +typedef int32_t dviunits; + +#define MM_TO_PXL(x) (int)(((x)*resolution*10)/254) +#define PT_TO_PXL(x) (int)((int32_t)((x)*resolution*100l)/7224) +#define PT_TO_DVI(x) (int32_t)((x)*65536l) + +/*#define PIXROUND(x,c) ((((double)x+(double)(c>>1))/(double)c)+0.5)*/ +/*#define PIXROUND(x,c) (((x)+c)/(c))*/ +/*#define PIXROUND(x,c) ((x+c-1)/(c))*/ +/*#define PIXROUND(x,c) ((x)/(c))*/ +/* integer round to the nearest number, not towards zero */ +#define PIXROUND(num,den) ((num)>0 ? ((num)+(den)/2)/(den) : -(((den)/2-(num))/(den))) + +#ifdef HAVE_ALLOCA_H +# include +#elif defined _AIX +# define alloca __alloca +#endif +#define TEMPSTR(s,a) { char* tmp=a; \ + if (tmp!=NULL) {\ + s=alloca(strlen(tmp)+1);strcpy(s,tmp);free(tmp);\ + } else \ + s=NULL;} + +/*************************************************************************/ + + +/********************************************************/ +/*********************** dvi.h ************************/ +/********************************************************/ + +#define DVI_TYPE 0 +struct dvi_data { /* dvi entry */ + int type; /* This is a DVI */ + struct dvi_data *next; + uint32_t num, den, mag; /* PRE command parameters */ + int32_t conv; /* computed from num and den */ + /* divide dvi units (sp) with conv to get mf device resolution */ + /* divide further with shrinkfactor to get true resolution */ + char * name; /* full name of DVI file */ + char * outname; /* output filename (basename) */ + FILE * filep; /* file pointer */ + time_t mtime; /* modification time */ + struct font_num *fontnump; /* DVI font numbering */ + struct page_list *pagelistp; /* DVI page list */ +#define DVI_PREVIEW_LATEX_TIGHTPAGE 1 +#define DVI_PREVIEW_BOP_HOOK (1<<1) + uint32_t flags; /* Preview-latex flags */ +}; + +#define PAGE_POST INT32_MAX +#define PAGE_LASTPAGE INT32_MAX-1 +#define PAGE_MAXPAGE INT32_MAX-2 /* assume no pages out of this range */ +#define PAGE_FIRSTPAGE INT32_MIN +#define PAGE_MINPAGE INT32_MIN+1 /* assume no pages out of this range */ + +struct dvi_color { + int red,green,blue; +}; + +struct page_list { + struct page_list* next; + int offset; /* file offset to BOP */ + int32_t count[11]; /* 10 dvi counters + absolute pagenum in file */ + int csp; /* color stack pointer at BOP */ + struct dvi_color cstack[2]; /* color stack at BOP, may be longer */ +}; + + + + +struct dvi_data* DVIOpen(char*,char*); +void DVIClose(struct dvi_data*); +bool DVIReOpen(struct dvi_data*); +struct page_list*FindPage(struct dvi_data*, int32_t, bool); +struct page_list*NextPage(struct dvi_data*, struct page_list*); +struct page_list*PrevPage(struct dvi_data*, struct page_list*); +int SeekPage(struct dvi_data*, struct page_list*); +bool DVIFollowToggle(void); +unsigned char* DVIGetCommand(struct dvi_data*); +bool DVIIsNextPSSpecial(struct dvi_data*); +uint32_t CommandLength(unsigned char*); +void ClearPSHeaders(void); + +/********************************************************/ +/********************** misc.h ************************/ +/********************************************************/ + +struct filemmap { +#ifdef MIKTEX + HANDLE hFile; + HANDLE hMap; +#else /* MIKTEX */ + int fd; +#endif /* MIKTEX */ + char* data; + size_t size; +}; + +bool DecodeArgs(int, char *[]); +void DecodeString(char *); +bool MmapFile (char *filename,struct filemmap *fmmap); +void UnMmapFile(struct filemmap* fmmap); + +void Message(int, const char *fmt, ...); +void Warning(const char *fmt, ...); +void Fatal(const char *fmt, ...); + +int32_t SNumRead(unsigned char*, register int); +uint32_t UNumRead(unsigned char*, register int); + +bool MmapFile (char *filename,struct filemmap *fmmap); +void UnMmapFile(struct filemmap* fmmap); + + +/********************************************************/ +/*********************** font.h ***********************/ +/********************************************************/ +struct encoding { + struct encoding* next; + char* name; + char* charname[257]; +}; + +struct subfont { + struct subfont* next; + char* name; + char* infix; + int encoding; + int32_t charindex[256]; +}; + +#ifdef HAVE_FT2_OR_LIBT1 +struct psfontmap { + struct psfontmap *next; + char *line,*psfile,*tfmname,*encname,*end; + struct encoding* encoding; +#ifdef HAVE_FT2 + FT_Matrix* ft_transformp; + FT_Matrix ft_transform; + struct subfont* subfont; +#endif +#ifdef HAVE_LIBT1 + T1_TMATRIX* t1_transformp; + T1_TMATRIX t1_transform; +#endif +}; +#endif + +#define FONT_TYPE_PK 1 +#define FONT_TYPE_VF 2 +#define FONT_TYPE_FT 3 +#define FONT_TYPE_T1 4 +struct char_entry { /* PK/FT/T1 Glyph/VF Macro */ + dviunits tfmw; /* TFM width */ + unsigned char *data; /* glyph data, either pixel data + * (0=transp, 255=max ink) or VF macro */ + uint32_t length; /* Length of PK data or VF macro */ + /* Only used in pixel fonts */ + pixels w,h; /* width and height in pixels */ + subpixels xOffset, yOffset; /* x offset and y offset in subpixels */ + /* Only used in PK fonts */ + unsigned char *pkdata; /* Points to beginning of PK data */ + unsigned char flag_byte; /* PK flagbyte */ +}; + +struct font_entry { /* font entry */ + int type; /* PK/VF/Type1 ... */ + struct font_entry *next; + uint32_t c, s, d; + uint8_t a, l; + char n[STRSIZE]; /* FNT_DEF command parameters */ + int dpi; /* computed from s and d */ + char name[STRSIZE]; /* full name of PK/VF file */ + struct filemmap fmmap; /* file memory map */ + uint32_t magnification; /* magnification read from font file */ + uint32_t designsize; /* design size read from font file */ + void * chr[NFNTCHARS]; /* character information */ +#ifdef HAVE_FT2 + FT_Face face; /* Freetype2 face */ +#endif +#ifdef HAVE_LIBT1 + int T1id; /* T1lib font id */ +#endif +#ifdef HAVE_FT2_OR_LIBT1 + struct psfontmap* psfontmap; /* Font transformation */ +#endif + struct font_num *vffontnump; /* VF local font numbering */ + int32_t defaultfont; /* VF default font number */ +}; + +struct font_num { /* Font number. Different for VF/DVI, and several + font_num can point to one font_entry */ + struct font_num *next; + int32_t k; + struct font_entry *fontp; +}; + +void CheckChecksum(uint32_t, uint32_t, const char*); +void InitPK (struct font_entry *newfontp); +void DonePK(struct font_entry *oldfontp); +void InitVF (struct font_entry *newfontp); +void DoneVF(struct font_entry *oldfontp); + +void FontDef(unsigned char*, void* /* dvi/vf */); +void ClearFonts(void); +void SetFntNum(int32_t, void* /* dvi/vf */); +void FreeFontNumP(struct font_num *hfontnump); + +#ifdef HAVE_FT2_OR_LIBT1 +char* copyword(char* orig); +struct psfontmap *NewPSFont(struct psfontmap* copyfrom); +void InitPSFontMap(void); +void ClearPSFontMap(void); +struct psfontmap* FindPSFontMap(char*); +struct encoding* FindEncoding(char*); +void ClearEncoding(void); +bool ReadTFM(struct font_entry *, char*); +#endif + +#ifdef HAVE_FT2 +bool InitFT(struct font_entry *); +void DoneFT(struct font_entry *tfontp); +void LoadFT(int32_t, struct char_entry *); +struct psfontmap* FindSubFont(struct psfontmap* entry, char* fontname); +void ClearSubfont(void); +#endif + +#ifdef HAVE_LIBT1 +bool InitT1(struct font_entry *); +void DoneT1(struct font_entry *tfontp); +void LoadT1(int32_t, struct char_entry *); +#endif + +/********************************************************/ +/********************* ppagelist.h ********************/ +/********************************************************/ + +bool ParsePages(const char*); +void FirstPage(int32_t,bool); +void LastPage(int32_t,bool); +void ClearPpList(void); +void Reverse(bool); +struct page_list* NextPPage(void* /* dvi */, struct page_list*); + + + + +#ifdef MAIN +#define EXTERN +#define INIT(x) =x +#else +#define EXTERN extern +#define INIT(x) +#endif + +/********************************************************/ +/********************** draw.h ************************/ +/********************************************************/ +#include "commands.h" + +void CreateImage(pixels width, pixels height); +void DestroyImage(void); +void DrawCommand(unsigned char*, void* /* dvi/vf */); +void DrawPages(void); +void WriteImage(char*, int); +void LoadPK(int32_t, register struct char_entry *); +int32_t SetChar(int32_t); +dviunits SetGlyph(int32_t c, int32_t hh,int32_t vv); +void Gamma(double gamma); +int32_t SetVF(int32_t); +int32_t SetRule(int32_t, int32_t, int32_t, int32_t); +void SetSpecial(char *, int32_t, int32_t); +void BeginVFMacro(struct font_entry*); +void EndVFMacro(void); + +/**************************************************/ +void handlepapersize(const char*,int32_t*,int32_t*); + +void stringrgb(const char* colorstring,int *r,int *g,int *b); +void background(const char *); +void initcolor(void); +void popcolor(void); +void pushcolor(const char *); +void resetcolorstack(const char *); +void StoreColorStack(struct page_list *tpagep); +void ReadColorStack(struct page_list *tpagep); +void StoreBackgroundColor(struct page_list *tpagep); +void ClearColorNames(void); +void InitXColorPrologue(const char* prologuename); + +/**********************************************************************/ +/************************* Global Variables *************************/ +/**********************************************************************/ + +#ifdef MAKETEXPK +#ifdef HAVE_LIBKPATHSEA +EXTERN bool makeTexPK INIT(MAKE_TEX_PK_BY_DEFAULT); +#else +EXTERN bool makeTexPK INIT(_TRUE); +#endif +#endif + +EXTERN uint32_t usermag INIT(0); /* user specified magstep */ +EXTERN struct font_entry *hfontptr INIT(NULL); /* font list pointer */ + +EXTERN struct internal_state { + struct font_entry* currentfont; +} current_state; + +#define BE_NONQUIET 1 +#define BE_VERBOSE (1<<1) +#define PARSE_STDIN (1<<2) +#define EXPAND_BBOX (1<<3) +#define TIGHT_BBOX (1<<4) +/* #define CACHE_IMAGES (1<<5) */ +#define FORCE_TRUECOLOR (1<<6) +#define USE_FREETYPE (1<<7) +#define USE_LIBT1 (1<<8) +#define REPORT_HEIGHT (1<<9) +#define REPORT_DEPTH (1<<10) +#define DVI_PAGENUM (1<<11) +#define MODE_PICKY (1<<12) +#define GIF_OUTPUT (1<<15) +#define MODE_STRICT (1<<16) +#define NO_GHOSTSCRIPT (1<<17) +#define NO_GSSAFER (1<<18) +#define BG_TRANSPARENT (1<<19) +#define BG_TRANSPARENT_ALPHA (1<<20) +#define FORCE_PALETTE (1<<22) +EXTERN uint32_t option_flags INIT(BE_NONQUIET | USE_FREETYPE | USE_LIBT1); + +#define PAGE_GAVE_WARN 1 +#define PAGE_PREVIEW_BOP (1<<1) +#define PAGE_TRUECOLOR (1<<2) +EXTERN uint32_t page_flags INIT(0); + + +#ifdef DEBUG +EXTERN unsigned int debug INIT(0); +#define DEBUG_PRINT(a,b) if (debug & a) { printf b; fflush(stdout); } +#define DEBUG_DVI 1 +#define DEBUG_VF (1<<1) +#define DEBUG_PK (1<<2) +#define DEBUG_TFM (1<<3) +#define DEBUG_GLYPH (1<<4) +#define DEBUG_FT (1<<5) +#define DEBUG_ENC (1<<6) +#define DEBUG_COLOR (1<<7) +#define DEBUG_GS (1<<8) +#define DEBUG_T1 (1<<9) +#define LASTDEBUG DEBUG_T1 +#define DEBUG_DEFAULT DEBUG_DVI +#else +#define DEBUG_PRINT(a,b) +#endif + +/************************timing stuff*********************/ +#ifdef TIMING +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif +EXTERN double timer INIT(0); +EXTERN double my_tic,my_toc INIT(0); +EXTERN int ndone INIT(0); /* number of pages converted */ +# ifdef HAVE_GETTIMEOFDAY +EXTERN struct timeval Tp; +# define TIC { gettimeofday(&Tp, NULL); \ + my_tic= Tp.tv_sec + Tp.tv_usec/1000000.0;} +# define TOC { gettimeofday(&Tp, NULL); \ + my_toc += Tp.tv_sec + Tp.tv_usec/1000000.0 - my_tic;} +# else +# ifdef HAVE_FTIME +EXTERN struct timeb timebuffer; +# define TIC() { ftime(&timebuffer); \ + my_tic= timebuffer.time + timebuffer.millitm/1000.0; +# define TOC() { ftime(&timebuffer); \ + my_toc += timebuffer.time + timebuffer.millitm/1000.0 - my_tic;} +# else +# define TIC() +# define TOC() +# endif +# endif +#endif /* TIMING */ + +EXTERN char* user_mfmode INIT(NULL); +EXTERN int user_bdpi INIT(0); +EXTERN int dpi INIT(100); + +#ifdef HAVE_GDIMAGEPNGEX +EXTERN int compression INIT(1); +#endif +#ifdef MIKTEX +#undef min +#undef max +#endif /* MIKTEX */ +# define max(x,y) if ((y)>(x)) x = y +# define min(x,y) if ((y)<(x)) x = y + +/* These are in pixels*/ +EXTERN int x_min INIT(0); +EXTERN int y_min INIT(0); +EXTERN int x_max INIT(0); +EXTERN int y_max INIT(0); + +/* Page size: default set by -T */ +EXTERN int x_width_def INIT(0); +EXTERN int y_width_def INIT(0); + +/* Offset: default set by -O and -T bbox */ +EXTERN int x_offset_def INIT(0); +EXTERN int y_offset_def INIT(0); + +/* Preview-latex's tightpage */ +EXTERN int x_width_tightpage INIT(0); +EXTERN int y_width_tightpage INIT(0); +EXTERN int x_offset_tightpage INIT(0); +EXTERN int y_offset_tightpage INIT(0); + +/* Paper size: set by -t, for cropmark purposes only */ +/* This has yet to be written */ +EXTERN int x_pwidth INIT(0); +EXTERN int y_pwidth INIT(0); + +/* The transparent border preview-latex desires */ +EXTERN int borderwidth INIT(0); + +/* fallback color for transparent background */ +EXTERN bool userbordercolor INIT(FALSE); /* if true, use user-supplied color */ +EXTERN struct dvi_color bordercolor; + + +EXTERN gdImagePtr page_imagep INIT(NULL); +EXTERN int32_t shrinkfactor INIT(4); + +EXTERN struct dvi_color cstack[STACK_SIZE]; +EXTERN int csp INIT(1); + +EXTERN struct font_entry* currentfont; +EXTERN struct dvi_data* dvi INIT(NULL); + +#ifdef HAVE_FT2 +EXTERN FT_Library libfreetype INIT(NULL); +#endif + +#ifdef HAVE_LIBT1 +EXTERN void* libt1 INIT(NULL); +#endif + +#define EXIT_FATAL EXIT_FAILURE+1 +EXTERN int exitcode INIT(EXIT_SUCCESS); + +#endif /* DVIPNG_H */ diff --git a/Build/source/texk/dvipng/dvipng-1.12/enc.c b/Build/source/texk/dvipng/dvipng-1.12/enc.c new file mode 100644 index 00000000000..677799886b0 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/enc.c @@ -0,0 +1,124 @@ +/* enc.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" + +struct encoding* encodingp=NULL; + +static struct encoding* InitEncoding(char* encoding) +{ + char *pos,*max,*buf,*enc_file; + int i; + struct encoding* encp=NULL; + struct filemmap fmmap; + +#ifdef HAVE_KPSE_ENC_FORMATS + TEMPSTR(enc_file,kpse_find_file(encoding,kpse_enc_format,false)); +#else + TEMPSTR(enc_file,kpse_find_file(encoding,kpse_tex_ps_header_format,false)); +#endif + if (enc_file == NULL) { + Warning("encoding file %s could not be found",encoding); + return(NULL); + } + DEBUG_PRINT((DEBUG_FT|DEBUG_ENC),("\n OPEN ENCODING:\t'%s'", enc_file)); + if (MmapFile(enc_file,&fmmap)) return(NULL); + if ((encp = calloc(sizeof(struct encoding)+strlen(encoding)+1 + +fmmap.size,1))==NULL) { + Warning("cannot alloc space for encoding",enc_file); + UnMmapFile(&fmmap); + return(NULL); + } + encp->name=(char*)encp+sizeof(struct encoding); + strcpy(encp->name,encoding); + pos=fmmap.data; + max=fmmap.data+fmmap.size; + buf=encp->name+strlen(encoding)+1; +#define SKIPCOMMENT(x) if (*x=='%') while (xcharname[256]=buf; + while(poscharname[256])); + while (pos < max && *pos!='[') { + SKIPCOMMENT(pos); + pos++; + } + while(poscharname[i++]=buf; + while(poscharname[i-1])); + while(posname)!=0) + temp=temp->next; + if (temp==NULL) { + temp=InitEncoding(encoding); + if (temp!=NULL) { + temp->next=encodingp; + encodingp=temp; + } + } + return(temp); +} + +void ClearEncoding(void) +{ + struct encoding *temp=encodingp; + + while(temp!=NULL) { + encodingp=encodingp->next; + free(temp); + temp=encodingp; + } +} diff --git a/Build/source/texk/dvipng/dvipng-1.12/font.c b/Build/source/texk/dvipng/dvipng-1.12/font.c new file mode 100644 index 00000000000..048395b8811 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/font.c @@ -0,0 +1,377 @@ +/* font.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" + +void CheckChecksum(uint32_t c1, uint32_t c2, const char* name) +{ + /* Report a warning if both checksums are nonzero, they don't match, + and the user hasn't turned it off. */ + if (c1 && c2 && c1 != c2 +#ifdef HAVE_LIBKPATHSEA + && !kpse_tex_hush ("checksum") +#endif + ) { + Warning ("checksum mismatch in %s", name) ; + } +} + + +static double ActualFactor(uint32_t unmodsize) +/* compute the actual size factor given the approximation */ +/* actually factor * 1000 */ +{ + double realsize; /* the actual magnification factor */ + realsize = (double)unmodsize / 1000.0; + if (abs((int)(unmodsize - 1095l))<2) + realsize = 1.095445115; /*stephalf*/ + else if (abs((int)(unmodsize - 1315l))<2) + realsize = 1.31453414; /*stepihalf*/ + else if (abs((int)(unmodsize - 1577l))<2) + realsize = 1.57744097; /*stepiihalf*/ + else if (abs((int)(unmodsize - 1893l))<2) + realsize = 1.89292916; /*stepiiihalf*/ + else if (abs((int)(unmodsize - 2074l))<2) + realsize = 2.0736; /*stepiv*/ + else if (abs((int)(unmodsize - 2488l))<2) + realsize = 2.48832; /*stepv*/ + else if (abs((int)(unmodsize - 2986l))<2) + realsize = 2.985984; /*stepvi*/ + /* the remaining magnification steps are represented with sufficient + accuracy already */ + return(realsize); +} + + +void FontDef(unsigned char* command, void* parent) +{ + int32_t k; + uint32_t c, s, d; + uint8_t a, l; + unsigned char* current; + struct font_entry *tfontptr; /* temporary font_entry pointer */ + struct font_num *tfontnump = NULL; /* temporary font_num pointer */ + unsigned short i; + + current = command + 1; + k = UNumRead(current, (int)*command - FNT_DEF1 + 1); + current += (int)*command - FNT_DEF1 + 1; + c = UNumRead(current, 4); /* checksum */ + s = UNumRead(current+4, 4); /* space size */ + d = UNumRead(current+8, 4); /* design size */ + a = UNumRead(current+12, 1); /* length for font name */ + l = UNumRead(current+13, 1); /* device length */ + if (((struct font_entry*)parent)->type==FONT_TYPE_VF) { + DEBUG_PRINT(DEBUG_VF,(" %d %d %d",k,c,s)); + /* Rescale. s is relative to the actual scale /(1<<20) */ + s = (uint32_t)((uint64_t) s * (((struct font_entry*) parent)->s) + / (1<<20)); + DEBUG_PRINT(DEBUG_VF,(" (%d) %d",s,d)); + /* Oddly, d differs in the DVI and the VF that my system produces */ + d = (uint32_t)((uint64_t) d * ((struct font_entry*)parent)->d + / ((struct font_entry*)parent)->designsize); + DEBUG_PRINT(DEBUG_VF,(" (%d)",d)); + DEBUG_PRINT(DEBUG_VF,(" %d %d '%.*s'",a,l,a+l,current+14)); +#ifdef DEBUG + } else { + DEBUG_PRINT(DEBUG_DVI,(" %d %d %d %d %d %d '%.*s'",k,c,s,d,a,l, + a+l,current+14)); +#endif + } + if (a+l > STRSIZE-1) + Fatal("too long font name for font %ld",k); + + /* Find entry with this font number in use */ + switch (((struct font_entry*)parent)->type) { + case FONT_TYPE_VF: + tfontnump = ((struct font_entry*)parent)->vffontnump; + break; + case DVI_TYPE: + tfontnump = ((struct dvi_data*)parent)->fontnump; + } + while (tfontnump != NULL && tfontnump->k != k) { + tfontnump = tfontnump->next; + } + /* If found, return if it is correct */ + if (tfontnump!=NULL + && tfontnump->fontp->s == s + && tfontnump->fontp->d == d + && strlen(tfontnump->fontp->n) == a+l + && strncmp(tfontnump->fontp->n,(char*)current+14,a+l) == 0) { + DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n FONT %d:\tMatch found",k)); + return; + } + /* If not found, create new */ + if (tfontnump==NULL) { + if ((tfontnump=malloc(sizeof(struct font_num)))==NULL) + Fatal("cannot allocate memory for new font number"); + tfontnump->k=k; + switch (((struct font_entry*)parent)->type) { + case FONT_TYPE_VF: + tfontnump->next=((struct font_entry*)parent)->vffontnump; + ((struct font_entry*)parent)->vffontnump=tfontnump; + break; + case DVI_TYPE: + tfontnump->next=((struct dvi_data*)parent)->fontnump; + ((struct dvi_data*)parent)->fontnump=tfontnump; + } + } + + /* Search font list for possible match */ + tfontptr = hfontptr; + while (tfontptr != NULL + && (tfontptr->s != s + || tfontptr->d != d + || strlen(tfontptr->n) != a+l + || strncmp(tfontptr->n,(char*)current+14,a+l) != 0 ) ) { + tfontptr = tfontptr->next; + } + /* If found, set its number and return */ + if (tfontptr!=NULL) { + DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n FONT %d:\tMatch found, number set",k)); + tfontnump->fontp = tfontptr; + return; + } + + DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n FONT %d:\tNew entry created",k)); + /* No fitting font found, create new entry. */ + if ((tfontptr = calloc(1,sizeof(struct font_entry))) == NULL) + Fatal("cannot malloc space for font_entry"); + tfontptr->next = hfontptr; + hfontptr = tfontptr; + tfontnump->fontp = tfontptr; +#ifndef MIKTEX + tfontptr->fmmap.fd = 0; +#else /* MIKTEX */ + tfontptr->fmmap.hFile = INVALID_HANDLE_VALUE; +#endif + tfontptr->c = c; /* checksum */ + tfontptr->s = s; /* space size */ + tfontptr->d = d; /* design size */ + tfontptr->a = a; /* length for font name */ + tfontptr->l = l; /* device length */ + strncpy(tfontptr->n,(char*)current+14,a+l); /* full font name */ + tfontptr->n[a+l] = '\0'; + + tfontptr->name[0] = '\0'; + for (i = FIRSTFNTCHAR; i <= LASTFNTCHAR; i++) { + tfontptr->chr[i] = NULL; + } + + tfontptr->dpi = + (uint32_t)((ActualFactor((uint32_t)(1000.0*tfontptr->s + /(double)tfontptr->d+0.5)) + * ActualFactor(dvi->mag) * dpi*shrinkfactor) + 0.5); +#ifdef HAVE_FT2_OR_LIBT1 + tfontptr->psfontmap=NULL; +#endif +} + +#ifdef HAVE_FT2_OR_LIBT1 +static char* kpse_find_t1_or_tt(char* filename) +{ + char* filepath = kpse_find_file(filename, kpse_type1_format, false); +#ifdef HAVE_FT2 + if ((option_flags & USE_FREETYPE) && filepath==NULL) + filepath = kpse_find_file(filename, kpse_truetype_format, false); +#endif + return(filepath); +} +#endif + +static void FontFind(struct font_entry * tfontptr) +{ +#ifdef HAVE_LIBKPATHSEA + kpse_glyph_file_type font_ret; + char *name; + + /* tfontptr->dpi = kpse_magstep_fix (tfontptr->dpi, resolution, NULL); */ + DEBUG_PRINT(DEBUG_DVI,("\n FIND FONT:\t%s %d",tfontptr->n,tfontptr->dpi)); + + TEMPSTR(name,kpse_find_vf (tfontptr->n)); + if (name!=NULL) { + strcpy (tfontptr->name, name); + InitVF(tfontptr); + } +#ifdef HAVE_FT2_OR_LIBT1 + if ((option_flags & (USE_FREETYPE | USE_LIBT1)) && name==NULL) { + tfontptr->psfontmap = FindPSFontMap(tfontptr->n); + if (tfontptr->psfontmap!=NULL) { + TEMPSTR(name,kpse_find_t1_or_tt(tfontptr->psfontmap->psfile)); + } else + TEMPSTR(name,kpse_find_t1_or_tt(tfontptr->n)); + if (name!=NULL) { + strcpy (tfontptr->name, name); + TEMPSTR(name,kpse_find_file(tfontptr->n, kpse_tfm_format, false)); + if (name!=NULL) { + if (!ReadTFM(tfontptr,name)) { + Warning("unable to read tfm file %s", name); + name=NULL; + } else +#ifdef HAVE_FT2 + if ((option_flags & USE_FREETYPE)==0 || !InitFT(tfontptr)) { +#endif +#ifdef HAVE_LIBT1 + if ((option_flags & USE_LIBT1)==0 || !InitT1(tfontptr)) { +#endif + /* if Freetype or T1 loading fails for some reason, fall + back to PK font */ + name=NULL; + } +#ifdef HAVE_FT2 +#ifdef HAVE_LIBT1 + } +#endif +#endif + } + } + } +#endif /* HAVE_FT2_OR_LIBT1 */ + if (name==NULL) { + TEMPSTR(name,kpse_find_pk (tfontptr->n, tfontptr->dpi, &font_ret)); + if (name!=NULL) { + strcpy (tfontptr->name, name); + if (!FILESTRCASEEQ (tfontptr->n, font_ret.name)) { + page_flags |= PAGE_GAVE_WARN; + Warning("font %s not found, using %s at %d dpi instead", + tfontptr->n, font_ret.name, font_ret.dpi); + tfontptr->c = 0; /* no checksum warning */ + } else if (!kpse_bitmap_tolerance ((double)font_ret.dpi, (double) tfontptr->dpi)) { + page_flags |= PAGE_GAVE_WARN; + Warning("font %s at %d dpi not found, using %d dpi instead", + tfontptr->name, tfontptr->dpi, font_ret.dpi); + } + InitPK(tfontptr); + } else { + page_flags |= PAGE_GAVE_WARN; + Warning("font %s at %d dpi not found, characters will be left blank", + tfontptr->n, tfontptr->dpi); + strcpy (tfontptr->name, "None"); +#ifndef MIKTEX + tfontptr->fmmap.fd = 0; +#else /* MIKTEX */ + tfontptr->fmmap.hFile = INVALID_HANDLE_VALUE; +#endif + tfontptr->magnification = 0; + tfontptr->designsize = 0; + } + } +#else /* not HAVE_LIBKPATHSEA */ + /* Ouch time! findfile not implemented (old cruft from dvilj) */ + /* Total argh, since none of this is adapted to vf and the like */ + if (!(findfile(PXLpath, + tfontptr->n, + tfontptr->dpi, + tfontptr->name, + false, + 0))) { + Warning(tfontptr->name); /* contains error messsage */ +#ifndef MIKTEX + tfontptr->fmmap.fd = 0; +#else /* MIKTEX */ + tfontptr->fmmap.hFile = INVALID_HANDLE_VALUE; +#endif +#ifdef __riscos + MakeMetafontFile(PXLpath, tfontptr->n, tfontptr->dpi); +#endif + } +#endif +} + + +static void DoneFont(struct font_entry *tfontp) +{ + switch (tfontp->type) { + case FONT_TYPE_PK: + DonePK(tfontp); + break; + case FONT_TYPE_VF: + DoneVF(tfontp); + break; +#ifdef HAVE_FT2 + case FONT_TYPE_FT: + DoneFT(tfontp); + break; +#endif +#ifdef HAVE_LIBT1 + case FONT_TYPE_T1: + DoneT1(tfontp); + break; +#endif + } +} + + +void FreeFontNumP(struct font_num *hfontnump) +{ + struct font_num *tmp; + while(hfontnump!=NULL) { + tmp=hfontnump->next; + free(hfontnump); + hfontnump=tmp; + } +} + +void ClearFonts(void) +{ + struct font_entry *tmp; + + while(hfontptr!=NULL) { + tmp=hfontptr->next; + DoneFont(hfontptr); + free(hfontptr); + hfontptr=tmp; + } + if (dvi!=NULL) + FreeFontNumP(dvi->fontnump); +} + +/*-->SetFntNum*/ +/**********************************************************************/ +/**************************** SetFntNum *****************************/ +/**********************************************************************/ +void SetFntNum(int32_t k, void* parent /* dvi/vf */) +/* this routine is used to specify the font to be used in printing future + characters */ +{ + struct font_num *tfontnump=NULL; /* temporary font_num pointer */ + + switch (((struct font_entry*)parent)->type) { + case FONT_TYPE_VF: + tfontnump = ((struct font_entry*)parent)->vffontnump; + break; + case DVI_TYPE: + tfontnump = ((struct dvi_data*)parent)->fontnump; + } + while (tfontnump != NULL && tfontnump->k != k) + tfontnump = tfontnump->next; + if (tfontnump == NULL) + Fatal("font %d undefined", k); + + currentfont = tfontnump->fontp; + if (currentfont->name[0]=='\0') + FontFind(currentfont); +} + + diff --git a/Build/source/texk/dvipng/dvipng-1.12/fontmap.c b/Build/source/texk/dvipng/dvipng-1.12/fontmap.c new file mode 100644 index 00000000000..a2d0614a876 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/fontmap.c @@ -0,0 +1,342 @@ +/* fontmap.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" + +static struct filemmap psfont_mmap; +#ifdef HAVE_FT2 +static struct filemmap ttfont_mmap; +#endif +static struct psfontmap *psfontmap=NULL; + +static char* newword(char** buffer, char* end) +{ + char *word,*pos=*buffer; + + while(posline = copyfrom->line; + newentry->tfmname = copyword(copyfrom->tfmname); + newentry->psfile = copyword(copyfrom->psfile); + newentry->encname = copyword(copyfrom->encname); + newentry->encoding = copyfrom->encoding; +#ifdef HAVE_LIBT1 + newentry->t1_transformp = copyfrom->t1_transformp; +#endif +#ifdef HAVE_FT2 + newentry->ft_transformp = copyfrom->ft_transformp; + newentry->subfont = copyfrom->subfont; +#endif + newentry->end = copyfrom->end; + } else { + newentry->line = NULL; + newentry->tfmname = NULL; + newentry->psfile = NULL; + newentry->encname = NULL; + newentry->encoding = NULL; +#ifdef HAVE_LIBT1 + newentry->t1_transformp = NULL; +#endif +#ifdef HAVE_FT2 + newentry->ft_transformp = NULL; + newentry->subfont = NULL; +#endif + newentry->end = NULL; + } + newentry->next=psfontmap; + psfontmap=newentry; + return(newentry); +} + +static struct psfontmap *SearchPSFontMap(char* fontname, + struct filemmap* search_mmap) +{ + static char *pos=NULL,*end=NULL; + static struct filemmap* searching_mmap=NULL; + struct psfontmap *entry=NULL; + + if (pos==end && search_mmap!=searching_mmap) { + searching_mmap=search_mmap; + pos=searching_mmap->data; + end=searching_mmap->data+searching_mmap->size; + } + while(postfmname,fontname)!=0)) { + while(pos < end + && (*pos=='\n' || *pos==' ' || *pos=='\t' + || *pos=='%' || *pos=='*' || *pos==';' || *pos=='#')) { + while(pos < end && *pos!='\n') pos++; /* skip comments/empty rows */ + pos++; + } + if (pos < end) { + entry=NewPSFont(NULL); + entry->line = pos; + /* skip tfmname = newword(&pos,end); + while(pos < end && *pos!='\n') pos++; + entry->end = pos; + } + pos++; + } + if (entry!=NULL && strcmp(entry->tfmname,fontname)!=0) + entry=NULL; + return(entry); +} + +void ClearPSFontMap(void) +{ + struct psfontmap *entry; + + while(psfontmap!=NULL) { + entry=psfontmap; + psfontmap=psfontmap->next; + free(entry->tfmname); + if (entry->psfile!=NULL) + free(entry->psfile); + if (entry->encname!=NULL) + free(entry->encname); + free(entry); + } + UnMmapFile(&psfont_mmap); +#ifdef HAVE_FT2 + UnMmapFile(&ttfont_mmap); +#endif +} + +static void ReadPSFontMap(struct psfontmap *entry) +{ + char *pos,*end,*psname; + int nameno = 0; + + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\n PSFONTMAP: %s ",entry->tfmname)); + pos=entry->line; + end=entry->end; + while(pos < end) { + if (*pos=='<') { /* filename follows */ + pos++; + if (pospsfile = newword((char**)&pos,end); + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<%s ",entry->psfile)); + } else if (posencname = newword((char**)&pos,end); + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); + } else { /* encname=word; + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); + } else { /* psfile=word; + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<%s ",entry->psfile)); + } + } + } else if (*pos=='"') { /* PS code: reencoding/tranformation exists */ + char *word; + double cxx=1.0,cxy=0.0; + pos++; + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\"")); + while(pos < end && *pos!='"') { + word=newword((char**)&pos,end); + while(pos < end && (*pos==' ' || *pos=='\t')) pos++; + if (pos+10ft_transformp=&(entry->ft_transform); + entry->ft_transform.xx=(FT_Fixed)(cxx*0x10000); + entry->ft_transform.xy=(FT_Fixed)(cxy*0x10000); + entry->ft_transform.yx=0; + entry->ft_transform.yy=0x10000; +#endif +#ifdef HAVE_LIBT1 + entry->t1_transformp=&(entry->t1_transform); + entry->t1_transform.cxx=cxx; + entry->t1_transform.cxy=cxy; + entry->t1_transform.cyx=0.0; + entry->t1_transform.cyy=1.0; +#endif + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\" ")); + pos++; + } else { /* bare word */ + switch (++nameno) { + case 1: /* first word is tfmname and perhaps psname, NOT psfile */ + while(postfmname; + break; + case 2: /* second word is psname, NOT psfile */ + psname = newword((char**)&pos,end); + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("(%s) ",psname)); + free(psname); + break; + case 3: /* third word is encoding */ + entry->encname = newword((char**)&pos,end); + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); + break; + default: + while(pospsfile==NULL) { + /* No psfile-name given, use tfmname */ + entry->psfile=copyword(entry->tfmname); + DEBUG_PRINT((DEBUG_FT|DEBUG_T1),(" <%s ",entry->psfile)); + } + if (entry->encname!=NULL + && (entry->encoding=FindEncoding(entry->encname))==NULL) + Warning("unable to load font encoding '%s' for %s", + entry->encname,entry->tfmname); +} + + +struct psfontmap* FindPSFontMap(char* fontname) +{ + struct psfontmap *entry; + static struct filemmap* search_mmap_p=&psfont_mmap; + + entry=psfontmap; + while(entry!=NULL && strcmp(entry->tfmname,fontname)!=0) + entry=entry->next; + if(entry==NULL) { + entry=SearchPSFontMap(fontname,search_mmap_p); +#ifdef HAVE_FT2 + if(entry==NULL && search_mmap_p!=&ttfont_mmap) { + search_mmap_p=&ttfont_mmap; + entry=SearchPSFontMap(fontname,search_mmap_p); + } +#endif + } +#ifdef HAVE_FT2 + if(entry==NULL) { + struct psfontmap* entry_subfont=NULL; + entry=psfontmap; + while(entry!=NULL && strcmp(entry->tfmname,fontname)!=0) { + while(entry!=NULL && strchr(entry->tfmname,'@')==NULL) + entry=entry->next; + if (entry!=NULL) { + entry_subfont=FindSubFont(entry,fontname); + if (entry_subfont!=NULL) + entry=entry_subfont; + else + entry=entry->next; + } + } + } +#endif + if (entry!=NULL && entry->psfile==NULL) + ReadPSFontMap(entry); + if (entry!=NULL && entry->encname!=NULL && entry->encoding==NULL) + /* Encoding given but it cannot be found. Unusable font */ + return(NULL); + return(entry); +} diff --git a/Build/source/texk/dvipng/dvipng-1.12/ft.c b/Build/source/texk/dvipng/dvipng-1.12/ft.c new file mode 100644 index 00000000000..10274a6db6a --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/ft.c @@ -0,0 +1,174 @@ +/* ft.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" +#ifdef HAVE_ALLOCA_H +# include +#endif + +void LoadFT(int32_t c, struct char_entry * ptr) +{ + FT_Bitmap bitmap; + FT_UInt glyph_i; + int i,j,k; + unsigned char* bit; + + DEBUG_PRINT(DEBUG_FT,("\n LOAD FT CHAR\t%d (%d)",c,ptr->tfmw)); + if (currentfont->psfontmap!=NULL + && currentfont->psfontmap->encoding != NULL) { + DEBUG_PRINT(DEBUG_FT,(" %s",currentfont->psfontmap->encoding->charname[c])); + glyph_i = FT_Get_Name_Index(currentfont->face, + currentfont->psfontmap->encoding->charname[c]); + } else if (currentfont->psfontmap!=NULL + && currentfont->psfontmap->subfont != NULL) { + glyph_i = FT_Get_Char_Index( currentfont->face, + currentfont->psfontmap->subfont->charindex[c] ); + DEBUG_PRINT(DEBUG_FT,(" 0x%X",currentfont->psfontmap->subfont->charindex[c])); + } else + glyph_i = FT_Get_Char_Index( currentfont->face, c ); + if (FT_Load_Glyph( currentfont->face, glyph_i, + FT_LOAD_RENDER | FT_LOAD_TARGET_LIGHT ) + /* On some configurations (with FreeType <= 2.1.7) the above + fails, while the below works */ + && FT_Load_Glyph( currentfont->face, glyph_i, + FT_LOAD_RENDER | FT_LOAD_NO_HINTING )) + Fatal("cannot load FT char %d",c); + ptr->xOffset = -currentfont->face->glyph->bitmap_left*shrinkfactor; + ptr->yOffset = (currentfont->face->glyph->bitmap_top-1)*shrinkfactor; + bitmap=currentfont->face->glyph->bitmap; + DEBUG_PRINT(DEBUG_FT,(" (%dx%d)",bitmap.width,bitmap.rows)); + + if ((ptr->data = calloc(bitmap.width*bitmap.rows,sizeof(char))) == NULL) + Fatal("unable to allocate image space for char %c", (char)c); + ptr->w = bitmap.width; + ptr->h = bitmap.rows; + +#define GREYLEVELS 16 + DEBUG_PRINT(DEBUG_GLYPH,("\nDRAW GLYPH %d\n", (int)c)); + bit=ptr->data; + for(i=0;i0 ? k*16-1 : 0; */ + DEBUG_PRINT(DEBUG_GLYPH,("%3u ",k)); + bit[i*bitmap.width+j]=k; + } + DEBUG_PRINT(DEBUG_GLYPH,("|\n")); + } +} + +bool InitFT(struct font_entry * tfontp) +{ + int error; + + if (libfreetype==NULL) { + if (FT_Init_FreeType( &libfreetype )) { + Warning("an error occured during freetype initialisation, disabling it"); + option_flags &= ~USE_FREETYPE; + return(false); + } +# ifdef DEBUG + else { + FT_Int amajor, aminor, apatch; + + DEBUG_PRINT(DEBUG_FT,("\n COMPILED WITH FREETYPE %d.%d.%d", + FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH)); +# ifdef HAVE_FT_LIBRARY_VERSION + FT_Library_Version( libfreetype, &amajor, &aminor, &apatch ); + DEBUG_PRINT(DEBUG_FT,("\n USING LIBFT %d.%d.%d", + amajor, aminor, apatch)); +# endif + } +# endif + } + DEBUG_PRINT((DEBUG_DVI|DEBUG_FT),("\n OPEN FT FONT:\t'%s'", tfontp->name)); + error = FT_New_Face( libfreetype, tfontp->name, 0, &tfontp->face ); + if (error == FT_Err_Unknown_File_Format) { + Warning("font file %s has unknown format", tfontp->name); + return(false); + } else if (error) { + Warning("font file %s could not be opened", tfontp->name); + return(false); + } + Message(BE_VERBOSE,"<%s>", tfontp->name); + if (tfontp->psfontmap != NULL && tfontp->psfontmap->subfont != NULL) + error=FT_Select_Charmap(tfontp->face, tfontp->psfontmap->subfont->encoding); + else if (tfontp->psfontmap == NULL || tfontp->psfontmap->encoding == NULL) +#ifndef FT_ENCODING_ADOBE_CUSTOM +# define FT_ENCODING_ADOBE_CUSTOM ft_encoding_adobe_custom +# define FT_ENCODING_ADOBE_STANDARD ft_encoding_adobe_standard +#endif + error=FT_Select_Charmap(tfontp->face, FT_ENCODING_ADOBE_CUSTOM); + if (error) { + Warning("unable to set font encoding for %s", tfontp->name); + if(FT_Select_Charmap( tfontp->face, FT_ENCODING_ADOBE_STANDARD )) { + Warning("unable to set fallback font encoding for %s", tfontp->name); + return(false); + } + } + if (FT_Set_Char_Size( tfontp->face, /* handle to face object */ + 0, /* char_width in 1/64th of points */ + ((int64_t)tfontp->d*64*7200)/7227/65536, + /* char_height in 1/64th of _big_points, + not TeX points */ + tfontp->dpi/shrinkfactor, /* horizontal resolution */ + tfontp->dpi/shrinkfactor )) /* vertical resolution */ { + Warning("unable to set font size for %s", tfontp->name); + return(false); + } + if (tfontp->psfontmap!=NULL) + FT_Set_Transform(tfontp->face, tfontp->psfontmap->ft_transformp, NULL); + tfontp->type = FONT_TYPE_FT; + return(true); +} + + +static void UnLoadFT(struct char_entry *ptr) +{ + if (ptr->data!=NULL) + free(ptr->data); + ptr->data=NULL; +} + + +void DoneFT(struct font_entry *tfontp) +{ + int c=0; + + int error = FT_Done_Face( tfontp->face ); + if (error) + Warning("font file %s could not be closed", tfontp->name); + while(cchr[c]!=NULL) { + UnLoadFT((struct char_entry*)tfontp->chr[c]); + free(tfontp->chr[c]); + tfontp->chr[c]=NULL; + } + c++; + } + tfontp->name[0]='\0'; +} + + diff --git a/Build/source/texk/dvipng/dvipng-1.12/miktex.h b/Build/source/texk/dvipng/dvipng-1.12/miktex.h new file mode 100644 index 00000000000..c949cd1aff6 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/miktex.h @@ -0,0 +1,272 @@ +/* config.h. Edited for MiKTeX. */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END + +/* Define to 1 if using `alloca.c'. */ +#undef C_ALLOCA + +/* Define as 1 to get the debug (-d) option. */ +#define DEBUG 1 + +/* The environment setting for $SELFAUTODIR */ +#undef ENV_SELFAUTODIR + +/* The environment setting for $SELFAUTOLOC */ +#undef ENV_SELFAUTOLOC + +/* The environment setting for $SELFAUTOPARENT */ +#undef ENV_SELFAUTOPARENT + +/* Define as the path to GhostScript. */ +#undef GS_PATH + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#undef HAVE_ALLOCA_H + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +#undef HAVE_DOPRNT + +/* Define to 1 if you have the `dup2' function. */ +#undef HAVE_DUP2 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fork' function. */ +#undef HAVE_FORK + +/* Define to 1 if you have freetype2 */ +#undef HAVE_FT2 + +/* Define to 1 if you have the `ftime' function. */ +#undef HAVE_FTIME + +/* Define to 1 if you have the `FT_Library_Version' function. */ +#undef HAVE_FT_LIBRARY_VERSION + +/* Define to 1 if you have the `gdImageAlphaBlending' function. */ +#undef HAVE_GDIMAGEALPHABLENDING + +/* Define to 1 if you have the `gdImageColorResolveAlpha' function. */ +#undef HAVE_GDIMAGECOLORRESOLVEALPHA + +/* Define to 1 if you have the `gdImageCreateTrueColor' function. */ +#define HAVE_GDIMAGECREATETRUECOLOR 1 + +/* Define to 1 if you have the `gdImageGif' function. */ +#undef HAVE_GDIMAGEGIF + +/* Define to 1 if you have the `gdImagePngEx' function. */ +#define HAVE_GDIMAGEPNGEX 1 + +/* Define to 1 if you have the `gdImageTrueColorToPalette' function. */ +#define HAVE_GDIMAGETRUECOLORTOPALETTE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GD_H 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_KPATHSEA_KPATHSEA_H 1 + +/* Define to 1 if your kpathsea has kpse_enc_format */ +#define HAVE_KPSE_ENC_FORMATS 1 + +/* Define to 1 if you have the `gd' library (-lgd). */ +#define HAVE_LIBGD 1 + +/* Define to 1 if you have the `gen' library (-lgen). */ +#undef HAVE_LIBGEN + +/* Define to 1 if you have the `kpathsea' library (-lkpathsea). */ +#define HAVE_LIBKPATHSEA 1 + +/* Define to 1 if you have the `m' library (-lm). */ +#define HAVE_LIBM 1 + +/* Define to 1 if you have the `png' library (-lpng). */ +#define HAVE_LIBPNG 1 + +/* Define to 1 if you have the `t1' library (-lt1). */ +#undef HAVE_LIBT1 + +/* Define to 1 if you have the `z' library (-lz). */ +#undef HAVE_LIBZ + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#undef HAVE_MALLOC + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#define HAVE_MEMSET 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define to 1 if you have the `munmap' function. */ +#undef HAVE_MUNMAP + +/* Define to 1 if you have the header file. */ +#define HAVE_PNG_H 1 + +/* Define to 1 if you have the `pow' function. */ +#undef HAVE_POW + +/* Define to 1 if you have the `putenv' function. */ +#undef HAVE_PUTENV + +/* Define to 1 if stdbool.h conforms to C99. */ +#undef HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strrchr' function. */ +#undef HAVE_STRRCHR + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if you have the `strtol' function. */ +#undef HAVE_STRTOL + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_T1LIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vfork' function. */ +#undef HAVE_VFORK + +/* Define to 1 if you have the header file. */ +#undef HAVE_VFORK_H + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if `fork' works. */ +#undef HAVE_WORKING_FORK + +/* Define to 1 if `vfork' works. */ +#undef HAVE_WORKING_VFORK + +/* Define to 1 if the system has the type `_Bool'. */ +#undef HAVE__BOOL 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "dvipng@nongnu.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "dvipng" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "dvipng 1.7" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "dvipng" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.7" + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Define as 1 to get execution time output. */ +#undef TIMING + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `long long' if does not define it. */ +#undef int64_t + +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc + +/* Define to `int' if does not define. */ +#undef pid_t + +/* Define to `unsigned' if does not define. */ +#undef size_t + +/* Define to `unsigned long long' if does not define it. */ +#undef uint64_t + +/* Define as `fork' if `vfork' does not work. */ +#undef vfork diff --git a/Build/source/texk/dvipng/dvipng-1.12/miktex.mak b/Build/source/texk/dvipng/dvipng-1.12/miktex.mak new file mode 100644 index 00000000000..b291ba67207 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/miktex.mak @@ -0,0 +1,196 @@ +## miktex.mak: dvipng +## +## Copyright (C) 2004 Christian Schenk +## +## 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, or (at your +## option) any later version. +## +## This file is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this file; if not, write to the Free Software +## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +## 02110-1301 USA. + +miktex_cc_no_warnings = 1 +miktex_cc_disable_optimization = 1 + +!include ..\miktex.inc + +objects = \ + $(outdir)\color.obj \ + $(outdir)\draw.obj \ + $(outdir)\dvi.obj \ + $(outdir)\dvipng.obj \ + $(outdir)\font.obj \ + $(outdir)\misc.obj \ + $(outdir)\papersiz.obj \ + $(outdir)\pk.obj \ + $(outdir)\ppagelist.obj \ + $(outdir)\set.obj \ + $(outdir)\special.obj \ + $(outdir)\vf.obj \ + $(wrapper_obj) \ + +sources = \ + color.c \ + draw.c \ + dvi.c \ + dvipng.c \ + font.c \ + misc.c \ + papersiz.c \ + pk.c \ + ppagelist.c \ + set.c \ + special.c \ + vf.c \ + +extra_cdefines = \ + -Dalloca=_alloca \ + -DUSE_MIKTEX_EXIT \ + +extra_cincludes = \ + -I$(gdlibdir) \ + -I$(kpslibdir) \ + +.c{$(outdir)\}.obj: + $(cc) $(cstandard) \ + $(extra_cdefines) \ + $(extra_cincludes) \ + $(ccopt_output_directory)$(outdir)\ $< + +binaries = $(outdir)\dvipng.exe + +all: common-all $(binaries) + +install: common-install install-binaries + +qrt: common-qrt + +# ----------------------------------------------------------------------------- +# dvipng +# ----------------------------------------------------------------------------- + +libs = \ + $(miktex_lib) \ + $(gd_lib) \ + $(kps_lib) \ + $(gnu_lib) \ + $(texmf_lib) \ + +$(outdir)\dvipng.exe: \ + $(outdir) \ + $(objects) \ + $(libs) \ + $(outdir)\dvipng.res \ + + $(link) $(lstandard) \ + -out:$@ \ + $(objects) \ + $(libs) \ + $(outdir)\dvipng.res \ + +$(outdir)\dvipng.res: \ + $(libdir)\miktex-version.h \ + $(outdir) \ + dvipng-version.h \ + dvipng.rc \ + + $(rc) $(rcstandard) $(rcopt_output_file)$@ dvipng.rc + +# ----------------------------------------------------------------------------- +# clean-up +# ----------------------------------------------------------------------------- + +mostlyclean: common-mostlyclean + +clean: common-clean mostlyclean + +distclean: common-distclean clean + +realclean: common-realclean distclean + +# ----------------------------------------------------------------------------- +# dependencies +# ----------------------------------------------------------------------------- + +!include ..\common-dependencies.inc + +depend: $(sources) + $(MAKEDEPEND1) $(extra_cincludes) $(extra_cdefines) $(sources) + +# DO NOT DELETE + +$(outdir)\color.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h +$(outdir)\color.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h +$(outdir)\color.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\color.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\color.obj: ..\lib\miktex-features.h commands.h +$(outdir)\draw.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h +$(outdir)\draw.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h +$(outdir)\draw.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\draw.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\draw.obj: ..\lib\miktex-features.h commands.h +$(outdir)\dvi.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h +$(outdir)\dvi.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h +$(outdir)\dvi.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\dvi.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\dvi.obj: ..\lib\miktex-features.h commands.h ..\libgnu\gnu-miktex.h +$(outdir)\dvipng.obj: dvipng.h config.h .\inttypes.h +$(outdir)\dvipng.obj: $(gdlibdir)\gd.h $(gdlibdir)\gd_io.h +$(outdir)\dvipng.obj: $(gdlibdir)\gdfx.h +$(outdir)\dvipng.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\dvipng.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\dvipng.obj: ..\lib\miktex-features.h commands.h +$(outdir)\font.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h +$(outdir)\font.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h +$(outdir)\font.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\font.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\font.obj: ..\lib\miktex-features.h commands.h +$(outdir)\misc.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h +$(outdir)\misc.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h +$(outdir)\misc.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\misc.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\misc.obj: ..\lib\miktex-features.h commands.h +$(outdir)\misc.obj: ..\libgnu\gnu-miktex.h +$(outdir)\papersiz.obj: dvipng.h config.h .\inttypes.h +$(outdir)\papersiz.obj: $(gdlibdir)\gd.h +$(outdir)\papersiz.obj: $(gdlibdir)\gd_io.h +$(outdir)\papersiz.obj: $(gdlibdir)\gdfx.h +$(outdir)\papersiz.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\papersiz.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\papersiz.obj: ..\lib\miktex-features.h commands.h +$(outdir)\pk.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h +$(outdir)\pk.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h +$(outdir)\pk.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\pk.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\pk.obj: ..\lib\miktex-features.h commands.h +$(outdir)\ppagelist.obj: dvipng.h config.h .\inttypes.h +$(outdir)\ppagelist.obj: $(gdlibdir)\gd.h +$(outdir)\ppagelist.obj: $(gdlibdir)\gd_io.h +$(outdir)\ppagelist.obj: $(gdlibdir)\gdfx.h +$(outdir)\ppagelist.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\ppagelist.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\ppagelist.obj: ..\lib\miktex-features.h commands.h +$(outdir)\set.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h +$(outdir)\set.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h +$(outdir)\set.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\set.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\set.obj: ..\lib\miktex-features.h commands.h +$(outdir)\special.obj: dvipng.h config.h .\inttypes.h +$(outdir)\special.obj: $(gdlibdir)\gd.h $(gdlibdir)\gd_io.h +$(outdir)\special.obj: $(gdlibdir)\gdfx.h +$(outdir)\special.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\special.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\special.obj: ..\lib\miktex-features.h commands.h +$(outdir)\vf.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h +$(outdir)\vf.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h +$(outdir)\vf.obj: $(kpslibdir)\kpathsea\kpathsea.h +$(outdir)\vf.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h +$(outdir)\vf.obj: ..\lib\miktex-features.h commands.h diff --git a/Build/source/texk/dvipng/dvipng-1.12/misc.c b/Build/source/texk/dvipng/dvipng-1.12/misc.c new file mode 100644 index 00000000000..cc3b62152bb --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/misc.c @@ -0,0 +1,836 @@ +/* misc.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" +#ifdef HAVE_LIBGEN_H +# include +#else +#define basename xbasename +#endif +#include /* open/close */ +#ifndef MIKTEX +#include +#endif +#include + +static char *programname; + +/*-->DecodeArgs*/ +/*********************************************************************/ +/***************************** DecodeArgs ****************************/ +/*********************************************************************/ +bool DecodeArgs(int argc, char ** argv) +{ + int i; /* argument index for options */ + bool ppused=false; /* Flag when -pp is used */ + int32_t number; /* Temporary storage for numeric parameter */ + char *dviname=NULL; /* Name of dvi file */ + char *outname=NULL; /* Name of output file */ + + if (argv[0]) { +#ifdef HAVE_GDIMAGEGIF + programname=strrchr(argv[0],'/'); + if (programname!=NULL) + programname++; + else + programname=argv[0]; + if (strncmp(programname,"dvigif",6)==0) + option_flags |= GIF_OUTPUT; +#endif + programname=argv[0]; + Message(BE_NONQUIET,"This is %s",programname); + if (strcmp(basename(programname),PACKAGE_NAME)!=0) + Message(BE_NONQUIET," (%s)", PACKAGE_NAME); + Message(BE_NONQUIET," %s Copyright 2002-2008 Jan-Ake Larsson\n", + PACKAGE_VERSION); + } + + for (i=1; i'9' && *p!='-') { + if (strncmp(p,"vinum",5)==0) { + if (p[5] != '0') { + option_flags |= DVI_PAGENUM; + Message(PARSE_STDIN,"DVI page number output on\n",p); + } else { + option_flags &= ~DVI_PAGENUM; + Message(PARSE_STDIN,"DVI page number output off\n"); + } + break; + } else if (strncmp(p,"epth",4)==0) { /* Depth reporting */ + if (p[4] != '0') { + option_flags |= REPORT_DEPTH; + Message(PARSE_STDIN,"Depth reporting on\n",p); + } else { + option_flags &= ~REPORT_DEPTH; + Message(PARSE_STDIN,"Depth reporting off\n"); + } + break; + } + goto DEFAULT; + } else { +#ifdef DEBUG + if (*p == 0 && argv[i+1]) + p = argv[i+1]; + debug = atoi(p); + if (debug > 0) { + if (p == argv[i+1]) i++; + } else + debug = DEBUG_DEFAULT; + Message(PARSE_STDIN,"Debug output enabled\n"); +#ifdef HAVE_LIBKPATHSEA + kpathsea_debug = debug / LASTDEBUG / 2 ; +#endif +#else + Warning("This instance of %s was compiled without the debug (-d) option", + programname); +#endif + break; + } + case 'o': /* Output file is specified */ + if (*p == 0 && argv[i+1]) + p = argv[++i] ; + outname=p; + /* remove .png extension */ + Message(PARSE_STDIN,"Output file: %s\n", + outname); + break; +#ifdef MAKETEXPK + case 'M': + /* -M, -M1 => don't make font; -M0 => do. */ + makeTexPK = (*p == '0'); +#ifdef HAVE_LIBKPATHSEA + kpse_set_program_enabled (kpse_pk_format, makeTexPK, kpse_src_cmdline); +#endif + if (makeTexPK) + Message(PARSE_STDIN,"MakeTeXPK enabled\n"); + else + Message(PARSE_STDIN,"MakeTeXPK disabled\n"); + break; +#endif /* MAKETEXPK */ + case 'm': + if (strcmp(p,"ode") == 0 ) { + if (argv[i+1]) + user_mfmode = argv[++i] ; + Message(PARSE_STDIN,"MetaFont mode: %s\n",user_mfmode); + break; + } + goto DEFAULT; + case 'h': + if (strcmp(p,"elp") == 0 ) { + break; + } else if (strncmp(p,"eight",5) == 0 ) { /* Height reporting */ + if (p[5] != '0') { + option_flags |= REPORT_HEIGHT; + Message(PARSE_STDIN,"Height reporting on\n",p); + } else { + option_flags &= ~REPORT_HEIGHT; + Message(PARSE_STDIN,"Height reporting off\n"); + } + break; + } + goto DEFAULT; + case 'O' : /* Offset */ + if (*p == 0 && argv[i+1]) + p = argv[++i] ; + handlepapersize(p, &x_offset_def, &y_offset_def) ; + Message(PARSE_STDIN,"Offset: (%d,%d)\n",x_offset_def,y_offset_def); + break ; + case 'e': + if (strncmp(p,"xpand-bbox",10) == 0 ) { + if (p[10] != '0') { + option_flags |= EXPAND_BBOX; + Message(PARSE_STDIN,"BBox expansion on\n",p); + } else { + option_flags &= ~EXPAND_BBOX; + Message(PARSE_STDIN,"BBox expansion off\n"); + } + break; + } + goto DEFAULT; + case 'T' : + if (*p == 0 && argv[i+1]) + p = argv[++i]; + if (strcmp(p,"bbox")==0) { + x_width_def=0; + y_width_def=0; + Message(PARSE_STDIN,"Pagesize: (bbox)\n"); + } else if (strcmp(p,"tight")==0) { + x_width_def=-1; + y_width_def=-1; + Message(PARSE_STDIN,"Pagesize: (tight bbox)\n"); + } else { + handlepapersize(p, &x_width_def, &y_width_def) ; + Message(PARSE_STDIN,"Pagesize: (%d,%d)\n", + x_width_def,y_width_def); + } + break ; + case 't': /* specify paper format, only for cropmarks */ +#ifdef HAVE_GDIMAGECREATETRUECOLOR + /* Truecolor */ + if (strncmp(p,"ruecolor",8)==0) { + if (p[8] != '0') { + option_flags |= FORCE_TRUECOLOR; + Message(PARSE_STDIN,"Truecolor mode on\n",p); + } else { + option_flags &= ~FORCE_TRUECOLOR; + Message(PARSE_STDIN,"Truecolor mode off\n"); + } + } else +#endif +#ifdef HAVE_LIBT1 + if ( strncmp(p,"1lib",4) == 0 ) { /* -t1lib activation */ + if (p[4] != '0') { + option_flags |= USE_LIBT1; + Message(PARSE_STDIN,"t1lib rendering on\n",p); + } else { + option_flags &= ~USE_LIBT1; + Message(PARSE_STDIN,"t1lib rendering off\n"); + } + } else +#endif + + { /* cropmarks not implemented yet */ + if (*p == 0 && argv[i+1]) + p = argv[++i] ; + if (strcmp(p,"a4")==0) { + handlepapersize("210mm,297mm",&x_pwidth,&y_pwidth); + } else if (strcmp(p,"letter")==0) { + handlepapersize("8.5in,11in",&x_pwidth,&y_pwidth); + } else if (strcmp(p,"legal")==0) { + handlepapersize("8.5in,14in",&x_pwidth,&y_pwidth); + } else if (strcmp(p,"executive")==0) { + handlepapersize("7.25in,10.5in",&x_pwidth,&y_pwidth); + } else + Fatal("papersize %s is not implemented",p); + Message(PARSE_STDIN,"Papersize: %s\n",p); + } + break; +/* case 'c': */ +/* if (strncmp(p,"acheimages",10)==0) { */ +/* if (p[10] != '0') { */ +/* option_flags |= CACHE_IMAGES; */ +/* Message(PARSE_STDIN,"Caching images\n",p); */ +/* } else { */ +/* option_flags &= ~CACHE_IMAGES; */ +/* Message(PARSE_STDIN,"Not caching images\n"); */ +/* } */ +/* break; */ +/* } */ +/* goto DEFAULT; */ + case 'b': + if ( *p == 'g' ) { /* -bg background color */ + p++; + if (*p == 0 && argv[i+1]) + p = argv[++i] ; + if (strncmp(p,"Transparent",11) == 0 ) + option_flags |= BG_TRANSPARENT_ALPHA; + else if (strncmp(p,"transparent",11) == 0 ) + option_flags |= BG_TRANSPARENT; + else + background(p); + if (option_flags & BG_TRANSPARENT) + Message(PARSE_STDIN,"Transp. background (fallback rgb %d,%d,%d)\n", + cstack[0].red,cstack[0].green,cstack[0].blue); + else + Message(PARSE_STDIN,"Background: rgb %d,%d,%d\n", + cstack[0].red,cstack[0].green,cstack[0].blue); + break; + } else if (strcmp(p, "dpi")==0) { + p+=3; + if (*p == 0 && argv[i+1]) + p = argv[++i]; + number = atoi(p); + if (number < 10 || number > 10000) + Warning("Bad --bdpi parameter, ignored"); + else { + user_bdpi=number; + Message(PARSE_STDIN,"Bdpi: %d\n",user_bdpi); + } + break; + } else if ( *p == 'd' ) { /* -bd border width */ + int tmpi; + char* tmps; + p++; + if (*p == 0 && argv[i+1]) + p = argv[++i] ; + tmpi = strtol(p, &tmps, 10); + if (p 1000000) + Warning("Bad magnification parameter (-x or -y), ignored"); + else { + usermag=number; + Message(PARSE_STDIN,"Magstep: %d\n",usermag); + /*overridemag = (c == 'x' ? 1 : -1) ;*/ + } + break ; + case 'g' : + if (strncmp(p,"amma",4)==0) { /* --gamma correction */ + double gamma=0.0; + + p+=4; + if (*p == 0 && argv[i+1]) + p = argv[++i]; + if (p!=NULL) + gamma=atof(p); + if (gamma==0.0) { + Warning("Bad gamma value, default is %f",DEFAULT_GAMMA); + gamma=DEFAULT_GAMMA; + } + Gamma(gamma); + Message(PARSE_STDIN,"Gamma value is %s\n", gamma); + break; +#ifdef HAVE_GDIMAGEGIF + } else if (strncmp(p,"if",2)==0) { /* --gif output */ + option_flags |= GIF_OUTPUT; + Message(PARSE_STDIN,"GIF output\n"); + break; +#endif + } + goto DEFAULT; + case 'p' : + if (*p == 'p') { /* a -pp specifier for a page list */ + ppused=true; + p++ ; + if (*p == 0 && argv[i+1]) + p = argv[++i]; + Message(PARSE_STDIN,"Page list: %s\n",p); + if (ParsePages(p)) + Fatal("bad page list specifier (-pp)"); + } else if (strncmp(p,"ng",2)==0) { /* --png output */ + option_flags &= ~GIF_OUTPUT; + Message(PARSE_STDIN,"PNG output\n"); + } else if (strncmp(p,"icky",4)==0) { + if (p[4] != '0') { + option_flags |= MODE_PICKY; + Message(PARSE_STDIN,"No images output for pages with warnings\n",p); + } else { + option_flags &= ~MODE_PICKY; + Message(PARSE_STDIN,"Images output even for pages with warnings\n"); + } + } else if (strncmp(p,"alette",6)==0) { + if (p[6] != '0') { + option_flags |= FORCE_PALETTE; + Message(PARSE_STDIN,"Forcing 256-color PNG output\n",p); + } else { + option_flags &= ~FORCE_PALETTE; + Message(PARSE_STDIN,"Allows truecolor PNG output\n"); + } + } else { /* a -p specifier for first page */ + int32_t firstpage; + bool abspage=false; + + if (*p == 0 && argv[i+1]) + p = argv[++i] ; + if (*p == '=') { + abspage=true; + p++ ; + } + if ((*p>='0'&&*p<='9') || (*p=='-' && *(p+1)>='0' && *(p+1)<='9')) { + firstpage = atoi(p); + FirstPage(firstpage,abspage); + Message(PARSE_STDIN,"First page: %d\n",firstpage); + } else + Warning("Bad firstpage (-p) parameter, ignored"); + } + break ; + case 's' : + if (strncmp(p,"trict",5)==0) { + if (p[5] != '0') { + option_flags |= MODE_STRICT; + Message(PARSE_STDIN,"Warnings are fatal\n",p); + } else { + option_flags &= ~MODE_STRICT; + Message(PARSE_STDIN,"Warnings are not fatal\n"); + } + } else + goto DEFAULT; + break ; + case 'n' : + if (strncmp(p,"oghostscript",12)==0) { + if (p[12] != '0') { + option_flags |= NO_GHOSTSCRIPT; + Message(PARSE_STDIN,"No GhostScript calls\n",p); + } else { + option_flags &= ~NO_GHOSTSCRIPT; + Message(PARSE_STDIN,"GhostScript calls made\n"); + } + } else if (strncmp(p,"ogssafer",8)==0) { + if (p[8] != '0') { + option_flags |= NO_GSSAFER; + Message(PARSE_STDIN,"GhostScript calls does not use -dSAFER\n",p); + } else { + option_flags &= ~NO_GSSAFER; + Message(PARSE_STDIN,"GhostScript calls use -dSAFER\n"); + } + } else + goto DEFAULT; + break ; + case 'l': + { + int32_t lastpage; + bool abspage=false; + + if (*p == 0 && argv[i+1]) + p = argv[++i] ; + if (*p == '=') { + abspage=true; + p++ ; + } + if ((*p>='0'&&*p<='9') || (*p=='-' && *(p+1)>='0' && *(p+1)<='9')) { + lastpage = atoi(p); + LastPage(lastpage,abspage); + Message(PARSE_STDIN,"Last page: %d\n",lastpage); + } else + Warning("Bad lastpage (-l) parameter, ignored"); + } + break ; + case 'q': /* quiet operation */ + if (*p != '0') + option_flags &= (~BE_NONQUIET & ~BE_VERBOSE); + else + option_flags |= BE_NONQUIET; + break; + case 'r': /* process pages in reverse order */ + if (*p != '0') { + Message(PARSE_STDIN,"Reverse order\n"); + Reverse(true); + } else { + Message(PARSE_STDIN,"Normal order\n"); + Reverse(false); + } + break; + case 'v': /* verbatim mode */ + if (strcmp(p, "ersion")==0) { + if (strcmp(basename(programname),PACKAGE_NAME)!=0) + printf("%s (%s) %s\n",basename(programname), + PACKAGE_NAME,PACKAGE_VERSION); + else + puts(PACKAGE_STRING); +#ifdef HAVE_LIBKPATHSEA + puts (KPSEVERSION); +#endif +#ifdef HAVE_FT2 + printf("Compiled with Freetype %d.%d.%d\n", + FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH); +# ifdef HAVE_FT_LIBRARY_VERSION + if (FT_Init_FreeType( &libfreetype )) + Warning("the Freetype library seems unusable"); + else { + FT_Int amajor, aminor, apatch; + + FT_Library_Version( libfreetype, &amajor, &aminor, &apatch ); + printf("Using libft %d.%d.%d\n",amajor, aminor, apatch); + FT_Done_FreeType(libfreetype); + } +# endif +#endif +#ifdef HAVE_LIBT1 + printf("Using t1lib %s\n", T1_GetLibIdent()); +#endif + puts ("Copyright (C) 2002-2008 Jan-Ake Larsson.\n\ +There is NO warranty. You may redistribute this software\n\ +under the terms of the GNU Lesser General Public License\n\ +version 3, see the COPYING file in the dvipng distribution\n\ +or ."); + exit (EXIT_SUCCESS); + } + if (*p != '0') + option_flags |= BE_NONQUIET | BE_VERBOSE; + else + option_flags &= ~BE_VERBOSE; + break; + case 'D' : + if (*p == 0 && argv[i+1]) + p = argv[++i] ; + number = atoi(p); + if (number < 10 || number > 10000) + Warning("Bad resolution (-D) parameter, ignored") ; + else { + dpi=number; + Message(PARSE_STDIN,"Dpi: %d\n",dpi); + } + break; + case 'Q': /* quality (= shrinkfactor) */ + if (*p == 0 && argv[i+1]) + p = argv[++i]; + if (*p>='0'&&*p<='9') { + shrinkfactor = atoi(p); + Message(PARSE_STDIN,"Quality: %d\n",shrinkfactor); + } else { + Warning("Non-numeric quality (-Q) value, ignored"); + } + break; +#ifdef HAVE_GDIMAGEPNGEX + case 'z': + if (*p == 0 && argv[i+1]) + p = argv[++i]; + number = atoi(p); + if (number<1 || number>9) + Warning("Bad compression (-z) value, ignored"); + else { + compression=number; + Message(PARSE_STDIN,"Compression: %d\n",shrinkfactor); + } + break; +#endif + case '\0': + option_flags |= PARSE_STDIN; + break; + DEFAULT: default: + Warning("%s is not a valid option", argv[i]); + } + } else { + dviname=argv[i]; + } + } + if (dviname != NULL) { + if (dvi != NULL && dvi->filep != NULL) + DVIClose(dvi); + dvi=DVIOpen(dviname,outname); + } + + if (dvi==NULL) { + fprintf(stdout,"\nUsage: %s [OPTION]... FILENAME[.dvi]\n", programname); + fprintf(stdout,"Options are chosen to be similar to dvips' options where possible:\n"); +#ifdef DEBUG + fprintf(stdout," -d # Debug (# is the debug bitmap, 1 if not given)\n"); +#endif + fprintf(stdout," -D # Output resolution\n"); + fprintf(stdout," -l # Last page to be output\n"); + fprintf(stdout," -o f Output file, '%%d' is pagenumber\n"); + fprintf(stdout," -O c Image offset\n"); + fprintf(stdout," -p # First page to be output\n"); + fprintf(stdout," -pp #,#.. Page list to be output\n"); + fprintf(stdout," -q* Quiet operation\n"); + fprintf(stdout," -T c Image size (also accepts '-T bbox' and '-T tight')\n"); + fprintf(stdout," -v* Verbose operation\n"); + fprintf(stdout," - Interactive query of options\n"); + fprintf(stdout,"\nThese do not correspond to dvips options:\n"); + fprintf(stdout," -bd # Transparent border width in dots\n"); + fprintf(stdout," -bd s Transparent border fallback color (TeX-style color)\n"); + fprintf(stdout," -bg s Background color (TeX-style color or 'Transparent')\n"); + fprintf(stdout," --depth* Output the image depth on stdout\n"); + fprintf(stdout," --dvinum* Use TeX page numbers in output filenames\n"); + fprintf(stdout," -fg s Foreground color (TeX-style color)\n"); + fprintf(stdout," --follow* Wait for data at end-of-file\n"); +#ifdef HAVE_FT2 + fprintf(stdout," --freetype* FreeType font rendering (default on)\n"); +#endif + fprintf(stdout," --gamma # Control color interpolation\n"); +#ifdef HAVE_GDIMAGEGIF + fprintf(stdout," --gif Output GIF images (dvigif default)\n"); +#endif + fprintf(stdout," --height* Output the image height on stdout\n"); + fprintf(stdout," --noghostscript* Don't use ghostscript for PostScript specials\n"); + fprintf(stdout," --nogssafer* Don't use -dSAFER in ghostscript calls\n"); +#ifdef HAVE_GDIMAGECREATETRUECOLOR + fprintf(stdout," --palette* Force palette output\n"); +#endif + fprintf(stdout," --picky When a warning occurs, don't output image\n"); +#ifdef HAVE_GDIMAGEGIF + fprintf(stdout," --png Output PNG images (dvipng default)\n"); +#endif + fprintf(stdout," --strict When a warning occurs, exit\n"); +#ifdef HAVE_LIBT1 + fprintf(stdout," --t1lib* T1lib font rendering (default on)\n"); +#endif +#ifdef HAVE_GDIMAGECREATETRUECOLOR + fprintf(stdout," --truecolor* Truecolor output\n"); +#endif + fprintf(stdout," -Q # Quality (T1lib and PK subsampling)\n"); +#ifdef HAVE_GDIMAGEPNGEX + fprintf(stdout," -z # PNG compression level\n"); +#endif + + fprintf(stdout,"\n # = number f = file s = string * = suffix, '0' to turn off\n"); + fprintf(stdout," c = comma-separated dimension pair (e.g., 3.2in,-32.1cm)\n\n"); + /*#ifdef HAVE_LIBKPATHSEA + { + extern DllImport char *kpse_bug_address; + putc ('\n', stdout); + fputs (kpse_bug_address, stdout); + } + #endif*/ + if ((option_flags & PARSE_STDIN) == 0) { + exit(EXIT_SUCCESS); + } + } + if ((option_flags & PARSE_STDIN) == 0 && (!ppused)) + ParsePages("-"); + return((option_flags & PARSE_STDIN) != 0); +} + +void DecodeString(char *string) +{ +#define PARSEARGS 10 + char *strv[PARSEARGS]; + int strc=1; + strv[0]=NULL; /* No program name */ + + while (*string==' ' || *string=='\t' || *string=='\n') + string++; + while (*string!='\0') { + strv[strc++]=string; + if (*string!='\'') { + /* Normal split at whitespace */ + while (*string!=' ' && *string!='\t' && *string!='\n' && *string!='\0') + string++; + } else { + /* String delimiter found , so search for next */ + strv[strc-1]=++string; + while (*string!='\'' && *string!='\0') + string++; + } + if (*string!='\0') + *string++='\0'; + while (*string==' ' || *string=='\t' || *string=='\n') + string++; + } + if (strc>1) /* Nonempty */ + (void) DecodeArgs(strc,strv); +} + + + +uint32_t UNumRead(unsigned char* current, register int n) +{ + uint32_t x = (unsigned char) *(current)++; /* number being constructed */ + while(--n) + x = (x << 8) | *(current)++; + return(x); +} + +int32_t SNumRead(unsigned char* current, register int n) +{ + int32_t x = (signed char) *(current)++; /* number being constructed */ + while(--n) + x = (x << 8) | *(current)++; + return(x); +} + + +/**********************************************************************/ +/****************************** Fatal *******************************/ +/**********************************************************************/ +void Fatal (const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + fflush(stdout); + fprintf(stderr, "\n"); + fprintf(stderr, "%s: Fatal error, ", programname); + vfprintf(stderr, fmt, args); + + fprintf(stderr, "\n\n"); + va_end(args); + + ClearFonts(); +#ifdef HAVE_FT2 + if (libfreetype) + (void) FT_Done_FreeType(libfreetype); /* at this point, ignore error */ +#endif +#ifdef HAVE_LIBT1 + if (libt1) + (void) T1_CloseLib(); /* at this point, ignore error */ +#endif + exit(EXIT_FATAL); +} + +/*-->Warning*/ +/**********************************************************************/ +/***************************** Warning ******************************/ +/**********************************************************************/ +void Warning(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + + if ( option_flags & BE_NONQUIET ) { + fflush(stdout); + fprintf(stderr, "%s warning: ", programname); + vfprintf(stderr, fmt, args); + fprintf(stderr, " "); + } + va_end(args); +} + +/*-->Message*/ +/**********************************************************************/ +/***************************** Message ******************************/ +/**********************************************************************/ +void Message(int activeflags, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + if ( option_flags & activeflags ) { + vfprintf(stdout, fmt, args); + } + va_end(args); +} + + +bool MmapFile (char *filename,struct filemmap *fmmap) +{ +#ifndef MIKTEX + struct stat stat; +#endif + + DEBUG_PRINT(DEBUG_DVI,("\n OPEN FILE:\t'%s'", filename)); + fmmap->data=NULL; +#ifndef MIKTEX + if ((fmmap->fd = open(filename,O_RDONLY)) == -1) { + Warning("cannot open file <%s>", filename); + return(true); + } + fstat(fmmap->fd,&stat); + fmmap->size=stat.st_size; +# ifdef HAVE_MMAP + fmmap->data = mmap(NULL,fmmap->size, PROT_READ, MAP_SHARED,fmmap->fd,0); + if (fmmap->data == (char*)-1) { + Warning("cannot mmap file <%s>",filename); + fmmap->data=NULL; + close(fmmap->fd); + return(true); + } +# else /* HAVE_MMAP */ + fmmap->data = malloc(fmmap->size); + if (fmmap->data == NULL) { + Warning("cannot malloc space for <%s>",filename); + close(fmmap->fd); + return(true); + } + if (read(fmmap->fd,fmmap->data,fmmap->size)size) { + Warning("too little data in <%s>",filename); + free(fmmap->data); + fmmap->data=NULL; + close(fmmap->fd); + return(true); + } + close(fmmap->fd); +# endif /* HAVE_MMAP */ +#else /* MIKTEX */ + fmmap->hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, 0, + OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, 0); + if (fmmap->hFile == INVALID_HANDLE_VALUE) { + Warning("cannot open file <%s>", filename); + return(true); + } + fmmap->size = GetFileSize(fmmap->hFile, 0); + fmmap->hMap = CreateFileMapping(fmmap->hFile, 0, PAGE_READONLY, 0, 0, 0); + if (fmmap->hMap == 0) { + CloseHandle (fmmap->hFile); + Warning("cannot CreateFileMapping() file <%s>", filename); + return(true); + } + fmmap->data = MapViewOfFile(fmmap->hMap, FILE_MAP_READ, 0, 0, 0); + if (fmmap->data == NULL) { + Warning("cannot MapViewOfFile() file <%s>", filename); + CloseHandle (fmmap->hMap); + CloseHandle (fmmap->hFile); + return(true); + } +#endif /* MIKTEX */ + return(false); +} + +void UnMmapFile(struct filemmap* fmmap) +{ + if (fmmap->data!=NULL) { +#ifndef MIKTEX +# ifdef HAVE_MMAP + if (munmap(fmmap->data,fmmap->size)) + Warning("cannot munmap file at 0x%X",fmmap->data); + if (close(fmmap->fd)) + Warning("cannot close file descriptor %d",fmmap->fd); +# else /* HAVE_MMAP */ + free(fmmap->data); +# endif /* HAVE_MMAP */ +#else /* MIKTEX */ + UnmapViewOfFile (fmmap->data); + CloseHandle (fmmap->hMap); + CloseHandle (fmmap->hFile); +#endif /* MIKTEX */ + } + fmmap->data=NULL; +} diff --git a/Build/source/texk/dvipng/dvipng-1.12/papersiz.c b/Build/source/texk/dvipng/dvipng-1.12/papersiz.c new file mode 100644 index 00000000000..2b46e97de16 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/papersiz.c @@ -0,0 +1,73 @@ +/* papersiz.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" + +const char *lengthnames[]={ "sp", "pt", "bp", + "dd", "mm", "pc", + "cc", "cm", "in" }; +const int32_t lengthsp[]={ 1L, 65536L, 65782L, + 70124L, 186468L, 786432L, + 841489L, 1864680L, 4736286L }; + +/* + * Convert a double[unit], e.g., "3.2cm" or "1.0in" into length in pixels. + * Advance the passed pointer as well. + */ + +static int32_t myatodim(const char ** p) +{ + double tmp; /* double accuracy is enough, I think */ + int i=0; + char *q; + + tmp = strtod(*p,&q); + while (*q == ' ') + q++; + while (i<8 && (q[0]!=lengthnames[i][0] || q[1]!=lengthnames[i][1])) + i++; + if (i==8 && (q[0]!=lengthnames[i][0] || q[1]!=lengthnames[i][1])) + Warning("unrecognized length unit \"%.2s\", assuming inches",q); + while (*q != ',' && *q !='\0') + q++; + tmp = tmp*lengthsp[i]*dpi/4736286L; /* sp * dots/in / (sp/in), convert sp to pixels */ + return((int32_t) tmp); +} + + +/* + * The routine where we handle the paper size special. We need to pass in + * the string after the `papersize=' specification. + */ + +void handlepapersize(const char * p, int32_t * x, int32_t * y) +{ + while (*p == ' ') + p++ ; + *x = myatodim(&p) ; + while (*p == ' ' || *p == ',') + p++ ; + *y = myatodim(&p) ; +} + diff --git a/Build/source/texk/dvipng/dvipng-1.12/pk.c b/Build/source/texk/dvipng/dvipng-1.12/pk.c new file mode 100644 index 00000000000..2bb425987e8 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/pk.c @@ -0,0 +1,407 @@ +/* pk.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" +#ifdef HAVE_ALLOCA_H +# include +#endif + +#define PK_POST 245 +#define PK_PRE 247 +#define PK_ID 89 + +unsigned char dyn_f; +int repeatcount; +int poshalf; + +static unsigned char getnyb(unsigned char** pos) +{ + if (poshalf == 0) { + poshalf=1; + return(**pos / 16); + } else { + poshalf=0; + return(*(*pos)++ & 15); + } +} + +static uint32_t pk_packed_num(unsigned char** pos) +{ + register int i; + uint32_t j; + + i = (int)getnyb(pos); + if (i == 0) { + do { + j = (uint32_t)getnyb(pos); + i++; + } while (j == 0); + while (i > 0) { + j = j * 16 + (uint32_t)getnyb(pos); + i--; + }; + return (j - 15 + (13 - dyn_f) * 16 + dyn_f); + } else if (i <= (int)dyn_f) { + return ((uint32_t)i); + } else if (i < 14) { + return ((i-(uint32_t)dyn_f - 1) * 16 + (uint32_t)getnyb(pos) + + dyn_f + 1); + } else { + if (i == 14) { + repeatcount = (int)pk_packed_num(pos); + } else { + repeatcount = 1; + } + return (pk_packed_num(pos)); /* tail end recursion !! */ + } +} + +static unsigned char* skip_specials(unsigned char* pos) +{ + uint32_t i; + + while (*pos >= 240 && *pos != PK_POST) { + i=0; + switch (*pos++) { + case 243: + i = *pos++; + case 242: + i = 256 * i + *pos++; + case 241: + i = 256 * i + *pos++; + case 240: + i = 256 * i + *pos++; + DEBUG_PRINT(DEBUG_PK,("\n PK SPECIAL\t'%.*s' ",(int)i,pos)); + pos += i; + break; + case 244: +#ifdef DEBUG + { + uint32_t c; + c=UNumRead(pos,4); + DEBUG_PRINT(DEBUG_PK,("\n PK SPECIAL\t%d",c)); + } +#endif + pos += 4; + break; + case 245: + break; + case 246: + DEBUG_PRINT(DEBUG_PK,("\n PK\tNOP ")); + break; + case 247: case 248: case 249: case 250: + case 251: case 252: case 253: case 254: + case 255: + Fatal("unexpected PK flagbyte %d", (int)*pos); + } + } + return(pos); +} + + +void LoadPK(int32_t c, register struct char_entry * ptr) +{ + unsigned short shrunk_width,shrunk_height; + unsigned short width,height; + short xoffset,yoffset; + unsigned short i_offset,j_offset; + int i,j,k,n; + int count=0; + bool paint_switch; + unsigned char *pos,*buffer; + + DEBUG_PRINT(DEBUG_PK,("\n LOAD PK CHAR\t%d",c)); + pos=ptr->pkdata; + if ((ptr->flag_byte & 7) == 7) n=4; + else if ((ptr->flag_byte & 4) == 4) n=2; + else n=1; + dyn_f = ptr->flag_byte / 16; + paint_switch = ((ptr->flag_byte & 8) != 0); + /* + * Read character preamble + */ + if (n != 4) { + ptr->tfmw = UNumRead(pos, 3); + /* +n: vertical escapement not used */ + pos+=3+n; + } else { + ptr->tfmw = UNumRead(pos, 4); + /* +4: horizontal escapement not used */ + /* +n: vertical escapement not used */ + pos+=8+n; + } + DEBUG_PRINT(DEBUG_PK,(" %d",ptr->tfmw)); + ptr->tfmw = (dviunits) + ((int64_t) ptr->tfmw * currentfont->s / 0x100000 ); + DEBUG_PRINT(DEBUG_PK,(" (%d)",ptr->tfmw)); + + width = UNumRead(pos, n); + height = UNumRead(pos+=n, n); + DEBUG_PRINT(DEBUG_PK,(" %dx%d",width,height)); + + if (width > 0x7fff || height > 0x7fff) + Fatal("character %d too large in file %s", c, currentfont->name); + + /* + * Hotspot issues: Shrinking to the topleft corner rather than the + hotspot will displace glyphs a fraction of a pixel. We deal with + this in as follows: The glyph is shrunk to its hotspot by + offsetting the bitmap somewhat to put the hotspot in the lower + left corner of a "shrink square". Shrinking to the topleft corner + will then act as shrinking to the hotspot. This may enlarge the + bitmap somewhat, of course. (Also remember that the below + calculation of i/j_offset is in integer arithmetics.) + + There will still be a displacement from rounding the dvi + position, but vertically it will be equal for all glyphs on a + line, so we displace a whole line vertically by fractions of a + pixel. This is acceptible, IMHO. Sometime there will be support + for subpixel positioning, horizontally. Will do for now, I + suppose. + */ + xoffset = SNumRead(pos+=n, n); + i_offset = ( shrinkfactor - xoffset % shrinkfactor ) % shrinkfactor; + width += i_offset; + ptr->xOffset = xoffset+i_offset; + + yoffset = SNumRead(pos+=n, n); + j_offset = ( shrinkfactor - (yoffset-(shrinkfactor-1)) % shrinkfactor ) + % shrinkfactor; + height += j_offset; + ptr->yOffset = yoffset+j_offset; + + DEBUG_PRINT(DEBUG_PK,(" (%dx%d)",width,height)); + /* + Extra marginal so that we do not crop the image when shrinking. + */ + shrunk_width = (width + shrinkfactor - 1) / shrinkfactor; + shrunk_height = (height + shrinkfactor - 1) / shrinkfactor; + ptr->w = shrunk_width; + ptr->h = shrunk_height; + pos+=n; + buffer = alloca(shrunk_width*shrunk_height* + shrinkfactor*shrinkfactor*sizeof(char)); + (void)memset(buffer,0,shrunk_width*shrunk_height* + shrinkfactor*shrinkfactor*sizeof(char)); + DEBUG_PRINT(DEBUG_GLYPH,("\nDRAW GLYPH %d\n", (int)c)); + /* + Raster char + */ + if (dyn_f == 14) { /* get raster by bits */ + int bitweight = 0; + for (j = j_offset; j < (int) height; j++) { /* get all rows */ + for (i = i_offset; i < (int) width; i++) { /* get one row */ + bitweight /= 2; + if (bitweight == 0) { + count = *pos++; + bitweight = 128; + } + if (count & bitweight) { + buffer[i+j*width]=1; +#ifdef DEBUG + DEBUG_PRINT(DEBUG_GLYPH,("+")); + } else { + DEBUG_PRINT(DEBUG_GLYPH,(" ")); +#endif + } + } + DEBUG_PRINT(DEBUG_GLYPH,("|\n")); + } + } else { /* get packed raster */ + poshalf=0; + repeatcount = 0; + for(i=i_offset, j=j_offset; j 0) { + if (i+count < width) { + if (paint_switch) + for(k=0;k0; repeatcount--,j++) { + for (i = i_offset; i0) { + DEBUG_PRINT(DEBUG_GLYPH,("=")); + } else { + DEBUG_PRINT(DEBUG_GLYPH,(" ")); + } +#endif + } + DEBUG_PRINT(DEBUG_GLYPH,("|\n")); + } + i=i_offset; + } + } + paint_switch = 1 - paint_switch; + } + if (i>i_offset) + Fatal("wrong number of bits stored: char. %c, font %s", + (char)c, currentfont->name); + if (j>height) + Fatal("bad PK file %s, too many bits", currentfont->name); + } + /* + Shrink raster while doing antialiasing. (See above. The + single-glyph output seems better than what xdvi at 300 dpi, + shrinkfactor 3 produces.) + */ + if ((ptr->data = calloc(shrunk_width*shrunk_height,sizeof(char))) == NULL) + Fatal("unable to allocate image space for char %c", (char)c); + for (j = 0; j < (int) height; j++) { + for (i = 0; i < (int) width; i++) { + /* if (((i % shrinkfactor) == 0) && ((j % shrinkfactor) == 0)) + ptr->data[i/shrinkfactor+j/shrinkfactor*shrunk_width] = + buffer[i+j*width]; + else */ + ptr->data[i/shrinkfactor+j/shrinkfactor*shrunk_width] += + buffer[i+j*width]; + } + } + for (j = 0; j < shrunk_height; j++) { + for (i = 0; i < shrunk_width; i++) { + ptr->data[i+j*shrunk_width] = ptr->data[i+j*shrunk_width] + *255/shrinkfactor/shrinkfactor; + DEBUG_PRINT(DEBUG_GLYPH,("%3u ",ptr->data[i+j*shrunk_width])); + } + DEBUG_PRINT(DEBUG_GLYPH,("|\n")); + } +} + +void InitPK(struct font_entry * tfontp) +{ + unsigned char* position; + struct char_entry *tcharptr; /* temporary char_entry pointer */ + uint32_t hppp, vppp, packet_length; + uint32_t c; + + DEBUG_PRINT((DEBUG_DVI|DEBUG_PK),("\n OPEN FONT:\t'%s'", tfontp->name)); + Message(BE_VERBOSE,"<%s>", tfontp->name); + if (MmapFile(tfontp->name,&(tfontp->fmmap))) + Fatal("font file %s unusable", tfontp->name); + position=(unsigned char*)tfontp->fmmap.data; + if (tfontp->fmmap.size < 2 || tfontp->fmmap.size < 3+*(position+2)+16) + Fatal("PK file %s ends prematurely",tfontp->name); + if (*position++ != PK_PRE) + Fatal("unknown font format in file %s",tfontp->name); + if (*position++ != PK_ID) + Fatal( "wrong version %d of PK file %s (should be 89)", + (int)*(position-1),tfontp->name); + DEBUG_PRINT(DEBUG_PK,("\n PK_PRE:\t'%.*s'",(int)*position, position+1)); + position += *position + 1; + + tfontp->designsize = UNumRead(position, 4); + DEBUG_PRINT(DEBUG_PK,(" %d", tfontp->designsize)); + tfontp->type = FONT_TYPE_PK; + + c = UNumRead(position+4, 4); + DEBUG_PRINT(DEBUG_PK,(" %d", c)); + CheckChecksum (tfontp->c, c, tfontp->name); + + hppp = UNumRead(position+8, 4); + vppp = UNumRead(position+12, 4); + DEBUG_PRINT(DEBUG_PK,(" %d %d", hppp,vppp)); + if (hppp != vppp) + Warning("aspect ratio is %d:%d (should be 1:1)", hppp, vppp); + tfontp->magnification = (uint32_t)((uint64_t)hppp * 7227 * 5 / 65536l + 50)/100; + position+=16; + /* Read char definitions */ + position = skip_specials(position); + while (*position != PK_POST) { + DEBUG_PRINT(DEBUG_PK,("\n @%ld PK CHAR:\t%d", + (long)position - (long)tfontp->fmmap.data, *position)); + if ((tcharptr = malloc(sizeof(struct char_entry))) == NULL) + Fatal("cannot malloc space for char_entry"); + tcharptr->flag_byte = *position; + tcharptr->data = NULL; + tcharptr->tfmw = 0; + if ((*position & 7) == 7) { + packet_length = UNumRead(position+1,4); + c = UNumRead(position+5, 4); + position += 9; + } else if (*position & 4) { + packet_length = (*position & 3) * 65536l + + UNumRead(position+1, 2); + c = UNumRead(position+3, 1); + position += 4; + } else { + packet_length = (*position & 3) * 256 + + UNumRead(position+1, 1); + c = UNumRead(position+2, 1); + position += 3; + } + DEBUG_PRINT(DEBUG_PK,(" %d %d",packet_length,c)); + if (c > (LASTFNTCHAR)) + Fatal("PK font %s exceeds char numbering limit",tfontp->name); + tcharptr->length = packet_length; + tcharptr->pkdata = position; + tfontp->chr[c]=tcharptr; + position += packet_length; + position = skip_specials(position); + } +} + +static void UnLoadPK(struct char_entry *ptr) +{ + if (ptr->data!=NULL) + free(ptr->data); + ptr->data=NULL; +} + +void DonePK(struct font_entry *tfontp) +{ + int c=FIRSTFNTCHAR; + + UnMmapFile(&(tfontp->fmmap)); + while(c<=LASTFNTCHAR) { + if (tfontp->chr[c]!=NULL) { + UnLoadPK((struct char_entry*)tfontp->chr[c]); + free(tfontp->chr[c]); + } + c++; + } + tfontp->name[0]='\0'; +} diff --git a/Build/source/texk/dvipng/dvipng-1.12/ppagelist.c b/Build/source/texk/dvipng/dvipng-1.12/ppagelist.c new file mode 100644 index 00000000000..4c454e3de3a --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/ppagelist.c @@ -0,0 +1,189 @@ +/* ppagelist.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" + +/* Some code at the end of this file is adapted from dvips */ + +static int32_t first=PAGE_FIRSTPAGE, last=PAGE_LASTPAGE; +static bool abspage=false, reverse=false; +bool no_ppage=true; + +/* dvips' behaviour: + * -pp outputs _all_ pages with the correct numbers, + * -p, -l outputs from the first occurrence of firstpage to the first + * occurrence of lastpage. Using '=' means absolute pagenumbers + */ + +void FirstPage(int32_t page, bool data) +{ + first=page; + abspage |= data; +} +void LastPage(int32_t page,bool data) +{ + last=page; + abspage |= data; +} +void Reverse(bool new) +{ + reverse=new; +} +/*-->NextPPage*/ +/**********************************************************************/ +/**************************** NextPPage *****************************/ +/**********************************************************************/ +/* Return the page in turn on our queue */ +/* (Implicitly, PAGE_POST is never in the pagelist) */ +bool InPageList(int32_t i); + +struct page_list* NextPPage(void* dvi, struct page_list* page) +{ + if (! reverse) { /*********** normal order */ + if (page == NULL) { /* first call: find first page */ + if (no_ppage) + return(NULL); + page=FindPage(dvi,first,abspage); + } else /* later calls: count up, except "last" page */ + page=(last==page->count[abspage ? 0 : 10]) ? NULL : NextPage(dvi,page); + /* seek for pages in pagelist */ + while (page!=NULL && ! InPageList(page->count[0])) + page=(last==page->count[abspage ? 0 : 10]) ? NULL : NextPage(dvi,page); + } else { /******************** reverse order */ + if (page == NULL) { /* first call: find "last" page */ + if (no_ppage) + return(NULL); + page=FindPage(dvi,last,abspage); + } else /* later calls: count down, except "first" page */ + page=(first==page->count[abspage ? 0 : 10]) ? NULL : PrevPage(dvi,page); + /* seek for pages in pagelist */ + while (page!=NULL && ! InPageList(page->count[0])) + page=(first==page->count[abspage ? 0 : 10]) ? NULL : PrevPage(dvi,page); + } + return(page); +} + +struct pp_list { + struct pp_list *next; /* next in a series of alternates */ + int32_t ps_low, ps_high; /* allowed range */ +} *ppages = 0; /* the list of allowed pages */ + +/*-->InPageList*/ +/**********************************************************************/ +/****************************** InPageList **************************/ +/**********************************************************************/ +/* Return true iff i is one of the desired output pages */ + +bool InPageList(int32_t i) +{ + register struct pp_list *pl = ppages; + + while (pl) { + if ( i >= pl -> ps_low && i <= pl -> ps_high) + return(true); /* success */ + pl = pl -> next; + } + return(false); +} + +static void ListPage(int32_t pslow, int32_t pshigh) +{ + register struct pp_list *pl; + + /* Some added code, we want to reuse the list */ + no_ppage=false; + pl = ppages; + while (pl != NULL && pl->ps_low <= pl->ps_high) + pl = pl->next; + if (pl == NULL) { + if ((pl = (struct pp_list *)malloc(sizeof(struct pp_list))) + ==NULL) + Fatal("cannot allocate memory for page queue"); + pl -> next = ppages; + ppages = pl; + } + pl -> ps_low = pslow; + pl -> ps_high = pshigh; +} + +/* Parse a string representing a list of pages. Return 0 iff ok. As a + side effect, the page selection(s) is (are) prepended to ppages. */ + +bool ParsePages(const char *s) +{ + const char *c; /* conversion start */ + char *t; + long int ps_low = PAGE_MINPAGE, ps_high = PAGE_MAXPAGE; + + while (*s==' ' || *s=='\t') s++; + while (*s!='\0') { + if (*s=='-' || *s==':') { /* range with no starting value */ + ps_low = PAGE_MINPAGE; + c=s+1; + ps_high = strtol(c,&t,10); + s = t; + if (c==s) ps_high=PAGE_MAXPAGE; /* no number */ + while (*s==' ' || *s=='\t') s++; + if (*s=='-' || *s==':') { /* Oh, range with negative starting value */ + ps_low = -ps_high; + c=s+1; + ps_high = strtol(c,&t,10); + s = t; + if (c==s) ps_high=PAGE_MAXPAGE; /* no number */ + } + } else { /* range with starting value, or singleton */ + c=s; + ps_low = ps_high = strtol(c,&t,10); + s = t; + if (c==s) + return(true); + if (*s=='-' || *s==':') { /* range */ + c=s+1; + ps_high = strtol(c,&t,10); + s = t; + if (c==s) ps_high=PAGE_MAXPAGE; /* no number */ + } + } + ListPage(ps_low, ps_high); + while (*s==' ' || *s=='\t' || *s==',') s++; + } + return(false); +} + +/* Addition, we want to be able to clear the pplist */ +void ClearPpList(void) +{ + register struct pp_list *pl = ppages; + + while (pl) { + ppages=ppages->next; + free(pl); + pl = ppages; + } + first=PAGE_FIRSTPAGE; + last=PAGE_LASTPAGE; + abspage = false; + no_ppage=true; +} + diff --git a/Build/source/texk/dvipng/dvipng-1.12/set.c b/Build/source/texk/dvipng/dvipng-1.12/set.c new file mode 100644 index 00000000000..050dbedea11 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/set.c @@ -0,0 +1,300 @@ +/* set.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" +#ifdef HAVE_ALLOCA_H +# include +#endif +#include + +#ifndef HAVE_GDIMAGECREATETRUECOLOR +#define gdImageColorAllocateAlpha(i,r,g,b,a) gdImageColorAllocate(i,r,g,b) +#define gdImageColorResolveAlpha(i,r,g,b,a) gdImageColorResolve(i,r,g,b) +#define gdImageAlpha(i,c) 0 +#define gdAlphaMax 127 +#endif +#ifndef HAVE_GDIMAGEPNGEX +#define gdImagePngEx(i,f,z) gdImagePng(i,f) +#endif + +/* Persistent color cache. Index is ink thickness, + 0=no ink, 127=total coverage */ +static int ColorCache[gdAlphaMax+1]; + +void CreateImage(pixels x_width,pixels y_width) +{ + if (page_imagep) + gdImageDestroy(page_imagep); + if (x_width <= 0) x_width=1; + if (y_width <= 0) y_width=1; +#ifdef HAVE_GDIMAGECREATETRUECOLOR + /* GIFs are 256-color */ + if ((option_flags & FORCE_TRUECOLOR + || page_flags & PAGE_TRUECOLOR) + && ~option_flags & GIF_OUTPUT + && ~option_flags & FORCE_PALETTE) + page_imagep=gdImageCreateTrueColor(x_width,y_width); + else +#endif + page_imagep=gdImageCreate(x_width,y_width); + /* Set bg color. GIFs cannot handle an alpha channel, resort to + transparent color index, set in WriteImage */ + ColorCache[0] + = gdImageColorAllocateAlpha(page_imagep, + cstack[0].red, + cstack[0].green, + cstack[0].blue, + (option_flags & BG_TRANSPARENT_ALPHA + && ~option_flags & GIF_OUTPUT) ? 127 : 0); + ColorCache[gdAlphaMax]=-1; +#ifdef HAVE_GDIMAGECREATETRUECOLOR + /* Alpha blending in libgd is only performed for truecolor images. + We need it for palette images also. Turn libgd alpha blending off + and calculate color blending where needed. We turn it back on + briefly for image inclusion. */ + gdImageAlphaBlending(page_imagep, 0); + if (option_flags & BG_TRANSPARENT_ALPHA) + gdImageSaveAlpha(page_imagep, 1); + if (page_imagep->trueColor) + /* Truecolor: there is no background color index, fill image instead. */ + gdImageFilledRectangle(page_imagep, 0, 0, + x_width-1, y_width-1, ColorCache[0]); +#endif +} + + +static void ChangeColor(gdImagePtr imagep,int x1,int y1, + int x2,int y2,int color1,int color2) +/* In the given rectangle, change color1 to color2 */ +{ + int x,y; + for( y=y1; y<=y2; y++) { + for( x=x1; x<=x2; x++) { + if (gdImageGetPixel(imagep, x, y)==color1) + gdImageSetPixel(imagep, x, y, color2); + } + } +} + +void WriteImage(char *pngname, int pagenum) +{ + char* pos; + FILE* outfp=NULL; + + /* Set transparent background. Maybe alpha is not available or + perhaps we are producing GIFs, so test for BG_TRANSPARENT_ALPHA + too */ + if (option_flags & (BG_TRANSPARENT|BG_TRANSPARENT_ALPHA)) + gdImageColorTransparent(page_imagep,ColorCache[0]); + /* Transparent border */ + if (borderwidth>0) { + int Transparent; + pixels x_width,y_width; + + x_width=gdImageSX(page_imagep); + y_width=gdImageSY(page_imagep); + + /* Set ANOTHER bg color, transparent this time */ + /* No semi-transparency here, given the motivation for this code + * (box cursor visibility in Emacs) */ + if (userbordercolor) + Transparent = gdImageColorAllocate(page_imagep, + bordercolor.red, + bordercolor.green, + bordercolor.blue); + else + Transparent = gdImageColorAllocate(page_imagep, + gdImageRed(page_imagep,ColorCache[0]), + gdImageGreen(page_imagep,ColorCache[0]), + gdImageBlue(page_imagep,ColorCache[0])); + gdImageColorTransparent(page_imagep,Transparent); + ChangeColor(page_imagep,0,0,x_width-1,borderwidth-1, + ColorCache[0],Transparent); + ChangeColor(page_imagep,0,0,borderwidth-1,y_width-1, + ColorCache[0],Transparent); + ChangeColor(page_imagep,x_width-borderwidth,0,x_width-1,y_width-1, + ColorCache[0],Transparent); + ChangeColor(page_imagep,0,y_width-borderwidth,x_width-1,y_width-1, + ColorCache[0],Transparent); + } + + if ((pos=strchr(pngname,'%')) != NULL) { + if (strchr(++pos,'%')) + Fatal("too many %%s in output file name"); + if (*pos == 'd' + || (*pos=='0' && pos[1]>='1' && pos[1]<='9' && pos[2]=='d')) { + /* %d -> pagenumber, so add 9 string positions + since pagenumber max +-2^31 or +-2*10^9 */ + char* tempname = alloca(strlen(pngname)+9); + sprintf(tempname,pngname,pagenum); + pngname = tempname; + } else { + Fatal("unacceptible format spec in output file name"); + } + } +#ifdef HAVE_GDIMAGEGIF + if (option_flags & GIF_OUTPUT && (pos=strrchr(pngname,'.')) != NULL + && strcmp(pos,".png")==0) { + *(pos+1)='g'; + *(pos+2)='i'; + *(pos+3)='f'; + } +#endif + if ((outfp = fopen(pngname,"wb")) == NULL) + Fatal("cannot open output file %s",pngname); +#ifdef HAVE_GDIMAGEGIF + if (option_flags & GIF_OUTPUT) + gdImageGif(page_imagep,outfp); + else +#endif + gdImagePngEx(page_imagep,outfp,compression); + fclose(outfp); + DEBUG_PRINT(DEBUG_DVI,("\n WROTE: \t%s\n",pngname)); + DestroyImage(); +} + +void DestroyImage(void) +{ + gdImageDestroy(page_imagep); + page_imagep=NULL; +} + +static int gammatable[]= + {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, + 20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39, + 40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59, + 60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79, + 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99, + 100,101,102,103,104,105,106,107,108,109, + 110,111,112,113,114,115,116,117,118,119, + 120,121,122,123,124,125,126,127}; + +void Gamma(double gamma) +{ + int i=0; + + while (i<=gdAlphaMax) { + gammatable[i]=gdAlphaMax- + (int)(pow((gdAlphaMax-i)/((double)gdAlphaMax),gamma)*gdAlphaMax); + DEBUG_PRINT(DEBUG_GLYPH, + ("\n GAMMA GREYSCALE: %d -> %d ",i,gammatable[i])); + i++; + } +} + +dviunits SetGlyph(int32_t c, int32_t hh,int32_t vv) +/* gdImageChar can only do monochrome glyphs */ +{ + register struct char_entry *ptr; + int dst_alpha,dst_weight,tot_weight,alpha; + int x,y,pos=0; + int bgColor,pixelgrey,pixelcolor; + + if (c<0 || c>LASTFNTCHAR) { + Warning("glyph index too large (%d), skipping",c); + return(0); + } + ptr=currentfont->chr[c]; + if (ptr==NULL) { + Warning("unable to draw glyph %d, skipping",c); + return(0); + } + hh -= ptr->xOffset/shrinkfactor; + vv -= ptr->yOffset/shrinkfactor; + /* Initialize persistent color cache. Perhaps this should be in + color.c? */ + pixelcolor=gdImageColorResolve(page_imagep, + cstack[csp].red, + cstack[csp].green, + cstack[csp].blue); + if (ColorCache[gdAlphaMax]!=pixelcolor) { + for( x=1; xh; y++) { + for( x=0; xw; x++) { + if (ptr->data[pos]>0) { + pixelgrey=gammatable[(int)ptr->data[pos]/2]; + bgColor = gdImageGetPixel(page_imagep, hh + x, vv + y); + if (ColorCache[0]!=bgColor || ColorCache[pixelgrey]==-1) { + DEBUG_PRINT(DEBUG_GLYPH,("\n GAMMA GREYSCALE: %d -> %d ", + ptr->data[pos]/2,pixelgrey)); + alpha = gdAlphaMax-pixelgrey; + dst_alpha = gdImageAlpha(page_imagep,bgColor); + dst_weight = (gdAlphaMax - dst_alpha) * alpha / gdAlphaMax; + tot_weight = pixelgrey + dst_weight; + pixelcolor = gdImageColorResolveAlpha(page_imagep, + (cstack[csp].red*pixelgrey + + gdImageRed(page_imagep,bgColor)*dst_weight)/tot_weight, + (cstack[csp].green*pixelgrey + + gdImageGreen(page_imagep,bgColor)*dst_weight)/tot_weight, + (cstack[csp].blue*pixelgrey + + gdImageBlue(page_imagep,bgColor)*dst_weight)/tot_weight, + alpha*dst_alpha/gdAlphaMax); + if (ColorCache[0]==bgColor) + ColorCache[pixelgrey]=pixelcolor; + } else + pixelcolor=ColorCache[pixelgrey]; + gdImageSetPixel(page_imagep, hh + x, vv + y, pixelcolor); + } + pos++; + } + } + return(ptr->tfmw); +} + +dviunits SetRule(dviunits a, dviunits b, subpixels hh,subpixels vv) +{ + /* This routine will draw a \rule */ + int Color; + pixels width=0, height=0; + + if ( a > 0 && b > 0 ) { + /* Calculate width and height, round up */ + width = (b+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; + height = (a+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; + } + if (page_imagep != NULL) { + if ((height>0) && (width>0)) { + /* This code produces too dark rules. But what the hell. Grey + * rules look fuzzy. */ + Color = gdImageColorResolve(page_imagep, + cstack[csp].red, + cstack[csp].green, + cstack[csp].blue); + /* +1 and -1 are because the Rectangle coords include last pixels */ + gdImageFilledRectangle(page_imagep,hh,vv-height+1,hh+width-1,vv,Color); + DEBUG_PRINT(DEBUG_DVI,("\n RULE \t%dx%d at (%d,%d)", + width, height, hh, vv)); + } + } else { + /* The +1's are because things are cut _at_that_coordinate_. */ + min(x_min,hh); + min(y_min,vv-height+1); + max(x_max,hh+width); + max(y_max,vv+1); + } + return(b); +} diff --git a/Build/source/texk/dvipng/dvipng-1.12/sfd.c b/Build/source/texk/dvipng/dvipng-1.12/sfd.c new file mode 100644 index 00000000000..08330e0dbc3 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/sfd.c @@ -0,0 +1,170 @@ +/* sfd.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" +struct subfont* subfontp=NULL; + +static struct subfont* ReadSubfont(char* sfdname, char *infix) +{ + char *pos,*max,*sfdfile=NULL; + struct subfont* sfdp=NULL; + struct filemmap fmmap; + + /* OK, find subfont and look for correct infix */ +#ifdef HAVE_KPSE_ENC_FORMATS + TEMPSTR(sfdfile,kpse_find_file(sfdname,kpse_sfd_format,false)); +#endif + if (sfdfile == NULL) { + Warning("subfont file %s could not be found",sfdname); + return(NULL); + } + DEBUG_PRINT((DEBUG_FT|DEBUG_ENC),("\n OPEN SUBFONT:\t'%s'", sfdfile)); + if (MmapFile(sfdfile,&fmmap)) return(NULL); + pos=fmmap.data; + max=fmmap.data+fmmap.size; + while(posname=(char*)sfdp+sizeof(struct subfont); + strcpy(sfdp->name,sfdname); + sfdp->infix=(char*)sfdp+sizeof(struct subfont)+strlen(sfdname)+1; + strcpy(sfdp->infix,infix); + sfdp->encoding=FT_ENCODING_UNICODE; + while (poscharindex[codepoint]=number; + DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT MAP %d %d",codepoint,number)); + number++; + codepoint++; + } + default: + if (codepoint<256) + sfdp->charindex[codepoint]=number; + DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT MAP %d %d",codepoint,number)); + } + while(postfmname,*sfdwant=fontname, + *sfdname,*infix,*postfix; + + while (*sfdspec!='\0' && *sfdspec==*sfdwant) { + sfdspec++; + sfdwant++; + } + /* Find delimiter */ + if (*sfdspec!='@') + return(NULL); + sfdspec++; + postfix=sfdspec; + while (*postfix!='\0' && *postfix!='@') + postfix++; + if (*postfix!='@') + return(NULL); + /* Extract subfont name */ + sfdname=alloca(postfix-sfdspec+1); + strncpy(sfdname,sfdspec,postfix-sfdspec); + sfdname[postfix-sfdspec]='\0'; + /* Check postfix */ + postfix++; + if (strcmp(sfdwant+strlen(sfdwant)-strlen(postfix),postfix)!=0) + return(NULL); + /* Extract infix */ + infix=alloca(strlen(sfdwant)-strlen(postfix)+1); + strncpy(infix,sfdwant,strlen(sfdwant)-strlen(postfix)); + infix[strlen(sfdwant)-strlen(postfix)]='\0'; + DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT %s %s %s",fontname,sfdname,infix)); + /* Find subfont */ + while(temp!=NULL + && (strcmp(sfdname,temp->name)!=0 || strcmp(infix,temp->infix)!=0)) + temp=temp->next; + if (temp==NULL) { + temp=ReadSubfont(sfdname,infix); + if (temp!=NULL) { + temp->next=subfontp; + subfontp=temp; + } + } + entry=NewPSFont(entry); + if (entry!=NULL) { + entry->tfmname=copyword(fontname); + entry->subfont=temp; + } + return(entry); +} + +void ClearSubfont(void) +{ + struct subfont *temp=subfontp; + + while(temp!=NULL) { + subfontp=subfontp->next; + free(temp); + temp=subfontp; + } +} + diff --git a/Build/source/texk/dvipng/dvipng-1.12/special.c b/Build/source/texk/dvipng/dvipng-1.12/special.c new file mode 100644 index 00000000000..7c8a64c4a36 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/special.c @@ -0,0 +1,796 @@ +/* special.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2009 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" + +#define SKIPSPACES(s) while(s && *s==' ' && *s!='\0') s++ + +/* PostScript can come as a string (headers and raw specials) or + a memory-mapped file (headers and included EPS figures). */ + +struct pscode { + struct pscode* next; + char* special; /* complete special */ + char* code; /* PS string, null if a file */ + char* filename; /* file name, null if a string */ + char* postcode; /* post PS string */ + struct filemmap fmmap; /* file mmap */ +}; + +struct pscode* psheaderp=NULL; /* static, DVI-specific header list */ + +static void PSCodeInit(struct pscode *entry, char *special) +{ + entry->next=NULL; + entry->special=special; + entry->code=NULL; + entry->filename=NULL; + entry->postcode=NULL; + entry->fmmap.data=NULL; + if (special==NULL) + return; + if (strncmp(special,"header=",7)==0) + entry->filename=special+7; + else if (strncmp(special,"ps:: plotfile ",14)==0) + entry->filename=special+14; + else if (special[0]=='"' || special[0]=='!') + entry->code=special+1; + else if (strncmp(special,"ps::[begin]",11)==0) + entry->code=special+11; + else if (strncmp(special,"ps::[end]",9)==0) + entry->code=special+9; + else if (strncmp(special,"ps::",4)==0) + entry->code=special+4; + else if (strncmp(special,"ps:",3)==0) + entry->code=special+3; + else + entry->code=special; +#ifdef DEBUG + if (entry->code!=NULL) + DEBUG_PRINT(DEBUG_GS,(" '%s'",entry->code)); + if (entry->filename!=NULL) + DEBUG_PRINT(DEBUG_GS,(" {%s}",entry->filename)); + if (entry->postcode!=NULL) + DEBUG_PRINT(DEBUG_GS,(" '%s'",entry->postcode)); +#endif +} + + + +void ClearPSHeaders(void) +{ + struct pscode *temp=psheaderp; + + while(temp!=NULL) { + psheaderp=psheaderp->next; + if (temp->fmmap.data!=NULL) + UnMmapFile(&(temp->fmmap)); + free(temp); + temp=psheaderp; + } +} + +static void writepscode(struct pscode* pscodep, FILE* psstream) +{ + while (pscodep!=NULL) { + if (pscodep->code!=NULL) { + fputs(pscodep->code,psstream); + putc('\n',psstream); + DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\t%s",pscodep->code)); + } + if (pscodep->filename!=NULL && pscodep->fmmap.data==NULL) { + char* filepath= + kpse_find_file(pscodep->filename,kpse_tex_ps_header_format,false); + if (filepath==NULL) { + Warning("Cannot find PostScript file %s, ignored", pscodep->filename); + page_flags |= PAGE_GAVE_WARN; + } else if (MmapFile(filepath,&(pscodep->fmmap))) { + Warning("PostScript file %s unusable, ignored", pscodep->filename); + page_flags |= PAGE_GAVE_WARN; + } + } + if (pscodep->fmmap.data!=NULL) { + unsigned char* position; + + DEBUG_PRINT(DEBUG_GS,("\n PS FILE:\t%s",pscodep->filename)); + position=(unsigned char*)pscodep->fmmap.data; + while(position + < (unsigned char*)pscodep->fmmap.data + pscodep->fmmap.size) { + putc(*position,psstream); + position++; + } + } + if (pscodep->postcode!=NULL) { + fputs(pscodep->postcode,psstream); + putc('\n',psstream); + DEBUG_PRINT(DEBUG_GS,("\n PS POST CODE:\t%s",pscodep->postcode)); + } + pscodep=pscodep->next; + } +} + + +static gdImagePtr +ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolution, + int llx, int lly, int urx, int ury, int bgred, int bggreen, int bgblue) +{ +#ifndef MIKTEX + int downpipe[2], uppipe[2]; + pid_t pid; +#else + HANDLE hPngStream; + HANDLE hPsStream; + HANDLE hStdErr; + PROCESS_INFORMATION pi; + _TCHAR szCommandLine[2048]; + _TCHAR szGsPath[_MAX_PATH]; +#define GS_PATH szGsPath + int fd; +#endif + FILE *psstream=NULL, *pngstream=NULL; + char resolution[STRSIZE]; + /* char devicesize[STRSIZE]; */ + gdImagePtr psimage=NULL; + static bool showpage=false; + + sprintf(resolution, "-r%dx%d",hresolution,vresolution); + /* Future extension for \rotatebox + status=sprintf(devicesize, "-g%dx%d", + //(int)((sin(atan(1.0))+1)* + (urx - llx)*hresolution/72,//), + //(int)((sin(atan(1.0))+1)* + (ury - lly)*vresolution/72);//); + */ + DEBUG_PRINT(DEBUG_GS, + ("\n GS CALL:\t%s %s %s %s %s %s %s %s %s %s %s",/* %s", */ + GS_PATH, device, resolution, /*devicesize,*/ + "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", + "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", + (option_flags & NO_GSSAFER) ? "-": "-dSAFER", + (option_flags & NO_GSSAFER) ? "": "- ")); +#ifndef MIKTEX + if (pipe(downpipe) || pipe(uppipe)) return(NULL); + /* Ready to fork */ + pid = fork (); + if (pid == 0) { /* Child process. Execute gs. */ + close(downpipe[1]); + dup2(downpipe[0], STDIN_FILENO); + close(downpipe[0]); + close(uppipe[0]); + dup2(uppipe[1], STDOUT_FILENO); + close(uppipe[1]); + execlp(GS_PATH, GS_PATH, device, resolution, /*devicesize,*/ + "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", + "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", + (option_flags & NO_GSSAFER) ? "-": "-dSAFER", + (option_flags & NO_GSSAFER) ? NULL: "-", + NULL); + _exit (EXIT_FAILURE); + } + /* Parent process. */ + + close(downpipe[0]); + psstream=fdopen(downpipe[1],"wb"); + /* fclose(psstream); psstream=fopen("test.ps","wb"); */ + if (psstream == NULL) + close(downpipe[1]); + close(uppipe[1]); + pngstream=fdopen(uppipe[0],"rb"); + if (pngstream == NULL) + close(uppipe[0]); +#else /* MIKTEX */ + if (! miktex_find_miktex_executable("mgs.exe", szGsPath)) { + Warning("Ghostscript could not be found"); + return(NULL); + } + sprintf(szCommandLine,"\"%s\" %s %s %s %s %s %s %s %s %s %s",/* %s",*/ + szGsPath, device, resolution, /*devicesize,*/ + "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", + "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", + (option_flags & NO_GSSAFER) ? "-": "-dSAFER", + (option_flags & NO_GSSAFER) ? "": "-"); + if (! miktex_start_process_3(szCommandLine, &pi, INVALID_HANDLE_VALUE, + &hPsStream, &hPngStream, &hStdErr, 0)) { + Warning("Ghostscript could not be started"); + return(NULL); + } + CloseHandle (pi.hThread); + fd = _open_osfhandle((intptr_t)hPsStream, _O_WRONLY); + if (fd >= 0) { + psstream = _tfdopen(fd, "wb"); + if (psstream == NULL) + _close (fd); + } + fd = _open_osfhandle((intptr_t)hPngStream, _O_RDONLY); + if (fd >= 0) { + pngstream = _tfdopen(fd, "rb"); + if (pngstream == NULL) + _close (fd); + } +#endif + if (psstream) { + writepscode(psheaderp,psstream); + DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\t<>setpagedevice", + urx - llx, ury - lly,llx,lly)); + fprintf(psstream, "<>setpagedevice\n", + urx - llx, ury - lly,llx,lly); + if ( bgred < 255 || bggreen < 255 || bgblue < 255 ) { + DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tgsave %f %f %f setrgbcolor clippath fill grestore", + bgred/255.0, bggreen/255.0, bgblue/255.0)); + fprintf(psstream, "gsave %f %f %f setrgbcolor clippath fill grestore", + bgred/255.0, bggreen/255.0, bgblue/255.0); + } + writepscode(pscodep,psstream); + if (showpage) { + DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tshowpage")); + fprintf(psstream, " showpage "); + } + fclose(psstream); + } + if (pngstream) { + psimage = gdImageCreateFromPng(pngstream); + fclose(pngstream); + } +#ifdef MIKTEX + CloseHandle(pi.hProcess); +#endif + if (psimage == NULL) { + DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\tNO IMAGE ")); + if (!showpage) { + showpage=true; + DEBUG_PRINT(DEBUG_GS,("(will try adding \"showpage\") ")); + psimage=ps2png(pscodep, + device, hresolution, vresolution, llx, lly, urx, ury, + bgred,bggreen,bgblue); + showpage=false; + } +#ifdef DEBUG + } else { + DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\t%dx%d image ", + gdImageSX(psimage),gdImageSY(psimage))); +#endif + } + return psimage; +} + +static gdImagePtr +rescale(gdImagePtr psimage, int pngwidth, int pngheight) +{ + gdImagePtr scaledimage=psimage; + /* Rescale unless correct size */ + if (psimage!=NULL + && gdImageSX(psimage)!=pngwidth + && gdImageSY(psimage)!=pngheight) { + DEBUG_PRINT(DEBUG_DVI, + ("\n RESCALE INCLUDED BITMAP \t(%d,%d) -> (%d,%d)", + gdImageSX(psimage),gdImageSY(psimage), + pngwidth,pngheight)); +#ifdef HAVE_GDIMAGECREATETRUECOLOR + scaledimage=gdImageCreateTrueColor(pngwidth,pngheight); + /* Copy with overwrite, remember that this is the rescaled source + image. The real target has alpha blending on. */ + gdImageAlphaBlending(scaledimage,0); + gdImageCopyResampled(scaledimage,psimage,0,0,0,0, + pngwidth,pngheight, + gdImageSX(psimage),gdImageSY(psimage)); +#else + scaledimage=gdImageCreate(pngwidth,pngheight); + gdImageCopyResized(scaledimage,psimage,0,0,0,0, + pngwidth,pngheight, + gdImageSX(psimage),gdImageSY(psimage)); +#endif + gdImageDestroy(psimage); + } + return(scaledimage); +} + +static void newpsheader(const char* special) { + struct pscode* tmp; + char* txt; + + if (psheaderp==NULL && strcmp(special,"header=tex.pro")!=0) { + newpsheader("header=tex.pro"); + newpsheader("header=color.pro"); + newpsheader("header=special.pro"); + } + if (strcmp(special+strlen(special)-4,".xcp")==0 + && strncmp(special,"header=",7)==0) + InitXColorPrologue(special+7); + if (strncmp(special,"! /pgfH",7)==0) + newpsheader("! TeXDict begin"); + if (psheaderp==NULL) { + if ((tmp=psheaderp=malloc(sizeof(struct pscode)))==NULL) + Fatal("cannot allocate space for PostScript header struct"); + } else { + /* No duplicates. This still misses pre=..., because we still + change that. To be fixed */ + tmp=psheaderp; + if (strcmp(tmp->special,special)==0) + return; + while(tmp->next!=NULL) { + tmp=tmp->next; + if (strcmp(tmp->special,special)==0) + return; + } + if ((tmp->next=malloc(sizeof(struct pscode)))==NULL) + Fatal("cannot allocate space for PostScript header struct"); + tmp=tmp->next; + } + DEBUG_PRINT(DEBUG_GS,("\n PS HEADER ")); + if ((txt=malloc(strlen(special)+1))==NULL) + Fatal("cannot malloc space for PostScript header"); + strcpy(txt,special); + PSCodeInit(tmp,txt); +} + +/*********************************************************************/ +/**************************** SetSpecial ***************************/ +/*********************************************************************/ + +void SetSpecial(char * special, int32_t hh, int32_t vv) +/* interpret a \special command, made up of keyword=value pairs, + * or !header or ps:literal_PostScript + */ +{ + DEBUG_PRINT(DEBUG_DVI,(" '%s'",special)); + SKIPSPACES(special); + /********************** Color specials ***********************/ + if (strncmp(special,"background ",11)==0) { + background(special+11); + return; + } + if (strncmp(special,"color ",6)==0) { + special+=6; + SKIPSPACES(special); + if (strncmp(special,"push ",5)==0) { + pushcolor(special+5); + } else { + if (strcmp(special,"pop")==0) + popcolor(); + else + resetcolorstack(special); + } + return; + } + + /******************* Image inclusion ********************/ + + /* Needed tests for regression: PNG, GIF, JPEG and EPS inclusion, + * for different gd versions */ + + if (strncmp(special,"PSfile=",7)==0) { /* PSfile */ + char* psname = special+7; + int llx=0,lly=0,urx=0,ury=0,rwi=0,rhi=0; + bool clip=false; + int hresolution,vresolution; + int pngheight,pngwidth; + + /* Remove quotation marks around filename. If no quotation marks, + use first word as filename */ + if (*psname=='"') { + psname++; + special=strrchr(psname,'"'); + } else { + special=strchr(psname,' '); + } + if (special!=NULL) { + *special='\0'; + special++; + } + + /* Retrieve parameters */ + SKIPSPACES(special); + while(special && *special) { + if (strncmp(special,"llx=",4)==0) + llx = strtol(special+4,&special,10); + else if (strncmp(special,"lly=",4)==0) + lly = strtol(special+4,&special,10); + else if (strncmp(special,"urx=",4)==0) + urx = strtol(special+4,&special,10); + else if (strncmp(special,"ury=",4)==0) + ury = strtol(special+4,&special,10); + else if (strncmp(special,"rwi=",4)==0) + rwi = strtol(special+4,&special,10); + else if (strncmp(special,"rhi=",4)==0) + rhi = strtol(special+4,&special,10); + else if (strncmp(special,"clip",4)==0) + {clip = true; special=special+4;} + while (*special && *special!=' ') special++; + SKIPSPACES(special); + } + + /* Calculate resolution, and use our base resolution as a fallback. */ + /* The factor 10 is magic, the dvips graphicx driver needs this. */ + hresolution = ((dpi*rwi+urx-llx-1)/(urx - llx)+9)/10; + vresolution = ((dpi*rhi+ury-lly-1)/(ury - lly)+9)/10; + if (vresolution==0) vresolution = hresolution; + if (hresolution==0) hresolution = vresolution; + if (hresolution==0) hresolution = vresolution = dpi; + + /* Convert from postscript 72 dpi resolution to our given resolution */ + pngwidth = (dpi*rwi+719)/720; /* +719: round up */ + pngheight = (dpi*rhi+719)/720; + if (pngwidth==0) + pngwidth = ((dpi*rhi*(urx-llx)+ury-lly-1)/(ury-lly)+719)/720; + if (pngheight==0) + pngheight = ((dpi*rwi*(ury-lly)+urx-llx-1)/(urx-llx)+719)/720; + if (pngheight==0) { + pngwidth = (dpi*(urx-llx)+71)/72; + pngheight = (dpi*(ury-lly)+71)/72; + } + if (page_imagep != NULL) { /* Draw into image */ + struct pscode image; + gdImagePtr psimage=NULL; +#ifndef HAVE_GDIMAGECREATEFROMPNGPTR + FILE* psstream; +#endif + + PSCodeInit(&image, NULL); + TEMPSTR(image.filename,kpse_find_file(psname,kpse_pict_format,0)); + if (MmapFile(image.filename,&(image.fmmap)) || image.fmmap.size==0) { + Warning("Image file %s unusable, image will be left blank", + image.filename); + page_flags |= PAGE_GAVE_WARN; + return; + } + Message(BE_NONQUIET," <%s",psname); + switch ((unsigned char)*image.fmmap.data) { + case 0x89: /* PNG magic: "\211PNG\r\n\032\n" */ + DEBUG_PRINT(DEBUG_DVI,("\n INCLUDE PNG \t%s",image.filename)); +#ifdef HAVE_GDIMAGECREATEFROMPNGPTR + psimage=gdImageCreateFromPngPtr(image.fmmap.size,image.fmmap.data); +#else + psstream=fopen(image.filename,"rb"); + psimage=gdImageCreateFromPng(psstream); + fclose(psstream); +#endif + psimage=rescale(psimage,pngwidth,pngheight); + break; + case 'G': /* GIF magic: "GIF87" or "GIF89" */ + DEBUG_PRINT(DEBUG_DVI,("\n INCLUDE GIF \t%s",image.filename)); +#ifdef HAVE_GDIMAGEGIF + psimage=rescale(gdImageCreateFromGifPtr(image.fmmap.size, + image.fmmap.data), + pngwidth,pngheight); +#else + DEBUG_PRINT(DEBUG_DVI,(" (NO GIF DECODER)")); +#endif + break; + case 0xff: /* JPEG magic: 0xffd8 */ + DEBUG_PRINT(DEBUG_DVI,("\n INCLUDE JPEG \t%s",image.filename)); +#ifdef HAVE_GDIMAGECREATEFROMJPEG +#ifdef HAVE_GDIMAGECREATEFROMPNGPTR + psimage=gdImageCreateFromJpegPtr(image.fmmap.size,image.fmmap.data); +#else + psstream=fopen(image.filename,"rb"); + psimage=gdImageCreateFromJpeg(psstream); + fclose(psstream); +#endif + psimage=rescale(psimage,pngwidth,pngheight); +#else + DEBUG_PRINT(DEBUG_DVI,(" (NO JPEG DECODER)")); +#endif + break; + default: /* Default, PostScript magic: "%!PS-Adobe" */ + if (option_flags & NO_GHOSTSCRIPT) { + Warning("GhostScript calls disallowed by --noghostscript" ); + page_flags |= PAGE_GAVE_WARN; + } else { + /* Use alpha blending, and render transparent postscript + images. The alpha blending works correctly only from + libgd 2.0.12 upwards */ +#ifdef HAVE_GDIMAGEPNGEX + if (page_imagep->trueColor) { + int tllx=llx,tlly=lly,turx=urx,tury=ury; + + DEBUG_PRINT((DEBUG_DVI | DEBUG_GS), + ("\n GS RENDER \t%s -> pngalpha ",image.filename)); + if (!clip) { + /* Render across the whole image */ + tllx=llx-(hh+1)*72/hresolution; + tlly=lly-(gdImageSY(page_imagep)-vv-1)*72/vresolution; + turx=llx+(gdImageSX(page_imagep)-hh)*72/hresolution; + tury=lly+(vv+1)*72/vresolution; + DEBUG_PRINT((DEBUG_DVI | DEBUG_GS), + ("\n EXPAND BBOX \t%d %d %d %d -> %d %d %d %d", + llx,lly,urx,ury,tllx,tlly,turx,tury)); +#ifdef DEBUG + } else { + DEBUG_PRINT((DEBUG_DVI | DEBUG_GS),(", CLIPPED TO BBOX")); +#endif + } + psimage = ps2png(&image, "-sDEVICE=pngalpha", + hresolution, vresolution, + tllx, tlly, turx, tury, + 255,255,255); + if (psimage==NULL) + Warning("No GhostScript pngalpha output, opaque image inclusion"); + } else + Warning("Palette output, opaque image inclusion"); +#endif + if (psimage==NULL) { + /* png256 gives inferior result */ + DEBUG_PRINT((DEBUG_DVI | DEBUG_GS), + ("\n GS RENDER \t%s -> png16m", image.filename)); + psimage = ps2png(&image, "-sDEVICE=png16m", + hresolution, vresolution, + llx, lly, urx, ury, + cstack[0].red,cstack[0].green,cstack[0].blue); + clip=true; + page_flags |= PAGE_GAVE_WARN; + } + if (!clip) { + /* Rendering across the whole image */ + hh=0; + vv=gdImageSY(psimage)-1; + } + } + } + UnMmapFile(&(image.fmmap)); + if (psimage!=NULL) { + DEBUG_PRINT(DEBUG_DVI, + ("\n GRAPHIC(X|S) INCLUDE \t%s (%d,%d) res %dx%d at (%d,%d)", + psname,gdImageSX(psimage),gdImageSY(psimage), + hresolution,vresolution,hh,vv)); +#ifdef HAVE_GDIMAGECREATETRUECOLOR + if (psimage->trueColor && !page_imagep->trueColor) + gdImageTrueColorToPalette(psimage,0,256); +#endif +#ifdef HAVE_GDIMAGEPNGEX + gdImageAlphaBlending(page_imagep,1); +#else + Warning("Using libgd < 2.0.12, opaque image inclusion"); + page_flags |= PAGE_GAVE_WARN; +#endif + gdImageCopy(page_imagep, psimage, + hh, vv-gdImageSY(psimage)+1, + 0,0, + gdImageSX(psimage),gdImageSY(psimage)); +#ifdef HAVE_GDIMAGEPNGEX + gdImageAlphaBlending(page_imagep,0); +#endif + gdImageDestroy(psimage); + } else { + Warning("Unable to load %s, image will be left blank",image.filename); + page_flags |= PAGE_GAVE_WARN; + } + Message(BE_NONQUIET,">"); + } else { /* Don't draw */ + page_flags |= PAGE_TRUECOLOR; + DEBUG_PRINT(DEBUG_DVI, + ("\n GRAPHIC(X|S) INCLUDE \t%s (%d,%d) res %dx%d at (%d,%d)", + psname,pngheight,pngwidth, + hresolution,vresolution,hh,vv)); + min(x_min,hh); + min(y_min,vv-pngheight+1); + max(x_max,hh+pngwidth); + max(y_max,vv+1); + } + return; + } + + /******************* Raw PostScript ********************/ + + if (strncmp(special,"!/preview@version(",18)==0) { + int length=0; + special+=18; + while (special[length]!='\0' && special[length]!=')') + length++; + if (page_imagep==NULL) + Message(BE_NONQUIET," (preview-latex version %.*s)",length,special); + return; + } + + /* preview-latex' tightpage option */ + if (strncmp(special,"!/preview@tightpage",19)==0) { + special+=19; + SKIPSPACES(special); + if (strncmp(special,"true",4)==0) { + if (page_imagep==NULL) + Message(BE_NONQUIET," (preview-latex tightpage option detected, will use its bounding box)"); + dvi->flags |= DVI_PREVIEW_LATEX_TIGHTPAGE; + } + return; + } + if (strncmp(special,"!userdict",9)==0 + && strstr(special+10,"7{currentfile token not{stop}if 65781.76 div")!=NULL) { + if (page_imagep==NULL && ~dvi->flags & DVI_PREVIEW_LATEX_TIGHTPAGE) + Message(BE_NONQUIET," (preview-latex <= 0.9.1 tightpage option detected, will use its bounding box)"); + dvi->flags |= DVI_PREVIEW_LATEX_TIGHTPAGE; + return; + } + + /* preview-latex' dvips bop-hook redefinition */ + if (strncmp(special,"!userdict",9)==0 + && strstr(special+10,"preview-bop-")!=NULL) { + dvi->flags |= DVI_PREVIEW_BOP_HOOK; + if (page_imagep==NULL) + Message(BE_VERBOSE," (preview-latex beginning-of-page-hook detected)"); + return; + } + + if (dvi->flags & DVI_PREVIEW_BOP_HOOK && ~page_flags & PAGE_PREVIEW_BOP + && strncmp(special,"ps::",4)==0) { + dviunits adj_llx,adj_lly,adj_urx,adj_ury,ht,dp,wd; + page_flags |= PAGE_PREVIEW_BOP; + /* Hokay, decode bounding box */ + adj_llx = strtol(special+4,&special,10); + adj_lly = strtol(special,&special,10); + adj_urx = strtol(special,&special,10); + adj_ury = strtol(special,&special,10); + ht = strtol(special,&special,10); + dp = strtol(special,&special,10); + wd = strtol(special,&special,10); + if (wd>0) { + x_offset_tightpage = + (-adj_llx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; + x_width_tightpage = x_offset_tightpage + +(wd+adj_urx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; + } else { + x_offset_tightpage = + (-wd+adj_urx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; + x_width_tightpage = x_offset_tightpage + +(-adj_llx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; + } + /* y-offset = height - 1 */ + y_offset_tightpage = + (((ht>0)?ht:0)+adj_ury+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor-1; + y_width_tightpage = y_offset_tightpage+1 + +(((dp>0)?dp:0)-adj_lly+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; + return; + } + + if (special[0]=='"' || strncmp(special,"ps:",3)==0) { /* Literal PostScript */ + if (page_imagep != NULL) { /* Draw into image */ + static struct pscode *pscodep=NULL; + static bool psenvironment=false; + bool nextisps; + struct pscode *tmp; + gdImagePtr psimage=NULL; + char *txt; + const char *newspecial=NULL; /* Avoid warning from special="..." */ + + /* Some packages split their literal PostScript code into + several specials. Check for those, and concatenate them so + that they're given to one and the same invocation of gs */ + if (pscodep==NULL) { + Message(BE_NONQUIET," next != NULL) + tmp=tmp->next; + if ((tmp->next=malloc(sizeof(struct pscode)))==NULL) + Fatal("cannot allocate space for raw PostScript struct"); + tmp=tmp->next; + } + if (strncmp(special,"ps::[begin]",11)==0) + psenvironment=true; + else if (strncmp(special,"ps::[end]",9)==0) + psenvironment=false; + else if (strcmp(special,"ps:: pgfo")==0) + /* PostScript code to start page for pgf PostScript + specials. The first numbers are generally valid for the bop + instruction, and the latter code is to move the origin to + the right place. */ + newspecial="ps:: 39139632 55387786 1000 600 600 (tikzdefault.dvi) @start 1 0 bop pgfo 0 0 matrix defaultmatrix transform itransform translate"; + else if (strcmp(special,"ps:: pgfc")==0) + newspecial="ps:: pgfc eop end"; + nextisps=DVIIsNextPSSpecial(dvi); + if (psenvironment || nextisps) { + if (!nextisps) { + Warning("PostScript environment contains DVI commands"); + page_flags |= PAGE_GAVE_WARN; + } + /* Don't use alloca, we do not want to run out of stack space */ + DEBUG_PRINT(DEBUG_GS,("\n PS SPECIAL ")); + if (newspecial == NULL) + newspecial=special; + if ((txt=malloc(strlen(newspecial)+1))==NULL) + Fatal("cannot allocate space for raw PostScript special"); + strcpy(txt,newspecial); + PSCodeInit(tmp,txt); + return; + } + DEBUG_PRINT(DEBUG_DVI,("\n LAST PS SPECIAL ")); + if (newspecial != NULL) { + if ((special=malloc(strlen(newspecial)+1))==NULL) + Fatal("cannot allocate space for raw PostScript special"); + strcpy(special,newspecial); + } + PSCodeInit(tmp,special); + /* Now, render image */ + if (option_flags & NO_GHOSTSCRIPT) + Warning("GhostScript calls disallowed by --noghostscript" ); + else { + /* Use alpha blending, and render transparent postscript + images. The alpha blending works correctly only from + libgd 2.0.12 upwards */ +#ifdef HAVE_GDIMAGEPNGEX + if (page_imagep->trueColor) { + /* Render across the whole image */ + psimage = ps2png(pscodep, "-sDEVICE=pngalpha", + dpi,dpi, + -(hh+1)*72/dpi, + -(gdImageSY(page_imagep)-vv-1)*72/dpi, + (gdImageSX(page_imagep)-hh)*72/dpi, + (vv+1)*72/dpi, + 255,255,255); + if (psimage!=NULL) { + gdImageAlphaBlending(page_imagep,1); + gdImageCopy(page_imagep, psimage, + 0,0,0,0, + gdImageSX(psimage),gdImageSY(psimage)); + gdImageAlphaBlending(page_imagep,0); + gdImageDestroy(psimage); + } else + Warning("No GhostScript pngalpha output, cannot render raw PostScript"); + } else + Warning("Palette output, cannot include raw PostScript"); +#else + Warning("Using libgd < 2.0.12, unable to include raw PostScript"); +#endif + } + while(pscodep->next != NULL) { + tmp=pscodep->next; + free(pscodep->special); + free(pscodep); + pscodep=tmp; + } + free(pscodep); + pscodep=NULL; + if (newspecial != NULL) + free(special); + if (psimage==NULL) + page_flags |= PAGE_GAVE_WARN; + Message(BE_NONQUIET,">"); + } else { /* Don't draw */ + page_flags |= PAGE_TRUECOLOR; + } + return; + } + + if (strncmp(special,"papersize=",10)==0) { /* papersize spec, ignored */ + return; + } + + if (special[0]=='!' || strncmp(special,"header=",7)==0) { /* PS header */ + newpsheader(special); + return; + } + + if (strncmp(special,"src:",4)==0) { /* source special */ + if ( page_imagep != NULL ) + Message(BE_NONQUIET," at (%ld,%ld) source \\special{%s}", + hh, vv, special); + return; + } + if ( page_imagep != NULL ) { + Warning("at (%ld,%ld) unimplemented \\special{%s}", + hh, vv, special); + page_flags |= PAGE_GAVE_WARN; + } +} + diff --git a/Build/source/texk/dvipng/dvipng-1.12/t1.c b/Build/source/texk/dvipng/dvipng-1.12/t1.c new file mode 100644 index 00000000000..84a15a5bf67 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/t1.c @@ -0,0 +1,193 @@ +/* t1.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" +#ifdef HAVE_ALLOCA_H +# include +#endif + +void LoadT1(int32_t c, struct char_entry * ptr) +{ + GLYPH *glyph; + int original_width,original_height; + int i,j,k,width,height; + unsigned short shrunk_width,shrunk_height; + short xoffset,yoffset; + unsigned short i_offset,j_offset; + + DEBUG_PRINT(DEBUG_T1,("\n LOAD T1 CHAR\t%d",c)); + if ((glyph= + T1_SetChar(currentfont->T1id, c, + (float)currentfont->dpi*currentfont->d/65536/72.27, + currentfont->psfontmap==NULL ? NULL : currentfont->psfontmap->t1_transformp)) + ==NULL) + Fatal("cannot load T1 char %d",c); + + DEBUG_PRINT(DEBUG_T1,(" (%d)",ptr->tfmw)); + + original_width = glyph->metrics.rightSideBearing + - glyph->metrics.leftSideBearing; + original_height = glyph->metrics.ascent - glyph->metrics.descent; + DEBUG_PRINT(DEBUG_T1,(" %dx%d",original_width,original_height)); + + if (original_width > 0x7fff || original_height > 0x7fff) + Fatal("character %d too large in file %s", c, currentfont->name); + + /* + * Hotspot issues: Shrinking to the topleft corner rather than the + hotspot will displace glyphs a fraction of a pixel. We deal with + this in as follows: The glyph is shrunk to its hotspot by + offsetting the bitmap somewhat to put the hotspot in the lower + left corner of a "shrink square". Shrinking to the topleft corner + will then act as shrinking to the hotspot. This may enlarge the + bitmap somewhat, of course. (Also remember that the below + calculation of i/j_offset is in integer arithmetics.) + + There will still be a displacement from rounding the dvi + position, but vertically it will be equal for all glyphs on a + line, so we displace a whole line vertically by fractions of a + pixel. This is acceptible, IMHO. Sometime there will be support + for subpixel positioning, horizontally. Will do for now, I + suppose. + */ + xoffset = -glyph->metrics.leftSideBearing; + /* printf("xoffset: %d\n",xoffset); */ + i_offset = ( shrinkfactor - xoffset % shrinkfactor ) % shrinkfactor; + width = original_width+i_offset; + ptr->xOffset = xoffset+i_offset; + + yoffset = glyph->metrics.ascent-1; + /* printf("yoffset: %d\n",yoffset); */ + j_offset = ( shrinkfactor - (yoffset-(shrinkfactor-1)) % shrinkfactor ) + % shrinkfactor; + height = original_height+j_offset; + ptr->yOffset = yoffset+j_offset; + + DEBUG_PRINT(DEBUG_T1,(" (%dx%d)",width,height)); + /* + Extra marginal so that we do not crop the image when shrinking. + */ + shrunk_width = (width + shrinkfactor - 1) / shrinkfactor; + shrunk_height = (height + shrinkfactor - 1) / shrinkfactor; + ptr->w = shrunk_width; + ptr->h = shrunk_height; + + /* printf("(%d,%d) ",ptr->w,ptr->h); */ + DEBUG_PRINT(DEBUG_GLYPH,("\nDRAW GLYPH %d\n", (int)c)); + + /* + Shrink raster while doing antialiasing. + */ + if ((ptr->data = calloc(shrunk_width*shrunk_height,sizeof(char))) == NULL) + Fatal("unable to allocate image space for char %c", (char)c); + for (j = 0; j < original_height; j++) { + for (i = 0; i < (original_width+7)/8 ; i++) { + for (k = 0; k < 8 ; k++) { + DEBUG_PRINT(DEBUG_GLYPH, + ("%c", + (glyph->bits[i+j*((original_width+7)/8)] & (1<data[(i*8+k+i_offset)/shrinkfactor + +(j+j_offset)/shrinkfactor*shrunk_width] += + (glyph->bits[i+j*((original_width+7)/8)] & (1<data[i+j*shrunk_width] = ptr->data[i+j*shrunk_width] + *255/shrinkfactor/shrinkfactor; + DEBUG_PRINT(DEBUG_GLYPH,("%3u ",ptr->data[i+j*shrunk_width])); + } + DEBUG_PRINT(DEBUG_GLYPH,("|\n")); + } +} + +bool InitT1(struct font_entry * tfontp) +{ + if (libt1==NULL) { + if ((libt1=T1_InitLib( NO_LOGFILE | IGNORE_CONFIGFILE + | IGNORE_FONTDATABASE | T1_NO_AFM)) == NULL) { + Warning("an error occured during t1lib initialisation, disabling it"); + option_flags &= ~USE_LIBT1; + return(false); + } +# ifdef DEBUG + else + DEBUG_PRINT(DEBUG_T1,("\n T1LIB VERSION: %s", T1_GetLibIdent())); +# endif + } + + DEBUG_PRINT((DEBUG_DVI|DEBUG_T1),("\n OPEN T1 FONT:\t'%s'", tfontp->name)); + tfontp->T1id = T1_AddFont( tfontp->name ); + if (tfontp->T1id < 0) { + Warning("t1lib could not open font file %s", tfontp->name); + return(false); + } + if (T1_LoadFont(tfontp->T1id)) { + Warning("t1lib could not load font file %s", tfontp->name); + return(false); + } + Message(BE_VERBOSE,"<%s>", tfontp->name); + if (tfontp->psfontmap!=NULL && tfontp->psfontmap->encoding != NULL) { + DEBUG_PRINT(DEBUG_T1,("\n USE ENCODING:\t'%s'", tfontp->psfontmap->encoding->name)); + if (T1_ReencodeFont(tfontp->T1id,tfontp->psfontmap->encoding->charname)) { + Warning("unable to use font encoding '%s' for %s", + tfontp->psfontmap->encoding->name,tfontp->name); + return(false); + } + } + tfontp->type = FONT_TYPE_T1; + return(true); +} + + +static void UnLoadT1(struct char_entry *ptr) +{ + if (ptr->data!=NULL) + free(ptr->data); + ptr->data=NULL; +} + + +void DoneT1(struct font_entry *tfontp) +{ + int c=0; + + int error = T1_DeleteFont( tfontp->T1id ); + if (error) + Warning("font file %s could not be closed", tfontp->name); + while(cchr[c]!=NULL) { + UnLoadT1((struct char_entry*)tfontp->chr[c]); + free(tfontp->chr[c]); + tfontp->chr[c]=NULL; + } + c++; + } + tfontp->name[0]='\0'; +} + + diff --git a/Build/source/texk/dvipng/dvipng-1.12/test_dvipng.tex b/Build/source/texk/dvipng/dvipng-1.12/test_dvipng.tex new file mode 100644 index 00000000000..c62e054e53b --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/test_dvipng.tex @@ -0,0 +1,49 @@ +% test_dvipng.tex +% +% Part of the dvipng distribution +% +% This program is free software: you can redistribute it and/or modify +% it under the terms of the GNU Lesser General Public License as +% published by the Free Software Foundation, either version 3 of the +% License, or (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, but +% WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +% Lesser General Public License for more details. +% +% You should have received a copy of the GNU Lesser General Public +% License along with this program. If not, see +% . +% +% Copyright (C) 2002-2008 Jan-{\AA}ke Larsson + +\documentclass{article} +\usepackage{mathptmx} +%\usepackage[active,textmath]{preview} +\usepackage{color} +\pagestyle{empty} + +\begin{document} +\begin{equation} + \int dx +\end{equation} +\newpage +$\int dx$ +\newpage +$\sqrt2+1=\frac1{\sqrt2-1}$ +\newpage +\framebox{\textbackslash\ttfamily framebox} +\newpage +\( \begin{array}{|r|} \hline a \cr \hline \end{array} \) +\newpage +fig, pig, flask, efficiency, effluent +\newpage +\Huge A \LARGE A \Large A \large A \normalsize A \small A +\footnotesize A \scriptsize A \tiny A +\newpage +\color{yellow} + +\section*{Hello world} +\pagecolor{blue} +\end{document} diff --git a/Build/source/texk/dvipng/dvipng-1.12/tfm.c b/Build/source/texk/dvipng/dvipng-1.12/tfm.c new file mode 100644 index 00000000000..81b89d0f7d1 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/tfm.c @@ -0,0 +1,79 @@ +/* tfm.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" +#ifdef HAVE_ALLOCA_H +# include +#endif + +bool ReadTFM(struct font_entry * tfontp, char* tfmname) +{ + struct filemmap fmmap; + struct char_entry *tcharptr; + unsigned char *position; + int lh,bc,ec,nw, c; + dviunits* width; + + DEBUG_PRINT((DEBUG_DVI|DEBUG_FT|DEBUG_TFM), + ("\n OPEN METRICS:\t'%s'", tfmname)); + if (MmapFile(tfmname,&fmmap)) return(false); + position=(unsigned char*)fmmap.data; + lh = UNumRead(position+2,2); + bc = UNumRead(position+4,2); + ec = UNumRead(position+6,2); + nw = UNumRead(position+8,2); + DEBUG_PRINT(DEBUG_TFM,(" %d %d %d %d",lh,bc,ec,nw)); + width=alloca(nw*sizeof(dviunits)); + c=0; + position=position+24+(lh+ec-bc+1)*4; + while( c < nw ) { + width[c] = SNumRead(position,4); + c++; + position += 4; + } + + /* Read char widths */ + c=bc; + position=(unsigned char*)fmmap.data+24+lh*4; + while(c <= ec) { + DEBUG_PRINT(DEBUG_TFM,("\n@%ld TFM METRICS:\t", + (long)position - (long)fmmap.data)); + tcharptr=xmalloc(sizeof(struct char_entry)); + tcharptr->data=NULL; + tcharptr->tfmw=width[*position]; + DEBUG_PRINT(DEBUG_TFM,("%d [%d] %d",c,*position,tcharptr->tfmw)); + tcharptr->tfmw = (dviunits) + ((int64_t) tcharptr->tfmw * tfontp->s / (1 << 20)); + DEBUG_PRINT(DEBUG_TFM,(" (%d)",tcharptr->tfmw)); + if (c >= NFNTCHARS) /* Only positive for now */ + Fatal("tfm file %s exceeds char numbering limit",tfmname); + tfontp->chr[c] = tcharptr; + c++; + position += 4; + } + UnMmapFile(&fmmap); + return(true); +} + + diff --git a/Build/source/texk/dvipng/dvipng-1.12/vf.c b/Build/source/texk/dvipng/dvipng-1.12/vf.c new file mode 100644 index 00000000000..c46a3b08daa --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12/vf.c @@ -0,0 +1,143 @@ +/* vf.c */ + +/************************************************************************ + + Part of the dvipng distribution + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this program. If not, see + . + + Copyright (C) 2002-2008 Jan-Åke Larsson + +************************************************************************/ + +#include "dvipng.h" + +#define VF_ID 202 +#define LONG_CHAR 242 + +int32_t SetVF(int32_t c) +{ + struct font_entry* currentvf; + unsigned char *command,*end; + struct char_entry* ptr=currentfont->chr[c]; + + currentvf=currentfont; + BeginVFMacro(currentvf); + command = ptr->data; + end = command + ptr->length; + while (command < end) { + DEBUG_PRINT(DEBUG_DVI,("\n VF MACRO:\t%s ", dvi_commands[*command])); + DrawCommand(command,currentvf); + command += CommandLength(command); + } + EndVFMacro(); + currentfont=currentvf; + return(ptr->tfmw); +} + + + +void InitVF(struct font_entry * tfontp) +{ + unsigned char* position; + int length; + struct char_entry *tcharptr; + uint32_t c=0; + struct font_num *tfontnump; /* temporary font_num pointer */ + + DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n OPEN FONT:\t'%s'", tfontp->name)); + Message(BE_VERBOSE,"<%s>", tfontp->name); + if (MmapFile(tfontp->name,&(tfontp->fmmap))) + Fatal("font file %s unusable", tfontp->name); + position=(unsigned char*)tfontp->fmmap.data; + if (*(position) != PRE) + Fatal("unknown font format in file %s",tfontp->name); + if (*(position+1) != VF_ID) + Fatal( "wrong version %d of vf file %s (should be 202)", + (int)*(position+1),tfontp->name); + DEBUG_PRINT(DEBUG_VF,("\n VF_PRE:\t'%.*s'", + (int)*(position+2), position+3)); + position = position+3 + *(position+2); + c=UNumRead(position, 4); + DEBUG_PRINT(DEBUG_VF,(" %d", c)); + CheckChecksum (tfontp->c, c, tfontp->name); + tfontp->designsize = UNumRead(position+4,4); + DEBUG_PRINT(DEBUG_VF,(" %d", tfontp->designsize)); + tfontp->type = FONT_TYPE_VF; + tfontp->vffontnump=NULL; + /* Read font definitions */ + position += 8; + while(*position >= FNT_DEF1 && *position <= FNT_DEF4) { + DEBUG_PRINT(DEBUG_VF,("\n @%ld VF:\t%s", + (long)position - (long)tfontp->fmmap.data, + dvi_commands[*position])); + FontDef(position,tfontp); + length = dvi_commandlength[*position]; + position += length + *(position + length-1) + *(position+length-2); + } + /* Default font is the first defined */ + tfontnump = tfontp->vffontnump; + while (tfontnump->next != NULL) { + tfontnump = tfontnump->next; + } + tfontp->defaultfont=tfontnump->k; + + /* Read char definitions */ + while(*position < FNT_DEF1) { + DEBUG_PRINT(DEBUG_VF,("\n@%ld VF CHAR:\t", + (long)position - (long)tfontp->fmmap.data)); + tcharptr=xmalloc(sizeof(struct char_entry)); + switch (*position) { + case LONG_CHAR: + tcharptr->length = UNumRead(position+1,4); + c = UNumRead(position+5,4); + tcharptr->tfmw = UNumRead(position+9,4); + position += 13; + break; + default: + tcharptr->length = UNumRead(position,1); + c = UNumRead(position+1,1); + tcharptr->tfmw = UNumRead(position+2,3); + position += 5; + } + DEBUG_PRINT(DEBUG_VF,("%d %d %d",tcharptr->length,c,tcharptr->tfmw)); + tcharptr->tfmw = (int32_t) + ((int64_t) tcharptr->tfmw * tfontp->s / (1 << 20)); + DEBUG_PRINT(DEBUG_VF,(" (%d)",tcharptr->tfmw)); + if (c >= NFNTCHARS) /* Only positive for now */ + Fatal("VF font %s exceeds char numbering limit",tfontp->name); + tfontp->chr[c] = tcharptr; + tcharptr->data=position; + position += tcharptr->length; + } +} + + +void DoneVF(struct font_entry *tfontp) +{ + int c=FIRSTFNTCHAR; + + UnMmapFile(&(tfontp->fmmap)); + while(c<=LASTFNTCHAR) { + if (tfontp->chr[c]!=NULL) { + free(tfontp->chr[c]); + tfontp->chr[c]=NULL; + } + c++; + } + FreeFontNumP(tfontp->vffontnump); + tfontp->vffontnump=NULL; + tfontp->name[0]='\0'; +} diff --git a/Build/source/texk/dvipng/dvipng.c b/Build/source/texk/dvipng/dvipng.c deleted file mode 100644 index 78b07c1a81f..00000000000 --- a/Build/source/texk/dvipng/dvipng.c +++ /dev/null @@ -1,164 +0,0 @@ -/* dvipng.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -/* This program translates TeX's DVI-Code into Portable Network Graphics. */ - -#define MAIN -#include "dvipng.h" - -#ifdef MIKTEX -# define main __cdecl Main -#endif /* MIKTEX */ -/**********************************************************************/ -/******************************* main *******************************/ -/**********************************************************************/ -int main(int argc, char ** argv) -{ - bool parsestdin; - -#ifdef TIMING -# ifdef HAVE_GETTIMEOFDAY - gettimeofday(&Tp, NULL); - timer = Tp.tv_sec + Tp.tv_usec / 1000000.0; -# else -# ifdef HAVE_FTIME - ftime(&timebuffer); - timer = timebuffer.time + timebuffer.millitm / 1000.0; -# endif -# endif -#endif - /* setbuf(stderr, NULL); */ - -#ifdef HAVE_LIBKPATHSEA - /* Use extra paths as used by dvips */ - kpse_set_program_name(argv[0],"dvips"); - /* If dvipng is not installed in the texmf tree, and _only_ - * SELFAUTO... is used in texmf.cnf, kpathsea will not find a) - * Virtual fonts b) ps2pk.map or psfonts.map c) PostScript fonts - * - * We adjust these things here - */ - /* char selfautodir[MAXPATHLEN]; - FILE *self; - self = popen("kpsewhich -expand-var='$SELFAUTODIR'", "r"); - if (!self) - ... - if (!fgets(selfautodir, MAXPATHLEN, self)) - ... - fclose(self); */ -# ifdef ENV_SELFAUTOLOC - putenv(ENV_SELFAUTOLOC); -# endif -# ifdef ENV_SELFAUTODIR - putenv(ENV_SELFAUTODIR); -# endif -# ifdef ENV_SELFAUTOPARENT - putenv(ENV_SELFAUTOPARENT); -# endif - kpse_set_program_enabled (kpse_pk_format, makeTexPK, kpse_src_compile); -#endif - - initcolor(); - parsestdin = DecodeArgs(argc, argv); - -#ifdef HAVE_LIBKPATHSEA - if (user_mfmode) - if (user_bdpi) - kpse_init_prog("DVIPNG", user_bdpi, user_mfmode, "cmr10"); - else { - Warning("--mfmode given without --bdpi"); - /* this will give a lot of warnings but... */ - kpse_init_prog("DVIPNG", 300, user_mfmode, "cmr10"); - } - else - kpse_init_prog("DVIPNG", 300, "cx", "cmr10"); -#endif - -#ifdef HAVE_FT2_OR_LIBT1 - InitPSFontMap(); -#endif - - DrawPages(); - - if (parsestdin) { - char line[STRSIZE]; - - printf("%s> ",dvi!=NULL?dvi->name:""); - fgets(line,STRSIZE,stdin); - while(!feof(stdin)) { - DecodeString(line); - if (dvi!=NULL) { - DVIReOpen(dvi); - DrawPages(); - } - printf("%s> ",dvi!=NULL?dvi->name:""); - fgets(line,STRSIZE,stdin); - } - printf("\n"); - } - -#ifdef TIMING -# ifdef HAVE_GETTIMEOFDAY - gettimeofday(&Tp, NULL); - timer = Tp.tv_sec + Tp.tv_usec/1000000.0 - timer; -# else -# ifdef HAVE_FTIME - ftime(&timebuffer); - timer = timebuffer.time + timebuffer.millitm/1000.0 - timer; -# endif -# endif - - if (ndone > 0) - fprintf(stderr, - "Time of complete run: %.2f s, %d page(s), %.4f s/page.\n", - timer, ndone, timer / ndone); - if (my_toc >= 0.0001) - fprintf(stderr, - "Thereof in TIC/TOC region %.5f s.\n",my_toc); -#endif - - ClearFonts(); - DVIClose(dvi); - ClearColorNames(); -#ifdef HAVE_FT2_OR_LIBT1 - ClearPSFontMap(); - ClearEncoding(); -#endif -#ifdef HAVE_FT2 - ClearSubfont(); - if (libfreetype!=NULL && FT_Done_FreeType(libfreetype)) - Fatal("an error occured during freetype destruction"); - libfreetype = NULL; -#endif -#ifdef HAVE_LIBT1 - if (libt1!=NULL && T1_CloseLib()) - Fatal("an error occured during t1lib destruction"); - libt1 = NULL; -#endif - - exit(exitcode); -} - - - diff --git a/Build/source/texk/dvipng/dvipng.h b/Build/source/texk/dvipng/dvipng.h deleted file mode 100644 index 40660433a70..00000000000 --- a/Build/source/texk/dvipng/dvipng.h +++ /dev/null @@ -1,581 +0,0 @@ -/* dvipng.h */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#ifndef DVIPNG_H -#define DVIPNG_H -#include "config.h" - -#define STRSIZE 255 /* stringsize for file specifications */ - -#define FIRSTFNTCHAR 0 -#define LASTFNTCHAR 255 -#define NFNTCHARS LASTFNTCHAR+1 - -#define STACK_SIZE 100 /* DVI-stack size */ - -#define DEFAULT_GAMMA 1.0 - -/* Name of the program which is called to generate missing pk files */ -#define MAKETEXPK "mktexpk" - -#ifdef HAVE_INTTYPES_H -# include -#else /* HAVE_INTTYPES_H */ -# ifndef __sgi -/* IRIX has the following types typedef'd in sys/types.h already, - * i.e., _old_ IRIX systems; newer ones have a working inttypes.h */ -typedef signed char int8_t; -typedef short int16_t; -typedef int int32_t; -#endif /* ! __sgi */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -typedef long long int64_t; -typedef unsigned long long uint64_t; -#endif /* HAVE_INTTYPES_H */ - -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif - -#include - -#ifdef HAVE_KPATHSEA_KPATHSEA_H -# include -#else -# error: kpathsea/kpathsea.h is missing from your system -#endif - -#ifdef HAVE_FT2 -#define HAVE_FT2_OR_LIBT1 -#include -#include FT_FREETYPE_H -#endif - -#ifdef HAVE_LIBT1 -#define HAVE_FT2_OR_LIBT1 -#include -#endif - -#ifdef HAVE_STDBOOL_H -# include -#else -# ifdef HAVE_KPATHSEA_KPATHSEA_H -/* boolean is an enum type from kpathsea/types.h loaded in - kpathsea/kpathsea.h, use it as fallback */ -# define bool boolean -# else -typedef int bool; -# define true (bool) 1 -# define false (bool) 0 -# endif -#endif - -#ifndef HAVE_VPRINTF -# ifdef HAVE_DOPRNT -# define vfprintf(stream, message, args) _doprnt(message, args, stream) -# else -# error: vfprintf AND _doprnt are missing!!! - /* If we have neither, should fall back to fprintf with fixed args. */ -# endif -#endif - -/* Autoconf may define malloc to rpl_malloc, if the system does not - * have a GNU Libc-compatible malloc (for which malloc(0) gives a - * valid pointer). We don't need that (yet) */ -#ifdef malloc -# undef malloc -#endif - - -/*************************************************************/ -/************************* protos.h ************************/ -/*************************************************************/ - -typedef int pixels; -typedef int32_t subpixels; -typedef int32_t dviunits; - -#define MM_TO_PXL(x) (int)(((x)*resolution*10)/254) -#define PT_TO_PXL(x) (int)((int32_t)((x)*resolution*100l)/7224) -#define PT_TO_DVI(x) (int32_t)((x)*65536l) - -/*#define PIXROUND(x,c) ((((double)x+(double)(c>>1))/(double)c)+0.5)*/ -/*#define PIXROUND(x,c) (((x)+c)/(c))*/ -/*#define PIXROUND(x,c) ((x+c-1)/(c))*/ -/*#define PIXROUND(x,c) ((x)/(c))*/ -/* integer round to the nearest number, not towards zero */ -#define PIXROUND(num,den) ((num)>0 ? ((num)+(den)/2)/(den) : -(((den)/2-(num))/(den))) - -#ifdef HAVE_ALLOCA_H -# include -#elif defined _AIX -# define alloca __alloca -#endif -#define TEMPSTR(s,a) { char* tmp=a; \ - if (tmp!=NULL) {\ - s=alloca(strlen(tmp)+1);strcpy(s,tmp);free(tmp);\ - } else \ - s=NULL;} - -/*************************************************************************/ - - -/********************************************************/ -/*********************** dvi.h ************************/ -/********************************************************/ - -#define DVI_TYPE 0 -struct dvi_data { /* dvi entry */ - int type; /* This is a DVI */ - struct dvi_data *next; - uint32_t num, den, mag; /* PRE command parameters */ - int32_t conv; /* computed from num and den */ - /* divide dvi units (sp) with conv to get mf device resolution */ - /* divide further with shrinkfactor to get true resolution */ - char * name; /* full name of DVI file */ - char * outname; /* output filename (basename) */ - FILE * filep; /* file pointer */ - time_t mtime; /* modification time */ - struct font_num *fontnump; /* DVI font numbering */ - struct page_list *pagelistp; /* DVI page list */ -#define DVI_PREVIEW_LATEX_TIGHTPAGE 1 -#define DVI_PREVIEW_BOP_HOOK (1<<1) - uint32_t flags; /* Preview-latex flags */ -}; - -#define PAGE_POST INT32_MAX -#define PAGE_LASTPAGE INT32_MAX-1 -#define PAGE_MAXPAGE INT32_MAX-2 /* assume no pages out of this range */ -#define PAGE_FIRSTPAGE INT32_MIN -#define PAGE_MINPAGE INT32_MIN+1 /* assume no pages out of this range */ - -struct dvi_color { - int red,green,blue; -}; - -struct page_list { - struct page_list* next; - int offset; /* file offset to BOP */ - int32_t count[11]; /* 10 dvi counters + absolute pagenum in file */ - int csp; /* color stack pointer at BOP */ - struct dvi_color cstack[2]; /* color stack at BOP, may be longer */ -}; - - - - -struct dvi_data* DVIOpen(char*,char*); -void DVIClose(struct dvi_data*); -bool DVIReOpen(struct dvi_data*); -struct page_list*FindPage(struct dvi_data*, int32_t, bool); -struct page_list*NextPage(struct dvi_data*, struct page_list*); -struct page_list*PrevPage(struct dvi_data*, struct page_list*); -int SeekPage(struct dvi_data*, struct page_list*); -bool DVIFollowToggle(void); -unsigned char* DVIGetCommand(struct dvi_data*); -bool DVIIsNextPSSpecial(struct dvi_data*); -uint32_t CommandLength(unsigned char*); -void ClearPSHeaders(void); - -/********************************************************/ -/********************** misc.h ************************/ -/********************************************************/ - -struct filemmap { -#ifdef MIKTEX - HANDLE hFile; - HANDLE hMap; -#else /* MIKTEX */ - int fd; -#endif /* MIKTEX */ - char* data; - size_t size; -}; - -bool DecodeArgs(int, char *[]); -void DecodeString(char *); -bool MmapFile (char *filename,struct filemmap *fmmap); -void UnMmapFile(struct filemmap* fmmap); - -void Message(int, char *fmt, ...); -void Warning(char *fmt, ...); -void Fatal(char *fmt, ...); - -int32_t SNumRead(unsigned char*, register int); -uint32_t UNumRead(unsigned char*, register int); - -bool MmapFile (char *filename,struct filemmap *fmmap); -void UnMmapFile(struct filemmap* fmmap); - - -/********************************************************/ -/*********************** font.h ***********************/ -/********************************************************/ -struct encoding { - struct encoding* next; - char* name; - char* charname[257]; -}; - -struct subfont { - struct subfont* next; - char* name; - char* infix; - int encoding; - int32_t charindex[256]; -}; - -#ifdef HAVE_FT2_OR_LIBT1 -struct psfontmap { - struct psfontmap *next; - char *line,*psfile,*tfmname,*encname,*end; - struct encoding* encoding; -#ifdef HAVE_FT2 - FT_Matrix* ft_transformp; - FT_Matrix ft_transform; - struct subfont* subfont; -#endif -#ifdef HAVE_LIBT1 - T1_TMATRIX* t1_transformp; - T1_TMATRIX t1_transform; -#endif -}; -#endif - -#define FONT_TYPE_PK 1 -#define FONT_TYPE_VF 2 -#define FONT_TYPE_FT 3 -#define FONT_TYPE_T1 4 -struct char_entry { /* PK/FT/T1 Glyph/VF Macro */ - dviunits tfmw; /* TFM width */ - unsigned char *data; /* glyph data, either pixel data - * (0=transp, 255=max ink) or VF macro */ - uint32_t length; /* Length of PK data or VF macro */ - /* Only used in pixel fonts */ - pixels w,h; /* width and height in pixels */ - subpixels xOffset, yOffset; /* x offset and y offset in subpixels */ - /* Only used in PK fonts */ - unsigned char *pkdata; /* Points to beginning of PK data */ - unsigned char flag_byte; /* PK flagbyte */ -}; - -struct font_entry { /* font entry */ - int type; /* PK/VF/Type1 ... */ - struct font_entry *next; - uint32_t c, s, d; - uint8_t a, l; - char n[STRSIZE]; /* FNT_DEF command parameters */ - int dpi; /* computed from s and d */ - char name[STRSIZE]; /* full name of PK/VF file */ - struct filemmap fmmap; /* file memory map */ - uint32_t magnification; /* magnification read from font file */ - uint32_t designsize; /* design size read from font file */ - void * chr[NFNTCHARS]; /* character information */ -#ifdef HAVE_FT2 - FT_Face face; /* Freetype2 face */ -#endif -#ifdef HAVE_LIBT1 - int T1id; /* T1lib font id */ -#endif -#ifdef HAVE_FT2_OR_LIBT1 - struct psfontmap* psfontmap; /* Font transformation */ -#endif - struct font_num *vffontnump; /* VF local font numbering */ - int32_t defaultfont; /* VF default font number */ -}; - -struct font_num { /* Font number. Different for VF/DVI, and several - font_num can point to one font_entry */ - struct font_num *next; - int32_t k; - struct font_entry *fontp; -}; - -void CheckChecksum(uint32_t, uint32_t, const char*); -void InitPK (struct font_entry *newfontp); -void DonePK(struct font_entry *oldfontp); -void InitVF (struct font_entry *newfontp); -void DoneVF(struct font_entry *oldfontp); - -void FontDef(unsigned char*, void* /* dvi/vf */); -void ClearFonts(void); -void SetFntNum(int32_t, void* /* dvi/vf */); -void FreeFontNumP(struct font_num *hfontnump); - -#ifdef HAVE_FT2_OR_LIBT1 -char* copyword(char* orig); -struct psfontmap *NewPSFont(struct psfontmap* copyfrom); -void InitPSFontMap(void); -void ClearPSFontMap(void); -struct psfontmap* FindPSFontMap(char*); -struct encoding* FindEncoding(char*); -void ClearEncoding(void); -bool ReadTFM(struct font_entry *, char*); -#endif - -#ifdef HAVE_FT2 -bool InitFT(struct font_entry *); -void DoneFT(struct font_entry *tfontp); -void LoadFT(int32_t, struct char_entry *); -struct psfontmap* FindSubFont(struct psfontmap* entry, char* fontname); -void ClearSubfont(void); -#endif - -#ifdef HAVE_LIBT1 -bool InitT1(struct font_entry *); -void DoneT1(struct font_entry *tfontp); -void LoadT1(int32_t, struct char_entry *); -#endif - -/********************************************************/ -/********************* pplist.h ***********************/ -/********************************************************/ - -bool ParsePages(char*); -void FirstPage(int32_t,bool); -void LastPage(int32_t,bool); -void ClearPpList(void); -void Reverse(bool); -struct page_list* NextPPage(void* /* dvi */, struct page_list*); - - - - -#ifdef MAIN -#define EXTERN -#define INIT(x) =x -#else -#define EXTERN extern -#define INIT(x) -#endif - -/********************************************************/ -/********************** draw.h ************************/ -/********************************************************/ -#include "commands.h" - -void CreateImage(pixels width, pixels height); -void DestroyImage(void); -void DrawCommand(unsigned char*, void* /* dvi/vf */); -void DrawPages(void); -void WriteImage(char*, int); -void LoadPK(int32_t, register struct char_entry *); -int32_t SetChar(int32_t); -dviunits SetGlyph(int32_t c, int32_t hh,int32_t vv); -void Gamma(double gamma); -int32_t SetVF(int32_t); -int32_t SetRule(int32_t, int32_t, int32_t, int32_t); -void SetSpecial(char *, int32_t, int32_t); -void BeginVFMacro(struct font_entry*); -void EndVFMacro(void); - -/**************************************************/ -void handlepapersize(char*,int32_t*,int32_t*); - -void stringrgb(char* colorstring,int *r,int *g,int *b); -void background(char *); -void initcolor(void); -void popcolor(void); -void pushcolor(char *); -void resetcolorstack(char *); -void StoreColorStack(struct page_list *tpagep); -void ReadColorStack(struct page_list *tpagep); -void StoreBackgroundColor(struct page_list *tpagep); -void ClearColorNames(void); -void InitXColorPrologue(char* prologuename); - -/**********************************************************************/ -/************************* Global Variables *************************/ -/**********************************************************************/ - -#ifdef MAKETEXPK -#ifdef HAVE_LIBKPATHSEA -EXTERN bool makeTexPK INIT(MAKE_TEX_PK_BY_DEFAULT); -#else -EXTERN bool makeTexPK INIT(_TRUE); -#endif -#endif - -EXTERN uint32_t usermag INIT(0); /* user specified magstep */ -EXTERN struct font_entry *hfontptr INIT(NULL); /* font list pointer */ - -EXTERN struct internal_state { - struct font_entry* currentfont; -} current_state; - -#define BE_NONQUIET 1 -#define BE_VERBOSE (1<<1) -#define PARSE_STDIN (1<<2) -#define EXPAND_BBOX (1<<3) -#define TIGHT_BBOX (1<<4) -/* #define CACHE_IMAGES (1<<5) */ -#define FORCE_TRUECOLOR (1<<6) -#define USE_FREETYPE (1<<7) -#define USE_LIBT1 (1<<8) -#define REPORT_HEIGHT (1<<9) -#define REPORT_DEPTH (1<<10) -#define DVI_PAGENUM (1<<11) -#define MODE_PICKY (1<<12) -#define GIF_OUTPUT (1<<15) -#define MODE_STRICT (1<<16) -#define NO_GHOSTSCRIPT (1<<17) -#define NO_GSSAFER (1<<18) -#define BG_TRANSPARENT (1<<19) -#define BG_TRANSPARENT_ALPHA (1<<20) -#define FORCE_PALETTE (1<<22) -EXTERN uint32_t option_flags INIT(BE_NONQUIET | USE_FREETYPE | USE_LIBT1); - -#define PAGE_GAVE_WARN 1 -#define PAGE_PREVIEW_BOP (1<<1) -#define PAGE_TRUECOLOR (1<<2) -EXTERN uint32_t page_flags INIT(0); - - -#ifdef DEBUG -EXTERN unsigned int debug INIT(0); -#define DEBUG_PRINT(a,b) if (debug & a) { printf b; fflush(stdout); } -#define DEBUG_DVI 1 -#define DEBUG_VF (1<<1) -#define DEBUG_PK (1<<2) -#define DEBUG_TFM (1<<3) -#define DEBUG_GLYPH (1<<4) -#define DEBUG_FT (1<<5) -#define DEBUG_ENC (1<<6) -#define DEBUG_COLOR (1<<7) -#define DEBUG_GS (1<<8) -#define DEBUG_T1 (1<<9) -#define LASTDEBUG DEBUG_T1 -#define DEBUG_DEFAULT DEBUG_DVI -#else -#define DEBUG_PRINT(a,b) -#endif - -/************************timing stuff*********************/ -#ifdef TIMING -#ifdef TIME_WITH_SYS_TIME -# include -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif -EXTERN double timer INIT(0); -EXTERN double my_tic,my_toc INIT(0); -EXTERN int ndone INIT(0); /* number of pages converted */ -# ifdef HAVE_GETTIMEOFDAY -EXTERN struct timeval Tp; -# define TIC { gettimeofday(&Tp, NULL); \ - my_tic= Tp.tv_sec + Tp.tv_usec/1000000.0;} -# define TOC { gettimeofday(&Tp, NULL); \ - my_toc += Tp.tv_sec + Tp.tv_usec/1000000.0 - my_tic;} -# else -# ifdef HAVE_FTIME -EXTERN struct timeb timebuffer; -# define TIC() { ftime(&timebuffer); \ - my_tic= timebuffer.time + timebuffer.millitm/1000.0; -# define TOC() { ftime(&timebuffer); \ - my_toc += timebuffer.time + timebuffer.millitm/1000.0 - my_tic;} -# else -# define TIC() -# define TOC() -# endif -# endif -#endif /* TIMING */ - -EXTERN char* user_mfmode INIT(NULL); -EXTERN int user_bdpi INIT(0); -EXTERN int dpi INIT(100); - -#ifdef HAVE_GDIMAGEPNGEX -EXTERN int compression INIT(1); -#endif -#ifdef MIKTEX -#undef min -#undef max -#endif /* MIKTEX */ -# define max(x,y) if ((y)>(x)) x = y -# define min(x,y) if ((y)<(x)) x = y - -/* These are in pixels*/ -EXTERN int x_min INIT(0); -EXTERN int y_min INIT(0); -EXTERN int x_max INIT(0); -EXTERN int y_max INIT(0); - -/* Page size: default set by -T */ -EXTERN int x_width_def INIT(0); -EXTERN int y_width_def INIT(0); - -/* Offset: default set by -O and -T bbox */ -EXTERN int x_offset_def INIT(0); -EXTERN int y_offset_def INIT(0); - -/* Preview-latex's tightpage */ -EXTERN int x_width_tightpage INIT(0); -EXTERN int y_width_tightpage INIT(0); -EXTERN int x_offset_tightpage INIT(0); -EXTERN int y_offset_tightpage INIT(0); - -/* Paper size: set by -t, for cropmark purposes only */ -/* This has yet to be written */ -EXTERN int x_pwidth INIT(0); -EXTERN int y_pwidth INIT(0); - -/* The transparent border preview-latex desires */ -EXTERN int borderwidth INIT(0); - -/* fallback color for transparent background */ -EXTERN bool userbordercolor INIT(FALSE); /* if true, use user-supplied color */ -EXTERN struct dvi_color bordercolor; - - -EXTERN gdImagePtr page_imagep INIT(NULL); -EXTERN int32_t shrinkfactor INIT(4); - -EXTERN struct dvi_color cstack[STACK_SIZE]; -EXTERN int csp INIT(1); - -EXTERN struct font_entry* currentfont; -EXTERN struct dvi_data* dvi INIT(NULL); - -#ifdef HAVE_FT2 -EXTERN FT_Library libfreetype INIT(NULL); -#endif - -#ifdef HAVE_LIBT1 -EXTERN void* libt1 INIT(NULL); -#endif - -#define EXIT_FATAL EXIT_FAILURE+1 -EXTERN int exitcode INIT(EXIT_SUCCESS); - -#endif /* DVIPNG_H */ diff --git a/Build/source/texk/dvipng/dvipng.test b/Build/source/texk/dvipng/dvipng.test index 743d2544441..4843a2167ed 100755 --- a/Build/source/texk/dvipng/dvipng.test +++ b/Build/source/texk/dvipng/dvipng.test @@ -9,7 +9,7 @@ TEXMFLOCAL=$(kpsewhich --expand-var='$TEXMFLOCAL') export TEXMFCNF TEXFONTMAPS ENCFONTS TEXMFMAIN TEXMFDIST TEXMFLOCAL -latex $srcdir/test_dvipng.tex || exit 77 +latex $srcdir/$DVIPNG_TREE/test_dvipng.tex || exit 77 ./dvipng -T tight -strict test_dvipng || exit 1 diff --git a/Build/source/texk/dvipng/enc.c b/Build/source/texk/dvipng/enc.c deleted file mode 100644 index 677799886b0..00000000000 --- a/Build/source/texk/dvipng/enc.c +++ /dev/null @@ -1,124 +0,0 @@ -/* enc.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" - -struct encoding* encodingp=NULL; - -static struct encoding* InitEncoding(char* encoding) -{ - char *pos,*max,*buf,*enc_file; - int i; - struct encoding* encp=NULL; - struct filemmap fmmap; - -#ifdef HAVE_KPSE_ENC_FORMATS - TEMPSTR(enc_file,kpse_find_file(encoding,kpse_enc_format,false)); -#else - TEMPSTR(enc_file,kpse_find_file(encoding,kpse_tex_ps_header_format,false)); -#endif - if (enc_file == NULL) { - Warning("encoding file %s could not be found",encoding); - return(NULL); - } - DEBUG_PRINT((DEBUG_FT|DEBUG_ENC),("\n OPEN ENCODING:\t'%s'", enc_file)); - if (MmapFile(enc_file,&fmmap)) return(NULL); - if ((encp = calloc(sizeof(struct encoding)+strlen(encoding)+1 - +fmmap.size,1))==NULL) { - Warning("cannot alloc space for encoding",enc_file); - UnMmapFile(&fmmap); - return(NULL); - } - encp->name=(char*)encp+sizeof(struct encoding); - strcpy(encp->name,encoding); - pos=fmmap.data; - max=fmmap.data+fmmap.size; - buf=encp->name+strlen(encoding)+1; -#define SKIPCOMMENT(x) if (*x=='%') while (xcharname[256]=buf; - while(poscharname[256])); - while (pos < max && *pos!='[') { - SKIPCOMMENT(pos); - pos++; - } - while(poscharname[i++]=buf; - while(poscharname[i-1])); - while(posname)!=0) - temp=temp->next; - if (temp==NULL) { - temp=InitEncoding(encoding); - if (temp!=NULL) { - temp->next=encodingp; - encodingp=temp; - } - } - return(temp); -} - -void ClearEncoding(void) -{ - struct encoding *temp=encodingp; - - while(temp!=NULL) { - encodingp=encodingp->next; - free(temp); - temp=encodingp; - } -} diff --git a/Build/source/texk/dvipng/font.c b/Build/source/texk/dvipng/font.c deleted file mode 100644 index 048395b8811..00000000000 --- a/Build/source/texk/dvipng/font.c +++ /dev/null @@ -1,377 +0,0 @@ -/* font.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" - -void CheckChecksum(uint32_t c1, uint32_t c2, const char* name) -{ - /* Report a warning if both checksums are nonzero, they don't match, - and the user hasn't turned it off. */ - if (c1 && c2 && c1 != c2 -#ifdef HAVE_LIBKPATHSEA - && !kpse_tex_hush ("checksum") -#endif - ) { - Warning ("checksum mismatch in %s", name) ; - } -} - - -static double ActualFactor(uint32_t unmodsize) -/* compute the actual size factor given the approximation */ -/* actually factor * 1000 */ -{ - double realsize; /* the actual magnification factor */ - realsize = (double)unmodsize / 1000.0; - if (abs((int)(unmodsize - 1095l))<2) - realsize = 1.095445115; /*stephalf*/ - else if (abs((int)(unmodsize - 1315l))<2) - realsize = 1.31453414; /*stepihalf*/ - else if (abs((int)(unmodsize - 1577l))<2) - realsize = 1.57744097; /*stepiihalf*/ - else if (abs((int)(unmodsize - 1893l))<2) - realsize = 1.89292916; /*stepiiihalf*/ - else if (abs((int)(unmodsize - 2074l))<2) - realsize = 2.0736; /*stepiv*/ - else if (abs((int)(unmodsize - 2488l))<2) - realsize = 2.48832; /*stepv*/ - else if (abs((int)(unmodsize - 2986l))<2) - realsize = 2.985984; /*stepvi*/ - /* the remaining magnification steps are represented with sufficient - accuracy already */ - return(realsize); -} - - -void FontDef(unsigned char* command, void* parent) -{ - int32_t k; - uint32_t c, s, d; - uint8_t a, l; - unsigned char* current; - struct font_entry *tfontptr; /* temporary font_entry pointer */ - struct font_num *tfontnump = NULL; /* temporary font_num pointer */ - unsigned short i; - - current = command + 1; - k = UNumRead(current, (int)*command - FNT_DEF1 + 1); - current += (int)*command - FNT_DEF1 + 1; - c = UNumRead(current, 4); /* checksum */ - s = UNumRead(current+4, 4); /* space size */ - d = UNumRead(current+8, 4); /* design size */ - a = UNumRead(current+12, 1); /* length for font name */ - l = UNumRead(current+13, 1); /* device length */ - if (((struct font_entry*)parent)->type==FONT_TYPE_VF) { - DEBUG_PRINT(DEBUG_VF,(" %d %d %d",k,c,s)); - /* Rescale. s is relative to the actual scale /(1<<20) */ - s = (uint32_t)((uint64_t) s * (((struct font_entry*) parent)->s) - / (1<<20)); - DEBUG_PRINT(DEBUG_VF,(" (%d) %d",s,d)); - /* Oddly, d differs in the DVI and the VF that my system produces */ - d = (uint32_t)((uint64_t) d * ((struct font_entry*)parent)->d - / ((struct font_entry*)parent)->designsize); - DEBUG_PRINT(DEBUG_VF,(" (%d)",d)); - DEBUG_PRINT(DEBUG_VF,(" %d %d '%.*s'",a,l,a+l,current+14)); -#ifdef DEBUG - } else { - DEBUG_PRINT(DEBUG_DVI,(" %d %d %d %d %d %d '%.*s'",k,c,s,d,a,l, - a+l,current+14)); -#endif - } - if (a+l > STRSIZE-1) - Fatal("too long font name for font %ld",k); - - /* Find entry with this font number in use */ - switch (((struct font_entry*)parent)->type) { - case FONT_TYPE_VF: - tfontnump = ((struct font_entry*)parent)->vffontnump; - break; - case DVI_TYPE: - tfontnump = ((struct dvi_data*)parent)->fontnump; - } - while (tfontnump != NULL && tfontnump->k != k) { - tfontnump = tfontnump->next; - } - /* If found, return if it is correct */ - if (tfontnump!=NULL - && tfontnump->fontp->s == s - && tfontnump->fontp->d == d - && strlen(tfontnump->fontp->n) == a+l - && strncmp(tfontnump->fontp->n,(char*)current+14,a+l) == 0) { - DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n FONT %d:\tMatch found",k)); - return; - } - /* If not found, create new */ - if (tfontnump==NULL) { - if ((tfontnump=malloc(sizeof(struct font_num)))==NULL) - Fatal("cannot allocate memory for new font number"); - tfontnump->k=k; - switch (((struct font_entry*)parent)->type) { - case FONT_TYPE_VF: - tfontnump->next=((struct font_entry*)parent)->vffontnump; - ((struct font_entry*)parent)->vffontnump=tfontnump; - break; - case DVI_TYPE: - tfontnump->next=((struct dvi_data*)parent)->fontnump; - ((struct dvi_data*)parent)->fontnump=tfontnump; - } - } - - /* Search font list for possible match */ - tfontptr = hfontptr; - while (tfontptr != NULL - && (tfontptr->s != s - || tfontptr->d != d - || strlen(tfontptr->n) != a+l - || strncmp(tfontptr->n,(char*)current+14,a+l) != 0 ) ) { - tfontptr = tfontptr->next; - } - /* If found, set its number and return */ - if (tfontptr!=NULL) { - DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n FONT %d:\tMatch found, number set",k)); - tfontnump->fontp = tfontptr; - return; - } - - DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n FONT %d:\tNew entry created",k)); - /* No fitting font found, create new entry. */ - if ((tfontptr = calloc(1,sizeof(struct font_entry))) == NULL) - Fatal("cannot malloc space for font_entry"); - tfontptr->next = hfontptr; - hfontptr = tfontptr; - tfontnump->fontp = tfontptr; -#ifndef MIKTEX - tfontptr->fmmap.fd = 0; -#else /* MIKTEX */ - tfontptr->fmmap.hFile = INVALID_HANDLE_VALUE; -#endif - tfontptr->c = c; /* checksum */ - tfontptr->s = s; /* space size */ - tfontptr->d = d; /* design size */ - tfontptr->a = a; /* length for font name */ - tfontptr->l = l; /* device length */ - strncpy(tfontptr->n,(char*)current+14,a+l); /* full font name */ - tfontptr->n[a+l] = '\0'; - - tfontptr->name[0] = '\0'; - for (i = FIRSTFNTCHAR; i <= LASTFNTCHAR; i++) { - tfontptr->chr[i] = NULL; - } - - tfontptr->dpi = - (uint32_t)((ActualFactor((uint32_t)(1000.0*tfontptr->s - /(double)tfontptr->d+0.5)) - * ActualFactor(dvi->mag) * dpi*shrinkfactor) + 0.5); -#ifdef HAVE_FT2_OR_LIBT1 - tfontptr->psfontmap=NULL; -#endif -} - -#ifdef HAVE_FT2_OR_LIBT1 -static char* kpse_find_t1_or_tt(char* filename) -{ - char* filepath = kpse_find_file(filename, kpse_type1_format, false); -#ifdef HAVE_FT2 - if ((option_flags & USE_FREETYPE) && filepath==NULL) - filepath = kpse_find_file(filename, kpse_truetype_format, false); -#endif - return(filepath); -} -#endif - -static void FontFind(struct font_entry * tfontptr) -{ -#ifdef HAVE_LIBKPATHSEA - kpse_glyph_file_type font_ret; - char *name; - - /* tfontptr->dpi = kpse_magstep_fix (tfontptr->dpi, resolution, NULL); */ - DEBUG_PRINT(DEBUG_DVI,("\n FIND FONT:\t%s %d",tfontptr->n,tfontptr->dpi)); - - TEMPSTR(name,kpse_find_vf (tfontptr->n)); - if (name!=NULL) { - strcpy (tfontptr->name, name); - InitVF(tfontptr); - } -#ifdef HAVE_FT2_OR_LIBT1 - if ((option_flags & (USE_FREETYPE | USE_LIBT1)) && name==NULL) { - tfontptr->psfontmap = FindPSFontMap(tfontptr->n); - if (tfontptr->psfontmap!=NULL) { - TEMPSTR(name,kpse_find_t1_or_tt(tfontptr->psfontmap->psfile)); - } else - TEMPSTR(name,kpse_find_t1_or_tt(tfontptr->n)); - if (name!=NULL) { - strcpy (tfontptr->name, name); - TEMPSTR(name,kpse_find_file(tfontptr->n, kpse_tfm_format, false)); - if (name!=NULL) { - if (!ReadTFM(tfontptr,name)) { - Warning("unable to read tfm file %s", name); - name=NULL; - } else -#ifdef HAVE_FT2 - if ((option_flags & USE_FREETYPE)==0 || !InitFT(tfontptr)) { -#endif -#ifdef HAVE_LIBT1 - if ((option_flags & USE_LIBT1)==0 || !InitT1(tfontptr)) { -#endif - /* if Freetype or T1 loading fails for some reason, fall - back to PK font */ - name=NULL; - } -#ifdef HAVE_FT2 -#ifdef HAVE_LIBT1 - } -#endif -#endif - } - } - } -#endif /* HAVE_FT2_OR_LIBT1 */ - if (name==NULL) { - TEMPSTR(name,kpse_find_pk (tfontptr->n, tfontptr->dpi, &font_ret)); - if (name!=NULL) { - strcpy (tfontptr->name, name); - if (!FILESTRCASEEQ (tfontptr->n, font_ret.name)) { - page_flags |= PAGE_GAVE_WARN; - Warning("font %s not found, using %s at %d dpi instead", - tfontptr->n, font_ret.name, font_ret.dpi); - tfontptr->c = 0; /* no checksum warning */ - } else if (!kpse_bitmap_tolerance ((double)font_ret.dpi, (double) tfontptr->dpi)) { - page_flags |= PAGE_GAVE_WARN; - Warning("font %s at %d dpi not found, using %d dpi instead", - tfontptr->name, tfontptr->dpi, font_ret.dpi); - } - InitPK(tfontptr); - } else { - page_flags |= PAGE_GAVE_WARN; - Warning("font %s at %d dpi not found, characters will be left blank", - tfontptr->n, tfontptr->dpi); - strcpy (tfontptr->name, "None"); -#ifndef MIKTEX - tfontptr->fmmap.fd = 0; -#else /* MIKTEX */ - tfontptr->fmmap.hFile = INVALID_HANDLE_VALUE; -#endif - tfontptr->magnification = 0; - tfontptr->designsize = 0; - } - } -#else /* not HAVE_LIBKPATHSEA */ - /* Ouch time! findfile not implemented (old cruft from dvilj) */ - /* Total argh, since none of this is adapted to vf and the like */ - if (!(findfile(PXLpath, - tfontptr->n, - tfontptr->dpi, - tfontptr->name, - false, - 0))) { - Warning(tfontptr->name); /* contains error messsage */ -#ifndef MIKTEX - tfontptr->fmmap.fd = 0; -#else /* MIKTEX */ - tfontptr->fmmap.hFile = INVALID_HANDLE_VALUE; -#endif -#ifdef __riscos - MakeMetafontFile(PXLpath, tfontptr->n, tfontptr->dpi); -#endif - } -#endif -} - - -static void DoneFont(struct font_entry *tfontp) -{ - switch (tfontp->type) { - case FONT_TYPE_PK: - DonePK(tfontp); - break; - case FONT_TYPE_VF: - DoneVF(tfontp); - break; -#ifdef HAVE_FT2 - case FONT_TYPE_FT: - DoneFT(tfontp); - break; -#endif -#ifdef HAVE_LIBT1 - case FONT_TYPE_T1: - DoneT1(tfontp); - break; -#endif - } -} - - -void FreeFontNumP(struct font_num *hfontnump) -{ - struct font_num *tmp; - while(hfontnump!=NULL) { - tmp=hfontnump->next; - free(hfontnump); - hfontnump=tmp; - } -} - -void ClearFonts(void) -{ - struct font_entry *tmp; - - while(hfontptr!=NULL) { - tmp=hfontptr->next; - DoneFont(hfontptr); - free(hfontptr); - hfontptr=tmp; - } - if (dvi!=NULL) - FreeFontNumP(dvi->fontnump); -} - -/*-->SetFntNum*/ -/**********************************************************************/ -/**************************** SetFntNum *****************************/ -/**********************************************************************/ -void SetFntNum(int32_t k, void* parent /* dvi/vf */) -/* this routine is used to specify the font to be used in printing future - characters */ -{ - struct font_num *tfontnump=NULL; /* temporary font_num pointer */ - - switch (((struct font_entry*)parent)->type) { - case FONT_TYPE_VF: - tfontnump = ((struct font_entry*)parent)->vffontnump; - break; - case DVI_TYPE: - tfontnump = ((struct dvi_data*)parent)->fontnump; - } - while (tfontnump != NULL && tfontnump->k != k) - tfontnump = tfontnump->next; - if (tfontnump == NULL) - Fatal("font %d undefined", k); - - currentfont = tfontnump->fontp; - if (currentfont->name[0]=='\0') - FontFind(currentfont); -} - - diff --git a/Build/source/texk/dvipng/fontmap.c b/Build/source/texk/dvipng/fontmap.c deleted file mode 100644 index fa88f7b5cab..00000000000 --- a/Build/source/texk/dvipng/fontmap.c +++ /dev/null @@ -1,342 +0,0 @@ -/* fontmap.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" - -static struct filemmap psfont_mmap; -#ifdef HAVE_FT2 -static struct filemmap ttfont_mmap; -#endif -static struct psfontmap *psfontmap=NULL; - -static char* newword(char** buffer, char* end) -{ - char *word,*pos=*buffer; - - while(posline = copyfrom->line; - newentry->tfmname = copyword(copyfrom->tfmname); - newentry->psfile = copyword(copyfrom->psfile); - newentry->encname = copyword(copyfrom->encname); - newentry->encoding = copyfrom->encoding; -#ifdef HAVE_LIBT1 - newentry->t1_transformp = copyfrom->t1_transformp; -#endif -#ifdef HAVE_FT2 - newentry->ft_transformp = copyfrom->ft_transformp; - newentry->subfont = copyfrom->subfont; -#endif - newentry->end = copyfrom->end; - } else { - newentry->line = NULL; - newentry->tfmname = NULL; - newentry->psfile = NULL; - newentry->encname = NULL; - newentry->encoding = NULL; -#ifdef HAVE_LIBT1 - newentry->t1_transformp = NULL; -#endif -#ifdef HAVE_FT2 - newentry->ft_transformp = NULL; - newentry->subfont = NULL; -#endif - newentry->end = NULL; - } - newentry->next=psfontmap; - psfontmap=newentry; - return(newentry); -} - -static struct psfontmap *SearchPSFontMap(char* fontname, - struct filemmap* search_mmap) -{ - static char *pos=NULL,*end=NULL; - static struct filemmap* searching_mmap=NULL; - struct psfontmap *entry=NULL; - - if (pos==end && search_mmap!=searching_mmap) { - searching_mmap=search_mmap; - pos=searching_mmap->data; - end=searching_mmap->data+searching_mmap->size; - } - while(postfmname,fontname)!=0)) { - while(pos < end - && (*pos=='\n' || *pos==' ' || *pos=='\t' - || *pos=='%' || *pos=='*' || *pos==';' || *pos=='#')) { - while(pos < end && *pos!='\n') pos++; /* skip comments/empty rows */ - pos++; - } - if (pos < end) { - entry=NewPSFont(NULL); - entry->line = pos; - /* skip tfmname = newword(&pos,end); - while(pos < end && *pos!='\n') pos++; - entry->end = pos; - } - pos++; - } - if (entry!=NULL && strcmp(entry->tfmname,fontname)!=0) - entry=NULL; - return(entry); -} - -void ClearPSFontMap(void) -{ - struct psfontmap *entry; - - while(psfontmap!=NULL) { - entry=psfontmap; - psfontmap=psfontmap->next; - free(entry->tfmname); - if (entry->psfile!=NULL) - free(entry->psfile); - if (entry->encname!=NULL) - free(entry->encname); - free(entry); - } - UnMmapFile(&psfont_mmap); -#ifdef HAVE_FT2 - UnMmapFile(&ttfont_mmap); -#endif -} - -static void ReadPSFontMap(struct psfontmap *entry) -{ - char *pos,*end,*psname; - int nameno = 0; - - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\n PSFONTMAP: %s ",entry->tfmname)); - pos=entry->line; - end=entry->end; - while(pos < end) { - if (*pos=='<') { /* filename follows */ - pos++; - if (pospsfile = newword((char**)&pos,end); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<%s ",entry->psfile)); - } else if (posencname = newword((char**)&pos,end); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); - } else { /* encname=word; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); - } else { /* psfile=word; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<%s ",entry->psfile)); - } - } - } else if (*pos=='"') { /* PS code: reencoding/tranformation exists */ - char *word; - double cxx=1.0,cxy=0.0; - pos++; - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\"")); - while(pos < end && *pos!='"') { - word=newword((char**)&pos,end); - while(pos < end && (*pos==' ' || *pos=='\t')) pos++; - if (pos+10ft_transformp=&(entry->ft_transform); - entry->ft_transform.xx=(FT_Fixed)(cxx*0x10000); - entry->ft_transform.xy=(FT_Fixed)(cxy*0x10000); - entry->ft_transform.yx=0; - entry->ft_transform.yy=0x10000; -#endif -#ifdef HAVE_LIBT1 - entry->t1_transformp=&(entry->t1_transform); - entry->t1_transform.cxx=cxx; - entry->t1_transform.cxy=cxy; - entry->t1_transform.cyx=0.0; - entry->t1_transform.cyy=1.0; -#endif - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("\" ")); - pos++; - } else { /* bare word */ - switch (++nameno) { - case 1: /* first word is tfmname and perhaps psname, NOT psfile */ - while(postfmname; - break; - case 2: /* second word is psname, NOT psfile */ - psname = newword((char**)&pos,end); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("(%s) ",psname)); - free(psname); - break; - case 3: /* third word is encoding */ - entry->encname = newword((char**)&pos,end); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),("<[%s ",entry->encname)); - break; - default: - while(pospsfile==NULL) { - /* No psfile-name given, use tfmname */ - entry->psfile=copyword(entry->tfmname); - DEBUG_PRINT((DEBUG_FT|DEBUG_T1),(" <%s ",entry->psfile)); - } - if (entry->encname!=NULL - && (entry->encoding=FindEncoding(entry->encname))==NULL) - Warning("unable to load font encoding '%s' for %s", - entry->encname,entry->tfmname); -} - - -struct psfontmap* FindPSFontMap(char* fontname) -{ - struct psfontmap *entry; - static struct filemmap* search_mmap_p=&psfont_mmap; - - entry=psfontmap; - while(entry!=NULL && strcmp(entry->tfmname,fontname)!=0) - entry=entry->next; - if(entry==NULL) { - entry=SearchPSFontMap(fontname,search_mmap_p); -#ifdef HAVE_FT2 - if(entry==NULL && search_mmap_p!=&ttfont_mmap) { - search_mmap_p=&ttfont_mmap; - entry=SearchPSFontMap(fontname,search_mmap_p); - } -#endif - } -#ifdef HAVE_FT2 - if(entry==NULL) { - struct psfontmap* entry_subfont=NULL; - entry=psfontmap; - while(entry!=NULL && strcmp(entry->tfmname,fontname)!=0) { - while(entry!=NULL && strchr(entry->tfmname,'@')==NULL) - entry=entry->next; - if (entry!=NULL) { - entry_subfont=FindSubFont(entry,fontname); - if (entry_subfont!=NULL) - entry=entry_subfont; - else - entry=entry->next; - } - } - } -#endif - if (entry!=NULL && entry->psfile==NULL) - ReadPSFontMap(entry); - if (entry!=NULL && entry->encname!=NULL && entry->encoding==NULL) - /* Encoding given but it cannot be found. Unusable font */ - return(NULL); - return(entry); -} diff --git a/Build/source/texk/dvipng/ft.c b/Build/source/texk/dvipng/ft.c deleted file mode 100644 index 10274a6db6a..00000000000 --- a/Build/source/texk/dvipng/ft.c +++ /dev/null @@ -1,174 +0,0 @@ -/* ft.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" -#ifdef HAVE_ALLOCA_H -# include -#endif - -void LoadFT(int32_t c, struct char_entry * ptr) -{ - FT_Bitmap bitmap; - FT_UInt glyph_i; - int i,j,k; - unsigned char* bit; - - DEBUG_PRINT(DEBUG_FT,("\n LOAD FT CHAR\t%d (%d)",c,ptr->tfmw)); - if (currentfont->psfontmap!=NULL - && currentfont->psfontmap->encoding != NULL) { - DEBUG_PRINT(DEBUG_FT,(" %s",currentfont->psfontmap->encoding->charname[c])); - glyph_i = FT_Get_Name_Index(currentfont->face, - currentfont->psfontmap->encoding->charname[c]); - } else if (currentfont->psfontmap!=NULL - && currentfont->psfontmap->subfont != NULL) { - glyph_i = FT_Get_Char_Index( currentfont->face, - currentfont->psfontmap->subfont->charindex[c] ); - DEBUG_PRINT(DEBUG_FT,(" 0x%X",currentfont->psfontmap->subfont->charindex[c])); - } else - glyph_i = FT_Get_Char_Index( currentfont->face, c ); - if (FT_Load_Glyph( currentfont->face, glyph_i, - FT_LOAD_RENDER | FT_LOAD_TARGET_LIGHT ) - /* On some configurations (with FreeType <= 2.1.7) the above - fails, while the below works */ - && FT_Load_Glyph( currentfont->face, glyph_i, - FT_LOAD_RENDER | FT_LOAD_NO_HINTING )) - Fatal("cannot load FT char %d",c); - ptr->xOffset = -currentfont->face->glyph->bitmap_left*shrinkfactor; - ptr->yOffset = (currentfont->face->glyph->bitmap_top-1)*shrinkfactor; - bitmap=currentfont->face->glyph->bitmap; - DEBUG_PRINT(DEBUG_FT,(" (%dx%d)",bitmap.width,bitmap.rows)); - - if ((ptr->data = calloc(bitmap.width*bitmap.rows,sizeof(char))) == NULL) - Fatal("unable to allocate image space for char %c", (char)c); - ptr->w = bitmap.width; - ptr->h = bitmap.rows; - -#define GREYLEVELS 16 - DEBUG_PRINT(DEBUG_GLYPH,("\nDRAW GLYPH %d\n", (int)c)); - bit=ptr->data; - for(i=0;i0 ? k*16-1 : 0; */ - DEBUG_PRINT(DEBUG_GLYPH,("%3u ",k)); - bit[i*bitmap.width+j]=k; - } - DEBUG_PRINT(DEBUG_GLYPH,("|\n")); - } -} - -bool InitFT(struct font_entry * tfontp) -{ - int error; - - if (libfreetype==NULL) { - if (FT_Init_FreeType( &libfreetype )) { - Warning("an error occured during freetype initialisation, disabling it"); - option_flags &= ~USE_FREETYPE; - return(false); - } -# ifdef DEBUG - else { - FT_Int amajor, aminor, apatch; - - DEBUG_PRINT(DEBUG_FT,("\n COMPILED WITH FREETYPE %d.%d.%d", - FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH)); -# ifdef HAVE_FT_LIBRARY_VERSION - FT_Library_Version( libfreetype, &amajor, &aminor, &apatch ); - DEBUG_PRINT(DEBUG_FT,("\n USING LIBFT %d.%d.%d", - amajor, aminor, apatch)); -# endif - } -# endif - } - DEBUG_PRINT((DEBUG_DVI|DEBUG_FT),("\n OPEN FT FONT:\t'%s'", tfontp->name)); - error = FT_New_Face( libfreetype, tfontp->name, 0, &tfontp->face ); - if (error == FT_Err_Unknown_File_Format) { - Warning("font file %s has unknown format", tfontp->name); - return(false); - } else if (error) { - Warning("font file %s could not be opened", tfontp->name); - return(false); - } - Message(BE_VERBOSE,"<%s>", tfontp->name); - if (tfontp->psfontmap != NULL && tfontp->psfontmap->subfont != NULL) - error=FT_Select_Charmap(tfontp->face, tfontp->psfontmap->subfont->encoding); - else if (tfontp->psfontmap == NULL || tfontp->psfontmap->encoding == NULL) -#ifndef FT_ENCODING_ADOBE_CUSTOM -# define FT_ENCODING_ADOBE_CUSTOM ft_encoding_adobe_custom -# define FT_ENCODING_ADOBE_STANDARD ft_encoding_adobe_standard -#endif - error=FT_Select_Charmap(tfontp->face, FT_ENCODING_ADOBE_CUSTOM); - if (error) { - Warning("unable to set font encoding for %s", tfontp->name); - if(FT_Select_Charmap( tfontp->face, FT_ENCODING_ADOBE_STANDARD )) { - Warning("unable to set fallback font encoding for %s", tfontp->name); - return(false); - } - } - if (FT_Set_Char_Size( tfontp->face, /* handle to face object */ - 0, /* char_width in 1/64th of points */ - ((int64_t)tfontp->d*64*7200)/7227/65536, - /* char_height in 1/64th of _big_points, - not TeX points */ - tfontp->dpi/shrinkfactor, /* horizontal resolution */ - tfontp->dpi/shrinkfactor )) /* vertical resolution */ { - Warning("unable to set font size for %s", tfontp->name); - return(false); - } - if (tfontp->psfontmap!=NULL) - FT_Set_Transform(tfontp->face, tfontp->psfontmap->ft_transformp, NULL); - tfontp->type = FONT_TYPE_FT; - return(true); -} - - -static void UnLoadFT(struct char_entry *ptr) -{ - if (ptr->data!=NULL) - free(ptr->data); - ptr->data=NULL; -} - - -void DoneFT(struct font_entry *tfontp) -{ - int c=0; - - int error = FT_Done_Face( tfontp->face ); - if (error) - Warning("font file %s could not be closed", tfontp->name); - while(cchr[c]!=NULL) { - UnLoadFT((struct char_entry*)tfontp->chr[c]); - free(tfontp->chr[c]); - tfontp->chr[c]=NULL; - } - c++; - } - tfontp->name[0]='\0'; -} - - diff --git a/Build/source/texk/dvipng/help/Makefile.in b/Build/source/texk/dvipng/help/Makefile.in index 3345d0c36c1..a6b3757f35c 100644 --- a/Build/source/texk/dvipng/help/Makefile.in +++ b/Build/source/texk/dvipng/help/Makefile.in @@ -80,6 +80,7 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ +DVIPNG_TREE = @DVIPNG_TREE@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ @@ -104,7 +105,6 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KPATHSEA_DEPEND = @KPATHSEA_DEPEND@ KPATHSEA_INCLUDES = @KPATHSEA_INCLUDES@ KPATHSEA_LIBS = @KPATHSEA_LIBS@ -KPSEWHICH = @KPSEWHICH@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ @@ -130,6 +130,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ diff --git a/Build/source/texk/dvipng/miktex.h b/Build/source/texk/dvipng/miktex.h deleted file mode 100644 index c949cd1aff6..00000000000 --- a/Build/source/texk/dvipng/miktex.h +++ /dev/null @@ -1,272 +0,0 @@ -/* config.h. Edited for MiKTeX. */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -#undef CRAY_STACKSEG_END - -/* Define to 1 if using `alloca.c'. */ -#undef C_ALLOCA - -/* Define as 1 to get the debug (-d) option. */ -#define DEBUG 1 - -/* The environment setting for $SELFAUTODIR */ -#undef ENV_SELFAUTODIR - -/* The environment setting for $SELFAUTOLOC */ -#undef ENV_SELFAUTOLOC - -/* The environment setting for $SELFAUTOPARENT */ -#undef ENV_SELFAUTOPARENT - -/* Define as the path to GhostScript. */ -#undef GS_PATH - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#undef HAVE_ALLOCA_H - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -#undef HAVE_DOPRNT - -/* Define to 1 if you have the `dup2' function. */ -#undef HAVE_DUP2 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `fork' function. */ -#undef HAVE_FORK - -/* Define to 1 if you have freetype2 */ -#undef HAVE_FT2 - -/* Define to 1 if you have the `ftime' function. */ -#undef HAVE_FTIME - -/* Define to 1 if you have the `FT_Library_Version' function. */ -#undef HAVE_FT_LIBRARY_VERSION - -/* Define to 1 if you have the `gdImageAlphaBlending' function. */ -#undef HAVE_GDIMAGEALPHABLENDING - -/* Define to 1 if you have the `gdImageColorResolveAlpha' function. */ -#undef HAVE_GDIMAGECOLORRESOLVEALPHA - -/* Define to 1 if you have the `gdImageCreateTrueColor' function. */ -#define HAVE_GDIMAGECREATETRUECOLOR 1 - -/* Define to 1 if you have the `gdImageGif' function. */ -#undef HAVE_GDIMAGEGIF - -/* Define to 1 if you have the `gdImagePngEx' function. */ -#define HAVE_GDIMAGEPNGEX 1 - -/* Define to 1 if you have the `gdImageTrueColorToPalette' function. */ -#define HAVE_GDIMAGETRUECOLORTOPALETTE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_GD_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#undef HAVE_GETPAGESIZE - -/* Define to 1 if you have the `gettimeofday' function. */ -#undef HAVE_GETTIMEOFDAY - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_KPATHSEA_KPATHSEA_H 1 - -/* Define to 1 if your kpathsea has kpse_enc_format */ -#define HAVE_KPSE_ENC_FORMATS 1 - -/* Define to 1 if you have the `gd' library (-lgd). */ -#define HAVE_LIBGD 1 - -/* Define to 1 if you have the `gen' library (-lgen). */ -#undef HAVE_LIBGEN - -/* Define to 1 if you have the `kpathsea' library (-lkpathsea). */ -#define HAVE_LIBKPATHSEA 1 - -/* Define to 1 if you have the `m' library (-lm). */ -#define HAVE_LIBM 1 - -/* Define to 1 if you have the `png' library (-lpng). */ -#define HAVE_LIBPNG 1 - -/* Define to 1 if you have the `t1' library (-lt1). */ -#undef HAVE_LIBT1 - -/* Define to 1 if you have the `z' library (-lz). */ -#undef HAVE_LIBZ - -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#undef HAVE_MALLOC - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the `munmap' function. */ -#undef HAVE_MUNMAP - -/* Define to 1 if you have the header file. */ -#define HAVE_PNG_H 1 - -/* Define to 1 if you have the `pow' function. */ -#undef HAVE_POW - -/* Define to 1 if you have the `putenv' function. */ -#undef HAVE_PUTENV - -/* Define to 1 if stdbool.h conforms to C99. */ -#undef HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strrchr' function. */ -#undef HAVE_STRRCHR - -/* Define to 1 if you have the `strstr' function. */ -#undef HAVE_STRSTR - -/* Define to 1 if you have the `strtol' function. */ -#undef HAVE_STRTOL - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have that is POSIX.1 compatible. */ -#undef HAVE_SYS_WAIT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_T1LIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `vfork' function. */ -#undef HAVE_VFORK - -/* Define to 1 if you have the header file. */ -#undef HAVE_VFORK_H - -/* Define to 1 if you have the `vprintf' function. */ -#define HAVE_VPRINTF 1 - -/* Define to 1 if `fork' works. */ -#undef HAVE_WORKING_FORK - -/* Define to 1 if `vfork' works. */ -#undef HAVE_WORKING_VFORK - -/* Define to 1 if the system has the type `_Bool'. */ -#undef HAVE__BOOL 1 - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "dvipng@nongnu.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "dvipng" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "dvipng 1.7" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "dvipng" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.7" - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -#undef STACK_DIRECTION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define as 1 to get execution time output. */ -#undef TIMING - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `long long' if does not define it. */ -#undef int64_t - -/* Define to rpl_malloc if the replacement function should be used. */ -#undef malloc - -/* Define to `int' if does not define. */ -#undef pid_t - -/* Define to `unsigned' if does not define. */ -#undef size_t - -/* Define to `unsigned long long' if does not define it. */ -#undef uint64_t - -/* Define as `fork' if `vfork' does not work. */ -#undef vfork diff --git a/Build/source/texk/dvipng/miktex.mak b/Build/source/texk/dvipng/miktex.mak deleted file mode 100644 index b291ba67207..00000000000 --- a/Build/source/texk/dvipng/miktex.mak +++ /dev/null @@ -1,196 +0,0 @@ -## miktex.mak: dvipng -## -## Copyright (C) 2004 Christian Schenk -## -## 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, or (at your -## option) any later version. -## -## This file is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this file; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -## 02110-1301 USA. - -miktex_cc_no_warnings = 1 -miktex_cc_disable_optimization = 1 - -!include ..\miktex.inc - -objects = \ - $(outdir)\color.obj \ - $(outdir)\draw.obj \ - $(outdir)\dvi.obj \ - $(outdir)\dvipng.obj \ - $(outdir)\font.obj \ - $(outdir)\misc.obj \ - $(outdir)\papersiz.obj \ - $(outdir)\pk.obj \ - $(outdir)\ppagelist.obj \ - $(outdir)\set.obj \ - $(outdir)\special.obj \ - $(outdir)\vf.obj \ - $(wrapper_obj) \ - -sources = \ - color.c \ - draw.c \ - dvi.c \ - dvipng.c \ - font.c \ - misc.c \ - papersiz.c \ - pk.c \ - ppagelist.c \ - set.c \ - special.c \ - vf.c \ - -extra_cdefines = \ - -Dalloca=_alloca \ - -DUSE_MIKTEX_EXIT \ - -extra_cincludes = \ - -I$(gdlibdir) \ - -I$(kpslibdir) \ - -.c{$(outdir)\}.obj: - $(cc) $(cstandard) \ - $(extra_cdefines) \ - $(extra_cincludes) \ - $(ccopt_output_directory)$(outdir)\ $< - -binaries = $(outdir)\dvipng.exe - -all: common-all $(binaries) - -install: common-install install-binaries - -qrt: common-qrt - -# ----------------------------------------------------------------------------- -# dvipng -# ----------------------------------------------------------------------------- - -libs = \ - $(miktex_lib) \ - $(gd_lib) \ - $(kps_lib) \ - $(gnu_lib) \ - $(texmf_lib) \ - -$(outdir)\dvipng.exe: \ - $(outdir) \ - $(objects) \ - $(libs) \ - $(outdir)\dvipng.res \ - - $(link) $(lstandard) \ - -out:$@ \ - $(objects) \ - $(libs) \ - $(outdir)\dvipng.res \ - -$(outdir)\dvipng.res: \ - $(libdir)\miktex-version.h \ - $(outdir) \ - dvipng-version.h \ - dvipng.rc \ - - $(rc) $(rcstandard) $(rcopt_output_file)$@ dvipng.rc - -# ----------------------------------------------------------------------------- -# clean-up -# ----------------------------------------------------------------------------- - -mostlyclean: common-mostlyclean - -clean: common-clean mostlyclean - -distclean: common-distclean clean - -realclean: common-realclean distclean - -# ----------------------------------------------------------------------------- -# dependencies -# ----------------------------------------------------------------------------- - -!include ..\common-dependencies.inc - -depend: $(sources) - $(MAKEDEPEND1) $(extra_cincludes) $(extra_cdefines) $(sources) - -# DO NOT DELETE - -$(outdir)\color.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h -$(outdir)\color.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h -$(outdir)\color.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\color.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\color.obj: ..\lib\miktex-features.h commands.h -$(outdir)\draw.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h -$(outdir)\draw.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h -$(outdir)\draw.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\draw.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\draw.obj: ..\lib\miktex-features.h commands.h -$(outdir)\dvi.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h -$(outdir)\dvi.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h -$(outdir)\dvi.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\dvi.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\dvi.obj: ..\lib\miktex-features.h commands.h ..\libgnu\gnu-miktex.h -$(outdir)\dvipng.obj: dvipng.h config.h .\inttypes.h -$(outdir)\dvipng.obj: $(gdlibdir)\gd.h $(gdlibdir)\gd_io.h -$(outdir)\dvipng.obj: $(gdlibdir)\gdfx.h -$(outdir)\dvipng.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\dvipng.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\dvipng.obj: ..\lib\miktex-features.h commands.h -$(outdir)\font.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h -$(outdir)\font.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h -$(outdir)\font.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\font.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\font.obj: ..\lib\miktex-features.h commands.h -$(outdir)\misc.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h -$(outdir)\misc.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h -$(outdir)\misc.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\misc.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\misc.obj: ..\lib\miktex-features.h commands.h -$(outdir)\misc.obj: ..\libgnu\gnu-miktex.h -$(outdir)\papersiz.obj: dvipng.h config.h .\inttypes.h -$(outdir)\papersiz.obj: $(gdlibdir)\gd.h -$(outdir)\papersiz.obj: $(gdlibdir)\gd_io.h -$(outdir)\papersiz.obj: $(gdlibdir)\gdfx.h -$(outdir)\papersiz.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\papersiz.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\papersiz.obj: ..\lib\miktex-features.h commands.h -$(outdir)\pk.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h -$(outdir)\pk.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h -$(outdir)\pk.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\pk.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\pk.obj: ..\lib\miktex-features.h commands.h -$(outdir)\ppagelist.obj: dvipng.h config.h .\inttypes.h -$(outdir)\ppagelist.obj: $(gdlibdir)\gd.h -$(outdir)\ppagelist.obj: $(gdlibdir)\gd_io.h -$(outdir)\ppagelist.obj: $(gdlibdir)\gdfx.h -$(outdir)\ppagelist.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\ppagelist.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\ppagelist.obj: ..\lib\miktex-features.h commands.h -$(outdir)\set.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h -$(outdir)\set.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h -$(outdir)\set.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\set.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\set.obj: ..\lib\miktex-features.h commands.h -$(outdir)\special.obj: dvipng.h config.h .\inttypes.h -$(outdir)\special.obj: $(gdlibdir)\gd.h $(gdlibdir)\gd_io.h -$(outdir)\special.obj: $(gdlibdir)\gdfx.h -$(outdir)\special.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\special.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\special.obj: ..\lib\miktex-features.h commands.h -$(outdir)\vf.obj: dvipng.h config.h .\inttypes.h $(gdlibdir)\gd.h -$(outdir)\vf.obj: $(gdlibdir)\gd_io.h $(gdlibdir)\gdfx.h -$(outdir)\vf.obj: $(kpslibdir)\kpathsea\kpathsea.h -$(outdir)\vf.obj: $(kpslibdir)\web2c-miktex.h ..\lib\miktex.h -$(outdir)\vf.obj: ..\lib\miktex-features.h commands.h diff --git a/Build/source/texk/dvipng/misc.c b/Build/source/texk/dvipng/misc.c deleted file mode 100644 index 5db68ee8a08..00000000000 --- a/Build/source/texk/dvipng/misc.c +++ /dev/null @@ -1,836 +0,0 @@ -/* misc.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" -#ifdef HAVE_LIBGEN_H -# include -#else -#define basename xbasename -#endif -#include /* open/close */ -#ifndef MIKTEX -#include -#endif -#include - -static char *programname; - -/*-->DecodeArgs*/ -/*********************************************************************/ -/***************************** DecodeArgs ****************************/ -/*********************************************************************/ -bool DecodeArgs(int argc, char ** argv) -{ - int i; /* argument index for options */ - bool ppused=false; /* Flag when -pp is used */ - int32_t number; /* Temporary storage for numeric parameter */ - char *dviname=NULL; /* Name of dvi file */ - char *outname=NULL; /* Name of output file */ - - if (argv[0]) { -#ifdef HAVE_GDIMAGEGIF - programname=strrchr(argv[0],'/'); - if (programname!=NULL) - programname++; - else - programname=argv[0]; - if (strncmp(programname,"dvigif",6)==0) - option_flags |= GIF_OUTPUT; -#endif - programname=argv[0]; - Message(BE_NONQUIET,"This is %s",programname); - if (strcmp(basename(programname),PACKAGE_NAME)!=0) - Message(BE_NONQUIET," (%s)", PACKAGE_NAME); - Message(BE_NONQUIET," %s Copyright 2002-2008 Jan-Ake Larsson\n", - PACKAGE_VERSION); - } - - for (i=1; i'9' && *p!='-') { - if (strncmp(p,"vinum",5)==0) { - if (p[5] != '0') { - option_flags |= DVI_PAGENUM; - Message(PARSE_STDIN,"DVI page number output on\n",p); - } else { - option_flags &= ~DVI_PAGENUM; - Message(PARSE_STDIN,"DVI page number output off\n"); - } - break; - } else if (strncmp(p,"epth",4)==0) { /* Depth reporting */ - if (p[4] != '0') { - option_flags |= REPORT_DEPTH; - Message(PARSE_STDIN,"Depth reporting on\n",p); - } else { - option_flags &= ~REPORT_DEPTH; - Message(PARSE_STDIN,"Depth reporting off\n"); - } - break; - } - goto DEFAULT; - } else { -#ifdef DEBUG - if (*p == 0 && argv[i+1]) - p = argv[i+1]; - debug = atoi(p); - if (debug > 0) { - if (p == argv[i+1]) i++; - } else - debug = DEBUG_DEFAULT; - Message(PARSE_STDIN,"Debug output enabled\n"); -#ifdef HAVE_LIBKPATHSEA - kpathsea_debug = debug / LASTDEBUG / 2 ; -#endif -#else - Warning("This instance of %s was compiled without the debug (-d) option", - programname); -#endif - break; - } - case 'o': /* Output file is specified */ - if (*p == 0 && argv[i+1]) - p = argv[++i] ; - outname=p; - /* remove .png extension */ - Message(PARSE_STDIN,"Output file: %s\n", - outname); - break; -#ifdef MAKETEXPK - case 'M': - /* -M, -M1 => don't make font; -M0 => do. */ - makeTexPK = (*p == '0'); -#ifdef HAVE_LIBKPATHSEA - kpse_set_program_enabled (kpse_pk_format, makeTexPK, kpse_src_cmdline); -#endif - if (makeTexPK) - Message(PARSE_STDIN,"MakeTeXPK enabled\n"); - else - Message(PARSE_STDIN,"MakeTeXPK disabled\n"); - break; -#endif /* MAKETEXPK */ - case 'm': - if (strcmp(p,"ode") == 0 ) { - if (argv[i+1]) - user_mfmode = argv[++i] ; - Message(PARSE_STDIN,"MetaFont mode: %s\n",user_mfmode); - break; - } - goto DEFAULT; - case 'h': - if (strcmp(p,"elp") == 0 ) { - break; - } else if (strncmp(p,"eight",5) == 0 ) { /* Height reporting */ - if (p[5] != '0') { - option_flags |= REPORT_HEIGHT; - Message(PARSE_STDIN,"Height reporting on\n",p); - } else { - option_flags &= ~REPORT_HEIGHT; - Message(PARSE_STDIN,"Height reporting off\n"); - } - break; - } - goto DEFAULT; - case 'O' : /* Offset */ - if (*p == 0 && argv[i+1]) - p = argv[++i] ; - handlepapersize(p, &x_offset_def, &y_offset_def) ; - Message(PARSE_STDIN,"Offset: (%d,%d)\n",x_offset_def,y_offset_def); - break ; - case 'e': - if (strncmp(p,"xpand-bbox",10) == 0 ) { - if (p[10] != '0') { - option_flags |= EXPAND_BBOX; - Message(PARSE_STDIN,"BBox expansion on\n",p); - } else { - option_flags &= ~EXPAND_BBOX; - Message(PARSE_STDIN,"BBox expansion off\n"); - } - break; - } - goto DEFAULT; - case 'T' : - if (*p == 0 && argv[i+1]) - p = argv[++i]; - if (strcmp(p,"bbox")==0) { - x_width_def=0; - y_width_def=0; - Message(PARSE_STDIN,"Pagesize: (bbox)\n"); - } else if (strcmp(p,"tight")==0) { - x_width_def=-1; - y_width_def=-1; - Message(PARSE_STDIN,"Pagesize: (tight bbox)\n"); - } else { - handlepapersize(p, &x_width_def, &y_width_def) ; - Message(PARSE_STDIN,"Pagesize: (%d,%d)\n", - x_width_def,y_width_def); - } - break ; - case 't': /* specify paper format, only for cropmarks */ -#ifdef HAVE_GDIMAGECREATETRUECOLOR - /* Truecolor */ - if (strncmp(p,"ruecolor",8)==0) { - if (p[8] != '0') { - option_flags |= FORCE_TRUECOLOR; - Message(PARSE_STDIN,"Truecolor mode on\n",p); - } else { - option_flags &= ~FORCE_TRUECOLOR; - Message(PARSE_STDIN,"Truecolor mode off\n"); - } - } else -#endif -#ifdef HAVE_LIBT1 - if ( strncmp(p,"1lib",4) == 0 ) { /* -t1lib activation */ - if (p[4] != '0') { - option_flags |= USE_LIBT1; - Message(PARSE_STDIN,"t1lib rendering on\n",p); - } else { - option_flags &= ~USE_LIBT1; - Message(PARSE_STDIN,"t1lib rendering off\n"); - } - } else -#endif - - { /* cropmarks not implemented yet */ - if (*p == 0 && argv[i+1]) - p = argv[++i] ; - if (strcmp(p,"a4")==0) { - handlepapersize("210mm,297mm",&x_pwidth,&y_pwidth); - } else if (strcmp(p,"letter")==0) { - handlepapersize("8.5in,11in",&x_pwidth,&y_pwidth); - } else if (strcmp(p,"legal")==0) { - handlepapersize("8.5in,14in",&x_pwidth,&y_pwidth); - } else if (strcmp(p,"executive")==0) { - handlepapersize("7.25in,10.5in",&x_pwidth,&y_pwidth); - } else - Fatal("papersize %s is not implemented",p); - Message(PARSE_STDIN,"Papersize: %s\n",p); - } - break; -/* case 'c': */ -/* if (strncmp(p,"acheimages",10)==0) { */ -/* if (p[10] != '0') { */ -/* option_flags |= CACHE_IMAGES; */ -/* Message(PARSE_STDIN,"Caching images\n",p); */ -/* } else { */ -/* option_flags &= ~CACHE_IMAGES; */ -/* Message(PARSE_STDIN,"Not caching images\n"); */ -/* } */ -/* break; */ -/* } */ -/* goto DEFAULT; */ - case 'b': - if ( *p == 'g' ) { /* -bg background color */ - p++; - if (*p == 0 && argv[i+1]) - p = argv[++i] ; - if (strncmp(p,"Transparent",11) == 0 ) - option_flags |= BG_TRANSPARENT_ALPHA; - else if (strncmp(p,"transparent",11) == 0 ) - option_flags |= BG_TRANSPARENT; - else - background(p); - if (option_flags & BG_TRANSPARENT) - Message(PARSE_STDIN,"Transp. background (fallback rgb %d,%d,%d)\n", - cstack[0].red,cstack[0].green,cstack[0].blue); - else - Message(PARSE_STDIN,"Background: rgb %d,%d,%d\n", - cstack[0].red,cstack[0].green,cstack[0].blue); - break; - } else if (strcmp(p, "dpi")==0) { - p+=3; - if (*p == 0 && argv[i+1]) - p = argv[++i]; - number = atoi(p); - if (number < 10 || number > 10000) - Warning("Bad --bdpi parameter, ignored"); - else { - user_bdpi=number; - Message(PARSE_STDIN,"Bdpi: %d\n",user_bdpi); - } - break; - } else if ( *p == 'd' ) { /* -bd border width */ - int tmpi; - char* tmps; - p++; - if (*p == 0 && argv[i+1]) - p = argv[++i] ; - tmpi = strtol(p, &tmps, 10); - if (p 1000000) - Warning("Bad magnification parameter (-x or -y), ignored"); - else { - usermag=number; - Message(PARSE_STDIN,"Magstep: %d\n",usermag); - /*overridemag = (c == 'x' ? 1 : -1) ;*/ - } - break ; - case 'g' : - if (strncmp(p,"amma",4)==0) { /* --gamma correction */ - double gamma=0.0; - - p+=4; - if (*p == 0 && argv[i+1]) - p = argv[++i]; - if (p!=NULL) - gamma=atof(p); - if (gamma==0.0) { - Warning("Bad gamma value, default is %f",DEFAULT_GAMMA); - gamma=DEFAULT_GAMMA; - } - Gamma(gamma); - Message(PARSE_STDIN,"Gamma value is %s\n", gamma); - break; -#ifdef HAVE_GDIMAGEGIF - } else if (strncmp(p,"if",2)==0) { /* --gif output */ - option_flags |= GIF_OUTPUT; - Message(PARSE_STDIN,"GIF output\n"); - break; -#endif - } - goto DEFAULT; - case 'p' : - if (*p == 'p') { /* a -pp specifier for a page list */ - ppused=true; - p++ ; - if (*p == 0 && argv[i+1]) - p = argv[++i]; - Message(PARSE_STDIN,"Page list: %s\n",p); - if (ParsePages(p)) - Fatal("bad page list specifier (-pp)"); - } else if (strncmp(p,"ng",2)==0) { /* --png output */ - option_flags &= ~GIF_OUTPUT; - Message(PARSE_STDIN,"PNG output\n"); - } else if (strncmp(p,"icky",4)==0) { - if (p[4] != '0') { - option_flags |= MODE_PICKY; - Message(PARSE_STDIN,"No images output for pages with warnings\n",p); - } else { - option_flags &= ~MODE_PICKY; - Message(PARSE_STDIN,"Images output even for pages with warnings\n"); - } - } else if (strncmp(p,"alette",6)==0) { - if (p[6] != '0') { - option_flags |= FORCE_PALETTE; - Message(PARSE_STDIN,"Forcing 256-color PNG output\n",p); - } else { - option_flags &= ~FORCE_PALETTE; - Message(PARSE_STDIN,"Allows truecolor PNG output\n"); - } - } else { /* a -p specifier for first page */ - int32_t firstpage; - bool abspage=false; - - if (*p == 0 && argv[i+1]) - p = argv[++i] ; - if (*p == '=') { - abspage=true; - p++ ; - } - if ((*p>='0'&&*p<='9') || (*p=='-' && *(p+1)>='0' && *(p+1)<='9')) { - firstpage = atoi(p); - FirstPage(firstpage,abspage); - Message(PARSE_STDIN,"First page: %d\n",firstpage); - } else - Warning("Bad firstpage (-p) parameter, ignored"); - } - break ; - case 's' : - if (strncmp(p,"trict",5)==0) { - if (p[5] != '0') { - option_flags |= MODE_STRICT; - Message(PARSE_STDIN,"Warnings are fatal\n",p); - } else { - option_flags &= ~MODE_STRICT; - Message(PARSE_STDIN,"Warnings are not fatal\n"); - } - } else - goto DEFAULT; - break ; - case 'n' : - if (strncmp(p,"oghostscript",12)==0) { - if (p[12] != '0') { - option_flags |= NO_GHOSTSCRIPT; - Message(PARSE_STDIN,"No GhostScript calls\n",p); - } else { - option_flags &= ~NO_GHOSTSCRIPT; - Message(PARSE_STDIN,"GhostScript calls made\n"); - } - } else if (strncmp(p,"ogssafer",8)==0) { - if (p[8] != '0') { - option_flags |= NO_GSSAFER; - Message(PARSE_STDIN,"GhostScript calls does not use -dSAFER\n",p); - } else { - option_flags &= ~NO_GSSAFER; - Message(PARSE_STDIN,"GhostScript calls use -dSAFER\n"); - } - } else - goto DEFAULT; - break ; - case 'l': - { - int32_t lastpage; - bool abspage=false; - - if (*p == 0 && argv[i+1]) - p = argv[++i] ; - if (*p == '=') { - abspage=true; - p++ ; - } - if ((*p>='0'&&*p<='9') || (*p=='-' && *(p+1)>='0' && *(p+1)<='9')) { - lastpage = atoi(p); - LastPage(lastpage,abspage); - Message(PARSE_STDIN,"Last page: %d\n",lastpage); - } else - Warning("Bad lastpage (-l) parameter, ignored"); - } - break ; - case 'q': /* quiet operation */ - if (*p != '0') - option_flags &= (~BE_NONQUIET & ~BE_VERBOSE); - else - option_flags |= BE_NONQUIET; - break; - case 'r': /* process pages in reverse order */ - if (*p != '0') { - Message(PARSE_STDIN,"Reverse order\n"); - Reverse(true); - } else { - Message(PARSE_STDIN,"Normal order\n"); - Reverse(false); - } - break; - case 'v': /* verbatim mode */ - if (strcmp(p, "ersion")==0) { - if (strcmp(basename(programname),PACKAGE_NAME)!=0) - printf("%s (%s) %s\n",basename(programname), - PACKAGE_NAME,PACKAGE_VERSION); - else - puts(PACKAGE_STRING); -#ifdef HAVE_LIBKPATHSEA - puts (KPSEVERSION); -#endif -#ifdef HAVE_FT2 - printf("Compiled with Freetype %d.%d.%d\n", - FREETYPE_MAJOR, FREETYPE_MINOR, FREETYPE_PATCH); -# ifdef HAVE_FT_LIBRARY_VERSION - if (FT_Init_FreeType( &libfreetype )) - Warning("the Freetype library seems unusable"); - else { - FT_Int amajor, aminor, apatch; - - FT_Library_Version( libfreetype, &amajor, &aminor, &apatch ); - printf("Using libft %d.%d.%d\n",amajor, aminor, apatch); - FT_Done_FreeType(libfreetype); - } -# endif -#endif -#ifdef HAVE_LIBT1 - printf("Using t1lib %s\n", T1_GetLibIdent()); -#endif - puts ("Copyright (C) 2002-2008 Jan-Ake Larsson.\n\ -There is NO warranty. You may redistribute this software\n\ -under the terms of the GNU Lesser General Public License\n\ -version 3, see the COPYING file in the dvipng distribution\n\ -or ."); - exit (EXIT_SUCCESS); - } - if (*p != '0') - option_flags |= BE_NONQUIET | BE_VERBOSE; - else - option_flags &= ~BE_VERBOSE; - break; - case 'D' : - if (*p == 0 && argv[i+1]) - p = argv[++i] ; - number = atoi(p); - if (number < 10 || number > 10000) - Warning("Bad resolution (-D) parameter, ignored") ; - else { - dpi=number; - Message(PARSE_STDIN,"Dpi: %d\n",dpi); - } - break; - case 'Q': /* quality (= shrinkfactor) */ - if (*p == 0 && argv[i+1]) - p = argv[++i]; - if (*p>='0'&&*p<='9') { - shrinkfactor = atoi(p); - Message(PARSE_STDIN,"Quality: %d\n",shrinkfactor); - } else { - Warning("Non-numeric quality (-Q) value, ignored"); - } - break; -#ifdef HAVE_GDIMAGEPNGEX - case 'z': - if (*p == 0 && argv[i+1]) - p = argv[++i]; - number = atoi(p); - if (number<1 || number>9) - Warning("Bad compression (-z) value, ignored"); - else { - compression=number; - Message(PARSE_STDIN,"Compression: %d\n",shrinkfactor); - } - break; -#endif - case '\0': - option_flags |= PARSE_STDIN; - break; - DEFAULT: default: - Warning("%s is not a valid option", argv[i]); - } - } else { - dviname=argv[i]; - } - } - if (dviname != NULL) { - if (dvi != NULL && dvi->filep != NULL) - DVIClose(dvi); - dvi=DVIOpen(dviname,outname); - } - - if (dvi==NULL) { - fprintf(stdout,"\nUsage: %s [OPTION]... FILENAME[.dvi]\n", programname); - fprintf(stdout,"Options are chosen to be similar to dvips' options where possible:\n"); -#ifdef DEBUG - fprintf(stdout," -d # Debug (# is the debug bitmap, 1 if not given)\n"); -#endif - fprintf(stdout," -D # Output resolution\n"); - fprintf(stdout," -l # Last page to be output\n"); - fprintf(stdout," -o f Output file, '%%d' is pagenumber\n"); - fprintf(stdout," -O c Image offset\n"); - fprintf(stdout," -p # First page to be output\n"); - fprintf(stdout," -pp #,#.. Page list to be output\n"); - fprintf(stdout," -q* Quiet operation\n"); - fprintf(stdout," -T c Image size (also accepts '-T bbox' and '-T tight')\n"); - fprintf(stdout," -v* Verbose operation\n"); - fprintf(stdout," - Interactive query of options\n"); - fprintf(stdout,"\nThese do not correspond to dvips options:\n"); - fprintf(stdout," -bd # Transparent border width in dots\n"); - fprintf(stdout," -bd s Transparent border fallback color (TeX-style color)\n"); - fprintf(stdout," -bg s Background color (TeX-style color or 'Transparent')\n"); - fprintf(stdout," --depth* Output the image depth on stdout\n"); - fprintf(stdout," --dvinum* Use TeX page numbers in output filenames\n"); - fprintf(stdout," -fg s Foreground color (TeX-style color)\n"); - fprintf(stdout," --follow* Wait for data at end-of-file\n"); -#ifdef HAVE_FT2 - fprintf(stdout," --freetype* FreeType font rendering (default on)\n"); -#endif - fprintf(stdout," --gamma # Control color interpolation\n"); -#ifdef HAVE_GDIMAGEGIF - fprintf(stdout," --gif Output GIF images (dvigif default)\n"); -#endif - fprintf(stdout," --height* Output the image height on stdout\n"); - fprintf(stdout," --noghostscript* Don't use ghostscript for PostScript specials\n"); - fprintf(stdout," --nogssafer* Don't use -dSAFER in ghostscript calls\n"); -#ifdef HAVE_GDIMAGECREATETRUECOLOR - fprintf(stdout," --palette* Force palette output\n"); -#endif - fprintf(stdout," --picky When a warning occurs, don't output image\n"); -#ifdef HAVE_GDIMAGEGIF - fprintf(stdout," --png Output PNG images (dvipng default)\n"); -#endif - fprintf(stdout," --strict When a warning occurs, exit\n"); -#ifdef HAVE_LIBT1 - fprintf(stdout," --t1lib* T1lib font rendering (default on)\n"); -#endif -#ifdef HAVE_GDIMAGECREATETRUECOLOR - fprintf(stdout," --truecolor* Truecolor output\n"); -#endif - fprintf(stdout," -Q # Quality (T1lib and PK subsampling)\n"); -#ifdef HAVE_GDIMAGEPNGEX - fprintf(stdout," -z # PNG compression level\n"); -#endif - - fprintf(stdout,"\n # = number f = file s = string * = suffix, '0' to turn off\n"); - fprintf(stdout," c = comma-separated dimension pair (e.g., 3.2in,-32.1cm)\n\n"); - /*#ifdef HAVE_LIBKPATHSEA - { - extern DllImport char *kpse_bug_address; - putc ('\n', stdout); - fputs (kpse_bug_address, stdout); - } - #endif*/ - if ((option_flags & PARSE_STDIN) == 0) { - exit(EXIT_SUCCESS); - } - } - if ((option_flags & PARSE_STDIN) == 0 && (!ppused)) - ParsePages("-"); - return((option_flags & PARSE_STDIN) != 0); -} - -void DecodeString(char *string) -{ -#define PARSEARGS 10 - char *strv[PARSEARGS]; - int strc=1; - strv[0]=NULL; /* No program name */ - - while (*string==' ' || *string=='\t' || *string=='\n') - string++; - while (*string!='\0') { - strv[strc++]=string; - if (*string!='\'') { - /* Normal split at whitespace */ - while (*string!=' ' && *string!='\t' && *string!='\n' && *string!='\0') - string++; - } else { - /* String delimiter found , so search for next */ - strv[strc-1]=++string; - while (*string!='\'' && *string!='\0') - string++; - } - if (*string!='\0') - *string++='\0'; - while (*string==' ' || *string=='\t' || *string=='\n') - string++; - } - if (strc>1) /* Nonempty */ - (void) DecodeArgs(strc,strv); -} - - - -uint32_t UNumRead(unsigned char* current, register int n) -{ - uint32_t x = (unsigned char) *(current)++; /* number being constructed */ - while(--n) - x = (x << 8) | *(current)++; - return(x); -} - -int32_t SNumRead(unsigned char* current, register int n) -{ - int32_t x = (signed char) *(current)++; /* number being constructed */ - while(--n) - x = (x << 8) | *(current)++; - return(x); -} - - -/**********************************************************************/ -/****************************** Fatal *******************************/ -/**********************************************************************/ -void Fatal (char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - fflush(stdout); - fprintf(stderr, "\n"); - fprintf(stderr, "%s: Fatal error, ", programname); - vfprintf(stderr, fmt, args); - - fprintf(stderr, "\n\n"); - va_end(args); - - ClearFonts(); -#ifdef HAVE_FT2 - if (libfreetype) - (void) FT_Done_FreeType(libfreetype); /* at this point, ignore error */ -#endif -#ifdef HAVE_LIBT1 - if (libt1) - (void) T1_CloseLib(); /* at this point, ignore error */ -#endif - exit(EXIT_FATAL); -} - -/*-->Warning*/ -/**********************************************************************/ -/***************************** Warning ******************************/ -/**********************************************************************/ -void Warning(char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - - if ( option_flags & BE_NONQUIET ) { - fflush(stdout); - fprintf(stderr, "%s warning: ", programname); - vfprintf(stderr, fmt, args); - fprintf(stderr, " "); - } - va_end(args); -} - -/*-->Message*/ -/**********************************************************************/ -/***************************** Message ******************************/ -/**********************************************************************/ -void Message(int activeflags, char *fmt, ...) -{ - va_list args; - - va_start(args, fmt); - if ( option_flags & activeflags ) { - vfprintf(stdout, fmt, args); - } - va_end(args); -} - - -bool MmapFile (char *filename,struct filemmap *fmmap) -{ -#ifndef MIKTEX - struct stat stat; -#endif - - DEBUG_PRINT(DEBUG_DVI,("\n OPEN FILE:\t'%s'", filename)); - fmmap->data=NULL; -#ifndef MIKTEX - if ((fmmap->fd = open(filename,O_RDONLY)) == -1) { - Warning("cannot open file <%s>", filename); - return(true); - } - fstat(fmmap->fd,&stat); - fmmap->size=stat.st_size; -# ifdef HAVE_MMAP - fmmap->data = mmap(NULL,fmmap->size, PROT_READ, MAP_SHARED,fmmap->fd,0); - if (fmmap->data == (char*)-1) { - Warning("cannot mmap file <%s>",filename); - fmmap->data=NULL; - close(fmmap->fd); - return(true); - } -# else /* HAVE_MMAP */ - fmmap->data = malloc(fmmap->size); - if (fmmap->data == NULL) { - Warning("cannot malloc space for <%s>",filename); - close(fmmap->fd); - return(true); - } - if (read(fmmap->fd,fmmap->data,fmmap->size)size) { - Warning("too little data in <%s>",filename); - free(fmmap->data); - fmmap->data=NULL; - close(fmmap->fd); - return(true); - } - close(fmmap->fd); -# endif /* HAVE_MMAP */ -#else /* MIKTEX */ - fmmap->hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, 0, - OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, 0); - if (fmmap->hFile == INVALID_HANDLE_VALUE) { - Warning("cannot open file <%s>", filename); - return(true); - } - fmmap->size = GetFileSize(fmmap->hFile, 0); - fmmap->hMap = CreateFileMapping(fmmap->hFile, 0, PAGE_READONLY, 0, 0, 0); - if (fmmap->hMap == 0) { - CloseHandle (fmmap->hFile); - Warning("cannot CreateFileMapping() file <%s>", filename); - return(true); - } - fmmap->data = MapViewOfFile(fmmap->hMap, FILE_MAP_READ, 0, 0, 0); - if (fmmap->data == NULL) { - Warning("cannot MapViewOfFile() file <%s>", filename); - CloseHandle (fmmap->hMap); - CloseHandle (fmmap->hFile); - return(true); - } -#endif /* MIKTEX */ - return(false); -} - -void UnMmapFile(struct filemmap* fmmap) -{ - if (fmmap->data!=NULL) { -#ifndef MIKTEX -# ifdef HAVE_MMAP - if (munmap(fmmap->data,fmmap->size)) - Warning("cannot munmap file at 0x%X",fmmap->data); - if (close(fmmap->fd)) - Warning("cannot close file descriptor %d",fmmap->fd); -# else /* HAVE_MMAP */ - free(fmmap->data); -# endif /* HAVE_MMAP */ -#else /* MIKTEX */ - UnmapViewOfFile (fmmap->data); - CloseHandle (fmmap->hMap); - CloseHandle (fmmap->hFile); -#endif /* MIKTEX */ - } - fmmap->data=NULL; -} diff --git a/Build/source/texk/dvipng/papersiz.c b/Build/source/texk/dvipng/papersiz.c deleted file mode 100644 index 749035df10e..00000000000 --- a/Build/source/texk/dvipng/papersiz.c +++ /dev/null @@ -1,72 +0,0 @@ -/* papersiz.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" - -const char *lengthnames[]={ "sp", "pt", "bp", - "dd", "mm", "pc", - "cc", "cm", "in" }; -const int32_t lengthsp[]={ 1L, 65536L, 65782L, - 70124L, 186468L, 786432L, - 841489L, 1864680L, 4736286L }; - -/* - * Convert a double[unit], e.g., "3.2cm" or "1.0in" into length in pixels. - * Advance the passed pointer as well. - */ - -static int32_t myatodim(char ** p) -{ - double tmp; /* double accuracy is enough, I think */ - int i=0; - - tmp = strtod(*p,p); - while (**p == ' ') - (*p)++; - while (i<8 && ((*p)[0]!=lengthnames[i][0] || (*p)[1]!=lengthnames[i][1])) - i++; - if (i==8 && ((*p)[0]!=lengthnames[i][0] || (*p)[1]!=lengthnames[i][1])) - Warning("unrecognized length unit \"%.2s\", assuming inches",*p); - while (**p != ',' && **p !='\0') - (*p)++; - tmp = tmp*lengthsp[i]*dpi/4736286L; /* sp * dots/in / (sp/in), convert sp to pixels */ - return((int32_t) tmp); -} - - -/* - * The routine where we handle the paper size special. We need to pass in - * the string after the `papersize=' specification. - */ - -void handlepapersize(char * p, int32_t * x, int32_t * y) -{ - while (*p == ' ') - p++ ; - *x = myatodim(&p) ; - while (*p == ' ' || *p == ',') - p++ ; - *y = myatodim(&p) ; -} - diff --git a/Build/source/texk/dvipng/pk.c b/Build/source/texk/dvipng/pk.c deleted file mode 100644 index 2bb425987e8..00000000000 --- a/Build/source/texk/dvipng/pk.c +++ /dev/null @@ -1,407 +0,0 @@ -/* pk.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" -#ifdef HAVE_ALLOCA_H -# include -#endif - -#define PK_POST 245 -#define PK_PRE 247 -#define PK_ID 89 - -unsigned char dyn_f; -int repeatcount; -int poshalf; - -static unsigned char getnyb(unsigned char** pos) -{ - if (poshalf == 0) { - poshalf=1; - return(**pos / 16); - } else { - poshalf=0; - return(*(*pos)++ & 15); - } -} - -static uint32_t pk_packed_num(unsigned char** pos) -{ - register int i; - uint32_t j; - - i = (int)getnyb(pos); - if (i == 0) { - do { - j = (uint32_t)getnyb(pos); - i++; - } while (j == 0); - while (i > 0) { - j = j * 16 + (uint32_t)getnyb(pos); - i--; - }; - return (j - 15 + (13 - dyn_f) * 16 + dyn_f); - } else if (i <= (int)dyn_f) { - return ((uint32_t)i); - } else if (i < 14) { - return ((i-(uint32_t)dyn_f - 1) * 16 + (uint32_t)getnyb(pos) - + dyn_f + 1); - } else { - if (i == 14) { - repeatcount = (int)pk_packed_num(pos); - } else { - repeatcount = 1; - } - return (pk_packed_num(pos)); /* tail end recursion !! */ - } -} - -static unsigned char* skip_specials(unsigned char* pos) -{ - uint32_t i; - - while (*pos >= 240 && *pos != PK_POST) { - i=0; - switch (*pos++) { - case 243: - i = *pos++; - case 242: - i = 256 * i + *pos++; - case 241: - i = 256 * i + *pos++; - case 240: - i = 256 * i + *pos++; - DEBUG_PRINT(DEBUG_PK,("\n PK SPECIAL\t'%.*s' ",(int)i,pos)); - pos += i; - break; - case 244: -#ifdef DEBUG - { - uint32_t c; - c=UNumRead(pos,4); - DEBUG_PRINT(DEBUG_PK,("\n PK SPECIAL\t%d",c)); - } -#endif - pos += 4; - break; - case 245: - break; - case 246: - DEBUG_PRINT(DEBUG_PK,("\n PK\tNOP ")); - break; - case 247: case 248: case 249: case 250: - case 251: case 252: case 253: case 254: - case 255: - Fatal("unexpected PK flagbyte %d", (int)*pos); - } - } - return(pos); -} - - -void LoadPK(int32_t c, register struct char_entry * ptr) -{ - unsigned short shrunk_width,shrunk_height; - unsigned short width,height; - short xoffset,yoffset; - unsigned short i_offset,j_offset; - int i,j,k,n; - int count=0; - bool paint_switch; - unsigned char *pos,*buffer; - - DEBUG_PRINT(DEBUG_PK,("\n LOAD PK CHAR\t%d",c)); - pos=ptr->pkdata; - if ((ptr->flag_byte & 7) == 7) n=4; - else if ((ptr->flag_byte & 4) == 4) n=2; - else n=1; - dyn_f = ptr->flag_byte / 16; - paint_switch = ((ptr->flag_byte & 8) != 0); - /* - * Read character preamble - */ - if (n != 4) { - ptr->tfmw = UNumRead(pos, 3); - /* +n: vertical escapement not used */ - pos+=3+n; - } else { - ptr->tfmw = UNumRead(pos, 4); - /* +4: horizontal escapement not used */ - /* +n: vertical escapement not used */ - pos+=8+n; - } - DEBUG_PRINT(DEBUG_PK,(" %d",ptr->tfmw)); - ptr->tfmw = (dviunits) - ((int64_t) ptr->tfmw * currentfont->s / 0x100000 ); - DEBUG_PRINT(DEBUG_PK,(" (%d)",ptr->tfmw)); - - width = UNumRead(pos, n); - height = UNumRead(pos+=n, n); - DEBUG_PRINT(DEBUG_PK,(" %dx%d",width,height)); - - if (width > 0x7fff || height > 0x7fff) - Fatal("character %d too large in file %s", c, currentfont->name); - - /* - * Hotspot issues: Shrinking to the topleft corner rather than the - hotspot will displace glyphs a fraction of a pixel. We deal with - this in as follows: The glyph is shrunk to its hotspot by - offsetting the bitmap somewhat to put the hotspot in the lower - left corner of a "shrink square". Shrinking to the topleft corner - will then act as shrinking to the hotspot. This may enlarge the - bitmap somewhat, of course. (Also remember that the below - calculation of i/j_offset is in integer arithmetics.) - - There will still be a displacement from rounding the dvi - position, but vertically it will be equal for all glyphs on a - line, so we displace a whole line vertically by fractions of a - pixel. This is acceptible, IMHO. Sometime there will be support - for subpixel positioning, horizontally. Will do for now, I - suppose. - */ - xoffset = SNumRead(pos+=n, n); - i_offset = ( shrinkfactor - xoffset % shrinkfactor ) % shrinkfactor; - width += i_offset; - ptr->xOffset = xoffset+i_offset; - - yoffset = SNumRead(pos+=n, n); - j_offset = ( shrinkfactor - (yoffset-(shrinkfactor-1)) % shrinkfactor ) - % shrinkfactor; - height += j_offset; - ptr->yOffset = yoffset+j_offset; - - DEBUG_PRINT(DEBUG_PK,(" (%dx%d)",width,height)); - /* - Extra marginal so that we do not crop the image when shrinking. - */ - shrunk_width = (width + shrinkfactor - 1) / shrinkfactor; - shrunk_height = (height + shrinkfactor - 1) / shrinkfactor; - ptr->w = shrunk_width; - ptr->h = shrunk_height; - pos+=n; - buffer = alloca(shrunk_width*shrunk_height* - shrinkfactor*shrinkfactor*sizeof(char)); - (void)memset(buffer,0,shrunk_width*shrunk_height* - shrinkfactor*shrinkfactor*sizeof(char)); - DEBUG_PRINT(DEBUG_GLYPH,("\nDRAW GLYPH %d\n", (int)c)); - /* - Raster char - */ - if (dyn_f == 14) { /* get raster by bits */ - int bitweight = 0; - for (j = j_offset; j < (int) height; j++) { /* get all rows */ - for (i = i_offset; i < (int) width; i++) { /* get one row */ - bitweight /= 2; - if (bitweight == 0) { - count = *pos++; - bitweight = 128; - } - if (count & bitweight) { - buffer[i+j*width]=1; -#ifdef DEBUG - DEBUG_PRINT(DEBUG_GLYPH,("+")); - } else { - DEBUG_PRINT(DEBUG_GLYPH,(" ")); -#endif - } - } - DEBUG_PRINT(DEBUG_GLYPH,("|\n")); - } - } else { /* get packed raster */ - poshalf=0; - repeatcount = 0; - for(i=i_offset, j=j_offset; j 0) { - if (i+count < width) { - if (paint_switch) - for(k=0;k0; repeatcount--,j++) { - for (i = i_offset; i0) { - DEBUG_PRINT(DEBUG_GLYPH,("=")); - } else { - DEBUG_PRINT(DEBUG_GLYPH,(" ")); - } -#endif - } - DEBUG_PRINT(DEBUG_GLYPH,("|\n")); - } - i=i_offset; - } - } - paint_switch = 1 - paint_switch; - } - if (i>i_offset) - Fatal("wrong number of bits stored: char. %c, font %s", - (char)c, currentfont->name); - if (j>height) - Fatal("bad PK file %s, too many bits", currentfont->name); - } - /* - Shrink raster while doing antialiasing. (See above. The - single-glyph output seems better than what xdvi at 300 dpi, - shrinkfactor 3 produces.) - */ - if ((ptr->data = calloc(shrunk_width*shrunk_height,sizeof(char))) == NULL) - Fatal("unable to allocate image space for char %c", (char)c); - for (j = 0; j < (int) height; j++) { - for (i = 0; i < (int) width; i++) { - /* if (((i % shrinkfactor) == 0) && ((j % shrinkfactor) == 0)) - ptr->data[i/shrinkfactor+j/shrinkfactor*shrunk_width] = - buffer[i+j*width]; - else */ - ptr->data[i/shrinkfactor+j/shrinkfactor*shrunk_width] += - buffer[i+j*width]; - } - } - for (j = 0; j < shrunk_height; j++) { - for (i = 0; i < shrunk_width; i++) { - ptr->data[i+j*shrunk_width] = ptr->data[i+j*shrunk_width] - *255/shrinkfactor/shrinkfactor; - DEBUG_PRINT(DEBUG_GLYPH,("%3u ",ptr->data[i+j*shrunk_width])); - } - DEBUG_PRINT(DEBUG_GLYPH,("|\n")); - } -} - -void InitPK(struct font_entry * tfontp) -{ - unsigned char* position; - struct char_entry *tcharptr; /* temporary char_entry pointer */ - uint32_t hppp, vppp, packet_length; - uint32_t c; - - DEBUG_PRINT((DEBUG_DVI|DEBUG_PK),("\n OPEN FONT:\t'%s'", tfontp->name)); - Message(BE_VERBOSE,"<%s>", tfontp->name); - if (MmapFile(tfontp->name,&(tfontp->fmmap))) - Fatal("font file %s unusable", tfontp->name); - position=(unsigned char*)tfontp->fmmap.data; - if (tfontp->fmmap.size < 2 || tfontp->fmmap.size < 3+*(position+2)+16) - Fatal("PK file %s ends prematurely",tfontp->name); - if (*position++ != PK_PRE) - Fatal("unknown font format in file %s",tfontp->name); - if (*position++ != PK_ID) - Fatal( "wrong version %d of PK file %s (should be 89)", - (int)*(position-1),tfontp->name); - DEBUG_PRINT(DEBUG_PK,("\n PK_PRE:\t'%.*s'",(int)*position, position+1)); - position += *position + 1; - - tfontp->designsize = UNumRead(position, 4); - DEBUG_PRINT(DEBUG_PK,(" %d", tfontp->designsize)); - tfontp->type = FONT_TYPE_PK; - - c = UNumRead(position+4, 4); - DEBUG_PRINT(DEBUG_PK,(" %d", c)); - CheckChecksum (tfontp->c, c, tfontp->name); - - hppp = UNumRead(position+8, 4); - vppp = UNumRead(position+12, 4); - DEBUG_PRINT(DEBUG_PK,(" %d %d", hppp,vppp)); - if (hppp != vppp) - Warning("aspect ratio is %d:%d (should be 1:1)", hppp, vppp); - tfontp->magnification = (uint32_t)((uint64_t)hppp * 7227 * 5 / 65536l + 50)/100; - position+=16; - /* Read char definitions */ - position = skip_specials(position); - while (*position != PK_POST) { - DEBUG_PRINT(DEBUG_PK,("\n @%ld PK CHAR:\t%d", - (long)position - (long)tfontp->fmmap.data, *position)); - if ((tcharptr = malloc(sizeof(struct char_entry))) == NULL) - Fatal("cannot malloc space for char_entry"); - tcharptr->flag_byte = *position; - tcharptr->data = NULL; - tcharptr->tfmw = 0; - if ((*position & 7) == 7) { - packet_length = UNumRead(position+1,4); - c = UNumRead(position+5, 4); - position += 9; - } else if (*position & 4) { - packet_length = (*position & 3) * 65536l + - UNumRead(position+1, 2); - c = UNumRead(position+3, 1); - position += 4; - } else { - packet_length = (*position & 3) * 256 + - UNumRead(position+1, 1); - c = UNumRead(position+2, 1); - position += 3; - } - DEBUG_PRINT(DEBUG_PK,(" %d %d",packet_length,c)); - if (c > (LASTFNTCHAR)) - Fatal("PK font %s exceeds char numbering limit",tfontp->name); - tcharptr->length = packet_length; - tcharptr->pkdata = position; - tfontp->chr[c]=tcharptr; - position += packet_length; - position = skip_specials(position); - } -} - -static void UnLoadPK(struct char_entry *ptr) -{ - if (ptr->data!=NULL) - free(ptr->data); - ptr->data=NULL; -} - -void DonePK(struct font_entry *tfontp) -{ - int c=FIRSTFNTCHAR; - - UnMmapFile(&(tfontp->fmmap)); - while(c<=LASTFNTCHAR) { - if (tfontp->chr[c]!=NULL) { - UnLoadPK((struct char_entry*)tfontp->chr[c]); - free(tfontp->chr[c]); - } - c++; - } - tfontp->name[0]='\0'; -} diff --git a/Build/source/texk/dvipng/ppagelist.c b/Build/source/texk/dvipng/ppagelist.c deleted file mode 100644 index deccb96a70f..00000000000 --- a/Build/source/texk/dvipng/ppagelist.c +++ /dev/null @@ -1,184 +0,0 @@ -/* ppagelist.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" - -/* Some code at the end of this file is adapted from dvips */ - -static int32_t first=PAGE_FIRSTPAGE, last=PAGE_LASTPAGE; -static bool abspage=false, reverse=false; -bool no_ppage=true; - -/* dvips' behaviour: - * -pp outputs _all_ pages with the correct numbers, - * -p, -l outputs from the first occurrence of firstpage to the first - * occurrence of lastpage. Using '=' means absolute pagenumbers - */ - -void FirstPage(int32_t page, bool data) -{ - first=page; - abspage |= data; -} -void LastPage(int32_t page,bool data) -{ - last=page; - abspage |= data; -} -void Reverse(bool new) -{ - reverse=new; -} -/*-->NextPPage*/ -/**********************************************************************/ -/**************************** NextPPage *****************************/ -/**********************************************************************/ -/* Return the page in turn on our queue */ -/* (Implicitly, PAGE_POST is never in the pagelist) */ -bool InPageList(int32_t i); - -struct page_list* NextPPage(void* dvi, struct page_list* page) -{ - if (! reverse) { /*********** normal order */ - if (page == NULL) { /* first call: find first page */ - if (no_ppage) - return(NULL); - page=FindPage(dvi,first,abspage); - } else /* later calls: count up, except "last" page */ - page=(last==page->count[abspage ? 0 : 10]) ? NULL : NextPage(dvi,page); - /* seek for pages in pagelist */ - while (page!=NULL && ! InPageList(page->count[0])) - page=(last==page->count[abspage ? 0 : 10]) ? NULL : NextPage(dvi,page); - } else { /******************** reverse order */ - if (page == NULL) { /* first call: find "last" page */ - if (no_ppage) - return(NULL); - page=FindPage(dvi,last,abspage); - } else /* later calls: count down, except "first" page */ - page=(first==page->count[abspage ? 0 : 10]) ? NULL : PrevPage(dvi,page); - /* seek for pages in pagelist */ - while (page!=NULL && ! InPageList(page->count[0])) - page=(first==page->count[abspage ? 0 : 10]) ? NULL : PrevPage(dvi,page); - } - return(page); -} - -struct pp_list { - struct pp_list *next; /* next in a series of alternates */ - int32_t ps_low, ps_high; /* allowed range */ -} *ppages = 0; /* the list of allowed pages */ - -/*-->InPageList*/ -/**********************************************************************/ -/****************************** InPageList **************************/ -/**********************************************************************/ -/* Return true iff i is one of the desired output pages */ - -bool InPageList(int32_t i) -{ - register struct pp_list *pl = ppages; - - while (pl) { - if ( i >= pl -> ps_low && i <= pl -> ps_high) - return(true); /* success */ - pl = pl -> next; - } - return(false); -} - -static void ListPage(int32_t pslow, int32_t pshigh) -{ - register struct pp_list *pl; - - /* Some added code, we want to reuse the list */ - no_ppage=false; - pl = ppages; - while (pl != NULL && pl->ps_low <= pl->ps_high) - pl = pl->next; - if (pl == NULL) { - if ((pl = (struct pp_list *)malloc(sizeof(struct pp_list))) - ==NULL) - Fatal("cannot allocate memory for page queue"); - pl -> next = ppages; - ppages = pl; - } - pl -> ps_low = pslow; - pl -> ps_high = pshigh; -} - -/* Parse a string representing a list of pages. Return 0 iff ok. As a - side effect, the page selection(s) is (are) prepended to ppages. */ - -bool ParsePages(char *s) -{ - char *c; /* conversion start */ - long int ps_low = PAGE_MINPAGE, ps_high = PAGE_MAXPAGE; - - while (*s==' ' || *s=='\t') s++; - while (*s!='\0') { - if (*s=='-' || *s==':') { /* range with no starting value */ - ps_low = PAGE_MINPAGE; - c=s+1; - ps_high = strtol(c,&s,10); - if (c==s) ps_high=PAGE_MAXPAGE; /* no number */ - while (*s==' ' || *s=='\t') s++; - if (*s=='-' || *s==':') { /* Oh, range with negative starting value */ - ps_low = -ps_high; - c=s+1; - ps_high = strtol(c,&s,10); - if (c==s) ps_high=PAGE_MAXPAGE; /* no number */ - } - } else { /* range with starting value, or singleton */ - c=s; - ps_low = ps_high = strtol(c,&s,10); - if (c==s) - return(true); - if (*s=='-' || *s==':') { /* range */ - c=s+1; - ps_high = strtol(c,&s,10); - if (c==s) ps_high=PAGE_MAXPAGE; /* no number */ - } - } - ListPage(ps_low, ps_high); - while (*s==' ' || *s=='\t' || *s==',') s++; - } - return(false); -} - -/* Addition, we want to be able to clear the pplist */ -void ClearPpList(void) -{ - register struct pp_list *pl = ppages; - - while (pl) { - ppages=ppages->next; - free(pl); - pl = ppages; - } - first=PAGE_FIRSTPAGE; - last=PAGE_LASTPAGE; - abspage = false; - no_ppage=true; -} - diff --git a/Build/source/texk/dvipng/set.c b/Build/source/texk/dvipng/set.c deleted file mode 100644 index 050dbedea11..00000000000 --- a/Build/source/texk/dvipng/set.c +++ /dev/null @@ -1,300 +0,0 @@ -/* set.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" -#ifdef HAVE_ALLOCA_H -# include -#endif -#include - -#ifndef HAVE_GDIMAGECREATETRUECOLOR -#define gdImageColorAllocateAlpha(i,r,g,b,a) gdImageColorAllocate(i,r,g,b) -#define gdImageColorResolveAlpha(i,r,g,b,a) gdImageColorResolve(i,r,g,b) -#define gdImageAlpha(i,c) 0 -#define gdAlphaMax 127 -#endif -#ifndef HAVE_GDIMAGEPNGEX -#define gdImagePngEx(i,f,z) gdImagePng(i,f) -#endif - -/* Persistent color cache. Index is ink thickness, - 0=no ink, 127=total coverage */ -static int ColorCache[gdAlphaMax+1]; - -void CreateImage(pixels x_width,pixels y_width) -{ - if (page_imagep) - gdImageDestroy(page_imagep); - if (x_width <= 0) x_width=1; - if (y_width <= 0) y_width=1; -#ifdef HAVE_GDIMAGECREATETRUECOLOR - /* GIFs are 256-color */ - if ((option_flags & FORCE_TRUECOLOR - || page_flags & PAGE_TRUECOLOR) - && ~option_flags & GIF_OUTPUT - && ~option_flags & FORCE_PALETTE) - page_imagep=gdImageCreateTrueColor(x_width,y_width); - else -#endif - page_imagep=gdImageCreate(x_width,y_width); - /* Set bg color. GIFs cannot handle an alpha channel, resort to - transparent color index, set in WriteImage */ - ColorCache[0] - = gdImageColorAllocateAlpha(page_imagep, - cstack[0].red, - cstack[0].green, - cstack[0].blue, - (option_flags & BG_TRANSPARENT_ALPHA - && ~option_flags & GIF_OUTPUT) ? 127 : 0); - ColorCache[gdAlphaMax]=-1; -#ifdef HAVE_GDIMAGECREATETRUECOLOR - /* Alpha blending in libgd is only performed for truecolor images. - We need it for palette images also. Turn libgd alpha blending off - and calculate color blending where needed. We turn it back on - briefly for image inclusion. */ - gdImageAlphaBlending(page_imagep, 0); - if (option_flags & BG_TRANSPARENT_ALPHA) - gdImageSaveAlpha(page_imagep, 1); - if (page_imagep->trueColor) - /* Truecolor: there is no background color index, fill image instead. */ - gdImageFilledRectangle(page_imagep, 0, 0, - x_width-1, y_width-1, ColorCache[0]); -#endif -} - - -static void ChangeColor(gdImagePtr imagep,int x1,int y1, - int x2,int y2,int color1,int color2) -/* In the given rectangle, change color1 to color2 */ -{ - int x,y; - for( y=y1; y<=y2; y++) { - for( x=x1; x<=x2; x++) { - if (gdImageGetPixel(imagep, x, y)==color1) - gdImageSetPixel(imagep, x, y, color2); - } - } -} - -void WriteImage(char *pngname, int pagenum) -{ - char* pos; - FILE* outfp=NULL; - - /* Set transparent background. Maybe alpha is not available or - perhaps we are producing GIFs, so test for BG_TRANSPARENT_ALPHA - too */ - if (option_flags & (BG_TRANSPARENT|BG_TRANSPARENT_ALPHA)) - gdImageColorTransparent(page_imagep,ColorCache[0]); - /* Transparent border */ - if (borderwidth>0) { - int Transparent; - pixels x_width,y_width; - - x_width=gdImageSX(page_imagep); - y_width=gdImageSY(page_imagep); - - /* Set ANOTHER bg color, transparent this time */ - /* No semi-transparency here, given the motivation for this code - * (box cursor visibility in Emacs) */ - if (userbordercolor) - Transparent = gdImageColorAllocate(page_imagep, - bordercolor.red, - bordercolor.green, - bordercolor.blue); - else - Transparent = gdImageColorAllocate(page_imagep, - gdImageRed(page_imagep,ColorCache[0]), - gdImageGreen(page_imagep,ColorCache[0]), - gdImageBlue(page_imagep,ColorCache[0])); - gdImageColorTransparent(page_imagep,Transparent); - ChangeColor(page_imagep,0,0,x_width-1,borderwidth-1, - ColorCache[0],Transparent); - ChangeColor(page_imagep,0,0,borderwidth-1,y_width-1, - ColorCache[0],Transparent); - ChangeColor(page_imagep,x_width-borderwidth,0,x_width-1,y_width-1, - ColorCache[0],Transparent); - ChangeColor(page_imagep,0,y_width-borderwidth,x_width-1,y_width-1, - ColorCache[0],Transparent); - } - - if ((pos=strchr(pngname,'%')) != NULL) { - if (strchr(++pos,'%')) - Fatal("too many %%s in output file name"); - if (*pos == 'd' - || (*pos=='0' && pos[1]>='1' && pos[1]<='9' && pos[2]=='d')) { - /* %d -> pagenumber, so add 9 string positions - since pagenumber max +-2^31 or +-2*10^9 */ - char* tempname = alloca(strlen(pngname)+9); - sprintf(tempname,pngname,pagenum); - pngname = tempname; - } else { - Fatal("unacceptible format spec in output file name"); - } - } -#ifdef HAVE_GDIMAGEGIF - if (option_flags & GIF_OUTPUT && (pos=strrchr(pngname,'.')) != NULL - && strcmp(pos,".png")==0) { - *(pos+1)='g'; - *(pos+2)='i'; - *(pos+3)='f'; - } -#endif - if ((outfp = fopen(pngname,"wb")) == NULL) - Fatal("cannot open output file %s",pngname); -#ifdef HAVE_GDIMAGEGIF - if (option_flags & GIF_OUTPUT) - gdImageGif(page_imagep,outfp); - else -#endif - gdImagePngEx(page_imagep,outfp,compression); - fclose(outfp); - DEBUG_PRINT(DEBUG_DVI,("\n WROTE: \t%s\n",pngname)); - DestroyImage(); -} - -void DestroyImage(void) -{ - gdImageDestroy(page_imagep); - page_imagep=NULL; -} - -static int gammatable[]= - {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, - 20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39, - 40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59, - 60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79, - 80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99, - 100,101,102,103,104,105,106,107,108,109, - 110,111,112,113,114,115,116,117,118,119, - 120,121,122,123,124,125,126,127}; - -void Gamma(double gamma) -{ - int i=0; - - while (i<=gdAlphaMax) { - gammatable[i]=gdAlphaMax- - (int)(pow((gdAlphaMax-i)/((double)gdAlphaMax),gamma)*gdAlphaMax); - DEBUG_PRINT(DEBUG_GLYPH, - ("\n GAMMA GREYSCALE: %d -> %d ",i,gammatable[i])); - i++; - } -} - -dviunits SetGlyph(int32_t c, int32_t hh,int32_t vv) -/* gdImageChar can only do monochrome glyphs */ -{ - register struct char_entry *ptr; - int dst_alpha,dst_weight,tot_weight,alpha; - int x,y,pos=0; - int bgColor,pixelgrey,pixelcolor; - - if (c<0 || c>LASTFNTCHAR) { - Warning("glyph index too large (%d), skipping",c); - return(0); - } - ptr=currentfont->chr[c]; - if (ptr==NULL) { - Warning("unable to draw glyph %d, skipping",c); - return(0); - } - hh -= ptr->xOffset/shrinkfactor; - vv -= ptr->yOffset/shrinkfactor; - /* Initialize persistent color cache. Perhaps this should be in - color.c? */ - pixelcolor=gdImageColorResolve(page_imagep, - cstack[csp].red, - cstack[csp].green, - cstack[csp].blue); - if (ColorCache[gdAlphaMax]!=pixelcolor) { - for( x=1; xh; y++) { - for( x=0; xw; x++) { - if (ptr->data[pos]>0) { - pixelgrey=gammatable[(int)ptr->data[pos]/2]; - bgColor = gdImageGetPixel(page_imagep, hh + x, vv + y); - if (ColorCache[0]!=bgColor || ColorCache[pixelgrey]==-1) { - DEBUG_PRINT(DEBUG_GLYPH,("\n GAMMA GREYSCALE: %d -> %d ", - ptr->data[pos]/2,pixelgrey)); - alpha = gdAlphaMax-pixelgrey; - dst_alpha = gdImageAlpha(page_imagep,bgColor); - dst_weight = (gdAlphaMax - dst_alpha) * alpha / gdAlphaMax; - tot_weight = pixelgrey + dst_weight; - pixelcolor = gdImageColorResolveAlpha(page_imagep, - (cstack[csp].red*pixelgrey - + gdImageRed(page_imagep,bgColor)*dst_weight)/tot_weight, - (cstack[csp].green*pixelgrey - + gdImageGreen(page_imagep,bgColor)*dst_weight)/tot_weight, - (cstack[csp].blue*pixelgrey - + gdImageBlue(page_imagep,bgColor)*dst_weight)/tot_weight, - alpha*dst_alpha/gdAlphaMax); - if (ColorCache[0]==bgColor) - ColorCache[pixelgrey]=pixelcolor; - } else - pixelcolor=ColorCache[pixelgrey]; - gdImageSetPixel(page_imagep, hh + x, vv + y, pixelcolor); - } - pos++; - } - } - return(ptr->tfmw); -} - -dviunits SetRule(dviunits a, dviunits b, subpixels hh,subpixels vv) -{ - /* This routine will draw a \rule */ - int Color; - pixels width=0, height=0; - - if ( a > 0 && b > 0 ) { - /* Calculate width and height, round up */ - width = (b+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; - height = (a+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; - } - if (page_imagep != NULL) { - if ((height>0) && (width>0)) { - /* This code produces too dark rules. But what the hell. Grey - * rules look fuzzy. */ - Color = gdImageColorResolve(page_imagep, - cstack[csp].red, - cstack[csp].green, - cstack[csp].blue); - /* +1 and -1 are because the Rectangle coords include last pixels */ - gdImageFilledRectangle(page_imagep,hh,vv-height+1,hh+width-1,vv,Color); - DEBUG_PRINT(DEBUG_DVI,("\n RULE \t%dx%d at (%d,%d)", - width, height, hh, vv)); - } - } else { - /* The +1's are because things are cut _at_that_coordinate_. */ - min(x_min,hh); - min(y_min,vv-height+1); - max(x_max,hh+width); - max(y_max,vv+1); - } - return(b); -} diff --git a/Build/source/texk/dvipng/sfd.c b/Build/source/texk/dvipng/sfd.c deleted file mode 100644 index 08330e0dbc3..00000000000 --- a/Build/source/texk/dvipng/sfd.c +++ /dev/null @@ -1,170 +0,0 @@ -/* sfd.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" -struct subfont* subfontp=NULL; - -static struct subfont* ReadSubfont(char* sfdname, char *infix) -{ - char *pos,*max,*sfdfile=NULL; - struct subfont* sfdp=NULL; - struct filemmap fmmap; - - /* OK, find subfont and look for correct infix */ -#ifdef HAVE_KPSE_ENC_FORMATS - TEMPSTR(sfdfile,kpse_find_file(sfdname,kpse_sfd_format,false)); -#endif - if (sfdfile == NULL) { - Warning("subfont file %s could not be found",sfdname); - return(NULL); - } - DEBUG_PRINT((DEBUG_FT|DEBUG_ENC),("\n OPEN SUBFONT:\t'%s'", sfdfile)); - if (MmapFile(sfdfile,&fmmap)) return(NULL); - pos=fmmap.data; - max=fmmap.data+fmmap.size; - while(posname=(char*)sfdp+sizeof(struct subfont); - strcpy(sfdp->name,sfdname); - sfdp->infix=(char*)sfdp+sizeof(struct subfont)+strlen(sfdname)+1; - strcpy(sfdp->infix,infix); - sfdp->encoding=FT_ENCODING_UNICODE; - while (poscharindex[codepoint]=number; - DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT MAP %d %d",codepoint,number)); - number++; - codepoint++; - } - default: - if (codepoint<256) - sfdp->charindex[codepoint]=number; - DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT MAP %d %d",codepoint,number)); - } - while(postfmname,*sfdwant=fontname, - *sfdname,*infix,*postfix; - - while (*sfdspec!='\0' && *sfdspec==*sfdwant) { - sfdspec++; - sfdwant++; - } - /* Find delimiter */ - if (*sfdspec!='@') - return(NULL); - sfdspec++; - postfix=sfdspec; - while (*postfix!='\0' && *postfix!='@') - postfix++; - if (*postfix!='@') - return(NULL); - /* Extract subfont name */ - sfdname=alloca(postfix-sfdspec+1); - strncpy(sfdname,sfdspec,postfix-sfdspec); - sfdname[postfix-sfdspec]='\0'; - /* Check postfix */ - postfix++; - if (strcmp(sfdwant+strlen(sfdwant)-strlen(postfix),postfix)!=0) - return(NULL); - /* Extract infix */ - infix=alloca(strlen(sfdwant)-strlen(postfix)+1); - strncpy(infix,sfdwant,strlen(sfdwant)-strlen(postfix)); - infix[strlen(sfdwant)-strlen(postfix)]='\0'; - DEBUG_PRINT(DEBUG_ENC,("\n SUBFONT %s %s %s",fontname,sfdname,infix)); - /* Find subfont */ - while(temp!=NULL - && (strcmp(sfdname,temp->name)!=0 || strcmp(infix,temp->infix)!=0)) - temp=temp->next; - if (temp==NULL) { - temp=ReadSubfont(sfdname,infix); - if (temp!=NULL) { - temp->next=subfontp; - subfontp=temp; - } - } - entry=NewPSFont(entry); - if (entry!=NULL) { - entry->tfmname=copyword(fontname); - entry->subfont=temp; - } - return(entry); -} - -void ClearSubfont(void) -{ - struct subfont *temp=subfontp; - - while(temp!=NULL) { - subfontp=subfontp->next; - free(temp); - temp=subfontp; - } -} - diff --git a/Build/source/texk/dvipng/special.c b/Build/source/texk/dvipng/special.c deleted file mode 100644 index d1f55b5b79e..00000000000 --- a/Build/source/texk/dvipng/special.c +++ /dev/null @@ -1,785 +0,0 @@ -/* special.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2009 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" - -#define SKIPSPACES(s) while(s && *s==' ' && *s!='\0') s++ - -/* PostScript can come as a string (headers and raw specials) or - a memory-mapped file (headers and included EPS figures). */ - -struct pscode { - struct pscode* next; - char* special; /* complete special */ - char* code; /* PS string, null if a file */ - char* filename; /* file name, null if a string */ - char* postcode; /* post PS string */ - struct filemmap fmmap; /* file mmap */ -}; - -struct pscode* psheaderp=NULL; /* static, DVI-specific header list */ - -static void PSCodeInit(struct pscode *entry, char *special) -{ - entry->next=NULL; - entry->special=special; - entry->code=NULL; - entry->filename=NULL; - entry->postcode=NULL; - entry->fmmap.data=NULL; - if (special==NULL) - return; - if (strncmp(special,"header=",7)==0) - entry->filename=special+7; - else if (strncmp(special,"ps:: plotfile ",14)==0) - entry->filename=special+14; - else if (special[0]=='"' || special[0]=='!') - entry->code=special+1; - else if (strncmp(special,"ps::[begin]",11)==0) - entry->code=special+11; - else if (strncmp(special,"ps::[end]",9)==0) - entry->code=special+9; - else if (strncmp(special,"ps::",4)==0) - entry->code=special+4; - else if (strncmp(special,"ps:",3)==0) - entry->code=special+3; - else - entry->code=special; -#ifdef DEBUG - if (entry->code!=NULL) - DEBUG_PRINT(DEBUG_GS,(" '%s'",entry->code)); - if (entry->filename!=NULL) - DEBUG_PRINT(DEBUG_GS,(" {%s}",entry->filename)); - if (entry->postcode!=NULL) - DEBUG_PRINT(DEBUG_GS,(" '%s'",entry->postcode)); -#endif -} - - - -void ClearPSHeaders(void) -{ - struct pscode *temp=psheaderp; - - while(temp!=NULL) { - psheaderp=psheaderp->next; - if (temp->fmmap.data!=NULL) - UnMmapFile(&(temp->fmmap)); - free(temp); - temp=psheaderp; - } -} - -static void writepscode(struct pscode* pscodep, FILE* psstream) -{ - while (pscodep!=NULL) { - if (pscodep->code!=NULL) { - fputs(pscodep->code,psstream); - putc('\n',psstream); - DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\t%s",pscodep->code)); - } - if (pscodep->filename!=NULL && pscodep->fmmap.data==NULL) { - char* filepath= - kpse_find_file(pscodep->filename,kpse_tex_ps_header_format,false); - if (filepath==NULL) { - Warning("Cannot find PostScript file %s, ignored", pscodep->filename); - page_flags |= PAGE_GAVE_WARN; - } else if (MmapFile(filepath,&(pscodep->fmmap))) { - Warning("PostScript file %s unusable, ignored", pscodep->filename); - page_flags |= PAGE_GAVE_WARN; - } - } - if (pscodep->fmmap.data!=NULL) { - unsigned char* position; - - DEBUG_PRINT(DEBUG_GS,("\n PS FILE:\t%s",pscodep->filename)); - position=(unsigned char*)pscodep->fmmap.data; - while(position - < (unsigned char*)pscodep->fmmap.data + pscodep->fmmap.size) { - putc(*position,psstream); - position++; - } - } - if (pscodep->postcode!=NULL) { - fputs(pscodep->postcode,psstream); - putc('\n',psstream); - DEBUG_PRINT(DEBUG_GS,("\n PS POST CODE:\t%s",pscodep->postcode)); - } - pscodep=pscodep->next; - } -} - - -static gdImagePtr -ps2png(struct pscode* pscodep, char *device, int hresolution, int vresolution, - int llx, int lly, int urx, int ury, int bgred, int bggreen, int bgblue) -{ -#ifndef MIKTEX - int downpipe[2], uppipe[2]; - pid_t pid; -#else - HANDLE hPngStream; - HANDLE hPsStream; - HANDLE hStdErr; - PROCESS_INFORMATION pi; - _TCHAR szCommandLine[2048]; - _TCHAR szGsPath[_MAX_PATH]; -#define GS_PATH szGsPath - int fd; -#endif - FILE *psstream=NULL, *pngstream=NULL; - char resolution[STRSIZE]; - /* char devicesize[STRSIZE]; */ - gdImagePtr psimage=NULL; - static bool showpage=false; - - sprintf(resolution, "-r%dx%d",hresolution,vresolution); - /* Future extension for \rotatebox - status=sprintf(devicesize, "-g%dx%d", - //(int)((sin(atan(1.0))+1)* - (urx - llx)*hresolution/72,//), - //(int)((sin(atan(1.0))+1)* - (ury - lly)*vresolution/72);//); - */ - DEBUG_PRINT(DEBUG_GS, - ("\n GS CALL:\t%s %s %s %s %s %s %s %s %s %s %s",/* %s", */ - GS_PATH, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - (option_flags & NO_GSSAFER) ? "-": "-dSAFER", - (option_flags & NO_GSSAFER) ? "": "- ")); -#ifndef MIKTEX - if (pipe(downpipe) || pipe(uppipe)) return(NULL); - /* Ready to fork */ - pid = fork (); - if (pid == 0) { /* Child process. Execute gs. */ - close(downpipe[1]); - dup2(downpipe[0], STDIN_FILENO); - close(downpipe[0]); - close(uppipe[0]); - dup2(uppipe[1], STDOUT_FILENO); - close(uppipe[1]); - execlp(GS_PATH, GS_PATH, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - (option_flags & NO_GSSAFER) ? "-": "-dSAFER", - (option_flags & NO_GSSAFER) ? NULL: "-", - NULL); - _exit (EXIT_FAILURE); - } - /* Parent process. */ - - close(downpipe[0]); - psstream=fdopen(downpipe[1],"wb"); - /* fclose(psstream); psstream=fopen("test.ps","wb"); */ - if (psstream == NULL) - close(downpipe[1]); - close(uppipe[1]); - pngstream=fdopen(uppipe[0],"rb"); - if (pngstream == NULL) - close(uppipe[0]); -#else /* MIKTEX */ - if (! miktex_find_miktex_executable("mgs.exe", szGsPath)) { - Warning("Ghostscript could not be found"); - return(NULL); - } - sprintf(szCommandLine,"\"%s\" %s %s %s %s %s %s %s %s %s %s",/* %s",*/ - szGsPath, device, resolution, /*devicesize,*/ - "-dBATCH", "-dNOPAUSE", "-q", "-sOutputFile=-", - "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4", - (option_flags & NO_GSSAFER) ? "-": "-dSAFER", - (option_flags & NO_GSSAFER) ? "": "-"); - if (! miktex_start_process_3(szCommandLine, &pi, INVALID_HANDLE_VALUE, - &hPsStream, &hPngStream, &hStdErr, 0)) { - Warning("Ghostscript could not be started"); - return(NULL); - } - CloseHandle (pi.hThread); - fd = _open_osfhandle((intptr_t)hPsStream, _O_WRONLY); - if (fd >= 0) { - psstream = _tfdopen(fd, "wb"); - if (psstream == NULL) - _close (fd); - } - fd = _open_osfhandle((intptr_t)hPngStream, _O_RDONLY); - if (fd >= 0) { - pngstream = _tfdopen(fd, "rb"); - if (pngstream == NULL) - _close (fd); - } -#endif - if (psstream) { - writepscode(psheaderp,psstream); - DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\t<>setpagedevice", - urx - llx, ury - lly,llx,lly)); - fprintf(psstream, "<>setpagedevice\n", - urx - llx, ury - lly,llx,lly); - if ( bgred < 255 || bggreen < 255 || bgblue < 255 ) { - DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tgsave %f %f %f setrgbcolor clippath fill grestore", - bgred/255.0, bggreen/255.0, bgblue/255.0)); - fprintf(psstream, "gsave %f %f %f setrgbcolor clippath fill grestore", - bgred/255.0, bggreen/255.0, bgblue/255.0); - } - writepscode(pscodep,psstream); - if (showpage) { - DEBUG_PRINT(DEBUG_GS,("\n PS CODE:\tshowpage")); - fprintf(psstream, " showpage "); - } - fclose(psstream); - } - if (pngstream) { - psimage = gdImageCreateFromPng(pngstream); - fclose(pngstream); - } -#ifdef MIKTEX - CloseHandle(pi.hProcess); -#endif - if (psimage == NULL) { - DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\tNO IMAGE ")); - if (!showpage) { - showpage=true; - DEBUG_PRINT(DEBUG_GS,("(will try adding \"showpage\") ")); - psimage=ps2png(pscodep, - device, hresolution, vresolution, llx, lly, urx, ury, - bgred,bggreen,bgblue); - showpage=false; - } -#ifdef DEBUG - } else { - DEBUG_PRINT(DEBUG_GS,("\n GS OUTPUT:\t%dx%d image ", - gdImageSX(psimage),gdImageSY(psimage))); -#endif - } - return psimage; -} - -static gdImagePtr -rescale(gdImagePtr psimage, int pngwidth, int pngheight) -{ - gdImagePtr scaledimage=psimage; - /* Rescale unless correct size */ - if (psimage!=NULL - && gdImageSX(psimage)!=pngwidth - && gdImageSY(psimage)!=pngheight) { - DEBUG_PRINT(DEBUG_DVI, - ("\n RESCALE INCLUDED BITMAP \t(%d,%d) -> (%d,%d)", - gdImageSX(psimage),gdImageSY(psimage), - pngwidth,pngheight)); -#ifdef HAVE_GDIMAGECREATETRUECOLOR - scaledimage=gdImageCreateTrueColor(pngwidth,pngheight); - /* Copy with overwrite, remember that this is the rescaled source - image. The real target has alpha blending on. */ - gdImageAlphaBlending(scaledimage,0); - gdImageCopyResampled(scaledimage,psimage,0,0,0,0, - pngwidth,pngheight, - gdImageSX(psimage),gdImageSY(psimage)); -#else - scaledimage=gdImageCreate(pngwidth,pngheight); - gdImageCopyResized(scaledimage,psimage,0,0,0,0, - pngwidth,pngheight, - gdImageSX(psimage),gdImageSY(psimage)); -#endif - gdImageDestroy(psimage); - } - return(scaledimage); -} - -static void newpsheader(char* special) { - struct pscode* tmp; - char* txt; - - if (psheaderp==NULL && strcmp(special,"header=tex.pro")!=0) { - newpsheader("header=tex.pro"); - newpsheader("header=color.pro"); - newpsheader("header=special.pro"); - } - if (strcmp(special+strlen(special)-4,".xcp")==0 - && strncmp(special,"header=",7)==0) - InitXColorPrologue(special+7); - if (strncmp(special,"! /pgfH",7)==0) - newpsheader("! TeXDict begin"); - if (psheaderp==NULL) { - if ((tmp=psheaderp=malloc(sizeof(struct pscode)))==NULL) - Fatal("cannot allocate space for PostScript header struct"); - } else { - /* No duplicates. This still misses pre=..., because we still - change that. To be fixed */ - tmp=psheaderp; - if (strcmp(tmp->special,special)==0) - return; - while(tmp->next!=NULL) { - tmp=tmp->next; - if (strcmp(tmp->special,special)==0) - return; - } - if ((tmp->next=malloc(sizeof(struct pscode)))==NULL) - Fatal("cannot allocate space for PostScript header struct"); - tmp=tmp->next; - } - DEBUG_PRINT(DEBUG_GS,("\n PS HEADER ")); - if ((txt=malloc(strlen(special)+1))==NULL) - Fatal("cannot malloc space for PostScript header"); - strcpy(txt,special); - PSCodeInit(tmp,txt); -} - -/*********************************************************************/ -/**************************** SetSpecial ***************************/ -/*********************************************************************/ - -void SetSpecial(char * special, int32_t hh, int32_t vv) -/* interpret a \special command, made up of keyword=value pairs, - * or !header or ps:literal_PostScript - */ -{ - DEBUG_PRINT(DEBUG_DVI,(" '%s'",special)); - SKIPSPACES(special); - /********************** Color specials ***********************/ - if (strncmp(special,"background ",11)==0) { - background(special+11); - return; - } - if (strncmp(special,"color ",6)==0) { - special+=6; - SKIPSPACES(special); - if (strncmp(special,"push ",5)==0) { - pushcolor(special+5); - } else { - if (strcmp(special,"pop")==0) - popcolor(); - else - resetcolorstack(special); - } - return; - } - - /******************* Image inclusion ********************/ - - /* Needed tests for regression: PNG, GIF, JPEG and EPS inclusion, - * for different gd versions */ - - if (strncmp(special,"PSfile=",7)==0) { /* PSfile */ - char* psname = special+7; - int llx=0,lly=0,urx=0,ury=0,rwi=0,rhi=0; - bool clip=false; - int hresolution,vresolution; - int pngheight,pngwidth; - - /* Remove quotation marks around filename. If no quotation marks, - use first word as filename */ - if (*psname=='"') { - psname++; - special=strrchr(psname,'"'); - } else { - special=strchr(psname,' '); - } - if (special!=NULL) { - *special='\0'; - special++; - } - - /* Retrieve parameters */ - SKIPSPACES(special); - while(special && *special) { - if (strncmp(special,"llx=",4)==0) - llx = strtol(special+4,&special,10); - else if (strncmp(special,"lly=",4)==0) - lly = strtol(special+4,&special,10); - else if (strncmp(special,"urx=",4)==0) - urx = strtol(special+4,&special,10); - else if (strncmp(special,"ury=",4)==0) - ury = strtol(special+4,&special,10); - else if (strncmp(special,"rwi=",4)==0) - rwi = strtol(special+4,&special,10); - else if (strncmp(special,"rhi=",4)==0) - rhi = strtol(special+4,&special,10); - else if (strncmp(special,"clip",4)==0) - {clip = true; special=special+4;} - while (*special && *special!=' ') special++; - SKIPSPACES(special); - } - - /* Calculate resolution, and use our base resolution as a fallback. */ - /* The factor 10 is magic, the dvips graphicx driver needs this. */ - hresolution = ((dpi*rwi+urx-llx-1)/(urx - llx)+9)/10; - vresolution = ((dpi*rhi+ury-lly-1)/(ury - lly)+9)/10; - if (vresolution==0) vresolution = hresolution; - if (hresolution==0) hresolution = vresolution; - if (hresolution==0) hresolution = vresolution = dpi; - - /* Convert from postscript 72 dpi resolution to our given resolution */ - pngwidth = (dpi*rwi+719)/720; /* +719: round up */ - pngheight = (dpi*rhi+719)/720; - if (pngwidth==0) - pngwidth = ((dpi*rhi*(urx-llx)+ury-lly-1)/(ury-lly)+719)/720; - if (pngheight==0) - pngheight = ((dpi*rwi*(ury-lly)+urx-llx-1)/(urx-llx)+719)/720; - if (pngheight==0) { - pngwidth = (dpi*(urx-llx)+71)/72; - pngheight = (dpi*(ury-lly)+71)/72; - } - if (page_imagep != NULL) { /* Draw into image */ - struct pscode image; - gdImagePtr psimage=NULL; -#ifndef HAVE_GDIMAGECREATEFROMPNGPTR - FILE* psstream; -#endif - - PSCodeInit(&image, NULL); - TEMPSTR(image.filename,kpse_find_file(psname,kpse_pict_format,0)); - if (MmapFile(image.filename,&(image.fmmap)) || image.fmmap.size==0) { - Warning("Image file %s unusable, image will be left blank", - image.filename); - page_flags |= PAGE_GAVE_WARN; - return; - } - Message(BE_NONQUIET," <%s",psname); - switch ((unsigned char)*image.fmmap.data) { - case 0x89: /* PNG magic: "\211PNG\r\n\032\n" */ - DEBUG_PRINT(DEBUG_DVI,("\n INCLUDE PNG \t%s",image.filename)); -#ifdef HAVE_GDIMAGECREATEFROMPNGPTR - psimage=gdImageCreateFromPngPtr(image.fmmap.size,image.fmmap.data); -#else - psstream=fopen(image.filename,"rb"); - psimage=gdImageCreateFromPng(psstream); - fclose(psstream); -#endif - psimage=rescale(psimage,pngwidth,pngheight); - break; - case 'G': /* GIF magic: "GIF87" or "GIF89" */ - DEBUG_PRINT(DEBUG_DVI,("\n INCLUDE GIF \t%s",image.filename)); -#ifdef HAVE_GDIMAGEGIF - psimage=rescale(gdImageCreateFromGifPtr(image.fmmap.size, - image.fmmap.data), - pngwidth,pngheight); -#else - DEBUG_PRINT(DEBUG_DVI,(" (NO GIF DECODER)")); -#endif - break; - case 0xff: /* JPEG magic: 0xffd8 */ - DEBUG_PRINT(DEBUG_DVI,("\n INCLUDE JPEG \t%s",image.filename)); -#ifdef HAVE_GDIMAGECREATEFROMJPEG -#ifdef HAVE_GDIMAGECREATEFROMPNGPTR - psimage=gdImageCreateFromJpegPtr(image.fmmap.size,image.fmmap.data); -#else - psstream=fopen(image.filename,"rb"); - psimage=gdImageCreateFromJpeg(psstream); - fclose(psstream); -#endif - psimage=rescale(psimage,pngwidth,pngheight); -#else - DEBUG_PRINT(DEBUG_DVI,(" (NO JPEG DECODER)")); -#endif - break; - default: /* Default, PostScript magic: "%!PS-Adobe" */ - if (option_flags & NO_GHOSTSCRIPT) { - Warning("GhostScript calls disallowed by --noghostscript" ); - page_flags |= PAGE_GAVE_WARN; - } else { - /* Use alpha blending, and render transparent postscript - images. The alpha blending works correctly only from - libgd 2.0.12 upwards */ -#ifdef HAVE_GDIMAGEPNGEX - if (page_imagep->trueColor) { - int tllx=llx,tlly=lly,turx=urx,tury=ury; - - DEBUG_PRINT((DEBUG_DVI | DEBUG_GS), - ("\n GS RENDER \t%s -> pngalpha ",image.filename)); - if (!clip) { - /* Render across the whole image */ - tllx=llx-(hh+1)*72/hresolution; - tlly=lly-(gdImageSY(page_imagep)-vv-1)*72/vresolution; - turx=llx+(gdImageSX(page_imagep)-hh)*72/hresolution; - tury=lly+(vv+1)*72/vresolution; - DEBUG_PRINT((DEBUG_DVI | DEBUG_GS), - ("\n EXPAND BBOX \t%d %d %d %d -> %d %d %d %d", - llx,lly,urx,ury,tllx,tlly,turx,tury)); -#ifdef DEBUG - } else { - DEBUG_PRINT((DEBUG_DVI | DEBUG_GS),(", CLIPPED TO BBOX")); -#endif - } - psimage = ps2png(&image, "-sDEVICE=pngalpha", - hresolution, vresolution, - tllx, tlly, turx, tury, - 255,255,255); - if (psimage==NULL) - Warning("No GhostScript pngalpha output, opaque image inclusion"); - } else - Warning("Palette output, opaque image inclusion"); -#endif - if (psimage==NULL) { - /* png256 gives inferior result */ - DEBUG_PRINT((DEBUG_DVI | DEBUG_GS), - ("\n GS RENDER \t%s -> png16m", image.filename)); - psimage = ps2png(&image, "-sDEVICE=png16m", - hresolution, vresolution, - llx, lly, urx, ury, - cstack[0].red,cstack[0].green,cstack[0].blue); - clip=true; - page_flags |= PAGE_GAVE_WARN; - } - if (!clip) { - /* Rendering across the whole image */ - hh=0; - vv=gdImageSY(psimage)-1; - } - } - } - UnMmapFile(&(image.fmmap)); - if (psimage!=NULL) { - DEBUG_PRINT(DEBUG_DVI, - ("\n GRAPHIC(X|S) INCLUDE \t%s (%d,%d) res %dx%d at (%d,%d)", - psname,gdImageSX(psimage),gdImageSY(psimage), - hresolution,vresolution,hh,vv)); -#ifdef HAVE_GDIMAGECREATETRUECOLOR - if (psimage->trueColor && !page_imagep->trueColor) - gdImageTrueColorToPalette(psimage,0,256); -#endif -#ifdef HAVE_GDIMAGEPNGEX - gdImageAlphaBlending(page_imagep,1); -#else - Warning("Using libgd < 2.0.12, opaque image inclusion"); - page_flags |= PAGE_GAVE_WARN; -#endif - gdImageCopy(page_imagep, psimage, - hh, vv-gdImageSY(psimage)+1, - 0,0, - gdImageSX(psimage),gdImageSY(psimage)); -#ifdef HAVE_GDIMAGEPNGEX - gdImageAlphaBlending(page_imagep,0); -#endif - gdImageDestroy(psimage); - } else { - Warning("Unable to load %s, image will be left blank",image.filename); - page_flags |= PAGE_GAVE_WARN; - } - Message(BE_NONQUIET,">"); - } else { /* Don't draw */ - page_flags |= PAGE_TRUECOLOR; - DEBUG_PRINT(DEBUG_DVI, - ("\n GRAPHIC(X|S) INCLUDE \t%s (%d,%d) res %dx%d at (%d,%d)", - psname,pngheight,pngwidth, - hresolution,vresolution,hh,vv)); - min(x_min,hh); - min(y_min,vv-pngheight+1); - max(x_max,hh+pngwidth); - max(y_max,vv+1); - } - return; - } - - /******************* Raw PostScript ********************/ - - if (strncmp(special,"!/preview@version(",18)==0) { - int length=0; - special+=18; - while (special[length]!='\0' && special[length]!=')') - length++; - if (page_imagep==NULL) - Message(BE_NONQUIET," (preview-latex version %.*s)",length,special); - return; - } - - /* preview-latex' tightpage option */ - if (strncmp(special,"!/preview@tightpage",19)==0) { - special+=19; - SKIPSPACES(special); - if (strncmp(special,"true",4)==0) { - if (page_imagep==NULL) - Message(BE_NONQUIET," (preview-latex tightpage option detected, will use its bounding box)"); - dvi->flags |= DVI_PREVIEW_LATEX_TIGHTPAGE; - } - return; - } - if (strncmp(special,"!userdict",9)==0 - && strstr(special+10,"7{currentfile token not{stop}if 65781.76 div")!=NULL) { - if (page_imagep==NULL && ~dvi->flags & DVI_PREVIEW_LATEX_TIGHTPAGE) - Message(BE_NONQUIET," (preview-latex <= 0.9.1 tightpage option detected, will use its bounding box)"); - dvi->flags |= DVI_PREVIEW_LATEX_TIGHTPAGE; - return; - } - - /* preview-latex' dvips bop-hook redefinition */ - if (strncmp(special,"!userdict",9)==0 - && strstr(special+10,"preview-bop-")!=NULL) { - dvi->flags |= DVI_PREVIEW_BOP_HOOK; - if (page_imagep==NULL) - Message(BE_VERBOSE," (preview-latex beginning-of-page-hook detected)"); - return; - } - - if (dvi->flags & DVI_PREVIEW_BOP_HOOK && ~page_flags & PAGE_PREVIEW_BOP - && strncmp(special,"ps::",4)==0) { - dviunits adj_llx,adj_lly,adj_urx,adj_ury,ht,dp,wd; - page_flags |= PAGE_PREVIEW_BOP; - /* Hokay, decode bounding box */ - adj_llx = strtol(special+4,&special,10); - adj_lly = strtol(special,&special,10); - adj_urx = strtol(special,&special,10); - adj_ury = strtol(special,&special,10); - ht = strtol(special,&special,10); - dp = strtol(special,&special,10); - wd = strtol(special,&special,10); - if (wd>0) { - x_offset_tightpage = - (-adj_llx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; - x_width_tightpage = x_offset_tightpage - +(wd+adj_urx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; - } else { - x_offset_tightpage = - (-wd+adj_urx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; - x_width_tightpage = x_offset_tightpage - +(-adj_llx+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; - } - /* y-offset = height - 1 */ - y_offset_tightpage = - (((ht>0)?ht:0)+adj_ury+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor-1; - y_width_tightpage = y_offset_tightpage+1 - +(((dp>0)?dp:0)-adj_lly+dvi->conv*shrinkfactor-1)/dvi->conv/shrinkfactor; - return; - } - - if (special[0]=='"' || strncmp(special,"ps:",3)==0) { /* Literal PostScript */ - if (page_imagep != NULL) { /* Draw into image */ - static struct pscode *pscodep=NULL; - static bool psenvironment=false; - bool nextisps; - struct pscode *tmp; - gdImagePtr psimage=NULL; - char *txt; - - /* Some packages split their literal PostScript code into - several specials. Check for those, and concatenate them so - that they're given to one and the same invocation of gs */ - if (pscodep==NULL) { - Message(BE_NONQUIET," next != NULL) - tmp=tmp->next; - if ((tmp->next=malloc(sizeof(struct pscode)))==NULL) - Fatal("cannot allocate space for raw PostScript struct"); - tmp=tmp->next; - } - if (strncmp(special,"ps::[begin]",11)==0) - psenvironment=true; - else if (strncmp(special,"ps::[end]",9)==0) - psenvironment=false; - else if (strcmp(special,"ps:: pgfo")==0) - /* PostScript code to start page for pgf PostScript - specials. The first numbers are generally valid for the bop - instruction, and the latter code is to move the origin to - the right place. */ - special="ps:: 39139632 55387786 1000 600 600 (tikzdefault.dvi) @start 1 0 bop pgfo 0 0 matrix defaultmatrix transform itransform translate"; - else if (strcmp(special,"ps:: pgfc")==0) - special="ps:: pgfc eop end"; - nextisps=DVIIsNextPSSpecial(dvi); - if (psenvironment || nextisps) { - if (!nextisps) { - Warning("PostScript environment contains DVI commands"); - page_flags |= PAGE_GAVE_WARN; - } - /* Don't use alloca, we do not want to run out of stack space */ - DEBUG_PRINT(DEBUG_GS,("\n PS SPECIAL ")); - txt=malloc(strlen(special)+1); - strcpy(txt,special); - PSCodeInit(tmp,txt); - return; - } - DEBUG_PRINT(DEBUG_DVI,("\n LAST PS SPECIAL ")); - PSCodeInit(tmp,special); - /* Now, render image */ - if (option_flags & NO_GHOSTSCRIPT) - Warning("GhostScript calls disallowed by --noghostscript" ); - else { - /* Use alpha blending, and render transparent postscript - images. The alpha blending works correctly only from - libgd 2.0.12 upwards */ -#ifdef HAVE_GDIMAGEPNGEX - if (page_imagep->trueColor) { - /* Render across the whole image */ - psimage = ps2png(pscodep, "-sDEVICE=pngalpha", - dpi,dpi, - -(hh+1)*72/dpi, - -(gdImageSY(page_imagep)-vv-1)*72/dpi, - (gdImageSX(page_imagep)-hh)*72/dpi, - (vv+1)*72/dpi, - 255,255,255); - if (psimage!=NULL) { - gdImageAlphaBlending(page_imagep,1); - gdImageCopy(page_imagep, psimage, - 0,0,0,0, - gdImageSX(psimage),gdImageSY(psimage)); - gdImageAlphaBlending(page_imagep,0); - gdImageDestroy(psimage); - } else - Warning("No GhostScript pngalpha output, cannot render raw PostScript"); - } else - Warning("Palette output, cannot include raw PostScript"); -#else - Warning("Using libgd < 2.0.12, unable to include raw PostScript"); -#endif - } - while(pscodep->next != NULL) { - tmp=pscodep->next; - free(pscodep->special); - free(pscodep); - pscodep=tmp; - } - free(pscodep); - pscodep=NULL; - if (psimage==NULL) - page_flags |= PAGE_GAVE_WARN; - Message(BE_NONQUIET,">"); - } else { /* Don't draw */ - page_flags |= PAGE_TRUECOLOR; - } - return; - } - - if (strncmp(special,"papersize=",10)==0) { /* papersize spec, ignored */ - return; - } - - if (special[0]=='!' || strncmp(special,"header=",7)==0) { /* PS header */ - newpsheader(special); - return; - } - - if (strncmp(special,"src:",4)==0) { /* source special */ - if ( page_imagep != NULL ) - Message(BE_NONQUIET," at (%ld,%ld) source \\special{%s}", - hh, vv, special); - return; - } - if ( page_imagep != NULL ) { - Warning("at (%ld,%ld) unimplemented \\special{%s}", - hh, vv, special); - page_flags |= PAGE_GAVE_WARN; - } -} - diff --git a/Build/source/texk/dvipng/t1.c b/Build/source/texk/dvipng/t1.c deleted file mode 100644 index 84a15a5bf67..00000000000 --- a/Build/source/texk/dvipng/t1.c +++ /dev/null @@ -1,193 +0,0 @@ -/* t1.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" -#ifdef HAVE_ALLOCA_H -# include -#endif - -void LoadT1(int32_t c, struct char_entry * ptr) -{ - GLYPH *glyph; - int original_width,original_height; - int i,j,k,width,height; - unsigned short shrunk_width,shrunk_height; - short xoffset,yoffset; - unsigned short i_offset,j_offset; - - DEBUG_PRINT(DEBUG_T1,("\n LOAD T1 CHAR\t%d",c)); - if ((glyph= - T1_SetChar(currentfont->T1id, c, - (float)currentfont->dpi*currentfont->d/65536/72.27, - currentfont->psfontmap==NULL ? NULL : currentfont->psfontmap->t1_transformp)) - ==NULL) - Fatal("cannot load T1 char %d",c); - - DEBUG_PRINT(DEBUG_T1,(" (%d)",ptr->tfmw)); - - original_width = glyph->metrics.rightSideBearing - - glyph->metrics.leftSideBearing; - original_height = glyph->metrics.ascent - glyph->metrics.descent; - DEBUG_PRINT(DEBUG_T1,(" %dx%d",original_width,original_height)); - - if (original_width > 0x7fff || original_height > 0x7fff) - Fatal("character %d too large in file %s", c, currentfont->name); - - /* - * Hotspot issues: Shrinking to the topleft corner rather than the - hotspot will displace glyphs a fraction of a pixel. We deal with - this in as follows: The glyph is shrunk to its hotspot by - offsetting the bitmap somewhat to put the hotspot in the lower - left corner of a "shrink square". Shrinking to the topleft corner - will then act as shrinking to the hotspot. This may enlarge the - bitmap somewhat, of course. (Also remember that the below - calculation of i/j_offset is in integer arithmetics.) - - There will still be a displacement from rounding the dvi - position, but vertically it will be equal for all glyphs on a - line, so we displace a whole line vertically by fractions of a - pixel. This is acceptible, IMHO. Sometime there will be support - for subpixel positioning, horizontally. Will do for now, I - suppose. - */ - xoffset = -glyph->metrics.leftSideBearing; - /* printf("xoffset: %d\n",xoffset); */ - i_offset = ( shrinkfactor - xoffset % shrinkfactor ) % shrinkfactor; - width = original_width+i_offset; - ptr->xOffset = xoffset+i_offset; - - yoffset = glyph->metrics.ascent-1; - /* printf("yoffset: %d\n",yoffset); */ - j_offset = ( shrinkfactor - (yoffset-(shrinkfactor-1)) % shrinkfactor ) - % shrinkfactor; - height = original_height+j_offset; - ptr->yOffset = yoffset+j_offset; - - DEBUG_PRINT(DEBUG_T1,(" (%dx%d)",width,height)); - /* - Extra marginal so that we do not crop the image when shrinking. - */ - shrunk_width = (width + shrinkfactor - 1) / shrinkfactor; - shrunk_height = (height + shrinkfactor - 1) / shrinkfactor; - ptr->w = shrunk_width; - ptr->h = shrunk_height; - - /* printf("(%d,%d) ",ptr->w,ptr->h); */ - DEBUG_PRINT(DEBUG_GLYPH,("\nDRAW GLYPH %d\n", (int)c)); - - /* - Shrink raster while doing antialiasing. - */ - if ((ptr->data = calloc(shrunk_width*shrunk_height,sizeof(char))) == NULL) - Fatal("unable to allocate image space for char %c", (char)c); - for (j = 0; j < original_height; j++) { - for (i = 0; i < (original_width+7)/8 ; i++) { - for (k = 0; k < 8 ; k++) { - DEBUG_PRINT(DEBUG_GLYPH, - ("%c", - (glyph->bits[i+j*((original_width+7)/8)] & (1<data[(i*8+k+i_offset)/shrinkfactor - +(j+j_offset)/shrinkfactor*shrunk_width] += - (glyph->bits[i+j*((original_width+7)/8)] & (1<data[i+j*shrunk_width] = ptr->data[i+j*shrunk_width] - *255/shrinkfactor/shrinkfactor; - DEBUG_PRINT(DEBUG_GLYPH,("%3u ",ptr->data[i+j*shrunk_width])); - } - DEBUG_PRINT(DEBUG_GLYPH,("|\n")); - } -} - -bool InitT1(struct font_entry * tfontp) -{ - if (libt1==NULL) { - if ((libt1=T1_InitLib( NO_LOGFILE | IGNORE_CONFIGFILE - | IGNORE_FONTDATABASE | T1_NO_AFM)) == NULL) { - Warning("an error occured during t1lib initialisation, disabling it"); - option_flags &= ~USE_LIBT1; - return(false); - } -# ifdef DEBUG - else - DEBUG_PRINT(DEBUG_T1,("\n T1LIB VERSION: %s", T1_GetLibIdent())); -# endif - } - - DEBUG_PRINT((DEBUG_DVI|DEBUG_T1),("\n OPEN T1 FONT:\t'%s'", tfontp->name)); - tfontp->T1id = T1_AddFont( tfontp->name ); - if (tfontp->T1id < 0) { - Warning("t1lib could not open font file %s", tfontp->name); - return(false); - } - if (T1_LoadFont(tfontp->T1id)) { - Warning("t1lib could not load font file %s", tfontp->name); - return(false); - } - Message(BE_VERBOSE,"<%s>", tfontp->name); - if (tfontp->psfontmap!=NULL && tfontp->psfontmap->encoding != NULL) { - DEBUG_PRINT(DEBUG_T1,("\n USE ENCODING:\t'%s'", tfontp->psfontmap->encoding->name)); - if (T1_ReencodeFont(tfontp->T1id,tfontp->psfontmap->encoding->charname)) { - Warning("unable to use font encoding '%s' for %s", - tfontp->psfontmap->encoding->name,tfontp->name); - return(false); - } - } - tfontp->type = FONT_TYPE_T1; - return(true); -} - - -static void UnLoadT1(struct char_entry *ptr) -{ - if (ptr->data!=NULL) - free(ptr->data); - ptr->data=NULL; -} - - -void DoneT1(struct font_entry *tfontp) -{ - int c=0; - - int error = T1_DeleteFont( tfontp->T1id ); - if (error) - Warning("font file %s could not be closed", tfontp->name); - while(cchr[c]!=NULL) { - UnLoadT1((struct char_entry*)tfontp->chr[c]); - free(tfontp->chr[c]); - tfontp->chr[c]=NULL; - } - c++; - } - tfontp->name[0]='\0'; -} - - diff --git a/Build/source/texk/dvipng/test_dvipng.tex b/Build/source/texk/dvipng/test_dvipng.tex deleted file mode 100644 index c62e054e53b..00000000000 --- a/Build/source/texk/dvipng/test_dvipng.tex +++ /dev/null @@ -1,49 +0,0 @@ -% test_dvipng.tex -% -% Part of the dvipng distribution -% -% This program is free software: you can redistribute it and/or modify -% it under the terms of the GNU Lesser General Public License as -% published by the Free Software Foundation, either version 3 of the -% License, or (at your option) any later version. -% -% This program is distributed in the hope that it will be useful, but -% WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -% Lesser General Public License for more details. -% -% You should have received a copy of the GNU Lesser General Public -% License along with this program. If not, see -% . -% -% Copyright (C) 2002-2008 Jan-{\AA}ke Larsson - -\documentclass{article} -\usepackage{mathptmx} -%\usepackage[active,textmath]{preview} -\usepackage{color} -\pagestyle{empty} - -\begin{document} -\begin{equation} - \int dx -\end{equation} -\newpage -$\int dx$ -\newpage -$\sqrt2+1=\frac1{\sqrt2-1}$ -\newpage -\framebox{\textbackslash\ttfamily framebox} -\newpage -\( \begin{array}{|r|} \hline a \cr \hline \end{array} \) -\newpage -fig, pig, flask, efficiency, effluent -\newpage -\Huge A \LARGE A \Large A \large A \normalsize A \small A -\footnotesize A \scriptsize A \tiny A -\newpage -\color{yellow} - -\section*{Hello world} -\pagecolor{blue} -\end{document} diff --git a/Build/source/texk/dvipng/tfm.c b/Build/source/texk/dvipng/tfm.c deleted file mode 100644 index 81b89d0f7d1..00000000000 --- a/Build/source/texk/dvipng/tfm.c +++ /dev/null @@ -1,79 +0,0 @@ -/* tfm.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" -#ifdef HAVE_ALLOCA_H -# include -#endif - -bool ReadTFM(struct font_entry * tfontp, char* tfmname) -{ - struct filemmap fmmap; - struct char_entry *tcharptr; - unsigned char *position; - int lh,bc,ec,nw, c; - dviunits* width; - - DEBUG_PRINT((DEBUG_DVI|DEBUG_FT|DEBUG_TFM), - ("\n OPEN METRICS:\t'%s'", tfmname)); - if (MmapFile(tfmname,&fmmap)) return(false); - position=(unsigned char*)fmmap.data; - lh = UNumRead(position+2,2); - bc = UNumRead(position+4,2); - ec = UNumRead(position+6,2); - nw = UNumRead(position+8,2); - DEBUG_PRINT(DEBUG_TFM,(" %d %d %d %d",lh,bc,ec,nw)); - width=alloca(nw*sizeof(dviunits)); - c=0; - position=position+24+(lh+ec-bc+1)*4; - while( c < nw ) { - width[c] = SNumRead(position,4); - c++; - position += 4; - } - - /* Read char widths */ - c=bc; - position=(unsigned char*)fmmap.data+24+lh*4; - while(c <= ec) { - DEBUG_PRINT(DEBUG_TFM,("\n@%ld TFM METRICS:\t", - (long)position - (long)fmmap.data)); - tcharptr=xmalloc(sizeof(struct char_entry)); - tcharptr->data=NULL; - tcharptr->tfmw=width[*position]; - DEBUG_PRINT(DEBUG_TFM,("%d [%d] %d",c,*position,tcharptr->tfmw)); - tcharptr->tfmw = (dviunits) - ((int64_t) tcharptr->tfmw * tfontp->s / (1 << 20)); - DEBUG_PRINT(DEBUG_TFM,(" (%d)",tcharptr->tfmw)); - if (c >= NFNTCHARS) /* Only positive for now */ - Fatal("tfm file %s exceeds char numbering limit",tfmname); - tfontp->chr[c] = tcharptr; - c++; - position += 4; - } - UnMmapFile(&fmmap); - return(true); -} - - diff --git a/Build/source/texk/dvipng/vf.c b/Build/source/texk/dvipng/vf.c deleted file mode 100644 index c46a3b08daa..00000000000 --- a/Build/source/texk/dvipng/vf.c +++ /dev/null @@ -1,143 +0,0 @@ -/* vf.c */ - -/************************************************************************ - - Part of the dvipng distribution - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this program. If not, see - . - - Copyright (C) 2002-2008 Jan-Åke Larsson - -************************************************************************/ - -#include "dvipng.h" - -#define VF_ID 202 -#define LONG_CHAR 242 - -int32_t SetVF(int32_t c) -{ - struct font_entry* currentvf; - unsigned char *command,*end; - struct char_entry* ptr=currentfont->chr[c]; - - currentvf=currentfont; - BeginVFMacro(currentvf); - command = ptr->data; - end = command + ptr->length; - while (command < end) { - DEBUG_PRINT(DEBUG_DVI,("\n VF MACRO:\t%s ", dvi_commands[*command])); - DrawCommand(command,currentvf); - command += CommandLength(command); - } - EndVFMacro(); - currentfont=currentvf; - return(ptr->tfmw); -} - - - -void InitVF(struct font_entry * tfontp) -{ - unsigned char* position; - int length; - struct char_entry *tcharptr; - uint32_t c=0; - struct font_num *tfontnump; /* temporary font_num pointer */ - - DEBUG_PRINT((DEBUG_DVI|DEBUG_VF),("\n OPEN FONT:\t'%s'", tfontp->name)); - Message(BE_VERBOSE,"<%s>", tfontp->name); - if (MmapFile(tfontp->name,&(tfontp->fmmap))) - Fatal("font file %s unusable", tfontp->name); - position=(unsigned char*)tfontp->fmmap.data; - if (*(position) != PRE) - Fatal("unknown font format in file %s",tfontp->name); - if (*(position+1) != VF_ID) - Fatal( "wrong version %d of vf file %s (should be 202)", - (int)*(position+1),tfontp->name); - DEBUG_PRINT(DEBUG_VF,("\n VF_PRE:\t'%.*s'", - (int)*(position+2), position+3)); - position = position+3 + *(position+2); - c=UNumRead(position, 4); - DEBUG_PRINT(DEBUG_VF,(" %d", c)); - CheckChecksum (tfontp->c, c, tfontp->name); - tfontp->designsize = UNumRead(position+4,4); - DEBUG_PRINT(DEBUG_VF,(" %d", tfontp->designsize)); - tfontp->type = FONT_TYPE_VF; - tfontp->vffontnump=NULL; - /* Read font definitions */ - position += 8; - while(*position >= FNT_DEF1 && *position <= FNT_DEF4) { - DEBUG_PRINT(DEBUG_VF,("\n @%ld VF:\t%s", - (long)position - (long)tfontp->fmmap.data, - dvi_commands[*position])); - FontDef(position,tfontp); - length = dvi_commandlength[*position]; - position += length + *(position + length-1) + *(position+length-2); - } - /* Default font is the first defined */ - tfontnump = tfontp->vffontnump; - while (tfontnump->next != NULL) { - tfontnump = tfontnump->next; - } - tfontp->defaultfont=tfontnump->k; - - /* Read char definitions */ - while(*position < FNT_DEF1) { - DEBUG_PRINT(DEBUG_VF,("\n@%ld VF CHAR:\t", - (long)position - (long)tfontp->fmmap.data)); - tcharptr=xmalloc(sizeof(struct char_entry)); - switch (*position) { - case LONG_CHAR: - tcharptr->length = UNumRead(position+1,4); - c = UNumRead(position+5,4); - tcharptr->tfmw = UNumRead(position+9,4); - position += 13; - break; - default: - tcharptr->length = UNumRead(position,1); - c = UNumRead(position+1,1); - tcharptr->tfmw = UNumRead(position+2,3); - position += 5; - } - DEBUG_PRINT(DEBUG_VF,("%d %d %d",tcharptr->length,c,tcharptr->tfmw)); - tcharptr->tfmw = (int32_t) - ((int64_t) tcharptr->tfmw * tfontp->s / (1 << 20)); - DEBUG_PRINT(DEBUG_VF,(" (%d)",tcharptr->tfmw)); - if (c >= NFNTCHARS) /* Only positive for now */ - Fatal("VF font %s exceeds char numbering limit",tfontp->name); - tfontp->chr[c] = tcharptr; - tcharptr->data=position; - position += tcharptr->length; - } -} - - -void DoneVF(struct font_entry *tfontp) -{ - int c=FIRSTFNTCHAR; - - UnMmapFile(&(tfontp->fmmap)); - while(c<=LASTFNTCHAR) { - if (tfontp->chr[c]!=NULL) { - free(tfontp->chr[c]); - tfontp->chr[c]=NULL; - } - c++; - } - FreeFontNumP(tfontp->vffontnump); - tfontp->vffontnump=NULL; - tfontp->name[0]='\0'; -} -- cgit v1.2.3