diff -ruNp m4-1.4.9/COPYING m4-1.4.10/COPYING --- m4-1.4.9/COPYING 2007-03-23 06:54:13.000000000 -0600 +++ m4-1.4.10/COPYING 2007-07-09 21:15:36.000000000 -0600 @@ -1,285 +1,626 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + 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 + Preamble - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to + 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 -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. +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 give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. +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. - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + 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. - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to + "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. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or + 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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. +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. - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will + 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 a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. + 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 + END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Programs + 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 @@ -287,15 +628,15 @@ free software which everyone can redistr To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least +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 + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + 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, @@ -303,37 +644,31 @@ the "copyright" line and a pointer to wh MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + 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 is interactive, make it output a short notice like this -when it starts in an interactive mode: + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + 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, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. +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 -ruNp m4-1.4.9/ChangeLog m4-1.4.10/ChangeLog --- m4-1.4.9/ChangeLog 2007-03-23 14:33:12.000000000 -0600 +++ m4-1.4.10/ChangeLog 2007-07-09 21:50:13.000000000 -0600 @@ -1,3 +1,180 @@ +2007-07-09 Eric Blake + + Release 1.4.10: + * doc/Makefile.am (m4_TEXINFOS): Distribute gpl-3.0.texi. + * Makefile.am (EXTRA_DIST): Distribute gnulib diffs. + * configure.ac (AC_INIT): Bump version number. + * NEWS: Describe changes since 1.4.9. + + * src/format.c: Missed a GPLv3 conversion. + + Avoid undefined behavior of %.*c in printf. + * src/format.c (format): Special case %c. + * TODO: Document that more remains to be done. + * NEWS: Document the fix. + +2007-07-05 Eric Blake + + Fix up gnulib-tool usage. + * m4/gnulib-cache.m4: Change local-dir to local, not `.'. + * version-etc.c.diff: Move to... + * local/lib/version-etc.c.diff: ...here. + * gpl-3.0.texi.diff: Move to... + * local/doc/gpl-3.0.texi.diff: ...here. + +2007-07-04 Eric Blake + + Upgrade to GPL version 3 or later. + * bootstrap: Pick up GPLv3. + * m4/gnulib-cache.m4: Augment with 'gnulib-tool + --local-dir=. --import gpl-3.0'. + * doc/m4.texinfo (Copying This Package): New appendix. + * NEWS: Mention this change. + * README: Mention why some files still claim to be version 2. + * version-etc.c.diff: New file, to make sure --version claims + correct GPL version. Temporary until gnulib makes move. + * gpl-3.0.texi.diff: New file, to allow inclusion of GPLv3 as + appendix, rather than section, of the manual. + * GNUmakefile: Update to new license. + * Makefile.am: Likewise. + * Makefile.maint: Likewise. + * commit: Likewise. + * configure.ac: Likewise. + * checks/Makefile.in: Likewise. + * doc/Makefile.am: Likewise. + * examples/Makefile.am: Likewise. + * src/Makefile.am: Likewise. + * src/builtin.c: Likewise. + * src/debug.c: Likewise. + * src/eval.c: Likewise. + * src/freeze.c: Likewise. + * src/input.c: Likewise. + * src/m4.c: Likewise. + * src/m4.h: Likewise. + * src/macro.c: Likewise. + * src/output.c: Likewise. + * src/path.c: Likewise. + * src/stackovf.c: Likewise. + * src/symtab.c: Likewise. + +2007-06-26 Eric Blake + + * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import assert'. + +2007-06-26 Karl Berry (tiny change) + + Match Free Software Directory categories. + * doc/m4.texinfo (dircategory): Update. + +2007-05-31 Eric Blake + + * src/output.c (output_text): Fix regression from 2007-05-28. + * doc/m4.texinfo (History): Mention 1.4.10. + (Format): Make testsuite output easier to debug. + +2007-05-29 Eric Blake + + Start 1.4.9c. + * configure.ac (AC_INIT): Bump version number. + * NEWS: Start changes since 1.4.9b, and fix typo. + + Beta Release 1.4.9b: + * configure.ac (AC_INIT): Bump version number. + * NEWS: Describe changes since 1.4.9. + + Improve format support. + * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import + vasprintf-posix'. + * src/format.c (format): Parse %'hhd, %a, %A. Avoid calling + printf with too few arguments, as in format(%*.*d,-1,-1,1). + * doc/m4.texinfo (Format): Expand tests, and improve + documentation. + * NEWS: Document this change. + +2007-05-28 Eric Blake + + Fix large diversion corner cases, including 1.4.8 regression. + * src/output.c (m4_tmpfile, m4_tmpopen): Simplify use of errno. + (make_room_for): Use NULL, not 0, for pointers. + (insert_diversion_helper): Avoid using rewind. + (freeze_diversions): Allow freezing large diversions. + * NEWS: Document this fix. + + Also run gnulib unit tests during make check. + * m4/gnulib-cache.m4: Augment with 'gnulib-tool + --tests-base=tests --with-tests'. + * configure.ac (AC_CONFIG_FILES): Build gnulib testdir. + * Makefile.am (SUBDIRS): Run gnulib tests before ours. + +2007-05-25 Eric Blake + + Backport prompts in examples from head. + * src/macro.c (expand_macro): Shorten message. + * doc/m4.texinfo (Manual, Command line files, Comments) + (Inhibiting Invocation, Macro Arguments, Macro expansion, Indir) + (Builtin, Shift, Forloop, Foreach, Dumpdef, Trace, Debug Levels) + (Debug Output, Include, Format, Syscmd, Mkstemp, Location) + (Using frozen files, Improved forloop, Improved foreach): Add + prompts to examples. + * checks/get-them: Ignore prompts in examples. + + Fix sync line interaction with multiline comments. + * doc/m4.texinfo (Other Incompatibilities): Add example, and + document bug in --syncline/divert interaction. + (Preprocessor features): Augment test. + * src/m4.h (output_text): Export. + (shipout_text, next_token): Add parameter. + * src/freeze.c (reload_frozen_state): Don't interfere with + synclines when reloading state. + * src/output.c (output_text): Export. + (shipout_text): Take new parameter for start line of token. + Output at most one syncline per token. + * src/input.c (next_token): Report line where multiline tokens + start. + * src/macro.c (expand_input, expand_token, expand_argument): + Adjust callers so that line is passed from input to output. + * NEWS: Document this fix. + Reported by Sergey Poznyakoff. + + Test -s in testsuite. + * doc/m4.texinfo (Preprocessor features): Add a test. + * checks/get-them: Support extra options in testsuite. + * checks/check-them (examples): Use extra options. + * THANKS: Update. + Reported by Sergey Poznyakoff. + +2007-05-24 Eric Blake + + Support POSIX flush semantics on all platforms. + * m4/gnulib-cache.m4: Remove closeout, and augment with + 'gnulib-tool --import closein fflush'. + * src/m4.h (includes): Use closein, not closeout. + * src/m4.c (main): Ensure stdin is flushed when not all input is + consumed. + (process_file): No return needed. + * src/debug.c (debug_flush_files): Rely on gnulib module, rather + than excluding mingw. + * NEWS: Document this change. + + Work around cygwin and mingw fseeko bugs. + * m4/gnulib-cache.m4: Augment with 'gnulib-tool --import fseeko'. + * src/debug.c (debug_flush_files): Prefer fseeko over fseek. + +2007-04-25 Eric Blake + + Fix negative division within eval, regression of 2007-01-06. + * doc/m4.texinfo (Eval): Catch this bug. + * src/eval.c (mult_term): Fix it. + * NEWS: Document this. + * THANKS: Update. + Reported by Cesar Strauss. + +2007-04-23 Eric Blake + + Start 1.4.9a. + * configure.ac (AC_INIT): Bump version number. + * NEWS: Start changes since 1.4.9. + 2007-03-23 Eric Blake Release 1.4.9: @@ -3595,7 +3772,7 @@ Mon Jan 22 21:08:52 1990 Rene' Seindal ----- - $Revision: 1.1.1.1.2.258 $ $Date: 2007/03/23 20:33:12 $ + $Revision: 1.1.1.1.2.278 $ $Date: 2007/07/10 03:50:13 $ Local Variables: coding: utf-8 diff -ruNp m4-1.4.9/GNUmakefile m4-1.4.10/GNUmakefile --- m4-1.4.9/GNUmakefile 2006-07-01 19:34:24.000000000 -0600 +++ m4-1.4.10/GNUmakefile 2007-07-04 21:56:02.000000000 -0600 @@ -4,11 +4,11 @@ # It is necessary if you want to build targets usually of interest # only to the maintainer. -# Copyright (C) 2001, 2003, 2006 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2006, 2007 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# 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, diff -ruNp m4-1.4.9/Makefile.am m4-1.4.10/Makefile.am --- m4-1.4.9/Makefile.am 2007-03-02 19:32:22.000000000 -0700 +++ m4-1.4.10/Makefile.am 2007-07-09 21:29:49.000000000 -0600 @@ -1,11 +1,11 @@ ## This file is part of GNU M4. ## -## Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006 Free Software +## Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software ## Foundation, Inc. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or +## 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, @@ -20,9 +20,10 @@ ## ## Written by Gary V. Vaughan -SUBDIRS = . examples lib src doc checks +SUBDIRS = . examples lib src doc tests checks EXTRA_DIST = bootstrap c-boxes.el gendocs.sh GNUmakefile Makefile.maint \ - m4/gnulib-cache.m4 + m4/gnulib-cache.m4 local/doc/gpl-3.0.texi.diff \ + local/lib/version-etc.c.diff DISTCLEANFILES = stamp-h ## maintainer-clean should remove as much as possible that ./bootstrap can ## recreate. In the m4 directory, keep only gnulib-cache.m4. diff -ruNp m4-1.4.9/Makefile.in m4-1.4.10/Makefile.in --- m4-1.4.9/Makefile.in 2007-03-23 07:32:35.000000000 -0600 +++ m4-1.4.10/Makefile.in 2007-07-09 21:30:00.000000000 -0600 @@ -38,36 +38,48 @@ DIST_COMMON = README $(am__configure_dep INSTALL NEWS THANKS TODO config.guess config.sub depcomp \ install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \ - $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \ - $(top_srcdir)/m4/cloexec.m4 $(top_srcdir)/m4/close-stream.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ + $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/cloexec.m4 \ + $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/closein.m4 \ $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \ $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \ - $(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fpending.m4 \ - $(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/getopt.m4 \ - $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gl_list.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ - $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fflush.m4 \ + $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fpending.m4 \ + $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fpurge.m4 \ + $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/free.m4 \ + $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ + $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/ftello.m4 \ + $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettimeofday.m4 \ + $(top_srcdir)/m4/gl_list.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gnulib-comp.m4 \ + $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/localcharset.m4 \ - $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \ - $(top_srcdir)/m4/mkdtemp.m4 $(top_srcdir)/m4/mkstemp.m4 \ - $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/quotearg.m4 \ - $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/sig_atomic_t.m4 \ - $(top_srcdir)/m4/signalblocking.m4 \ + $(top_srcdir)/m4/isnan.m4 $(top_srcdir)/m4/isnanf.m4 \ + $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/ldexpl.m4 \ + $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/longlong.m4 \ + $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/malloca.m4 \ + $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbrtowc.m4 \ + $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mkdtemp.m4 \ + $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/pathmax.m4 \ + $(top_srcdir)/m4/printf-frexp.m4 \ + $(top_srcdir)/m4/printf-frexpl.m4 $(top_srcdir)/m4/printf.m4 \ + $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/regex.m4 \ + $(top_srcdir)/m4/sig_atomic_t.m4 $(top_srcdir)/m4/signal_h.m4 \ + $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/signbit.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/ssize_t.m4 \ $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio-safer.m4 \ + $(top_srcdir)/m4/stdio-safer.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/tempname.m4 \ $(top_srcdir)/m4/tmpdir.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \ + $(top_srcdir)/m4/vasprintf-posix.m4 \ $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype.m4 \ $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ @@ -105,13 +117,6 @@ DIST_ARCHIVES = $(distdir).tar.gz $(dist GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print -ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ -ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ -ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ -ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ -ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ -ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ -ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ @@ -139,30 +144,80 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EOVERFLOW = @EOVERFLOW@ EXEEXT = @EXEEXT@ +FLOAT_H = @FLOAT_H@ GETOPT_H = @GETOPT_H@ GLIBC21 = @GLIBC21@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ +GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSEEK = @GNULIB_FSEEK@ +GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FTELL = @GNULIB_FTELL@ +GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPL = @GNULIB_LDEXPL@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MATHL = @GNULIB_MATHL@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ +GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_READLINK = @GNULIB_READLINK@ +GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ +GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ +GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ +GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ +HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ +HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ +HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COSL = @HAVE_DECL_COSL@ +HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ +HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ +HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ +HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ +HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_SINL = @HAVE_DECL_SINL@ +HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ +HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ +HAVE_DECL_TANL = @HAVE_DECL_TANL@ +HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ +HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FSEEKO = @HAVE_FSEEKO@ +HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_READLINK = @HAVE_READLINK@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ @@ -171,24 +226,40 @@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_VASPRINTF = @HAVE_VASPRINTF@ +HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE__BOOL = @HAVE__BOOL@ +INCLUDE_NEXT = @INCLUDE_NEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ +LIBINTL = @LIBINTL@ LIBM4_LIBDEPS = @LIBM4_LIBDEPS@ LIBM4_LTLIBDEPS = @LIBM4_LTLIBDEPS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ M4_LIBOBJS = @M4_LIBOBJS@ M4_LTLIBOBJS = @M4_LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NEXT_FLOAT_H = @NEXT_FLOAT_H@ +NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ +NEXT_STDINT_H = @NEXT_STDINT_H@ +NEXT_STDIO_H = @NEXT_STDIO_H@ +NEXT_STDLIB_H = @NEXT_STDLIB_H@ +NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_UNISTD_H = @NEXT_UNISTD_H@ +NEXT_WCHAR_H = @NEXT_WCHAR_H@ +NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -201,9 +272,30 @@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FPRINTF = @REPLACE_FPRINTF@ +REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPL = @REPLACE_FREXPL@ +REPLACE_FSEEK = @REPLACE_FSEEK@ +REPLACE_FSEEKO = @REPLACE_FSEEKO@ +REPLACE_FTELL = @REPLACE_FTELL@ +REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LCHOWN = @REPLACE_LCHOWN@ +REPLACE_LDEXPL = @REPLACE_LDEXPL@ +REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ +REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ +REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ +REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ +REPLACE_VPRINTF = @REPLACE_VPRINTF@ +REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ +REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ +REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ @@ -267,9 +359,10 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = . examples lib src doc checks +SUBDIRS = . examples lib src doc tests checks EXTRA_DIST = bootstrap c-boxes.el gendocs.sh GNUmakefile Makefile.maint \ - m4/gnulib-cache.m4 + m4/gnulib-cache.m4 local/doc/gpl-3.0.texi.diff \ + local/lib/version-etc.c.diff DISTCLEANFILES = stamp-h MAINTAINERCLEANFILES = COPYING INSTALL Makefile.in aclocal.m4 \ diff -ruNp m4-1.4.9/Makefile.maint m4-1.4.10/Makefile.maint --- m4-1.4.9/Makefile.maint 2006-08-25 08:01:34.000000000 -0600 +++ m4-1.4.10/Makefile.maint 2007-07-04 21:56:02.000000000 -0600 @@ -1,10 +1,10 @@ ## Makefile.maint -- Makefile rules for m4 maintainers -*-Makefile-*- ## -## Copyright (C) 2004, 2005, 2006 Free Software Foundation +## Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or +## 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, diff -ruNp m4-1.4.9/NEWS m4-1.4.10/NEWS --- m4-1.4.9/NEWS 2007-03-23 06:41:17.000000000 -0600 +++ m4-1.4.10/NEWS 2007-07-09 21:09:07.000000000 -0600 @@ -2,6 +2,34 @@ GNU M4 NEWS - User visible changes. Copyright (C) 1992, 1993, 1994, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +Version 1.4.10 - 09 Jul 2007, by Eric Blake (CVS version 1.4.9c) + +* Upgrade from GPL version 2 to GPL version 3 or later. +* A number of portability improvements inherited from gnulib. +* Avoid undefined behavior introduced in 1.4.9b in the `format' builtin + when handling %c. However, this area of code has never been documented, + and currently does not match the POSIX behavior of printf(1), so it may + have further changes in the next version. + +Version 1.4.9b - 29 May 2007, by Eric Blake (CVS version 1.4.9a) + +* Fix regression introduced in 1.4.9 in the `eval' builtin when performing + division. +* Fix regression introduced in 1.4.8 in the `-F' option that made it + impossible to freeze more than 512 kibibytes of diverted text. +* The synclines option `-s' no longer generates sync lines in the middle of + multiline comments or quoted strings. +* Work around a number of corner-case POSIX compliance bugs in various + broken stdio libraries. In particular, the `syscmd' builtin behaves + more predictably when stdin is seekable. +* The `format' builtin now understands formats such as %a, %A, and %'hhd, + and works around a number of platform printf bugs. Furthermore, the + sequence format(%*.*d,-1,-1,1) no longer outputs random data. However, + some non-compliant platforms such as mingw still have known bugs in + strtod that may cause testsuite failures. +* The testsuite is improved to also run gnulib portability tests for the + features that M4 imports from gnulib. + Version 1.4.9 - 23 Mar 2007, by Eric Blake (CVS version 1.4.8c) * Minor documentation and portability cleanups. diff -ruNp m4-1.4.9/README m4-1.4.10/README --- m4-1.4.9/README 2007-03-02 19:32:22.000000000 -0700 +++ m4-1.4.10/README 2007-07-04 21:56:02.000000000 -0600 @@ -23,7 +23,12 @@ from trivial test files to rather advanc use m4 seriously, you might find useful material down there. See file `BACKLOG' for a summary of pending mail and articles. -See file `COPYING' for copying conditions. +See file `COPYING' for copying conditions. Note that M4 is distributed +under the GNU Public License version 3 or later. Some files in the +distribution are copied from the gnulib project, and hence bear the +designation version 2 or later because they are unmodified from gnulib; +however, if you modify these files using M4 rather than gnulib as the +source, you must update the license to be GPLv3 or later. See file `INSTALL' for compilation and installation instructions. See file `NEWS' for a list of major changes in the current release. See file `THANKS' for a list of contributors. diff -ruNp m4-1.4.9/THANKS m4-1.4.10/THANKS --- m4-1.4.9/THANKS 2007-03-23 06:40:02.000000000 -0600 +++ m4-1.4.10/THANKS 2007-05-29 19:34:53.000000000 -0600 @@ -23,6 +23,7 @@ Bjorn R. Bjornsson brb@falcon.is Bob Badour bob@badour.net Brendan Kehoe brendan@cygnus.com Bruno Haible bruno@clisp.org +Cesar Strauss cestrauss@gmail.com Chris McGuire chris@wso.net Damian Menscher menscher@uiuc.edu Dan Jacobson jidanni@jidanni.org @@ -89,6 +90,7 @@ Roland McGrath roland@gnu.ai.mit.edu Sami Liedes sliedes@cc.hut.fi Santiago Vila sanvila@debian.org Scott Bartram deneb!scottb +Sergey Poznyakoff gray@gnu.org.ua Simon Leinen simon@lia.di.epfl.ch Skip Montanaro skip@automatrix.com Stepan Kasal kasal@ucw.cz diff -ruNp m4-1.4.9/TODO m4-1.4.10/TODO --- m4-1.4.9/TODO 2007-03-02 19:32:22.000000000 -0700 +++ m4-1.4.10/TODO 2007-07-09 21:07:04.000000000 -0600 @@ -4,6 +4,9 @@ Tell if you feel like v of these ideas, listed more or less in decreasing order of priority. * Features or problems + - Fix format() builtin to handle %c more like printf(1) in the shell + http://lists.gnu.org/archive/html/bug-m4/2007-05/msg00047.html + Also, gnulib needs help to overcome mingw bugs related to format(). - Update documentation from accumulated mail about it - Study synclines at the very beginning of each diverted sequence - Make eval work on bignums - the 32 bits limit is artificial @@ -34,7 +37,7 @@ mode: outline outline-regexp: " *[-+*.] \\| " End: -Copyright (C) 2000, 2006 Free Software Foundation, Inc. +Copyright (C) 2000, 2006, 2007 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or diff -ruNp m4-1.4.9/aclocal.m4 m4-1.4.10/aclocal.m4 --- m4-1.4.9/aclocal.m4 2007-03-23 07:32:14.000000000 -0600 +++ m4-1.4.10/aclocal.m4 2007-07-09 21:14:48.000000000 -0600 @@ -860,11 +860,11 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -m4_include([m4/absolute-header.m4]) m4_include([m4/alloca.m4]) -m4_include([m4/allocsa.m4]) +m4_include([m4/assert.m4]) m4_include([m4/cloexec.m4]) m4_include([m4/close-stream.m4]) +m4_include([m4/closein.m4]) m4_include([m4/closeout.m4]) m4_include([m4/codeset.m4]) m4_include([m4/config-h.m4]) @@ -874,29 +874,50 @@ m4_include([m4/error.m4]) m4_include([m4/exitfail.m4]) m4_include([m4/extensions.m4]) m4_include([m4/fatal-signal.m4]) +m4_include([m4/fflush.m4]) +m4_include([m4/float_h.m4]) m4_include([m4/fpending.m4]) +m4_include([m4/fpieee.m4]) +m4_include([m4/fpurge.m4]) +m4_include([m4/freading.m4]) m4_include([m4/free.m4]) +m4_include([m4/frexp.m4]) +m4_include([m4/frexpl.m4]) +m4_include([m4/fseeko.m4]) +m4_include([m4/ftello.m4]) m4_include([m4/getopt.m4]) m4_include([m4/gettimeofday.m4]) m4_include([m4/gl_list.m4]) m4_include([m4/glibc21.m4]) m4_include([m4/gnulib-common.m4]) m4_include([m4/gnulib-comp.m4]) +m4_include([m4/include_next.m4]) m4_include([m4/inline.m4]) m4_include([m4/intmax_t.m4]) m4_include([m4/inttypes_h.m4]) +m4_include([m4/isnan.m4]) +m4_include([m4/isnanf.m4]) +m4_include([m4/isnanl.m4]) +m4_include([m4/ldexpl.m4]) m4_include([m4/localcharset.m4]) -m4_include([m4/longdouble.m4]) m4_include([m4/longlong.m4]) +m4_include([m4/lseek.m4]) +m4_include([m4/malloca.m4]) +m4_include([m4/math_h.m4]) m4_include([m4/mbrtowc.m4]) m4_include([m4/mbstate_t.m4]) m4_include([m4/mkdtemp.m4]) m4_include([m4/mkstemp.m4]) m4_include([m4/pathmax.m4]) +m4_include([m4/printf-frexp.m4]) +m4_include([m4/printf-frexpl.m4]) +m4_include([m4/printf.m4]) m4_include([m4/quotearg.m4]) m4_include([m4/regex.m4]) m4_include([m4/sig_atomic_t.m4]) +m4_include([m4/signal_h.m4]) m4_include([m4/signalblocking.m4]) +m4_include([m4/signbit.m4]) m4_include([m4/size_max.m4]) m4_include([m4/ssize_t.m4]) m4_include([m4/stdarg.m4]) @@ -904,6 +925,7 @@ m4_include([m4/stdbool.m4]) m4_include([m4/stdint.m4]) m4_include([m4/stdint_h.m4]) m4_include([m4/stdio-safer.m4]) +m4_include([m4/stdio_h.m4]) m4_include([m4/stdlib-safer.m4]) m4_include([m4/stdlib_h.m4]) m4_include([m4/strtol.m4]) @@ -916,6 +938,7 @@ m4_include([m4/unistd-safer.m4]) m4_include([m4/unistd_h.m4]) m4_include([m4/unlocked-io.m4]) m4_include([m4/vasnprintf.m4]) +m4_include([m4/vasprintf-posix.m4]) m4_include([m4/vasprintf.m4]) m4_include([m4/wchar.m4]) m4_include([m4/wchar_t.m4]) diff -ruNp m4-1.4.9/bootstrap m4-1.4.10/bootstrap --- m4-1.4.9/bootstrap 2007-03-02 19:32:22.000000000 -0700 +++ m4-1.4.10/bootstrap 2007-07-04 21:56:03.000000000 -0600 @@ -1,15 +1,15 @@ #! /bin/sh -# bootstrap (GNU M4) version 2006-09-21 +# bootstrap (GNU M4) version 2007-07-04 # Written by Gary V. Vaughan -# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# 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 @@ -255,7 +255,7 @@ func_update "$gnulibdir"/build-aux/insta func_update "$gnulibdir"/build-aux/mdate-sh doc/mdate-sh func_update "$gnulibdir"/build-aux/missing missing func_update "$gnulibdir"/build-aux/texinfo.tex doc/texinfo.tex -func_update "$gnulibdir"/doc/COPYING COPYING +func_update "$gnulibdir"/doc/COPYINGv3 COPYING func_update "$gnulibdir"/doc/INSTALL INSTALL exit 0 diff -ruNp m4-1.4.9/checks/001.comments m4-1.4.10/checks/001.comments --- m4-1.4.9/checks/001.comments 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/001.comments 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:918: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -`quoted text' # `commented text' -dnl @result{}quoted text # `commented text' -`quoting inhibits' `#' `comments' -dnl @result{}quoting inhibits # comments diff -ruNp m4-1.4.9/checks/001.preprocess m4-1.4.10/checks/001.preprocess --- m4-1.4.9/checks/001.preprocess 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/001.preprocess 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,38 @@ +dnl @ ../doc/m4.texinfo:684: Origin of test +dnl @ expected status: 0 +dnl @ extra options: -s +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`twoline', `1 +2') +dnl @result{}#line 2 "stdin" +dnl @result{} +changecom(`/*', `*/') +dnl @result{} +define(`comment', `/*1 +2*/') +dnl @result{}#line 5 +dnl @result{} +dnl no line +hello +dnl @result{}#line 7 +dnl @result{}hello +twoline +dnl @result{}1 +dnl @result{}#line 8 +dnl @result{}2 +comment +dnl @result{}/*1 +dnl @result{}2*/ +one comment `two +three' +dnl @result{}#line 10 +dnl @result{}one /*1 +dnl @result{}2*/ two +dnl @result{}three +goodbye +dnl @result{}#line 12 +dnl @result{}goodbye diff -ruNp m4-1.4.9/checks/002.command_li m4-1.4.10/checks/002.command_li --- m4-1.4.9/checks/002.command_li 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/002.command_li 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,10 @@ +dnl @ ../doc/m4.texinfo:888: Origin of test +dnl @ expected status: 0 +dnl @ extra options: -Dbar=hello foo -Dbar=world foo +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +dnl @result{}hello +dnl @result{}world diff -ruNp m4-1.4.9/checks/002.input_proc m4-1.4.10/checks/002.input_proc --- m4-1.4.9/checks/002.input_proc 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/002.input_proc 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:1003: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -changequote([,])dnl -define([gl_STRING_MODULE_INDICATOR], - [ - dnl comment - GNULIB_]translit([$1],[a-z],[A-Z])[=1 - ])dnl - gl_STRING_MODULE_INDICATOR([strcase]) -dnl @result{} -dnl @result{} GNULIB_strcase=1 -dnl @result{} diff -ruNp m4-1.4.9/checks/003.comments m4-1.4.10/checks/003.comments --- m4-1.4.9/checks/003.comments 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/003.comments 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:983: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +`quoted text' # `commented text' +dnl @result{}quoted text # `commented text' +`quoting inhibits' `#' `comments' +dnl @result{}quoting inhibits # comments diff -ruNp m4-1.4.9/checks/003.input_proc m4-1.4.10/checks/003.input_proc --- m4-1.4.9/checks/003.input_proc 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/003.input_proc 1969-12-31 17:00:00.000000000 -0700 @@ -1,14 +0,0 @@ -dnl @ ../doc/m4.texinfo:1079: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -changequote([,])dnl -define([gl_STRING_MODULE_INDICATOR], - [dnl comment - GNULIB_[]translit([$1], [a-z], [A-Z])=1dnl -])dnl - gl_STRING_MODULE_INDICATOR([strcase]) -dnl @result{} GNULIB_STRCASE=1 diff -ruNp m4-1.4.9/checks/004.inhibiting m4-1.4.10/checks/004.inhibiting --- m4-1.4.9/checks/004.inhibiting 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/004.inhibiting 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:1204: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -eval -dnl @result{}eval -eval(`1') -dnl @result{}1 diff -ruNp m4-1.4.9/checks/004.input_proc m4-1.4.10/checks/004.input_proc --- m4-1.4.9/checks/004.input_proc 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/004.input_proc 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:1069: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +changequote([,])dnl +define([gl_STRING_MODULE_INDICATOR], + [ + dnl comment + GNULIB_]translit([$1],[a-z],[A-Z])[=1 + ])dnl + gl_STRING_MODULE_INDICATOR([strcase]) +dnl @result{} +dnl @result{} GNULIB_strcase=1 +dnl @result{} diff -ruNp m4-1.4.9/checks/005.inhibiting m4-1.4.10/checks/005.inhibiting --- m4-1.4.9/checks/005.inhibiting 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/005.inhibiting 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:1237: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -`divert' -dnl @result{}divert -`d'ivert -dnl @result{}divert -di`ver't -dnl @result{}divert -div`'ert -dnl @result{}divert diff -ruNp m4-1.4.9/checks/005.input_proc m4-1.4.10/checks/005.input_proc --- m4-1.4.9/checks/005.input_proc 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/005.input_proc 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,15 @@ +dnl @ ../doc/m4.texinfo:1145: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +changequote([,])dnl +define([gl_STRING_MODULE_INDICATOR], + [dnl comment + GNULIB_[]translit([$1], [a-z], [A-Z])=1dnl +])dnl + gl_STRING_MODULE_INDICATOR([strcase]) +dnl @result{} GNULIB_STRCASE=1 diff -ruNp m4-1.4.9/checks/006.inhibiting m4-1.4.10/checks/006.inhibiting --- m4-1.4.9/checks/006.inhibiting 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/006.inhibiting 2007-07-05 08:26:40.000000000 -0600 @@ -1,11 +1,12 @@ -dnl @ ../doc/m4.texinfo:1251: Origin of test +dnl @ ../doc/m4.texinfo:1270: Origin of test dnl @ expected status: 0 +dnl @ extra options: dnl @ Copyright (C) 2006, 2007 Free Software Foundation dnl @ This file is free software; the Free Software Foundation dnl @ gives unlimited permission to copy and/or distribute it dnl @ with or without modifications, as long as this notice dnl @ is preserved. -`'divert -dnl @result{} -divert`' -dnl @result{} +eval +dnl @result{}eval +eval(`1') +dnl @result{}1 diff -ruNp m4-1.4.9/checks/007.inhibiting m4-1.4.10/checks/007.inhibiting --- m4-1.4.9/checks/007.inhibiting 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/007.inhibiting 2007-07-05 08:26:40.000000000 -0600 @@ -1,13 +1,16 @@ -dnl @ ../doc/m4.texinfo:1267: Origin of test +dnl @ ../doc/m4.texinfo:1286: Origin of test dnl @ expected status: 0 +dnl @ extra options: -P dnl @ Copyright (C) 2006, 2007 Free Software Foundation dnl @ This file is free software; the Free Software Foundation dnl @ gives unlimited permission to copy and/or distribute it dnl @ with or without modifications, as long as this notice dnl @ is preserved. -define(`x', `substr(ab') -dnl @result{} -define(`y', `cde, `3', `2')') -dnl @result{} -x`'y -dnl @result{}de +eval +dnl @result{}eval +eval(`1') +dnl @result{}eval(1) +m4_eval +dnl @result{}m4_eval +m4_eval(`1') +dnl @result{}1 diff -ruNp m4-1.4.9/checks/008.inhibiting m4-1.4.10/checks/008.inhibiting --- m4-1.4.9/checks/008.inhibiting 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/008.inhibiting 2007-07-05 08:26:40.000000000 -0600 @@ -1,13 +1,16 @@ -dnl @ ../doc/m4.texinfo:1280: Origin of test +dnl @ ../doc/m4.texinfo:1317: Origin of test dnl @ expected status: 0 +dnl @ extra options: dnl @ Copyright (C) 2006, 2007 Free Software Foundation dnl @ This file is free software; the Free Software Foundation dnl @ gives unlimited permission to copy and/or distribute it dnl @ with or without modifications, as long as this notice dnl @ is preserved. -define(`macro', `m') -dnl @result{} -macro(`m')macro -dnl @result{}mmacro -macro(`m')`'macro -dnl @result{}mm +`divert' +dnl @result{}divert +`d'ivert +dnl @result{}divert +di`ver't +dnl @result{}divert +div`'ert +dnl @result{}divert diff -ruNp m4-1.4.9/checks/009.inhibiting m4-1.4.10/checks/009.inhibiting --- m4-1.4.9/checks/009.inhibiting 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/009.inhibiting 2007-07-05 08:26:40.000000000 -0600 @@ -1,13 +1,12 @@ -dnl @ ../doc/m4.texinfo:1292: Origin of test +dnl @ ../doc/m4.texinfo:1331: Origin of test dnl @ expected status: 0 +dnl @ extra options: dnl @ Copyright (C) 2006, 2007 Free Software Foundation dnl @ This file is free software; the Free Software Foundation dnl @ gives unlimited permission to copy and/or distribute it dnl @ with or without modifications, as long as this notice dnl @ is preserved. -define(`macro', `di$1') +`'divert dnl @result{} -macro(`v')`ert' -dnl @result{}divert -macro(`v')ert +divert`' dnl @result{} diff -ruNp m4-1.4.9/checks/010.inhibiting m4-1.4.10/checks/010.inhibiting --- m4-1.4.9/checks/010.inhibiting 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/010.inhibiting 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:1347: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`x', `substr(ab') +dnl @result{} +define(`y', `cde, `3', `2')') +dnl @result{} +x`'y +dnl @result{}de diff -ruNp m4-1.4.9/checks/010.macro_argu m4-1.4.10/checks/010.macro_argu --- m4-1.4.9/checks/010.macro_argu 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/010.macro_argu 1969-12-31 17:00:00.000000000 -0700 @@ -1,24 +0,0 @@ -dnl @ ../doc/m4.texinfo:1324: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`macro', `$1') -dnl @result{} -macro( unquoted leading space lost) -dnl @result{}unquoted leading space lost -macro(` quoted leading space kept') -dnl @result{} quoted leading space kept -macro( - divert `unquoted space kept after expansion') -dnl @result{} unquoted space kept after expansion -macro(macro(` -')`whitespace from expansion kept') -dnl @result{} -dnl @result{}whitespace from expansion kept -macro(`unquoted trailing whitespace kept' -) -dnl @result{}unquoted trailing whitespace kept -dnl @result{} diff -ruNp m4-1.4.9/checks/011.inhibiting m4-1.4.10/checks/011.inhibiting --- m4-1.4.9/checks/011.inhibiting 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/011.inhibiting 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:1360: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`macro', `m') +dnl @result{} +macro(`m')macro +dnl @result{}mmacro +macro(`m')`'macro +dnl @result{}mm diff -ruNp m4-1.4.9/checks/011.macro_argu m4-1.4.10/checks/011.macro_argu --- m4-1.4.9/checks/011.macro_argu 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/011.macro_argu 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:1372: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`f', `1') -dnl @result{} -f(define(`f', `2')) -dnl @result{}1 -f -dnl @result{}2 diff -ruNp m4-1.4.9/checks/012.inhibiting m4-1.4.10/checks/012.inhibiting --- m4-1.4.9/checks/012.inhibiting 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/012.inhibiting 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:1372: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`macro', `di$1') +dnl @result{} +macro(`v')`ert' +dnl @result{}divert +macro(`v')ert +dnl @result{} diff -ruNp m4-1.4.9/checks/012.macro_argu m4-1.4.10/checks/012.macro_argu --- m4-1.4.9/checks/012.macro_argu 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/012.macro_argu 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:1384: Origin of test -dnl @ expected status: 1 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -hello world -dnl @result{}hello world -define( -dnl @error{}m4:stdin:2: ERROR: end of file in argument list diff -ruNp m4-1.4.9/checks/013.macro_argu m4-1.4.10/checks/013.macro_argu --- m4-1.4.9/checks/013.macro_argu 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/013.macro_argu 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,25 @@ +dnl @ ../doc/m4.texinfo:1404: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`macro', `$1') +dnl @result{} +macro( unquoted leading space lost) +dnl @result{}unquoted leading space lost +macro(` quoted leading space kept') +dnl @result{} quoted leading space kept +macro( + divert `unquoted space kept after expansion') +dnl @result{} unquoted space kept after expansion +macro(macro(` +')`whitespace from expansion kept') +dnl @result{} +dnl @result{}whitespace from expansion kept +macro(`unquoted trailing whitespace kept' +) +dnl @result{}unquoted trailing whitespace kept +dnl @result{} diff -ruNp m4-1.4.9/checks/013.quoting_ar m4-1.4.10/checks/013.quoting_ar --- m4-1.4.9/checks/013.quoting_ar 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/013.quoting_ar 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:1443: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`active', `ACT, IVE') -dnl @result{} -define(`show', `$1 $1') -dnl @result{} -show(active) -dnl @result{}ACT ACT -show(`active') -dnl @result{}ACT, IVE ACT, IVE -show(``active'') -dnl @result{}active active diff -ruNp m4-1.4.9/checks/014.define m4-1.4.10/checks/014.define --- m4-1.4.9/checks/014.define 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/014.define 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:1517: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `Hello world.') -dnl @result{} -foo -dnl @result{}Hello world. diff -ruNp m4-1.4.9/checks/014.macro_argu m4-1.4.10/checks/014.macro_argu --- m4-1.4.9/checks/014.macro_argu 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/014.macro_argu 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:1432: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +index(`abc') +dnl @error{}m4:stdin:1: Warning: too few arguments to builtin `index' +dnl @result{}0 +index(`abc',) +dnl @result{}0 +index(`abc', `b', `ignored') +dnl @error{}m4:stdin:3: Warning: excess arguments to builtin `index' ignored +dnl @result{}1 diff -ruNp m4-1.4.9/checks/015.define m4-1.4.10/checks/015.define --- m4-1.4.9/checks/015.define 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/015.define 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:1534: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(foo, one) -dnl @result{} -define(foo, two) -dnl @result{} -one -dnl @result{}two diff -ruNp m4-1.4.9/checks/015.macro_argu m4-1.4.10/checks/015.macro_argu --- m4-1.4.9/checks/015.macro_argu 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/015.macro_argu 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:1445: Origin of test +dnl @ expected status: 0 +dnl @ extra options: -Q +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +index(`abc') +dnl @result{}0 +index(`abc',) +dnl @result{}0 +index(`abc', `b', `ignored') +dnl @result{}1 diff -ruNp m4-1.4.9/checks/016.define m4-1.4.10/checks/016.define --- m4-1.4.9/checks/016.define 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/016.define 1969-12-31 17:00:00.000000000 -0700 @@ -1,19 +0,0 @@ -dnl @ ../doc/m4.texinfo:1568: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`array', `defn(format(``array[%d]'', `$1'))') -dnl @result{} -define(`array_set', `define(format(``array[%d]'', `$1'), `$2')') -dnl @result{} -array_set(`4', `array element no. 4') -dnl @result{} -array_set(`17', `array element no. 17') -dnl @result{} -array(`4') -dnl @result{}array element no. 4 -array(eval(`10 + 7')) -dnl @result{}array element no. 17 diff -ruNp m4-1.4.9/checks/016.macro_argu m4-1.4.10/checks/016.macro_argu --- m4-1.4.9/checks/016.macro_argu 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/016.macro_argu 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:1475: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`f', `1') +dnl @result{} +f(define(`f', `2')) +dnl @result{}1 +f +dnl @result{}2 diff -ruNp m4-1.4.9/checks/017.arguments m4-1.4.10/checks/017.arguments --- m4-1.4.9/checks/017.arguments 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/017.arguments 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:1602: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`exch', `$2, $1') -dnl @result{} -exch(`arg1', `arg2') -dnl @result{}arg2, arg1 diff -ruNp m4-1.4.9/checks/017.macro_argu m4-1.4.10/checks/017.macro_argu --- m4-1.4.9/checks/017.macro_argu 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/017.macro_argu 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:1487: Origin of test +dnl @ expected status: 1 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +hello world +dnl @result{}hello world +define( +dnl @error{}m4:stdin:2: ERROR: end of file in argument list diff -ruNp m4-1.4.9/checks/018.arguments m4-1.4.10/checks/018.arguments --- m4-1.4.9/checks/018.arguments 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/018.arguments 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:1612: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`exch', `$2, $1') -dnl @result{} -define(exch(``expansion text'', ``macro'')) -dnl @result{} -macro -dnl @result{}expansion text diff -ruNp m4-1.4.9/checks/018.quoting_ar m4-1.4.10/checks/018.quoting_ar --- m4-1.4.9/checks/018.quoting_ar 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/018.quoting_ar 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:1546: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`active', `ACT, IVE') +dnl @result{} +define(`show', `$1 $1') +dnl @result{} +show(active) +dnl @result{}ACT ACT +show(`active') +dnl @result{}ACT, IVE ACT, IVE +show(``active'') +dnl @result{}active active diff -ruNp m4-1.4.9/checks/019.arguments m4-1.4.10/checks/019.arguments --- m4-1.4.9/checks/019.arguments 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/019.arguments 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:1628: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`test', ``Macro name: $0'') -dnl @result{} -test -dnl @result{}Macro name: test diff -ruNp m4-1.4.9/checks/019.macro_expa m4-1.4.10/checks/019.macro_expa --- m4-1.4.9/checks/019.macro_expa 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/019.macro_expa 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,10 @@ +dnl @ ../doc/m4.texinfo:1574: Origin of test +dnl @ expected status: 0 +dnl @ extra options: -Dbar=Hello -Dfoo=bar +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +foo +dnl @result{}Hello diff -ruNp m4-1.4.9/checks/020.arguments m4-1.4.10/checks/020.arguments --- m4-1.4.9/checks/020.arguments 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/020.arguments 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:1638: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `This is macro `foo'.') -dnl @result{} -foo -dnl @result{}This is macro foo. diff -ruNp m4-1.4.9/checks/020.define m4-1.4.10/checks/020.define --- m4-1.4.9/checks/020.define 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/020.define 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:1622: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `Hello world.') +dnl @result{} +foo +dnl @result{}Hello world. diff -ruNp m4-1.4.9/checks/021.arguments m4-1.4.10/checks/021.arguments --- m4-1.4.9/checks/021.arguments 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/021.arguments 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:1673: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `single quoted $`'{1} output') -dnl @result{} -define(`bar', ``double quoted $'`{2} output'') -dnl @result{} -foo(`a', `b') -dnl @result{}single quoted ${1} output -bar(`a', `b') -dnl @result{}double quoted ${2} output diff -ruNp m4-1.4.9/checks/021.define m4-1.4.10/checks/021.define --- m4-1.4.9/checks/021.define 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/021.define 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:1639: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(foo, one) +dnl @result{} +define(foo, two) +dnl @result{} +one +dnl @result{}two diff -ruNp m4-1.4.9/checks/022.define m4-1.4.10/checks/022.define --- m4-1.4.9/checks/022.define 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/022.define 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,20 @@ +dnl @ ../doc/m4.texinfo:1673: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`array', `defn(format(``array[%d]'', `$1'))') +dnl @result{} +define(`array_set', `define(format(``array[%d]'', `$1'), `$2')') +dnl @result{} +array_set(`4', `array element no. 4') +dnl @result{} +array_set(`17', `array element no. 17') +dnl @result{} +array(`4') +dnl @result{}array element no. 4 +array(eval(`10 + 7')) +dnl @result{}array element no. 17 diff -ruNp m4-1.4.9/checks/022.pseudo_arg m4-1.4.10/checks/022.pseudo_arg --- m4-1.4.9/checks/022.pseudo_arg 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/022.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 @@ -1,22 +0,0 @@ -dnl @ ../doc/m4.texinfo:1721: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`nargs', `$#') -dnl @result{} -nargs -dnl @result{}0 -nargs() -dnl @result{}1 -nargs(`arg1', `arg2', `arg3') -dnl @result{}3 -nargs(`commas can be quoted, like this') -dnl @result{}1 -nargs(arg1#inside comments, commas do not separate arguments -still arg1) -dnl @result{}1 -nargs((unquoted parentheses, like this, group arguments)) -dnl @result{}1 diff -ruNp m4-1.4.9/checks/023.arguments m4-1.4.10/checks/023.arguments --- m4-1.4.9/checks/023.arguments 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/023.arguments 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:1707: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`exch', `$2, $1') +dnl @result{} +exch(`arg1', `arg2') +dnl @result{}arg2, arg1 diff -ruNp m4-1.4.9/checks/023.pseudo_arg m4-1.4.10/checks/023.pseudo_arg --- m4-1.4.9/checks/023.pseudo_arg 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/023.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 @@ -1,14 +0,0 @@ -dnl @ ../doc/m4.texinfo:1743: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -dnl Attempt to define a macro to just `$#' -define(underquoted, $#) -oops) -dnl @result{} -underquoted -dnl @result{}0) -dnl @result{}oops diff -ruNp m4-1.4.9/checks/024.arguments m4-1.4.10/checks/024.arguments --- m4-1.4.9/checks/024.arguments 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/024.arguments 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:1717: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`exch', `$2, $1') +dnl @result{} +define(exch(``expansion text'', ``macro'')) +dnl @result{} +macro +dnl @result{}expansion text diff -ruNp m4-1.4.9/checks/024.pseudo_arg m4-1.4.10/checks/024.pseudo_arg --- m4-1.4.9/checks/024.pseudo_arg 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/024.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:1756: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`echo', `$*') -dnl @result{} -echo(arg1, arg2, arg3 , arg4) -dnl @result{}arg1,arg2,arg3 ,arg4 diff -ruNp m4-1.4.9/checks/025.arguments m4-1.4.10/checks/025.arguments --- m4-1.4.9/checks/025.arguments 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/025.arguments 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:1733: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`test', ``Macro name: $0'') +dnl @result{} +test +dnl @result{}Macro name: test diff -ruNp m4-1.4.9/checks/025.pseudo_arg m4-1.4.10/checks/025.pseudo_arg --- m4-1.4.9/checks/025.pseudo_arg 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/025.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:1767: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`echo', `$@') -dnl @result{} -echo(arg1, arg2, arg3 , arg4) -dnl @result{}arg1,arg2,arg3 ,arg4 diff -ruNp m4-1.4.9/checks/026.arguments m4-1.4.10/checks/026.arguments --- m4-1.4.9/checks/026.arguments 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/026.arguments 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:1743: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `This is macro `foo'.') +dnl @result{} +foo +dnl @result{}This is macro foo. diff -ruNp m4-1.4.9/checks/026.pseudo_arg m4-1.4.10/checks/026.pseudo_arg --- m4-1.4.9/checks/026.pseudo_arg 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/026.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 @@ -1,21 +0,0 @@ -dnl @ ../doc/m4.texinfo:1777: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`echo1', `$*') -dnl @result{} -define(`echo2', `$@') -dnl @result{} -define(`foo', `This is macro `foo'.') -dnl @result{} -echo1(foo) -dnl @result{}This is macro This is macro foo.. -echo1(`foo') -dnl @result{}This is macro foo. -echo2(foo) -dnl @result{}This is macro foo. -echo2(`foo') -dnl @result{}foo diff -ruNp m4-1.4.9/checks/027.arguments m4-1.4.10/checks/027.arguments --- m4-1.4.9/checks/027.arguments 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/027.arguments 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:1778: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `single quoted $`'{1} output') +dnl @result{} +define(`bar', ``double quoted $'`{2} output'') +dnl @result{} +foo(`a', `b') +dnl @result{}single quoted ${1} output +bar(`a', `b') +dnl @result{}double quoted ${2} output diff -ruNp m4-1.4.9/checks/027.pseudo_arg m4-1.4.10/checks/027.pseudo_arg --- m4-1.4.9/checks/027.pseudo_arg 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/027.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 @@ -1,21 +0,0 @@ -dnl @ ../doc/m4.texinfo:1799: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`echo1', `$*') -dnl @result{} -define(`echo2', `$@') -dnl @result{} -define(`foo', `bar') -dnl @result{} -echo1(#foo'foo -foo) -dnl @result{}#foo'foo -dnl @result{}bar -echo2(#foo'foo -foo) -dnl @result{}#foobar -dnl @result{}bar' diff -ruNp m4-1.4.9/checks/028.pseudo_arg m4-1.4.10/checks/028.pseudo_arg --- m4-1.4.9/checks/028.pseudo_arg 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/028.pseudo_arg 2007-07-05 08:26:40.000000000 -0600 @@ -1,11 +1,23 @@ -dnl @ ../doc/m4.texinfo:1820: Origin of test +dnl @ ../doc/m4.texinfo:1826: Origin of test dnl @ expected status: 0 +dnl @ extra options: dnl @ Copyright (C) 2006, 2007 Free Software Foundation dnl @ This file is free software; the Free Software Foundation dnl @ gives unlimited permission to copy and/or distribute it dnl @ with or without modifications, as long as this notice dnl @ is preserved. -define(`foo', `$$$ hello $$$') +define(`nargs', `$#') dnl @result{} -foo -dnl @result{}$$$ hello $$$ +nargs +dnl @result{}0 +nargs() +dnl @result{}1 +nargs(`arg1', `arg2', `arg3') +dnl @result{}3 +nargs(`commas can be quoted, like this') +dnl @result{}1 +nargs(arg1#inside comments, commas do not separate arguments +still arg1) +dnl @result{}1 +nargs((unquoted parentheses, like this, group arguments)) +dnl @result{}1 diff -ruNp m4-1.4.9/checks/029.pseudo_arg m4-1.4.10/checks/029.pseudo_arg --- m4-1.4.9/checks/029.pseudo_arg 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/029.pseudo_arg 2007-07-05 08:26:40.000000000 -0600 @@ -1,27 +1,15 @@ -dnl @ ../doc/m4.texinfo:1836: Origin of test +dnl @ ../doc/m4.texinfo:1848: Origin of test dnl @ expected status: 0 +dnl @ extra options: dnl @ Copyright (C) 2006, 2007 Free Software Foundation dnl @ This file is free software; the Free Software Foundation dnl @ gives unlimited permission to copy and/or distribute it dnl @ with or without modifications, as long as this notice dnl @ is preserved. -define(`foo', `no nested quote: $1') +dnl Attempt to define a macro to just `$#' +define(underquoted, $#) +oops) dnl @result{} -foo(`arg') -dnl @result{}no nested quote: arg -define(`foo', `nested quote around $: `$'1') -dnl @result{} -foo(`arg') -dnl @result{}nested quote around $: $1 -define(`foo', `nested empty quote after $: $`'1') -dnl @result{} -foo(`arg') -dnl @result{}nested empty quote after $: $1 -define(`foo', `nested quote around next character: $`1'') -dnl @result{} -foo(`arg') -dnl @result{}nested quote around next character: $1 -define(`foo', `nested quote around both: `$1'') -dnl @result{} -foo(`arg') -dnl @result{}nested quote around both: arg +underquoted +dnl @result{}0) +dnl @result{}oops diff -ruNp m4-1.4.9/checks/030.pseudo_arg m4-1.4.10/checks/030.pseudo_arg --- m4-1.4.9/checks/030.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/030.pseudo_arg 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:1861: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`echo', `$*') +dnl @result{} +echo(arg1, arg2, arg3 , arg4) +dnl @result{}arg1,arg2,arg3 ,arg4 diff -ruNp m4-1.4.9/checks/030.undefine m4-1.4.10/checks/030.undefine --- m4-1.4.9/checks/030.undefine 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/030.undefine 1969-12-31 17:00:00.000000000 -0700 @@ -1,21 +0,0 @@ -dnl @ ../doc/m4.texinfo:1875: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -foo bar blah -dnl @result{}foo bar blah -define(`foo', `some')define(`bar', `other')define(`blah', `text') -dnl @result{} -foo bar blah -dnl @result{}some other text -undefine(`foo') -dnl @result{} -foo bar blah -dnl @result{}foo other text -undefine(`bar', `blah') -dnl @result{} -foo bar blah -dnl @result{}foo bar blah diff -ruNp m4-1.4.9/checks/031.pseudo_arg m4-1.4.10/checks/031.pseudo_arg --- m4-1.4.9/checks/031.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/031.pseudo_arg 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:1872: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`echo', `$@') +dnl @result{} +echo(arg1, arg2, arg3 , arg4) +dnl @result{}arg1,arg2,arg3 ,arg4 diff -ruNp m4-1.4.9/checks/031.undefine m4-1.4.10/checks/031.undefine --- m4-1.4.9/checks/031.undefine 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/031.undefine 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:1895: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`f', ``$0':$1') -dnl @result{} -f(f(f(undefine(`f')`hello world'))) -dnl @result{}f:f:f:hello world -f(`bye') -dnl @result{}f(bye) diff -ruNp m4-1.4.9/checks/032.defn m4-1.4.10/checks/032.defn --- m4-1.4.9/checks/032.defn 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/032.defn 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:1934: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`zap', defn(`undefine')) -dnl @result{} -zap(`undefine') -dnl @result{} -undefine(`zap') -dnl @result{}undefine(zap) diff -ruNp m4-1.4.9/checks/032.pseudo_arg m4-1.4.10/checks/032.pseudo_arg --- m4-1.4.9/checks/032.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/032.pseudo_arg 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,22 @@ +dnl @ ../doc/m4.texinfo:1882: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`echo1', `$*') +dnl @result{} +define(`echo2', `$@') +dnl @result{} +define(`foo', `This is macro `foo'.') +dnl @result{} +echo1(foo) +dnl @result{}This is macro This is macro foo.. +echo1(`foo') +dnl @result{}This is macro foo. +echo2(foo) +dnl @result{}This is macro foo. +echo2(`foo') +dnl @result{}foo diff -ruNp m4-1.4.9/checks/033.defn m4-1.4.10/checks/033.defn --- m4-1.4.9/checks/033.defn 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/033.defn 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:1951: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `This is `$0'') -dnl @result{} -define(`bar', defn(`foo')) -dnl @result{} -bar -dnl @result{}This is bar diff -ruNp m4-1.4.9/checks/033.pseudo_arg m4-1.4.10/checks/033.pseudo_arg --- m4-1.4.9/checks/033.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/033.pseudo_arg 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,22 @@ +dnl @ ../doc/m4.texinfo:1904: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`echo1', `$*') +dnl @result{} +define(`echo2', `$@') +dnl @result{} +define(`foo', `bar') +dnl @result{} +echo1(#foo'foo +foo) +dnl @result{}#foo'foo +dnl @result{}bar +echo2(#foo'foo +foo) +dnl @result{}#foobar +dnl @result{}bar' diff -ruNp m4-1.4.9/checks/034.defn m4-1.4.10/checks/034.defn --- m4-1.4.9/checks/034.defn 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/034.defn 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:1963: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`string', `The macro dnl is very useful -') -dnl @result{} -string -dnl @result{}The macro -defn(`string') -dnl @result{}The macro dnl is very useful -dnl @result{} diff -ruNp m4-1.4.9/checks/034.pseudo_arg m4-1.4.10/checks/034.pseudo_arg --- m4-1.4.9/checks/034.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/034.pseudo_arg 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:1925: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `$$$ hello $$$') +dnl @result{} +foo +dnl @result{}$$$ hello $$$ diff -ruNp m4-1.4.9/checks/035.defn m4-1.4.10/checks/035.defn --- m4-1.4.9/checks/035.defn 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/035.defn 1969-12-31 17:00:00.000000000 -0700 @@ -1,19 +0,0 @@ -dnl @ ../doc/m4.texinfo:1982: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', a'a) -dnl @result{} -define(`a', `A') -dnl @result{} -define(`echo', `$@') -dnl @result{} -foo -dnl @result{}A'A -defn(`foo') -dnl @result{}aA' -echo(foo) -dnl @result{}AA' diff -ruNp m4-1.4.9/checks/035.pseudo_arg m4-1.4.10/checks/035.pseudo_arg --- m4-1.4.9/checks/035.pseudo_arg 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/035.pseudo_arg 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,28 @@ +dnl @ ../doc/m4.texinfo:1941: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `no nested quote: $1') +dnl @result{} +foo(`arg') +dnl @result{}no nested quote: arg +define(`foo', `nested quote around $: `$'1') +dnl @result{} +foo(`arg') +dnl @result{}nested quote around $: $1 +define(`foo', `nested empty quote after $: $`'1') +dnl @result{} +foo(`arg') +dnl @result{}nested empty quote after $: $1 +define(`foo', `nested quote around next character: $`1'') +dnl @result{} +foo(`arg') +dnl @result{}nested quote around next character: $1 +define(`foo', `nested quote around both: `$1'') +dnl @result{} +foo(`arg') +dnl @result{}nested quote around both: arg diff -ruNp m4-1.4.9/checks/036.defn m4-1.4.10/checks/036.defn --- m4-1.4.9/checks/036.defn 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/036.defn 1969-12-31 17:00:00.000000000 -0700 @@ -1,14 +0,0 @@ -dnl @ ../doc/m4.texinfo:2003: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -defn(`defn') -dnl @result{} -define(defn(`divnum'), `cannot redefine a builtin token') -dnl @error{}m4:stdin:2: Warning: define: invalid macro name ignored -dnl @result{} -divnum -dnl @result{}0 diff -ruNp m4-1.4.9/checks/036.undefine m4-1.4.10/checks/036.undefine --- m4-1.4.9/checks/036.undefine 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/036.undefine 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,22 @@ +dnl @ ../doc/m4.texinfo:1980: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +foo bar blah +dnl @result{}foo bar blah +define(`foo', `some')define(`bar', `other')define(`blah', `text') +dnl @result{} +foo bar blah +dnl @result{}some other text +undefine(`foo') +dnl @result{} +foo bar blah +dnl @result{}foo other text +undefine(`bar', `blah') +dnl @result{} +foo bar blah +dnl @result{}foo bar blah diff -ruNp m4-1.4.9/checks/037.pushdef m4-1.4.10/checks/037.pushdef --- m4-1.4.9/checks/037.pushdef 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/037.pushdef 1969-12-31 17:00:00.000000000 -0700 @@ -1,31 +0,0 @@ -dnl @ ../doc/m4.texinfo:2044: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `Expansion one.') -dnl @result{} -foo -dnl @result{}Expansion one. -pushdef(`foo', `Expansion two.') -dnl @result{} -foo -dnl @result{}Expansion two. -pushdef(`foo', `Expansion three.') -dnl @result{} -pushdef(`foo', `Expansion four.') -dnl @result{} -popdef(`foo') -dnl @result{} -foo -dnl @result{}Expansion three. -popdef(`foo', `foo') -dnl @result{} -foo -dnl @result{}Expansion one. -popdef(`foo') -dnl @result{} -foo -dnl @result{}foo diff -ruNp m4-1.4.9/checks/037.undefine m4-1.4.10/checks/037.undefine --- m4-1.4.9/checks/037.undefine 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/037.undefine 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:2000: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`f', ``$0':$1') +dnl @result{} +f(f(f(undefine(`f')`hello world'))) +dnl @result{}f:f:f:hello world +f(`bye') +dnl @result{}f(bye) diff -ruNp m4-1.4.9/checks/038.defn m4-1.4.10/checks/038.defn --- m4-1.4.9/checks/038.defn 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/038.defn 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:2039: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`zap', defn(`undefine')) +dnl @result{} +zap(`undefine') +dnl @result{} +undefine(`zap') +dnl @result{}undefine(zap) diff -ruNp m4-1.4.9/checks/038.pushdef m4-1.4.10/checks/038.pushdef --- m4-1.4.9/checks/038.pushdef 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/038.pushdef 1969-12-31 17:00:00.000000000 -0700 @@ -1,23 +0,0 @@ -dnl @ ../doc/m4.texinfo:2081: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `Expansion one.') -dnl @result{} -foo -dnl @result{}Expansion one. -pushdef(`foo', `Expansion two.') -dnl @result{} -foo -dnl @result{}Expansion two. -define(`foo', `Second expansion two.') -dnl @result{} -foo -dnl @result{}Second expansion two. -undefine(`foo') -dnl @result{} -foo -dnl @result{}foo diff -ruNp m4-1.4.9/checks/039.defn m4-1.4.10/checks/039.defn --- m4-1.4.9/checks/039.defn 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/039.defn 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:2056: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `This is `$0'') +dnl @result{} +define(`bar', defn(`foo')) +dnl @result{} +bar +dnl @result{}This is bar diff -ruNp m4-1.4.9/checks/039.indir m4-1.4.10/checks/039.indir --- m4-1.4.9/checks/039.indir 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/039.indir 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:2130: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`$$internal$macro', `Internal macro (name `$0')') -dnl @result{} -$$internal$macro -dnl @result{}$$internal$macro -indir(`$$internal$macro') -dnl @result{}Internal macro (name $$internal$macro) diff -ruNp m4-1.4.9/checks/040.defn m4-1.4.10/checks/040.defn --- m4-1.4.9/checks/040.defn 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/040.defn 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:2068: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`string', `The macro dnl is very useful +') +dnl @result{} +string +dnl @result{}The macro +defn(`string') +dnl @result{}The macro dnl is very useful +dnl @result{} diff -ruNp m4-1.4.9/checks/040.indir m4-1.4.10/checks/040.indir --- m4-1.4.9/checks/040.indir 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/040.indir 1969-12-31 17:00:00.000000000 -0700 @@ -1,16 +0,0 @@ -dnl @ ../doc/m4.texinfo:2150: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`f', `1') -dnl @result{} -f(define(`f', `2')) -dnl @result{}1 -indir(`f', define(`f', `3')) -dnl @result{}3 -indir(`f', undefine(`f')) -dnl @error{}m4:stdin:4: undefined macro `f' -dnl @result{} diff -ruNp m4-1.4.9/checks/041.defn m4-1.4.10/checks/041.defn --- m4-1.4.9/checks/041.defn 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/041.defn 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,20 @@ +dnl @ ../doc/m4.texinfo:2087: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', a'a) +dnl @result{} +define(`a', `A') +dnl @result{} +define(`echo', `$@') +dnl @result{} +foo +dnl @result{}A'A +defn(`foo') +dnl @result{}aA' +echo(foo) +dnl @result{}AA' diff -ruNp m4-1.4.9/checks/041.indir m4-1.4.10/checks/041.indir --- m4-1.4.9/checks/041.indir 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/041.indir 1969-12-31 17:00:00.000000000 -0700 @@ -1,20 +0,0 @@ -dnl @ ../doc/m4.texinfo:2167: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -indir(defn(`defn'), `divnum') -dnl @error{}m4:stdin:1: Warning: indir: invalid macro name ignored -dnl @result{} -indir(`define', defn(`defn'), `divnum') -dnl @error{}m4:stdin:2: Warning: define: invalid macro name ignored -dnl @result{} -indir(`define', `foo', defn(`divnum')) -dnl @result{} -foo -dnl @result{}0 -indir(`divert', defn(`foo')) -dnl @error{}m4:stdin:5: empty string treated as 0 in builtin `divert' -dnl @result{} diff -ruNp m4-1.4.9/checks/042.builtin m4-1.4.10/checks/042.builtin --- m4-1.4.9/checks/042.builtin 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/042.builtin 1969-12-31 17:00:00.000000000 -0700 @@ -1,31 +0,0 @@ -dnl @ ../doc/m4.texinfo:2204: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -pushdef(`define', `hidden') -dnl @result{} -undefine(`undefine') -dnl @result{} -define(`foo', `bar') -dnl @result{}hidden -foo -dnl @result{}foo -builtin(`define', `foo', defn(`divnum')) -dnl @result{} -foo -dnl @result{}0 -builtin(`define', `foo', `BAR') -dnl @result{} -foo -dnl @result{}BAR -undefine(`foo') -dnl @result{}undefine(foo) -foo -dnl @result{}BAR -builtin(`undefine', `foo') -dnl @result{} -foo -dnl @result{}foo diff -ruNp m4-1.4.9/checks/042.defn m4-1.4.10/checks/042.defn --- m4-1.4.9/checks/042.defn 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/042.defn 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,15 @@ +dnl @ ../doc/m4.texinfo:2108: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +defn(`defn') +dnl @result{} +define(defn(`divnum'), `cannot redefine a builtin token') +dnl @error{}m4:stdin:2: Warning: define: invalid macro name ignored +dnl @result{} +divnum +dnl @result{}0 diff -ruNp m4-1.4.9/checks/043.builtin m4-1.4.10/checks/043.builtin --- m4-1.4.9/checks/043.builtin 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/043.builtin 1969-12-31 17:00:00.000000000 -0700 @@ -1,18 +0,0 @@ -dnl @ ../doc/m4.texinfo:2240: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -builtin -dnl @result{}builtin -builtin() -dnl @error{}m4:stdin:2: undefined builtin `' -dnl @result{} -builtin(`builtin') -dnl @error{}m4:stdin:3: Warning: too few arguments to builtin `builtin' -dnl @result{} -builtin(`builtin',) -dnl @error{}m4:stdin:4: undefined builtin `' -dnl @result{} diff -ruNp m4-1.4.9/checks/043.pushdef m4-1.4.10/checks/043.pushdef --- m4-1.4.9/checks/043.pushdef 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/043.pushdef 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,32 @@ +dnl @ ../doc/m4.texinfo:2149: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `Expansion one.') +dnl @result{} +foo +dnl @result{}Expansion one. +pushdef(`foo', `Expansion two.') +dnl @result{} +foo +dnl @result{}Expansion two. +pushdef(`foo', `Expansion three.') +dnl @result{} +pushdef(`foo', `Expansion four.') +dnl @result{} +popdef(`foo') +dnl @result{} +foo +dnl @result{}Expansion three. +popdef(`foo', `foo') +dnl @result{} +foo +dnl @result{}Expansion one. +popdef(`foo') +dnl @result{} +foo +dnl @result{}foo diff -ruNp m4-1.4.9/checks/044.ifdef m4-1.4.10/checks/044.ifdef --- m4-1.4.9/checks/044.ifdef 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/044.ifdef 1969-12-31 17:00:00.000000000 -0700 @@ -1,16 +0,0 @@ -dnl @ ../doc/m4.texinfo:2287: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -ifdef(`foo', ``foo' is defined', ``foo' is not defined') -dnl @result{}foo is not defined -define(`foo', `') -dnl @result{} -ifdef(`foo', ``foo' is defined', ``foo' is not defined') -dnl @result{}foo is defined -ifdef(`no_such_macro', `yes', `no', `extra argument') -dnl @error{}m4:stdin:4: Warning: excess arguments to builtin `ifdef' ignored -dnl @result{}no diff -ruNp m4-1.4.9/checks/044.pushdef m4-1.4.10/checks/044.pushdef --- m4-1.4.9/checks/044.pushdef 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/044.pushdef 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,24 @@ +dnl @ ../doc/m4.texinfo:2186: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `Expansion one.') +dnl @result{} +foo +dnl @result{}Expansion one. +pushdef(`foo', `Expansion two.') +dnl @result{} +foo +dnl @result{}Expansion two. +define(`foo', `Second expansion two.') +dnl @result{} +foo +dnl @result{}Second expansion two. +undefine(`foo') +dnl @result{} +foo +dnl @result{}foo diff -ruNp m4-1.4.9/checks/045.ifelse m4-1.4.10/checks/045.ifelse --- m4-1.4.9/checks/045.ifelse 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/045.ifelse 1969-12-31 17:00:00.000000000 -0700 @@ -1,12 +0,0 @@ -dnl @ ../doc/m4.texinfo:2335: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -ifelse(`some comments') -dnl @result{} -ifelse(`foo', `bar') -dnl @error{}m4:stdin:2: Warning: too few arguments to builtin `ifelse' -dnl @result{} diff -ruNp m4-1.4.9/checks/045.indir m4-1.4.10/checks/045.indir --- m4-1.4.9/checks/045.indir 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/045.indir 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:2235: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`$$internal$macro', `Internal macro (name `$0')') +dnl @result{} +$$internal$macro +dnl @result{}$$internal$macro +indir(`$$internal$macro') +dnl @result{}Internal macro (name $$internal$macro) diff -ruNp m4-1.4.9/checks/046.ifelse m4-1.4.10/checks/046.ifelse --- m4-1.4.9/checks/046.ifelse 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/046.ifelse 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:2345: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -ifelse(`foo', `bar', `true') -dnl @result{} -ifelse(`foo', `foo', `true') -dnl @result{}true -define(`foo', `bar') -dnl @result{} -ifelse(foo, `bar', `true', `false') -dnl @result{}true -ifelse(foo, `foo', `true', `false') -dnl @result{}false diff -ruNp m4-1.4.9/checks/046.indir m4-1.4.10/checks/046.indir --- m4-1.4.9/checks/046.indir 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/046.indir 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,17 @@ +dnl @ ../doc/m4.texinfo:2255: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`f', `1') +dnl @result{} +f(define(`f', `2')) +dnl @result{}1 +indir(`f', define(`f', `3')) +dnl @result{}3 +indir(`f', undefine(`f')) +dnl @error{}m4:stdin:4: undefined macro `f' +dnl @result{} diff -ruNp m4-1.4.9/checks/047.ifelse m4-1.4.10/checks/047.ifelse --- m4-1.4.9/checks/047.ifelse 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/047.ifelse 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:2365: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `ifelse(`$#', `0', ``$0'', `arguments:$#')') -dnl @result{} -foo -dnl @result{}foo -foo() -dnl @result{}arguments:1 -foo(`a', `b', `c') -dnl @result{}arguments:3 diff -ruNp m4-1.4.9/checks/047.indir m4-1.4.10/checks/047.indir --- m4-1.4.9/checks/047.indir 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/047.indir 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,21 @@ +dnl @ ../doc/m4.texinfo:2273: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +indir(defn(`defn'), `divnum') +dnl @error{}m4:stdin:1: Warning: indir: invalid macro name ignored +dnl @result{} +indir(`define', defn(`defn'), `divnum') +dnl @error{}m4:stdin:2: Warning: define: invalid macro name ignored +dnl @result{} +indir(`define', `foo', defn(`divnum')) +dnl @result{} +foo +dnl @result{}0 +indir(`divert', defn(`foo')) +dnl @error{}m4:stdin:5: empty string treated as 0 in builtin `divert' +dnl @result{} diff -ruNp m4-1.4.9/checks/048.builtin m4-1.4.10/checks/048.builtin --- m4-1.4.9/checks/048.builtin 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/048.builtin 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,32 @@ +dnl @ ../doc/m4.texinfo:2311: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +pushdef(`define', `hidden') +dnl @result{} +undefine(`undefine') +dnl @result{} +define(`foo', `bar') +dnl @result{}hidden +foo +dnl @result{}foo +builtin(`define', `foo', defn(`divnum')) +dnl @result{} +foo +dnl @result{}0 +builtin(`define', `foo', `BAR') +dnl @result{} +foo +dnl @result{}BAR +undefine(`foo') +dnl @result{}undefine(foo) +foo +dnl @result{}BAR +builtin(`undefine', `foo') +dnl @result{} +foo +dnl @result{}foo diff -ruNp m4-1.4.9/checks/048.ifelse m4-1.4.10/checks/048.ifelse --- m4-1.4.9/checks/048.ifelse 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/048.ifelse 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:2386: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -ifelse(`foo', `bar', `third', `gnu', `gnats') -dnl @error{}m4:stdin:1: Warning: excess arguments to builtin `ifelse' ignored -dnl @result{}gnu -ifelse(`foo', `bar', `third', `gnu', `gnats', `sixth') -dnl @result{} -ifelse(`foo', `bar', `third', `gnu', `gnats', `sixth', `seventh') -dnl @result{}seventh -ifelse(`foo', `bar', `3', `gnu', `gnats', `6', `7', `8') -dnl @error{}m4:stdin:4: Warning: excess arguments to builtin `ifelse' ignored -dnl @result{}7 diff -ruNp m4-1.4.9/checks/049.builtin m4-1.4.10/checks/049.builtin --- m4-1.4.9/checks/049.builtin 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/049.builtin 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:2344: Origin of test +dnl @ expected status: 0 +dnl @ extra options: -P +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +m4_builtin(`divnum') +dnl @result{}0 +m4_builtin(`m4_divnum') +dnl @error{}m4:stdin:2: undefined builtin `m4_divnum' +dnl @result{} +m4_indir(`divnum') +dnl @error{}m4:stdin:3: undefined macro `divnum' +dnl @result{} +m4_indir(`m4_divnum') +dnl @result{}0 diff -ruNp m4-1.4.9/checks/049.shift m4-1.4.10/checks/049.shift --- m4-1.4.9/checks/049.shift 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/049.shift 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:2426: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -shift -dnl @result{}shift -shift(`bar') -dnl @result{} -shift(`foo', `bar', `baz') -dnl @result{}bar,baz diff -ruNp m4-1.4.9/checks/050.builtin m4-1.4.10/checks/050.builtin --- m4-1.4.9/checks/050.builtin 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/050.builtin 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,19 @@ +dnl @ ../doc/m4.texinfo:2362: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +builtin +dnl @result{}builtin +builtin() +dnl @error{}m4:stdin:2: undefined builtin `' +dnl @result{} +builtin(`builtin') +dnl @error{}m4:stdin:3: Warning: too few arguments to builtin `builtin' +dnl @result{} +builtin(`builtin',) +dnl @error{}m4:stdin:4: undefined builtin `' +dnl @result{} diff -ruNp m4-1.4.9/checks/050.shift m4-1.4.10/checks/050.shift --- m4-1.4.9/checks/050.shift 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/050.shift 1969-12-31 17:00:00.000000000 -0700 @@ -1,16 +0,0 @@ -dnl @ ../doc/m4.texinfo:2443: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`reverse', `ifelse(`$#', `0', , `$#', `1', ``$1'', - `reverse(shift($@)), `$1'')') -dnl @result{} -reverse -dnl @result{} -reverse(`foo') -dnl @result{}foo -reverse(`foo', `bar', `gnats', `and gnus') -dnl @result{}and gnus, gnats, bar, foo diff -ruNp m4-1.4.9/checks/051.ifdef m4-1.4.10/checks/051.ifdef --- m4-1.4.9/checks/051.ifdef 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/051.ifdef 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,17 @@ +dnl @ ../doc/m4.texinfo:2409: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +ifdef(`foo', ``foo' is defined', ``foo' is not defined') +dnl @result{}foo is not defined +define(`foo', `') +dnl @result{} +ifdef(`foo', ``foo' is defined', ``foo' is not defined') +dnl @result{}foo is defined +ifdef(`no_such_macro', `yes', `no', `extra argument') +dnl @error{}m4:stdin:4: Warning: excess arguments to builtin `ifdef' ignored +dnl @result{}no diff -ruNp m4-1.4.9/checks/051.shift m4-1.4.10/checks/051.shift --- m4-1.4.9/checks/051.shift 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/051.shift 1969-12-31 17:00:00.000000000 -0700 @@ -1,24 +0,0 @@ -dnl @ ../doc/m4.texinfo:2475: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -include(`quote.m4') -dnl @result{} --quote-dquote-dquote_elt- -dnl @result{}---- --quote()-dquote()-dquote_elt()- -dnl @result{}--`'-`'- --quote(`1')-dquote(`1')-dquote_elt(`1')- -dnl @result{}-1-`1'-`1'- --quote(`1', `2')-dquote(`1', `2')-dquote_elt(`1', `2')- -dnl @result{}-1,2-`1',`2'-`1',`2'- -define(`n', `$#')dnl --n(quote(`1', `2'))-n(dquote(`1', `2'))-n(dquote_elt(`1', `2'))- -dnl @result{}-1-1-2- -dquote(dquote_elt(`1', `2')) -dnl @result{}``1'',``2'' -dquote_elt(dquote(`1', `2')) -dnl @result{}``1',`2'' diff -ruNp m4-1.4.9/checks/052.ifelse m4-1.4.10/checks/052.ifelse --- m4-1.4.9/checks/052.ifelse 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/052.ifelse 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,13 @@ +dnl @ ../doc/m4.texinfo:2457: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +ifelse(`some comments') +dnl @result{} +ifelse(`foo', `bar') +dnl @error{}m4:stdin:2: Warning: too few arguments to builtin `ifelse' +dnl @result{} diff -ruNp m4-1.4.9/checks/052.shift m4-1.4.10/checks/052.shift --- m4-1.4.9/checks/052.shift 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/052.shift 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:2506: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -undivert(`quote.m4')dnl -dnl @result{}divert(`-1') -dnl @result{}# quote(args) - convert args to single-quoted string -dnl @result{}define(`quote', `ifelse(`$#', `0', `', ``$*'')') -dnl @result{}# dquote(args) - convert args to quoted list of quoted strings -dnl @result{}define(`dquote', ``$@'') -dnl @result{}# dquote_elt(args) - convert args to list of double-quoted strings -dnl @result{}define(`dquote_elt', `ifelse(`$#', `0', `', `$#', `1', ```$1''', -dnl @result{} ```$1'',$0(shift($@))')') -dnl @result{}divert`'dnl diff -ruNp m4-1.4.9/checks/053.ifelse m4-1.4.10/checks/053.ifelse --- m4-1.4.9/checks/053.ifelse 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/053.ifelse 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:2467: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +ifelse(`foo', `bar', `true') +dnl @result{} +ifelse(`foo', `foo', `true') +dnl @result{}true +define(`foo', `bar') +dnl @result{} +ifelse(foo, `bar', `true', `false') +dnl @result{}true +ifelse(foo, `foo', `true', `false') +dnl @result{}false diff -ruNp m4-1.4.9/checks/053.shift m4-1.4.10/checks/053.shift --- m4-1.4.9/checks/053.shift 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/053.shift 1969-12-31 17:00:00.000000000 -0700 @@ -1,16 +0,0 @@ -dnl @ ../doc/m4.texinfo:2535: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`argn', `ifelse(`$1', 1, ``$2'', - `argn(decr(`$1'), shift(shift($@)))')') -dnl @result{} -argn(`1', `a') -dnl @result{}a -define(`foo', `argn(`11', $@)') -dnl @result{} -foo(`a', `b', `c', `d', `e', `f', `g', `h', `i', `j', `k', `l') -dnl @result{}k diff -ruNp m4-1.4.9/checks/054.forloop m4-1.4.10/checks/054.forloop --- m4-1.4.9/checks/054.forloop 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/054.forloop 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:2566: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -include(`forloop.m4') -dnl @result{} -forloop(`i', `1', `8', `i ') -dnl @result{}1 2 3 4 5 6 7 8 diff -ruNp m4-1.4.9/checks/054.ifelse m4-1.4.10/checks/054.ifelse --- m4-1.4.9/checks/054.ifelse 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/054.ifelse 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:2487: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `ifelse(`$#', `0', ``$0'', `arguments:$#')') +dnl @result{} +foo +dnl @result{}foo +foo() +dnl @result{}arguments:1 +foo(`a', `b', `c') +dnl @result{}arguments:3 diff -ruNp m4-1.4.9/checks/055.forloop m4-1.4.10/checks/055.forloop --- m4-1.4.9/checks/055.forloop 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/055.forloop 1969-12-31 17:00:00.000000000 -0700 @@ -1,16 +0,0 @@ -dnl @ ../doc/m4.texinfo:2575: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -include(`forloop.m4') -dnl @result{} -forloop(`i', `1', `4', `forloop(`j', `1', `8', ` (i, j)') -') -dnl @result{} (1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6) (1, 7) (1, 8) -dnl @result{} (2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6) (2, 7) (2, 8) -dnl @result{} (3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6) (3, 7) (3, 8) -dnl @result{} (4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6) (4, 7) (4, 8) -dnl @result{} diff -ruNp m4-1.4.9/checks/055.ifelse m4-1.4.10/checks/055.ifelse --- m4-1.4.9/checks/055.ifelse 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/055.ifelse 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:2508: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +ifelse(`foo', `bar', `third', `gnu', `gnats') +dnl @error{}m4:stdin:1: Warning: excess arguments to builtin `ifelse' ignored +dnl @result{}gnu +ifelse(`foo', `bar', `third', `gnu', `gnats', `sixth') +dnl @result{} +ifelse(`foo', `bar', `third', `gnu', `gnats', `sixth', `seventh') +dnl @result{}seventh +ifelse(`foo', `bar', `3', `gnu', `gnats', `6', `7', `8') +dnl @error{}m4:stdin:4: Warning: excess arguments to builtin `ifelse' ignored +dnl @result{}7 diff -ruNp m4-1.4.9/checks/056.forloop m4-1.4.10/checks/056.forloop --- m4-1.4.9/checks/056.forloop 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/056.forloop 1969-12-31 17:00:00.000000000 -0700 @@ -1,14 +0,0 @@ -dnl @ ../doc/m4.texinfo:2601: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -undivert(`forloop.m4')dnl -dnl @result{}divert(`-1') -dnl @result{}# forloop(var, from, to, stmt) - simple version -dnl @result{}define(`forloop', `pushdef(`$1', `$2')_forloop($@)popdef(`$1')') -dnl @result{}define(`_forloop', -dnl @result{} `$4`'ifelse($1, `$3', `', `define(`$1', incr($1))$0($@)')') -dnl @result{}divert`'dnl diff -ruNp m4-1.4.9/checks/056.shift m4-1.4.10/checks/056.shift --- m4-1.4.9/checks/056.shift 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/056.shift 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:2548: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +shift +dnl @result{}shift +shift(`bar') +dnl @result{} +shift(`foo', `bar', `baz') +dnl @result{}bar,baz diff -ruNp m4-1.4.9/checks/057.foreach m4-1.4.10/checks/057.foreach --- m4-1.4.9/checks/057.foreach 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/057.foreach 1969-12-31 17:00:00.000000000 -0700 @@ -1,21 +0,0 @@ -dnl @ ../doc/m4.texinfo:2646: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -include(`foreach.m4') -dnl @result{} -foreach(`x', (foo, bar, foobar), `Word was: x -')dnl -dnl @result{}Word was: foo -dnl @result{}Word was: bar -dnl @result{}Word was: foobar -include(`foreachq.m4') -dnl @result{} -foreachq(`x', `foo, bar, foobar', `Word was: x -')dnl -dnl @result{}Word was: foo -dnl @result{}Word was: bar -dnl @result{}Word was: foobar diff -ruNp m4-1.4.9/checks/057.shift m4-1.4.10/checks/057.shift --- m4-1.4.9/checks/057.shift 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/057.shift 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,17 @@ +dnl @ ../doc/m4.texinfo:2565: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`reverse', `ifelse(`$#', `0', , `$#', `1', ``$1'', + `reverse(shift($@)), `$1'')') +dnl @result{} +reverse +dnl @result{} +reverse(`foo') +dnl @result{}foo +reverse(`foo', `bar', `gnats', `and gnus') +dnl @result{}and gnus, gnats, bar, foo diff -ruNp m4-1.4.9/checks/058.foreach m4-1.4.10/checks/058.foreach --- m4-1.4.9/checks/058.foreach 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/058.foreach 1969-12-31 17:00:00.000000000 -0700 @@ -1,25 +0,0 @@ -dnl @ ../doc/m4.texinfo:2667: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -include(`foreach.m4') -dnl @result{} -define(`_case', ` $1) - $2=" $1";; -')dnl -define(`_cat', `$1$2')dnl -case $`'1 in -dnl @result{}case $1 in -foreach(`x', `(`(`a', `vara')', `(`b', `varb')', `(`c', `varc')')', - `_cat(`_case', x)')dnl -dnl @result{} a) -dnl @result{} vara=" a";; -dnl @result{} b) -dnl @result{} varb=" b";; -dnl @result{} c) -dnl @result{} varc=" c";; -esac -dnl @result{}esac diff -ruNp m4-1.4.9/checks/058.shift m4-1.4.10/checks/058.shift --- m4-1.4.9/checks/058.shift 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/058.shift 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,25 @@ +dnl @ ../doc/m4.texinfo:2597: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +include(`quote.m4') +dnl @result{} +-quote-dquote-dquote_elt- +dnl @result{}---- +-quote()-dquote()-dquote_elt()- +dnl @result{}--`'-`'- +-quote(`1')-dquote(`1')-dquote_elt(`1')- +dnl @result{}-1-`1'-`1'- +-quote(`1', `2')-dquote(`1', `2')-dquote_elt(`1', `2')- +dnl @result{}-1,2-`1',`2'-`1',`2'- +define(`n', `$#')dnl +-n(quote(`1', `2'))-n(dquote(`1', `2'))-n(dquote_elt(`1', `2'))- +dnl @result{}-1-1-2- +dquote(dquote_elt(`1', `2')) +dnl @result{}``1'',``2'' +dquote_elt(dquote(`1', `2')) +dnl @result{}``1',`2'' diff -ruNp m4-1.4.9/checks/059.foreach m4-1.4.10/checks/059.foreach --- m4-1.4.9/checks/059.foreach 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/059.foreach 1969-12-31 17:00:00.000000000 -0700 @@ -1,16 +0,0 @@ -dnl @ ../doc/m4.texinfo:2695: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -undivert(`foreach.m4')dnl -dnl @result{}divert(`-1') -dnl @result{}# foreach(x, (item_1, item_2, ..., item_n), stmt) -dnl @result{}# parenthesized list, simple version -dnl @result{}define(`foreach', `pushdef(`$1')_foreach($@)popdef(`$1')') -dnl @result{}define(`_arg1', `$1') -dnl @result{}define(`_foreach', `ifelse(`$2', `()', `', -dnl @result{} `define(`$1', _arg1$2)$3`'$0(`$1', (shift$2), `$3')')') -dnl @result{}divert`'dnl diff -ruNp m4-1.4.9/checks/059.shift m4-1.4.10/checks/059.shift --- m4-1.4.9/checks/059.shift 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/059.shift 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:2629: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +undivert(`quote.m4')dnl +dnl @result{}divert(`-1') +dnl @result{}# quote(args) - convert args to single-quoted string +dnl @result{}define(`quote', `ifelse(`$#', `0', `', ``$*'')') +dnl @result{}# dquote(args) - convert args to quoted list of quoted strings +dnl @result{}define(`dquote', ``$@'') +dnl @result{}# dquote_elt(args) - convert args to list of double-quoted strings +dnl @result{}define(`dquote_elt', `ifelse(`$#', `0', `', `$#', `1', ```$1''', +dnl @result{} ```$1'',$0(shift($@))')') +dnl @result{}divert`'dnl diff -ruNp m4-1.4.9/checks/060.foreach m4-1.4.10/checks/060.foreach --- m4-1.4.9/checks/060.foreach 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/060.foreach 1969-12-31 17:00:00.000000000 -0700 @@ -1,25 +0,0 @@ -dnl @ ../doc/m4.texinfo:2720: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`a', `1')define(`b', `2')define(`c', `3') -dnl @result{} -include(`foreach.m4') -dnl @result{} -include(`foreachq.m4') -dnl @result{} -foreach(`x', `(``a'', ``(b'', ``c)'')', `x -') -dnl @result{}1 -dnl @result{}(2)1 -dnl @result{} -dnl @result{}, x -dnl @result{}) -foreachq(`x', ```a'', ``(b'', ``c)''', `x -')dnl -dnl @result{}a -dnl @result{}(b -dnl @result{}c) diff -ruNp m4-1.4.9/checks/060.shift m4-1.4.10/checks/060.shift --- m4-1.4.9/checks/060.shift 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/060.shift 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,17 @@ +dnl @ ../doc/m4.texinfo:2659: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`argn', `ifelse(`$1', 1, ``$2'', + `argn(decr(`$1'), shift(shift($@)))')') +dnl @result{} +argn(`1', `a') +dnl @result{}a +define(`foo', `argn(`11', $@)') +dnl @result{} +foo(`a', `b', `c', `d', `e', `f', `g', `h', `i', `j', `k', `l') +dnl @result{}k diff -ruNp m4-1.4.9/checks/061.foreach m4-1.4.10/checks/061.foreach --- m4-1.4.9/checks/061.foreach 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/061.foreach 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:2743: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -undivert(`foreachq.m4')dnl -dnl @result{}include(`quote.m4')dnl -dnl @result{}divert(`-1') -dnl @result{}# foreachq(x, `item_1, item_2, ..., item_n', stmt) -dnl @result{}# quoted list, simple version -dnl @result{}define(`foreachq', `pushdef(`$1')_foreachq($@)popdef(`$1')') -dnl @result{}define(`_arg1', `$1') -dnl @result{}define(`_foreachq', `ifelse(quote($2), `', `', -dnl @result{} `define(`$1', `_arg1($2)')$3`'$0(`$1', `shift($2)', `$3')')') -dnl @result{}divert`'dnl diff -ruNp m4-1.4.9/checks/061.forloop m4-1.4.10/checks/061.forloop --- m4-1.4.9/checks/061.forloop 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/061.forloop 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:2690: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +include(`forloop.m4') +dnl @result{} +forloop(`i', `1', `8', `i ') +dnl @result{}1 2 3 4 5 6 7 8 diff -ruNp m4-1.4.9/checks/062.dumpdef m4-1.4.10/checks/062.dumpdef --- m4-1.4.9/checks/062.dumpdef 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/062.dumpdef 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:2805: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `Hello world.') -dnl @result{} -dumpdef(`foo') -dnl @error{}foo: `Hello world.' -dnl @result{} -dumpdef(`define') -dnl @error{}define: -dnl @result{} diff -ruNp m4-1.4.9/checks/062.forloop m4-1.4.10/checks/062.forloop --- m4-1.4.9/checks/062.forloop 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/062.forloop 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,17 @@ +dnl @ ../doc/m4.texinfo:2700: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +include(`forloop.m4') +dnl @result{} +forloop(`i', `1', `4', `forloop(`j', `1', `8', ` (i, j)') +') +dnl @result{} (1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6) (1, 7) (1, 8) +dnl @result{} (2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6) (2, 7) (2, 8) +dnl @result{} (3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6) (3, 7) (3, 8) +dnl @result{} (4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6) (4, 7) (4, 8) +dnl @result{} diff -ruNp m4-1.4.9/checks/063.dumpdef m4-1.4.10/checks/063.dumpdef --- m4-1.4.9/checks/063.dumpdef 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/063.dumpdef 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:2821: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -pushdef(`f', ``$0'1')pushdef(`f', ``$0'2') -dnl @result{} -f(popdef(`f')dumpdef(`f')) -dnl @error{}f: ``$0'1' -dnl @result{}f2 -f(popdef(`f')dumpdef(`f')) -dnl @error{}m4:stdin:3: undefined macro `f' -dnl @result{}f1 diff -ruNp m4-1.4.9/checks/063.forloop m4-1.4.10/checks/063.forloop --- m4-1.4.9/checks/063.forloop 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/063.forloop 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,15 @@ +dnl @ ../doc/m4.texinfo:2727: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +undivert(`forloop.m4')dnl +dnl @result{}divert(`-1') +dnl @result{}# forloop(var, from, to, stmt) - simple version +dnl @result{}define(`forloop', `pushdef(`$1', `$2')_forloop($@)popdef(`$1')') +dnl @result{}define(`_forloop', +dnl @result{} `$4`'ifelse($1, `$3', `', `define(`$1', incr($1))$0($@)')') +dnl @result{}divert`'dnl diff -ruNp m4-1.4.9/checks/064.foreach m4-1.4.10/checks/064.foreach --- m4-1.4.9/checks/064.foreach 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/064.foreach 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,22 @@ +dnl @ ../doc/m4.texinfo:2773: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +include(`foreach.m4') +dnl @result{} +foreach(`x', (foo, bar, foobar), `Word was: x +')dnl +dnl @result{}Word was: foo +dnl @result{}Word was: bar +dnl @result{}Word was: foobar +include(`foreachq.m4') +dnl @result{} +foreachq(`x', `foo, bar, foobar', `Word was: x +')dnl +dnl @result{}Word was: foo +dnl @result{}Word was: bar +dnl @result{}Word was: foobar diff -ruNp m4-1.4.9/checks/064.trace m4-1.4.10/checks/064.trace --- m4-1.4.9/checks/064.trace 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/064.trace 1969-12-31 17:00:00.000000000 -0700 @@ -1,19 +0,0 @@ -dnl @ ../doc/m4.texinfo:2863: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `Hello World.') -dnl @result{} -define(`echo', `$@') -dnl @result{} -traceon(`foo', `echo') -dnl @result{} -foo -dnl @error{}m4trace: -1- foo -> `Hello World.' -dnl @result{}Hello World. -echo(`gnus', `and gnats') -dnl @error{}m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats'' -dnl @result{}gnus,and gnats diff -ruNp m4-1.4.9/checks/065.foreach m4-1.4.10/checks/065.foreach --- m4-1.4.9/checks/065.foreach 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/065.foreach 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,26 @@ +dnl @ ../doc/m4.texinfo:2795: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +include(`foreach.m4') +dnl @result{} +define(`_case', ` $1) + $2=" $1";; +')dnl +define(`_cat', `$1$2')dnl +case $`'1 in +dnl @result{}case $1 in +foreach(`x', `(`(`a', `vara')', `(`b', `varb')', `(`c', `varc')')', + `_cat(`_case', x)')dnl +dnl @result{} a) +dnl @result{} vara=" a";; +dnl @result{} b) +dnl @result{} varb=" b";; +dnl @result{} c) +dnl @result{} varc=" c";; +esac +dnl @result{}esac diff -ruNp m4-1.4.9/checks/065.trace m4-1.4.10/checks/065.trace --- m4-1.4.9/checks/065.trace 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/065.trace 1969-12-31 17:00:00.000000000 -0700 @@ -1,34 +0,0 @@ -dnl @ ../doc/m4.texinfo:2888: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -traceoff(`foo') -dnl @result{} -traceon(`foo') -dnl @result{} -foo -dnl @result{}foo -define(`foo', `bar') -dnl @result{} -foo -dnl @error{}m4trace: -1- foo -> `bar' -dnl @result{}bar -undefine(`foo') -dnl @result{} -ifdef(`foo', `yes', `no') -dnl @result{}no -indir(`foo') -dnl @error{}m4:stdin:8: undefined macro `foo' -dnl @result{} -define(`foo', `blah') -dnl @result{} -foo -dnl @error{}m4trace: -1- foo -> `blah' -dnl @result{}blah -traceoff -dnl @result{} -foo -dnl @result{}blah diff -ruNp m4-1.4.9/checks/066.foreach m4-1.4.10/checks/066.foreach --- m4-1.4.9/checks/066.foreach 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/066.foreach 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,17 @@ +dnl @ ../doc/m4.texinfo:2824: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +undivert(`foreach.m4')dnl +dnl @result{}divert(`-1') +dnl @result{}# foreach(x, (item_1, item_2, ..., item_n), stmt) +dnl @result{}# parenthesized list, simple version +dnl @result{}define(`foreach', `pushdef(`$1')_foreach($@)popdef(`$1')') +dnl @result{}define(`_arg1', `$1') +dnl @result{}define(`_foreach', `ifelse(`$2', `()', `', +dnl @result{} `define(`$1', _arg1$2)$3`'$0(`$1', (shift$2), `$3')')') +dnl @result{}divert`'dnl diff -ruNp m4-1.4.9/checks/066.trace m4-1.4.10/checks/066.trace --- m4-1.4.9/checks/066.trace 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/066.trace 1969-12-31 17:00:00.000000000 -0700 @@ -1,19 +0,0 @@ -dnl @ ../doc/m4.texinfo:2921: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -traceon(`eval', `m4_divnum') -dnl @result{} -define(`m4_eval', defn(`eval')) -dnl @result{} -define(`m4_divnum', defn(`divnum')) -dnl @result{} -eval(divnum) -dnl @error{}m4trace: -1- eval(`0') -> `0' -dnl @result{}0 -m4_eval(m4_divnum) -dnl @error{}m4trace: -2- m4_divnum -> `0' -dnl @result{}0 diff -ruNp m4-1.4.9/checks/067.debug_leve m4-1.4.10/checks/067.debug_leve --- m4-1.4.9/checks/067.debug_leve 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/067.debug_leve 1969-12-31 17:00:00.000000000 -0700 @@ -1,26 +0,0 @@ -dnl @ ../doc/m4.texinfo:3028: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `FOO') -dnl @result{} -traceon(`foo') -dnl @result{} -debugmode() -dnl @result{} -foo -dnl @error{}m4trace: -1- foo -> `FOO' -dnl @result{}FOO -debugmode -dnl @result{} -foo -dnl @error{}m4trace: -1- foo -dnl @result{}FOO -debugmode(`+l') -dnl @result{} -foo -dnl @error{}m4trace:8: -1- foo -dnl @result{}FOO diff -ruNp m4-1.4.9/checks/067.foreach m4-1.4.10/checks/067.foreach --- m4-1.4.9/checks/067.foreach 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/067.foreach 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,26 @@ +dnl @ ../doc/m4.texinfo:2850: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`a', `1')define(`b', `2')define(`c', `3') +dnl @result{} +include(`foreach.m4') +dnl @result{} +include(`foreachq.m4') +dnl @result{} +foreach(`x', `(``a'', ``(b'', ``c)'')', `x +') +dnl @result{}1 +dnl @result{}(2)1 +dnl @result{} +dnl @result{}, x +dnl @result{}) +foreachq(`x', ```a'', ``(b'', ``c)''', `x +')dnl +dnl @result{}a +dnl @result{}(b +dnl @result{}c) diff -ruNp m4-1.4.9/checks/068.debug_outp m4-1.4.10/checks/068.debug_outp --- m4-1.4.9/checks/068.debug_outp 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/068.debug_outp 1969-12-31 17:00:00.000000000 -0700 @@ -1,23 +0,0 @@ -dnl @ ../doc/m4.texinfo:3073: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -traceon(`divnum') -dnl @result{} -divnum(`extra') -dnl @error{}m4:stdin:2: Warning: excess arguments to builtin `divnum' ignored -dnl @error{}m4trace: -1- divnum(`extra') -> `0' -dnl @result{}0 -debugfile() -dnl @result{} -divnum(`extra') -dnl @error{}m4:stdin:4: Warning: excess arguments to builtin `divnum' ignored -dnl @result{}0 -debugfile -dnl @result{} -divnum -dnl @error{}m4trace: -1- divnum -> `0' -dnl @result{}0 diff -ruNp m4-1.4.9/checks/068.foreach m4-1.4.10/checks/068.foreach --- m4-1.4.9/checks/068.foreach 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/068.foreach 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:2874: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +undivert(`foreachq.m4')dnl +dnl @result{}include(`quote.m4')dnl +dnl @result{}divert(`-1') +dnl @result{}# foreachq(x, `item_1, item_2, ..., item_n', stmt) +dnl @result{}# quoted list, simple version +dnl @result{}define(`foreachq', `pushdef(`$1')_foreachq($@)popdef(`$1')') +dnl @result{}define(`_arg1', `$1') +dnl @result{}define(`_foreachq', `ifelse(quote($2), `', `', +dnl @result{} `define(`$1', `_arg1($2)')$3`'$0(`$1', `shift($2)', `$3')')') +dnl @result{}divert`'dnl diff -ruNp m4-1.4.9/checks/069.dnl m4-1.4.10/checks/069.dnl --- m4-1.4.9/checks/069.dnl 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/069.dnl 1969-12-31 17:00:00.000000000 -0700 @@ -1,10 +0,0 @@ -dnl @ ../doc/m4.texinfo:3125: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `Macro `foo'.')dnl A very simple macro, indeed. -foo -dnl @result{}Macro foo. diff -ruNp m4-1.4.9/checks/069.dumpdef m4-1.4.10/checks/069.dumpdef --- m4-1.4.9/checks/069.dumpdef 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/069.dumpdef 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:2937: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `Hello world.') +dnl @result{} +dumpdef(`foo') +dnl @error{}foo: `Hello world.' +dnl @result{} +dumpdef(`define') +dnl @error{}define: +dnl @result{} diff -ruNp m4-1.4.9/checks/070.dnl m4-1.4.10/checks/070.dnl --- m4-1.4.9/checks/070.dnl 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/070.dnl 1969-12-31 17:00:00.000000000 -0700 @@ -1,12 +0,0 @@ -dnl @ ../doc/m4.texinfo:3143: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -dnl(`args are ignored, but side effects occur', -define(`foo', `like this')) while this text is ignored: undefine(`foo') -dnl @error{}m4:stdin:1: Warning: excess arguments to builtin `dnl' ignored -See how `foo' was defined, foo? -dnl @result{}See how foo was defined, like this? diff -ruNp m4-1.4.9/checks/070.dumpdef m4-1.4.10/checks/070.dumpdef --- m4-1.4.9/checks/070.dumpdef 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/070.dumpdef 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:2954: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +pushdef(`f', ``$0'1')pushdef(`f', ``$0'2') +dnl @result{} +f(popdef(`f')dumpdef(`f')) +dnl @error{}f: ``$0'1' +dnl @result{}f2 +f(popdef(`f')dumpdef(`f')) +dnl @error{}m4:stdin:3: undefined macro `f' +dnl @result{}f1 diff -ruNp m4-1.4.9/checks/071.dnl m4-1.4.10/checks/071.dnl --- m4-1.4.9/checks/071.dnl 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/071.dnl 1969-12-31 17:00:00.000000000 -0700 @@ -1,14 +0,0 @@ -dnl @ ../doc/m4.texinfo:3154: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -m4wrap(`m4wrap(`2 hi -')0 hi dnl 1 hi') -dnl @result{} -define(`hi', `HI') -dnl @result{} -dnl @error{}m4:stdin:1: Warning: end of file treated as newline -dnl @result{}0 HI 2 HI diff -ruNp m4-1.4.9/checks/071.trace m4-1.4.10/checks/071.trace --- m4-1.4.9/checks/071.trace 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/071.trace 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,20 @@ +dnl @ ../doc/m4.texinfo:2997: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `Hello World.') +dnl @result{} +define(`echo', `$@') +dnl @result{} +traceon(`foo', `echo') +dnl @result{} +foo +dnl @error{}m4trace: -1- foo -> `Hello World.' +dnl @result{}Hello World. +echo(`gnus', `and gnats') +dnl @error{}m4trace: -1- echo(`gnus', `and gnats') -> ``gnus',`and gnats'' +dnl @result{}gnus,and gnats diff -ruNp m4-1.4.9/checks/072.changequot m4-1.4.10/checks/072.changequot --- m4-1.4.9/checks/072.changequot 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/072.changequot 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:3185: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -changequote(`[', `]') -dnl @result{} -define([foo], [Macro [foo].]) -dnl @result{} -foo -dnl @result{}Macro foo. diff -ruNp m4-1.4.9/checks/072.trace m4-1.4.10/checks/072.trace --- m4-1.4.9/checks/072.trace 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/072.trace 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:3024: Origin of test +dnl @ expected status: 1 +dnl @ extra options: -dp -L3 -tifelse +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +ifelse(`one level') +dnl @error{}m4trace: -1- ifelse +dnl @result{} +ifelse(ifelse(ifelse(`three levels'))) +dnl @error{}m4trace: -3- ifelse +dnl @error{}m4trace: -2- ifelse +dnl @error{}m4trace: -1- ifelse +dnl @result{} +ifelse(ifelse(ifelse(ifelse(`four levels')))) +dnl @error{}m4:stdin:3: recursion limit of 3 exceeded, use -L to change it diff -ruNp m4-1.4.9/checks/073.changequot m4-1.4.10/checks/073.changequot --- m4-1.4.9/checks/073.changequot 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/073.changequot 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:3200: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`a', `b') -dnl @result{} -«a» -dnl @result{}«b» -changequote(`«', `»') -dnl @result{} -«a» -dnl @result{}a diff -ruNp m4-1.4.9/checks/073.trace m4-1.4.10/checks/073.trace --- m4-1.4.9/checks/073.trace 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/073.trace 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,35 @@ +dnl @ ../doc/m4.texinfo:3042: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +traceoff(`foo') +dnl @result{} +traceon(`foo') +dnl @result{} +foo +dnl @result{}foo +define(`foo', `bar') +dnl @result{} +foo +dnl @error{}m4trace: -1- foo -> `bar' +dnl @result{}bar +undefine(`foo') +dnl @result{} +ifdef(`foo', `yes', `no') +dnl @result{}no +indir(`foo') +dnl @error{}m4:stdin:8: undefined macro `foo' +dnl @result{} +define(`foo', `blah') +dnl @result{} +foo +dnl @error{}m4trace: -1- foo -> `blah' +dnl @result{}blah +traceoff +dnl @result{} +foo +dnl @result{}blah diff -ruNp m4-1.4.9/checks/074.changequot m4-1.4.10/checks/074.changequot --- m4-1.4.9/checks/074.changequot 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/074.changequot 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:3215: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -changequote(`[[[', `]]]') -dnl @result{} -define([[[foo]]], [[[Macro [[[[[foo]]]]].]]]) -dnl @result{} -foo -dnl @result{}Macro [[foo]]. diff -ruNp m4-1.4.9/checks/074.trace m4-1.4.10/checks/074.trace --- m4-1.4.9/checks/074.trace 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/074.trace 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,20 @@ +dnl @ ../doc/m4.texinfo:3076: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +traceon(`eval', `m4_divnum') +dnl @result{} +define(`m4_eval', defn(`eval')) +dnl @result{} +define(`m4_divnum', defn(`divnum')) +dnl @result{} +eval(divnum) +dnl @error{}m4trace: -1- eval(`0') -> `0' +dnl @result{}0 +m4_eval(m4_divnum) +dnl @error{}m4trace: -2- m4_divnum -> `0' +dnl @result{}0 diff -ruNp m4-1.4.9/checks/075.changequot m4-1.4.10/checks/075.changequot --- m4-1.4.9/checks/075.changequot 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/075.changequot 1969-12-31 17:00:00.000000000 -0700 @@ -1,19 +0,0 @@ -dnl @ ../doc/m4.texinfo:3237: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `Macro `FOO'.') -dnl @result{} -changequote(`', `') -dnl @result{} -foo -dnl @result{}Macro `FOO'. -`foo' -dnl @result{}`Macro `FOO'.' -changequote(`,) -dnl @result{} -foo -dnl @result{}Macro FOO. diff -ruNp m4-1.4.9/checks/075.debug_leve m4-1.4.10/checks/075.debug_leve --- m4-1.4.9/checks/075.debug_leve 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/075.debug_leve 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,27 @@ +dnl @ ../doc/m4.texinfo:3185: Origin of test +dnl @ expected status: 0 +dnl @ extra options: -dp +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `FOO') +dnl @result{} +traceon(`foo') +dnl @result{} +debugmode() +dnl @result{} +foo +dnl @error{}m4trace: -1- foo -> `FOO' +dnl @result{}FOO +debugmode +dnl @result{} +foo +dnl @error{}m4trace: -1- foo +dnl @result{}FOO +debugmode(`+l') +dnl @result{} +foo +dnl @error{}m4trace:8: -1- foo +dnl @result{}FOO diff -ruNp m4-1.4.9/checks/076.changequot m4-1.4.10/checks/076.changequot --- m4-1.4.9/checks/076.changequot 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/076.changequot 1969-12-31 17:00:00.000000000 -0700 @@ -1,31 +0,0 @@ -dnl @ ../doc/m4.texinfo:3270: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`echo', `$@') -dnl @result{} -define(`hi', `HI') -dnl @result{} -changequote(`q', `Q') -dnl @result{} -q hi Q hi -dnl @result{}q HI Q HI -echo(hi) -dnl @result{}qHIQ -changequote -dnl @result{} -changequote(`-', `EOF') -dnl @result{} -- hi EOF hi -dnl @result{} hi HI -changequote -dnl @result{} -changequote(`1', `2') -dnl @result{} -hi1hi2 -dnl @result{}hi1hi2 -hi 1hi2 -dnl @result{}HI hi diff -ruNp m4-1.4.9/checks/076.debug_outp m4-1.4.10/checks/076.debug_outp --- m4-1.4.9/checks/076.debug_outp 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/076.debug_outp 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,24 @@ +dnl @ ../doc/m4.texinfo:3231: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +traceon(`divnum') +dnl @result{} +divnum(`extra') +dnl @error{}m4:stdin:2: Warning: excess arguments to builtin `divnum' ignored +dnl @error{}m4trace: -1- divnum(`extra') -> `0' +dnl @result{}0 +debugfile() +dnl @result{} +divnum(`extra') +dnl @error{}m4:stdin:4: Warning: excess arguments to builtin `divnum' ignored +dnl @result{}0 +debugfile +dnl @result{} +divnum +dnl @error{}m4trace: -1- divnum -> `0' +dnl @result{}0 diff -ruNp m4-1.4.9/checks/077.changequot m4-1.4.10/checks/077.changequot --- m4-1.4.9/checks/077.changequot 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/077.changequot 1969-12-31 17:00:00.000000000 -0700 @@ -1,29 +0,0 @@ -dnl @ ../doc/m4.texinfo:3303: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`echo', `$#:$@:') -dnl @result{} -define(`hi', `HI') -dnl @result{} -changequote(`(',`)') -dnl @result{} -echo(hi) -dnl @result{}0::hi -changequote -dnl @result{} -changequote(`((', `))') -dnl @result{} -echo(hi) -dnl @result{}1:HI: -echo((hi)) -dnl @result{}0::hi -changequote -dnl @result{} -changequote(`,', `)') -dnl @result{} -echo(hi,hi)bye) -dnl @result{}1:HIhibye: diff -ruNp m4-1.4.9/checks/077.dnl m4-1.4.10/checks/077.dnl --- m4-1.4.9/checks/077.dnl 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/077.dnl 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,11 @@ +dnl @ ../doc/m4.texinfo:3284: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `Macro `foo'.')dnl A very simple macro, indeed. +foo +dnl @result{}Macro foo. diff -ruNp m4-1.4.9/checks/078.changequot m4-1.4.10/checks/078.changequot --- m4-1.4.9/checks/078.changequot 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/078.changequot 1969-12-31 17:00:00.000000000 -0700 @@ -1,25 +0,0 @@ -dnl @ ../doc/m4.texinfo:3335: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`hi', `HI') -dnl @result{} -changequote(`""', `"') -dnl @result{} -""hi"""hi" -dnl @result{}hihi -""hi" ""hi" -dnl @result{}hi hi -""hi"" "hi" -dnl @result{}hi" "HI" -changequote -dnl @result{} -`hi`hi'hi' -dnl @result{}hi`hi'hi -changequote(`"', `"') -dnl @result{} -"hi"hi"hi" -dnl @result{}hiHIhi diff -ruNp m4-1.4.9/checks/078.dnl m4-1.4.10/checks/078.dnl --- m4-1.4.9/checks/078.dnl 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/078.dnl 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,13 @@ +dnl @ ../doc/m4.texinfo:3302: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +dnl(`args are ignored, but side effects occur', +define(`foo', `like this')) while this text is ignored: undefine(`foo') +dnl @error{}m4:stdin:1: Warning: excess arguments to builtin `dnl' ignored +See how `foo' was defined, foo? +dnl @result{}See how foo was defined, like this? diff -ruNp m4-1.4.9/checks/079.changequot m4-1.4.10/checks/079.changequot --- m4-1.4.9/checks/079.changequot 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/079.changequot 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:3359: Origin of test -dnl @ expected status: 1 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -`hello world' -dnl @result{}hello world -`dangling quote -dnl @error{}m4:stdin:2: ERROR: end of file in string diff -ruNp m4-1.4.9/checks/079.dnl m4-1.4.10/checks/079.dnl --- m4-1.4.9/checks/079.dnl 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/079.dnl 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,15 @@ +dnl @ ../doc/m4.texinfo:3313: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +m4wrap(`m4wrap(`2 hi +')0 hi dnl 1 hi') +dnl @result{} +define(`hi', `HI') +dnl @result{} +dnl @error{}m4:stdin:1: Warning: end of file treated as newline +dnl @result{}0 HI 2 HI diff -ruNp m4-1.4.9/checks/080.changecom m4-1.4.10/checks/080.changecom --- m4-1.4.9/checks/080.changecom 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/080.changecom 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:3386: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`comment', `COMMENT') -dnl @result{} -# A normal comment -dnl @result{}# A normal comment -changecom(`/*', `*/') -dnl @result{} -# Not a comment anymore -dnl @result{}# Not a COMMENT anymore -But: /* this is a comment now */ while this is not a comment -dnl @result{}But: /* this is a comment now */ while this is not a COMMENT diff -ruNp m4-1.4.9/checks/080.changequot m4-1.4.10/checks/080.changequot --- m4-1.4.9/checks/080.changequot 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/080.changequot 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:3344: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +changequote(`[', `]') +dnl @result{} +define([foo], [Macro [foo].]) +dnl @result{} +foo +dnl @result{}Macro foo. diff -ruNp m4-1.4.9/checks/081.changecom m4-1.4.10/checks/081.changecom --- m4-1.4.9/checks/081.changecom 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/081.changecom 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:3413: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`comment', `COMMENT') -dnl @result{} -changecom -dnl @result{} -# Not a comment anymore -dnl @result{}# Not a COMMENT anymore -changecom(`#', `') -dnl @result{} -# comment again -dnl @result{}# comment again diff -ruNp m4-1.4.9/checks/081.changequot m4-1.4.10/checks/081.changequot --- m4-1.4.9/checks/081.changequot 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/081.changequot 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:3359: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`a', `b') +dnl @result{} +«a» +dnl @result{}«b» +changequote(`«', `»') +dnl @result{} +«a» +dnl @result{}a diff -ruNp m4-1.4.9/checks/082.changecom m4-1.4.10/checks/082.changecom --- m4-1.4.9/checks/082.changecom 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/082.changecom 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:3432: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`a', `b') -dnl @result{} -«a» -dnl @result{}«b» -changecom(`«', `»') -dnl @result{} -«a» -dnl @result{}«a» diff -ruNp m4-1.4.9/checks/082.changequot m4-1.4.10/checks/082.changequot --- m4-1.4.9/checks/082.changequot 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/082.changequot 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:3374: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +changequote(`[[[', `]]]') +dnl @result{} +define([[[foo]]], [[[Macro [[[[[foo]]]]].]]]) +dnl @result{} +foo +dnl @result{}Macro [[foo]]. diff -ruNp m4-1.4.9/checks/083.changecom m4-1.4.10/checks/083.changecom --- m4-1.4.9/checks/083.changecom 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/083.changecom 1969-12-31 17:00:00.000000000 -0700 @@ -1,21 +0,0 @@ -dnl @ ../doc/m4.texinfo:3455: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`hi', `HI') -dnl @result{} -define(`hi1hi2', `hello') -dnl @result{} -changecom(`q', `Q') -dnl @result{} -q hi Q hi -dnl @result{}q hi Q HI -changecom(`1', `2') -dnl @result{} -hi1hi2 -dnl @result{}hello -hi 1hi2 -dnl @result{}HI 1hi2 diff -ruNp m4-1.4.9/checks/083.changequot m4-1.4.10/checks/083.changequot --- m4-1.4.9/checks/083.changequot 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/083.changequot 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,20 @@ +dnl @ ../doc/m4.texinfo:3396: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `Macro `FOO'.') +dnl @result{} +changequote(`', `') +dnl @result{} +foo +dnl @result{}Macro `FOO'. +`foo' +dnl @result{}`Macro `FOO'.' +changequote(`,) +dnl @result{} +foo +dnl @result{}Macro FOO. diff -ruNp m4-1.4.9/checks/084.changecom m4-1.4.10/checks/084.changecom --- m4-1.4.9/checks/084.changecom 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/084.changecom 1969-12-31 17:00:00.000000000 -0700 @@ -1,27 +0,0 @@ -dnl @ ../doc/m4.texinfo:3478: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`echo', `$#:$@:') -dnl @result{} -define(`hi', `HI') -dnl @result{} -changecom(`(',`)') -dnl @result{} -echo(hi) -dnl @result{}0::(hi) -changecom -dnl @result{} -changecom(`((', `))') -dnl @result{} -echo(hi) -dnl @result{}1:HI: -echo((hi)) -dnl @result{}0::((hi)) -changecom(`,', `)') -dnl @result{} -echo(hi,hi)bye) -dnl @result{}1:HI,hi)bye: diff -ruNp m4-1.4.9/checks/084.changequot m4-1.4.10/checks/084.changequot --- m4-1.4.9/checks/084.changequot 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/084.changequot 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,32 @@ +dnl @ ../doc/m4.texinfo:3429: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`echo', `$@') +dnl @result{} +define(`hi', `HI') +dnl @result{} +changequote(`q', `Q') +dnl @result{} +q hi Q hi +dnl @result{}q HI Q HI +echo(hi) +dnl @result{}qHIQ +changequote +dnl @result{} +changequote(`-', `EOF') +dnl @result{} +- hi EOF hi +dnl @result{} hi HI +changequote +dnl @result{} +changequote(`1', `2') +dnl @result{} +hi1hi2 +dnl @result{}hi1hi2 +hi 1hi2 +dnl @result{}HI hi diff -ruNp m4-1.4.9/checks/085.changecom m4-1.4.10/checks/085.changecom --- m4-1.4.9/checks/085.changecom 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/085.changecom 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:3504: Origin of test -dnl @ expected status: 1 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -changecom(`/*', `*/') -dnl @result{} -/*dangling comment -dnl @error{}m4:stdin:2: ERROR: end of file in comment diff -ruNp m4-1.4.9/checks/085.changequot m4-1.4.10/checks/085.changequot --- m4-1.4.9/checks/085.changequot 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/085.changequot 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,30 @@ +dnl @ ../doc/m4.texinfo:3462: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`echo', `$#:$@:') +dnl @result{} +define(`hi', `HI') +dnl @result{} +changequote(`(',`)') +dnl @result{} +echo(hi) +dnl @result{}0::hi +changequote +dnl @result{} +changequote(`((', `))') +dnl @result{} +echo(hi) +dnl @result{}1:HI: +echo((hi)) +dnl @result{}0::hi +changequote +dnl @result{} +changequote(`,', `)') +dnl @result{} +echo(hi,hi)bye) +dnl @result{}1:HIhibye: diff -ruNp m4-1.4.9/checks/086.changequot m4-1.4.10/checks/086.changequot --- m4-1.4.9/checks/086.changequot 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/086.changequot 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,26 @@ +dnl @ ../doc/m4.texinfo:3494: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`hi', `HI') +dnl @result{} +changequote(`""', `"') +dnl @result{} +""hi"""hi" +dnl @result{}hihi +""hi" ""hi" +dnl @result{}hi hi +""hi"" "hi" +dnl @result{}hi" "HI" +changequote +dnl @result{} +`hi`hi'hi' +dnl @result{}hi`hi'hi +changequote(`"', `"') +dnl @result{} +"hi"hi"hi" +dnl @result{}hiHIhi diff -ruNp m4-1.4.9/checks/086.changeword m4-1.4.10/checks/086.changeword --- m4-1.4.9/checks/086.changeword 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/086.changeword 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:3557: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -ifdef(`changeword', `', `errprint(` skipping: no changeword support -')m4exit(`77')')dnl -changeword(`[_a-zA-Z0-9]+') -dnl @result{} -define(`1', `0')1 -dnl @result{}0 diff -ruNp m4-1.4.9/checks/087.changequot m4-1.4.10/checks/087.changequot --- m4-1.4.9/checks/087.changequot 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/087.changequot 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:3518: Origin of test +dnl @ expected status: 1 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +`hello world' +dnl @result{}hello world +`dangling quote +dnl @error{}m4:stdin:2: ERROR: end of file in string diff -ruNp m4-1.4.9/checks/087.changeword m4-1.4.10/checks/087.changeword --- m4-1.4.9/checks/087.changeword 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/087.changeword 1969-12-31 17:00:00.000000000 -0700 @@ -1,18 +0,0 @@ -dnl @ ../doc/m4.texinfo:3570: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -ifdef(`changeword', `', `errprint(` skipping: no changeword support -')m4exit(`77')')dnl -define(`_indir', defn(`indir')) -dnl @result{} -changeword(`_[_a-zA-Z0-9]*') -dnl @result{} -esyscmd(`foo') -dnl @result{}esyscmd(foo) -_indir(`esyscmd', `echo hi') -dnl @result{}hi -dnl @result{} diff -ruNp m4-1.4.9/checks/088.changecom m4-1.4.10/checks/088.changecom --- m4-1.4.9/checks/088.changecom 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/088.changecom 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:3545: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`comment', `COMMENT') +dnl @result{} +# A normal comment +dnl @result{}# A normal comment +changecom(`/*', `*/') +dnl @result{} +# Not a comment anymore +dnl @result{}# Not a COMMENT anymore +But: /* this is a comment now */ while this is not a comment +dnl @result{}But: /* this is a comment now */ while this is not a COMMENT diff -ruNp m4-1.4.9/checks/088.changeword m4-1.4.10/checks/088.changeword --- m4-1.4.9/checks/088.changeword 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/088.changeword 1969-12-31 17:00:00.000000000 -0700 @@ -1,39 +0,0 @@ -dnl @ ../doc/m4.texinfo:3589: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -ifdef(`changeword', `', `errprint(` skipping: no changeword support -')m4exit(`77')')dnl -define(`foo -', `bar -') -dnl @result{} -dnl This example wants to recognize changeword, dnl, and `foo\n'. -dnl First, we check that our regexp will match. -regexp(`changeword', `[cd][a-z]*\|foo[ -]') -dnl @result{}0 -regexp(`foo -', `[cd][a-z]*\|foo[ -]') -dnl @result{}0 -regexp(`f', `[cd][a-z]*\|foo[ -]') -dnl @result{}-1 -foo -dnl @result{}foo -changeword(`[cd][a-z]*\|foo[ -]') -dnl @result{} -dnl Even though `foo\n' matches, we forgot to allow `f'. -foo -dnl @result{}foo -changeword(`[cd][a-z]*\|fo*[ -]?') -dnl @result{} -dnl Now we can call `foo\n'. -foo -dnl @result{}bar diff -ruNp m4-1.4.9/checks/089.changecom m4-1.4.10/checks/089.changecom --- m4-1.4.9/checks/089.changecom 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/089.changecom 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:3572: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`comment', `COMMENT') +dnl @result{} +changecom +dnl @result{} +# Not a comment anymore +dnl @result{}# Not a COMMENT anymore +changecom(`#', `') +dnl @result{} +# comment again +dnl @result{}# comment again diff -ruNp m4-1.4.9/checks/089.changeword m4-1.4.10/checks/089.changeword --- m4-1.4.9/checks/089.changeword 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/089.changeword 1969-12-31 17:00:00.000000000 -0700 @@ -1,37 +0,0 @@ -dnl @ ../doc/m4.texinfo:3631: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -ifdef(`changeword', `', `errprint(` skipping: no changeword support -')m4exit(`77')')dnl -define(`bar -', defn(`dnl'))dnl -define(`baz', `dnl -include(`foo') ignored -dnl')dnl -changeword(`\([_a-zA-Z][_a-zA-Z0-9]*\|bar -\)') -dnl @result{} -__file__:__line__ -dnl @result{}stdin:10 -include(`foo') ignored -__file__:__line__ -dnl @result{}stdin:12 -baz ignored -__file__:__line__ -dnl @result{}stdin:14 -define(`bar -', defn(`__file__')) -dnl @result{} -include(`foo') -dnl @result{}../examples/foo -define(`bar -', defn(`__line__')) -dnl @result{} -include(`foo') -dnl @result{}1 -__file__:__line__ -dnl @result{}stdin:21 diff -ruNp m4-1.4.9/checks/090.changecom m4-1.4.10/checks/090.changecom --- m4-1.4.9/checks/090.changecom 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/090.changecom 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:3591: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`a', `b') +dnl @result{} +«a» +dnl @result{}«b» +changecom(`«', `»') +dnl @result{} +«a» +dnl @result{}«a» diff -ruNp m4-1.4.9/checks/090.changeword m4-1.4.10/checks/090.changeword --- m4-1.4.9/checks/090.changeword 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/090.changeword 1969-12-31 17:00:00.000000000 -0700 @@ -1,19 +0,0 @@ -dnl @ ../doc/m4.texinfo:3669: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -ifdef(`changeword', `', `errprint(` skipping: no changeword support -')m4exit(`77')')dnl -ifdef(`__unix__', , - `errprint(` skipping: syscmd does not have unix semantics -')m4exit(`77')')dnl -changecom(`/*', `*/')dnl -define(`foo', `bar')dnl -changeword(`#\([_a-zA-Z0-9]*\)') -dnl @result{} -#esyscmd(`echo foo \#foo') -dnl @result{}foo bar -dnl @result{} diff -ruNp m4-1.4.9/checks/091.changecom m4-1.4.10/checks/091.changecom --- m4-1.4.9/checks/091.changecom 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/091.changecom 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,22 @@ +dnl @ ../doc/m4.texinfo:3614: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`hi', `HI') +dnl @result{} +define(`hi1hi2', `hello') +dnl @result{} +changecom(`q', `Q') +dnl @result{} +q hi Q hi +dnl @result{}q hi Q HI +changecom(`1', `2') +dnl @result{} +hi1hi2 +dnl @result{}hello +hi 1hi2 +dnl @result{}HI 1hi2 diff -ruNp m4-1.4.9/checks/091.changeword m4-1.4.10/checks/091.changeword --- m4-1.4.9/checks/091.changeword 2007-03-23 07:36:09.000000000 -0600 +++ m4-1.4.10/checks/091.changeword 1969-12-31 17:00:00.000000000 -0700 @@ -1,14 +0,0 @@ -dnl @ ../doc/m4.texinfo:3706: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -ifdef(`changeword', `', `errprint(` skipping: no changeword support -')m4exit(`77')')dnl -define(`a', `errprint(`Hello')')dnl -changeword(`@\([_a-zA-Z0-9]*\)') -dnl @result{} -@a -dnl @result{}errprint(Hello) diff -ruNp m4-1.4.9/checks/092.changecom m4-1.4.10/checks/092.changecom --- m4-1.4.9/checks/092.changecom 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/092.changecom 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,28 @@ +dnl @ ../doc/m4.texinfo:3637: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`echo', `$#:$@:') +dnl @result{} +define(`hi', `HI') +dnl @result{} +changecom(`(',`)') +dnl @result{} +echo(hi) +dnl @result{}0::(hi) +changecom +dnl @result{} +changecom(`((', `))') +dnl @result{} +echo(hi) +dnl @result{}1:HI: +echo((hi)) +dnl @result{}0::((hi)) +changecom(`,', `)') +dnl @result{} +echo(hi,hi)bye) +dnl @result{}1:HI,hi)bye: diff -ruNp m4-1.4.9/checks/092.m4wrap m4-1.4.10/checks/092.m4wrap --- m4-1.4.9/checks/092.m4wrap 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/092.m4wrap 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:3759: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`cleanup', `This is the `cleanup' action. -') -dnl @result{} -m4wrap(`cleanup') -dnl @result{} -This is the first and last normal input line. -dnl @result{}This is the first and last normal input line. -dnl @result{}This is the cleanup action. diff -ruNp m4-1.4.9/checks/093.changecom m4-1.4.10/checks/093.changecom --- m4-1.4.9/checks/093.changecom 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/093.changecom 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:3663: Origin of test +dnl @ expected status: 1 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +changecom(`/*', `*/') +dnl @result{} +/*dangling comment +dnl @error{}m4:stdin:2: ERROR: end of file in comment diff -ruNp m4-1.4.9/checks/093.m4wrap m4-1.4.10/checks/093.m4wrap --- m4-1.4.9/checks/093.m4wrap 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/093.m4wrap 1969-12-31 17:00:00.000000000 -0700 @@ -1,14 +0,0 @@ -dnl @ ../doc/m4.texinfo:3788: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`f', `ifelse(`$1', `0', `Answer: 0!=1 -', eval(`$1>1'), `0', `Answer: $2$1=eval(`$2$1') -', `m4wrap(`f(decr(`$1'), `$2$1*')')')') -dnl @result{} -f(`10') -dnl @result{} -dnl @result{}Answer: 10*9*8*7*6*5*4*3*2*1=3628800 diff -ruNp m4-1.4.9/checks/094.changeword m4-1.4.10/checks/094.changeword --- m4-1.4.9/checks/094.changeword 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/094.changeword 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:3716: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +ifdef(`changeword', `', `errprint(` skipping: no changeword support +')m4exit(`77')')dnl +changeword(`[_a-zA-Z0-9]+') +dnl @result{} +define(`1', `0')1 +dnl @result{}0 diff -ruNp m4-1.4.9/checks/094.m4wrap m4-1.4.10/checks/094.m4wrap --- m4-1.4.9/checks/094.m4wrap 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/094.m4wrap 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:3802: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`aa', `AA -') -dnl @result{} -m4wrap(`a')m4wrap(`a') -dnl @result{} -dnl @result{}AA diff -ruNp m4-1.4.9/checks/095.changeword m4-1.4.10/checks/095.changeword --- m4-1.4.9/checks/095.changeword 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/095.changeword 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,19 @@ +dnl @ ../doc/m4.texinfo:3729: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +ifdef(`changeword', `', `errprint(` skipping: no changeword support +')m4exit(`77')')dnl +define(`_indir', defn(`indir')) +dnl @result{} +changeword(`_[_a-zA-Z0-9]*') +dnl @result{} +esyscmd(`foo') +dnl @result{}esyscmd(foo) +_indir(`esyscmd', `echo hi') +dnl @result{}hi +dnl @result{} diff -ruNp m4-1.4.9/checks/095.m4wrap m4-1.4.10/checks/095.m4wrap --- m4-1.4.9/checks/095.m4wrap 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/095.m4wrap 1969-12-31 17:00:00.000000000 -0700 @@ -1,10 +0,0 @@ -dnl @ ../doc/m4.texinfo:3817: Origin of test -dnl @ expected status: 1 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -m4wrap(`m4wrap(`)')len(abc') -dnl @result{} -dnl @error{}m4:stdin:1: ERROR: end of file in argument list diff -ruNp m4-1.4.9/checks/096.changeword m4-1.4.10/checks/096.changeword --- m4-1.4.9/checks/096.changeword 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/096.changeword 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,40 @@ +dnl @ ../doc/m4.texinfo:3748: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +ifdef(`changeword', `', `errprint(` skipping: no changeword support +')m4exit(`77')')dnl +define(`foo +', `bar +') +dnl @result{} +dnl This example wants to recognize changeword, dnl, and `foo\n'. +dnl First, we check that our regexp will match. +regexp(`changeword', `[cd][a-z]*\|foo[ +]') +dnl @result{}0 +regexp(`foo +', `[cd][a-z]*\|foo[ +]') +dnl @result{}0 +regexp(`f', `[cd][a-z]*\|foo[ +]') +dnl @result{}-1 +foo +dnl @result{}foo +changeword(`[cd][a-z]*\|foo[ +]') +dnl @result{} +dnl Even though `foo\n' matches, we forgot to allow `f'. +foo +dnl @result{}foo +changeword(`[cd][a-z]*\|fo*[ +]?') +dnl @result{} +dnl Now we can call `foo\n'. +foo +dnl @result{}bar diff -ruNp m4-1.4.9/checks/096.include m4-1.4.10/checks/096.include --- m4-1.4.9/checks/096.include 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/096.include 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:3859: Origin of test -dnl @ expected status: 1 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -include(`none') -dnl @error{}m4:stdin:1: cannot open `none': No such file or directory -dnl @result{} -include() -dnl @error{}m4:stdin:2: cannot open `': No such file or directory -dnl @result{} -sinclude(`none') -dnl @result{} -sinclude() -dnl @result{} diff -ruNp m4-1.4.9/checks/097.changeword m4-1.4.10/checks/097.changeword --- m4-1.4.9/checks/097.changeword 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/097.changeword 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,38 @@ +dnl @ ../doc/m4.texinfo:3790: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +ifdef(`changeword', `', `errprint(` skipping: no changeword support +')m4exit(`77')')dnl +define(`bar +', defn(`dnl'))dnl +define(`baz', `dnl +include(`foo') ignored +dnl')dnl +changeword(`\([_a-zA-Z][_a-zA-Z0-9]*\|bar +\)') +dnl @result{} +__file__:__line__ +dnl @result{}stdin:10 +include(`foo') ignored +__file__:__line__ +dnl @result{}stdin:12 +baz ignored +__file__:__line__ +dnl @result{}stdin:14 +define(`bar +', defn(`__file__')) +dnl @result{} +include(`foo') +dnl @result{}../examples/foo +define(`bar +', defn(`__line__')) +dnl @result{} +include(`foo') +dnl @result{}1 +__file__:__line__ +dnl @result{}stdin:21 diff -ruNp m4-1.4.9/checks/097.include m4-1.4.10/checks/097.include --- m4-1.4.9/checks/097.include 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/097.include 1969-12-31 17:00:00.000000000 -0700 @@ -1,14 +0,0 @@ -dnl @ ../doc/m4.texinfo:3890: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `FOO') -dnl @result{} -include(`incl.m4') -dnl @result{}Include file start -dnl @result{}FOO -dnl @result{}Include file end -dnl @result{} diff -ruNp m4-1.4.9/checks/098.changeword m4-1.4.10/checks/098.changeword --- m4-1.4.9/checks/098.changeword 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/098.changeword 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,20 @@ +dnl @ ../doc/m4.texinfo:3828: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +ifdef(`changeword', `', `errprint(` skipping: no changeword support +')m4exit(`77')')dnl +ifdef(`__unix__', , + `errprint(` skipping: syscmd does not have unix semantics +')m4exit(`77')')dnl +changecom(`/*', `*/')dnl +define(`foo', `bar')dnl +changeword(`#\([_a-zA-Z0-9]*\)') +dnl @result{} +#esyscmd(`echo foo \#foo') +dnl @result{}foo bar +dnl @result{} diff -ruNp m4-1.4.9/checks/098.include m4-1.4.10/checks/098.include --- m4-1.4.9/checks/098.include 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/098.include 1969-12-31 17:00:00.000000000 -0700 @@ -1,14 +0,0 @@ -dnl @ ../doc/m4.texinfo:3905: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`bar', include(`incl.m4')) -dnl @result{} -This is `bar': >>bar<< -dnl @result{}This is bar: >>Include file start -dnl @result{}foo -dnl @result{}Include file end -dnl @result{}<< diff -ruNp m4-1.4.9/checks/099.changeword m4-1.4.10/checks/099.changeword --- m4-1.4.9/checks/099.changeword 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/099.changeword 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,15 @@ +dnl @ ../doc/m4.texinfo:3865: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +ifdef(`changeword', `', `errprint(` skipping: no changeword support +')m4exit(`77')')dnl +define(`a', `errprint(`Hello')')dnl +changeword(`@\([_a-zA-Z0-9]*\)') +dnl @result{} +@a +dnl @result{}errprint(Hello) diff -ruNp m4-1.4.9/checks/099.diversions m4-1.4.10/checks/099.diversions --- m4-1.4.9/checks/099.diversions 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/099.diversions 1969-12-31 17:00:00.000000000 -0700 @@ -1,34 +0,0 @@ -dnl @ ../doc/m4.texinfo:3976: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -divert(`-1')define(`f', `.') -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -divert`'dnl -len(f) -dnl @result{}1048576 -divert(`1') -f -divert(`-1')undivert diff -ruNp m4-1.4.9/checks/100.diversions m4-1.4.10/checks/100.diversions --- m4-1.4.9/checks/100.diversions 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/100.diversions 1969-12-31 17:00:00.000000000 -0700 @@ -1,34 +0,0 @@ -dnl @ ../doc/m4.texinfo:4008: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -divert(`-1')define(`f', `.') -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -define(`f', defn(`f')defn(`f')) -divert`'dnl -len(f) -dnl @result{}1048576 -divert(`1') -f -m4exit diff -ruNp m4-1.4.9/checks/100.m4wrap m4-1.4.10/checks/100.m4wrap --- m4-1.4.9/checks/100.m4wrap 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/100.m4wrap 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:3918: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`cleanup', `This is the `cleanup' action. +') +dnl @result{} +m4wrap(`cleanup') +dnl @result{} +This is the first and last normal input line. +dnl @result{}This is the first and last normal input line. +dnl @result{}This is the cleanup action. diff -ruNp m4-1.4.9/checks/101.divert m4-1.4.10/checks/101.divert --- m4-1.4.9/checks/101.divert 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/101.divert 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:4073: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -divert(`1') -This text is diverted. -divert -dnl @result{} -This text is not diverted. -dnl @result{}This text is not diverted. -dnl @result{} -dnl @result{}This text is diverted. diff -ruNp m4-1.4.9/checks/101.m4wrap m4-1.4.10/checks/101.m4wrap --- m4-1.4.9/checks/101.m4wrap 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/101.m4wrap 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,15 @@ +dnl @ ../doc/m4.texinfo:3947: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`f', `ifelse(`$1', `0', `Answer: 0!=1 +', eval(`$1>1'), `0', `Answer: $2$1=eval(`$2$1') +', `m4wrap(`f(decr(`$1'), `$2$1*')')')') +dnl @result{} +f(`10') +dnl @result{} +dnl @result{}Answer: 10*9*8*7*6*5*4*3*2*1=3628800 diff -ruNp m4-1.4.9/checks/102.divert m4-1.4.10/checks/102.divert --- m4-1.4.9/checks/102.divert 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/102.divert 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:4089: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`text', `TEXT') -dnl @result{} -divert(`1')`diverted text.' -divert -dnl @result{} -m4wrap(`Wrapped text precedes ') -dnl @result{} -dnl @result{}Wrapped TEXT precedes diverted text. diff -ruNp m4-1.4.9/checks/102.m4wrap m4-1.4.10/checks/102.m4wrap --- m4-1.4.9/checks/102.m4wrap 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/102.m4wrap 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:3961: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`aa', `AA +') +dnl @result{} +m4wrap(`a')m4wrap(`a') +dnl @result{} +dnl @result{}AA diff -ruNp m4-1.4.9/checks/103.divert m4-1.4.10/checks/103.divert --- m4-1.4.9/checks/103.divert 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/103.divert 1969-12-31 17:00:00.000000000 -0700 @@ -1,12 +0,0 @@ -dnl @ ../doc/m4.texinfo:4108: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -divert(`-1') -define(`foo', `Macro `foo'.') -define(`bar', `Macro `bar'.') -divert -dnl @result{} diff -ruNp m4-1.4.9/checks/103.m4wrap m4-1.4.10/checks/103.m4wrap --- m4-1.4.9/checks/103.m4wrap 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/103.m4wrap 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,11 @@ +dnl @ ../doc/m4.texinfo:3976: Origin of test +dnl @ expected status: 1 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +m4wrap(`m4wrap(`)')len(abc') +dnl @result{} +dnl @error{}m4:stdin:1: ERROR: end of file in argument list diff -ruNp m4-1.4.9/checks/104.divert m4-1.4.10/checks/104.divert --- m4-1.4.9/checks/104.divert 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/104.divert 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:4122: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -divert(eval(`1<<28'))world -divert(`2')hello -dnl @result{}hello -dnl @result{}world diff -ruNp m4-1.4.9/checks/104.include m4-1.4.10/checks/104.include --- m4-1.4.9/checks/104.include 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/104.include 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:4018: Origin of test +dnl @ expected status: 1 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +include(`none') +dnl @error{}m4:stdin:1: cannot open `none': No such file or directory +dnl @result{} +include() +dnl @error{}m4:stdin:2: cannot open `': No such file or directory +dnl @result{} +sinclude(`none') +dnl @result{} +sinclude() +dnl @result{} diff -ruNp m4-1.4.9/checks/105.divert m4-1.4.10/checks/105.divert --- m4-1.4.9/checks/105.divert 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/105.divert 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:4137: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -We decided to divert the stream for irrigation. -dnl @result{}We decided to the stream for irrigation. -define(`divert', `ifelse(`$#', `0', ``$0'', `builtin(`$0', $@)')') -dnl @result{} -divert(`-1') -Ignored text. -divert(`0') -dnl @result{} -We decided to divert the stream for irrigation. -dnl @result{}We decided to divert the stream for irrigation. diff -ruNp m4-1.4.9/checks/105.include m4-1.4.10/checks/105.include --- m4-1.4.9/checks/105.include 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/105.include 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,15 @@ +dnl @ ../doc/m4.texinfo:4050: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `FOO') +dnl @result{} +include(`incl.m4') +dnl @result{}Include file start +dnl @result{}FOO +dnl @result{}Include file end +dnl @result{} diff -ruNp m4-1.4.9/checks/106.include m4-1.4.10/checks/106.include --- m4-1.4.9/checks/106.include 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/106.include 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,15 @@ +dnl @ ../doc/m4.texinfo:4066: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`bar', include(`incl.m4')) +dnl @result{} +This is `bar': >>bar<< +dnl @result{}This is bar: >>Include file start +dnl @result{}foo +dnl @result{}Include file end +dnl @result{}<< diff -ruNp m4-1.4.9/checks/106.undivert m4-1.4.10/checks/106.undivert --- m4-1.4.9/checks/106.undivert 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/106.undivert 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:4171: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -divert(`1') -This text is diverted. -divert -dnl @result{} -This text is not diverted. -dnl @result{}This text is not diverted. -undivert(`1') -dnl @result{} -dnl @result{}This text is diverted. -dnl @result{} diff -ruNp m4-1.4.9/checks/107.diversions m4-1.4.10/checks/107.diversions --- m4-1.4.9/checks/107.diversions 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/107.diversions 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,35 @@ +dnl @ ../doc/m4.texinfo:4138: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +divert(`-1')define(`f', `.') +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +divert`'dnl +len(f) +dnl @result{}1048576 +divert(`1') +f +divert(`-1')undivert diff -ruNp m4-1.4.9/checks/107.undivert m4-1.4.10/checks/107.undivert --- m4-1.4.9/checks/107.undivert 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/107.undivert 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:4194: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -divert(`1')diverted text -divert -dnl @result{} -undivert() -dnl @result{} -undivert(`0') -dnl @result{} -undivert -dnl @result{}diverted text -dnl @result{} diff -ruNp m4-1.4.9/checks/108.diversions m4-1.4.10/checks/108.diversions --- m4-1.4.9/checks/108.diversions 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/108.diversions 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,35 @@ +dnl @ ../doc/m4.texinfo:4170: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +divert(`-1')define(`f', `.') +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +define(`f', defn(`f')defn(`f')) +divert`'dnl +len(f) +dnl @result{}1048576 +divert(`1') +f +m4exit diff -ruNp m4-1.4.9/checks/108.undivert m4-1.4.10/checks/108.undivert --- m4-1.4.9/checks/108.undivert 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/108.undivert 1969-12-31 17:00:00.000000000 -0700 @@ -1,19 +0,0 @@ -dnl @ ../doc/m4.texinfo:4210: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -divert(`1') -This text is diverted first. -divert(`0')undivert(`1')dnl -dnl @result{} -dnl @result{}This text is diverted first. -undivert(`1') -dnl @result{} -divert(`1') -This text is also diverted but not appended. -divert(`0')undivert(`1')dnl -dnl @result{} -dnl @result{}This text is also diverted but not appended. diff -ruNp m4-1.4.9/checks/109.divert m4-1.4.10/checks/109.divert --- m4-1.4.9/checks/109.divert 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/109.divert 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:4235: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +divert(`1') +This text is diverted. +divert +dnl @result{} +This text is not diverted. +dnl @result{}This text is not diverted. +dnl @result{} +dnl @result{}This text is diverted. diff -ruNp m4-1.4.9/checks/109.undivert m4-1.4.10/checks/109.undivert --- m4-1.4.9/checks/109.undivert 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/109.undivert 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:4229: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -divert(`1')one -divert(`2')two -divert(`3')three -divert(`2')undivert`'dnl -divert`'undivert`'dnl -dnl @result{}two -dnl @result{}one -dnl @result{}three diff -ruNp m4-1.4.9/checks/110.divert m4-1.4.10/checks/110.divert --- m4-1.4.9/checks/110.divert 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/110.divert 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:4251: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`text', `TEXT') +dnl @result{} +divert(`1')`diverted text.' +divert +dnl @result{} +m4wrap(`Wrapped text precedes ') +dnl @result{} +dnl @result{}Wrapped TEXT precedes diverted text. diff -ruNp m4-1.4.9/checks/110.undivert m4-1.4.10/checks/110.undivert --- m4-1.4.9/checks/110.undivert 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/110.undivert 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:4250: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`bar', `BAR') -dnl @result{} -undivert(`foo') -dnl @result{}bar -dnl @result{} -include(`foo') -dnl @result{}BAR -dnl @result{} diff -ruNp m4-1.4.9/checks/111.divert m4-1.4.10/checks/111.divert --- m4-1.4.9/checks/111.divert 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/111.divert 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,13 @@ +dnl @ ../doc/m4.texinfo:4270: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +divert(`-1') +define(`foo', `Macro `foo'.') +define(`bar', `Macro `bar'.') +divert +dnl @result{} diff -ruNp m4-1.4.9/checks/111.divnum m4-1.4.10/checks/111.divnum --- m4-1.4.9/checks/111.divnum 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/111.divnum 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:4274: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -Initial divnum -dnl @result{}Initial 0 -divert(`1') -Diversion one: divnum -divert(`2') -Diversion two: divnum -dnl @result{} -dnl @result{}Diversion one: 1 -dnl @result{} -dnl @result{}Diversion two: 2 diff -ruNp m4-1.4.9/checks/112.cleardiver m4-1.4.10/checks/112.cleardiver --- m4-1.4.9/checks/112.cleardiver 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/112.cleardiver 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:4300: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -divert(`1') -Diversion one: divnum -divert(`2') -Diversion two: divnum -divert(`-1') -undivert diff -ruNp m4-1.4.9/checks/112.divert m4-1.4.10/checks/112.divert --- m4-1.4.9/checks/112.divert 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/112.divert 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:4284: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +divert(eval(`1<<28'))world +divert(`2')hello +dnl @result{}hello +dnl @result{}world diff -ruNp m4-1.4.9/checks/113.cleardiver m4-1.4.10/checks/113.cleardiver --- m4-1.4.9/checks/113.cleardiver 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/113.cleardiver 1969-12-31 17:00:00.000000000 -0700 @@ -1,10 +0,0 @@ -dnl @ ../doc/m4.texinfo:4319: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`cleardivert', -`pushdef(`_n', divnum)divert(`-1')undivert($@)divert(_n)popdef(`_n')') -dnl @result{} diff -ruNp m4-1.4.9/checks/113.divert m4-1.4.10/checks/113.divert --- m4-1.4.9/checks/113.divert 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/113.divert 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:4299: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +We decided to divert the stream for irrigation. +dnl @result{}We decided to the stream for irrigation. +define(`divert', `ifelse(`$#', `0', ``$0'', `builtin(`$0', $@)')') +dnl @result{} +divert(`-1') +Ignored text. +divert(`0') +dnl @result{} +We decided to divert the stream for irrigation. +dnl @result{}We decided to divert the stream for irrigation. diff -ruNp m4-1.4.9/checks/114.len m4-1.4.10/checks/114.len --- m4-1.4.9/checks/114.len 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/114.len 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:4359: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -len() -dnl @result{}0 -len(`abcdef') -dnl @result{}6 diff -ruNp m4-1.4.9/checks/114.undivert m4-1.4.10/checks/114.undivert --- m4-1.4.9/checks/114.undivert 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/114.undivert 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:4333: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +divert(`1') +This text is diverted. +divert +dnl @result{} +This text is not diverted. +dnl @result{}This text is not diverted. +undivert(`1') +dnl @result{} +dnl @result{}This text is diverted. +dnl @result{} diff -ruNp m4-1.4.9/checks/115.index_macr m4-1.4.10/checks/115.index_macr --- m4-1.4.9/checks/115.index_macr 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/115.index_macr 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:4381: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -index(`gnus, gnats, and armadillos', `nat') -dnl @result{}7 -index(`gnus, gnats, and armadillos', `dag') -dnl @result{}-1 diff -ruNp m4-1.4.9/checks/115.undivert m4-1.4.10/checks/115.undivert --- m4-1.4.9/checks/115.undivert 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/115.undivert 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:4356: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +divert(`1')diverted text +divert +dnl @result{} +undivert() +dnl @result{} +undivert(`0') +dnl @result{} +undivert +dnl @result{}diverted text +dnl @result{} diff -ruNp m4-1.4.9/checks/116.index_macr m4-1.4.10/checks/116.index_macr --- m4-1.4.9/checks/116.index_macr 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/116.index_macr 1969-12-31 17:00:00.000000000 -0700 @@ -1,10 +0,0 @@ -dnl @ ../doc/m4.texinfo:4390: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -index(`abc') -dnl @error{}m4:stdin:1: Warning: too few arguments to builtin `index' -dnl @result{}0 diff -ruNp m4-1.4.9/checks/116.undivert m4-1.4.10/checks/116.undivert --- m4-1.4.9/checks/116.undivert 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/116.undivert 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,20 @@ +dnl @ ../doc/m4.texinfo:4372: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +divert(`1') +This text is diverted first. +divert(`0')undivert(`1')dnl +dnl @result{} +dnl @result{}This text is diverted first. +undivert(`1') +dnl @result{} +divert(`1') +This text is also diverted but not appended. +divert(`0')undivert(`1')dnl +dnl @result{} +dnl @result{}This text is also diverted but not appended. diff -ruNp m4-1.4.9/checks/117.regexp m4-1.4.10/checks/117.regexp --- m4-1.4.9/checks/117.regexp 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/117.regexp 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:4439: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -regexp(`GNUs not Unix', `\<[a-z]\w+') -dnl @result{}5 -regexp(`GNUs not Unix', `\a-c-a') -dnl @result{}<;>abcba -translit(`abcdef', `aabdef', `bcged') -dnl @result{}bgced diff -ruNp m4-1.4.9/checks/123.len m4-1.4.10/checks/123.len --- m4-1.4.9/checks/123.len 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/123.len 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:4542: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +len() +dnl @result{}0 +len(`abcdef') +dnl @result{}6 diff -ruNp m4-1.4.9/checks/123.translit m4-1.4.10/checks/123.translit --- m4-1.4.9/checks/123.translit 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/123.translit 1969-12-31 17:00:00.000000000 -0700 @@ -1,9 +0,0 @@ -dnl @ ../doc/m4.texinfo:4573: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -translit(`«abc~', `~-»') -dnl @result{}abc diff -ruNp m4-1.4.9/checks/124.index_macr m4-1.4.10/checks/124.index_macr --- m4-1.4.9/checks/124.index_macr 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/124.index_macr 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:4564: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +index(`gnus, gnats, and armadillos', `nat') +dnl @result{}7 +index(`gnus, gnats, and armadillos', `dag') +dnl @result{}-1 diff -ruNp m4-1.4.9/checks/124.translit m4-1.4.10/checks/124.translit --- m4-1.4.9/checks/124.translit 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/124.translit 1969-12-31 17:00:00.000000000 -0700 @@ -1,10 +0,0 @@ -dnl @ ../doc/m4.texinfo:4581: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -translit(`abc') -dnl @error{}m4:stdin:1: Warning: too few arguments to builtin `translit' -dnl @result{}abc diff -ruNp m4-1.4.9/checks/125.index_macr m4-1.4.10/checks/125.index_macr --- m4-1.4.9/checks/125.index_macr 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/125.index_macr 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,11 @@ +dnl @ ../doc/m4.texinfo:4573: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +index(`abc') +dnl @error{}m4:stdin:1: Warning: too few arguments to builtin `index' +dnl @result{}0 diff -ruNp m4-1.4.9/checks/125.patsubst m4-1.4.10/checks/125.patsubst --- m4-1.4.9/checks/125.patsubst 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/125.patsubst 1969-12-31 17:00:00.000000000 -0700 @@ -1,20 +0,0 @@ -dnl @ ../doc/m4.texinfo:4625: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -patsubst(`GNUs not Unix', `^', `OBS: ') -dnl @result{}OBS: GNUs not Unix -patsubst(`GNUs not Unix', `\<', `OBS: ') -dnl @result{}OBS: GNUs OBS: not OBS: Unix -patsubst(`GNUs not Unix', `\w*', `(\&)') -dnl @result{}(GNUs)() (not)() (Unix)() -patsubst(`GNUs not Unix', `\w+', `(\&)') -dnl @result{}(GNUs) (not) (Unix) -patsubst(`GNUs not Unix', `[A-Z][a-z]+') -dnl @result{}GN not -patsubst(`GNUs not Unix', `not', `NOT\') -dnl @error{}m4:stdin:6: Warning: trailing \ ignored in replacement -dnl @result{}GNUs NOT Unix diff -ruNp m4-1.4.9/checks/126.patsubst m4-1.4.10/checks/126.patsubst --- m4-1.4.9/checks/126.patsubst 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/126.patsubst 1969-12-31 17:00:00.000000000 -0700 @@ -1,16 +0,0 @@ -dnl @ ../doc/m4.texinfo:4654: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`upcase', `translit(`$*', `a-z', `A-Z')')dnl -define(`downcase', `translit(`$*', `A-Z', `a-z')')dnl -define(`capitalize1', - `regexp(`$1', `^\(\w\)\(\w*\)', - `upcase(`\1')`'downcase(`\2')')')dnl -define(`capitalize', - `patsubst(`$1', `\w+', `capitalize1(`\&')')')dnl -capitalize(`GNUs not Unix') -dnl @result{}Gnus Not Unix diff -ruNp m4-1.4.9/checks/126.regexp m4-1.4.10/checks/126.regexp --- m4-1.4.9/checks/126.regexp 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/126.regexp 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:4622: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +regexp(`GNUs not Unix', `\<[a-z]\w+') +dnl @result{}5 +regexp(`GNUs not Unix', `\a-c-a') +dnl @result{}<;>abcba +translit(`abcdef', `aabdef', `bcged') +dnl @result{}bgced diff -ruNp m4-1.4.9/checks/132.eval m4-1.4.10/checks/132.eval --- m4-1.4.9/checks/132.eval 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/132.eval 1969-12-31 17:00:00.000000000 -0700 @@ -1,16 +0,0 @@ -dnl @ ../doc/m4.texinfo:4864: Origin of test -dnl @ expected status: 1 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -eval(`2 = 2') -dnl @error{}m4:stdin:1: Warning: recommend ==, not =, for equality operator -dnl @result{}1 -eval(`++0') -dnl @error{}m4:stdin:2: invalid operator in eval: ++0 -dnl @result{} -eval(`0 |= 1') -dnl @error{}m4:stdin:3: invalid operator in eval: 0 |= 1 -dnl @result{} diff -ruNp m4-1.4.9/checks/132.translit m4-1.4.10/checks/132.translit --- m4-1.4.9/checks/132.translit 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/132.translit 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,10 @@ +dnl @ ../doc/m4.texinfo:4756: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +translit(`«abc~', `~-»') +dnl @result{}abc diff -ruNp m4-1.4.9/checks/133.eval m4-1.4.10/checks/133.eval --- m4-1.4.9/checks/133.eval 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/133.eval 1969-12-31 17:00:00.000000000 -0700 @@ -1,31 +0,0 @@ -dnl @ ../doc/m4.texinfo:4897: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -eval(`1 == 2 > 0') -dnl @result{}1 -eval(`(1 == 2) > 0') -dnl @result{}0 -eval(`! 0 * 2') -dnl @result{}2 -eval(`! (0 * 2)') -dnl @result{}1 -eval(`1 | 1 ^ 1') -dnl @result{}1 -eval(`(1 | 1) ^ 1') -dnl @result{}0 -eval(`+ + - ~ ! ~ 0') -dnl @result{}1 -eval(`2 || 1 / 0') -dnl @result{}1 -eval(`0 || 1 / 0') -dnl @error{}m4:stdin:9: divide by zero in eval: 0 || 1 / 0 -dnl @result{} -eval(`0 && 1 % 0') -dnl @result{}0 -eval(`2 && 1 % 0') -dnl @error{}m4:stdin:11: modulo by zero in eval: 2 && 1 % 0 -dnl @result{} diff -ruNp m4-1.4.9/checks/133.translit m4-1.4.10/checks/133.translit --- m4-1.4.9/checks/133.translit 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/133.translit 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,11 @@ +dnl @ ../doc/m4.texinfo:4764: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +translit(`abc') +dnl @error{}m4:stdin:1: Warning: too few arguments to builtin `translit' +dnl @result{}abc diff -ruNp m4-1.4.9/checks/134.eval m4-1.4.10/checks/134.eval --- m4-1.4.9/checks/134.eval 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/134.eval 1969-12-31 17:00:00.000000000 -0700 @@ -1,21 +0,0 @@ -dnl @ ../doc/m4.texinfo:4930: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -eval(`2 ** 3 ** 2') -dnl @result{}512 -eval(`(2 ** 3) ** 2') -dnl @result{}64 -eval(`0 ** 1') -dnl @result{}0 -eval(`2 ** 0') -dnl @result{}1 -eval(`0 ** 0') -dnl @result{} -dnl @error{}m4:stdin:5: divide by zero in eval: 0 ** 0 -eval(`4 ** -2') -dnl @error{}m4:stdin:6: negative exponent in eval: 4 ** -2 -dnl @result{} diff -ruNp m4-1.4.9/checks/134.patsubst m4-1.4.10/checks/134.patsubst --- m4-1.4.9/checks/134.patsubst 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/134.patsubst 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,21 @@ +dnl @ ../doc/m4.texinfo:4808: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +patsubst(`GNUs not Unix', `^', `OBS: ') +dnl @result{}OBS: GNUs not Unix +patsubst(`GNUs not Unix', `\<', `OBS: ') +dnl @result{}OBS: GNUs OBS: not OBS: Unix +patsubst(`GNUs not Unix', `\w*', `(\&)') +dnl @result{}(GNUs)() (not)() (Unix)() +patsubst(`GNUs not Unix', `\w+', `(\&)') +dnl @result{}(GNUs) (not) (Unix) +patsubst(`GNUs not Unix', `[A-Z][a-z]+') +dnl @result{}GN not +patsubst(`GNUs not Unix', `not', `NOT\') +dnl @error{}m4:stdin:6: Warning: trailing \ ignored in replacement +dnl @result{}GNUs NOT Unix diff -ruNp m4-1.4.9/checks/135.eval m4-1.4.10/checks/135.eval --- m4-1.4.9/checks/135.eval 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/135.eval 1969-12-31 17:00:00.000000000 -0700 @@ -1,26 +0,0 @@ -dnl @ ../doc/m4.texinfo:4966: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -eval(`-3 * 5') -dnl @result{}-15 -eval(index(`Hello world', `llo') >= 0) -dnl @result{}1 -eval(`0r1:0111 + 0b100 + 0r3:12') -dnl @result{}12 -define(`square', `eval(`($1) ** 2')') -dnl @result{} -square(`9') -dnl @result{}81 -square(square(`5')` + 1') -dnl @result{}676 -define(`foo', `666') -dnl @result{} -eval(`foo / 6') -dnl @error{}m4:stdin:8: bad expression in eval: foo / 6 -dnl @result{} -eval(foo / 6) -dnl @result{}111 diff -ruNp m4-1.4.9/checks/135.patsubst m4-1.4.10/checks/135.patsubst --- m4-1.4.9/checks/135.patsubst 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/135.patsubst 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,17 @@ +dnl @ ../doc/m4.texinfo:4837: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`upcase', `translit(`$*', `a-z', `A-Z')')dnl +define(`downcase', `translit(`$*', `A-Z', `a-z')')dnl +define(`capitalize1', + `regexp(`$1', `^\(\w\)\(\w*\)', + `upcase(`\1')`'downcase(`\2')')')dnl +define(`capitalize', + `patsubst(`$1', `\w+', `capitalize1(`\&')')')dnl +capitalize(`GNUs not Unix') +dnl @result{}Gnus Not Unix diff -ruNp m4-1.4.9/checks/136.eval m4-1.4.10/checks/136.eval --- m4-1.4.9/checks/136.eval 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/136.eval 1969-12-31 17:00:00.000000000 -0700 @@ -1,25 +0,0 @@ -dnl @ ../doc/m4.texinfo:4999: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`max_int', eval(`0x7fffffff')) -dnl @result{} -define(`min_int', incr(max_int)) -dnl @result{} -eval(min_int` < 0') -dnl @result{}1 -eval(max_int` > 0') -dnl @result{}1 -ifelse(eval(min_int` / -1'), min_int, `overflow occurred') -dnl @result{}overflow occurred -min_int -dnl @result{}-2147483648 -eval(`0x80000000 % -1') -dnl @result{}0 -eval(`-4 >> 1') -dnl @result{}-2 -eval(`-4 >> 33') -dnl @result{}-2 diff -ruNp m4-1.4.9/checks/136.patsubst m4-1.4.10/checks/136.patsubst --- m4-1.4.9/checks/136.patsubst 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/136.patsubst 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,17 @@ +dnl @ ../doc/m4.texinfo:4853: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`patreg', +`patsubst($@) +regexp($@)')dnl +patreg(`bar foo baz Foo', `foo\|Foo', `FOO') +dnl @result{}bar FOO baz FOO +dnl @result{}FOO +patreg(`aba abb 121', `\(.\)\(.\)\1', `\2\1\2') +dnl @result{}bab abb 212 +dnl @result{}bab diff -ruNp m4-1.4.9/checks/137.eval m4-1.4.10/checks/137.eval --- m4-1.4.9/checks/137.eval 2007-03-23 07:36:10.000000000 -0600 +++ m4-1.4.10/checks/137.eval 1969-12-31 17:00:00.000000000 -0700 @@ -1,32 +0,0 @@ -dnl @ ../doc/m4.texinfo:5032: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -eval(`666', `10') -dnl @result{}666 -eval(`666', `11') -dnl @result{}556 -eval(`666', `6') -dnl @result{}3030 -eval(`666', `6', `10') -dnl @result{}0000003030 -eval(`-666', `6', `10') -dnl @result{}-0000003030 -eval(`10', `', `0') -dnl @result{}10 -`0r1:'eval(`10', `1', `11') -dnl @result{}0r1:01111111111 -eval(`10', `16') -dnl @result{}a -eval(`1', `37') -dnl @error{}m4:stdin:9: radix 37 in builtin `eval' out of range -dnl @result{} -eval(`1', , `-1') -dnl @error{}m4:stdin:10: negative width to builtin `eval' -dnl @result{} -eval() -dnl @error{}m4:stdin:11: empty string treated as 0 in builtin `eval' -dnl @result{}0 diff -ruNp m4-1.4.9/checks/137.patsubst m4-1.4.10/checks/137.patsubst --- m4-1.4.9/checks/137.patsubst 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/137.patsubst 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,11 @@ +dnl @ ../doc/m4.texinfo:4867: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +patsubst(`abc') +dnl @error{}m4:stdin:1: Warning: too few arguments to builtin `patsubst' +dnl @result{}abc diff -ruNp m4-1.4.9/checks/138.format m4-1.4.10/checks/138.format --- m4-1.4.9/checks/138.format 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/138.format 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,26 @@ +dnl @ ../doc/m4.texinfo:4894: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `The brown fox jumped over the lazy dog') +dnl @result{} +format(`The string "%s" uses %d characters', foo, len(foo)) +dnl @result{}The string "The brown fox jumped over the lazy dog" uses 38 characters +format(`%*.*d', `-1', `-1', `1') +dnl @result{}1 +format(`%.0f', `56789.9876') +dnl @result{}56790 +len(format(`%-*X', `5000', `1')) +dnl @result{}5000 +ifelse(format(`%010F', `infinity'), ` INF', `success', + format(`%010F', `infinity'), ` INFINITY', `success', + format(`%010F', `infinity')) +dnl @result{}success +ifelse(format(`%.1A', `1.999'), `0X1.0P+1', `success', + format(`%.1A', `1.999'), `0X2.0P+0', `success', + format(`%.1A', `1.999')) +dnl @result{}success diff -ruNp m4-1.4.9/checks/138.platform_m m4-1.4.10/checks/138.platform_m --- m4-1.4.9/checks/138.platform_m 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/138.platform_m 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:5112: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -__gnu__ -dnl @result{} -ifdef(`__gnu__', `Extensions are active') -dnl @result{}Extensions are active diff -ruNp m4-1.4.9/checks/139.format m4-1.4.10/checks/139.format --- m4-1.4.9/checks/139.format 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/139.format 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,23 @@ +dnl @ ../doc/m4.texinfo:4918: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +include(`forloop.m4') +dnl @result{} +forloop(`i', `1', `10', `format(`%6d squared is %10d +', i, eval(i**2))') +dnl @result{} 1 squared is 1 +dnl @result{} 2 squared is 4 +dnl @result{} 3 squared is 9 +dnl @result{} 4 squared is 16 +dnl @result{} 5 squared is 25 +dnl @result{} 6 squared is 36 +dnl @result{} 7 squared is 49 +dnl @result{} 8 squared is 64 +dnl @result{} 9 squared is 81 +dnl @result{} 10 squared is 100 +dnl @result{} diff -ruNp m4-1.4.9/checks/139.platform_m m4-1.4.10/checks/139.platform_m --- m4-1.4.9/checks/139.platform_m 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/139.platform_m 1969-12-31 17:00:00.000000000 -0700 @@ -1,17 +0,0 @@ -dnl @ ../doc/m4.texinfo:5132: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`provided', `0') -dnl @result{} -ifdef(`__unix__', `define(`provided', incr(provided))') -dnl @result{} -ifdef(`__windows__', `define(`provided', incr(provided))') -dnl @result{} -ifdef(`__os2__', `define(`provided', incr(provided))') -dnl @result{} -provided -dnl @result{}1 diff -ruNp m4-1.4.9/checks/140.format m4-1.4.10/checks/140.format --- m4-1.4.9/checks/140.format 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/140.format 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,11 @@ +dnl @ ../doc/m4.texinfo:4959: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +format(`%p', `0') +dnl @error{}m4:stdin:1: Warning: unrecognized specifier in `%p' +dnl @result{} diff -ruNp m4-1.4.9/checks/140.syscmd m4-1.4.10/checks/140.syscmd --- m4-1.4.9/checks/140.syscmd 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/140.syscmd 1969-12-31 17:00:00.000000000 -0700 @@ -1,12 +0,0 @@ -dnl @ ../doc/m4.texinfo:5165: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `FOO') -dnl @result{} -syscmd(`echo foo') -dnl @result{}foo -dnl @result{} diff -ruNp m4-1.4.9/checks/141.incr m4-1.4.10/checks/141.incr --- m4-1.4.9/checks/141.incr 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/141.incr 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:4997: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +incr(`4') +dnl @result{}5 +decr(`7') +dnl @result{}6 +incr() +dnl @error{}m4:stdin:3: empty string treated as 0 in builtin `incr' +dnl @result{}1 +decr() +dnl @error{}m4:stdin:4: empty string treated as 0 in builtin `decr' +dnl @result{}-1 diff -ruNp m4-1.4.9/checks/141.syscmd m4-1.4.10/checks/141.syscmd --- m4-1.4.9/checks/141.syscmd 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/141.syscmd 1969-12-31 17:00:00.000000000 -0700 @@ -1,9 +0,0 @@ -dnl @ ../doc/m4.texinfo:5200: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -m4wrap(`syscmd(`cat')') -dnl @result{} diff -ruNp m4-1.4.9/checks/142.esyscmd m4-1.4.10/checks/142.esyscmd --- m4-1.4.9/checks/142.esyscmd 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/142.esyscmd 1969-12-31 17:00:00.000000000 -0700 @@ -1,12 +0,0 @@ -dnl @ ../doc/m4.texinfo:5227: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', `FOO') -dnl @result{} -esyscmd(`echo foo') -dnl @result{}FOO -dnl @result{} diff -ruNp m4-1.4.9/checks/142.eval m4-1.4.10/checks/142.eval --- m4-1.4.9/checks/142.eval 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/142.eval 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,17 @@ +dnl @ ../doc/m4.texinfo:5074: Origin of test +dnl @ expected status: 1 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +eval(`2 = 2') +dnl @error{}m4:stdin:1: Warning: recommend ==, not =, for equality operator +dnl @result{}1 +eval(`++0') +dnl @error{}m4:stdin:2: invalid operator in eval: ++0 +dnl @result{} +eval(`0 |= 1') +dnl @error{}m4:stdin:3: invalid operator in eval: 0 |= 1 +dnl @result{} diff -ruNp m4-1.4.9/checks/143.eval m4-1.4.10/checks/143.eval --- m4-1.4.9/checks/143.eval 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/143.eval 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,32 @@ +dnl @ ../doc/m4.texinfo:5107: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +eval(`1 == 2 > 0') +dnl @result{}1 +eval(`(1 == 2) > 0') +dnl @result{}0 +eval(`! 0 * 2') +dnl @result{}2 +eval(`! (0 * 2)') +dnl @result{}1 +eval(`1 | 1 ^ 1') +dnl @result{}1 +eval(`(1 | 1) ^ 1') +dnl @result{}0 +eval(`+ + - ~ ! ~ 0') +dnl @result{}1 +eval(`2 || 1 / 0') +dnl @result{}1 +eval(`0 || 1 / 0') +dnl @error{}m4:stdin:9: divide by zero in eval: 0 || 1 / 0 +dnl @result{} +eval(`0 && 1 % 0') +dnl @result{}0 +eval(`2 && 1 % 0') +dnl @error{}m4:stdin:11: modulo by zero in eval: 2 && 1 % 0 +dnl @result{} diff -ruNp m4-1.4.9/checks/143.sysval m4-1.4.10/checks/143.sysval --- m4-1.4.9/checks/143.sysval 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/143.sysval 1969-12-31 17:00:00.000000000 -0700 @@ -1,33 +0,0 @@ -dnl @ ../doc/m4.texinfo:5257: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -sysval -dnl @result{}0 -syscmd(`false') -dnl @result{} -ifelse(sysval, `0', `zero', `non-zero') -dnl @result{}non-zero -syscmd(`exit 2') -dnl @result{} -sysval -dnl @result{}2 -syscmd(`true') -dnl @result{} -sysval -dnl @result{}0 -esyscmd(`false') -dnl @result{} -ifelse(sysval, `0', `zero', `non-zero') -dnl @result{}non-zero -esyscmd(`exit 2') -dnl @result{} -sysval -dnl @result{}2 -esyscmd(`true') -dnl @result{} -sysval -dnl @result{}0 diff -ruNp m4-1.4.9/checks/144.eval m4-1.4.10/checks/144.eval --- m4-1.4.9/checks/144.eval 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/144.eval 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,22 @@ +dnl @ ../doc/m4.texinfo:5140: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +eval(`2 ** 3 ** 2') +dnl @result{}512 +eval(`(2 ** 3) ** 2') +dnl @result{}64 +eval(`0 ** 1') +dnl @result{}0 +eval(`2 ** 0') +dnl @result{}1 +eval(`0 ** 0') +dnl @result{} +dnl @error{}m4:stdin:5: divide by zero in eval: 0 ** 0 +eval(`4 ** -2') +dnl @error{}m4:stdin:6: negative exponent in eval: 4 ** -2 +dnl @result{} diff -ruNp m4-1.4.9/checks/144.sysval m4-1.4.10/checks/144.sysval --- m4-1.4.9/checks/144.sysval 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/144.sysval 1969-12-31 17:00:00.000000000 -0700 @@ -1,24 +0,0 @@ -dnl @ ../doc/m4.texinfo:5307: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -dnl This test assumes kill is a shell builtin, and that signals are -dnl recognizable. -ifdef(`__unix__', , - `errprint(` skipping: syscmd does not have unix semantics -')m4exit(`77')')dnl -syscmd(`kill -9 $$') -dnl @result{} -sysval -dnl @result{}2304 -syscmd() -dnl @result{} -sysval -dnl @result{}0 -esyscmd(`kill -9 $$') -dnl @result{} -sysval -dnl @result{}2304 diff -ruNp m4-1.4.9/checks/145.eval m4-1.4.10/checks/145.eval --- m4-1.4.9/checks/145.eval 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/145.eval 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,33 @@ +dnl @ ../doc/m4.texinfo:5176: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +eval(`-3 * 5') +dnl @result{}-15 +eval(`-99 / 10') +dnl @result{}-9 +eval(`-99 % 10') +dnl @result{}-9 +eval(`99 % -10') +dnl @result{}9 +eval(index(`Hello world', `llo') >= 0) +dnl @result{}1 +eval(`0r1:0111 + 0b100 + 0r3:12') +dnl @result{}12 +define(`square', `eval(`($1) ** 2')') +dnl @result{} +square(`9') +dnl @result{}81 +square(square(`5')` + 1') +dnl @result{}676 +define(`foo', `666') +dnl @result{} +eval(`foo / 6') +dnl @error{}m4:stdin:11: bad expression in eval: foo / 6 +dnl @result{} +eval(foo / 6) +dnl @result{}111 diff -ruNp m4-1.4.9/checks/145.mkstemp m4-1.4.10/checks/145.mkstemp --- m4-1.4.9/checks/145.mkstemp 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/145.mkstemp 1969-12-31 17:00:00.000000000 -0700 @@ -1,26 +0,0 @@ -dnl @ ../doc/m4.texinfo:5392: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -syscmd(`echo foo??????')dnl -dnl @result{}foo?????? -define(`file1', maketemp(`fooXXXXXX'))dnl -ifelse(esyscmd(`echo foo??????'), `foo??????', `no file', `created') -dnl @result{}created -define(`file2', maketemp(`fooXX'))dnl -define(`file3', mkstemp(`fooXXXXXX'))dnl -ifelse(len(file1), len(file2), `same length', `different') -dnl @result{}same length -ifelse(file1, file2, `same', `different file') -dnl @result{}different file -ifelse(file2, file3, `same', `different file') -dnl @result{}different file -ifelse(file1, file3, `same', `different file') -dnl @result{}different file -syscmd(`rm 'file1 file2 file3) -dnl @result{} -sysval -dnl @result{}0 diff -ruNp m4-1.4.9/checks/146.errprint m4-1.4.10/checks/146.errprint --- m4-1.4.9/checks/146.errprint 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/146.errprint 1969-12-31 17:00:00.000000000 -0700 @@ -1,15 +0,0 @@ -dnl @ ../doc/m4.texinfo:5444: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -errprint(`Invalid arguments to forloop -') -dnl @error{}Invalid arguments to forloop -dnl @result{} -errprint(`1')errprint(`2',`3 -') -dnl @error{}12 3 -dnl @result{} diff -ruNp m4-1.4.9/checks/146.eval m4-1.4.10/checks/146.eval --- m4-1.4.9/checks/146.eval 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/146.eval 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,26 @@ +dnl @ ../doc/m4.texinfo:5215: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`max_int', eval(`0x7fffffff')) +dnl @result{} +define(`min_int', incr(max_int)) +dnl @result{} +eval(min_int` < 0') +dnl @result{}1 +eval(max_int` > 0') +dnl @result{}1 +ifelse(eval(min_int` / -1'), min_int, `overflow occurred') +dnl @result{}overflow occurred +min_int +dnl @result{}-2147483648 +eval(`0x80000000 % -1') +dnl @result{}0 +eval(`-4 >> 1') +dnl @result{}-2 +eval(`-4 >> 33') +dnl @result{}-2 diff -ruNp m4-1.4.9/checks/147.eval m4-1.4.10/checks/147.eval --- m4-1.4.9/checks/147.eval 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/147.eval 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,33 @@ +dnl @ ../doc/m4.texinfo:5248: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +eval(`666', `10') +dnl @result{}666 +eval(`666', `11') +dnl @result{}556 +eval(`666', `6') +dnl @result{}3030 +eval(`666', `6', `10') +dnl @result{}0000003030 +eval(`-666', `6', `10') +dnl @result{}-0000003030 +eval(`10', `', `0') +dnl @result{}10 +`0r1:'eval(`10', `1', `11') +dnl @result{}0r1:01111111111 +eval(`10', `16') +dnl @result{}a +eval(`1', `37') +dnl @error{}m4:stdin:9: radix 37 in builtin `eval' out of range +dnl @result{} +eval(`1', , `-1') +dnl @error{}m4:stdin:10: negative width to builtin `eval' +dnl @result{} +eval() +dnl @error{}m4:stdin:11: empty string treated as 0 in builtin `eval' +dnl @result{}0 diff -ruNp m4-1.4.9/checks/147.location m4-1.4.10/checks/147.location --- m4-1.4.9/checks/147.location 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/147.location 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:5480: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -errprint(__program__:__file__:__line__: `input error -') -dnl @error{}m4:stdin:1: input error -dnl @result{} diff -ruNp m4-1.4.9/checks/148.location m4-1.4.10/checks/148.location --- m4-1.4.9/checks/148.location 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/148.location 1969-12-31 17:00:00.000000000 -0700 @@ -1,16 +0,0 @@ -dnl @ ../doc/m4.texinfo:5499: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`foo', ``$0' called at __file__:__line__') -dnl @result{} -foo -dnl @result{}foo called at stdin:2 -include(`incl.m4') -dnl @result{}Include file start -dnl @result{}foo called at ../examples/incl.m4:2 -dnl @result{}Include file end -dnl @result{} diff -ruNp m4-1.4.9/checks/148.platform_m m4-1.4.10/checks/148.platform_m --- m4-1.4.9/checks/148.platform_m 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/148.platform_m 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:5328: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +__gnu__ +dnl @result{} +ifdef(`__gnu__', `Extensions are active') +dnl @result{}Extensions are active diff -ruNp m4-1.4.9/checks/149.location m4-1.4.10/checks/149.location --- m4-1.4.9/checks/149.location 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/149.location 1969-12-31 17:00:00.000000000 -0700 @@ -1,30 +0,0 @@ -dnl @ ../doc/m4.texinfo:5519: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`echo', `$@') -dnl @result{} -define(`foo', `echo(__line__ -__line__)') -dnl @result{} -echo(__line__ -__line__) -dnl @result{}4 -dnl @result{}5 -m4wrap(`foo -') -dnl @result{} -foo(errprint(__line__ -__line__ -)) -dnl @error{}8 -dnl @error{}9 -dnl @result{}8 -dnl @result{}8 -__line__ -dnl @result{}11 -dnl @result{}6 -dnl @result{}6 diff -ruNp m4-1.4.9/checks/149.platform_m m4-1.4.10/checks/149.platform_m --- m4-1.4.9/checks/149.platform_m 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/149.platform_m 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,18 @@ +dnl @ ../doc/m4.texinfo:5348: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`provided', `0') +dnl @result{} +ifdef(`__unix__', `define(`provided', incr(provided))') +dnl @result{} +ifdef(`__windows__', `define(`provided', incr(provided))') +dnl @result{} +ifdef(`__os2__', `define(`provided', incr(provided))') +dnl @result{} +provided +dnl @result{}1 diff -ruNp m4-1.4.9/checks/150.m4exit m4-1.4.10/checks/150.m4exit --- m4-1.4.9/checks/150.m4exit 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/150.m4exit 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:5572: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -m4wrap(`This text is lost due to `m4exit'.') -dnl @result{} -divert(`1') So is this. -divert -dnl @result{} -m4exit And this is never read. diff -ruNp m4-1.4.9/checks/150.syscmd m4-1.4.10/checks/150.syscmd --- m4-1.4.9/checks/150.syscmd 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/150.syscmd 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,13 @@ +dnl @ ../doc/m4.texinfo:5381: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `FOO') +dnl @result{} +syscmd(`echo foo') +dnl @result{}foo +dnl @result{} diff -ruNp m4-1.4.9/checks/151.m4exit m4-1.4.10/checks/151.m4exit --- m4-1.4.9/checks/151.m4exit 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/151.m4exit 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:5590: Origin of test -dnl @ expected status: 1 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`fatal_error', - `errprint(__program__:__file__:__line__`: fatal error: $* -')m4exit(`1')') -dnl @result{} -fatal_error(`this is a BAD one, buster') -dnl @error{}m4:stdin:4: fatal error: this is a BAD one, buster diff -ruNp m4-1.4.9/checks/151.syscmd m4-1.4.10/checks/151.syscmd --- m4-1.4.9/checks/151.syscmd 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/151.syscmd 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,10 @@ +dnl @ ../doc/m4.texinfo:5410: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +m4wrap(`syscmd(`cat')') +dnl @result{} diff -ruNp m4-1.4.9/checks/152.esyscmd m4-1.4.10/checks/152.esyscmd --- m4-1.4.9/checks/152.esyscmd 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/152.esyscmd 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,13 @@ +dnl @ ../doc/m4.texinfo:5449: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', `FOO') +dnl @result{} +esyscmd(`echo foo') +dnl @result{}FOO +dnl @result{} diff -ruNp m4-1.4.9/checks/152.extensions m4-1.4.10/checks/152.extensions --- m4-1.4.9/checks/152.extensions 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/152.extensions 1969-12-31 17:00:00.000000000 -0700 @@ -1,24 +0,0 @@ -dnl @ ../doc/m4.texinfo:5843: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`a1', `A1') -dnl @result{} -dnl First argument, concatenated with 1 -define(`_1', `$1')define(`first1', `_1($@)1') -dnl @result{} -dnl Eleventh argument, portable -define(`_9', `$9')define(`eleventh', `_9(shift(shift($@)))') -dnl @result{} -dnl Eleventh argument, GNU style -define(`Eleventh', `$11') -dnl @result{} -first1(`a', `b', `c', `d', `e', `f', `g', `h', `i', `j', `k') -dnl @result{}A1 -eleventh(`a', `b', `c', `d', `e', `f', `g', `h', `i', `j', `k') -dnl @result{}k -Eleventh(`a', `b', `c', `d', `e', `f', `g', `h', `i', `j', `k') -dnl @result{}k diff -ruNp m4-1.4.9/checks/153.incompatib m4-1.4.10/checks/153.incompatib --- m4-1.4.9/checks/153.incompatib 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/153.incompatib 1969-12-31 17:00:00.000000000 -0700 @@ -1,24 +0,0 @@ -dnl @ ../doc/m4.texinfo:5971: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -undivert(`wrapfifo.m4')dnl -dnl @result{}dnl Redefine m4wrap to have FIFO semantics. -dnl @result{}define(`_m4wrap_level', `0')dnl -dnl @result{}define(`m4wrap', -dnl @result{}`ifdef(`m4wrap'_m4wrap_level, -dnl @result{} `define(`m4wrap'_m4wrap_level, -dnl @result{} defn(`m4wrap'_m4wrap_level)`$1')', -dnl @result{} `builtin(`m4wrap', `define(`_m4wrap_level', -dnl @result{} incr(_m4wrap_level))dnl -dnl @result{}m4wrap'_m4wrap_level)dnl -dnl @result{}define(`m4wrap'_m4wrap_level, `$1')')')dnl -include(`wrapfifo.m4') -dnl @result{} -m4wrap(`a`'m4wrap(`c -', `d')')m4wrap(`b') -dnl @result{} -dnl @result{}abc diff -ruNp m4-1.4.9/checks/153.sysval m4-1.4.10/checks/153.sysval --- m4-1.4.9/checks/153.sysval 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/153.sysval 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,34 @@ +dnl @ ../doc/m4.texinfo:5479: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +sysval +dnl @result{}0 +syscmd(`false') +dnl @result{} +ifelse(sysval, `0', `zero', `non-zero') +dnl @result{}non-zero +syscmd(`exit 2') +dnl @result{} +sysval +dnl @result{}2 +syscmd(`true') +dnl @result{} +sysval +dnl @result{}0 +esyscmd(`false') +dnl @result{} +ifelse(sysval, `0', `zero', `non-zero') +dnl @result{}non-zero +esyscmd(`exit 2') +dnl @result{} +sysval +dnl @result{}2 +esyscmd(`true') +dnl @result{} +sysval +dnl @result{}0 diff -ruNp m4-1.4.9/checks/154.other_inco m4-1.4.10/checks/154.other_inco --- m4-1.4.9/checks/154.other_inco 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/154.other_inco 1969-12-31 17:00:00.000000000 -0700 @@ -1,11 +0,0 @@ -dnl @ ../doc/m4.texinfo:6136: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`x', `x') -dnl @result{} -define(`x', `x ') -dnl @result{} diff -ruNp m4-1.4.9/checks/154.sysval m4-1.4.10/checks/154.sysval --- m4-1.4.9/checks/154.sysval 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/154.sysval 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,25 @@ +dnl @ ../doc/m4.texinfo:5529: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +dnl This test assumes kill is a shell builtin, and that signals are +dnl recognizable. +ifdef(`__unix__', , + `errprint(` skipping: syscmd does not have unix semantics +')m4exit(`77')')dnl +syscmd(`kill -9 $$') +dnl @result{} +sysval +dnl @result{}2304 +syscmd() +dnl @result{} +sysval +dnl @result{}0 +esyscmd(`kill -9 $$') +dnl @result{} +sysval +dnl @result{}2304 diff -ruNp m4-1.4.9/checks/155.improved_e m4-1.4.10/checks/155.improved_e --- m4-1.4.9/checks/155.improved_e 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/155.improved_e 1969-12-31 17:00:00.000000000 -0700 @@ -1,13 +0,0 @@ -dnl @ ../doc/m4.texinfo:6187: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`exch', ``$2', `$1'') -dnl @result{} -define(exch(`expansion text', `macro')) -dnl @result{} -macro -dnl @result{}expansion text diff -ruNp m4-1.4.9/checks/155.mkstemp m4-1.4.10/checks/155.mkstemp --- m4-1.4.9/checks/155.mkstemp 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/155.mkstemp 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,27 @@ +dnl @ ../doc/m4.texinfo:5615: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +syscmd(`echo foo??????')dnl +dnl @result{}foo?????? +define(`file1', maketemp(`fooXXXXXX'))dnl +ifelse(esyscmd(`echo foo??????'), `foo??????', `no file', `created') +dnl @result{}created +define(`file2', maketemp(`fooXX'))dnl +define(`file3', mkstemp(`fooXXXXXX'))dnl +ifelse(len(file1), len(file2), `same length', `different') +dnl @result{}same length +ifelse(file1, file2, `same', `different file') +dnl @result{}different file +ifelse(file2, file3, `same', `different file') +dnl @result{}different file +ifelse(file1, file3, `same', `different file') +dnl @result{}different file +syscmd(`rm 'file1 file2 file3) +dnl @result{} +sysval +dnl @result{}0 diff -ruNp m4-1.4.9/checks/156.errprint m4-1.4.10/checks/156.errprint --- m4-1.4.9/checks/156.errprint 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/156.errprint 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,16 @@ +dnl @ ../doc/m4.texinfo:5668: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +errprint(`Invalid arguments to forloop +') +dnl @error{}Invalid arguments to forloop +dnl @result{} +errprint(`1')errprint(`2',`3 +') +dnl @error{}12 3 +dnl @result{} diff -ruNp m4-1.4.9/checks/156.improved_f m4-1.4.10/checks/156.improved_f --- m4-1.4.9/checks/156.improved_f 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/156.improved_f 1969-12-31 17:00:00.000000000 -0700 @@ -1,31 +0,0 @@ -dnl @ ../doc/m4.texinfo:6207: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -undivert(`forloop2.m4')dnl -dnl @result{}divert(`-1') -dnl @result{}# forloop(var, from, to, stmt) - improved version: -dnl @result{}# works even if VAR is not a strict macro name -dnl @result{}# performs sanity check that FROM is larger than TO -dnl @result{}# allows complex numerical expressions in TO and FROM -dnl @result{}define(`forloop', `ifelse(eval(`($3) >= ($2)'), `1', -dnl @result{} `pushdef(`$1', eval(`$2'))_forloop(`$1', -dnl @result{} eval(`$3'), `$4')popdef(`$1')')') -dnl @result{}define(`_forloop', -dnl @result{} `$3`'ifelse(indir(`$1'), `$2', `', -dnl @result{} `define(`$1', incr(indir(`$1')))$0($@)')') -dnl @result{}divert`'dnl -include(`forloop2.m4') -dnl @result{} -forloop(`i', `2', `1', `no iteration occurs') -dnl @result{} -forloop(`', `1', `2', ` odd iterator name') -dnl @result{} odd iterator name odd iterator name -forloop(`i', `5 + 5', `0xc', ` 0x`'eval(i, `16')') -dnl @result{} 0xa 0xb 0xc -forloop(`i', `a', `b', `non-numeric bounds') -dnl @error{}m4:stdin:6: bad expression in eval (bad input): (b) >= (a) -dnl @result{} diff -ruNp m4-1.4.9/checks/157.improved_f m4-1.4.10/checks/157.improved_f --- m4-1.4.9/checks/157.improved_f 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/157.improved_f 1969-12-31 17:00:00.000000000 -0700 @@ -1,33 +0,0 @@ -dnl @ ../doc/m4.texinfo:6246: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -include(`foreachq.m4') -dnl @result{} -traceon(`shift')debugmode(`aq') -dnl @result{} -foreachq(`x', ``1', `2', `3', `4'', `x -')dnl -dnl @result{}1 -dnl @error{}m4trace: -3- shift(`1', `2', `3', `4') -dnl @error{}m4trace: -2- shift(`1', `2', `3', `4') -dnl @result{}2 -dnl @error{}m4trace: -4- shift(`1', `2', `3', `4') -dnl @error{}m4trace: -3- shift(`2', `3', `4') -dnl @error{}m4trace: -3- shift(`1', `2', `3', `4') -dnl @error{}m4trace: -2- shift(`2', `3', `4') -dnl @result{}3 -dnl @error{}m4trace: -5- shift(`1', `2', `3', `4') -dnl @error{}m4trace: -4- shift(`2', `3', `4') -dnl @error{}m4trace: -3- shift(`3', `4') -dnl @error{}m4trace: -4- shift(`1', `2', `3', `4') -dnl @error{}m4trace: -3- shift(`2', `3', `4') -dnl @error{}m4trace: -2- shift(`3', `4') -dnl @result{}4 -dnl @error{}m4trace: -6- shift(`1', `2', `3', `4') -dnl @error{}m4trace: -5- shift(`2', `3', `4') -dnl @error{}m4trace: -4- shift(`3', `4') -dnl @error{}m4trace: -3- shift(`4') diff -ruNp m4-1.4.9/checks/157.location m4-1.4.10/checks/157.location --- m4-1.4.9/checks/157.location 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/157.location 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:5704: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +errprint(__program__:__file__:__line__: `input error +') +dnl @error{}m4:stdin:1: input error +dnl @result{} diff -ruNp m4-1.4.9/checks/158.improved_f m4-1.4.10/checks/158.improved_f --- m4-1.4.9/checks/158.improved_f 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/158.improved_f 1969-12-31 17:00:00.000000000 -0700 @@ -1,31 +0,0 @@ -dnl @ ../doc/m4.texinfo:6286: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -include(`foreachq2.m4') -dnl @result{} -undivert(`foreachq2.m4')dnl -dnl @result{}include(`quote.m4')dnl -dnl @result{}divert(`-1') -dnl @result{}# foreachq(x, `item_1, item_2, ..., item_n', stmt) -dnl @result{}# quoted list, improved version -dnl @result{}define(`foreachq', `pushdef(`$1')_foreachq($@)popdef(`$1')') -dnl @result{}define(`_arg1q', ``$1'') -dnl @result{}define(`_rest', `ifelse(`$#', `1', `', `dquote(shift($@))')') -dnl @result{}define(`_foreachq', `ifelse(`$2', `', `', -dnl @result{} `define(`$1', _arg1q($2))$3`'$0(`$1', _rest($2), `$3')')') -dnl @result{}divert`'dnl -traceon(`shift')debugmode(`aq') -dnl @result{} -foreachq(`x', ``1', `2', `3', `4'', `x -')dnl -dnl @result{}1 -dnl @error{}m4trace: -3- shift(`1', `2', `3', `4') -dnl @result{}2 -dnl @error{}m4trace: -3- shift(`2', `3', `4') -dnl @result{}3 -dnl @error{}m4trace: -3- shift(`3', `4') -dnl @result{}4 diff -ruNp m4-1.4.9/checks/158.location m4-1.4.10/checks/158.location --- m4-1.4.9/checks/158.location 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/158.location 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,17 @@ +dnl @ ../doc/m4.texinfo:5723: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`foo', ``$0' called at __file__:__line__') +dnl @result{} +foo +dnl @result{}foo called at stdin:2 +include(`incl.m4') +dnl @result{}Include file start +dnl @result{}foo called at ../examples/incl.m4:2 +dnl @result{}Include file end +dnl @result{} diff -ruNp m4-1.4.9/checks/159.improved_f m4-1.4.10/checks/159.improved_f --- m4-1.4.9/checks/159.improved_f 2007-03-23 07:36:11.000000000 -0600 +++ m4-1.4.10/checks/159.improved_f 1969-12-31 17:00:00.000000000 -0700 @@ -1,35 +0,0 @@ -dnl @ ../doc/m4.texinfo:6327: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -include(`foreach2.m4') -dnl @result{} -undivert(`foreach2.m4')dnl -dnl @result{}include(`quote.m4')dnl -dnl @result{}divert(`-1') -dnl @result{}# foreach(x, (item_1, item_2, ..., item_n), stmt) -dnl @result{}# parenthesized list, improved version -dnl @result{}define(`foreach', `pushdef(`$1')_foreach(`$1', -dnl @result{} (dquote(dquote_elt$2)), `$3')popdef(`$1')') -dnl @result{}define(`_arg1', `$1') -dnl @result{}define(`_foreach', `ifelse(`$2', `(`')', `', -dnl @result{} `define(`$1', _arg1$2)$3`'$0(`$1', (dquote(shift$2)), `$3')')') -dnl @result{}divert`'dnl -traceon(`shift')debugmode(`aq') -dnl @result{} -foreach(`x', `(`1', `2', `3', `4')', `x -')dnl -dnl @error{}m4trace: -4- shift(`1', `2', `3', `4') -dnl @error{}m4trace: -4- shift(`2', `3', `4') -dnl @error{}m4trace: -4- shift(`3', `4') -dnl @result{}1 -dnl @error{}m4trace: -3- shift(``1'', ``2'', ``3'', ``4'') -dnl @result{}2 -dnl @error{}m4trace: -3- shift(``2'', ``3'', ``4'') -dnl @result{}3 -dnl @error{}m4trace: -3- shift(``3'', ``4'') -dnl @result{}4 -dnl @error{}m4trace: -3- shift(``4'') diff -ruNp m4-1.4.9/checks/159.location m4-1.4.10/checks/159.location --- m4-1.4.9/checks/159.location 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/159.location 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,31 @@ +dnl @ ../doc/m4.texinfo:5744: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`echo', `$@') +dnl @result{} +define(`foo', `echo(__line__ +__line__)') +dnl @result{} +echo(__line__ +__line__) +dnl @result{}4 +dnl @result{}5 +m4wrap(`foo +') +dnl @result{} +foo(errprint(__line__ +__line__ +)) +dnl @error{}8 +dnl @error{}9 +dnl @result{}8 +dnl @result{}8 +__line__ +dnl @result{}11 +dnl @result{}6 +dnl @result{}6 diff -ruNp m4-1.4.9/checks/160.improved_f m4-1.4.10/checks/160.improved_f --- m4-1.4.9/checks/160.improved_f 2007-03-23 07:36:12.000000000 -0600 +++ m4-1.4.10/checks/160.improved_f 1969-12-31 17:00:00.000000000 -0700 @@ -1,71 +0,0 @@ -dnl @ ../doc/m4.texinfo:6371: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -include(`foreach2.m4') -dnl @result{} -include(`foreachq2.m4') -dnl @result{} -dnl 0-element list: -foreach(`x', `', `') / foreachq(`x', `', `') -dnl @result{} / -dnl 1-element list of empty element -foreach(`x', `()', `') / foreachq(`x', ``'', `') -dnl @result{}<> / <> -dnl 2-element list of empty elements -foreach(`x', `(`',`')', `') / foreachq(`x', ``',`'', `') -dnl @result{}<><> / <><> -dnl 1-element list of a comma -foreach(`x', `(`,')', `') / foreachq(`x', ``,'', `') -dnl @result{}<,> / <,> -dnl 2-element list of unbalanced parentheses -foreach(`x', `(`(', `)')', `') / foreachq(`x', ``(', `)'', `') -dnl @result{}<(><)> / <(><)> -define(`active', `ACT, IVE') -dnl @result{} -traceon(`active') -dnl @result{} -dnl list of unquoted macros; expansion occurs before recursion -foreach(`x', `(active, active)', ` -')dnl -dnl @error{}m4trace: -4- active -> `ACT, IVE' -dnl @error{}m4trace: -4- active -> `ACT, IVE' -dnl @result{} -dnl @result{} -dnl @result{} -dnl @result{} -foreachq(`x', `active, active', ` -')dnl -dnl @error{}m4trace: -3- active -> `ACT, IVE' -dnl @error{}m4trace: -3- active -> `ACT, IVE' -dnl @result{} -dnl @error{}m4trace: -3- active -> `ACT, IVE' -dnl @error{}m4trace: -3- active -> `ACT, IVE' -dnl @result{} -dnl @result{} -dnl @result{} -dnl list of quoted macros; expansion occurs during recursion -foreach(`x', `(`active', `active')', ` -')dnl -dnl @error{}m4trace: -1- active -> `ACT, IVE' -dnl @result{} -dnl @error{}m4trace: -1- active -> `ACT, IVE' -dnl @result{} -foreachq(`x', ``active', `active'', ` -')dnl -dnl @error{}m4trace: -1- active -> `ACT, IVE' -dnl @result{} -dnl @error{}m4trace: -1- active -> `ACT, IVE' -dnl @result{} -dnl list of double-quoted macro names; no expansion -foreach(`x', `(``active'', ``active'')', ` -')dnl -dnl @result{} -dnl @result{} -foreachq(`x', ```active'', ``active''', ` -')dnl -dnl @result{} -dnl @result{} diff -ruNp m4-1.4.9/checks/160.m4exit m4-1.4.10/checks/160.m4exit --- m4-1.4.9/checks/160.m4exit 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/160.m4exit 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:5797: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +m4wrap(`This text is lost due to `m4exit'.') +dnl @result{} +divert(`1') So is this. +divert +dnl @result{} +m4exit And this is never read. diff -ruNp m4-1.4.9/checks/161.improved_c m4-1.4.10/checks/161.improved_c --- m4-1.4.9/checks/161.improved_c 2007-03-23 07:36:12.000000000 -0600 +++ m4-1.4.10/checks/161.improved_c 1969-12-31 17:00:00.000000000 -0700 @@ -1,29 +0,0 @@ -dnl @ ../doc/m4.texinfo:6447: Origin of test -dnl @ expected status: 0 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`cleardivert', - `pushdef(`_n', divnum)divert(`-1')undivert($@)divert(_n)popdef(`_n')') -dnl @result{} -divert(`1')one -divert -dnl @result{} -cleardivert -dnl @result{} -undivert -dnl @result{}one -dnl @result{} -define(`cleardivert', - `pushdef(`_num', divnum)divert(`-1')ifelse(`$#', `0', - `undivert`'', `undivert($@)')divert(_num)popdef(`_num')') -dnl @result{} -divert(`2')two -divert -dnl @result{} -cleardivert -dnl @result{} -undivert -dnl @result{} diff -ruNp m4-1.4.9/checks/161.m4exit m4-1.4.10/checks/161.m4exit --- m4-1.4.9/checks/161.m4exit 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/161.m4exit 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:5815: Origin of test +dnl @ expected status: 1 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`fatal_error', + `errprint(__program__:__file__:__line__`: fatal error: $* +')m4exit(`1')') +dnl @result{} +fatal_error(`this is a BAD one, buster') +dnl @error{}m4:stdin:4: fatal error: this is a BAD one, buster diff -ruNp m4-1.4.9/checks/162.extensions m4-1.4.10/checks/162.extensions --- m4-1.4.9/checks/162.extensions 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/162.extensions 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,25 @@ +dnl @ ../doc/m4.texinfo:6068: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`a1', `A1') +dnl @result{} +dnl First argument, concatenated with 1 +define(`_1', `$1')define(`first1', `_1($@)1') +dnl @result{} +dnl Eleventh argument, portable +define(`_9', `$9')define(`eleventh', `_9(shift(shift($@)))') +dnl @result{} +dnl Eleventh argument, GNU style +define(`Eleventh', `$11') +dnl @result{} +first1(`a', `b', `c', `d', `e', `f', `g', `h', `i', `j', `k') +dnl @result{}A1 +eleventh(`a', `b', `c', `d', `e', `f', `g', `h', `i', `j', `k') +dnl @result{}k +Eleventh(`a', `b', `c', `d', `e', `f', `g', `h', `i', `j', `k') +dnl @result{}k diff -ruNp m4-1.4.9/checks/162.improved_f m4-1.4.10/checks/162.improved_f --- m4-1.4.9/checks/162.improved_f 2007-03-23 07:36:12.000000000 -0600 +++ m4-1.4.10/checks/162.improved_f 1969-12-31 17:00:00.000000000 -0700 @@ -1,19 +0,0 @@ -dnl @ ../doc/m4.texinfo:6485: Origin of test -dnl @ expected status: 1 -dnl @ Copyright (C) 2006, 2007 Free Software Foundation -dnl @ This file is free software; the Free Software Foundation -dnl @ gives unlimited permission to copy and/or distribute it -dnl @ with or without modifications, as long as this notice -dnl @ is preserved. -define(`fatal_error', - `errprint(ifdef(`__program__', `__program__', ``m4'')'dnl -`:ifelse(__line__, `0', `', - `__file__:__line__:')` fatal error: $* -')m4exit(`1')') -dnl @result{} -m4wrap(`divnum(`demo of internal message') -fatal_error(`inside wrapped text')') -dnl @result{} -dnl @error{}m4:stdin:6: Warning: excess arguments to builtin `divnum' ignored -dnl @result{}0 -dnl @error{}m4:stdin:6: fatal error: inside wrapped text diff -ruNp m4-1.4.9/checks/163.incompatib m4-1.4.10/checks/163.incompatib --- m4-1.4.9/checks/163.incompatib 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/163.incompatib 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,25 @@ +dnl @ ../doc/m4.texinfo:6196: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +undivert(`wrapfifo.m4')dnl +dnl @result{}dnl Redefine m4wrap to have FIFO semantics. +dnl @result{}define(`_m4wrap_level', `0')dnl +dnl @result{}define(`m4wrap', +dnl @result{}`ifdef(`m4wrap'_m4wrap_level, +dnl @result{} `define(`m4wrap'_m4wrap_level, +dnl @result{} defn(`m4wrap'_m4wrap_level)`$1')', +dnl @result{} `builtin(`m4wrap', `define(`_m4wrap_level', +dnl @result{} incr(_m4wrap_level))dnl +dnl @result{}m4wrap'_m4wrap_level)dnl +dnl @result{}define(`m4wrap'_m4wrap_level, `$1')')')dnl +include(`wrapfifo.m4') +dnl @result{} +m4wrap(`a`'m4wrap(`c +', `d')')m4wrap(`b') +dnl @result{} +dnl @result{}abc diff -ruNp m4-1.4.9/checks/164.other_inco m4-1.4.10/checks/164.other_inco --- m4-1.4.9/checks/164.other_inco 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/164.other_inco 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,17 @@ +dnl @ ../doc/m4.texinfo:6358: Origin of test +dnl @ expected status: 0 +dnl @ extra options: -s +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +divert(2)2 +divert(1)1 +divert`'0 +dnl @result{}#line 3 "stdin" +dnl @result{}0 +dnl @result{}#line 2 "stdin" +dnl @result{}1 +dnl @result{}#line 1 "stdin" +dnl @result{}2 diff -ruNp m4-1.4.9/checks/165.other_inco m4-1.4.10/checks/165.other_inco --- m4-1.4.9/checks/165.other_inco 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/165.other_inco 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,12 @@ +dnl @ ../doc/m4.texinfo:6383: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`x', `x') +dnl @result{} +define(`x', `x ') +dnl @result{} diff -ruNp m4-1.4.9/checks/166.improved_e m4-1.4.10/checks/166.improved_e --- m4-1.4.9/checks/166.improved_e 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/166.improved_e 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,14 @@ +dnl @ ../doc/m4.texinfo:6434: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`exch', ``$2', `$1'') +dnl @result{} +define(exch(`expansion text', `macro')) +dnl @result{} +macro +dnl @result{}expansion text diff -ruNp m4-1.4.9/checks/167.improved_f m4-1.4.10/checks/167.improved_f --- m4-1.4.9/checks/167.improved_f 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/167.improved_f 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,32 @@ +dnl @ ../doc/m4.texinfo:6454: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +undivert(`forloop2.m4')dnl +dnl @result{}divert(`-1') +dnl @result{}# forloop(var, from, to, stmt) - improved version: +dnl @result{}# works even if VAR is not a strict macro name +dnl @result{}# performs sanity check that FROM is larger than TO +dnl @result{}# allows complex numerical expressions in TO and FROM +dnl @result{}define(`forloop', `ifelse(eval(`($3) >= ($2)'), `1', +dnl @result{} `pushdef(`$1', eval(`$2'))_forloop(`$1', +dnl @result{} eval(`$3'), `$4')popdef(`$1')')') +dnl @result{}define(`_forloop', +dnl @result{} `$3`'ifelse(indir(`$1'), `$2', `', +dnl @result{} `define(`$1', incr(indir(`$1')))$0($@)')') +dnl @result{}divert`'dnl +include(`forloop2.m4') +dnl @result{} +forloop(`i', `2', `1', `no iteration occurs') +dnl @result{} +forloop(`', `1', `2', ` odd iterator name') +dnl @result{} odd iterator name odd iterator name +forloop(`i', `5 + 5', `0xc', ` 0x`'eval(i, `16')') +dnl @result{} 0xa 0xb 0xc +forloop(`i', `a', `b', `non-numeric bounds') +dnl @error{}m4:stdin:6: bad expression in eval (bad input): (b) >= (a) +dnl @result{} diff -ruNp m4-1.4.9/checks/168.improved_f m4-1.4.10/checks/168.improved_f --- m4-1.4.9/checks/168.improved_f 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/168.improved_f 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,34 @@ +dnl @ ../doc/m4.texinfo:6494: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +include(`foreachq.m4') +dnl @result{} +traceon(`shift')debugmode(`aq') +dnl @result{} +foreachq(`x', ``1', `2', `3', `4'', `x +')dnl +dnl @result{}1 +dnl @error{}m4trace: -3- shift(`1', `2', `3', `4') +dnl @error{}m4trace: -2- shift(`1', `2', `3', `4') +dnl @result{}2 +dnl @error{}m4trace: -4- shift(`1', `2', `3', `4') +dnl @error{}m4trace: -3- shift(`2', `3', `4') +dnl @error{}m4trace: -3- shift(`1', `2', `3', `4') +dnl @error{}m4trace: -2- shift(`2', `3', `4') +dnl @result{}3 +dnl @error{}m4trace: -5- shift(`1', `2', `3', `4') +dnl @error{}m4trace: -4- shift(`2', `3', `4') +dnl @error{}m4trace: -3- shift(`3', `4') +dnl @error{}m4trace: -4- shift(`1', `2', `3', `4') +dnl @error{}m4trace: -3- shift(`2', `3', `4') +dnl @error{}m4trace: -2- shift(`3', `4') +dnl @result{}4 +dnl @error{}m4trace: -6- shift(`1', `2', `3', `4') +dnl @error{}m4trace: -5- shift(`2', `3', `4') +dnl @error{}m4trace: -4- shift(`3', `4') +dnl @error{}m4trace: -3- shift(`4') diff -ruNp m4-1.4.9/checks/169.improved_f m4-1.4.10/checks/169.improved_f --- m4-1.4.9/checks/169.improved_f 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/169.improved_f 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,32 @@ +dnl @ ../doc/m4.texinfo:6535: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +include(`foreachq2.m4') +dnl @result{} +undivert(`foreachq2.m4')dnl +dnl @result{}include(`quote.m4')dnl +dnl @result{}divert(`-1') +dnl @result{}# foreachq(x, `item_1, item_2, ..., item_n', stmt) +dnl @result{}# quoted list, improved version +dnl @result{}define(`foreachq', `pushdef(`$1')_foreachq($@)popdef(`$1')') +dnl @result{}define(`_arg1q', ``$1'') +dnl @result{}define(`_rest', `ifelse(`$#', `1', `', `dquote(shift($@))')') +dnl @result{}define(`_foreachq', `ifelse(`$2', `', `', +dnl @result{} `define(`$1', _arg1q($2))$3`'$0(`$1', _rest($2), `$3')')') +dnl @result{}divert`'dnl +traceon(`shift')debugmode(`aq') +dnl @result{} +foreachq(`x', ``1', `2', `3', `4'', `x +')dnl +dnl @result{}1 +dnl @error{}m4trace: -3- shift(`1', `2', `3', `4') +dnl @result{}2 +dnl @error{}m4trace: -3- shift(`2', `3', `4') +dnl @result{}3 +dnl @error{}m4trace: -3- shift(`3', `4') +dnl @result{}4 diff -ruNp m4-1.4.9/checks/170.improved_f m4-1.4.10/checks/170.improved_f --- m4-1.4.9/checks/170.improved_f 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/170.improved_f 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,36 @@ +dnl @ ../doc/m4.texinfo:6577: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +include(`foreach2.m4') +dnl @result{} +undivert(`foreach2.m4')dnl +dnl @result{}include(`quote.m4')dnl +dnl @result{}divert(`-1') +dnl @result{}# foreach(x, (item_1, item_2, ..., item_n), stmt) +dnl @result{}# parenthesized list, improved version +dnl @result{}define(`foreach', `pushdef(`$1')_foreach(`$1', +dnl @result{} (dquote(dquote_elt$2)), `$3')popdef(`$1')') +dnl @result{}define(`_arg1', `$1') +dnl @result{}define(`_foreach', `ifelse(`$2', `(`')', `', +dnl @result{} `define(`$1', _arg1$2)$3`'$0(`$1', (dquote(shift$2)), `$3')')') +dnl @result{}divert`'dnl +traceon(`shift')debugmode(`aq') +dnl @result{} +foreach(`x', `(`1', `2', `3', `4')', `x +')dnl +dnl @error{}m4trace: -4- shift(`1', `2', `3', `4') +dnl @error{}m4trace: -4- shift(`2', `3', `4') +dnl @error{}m4trace: -4- shift(`3', `4') +dnl @result{}1 +dnl @error{}m4trace: -3- shift(``1'', ``2'', ``3'', ``4'') +dnl @result{}2 +dnl @error{}m4trace: -3- shift(``2'', ``3'', ``4'') +dnl @result{}3 +dnl @error{}m4trace: -3- shift(``3'', ``4'') +dnl @result{}4 +dnl @error{}m4trace: -3- shift(``4'') diff -ruNp m4-1.4.9/checks/171.improved_f m4-1.4.10/checks/171.improved_f --- m4-1.4.9/checks/171.improved_f 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/171.improved_f 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,72 @@ +dnl @ ../doc/m4.texinfo:6622: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +include(`foreach2.m4') +dnl @result{} +include(`foreachq2.m4') +dnl @result{} +dnl 0-element list: +foreach(`x', `', `') / foreachq(`x', `', `') +dnl @result{} / +dnl 1-element list of empty element +foreach(`x', `()', `') / foreachq(`x', ``'', `') +dnl @result{}<> / <> +dnl 2-element list of empty elements +foreach(`x', `(`',`')', `') / foreachq(`x', ``',`'', `') +dnl @result{}<><> / <><> +dnl 1-element list of a comma +foreach(`x', `(`,')', `') / foreachq(`x', ``,'', `') +dnl @result{}<,> / <,> +dnl 2-element list of unbalanced parentheses +foreach(`x', `(`(', `)')', `') / foreachq(`x', ``(', `)'', `') +dnl @result{}<(><)> / <(><)> +define(`active', `ACT, IVE') +dnl @result{} +traceon(`active') +dnl @result{} +dnl list of unquoted macros; expansion occurs before recursion +foreach(`x', `(active, active)', ` +')dnl +dnl @error{}m4trace: -4- active -> `ACT, IVE' +dnl @error{}m4trace: -4- active -> `ACT, IVE' +dnl @result{} +dnl @result{} +dnl @result{} +dnl @result{} +foreachq(`x', `active, active', ` +')dnl +dnl @error{}m4trace: -3- active -> `ACT, IVE' +dnl @error{}m4trace: -3- active -> `ACT, IVE' +dnl @result{} +dnl @error{}m4trace: -3- active -> `ACT, IVE' +dnl @error{}m4trace: -3- active -> `ACT, IVE' +dnl @result{} +dnl @result{} +dnl @result{} +dnl list of quoted macros; expansion occurs during recursion +foreach(`x', `(`active', `active')', ` +')dnl +dnl @error{}m4trace: -1- active -> `ACT, IVE' +dnl @result{} +dnl @error{}m4trace: -1- active -> `ACT, IVE' +dnl @result{} +foreachq(`x', ``active', `active'', ` +')dnl +dnl @error{}m4trace: -1- active -> `ACT, IVE' +dnl @result{} +dnl @error{}m4trace: -1- active -> `ACT, IVE' +dnl @result{} +dnl list of double-quoted macro names; no expansion +foreach(`x', `(``active'', ``active'')', ` +')dnl +dnl @result{} +dnl @result{} +foreachq(`x', ```active'', ``active''', ` +')dnl +dnl @result{} +dnl @result{} diff -ruNp m4-1.4.9/checks/172.improved_c m4-1.4.10/checks/172.improved_c --- m4-1.4.9/checks/172.improved_c 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/172.improved_c 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,30 @@ +dnl @ ../doc/m4.texinfo:6699: Origin of test +dnl @ expected status: 0 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`cleardivert', + `pushdef(`_n', divnum)divert(`-1')undivert($@)divert(_n)popdef(`_n')') +dnl @result{} +divert(`1')one +divert +dnl @result{} +cleardivert +dnl @result{} +undivert +dnl @result{}one +dnl @result{} +define(`cleardivert', + `pushdef(`_num', divnum)divert(`-1')ifelse(`$#', `0', + `undivert`'', `undivert($@)')divert(_num)popdef(`_num')') +dnl @result{} +divert(`2')two +divert +dnl @result{} +cleardivert +dnl @result{} +undivert +dnl @result{} diff -ruNp m4-1.4.9/checks/173.improved_f m4-1.4.10/checks/173.improved_f --- m4-1.4.9/checks/173.improved_f 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/checks/173.improved_f 2007-07-05 08:26:40.000000000 -0600 @@ -0,0 +1,20 @@ +dnl @ ../doc/m4.texinfo:6737: Origin of test +dnl @ expected status: 1 +dnl @ extra options: +dnl @ Copyright (C) 2006, 2007 Free Software Foundation +dnl @ This file is free software; the Free Software Foundation +dnl @ gives unlimited permission to copy and/or distribute it +dnl @ with or without modifications, as long as this notice +dnl @ is preserved. +define(`fatal_error', + `errprint(ifdef(`__program__', `__program__', ``m4'')'dnl +`:ifelse(__line__, `0', `', + `__file__:__line__:')` fatal error: $* +')m4exit(`1')') +dnl @result{} +m4wrap(`divnum(`demo of internal message') +fatal_error(`inside wrapped text')') +dnl @result{} +dnl @error{}m4:stdin:6: Warning: excess arguments to builtin `divnum' ignored +dnl @result{}0 +dnl @error{}m4:stdin:6: fatal error: inside wrapped text diff -ruNp m4-1.4.9/checks/Makefile.in m4-1.4.10/checks/Makefile.in --- m4-1.4.9/checks/Makefile.in 2006-07-14 09:15:58.000000000 -0600 +++ m4-1.4.10/checks/Makefile.in 2007-07-04 21:56:03.000000000 -0600 @@ -1,9 +1,9 @@ ## -## Copyright (C) 1992, 1993, 1994, 2006 Free Software Foundation, Inc. +## Copyright (C) 1992, 1993, 1994, 2006, 2007 Free Software Foundation, Inc. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or +## 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, diff -ruNp m4-1.4.9/checks/check-them m4-1.4.10/checks/check-them --- m4-1.4.9/checks/check-them 2007-01-06 12:56:11.000000000 -0700 +++ m4-1.4.10/checks/check-them 2007-05-25 06:58:49.000000000 -0600 @@ -57,8 +57,9 @@ do continue } echo "Checking $file" + options=`sed -ne '3s/^dnl @ extra options: //p;3q' "$file"` sed -e '/^dnl @/d' -e '/^\^D$/q' "$file" \ - | LC_MESSAGES=C m4 -d -I "$examples" - >$out 2>$err + | LC_MESSAGES=C m4 -d -I "$examples" $options - >$out 2>$err stat=$? xstat=`sed -ne '2s/^dnl @ expected status: //p;2q' "$file"` diff -ruNp m4-1.4.9/checks/get-them m4-1.4.10/checks/get-them --- m4-1.4.9/checks/get-them 2007-01-27 18:54:41.000000000 -0700 +++ m4-1.4.10/checks/get-them 2007-05-25 14:29:17.000000000 -0600 @@ -15,6 +15,7 @@ BEGIN { count = 0; file = "NONE"; status = 0; + options = ""; } /^@node / { @@ -37,6 +38,7 @@ BEGIN { /^@comment ignore$/ { getline; status = 0; + options = ""; next; } @@ -44,6 +46,11 @@ BEGIN { status = $3; } +/^@comment options: / { + options = $0; + gsub ("@comment options:", "", options); +} + /^@example$/, /^@end example$/ { if (seq < 0) next; @@ -55,12 +62,14 @@ BEGIN { file = sprintf("%03d.%s", count, node); printf("dnl @ %s:%d: Origin of test\n"\ "dnl @ expected status: %d\n"\ + "dnl @ extra options: %s\n"\ "dnl @ Copyright (C) 2006, 2007 Free Software Foundation\n"\ "dnl @ This file is free software; the Free Software Foundation\n"\ "dnl @ gives unlimited permission to copy and/or distribute it\n"\ "dnl @ with or without modifications, as long as this notice\n"\ - "dnl @ is preserved.\n", FILENAME, NR, status) > file; + "dnl @ is preserved.\n", FILENAME, NR, status, options) > file; status = 0; + options = ""; next; } if ($0 ~ /^@end example$/) { @@ -68,6 +77,8 @@ BEGIN { } if ($0 ~ /^\^D$/) next; + if ($0 ~ /^\$ @kbd/) + next; if ($0 ~ /^@result\{\}/ || $0 ~ /^@error\{\}/) prefix = "dnl "; else diff -ruNp m4-1.4.9/config.guess m4-1.4.10/config.guess --- m4-1.4.9/config.guess 2007-03-23 06:54:13.000000000 -0600 +++ m4-1.4.10/config.guess 2007-07-09 21:15:35.000000000 -0600 @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2007-03-06' +timestamp='2007-05-17' # 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 @@ -330,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:*) + i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) diff -ruNp m4-1.4.9/config.sub m4-1.4.10/config.sub --- m4-1.4.9/config.sub 2007-03-23 06:54:13.000000000 -0600 +++ m4-1.4.10/config.sub 2007-07-09 21:15:35.000000000 -0600 @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. -timestamp='2007-01-18' +timestamp='2007-06-28' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -475,8 +475,8 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -683,6 +683,10 @@ case $basic_machine in basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; diff -ruNp m4-1.4.9/configure m4-1.4.10/configure --- m4-1.4.9/configure 2007-03-23 07:32:41.000000000 -0600 +++ m4-1.4.10/configure 2007-07-09 21:15:12.000000000 -0600 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for GNU M4 1.4.9. +# Generated by GNU Autoconf 2.61 for GNU M4 1.4.10. # # Report bugs to . # @@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='GNU M4' PACKAGE_TARNAME='m4' -PACKAGE_VERSION='1.4.9' -PACKAGE_STRING='GNU M4 1.4.9' +PACKAGE_VERSION='1.4.10' +PACKAGE_STRING='GNU M4 1.4.10' PACKAGE_BUGREPORT='bug-m4@gnu.org' ac_unique_file="src/m4.h" @@ -708,26 +708,111 @@ GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE ALLOCA ALLOCA_H +GNULIB_FPRINTF_POSIX +GNULIB_PRINTF_POSIX +GNULIB_SNPRINTF +GNULIB_SPRINTF_POSIX +GNULIB_VFPRINTF_POSIX +GNULIB_VPRINTF_POSIX +GNULIB_VSNPRINTF +GNULIB_VSPRINTF_POSIX +GNULIB_VASPRINTF +GNULIB_FSEEK +GNULIB_FSEEKO +GNULIB_FTELL +GNULIB_FTELLO +GNULIB_FFLUSH +REPLACE_FPRINTF +REPLACE_VFPRINTF +REPLACE_PRINTF +REPLACE_VPRINTF +REPLACE_SNPRINTF +HAVE_DECL_SNPRINTF +REPLACE_VSNPRINTF +HAVE_DECL_VSNPRINTF +REPLACE_SPRINTF +REPLACE_VSPRINTF +HAVE_VASPRINTF +REPLACE_VASPRINTF +HAVE_FSEEKO +REPLACE_FSEEKO +REPLACE_FSEEK +HAVE_FTELLO +REPLACE_FTELLO +REPLACE_FTELL +REPLACE_FFLUSH +INCLUDE_NEXT +NEXT_FLOAT_H +FLOAT_H +GNULIB_FREXP +GNULIB_FREXPL +GNULIB_LDEXPL +GNULIB_MATHL +GNULIB_SIGNBIT +HAVE_DECL_ACOSL +HAVE_DECL_ASINL +HAVE_DECL_ATANL +HAVE_DECL_CEILL +HAVE_DECL_COSL +HAVE_DECL_EXPL +HAVE_DECL_FLOORL +HAVE_DECL_FREXPL +HAVE_DECL_LDEXPL +HAVE_DECL_LOGL +HAVE_DECL_SINL +HAVE_DECL_SQRTL +HAVE_DECL_TANL +REPLACE_FREXP +REPLACE_FREXPL +REPLACE_LDEXPL +REPLACE_SIGNBIT GETOPT_H -ABSOLUTE_SYS_TIME_H +LIBINTL +LTLIBINTL +NEXT_SYS_TIME_H HAVE_SYS_TIME_H HAVE_STRUCT_TIMEVAL REPLACE_GETTIMEOFDAY SYS_TIME_H GLIBC21 +GNULIB_CHOWN +GNULIB_DUP2 +GNULIB_FCHDIR +GNULIB_FTRUNCATE +GNULIB_GETCWD +GNULIB_GETLOGIN_R +GNULIB_LCHOWN +GNULIB_LSEEK +GNULIB_READLINK +GNULIB_SLEEP +HAVE_DUP2 +HAVE_FTRUNCATE +HAVE_READLINK +HAVE_SLEEP +HAVE_DECL_GETLOGIN_R +REPLACE_CHOWN +REPLACE_FCHDIR +REPLACE_GETCWD +REPLACE_LCHOWN +REPLACE_LSEEK +NEXT_MATH_H GNULIB_GETSUBOPT GNULIB_MKDTEMP GNULIB_MKSTEMP HAVE_GETSUBOPT HAVE_MKDTEMP REPLACE_MKSTEMP +GNULIB_SIGPROCMASK +HAVE_POSIX_SIGNALBLOCKING +HAVE_SIGSET_T +NEXT_SIGNAL_H STDBOOL_H HAVE__BOOL HAVE_LONG_LONG_INT HAVE_UNSIGNED_LONG_LONG_INT HAVE_INTTYPES_H HAVE_SYS_TYPES_H -ABSOLUTE_STDINT_H +NEXT_STDINT_H HAVE_STDINT_H HAVE_SYS_INTTYPES_H HAVE_SYS_BITYPES_H @@ -745,30 +830,25 @@ SIZE_T_SUFFIX WCHAR_T_SUFFIX WINT_T_SUFFIX STDINT_H -ABSOLUTE_STDLIB_H -ABSOLUTE_SYS_STAT_H +NEXT_STDIO_H +NEXT_STDLIB_H +HAVE_LSTAT +HAVE_DECL_MKDIR +HAVE_IO_H +NEXT_SYS_STAT_H SYS_STAT_H -GNULIB_CHOWN -GNULIB_DUP2 -GNULIB_FCHDIR -GNULIB_FTRUNCATE -GNULIB_GETCWD -GNULIB_GETLOGIN_R -GNULIB_READLINK -HAVE_DUP2 -HAVE_FTRUNCATE -HAVE_READLINK -HAVE_DECL_GETLOGIN_R -REPLACE_CHOWN -REPLACE_FCHDIR -REPLACE_GETCWD +NEXT_UNISTD_H HAVE_UNISTD_H -ABSOLUTE_UNISTD_H EOVERFLOW -ABSOLUTE_WCHAR_H +GNULIB_WCWIDTH +HAVE_DECL_WCWIDTH +REPLACE_WCWIDTH WCHAR_H +HAVE_WCHAR_H +NEXT_WCHAR_H +HAVE_ISWCNTRL HAVE_WINT_T -ABSOLUTE_WCTYPE_H +NEXT_WCTYPE_H HAVE_WCTYPE_H WCTYPE_H LIBM4_LIBDEPS @@ -1291,7 +1371,7 @@ 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 GNU M4 1.4.9 to adapt to many kinds of systems. +\`configure' configures GNU M4 1.4.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1361,7 +1441,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU M4 1.4.9:";; + short | recursive ) echo "Configuration of GNU M4 1.4.10:";; esac cat <<\_ACEOF @@ -1371,6 +1451,7 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files + --disable-assert turn off assertions --enable-changeword enable -W and changeword() builtin Optional Packages: @@ -1460,7 +1541,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU M4 configure 1.4.9 +GNU M4 configure 1.4.10 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1474,7 +1555,7 @@ 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 GNU M4 $as_me 1.4.9, which was +It was created by GNU M4 $as_me 1.4.10, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -1757,23 +1838,32 @@ ac_func_list="$ac_func_list sigvec" ac_func_list="$ac_func_list strerror" ac_header_list="$ac_header_list unistd.h" ac_func_list="$ac_func_list raise" +ac_header_list="$ac_header_list float.h" ac_header_list="$ac_header_list stdio_ext.h" +ac_func_list="$ac_func_list fpurge" +ac_func_list="$ac_func_list __fpurge" +ac_func_list="$ac_func_list __freading" ac_header_list="$ac_header_list sys/time.h" ac_func_list="$ac_func_list gettimeofday" +ac_header_list="$ac_header_list math.h" ac_header_list="$ac_header_list sys/param.h" +gl_printf_safe=yes ac_func_list="$ac_func_list mbsinit" ac_header_list="$ac_header_list locale.h" +ac_func_list="$ac_func_list isblank" ac_func_list="$ac_func_list iswctype" ac_func_list="$ac_func_list mbrtowc" ac_func_list="$ac_func_list wcrtomb" ac_func_list="$ac_func_list wcscoll" +ac_header_list="$ac_header_list signal.h" ac_header_list="$ac_header_list stdint.h" +ac_header_list="$ac_header_list wchar.h" +ac_header_list="$ac_header_list stdio.h" ac_header_list="$ac_header_list stdlib.h" ac_func_list="$ac_func_list lstat" ac_header_list="$ac_header_list sys/stat.h" ac_func_list="$ac_func_list pipe" ac_func_list="$ac_func_list vasnprintf" -ac_header_list="$ac_header_list wchar.h" ac_func_list="$ac_func_list iswcntrl" ac_header_list="$ac_header_list wctype.h" # Check that the precious variables saved in the cache have kept the same @@ -2193,7 +2283,7 @@ fi # Define the identity of the package. PACKAGE='m4' - VERSION='1.4.9' + VERSION='1.4.10' cat >>confdefs.h <<_ACEOF @@ -4519,6 +4609,153 @@ _ACEOF +{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 +echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_largefile_source+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +return fseeko (stdin, 0, 0) && (fseeko) (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 "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_sys_largefile_source=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_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 +int +main () +{ +return fseeko (stdin, 0, 0) && (fseeko) (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 "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_sys_largefile_source=1; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 +echo "${ECHO_T}$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 -f 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 + + + + + # IEEE behaviour is the default on all CPUs except Alpha and SH + # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 + # and the GCC 4.1.2 manual). + case "$host_cpu" in + alpha*) + # On Alpha systems, a compiler option provides the behaviour. + # See the ieee(3) manual page, also available at + # + if test -n "$GCC"; then + # GCC has the option -mieee. + CPPFLAGS="$CPPFLAGS -mieee" + else + # Compaq (ex-DEC) C has the option -ieee. + CPPFLAGS="$CPPFLAGS -ieee" + fi + ;; + sh*) + if test -n "$GCC"; then + # GCC has the option -mieee. + CPPFLAGS="$CPPFLAGS -mieee" + fi + ;; + esac + case $ac_cv_prog_cc_stdc in no) ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; *) { echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 @@ -4869,6 +5106,10 @@ esac + + + + # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then enableval=$enable_largefile; @@ -6481,32 +6722,28 @@ _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 "$as_me:$LINENO: checking whether strerror_r is declared" >&5 +echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_strerror_r+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 + 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> +int +main () +{ +#ifndef strerror_r + (void) strerror_r; +#endif + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -6525,115 +6762,191 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + ac_cv_have_decl_strerror_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no + ac_cv_have_decl_strerror_r=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; } +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5 +echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6; } +if test $ac_cv_have_decl_strerror_r = yes; then -# 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 +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRERROR_R 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRERROR_R 0 +_ACEOF + + +fi + + + +for ac_func in strerror_r +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. */ -#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 +/* 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_header_preproc=no -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. */ -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +#ifdef __STDC__ +# include +#else +# include +#endif -# 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 bug-m4@gnu.org ## -## ----------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; +#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 -{ 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 +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 - eval "$as_ac_Header=\$ac_header_preproc" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +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_header" | $as_tr_cpp` 1 +#define `echo "HAVE_$ac_func" | $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 "$as_me:$LINENO: checking whether strerror_r returns char *" >&5 +echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6; } +if test "${ac_cv_func_strerror_r_char_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - ac_cv_func_malloc_0_nonnull=no + + ac_cv_func_strerror_r_char_p=no + if test $ac_cv_have_decl_strerror_r = yes; 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 () +{ + + char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + char *p = strerror_r (0, buf, sizeof buf); + return !p || x; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$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_func_strerror_r_char_p=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 + else + # strerror_r is not declared. Choose between + # systems that have relatively inaccessible declarations for the + # function. BeOS and DEC UNIX 4.0 fall in this category, but the + # former has a strerror_r that returns char*, while the latter + # has a strerror_r that returns `int'. + # This test should segfault on the DEC system. + if test "$cross_compiling" = yes; then + : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6641,16 +6954,14 @@ _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 - +$ac_includes_default + extern char *strerror_r (); int main () { -return ! malloc (0); +char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + return ! isalpha (x); ; return 0; } @@ -6675,60 +6986,52 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_malloc_0_nonnull=yes + ac_cv_func_strerror_r_char_p=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 - gl_cv_func_malloc_0_nonnull=1 -else - gl_cv_func_malloc_0_nonnull=0 -fi - + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5 +echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; } +if test $ac_cv_func_strerror_r_char_p = yes; then -cat >>confdefs.h <<_ACEOF -#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull +cat >>confdefs.h <<\_ACEOF +#define STRERROR_R_CHAR_P 1 _ACEOF +fi - { echo "$as_me:$LINENO: checking for long double" >&5 -echo $ECHO_N "checking for long double... $ECHO_C" >&6; } -if test "${gt_cv_c_long_double+set}" = set; then + { echo "$as_me:$LINENO: checking for sig_atomic_t" >&5 +echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; } +if test "${ac_cv_type_sig_atomic_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$GCC" = yes; then - gt_cv_c_long_double=yes - else - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#include - /* The Stardent Vistra knows sizeof(long double), but does not support it. */ - long double foo = 0.0; - /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ - int array [2*(sizeof(long double) >= sizeof(double)) - 1]; - +typedef sig_atomic_t ac__type_new_; int main () { - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -6750,58 +7053,257 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - gt_cv_c_long_double=yes + ac_cv_type_sig_atomic_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gt_cv_c_long_double=no + ac_cv_type_sig_atomic_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi fi -{ echo "$as_me:$LINENO: result: $gt_cv_c_long_double" >&5 -echo "${ECHO_T}$gt_cv_c_long_double" >&6; } - if test $gt_cv_c_long_double = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5 +echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; } +if test $ac_cv_type_sig_atomic_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIG_ATOMIC_T 1 +_ACEOF + + +else cat >>confdefs.h <<\_ACEOF -#define HAVE_LONG_DOUBLE 1 +#define sig_atomic_t int _ACEOF - fi +fi -{ echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5 -echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_strerror_r+set}" = set; then + + + + + + + GNULIB_FPRINTF_POSIX=0; + GNULIB_PRINTF_POSIX=0; + GNULIB_SNPRINTF=0; + GNULIB_SPRINTF_POSIX=0; + GNULIB_VFPRINTF_POSIX=0; + GNULIB_VPRINTF_POSIX=0; + GNULIB_VSNPRINTF=0; + GNULIB_VSPRINTF_POSIX=0; + GNULIB_VASPRINTF=0; + GNULIB_FSEEK=0; + GNULIB_FSEEKO=0; + GNULIB_FTELL=0; + GNULIB_FTELLO=0; + GNULIB_FFLUSH=0; + REPLACE_FPRINTF=0; + REPLACE_VFPRINTF=0; + REPLACE_PRINTF=0; + REPLACE_VPRINTF=0; + REPLACE_SNPRINTF=0; + HAVE_DECL_SNPRINTF=1; + REPLACE_VSNPRINTF=0; + HAVE_DECL_VSNPRINTF=1; + REPLACE_SPRINTF=0; + REPLACE_VSPRINTF=0; + HAVE_VASPRINTF=1; + REPLACE_VASPRINTF=0; + HAVE_FSEEKO=1; + REPLACE_FSEEKO=0; + REPLACE_FSEEK=0; + HAVE_FTELLO=1; + REPLACE_FTELLO=0; + REPLACE_FTELL=0; + REPLACE_FFLUSH=0; + + + + { echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5 +echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6; } +if test "${gl_cv_have_include_next+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 -int -main () -{ -#ifndef strerror_r - (void) strerror_r; -#endif - - ; - return 0; -} +#include_next _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (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 + gl_cv_have_include_next=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_have_include_next=no +fi + +rm -f conftest.err conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5 +echo "${ECHO_T}$gl_cv_have_include_next" >&6; } + if test $gl_cv_have_include_next = yes; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INCLUDE_NEXT 1 +_ACEOF + + + INCLUDE_NEXT=include_next + else + INCLUDE_NEXT=include + fi + + + + + + + + + + + + + + GNULIB_FREXP=0; + GNULIB_FREXPL=0; + GNULIB_LDEXPL=0; + GNULIB_MATHL=0; + GNULIB_SIGNBIT=0; + HAVE_DECL_ACOSL=1; + HAVE_DECL_ASINL=1; + HAVE_DECL_ATANL=1; + HAVE_DECL_CEILL=1; + HAVE_DECL_COSL=1; + HAVE_DECL_EXPL=1; + HAVE_DECL_FLOORL=1; + HAVE_DECL_FREXPL=1; + HAVE_DECL_LDEXPL=1; + HAVE_DECL_LOGL=1; + HAVE_DECL_SINL=1; + HAVE_DECL_SQRTL=1; + HAVE_DECL_TANL=1; + REPLACE_FREXP=0; + REPLACE_FREXPL=0; + REPLACE_LDEXPL=0; + REPLACE_SIGNBIT=0; + + + { echo "$as_me:$LINENO: checking whether stdin defaults to large file offsets" >&5 +echo $ECHO_N "checking whether stdin defaults to large file offsets... $ECHO_C" >&6; } +if test "${gl_cv_var_stdin_large_offset+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 () +{ +#if defined __SL64 && defined __SCLE /* cygwin */ + /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making + fseeko/ftello needlessly fail. This bug was fixed at the same time + that cygwin started exporting asnprintf (cygwin 1.7.0), so we use + that as a link-time test for cross-compiles rather than building + a runtime test. */ + size_t s; + if (asnprintf (NULL, &s, "")) + return 0; +#endif + ; + 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 + gl_cv_var_stdin_large_offset=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_var_stdin_large_offset=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: $gl_cv_var_stdin_large_offset" >&5 +echo "${ECHO_T}$gl_cv_var_stdin_large_offset" >&6; } + + + if test -z "$GETOPT_H"; then + +for ac_header in getopt.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 @@ -6811,36 +7313,115 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_have_decl_strerror_r=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_strerror_r=no + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5 -echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6; } -if test $ac_cv_have_decl_strerror_r = yes; then +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRERROR_R 1 +# 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 bug-m4@gnu.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 HAVE_DECL_STRERROR_R 0 +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - +else + GETOPT_H=getopt.h fi +done + fi -for ac_func in strerror_r + if test -z "$GETOPT_H"; then + +for ac_func in getopt_long_only do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -6930,32 +7511,33 @@ if test `eval echo '${'$as_ac_var'}'` = #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF +else + GETOPT_H=getopt.h fi done -{ echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5 -echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6; } -if test "${ac_cv_func_strerror_r_char_p+set}" = set; then + fi + + if test -z "$GETOPT_H"; then + { echo "$as_me:$LINENO: checking whether optreset is declared" >&5 +echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_optreset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - ac_cv_func_strerror_r_char_p=no - if test $ac_cv_have_decl_strerror_r = yes; then - cat >conftest.$ac_ext <<_ACEOF + 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 + int main () { - - char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - char *p = strerror_r (0, buf, sizeof buf); - return !p || x; +#ifndef optreset + (void) optreset; +#endif ; return 0; @@ -6978,24 +7560,35 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_func_strerror_r_char_p=yes + ac_cv_have_decl_optreset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_have_decl_optreset=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - else - # strerror_r is not declared. Choose between - # systems that have relatively inaccessible declarations for the - # function. BeOS and DEC UNIX 4.0 fall in this category, but the - # former has a strerror_r that returns char*, while the latter - # has a strerror_r that returns `int'. - # This test should segfault on the DEC system. - if test "$cross_compiling" = yes; then - : +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5 +echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; } +if test $ac_cv_have_decl_optreset = yes; then + GETOPT_H=getopt.h +fi + + fi + + if test -z "$GETOPT_H"; then + { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5 +echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; } +if test "${gl_cv_func_gnu_getopt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5 +echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_getopt_clip+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7003,14 +7596,72 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - extern char *strerror_r (); +#include + int main () { -char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - return ! isalpha (x); +#ifndef getopt_clip + (void) getopt_clip; +#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_have_decl_getopt_clip=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_getopt_clip=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; } +if test $ac_cv_have_decl_getopt_clip = yes; then + gl_cv_func_gnu_getopt=no +else + gl_cv_func_gnu_getopt=yes +fi + +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 *myargv[3]; + myargv[0] = "conftest"; + myargv[1] = "-+"; + myargv[2] = 0; + return getopt (2, myargv, "+a") != '?'; + ; return 0; } @@ -7035,34 +7686,30 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_func_strerror_r_char_p=yes + gl_cv_func_gnu_getopt=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 ) +gl_cv_func_gnu_getopt=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_func_strerror_r_char_p" >&5 -echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; } -if test $ac_cv_func_strerror_r_char_p = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STRERROR_R_CHAR_P 1 -_ACEOF - fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5 +echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; } + if test "$gl_cv_func_gnu_getopt" = "no"; then + GETOPT_H=getopt.h + fi + fi - - { echo "$as_me:$LINENO: checking for sig_atomic_t" >&5 -echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; } -if test "${ac_cv_type_sig_atomic_t+set}" = set; then +{ echo "$as_me:$LINENO: checking whether getenv is declared" >&5 +echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_getenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -7071,16 +7718,14 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - -typedef sig_atomic_t ac__type_new_; +$ac_includes_default int main () { -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; +#ifndef getenv + (void) getenv; +#endif + ; return 0; } @@ -7102,67 +7747,63 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_type_sig_atomic_t=yes + ac_cv_have_decl_getenv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_sig_atomic_t=no + ac_cv_have_decl_getenv=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5 -echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; } -if test $ac_cv_type_sig_atomic_t = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6; } +if test $ac_cv_have_decl_getenv = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_SIG_ATOMIC_T 1 +#define HAVE_DECL_GETENV 1 _ACEOF else - -cat >>confdefs.h <<\_ACEOF -#define sig_atomic_t int + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETENV 0 _ACEOF -fi - - - - - - - +fi - if test -z "$GETOPT_H"; then -for ac_header in getopt.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 "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 +echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6; } +if test "${ac_cv_c_restrict+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 + ac_cv_c_restrict=no + # Try the official restrict keyword, then gcc's __restrict, and + # the less common variants. + for ac_kw in restrict __restrict __restrict__ _Restrict; 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 -#include <$ac_header> +typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + } +int +main () +{ +int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t) + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7181,120 +7822,97 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + ac_cv_c_restrict=$ac_kw 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; } + test "$ac_cv_c_restrict" != no && break + done -# 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 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 +echo "${ECHO_T}$ac_cv_c_restrict" >&6; } + case $ac_cv_c_restrict in + restrict) ;; + no) +cat >>confdefs.h <<\_ACEOF +#define restrict +_ACEOF + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_time_h='<'sys/time.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_next_sys_time_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test $ac_cv_header_sys_time_h = yes; then + 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> +#include + _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } + gl_cv_next_sys_time_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/sys/time.h#{ + s#.*"\(.*/sys/time.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_sys_time_h='<'sys/time.h'>' + fi -# 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 bug-m4@gnu.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; } +{ echo "$as_me:$LINENO: result: $gl_cv_next_sys_time_h" >&5 +echo "${ECHO_T}$gl_cv_next_sys_time_h" >&6; } + fi + NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h -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 - GETOPT_H=getopt.h -fi -done + if test $ac_cv_header_sys_time_h = yes; then + HAVE_SYS_TIME_H=1 + else + HAVE_SYS_TIME_H=0 fi - if test -z "$GETOPT_H"; then -for ac_func in getopt_long_only -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 "$as_me:$LINENO: checking for struct timeval" >&5 +echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; } +if test "${gl_cv_sys_struct_timeval+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -7303,53 +7921,27 @@ _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 +#if HAVE_SYS_TIME_H + #include + #endif + #include int main () { -return $ac_func (); +static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_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 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -7358,58 +7950,59 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec (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" + } && test -s conftest.$ac_objext; then + gl_cv_sys_struct_timeval=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + gl_cv_sys_struct_timeval=no fi -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_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: result: $gl_cv_sys_struct_timeval" >&5 +echo "${ECHO_T}$gl_cv_sys_struct_timeval" >&6; } + if test $gl_cv_sys_struct_timeval = yes; then + HAVE_STRUCT_TIMEVAL=1 + else + HAVE_STRUCT_TIMEVAL=0 + fi -else - GETOPT_H=getopt.h -fi -done + REPLACE_GETTIMEOFDAY=0 + + if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then + SYS_TIME_H=sys/time.h + else + SYS_TIME_H= fi - if test -z "$GETOPT_H"; then - { echo "$as_me:$LINENO: checking whether optreset is declared" >&5 -echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_optreset+set}" = set; then + + + + + + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - -int -main () -{ -#ifndef optreset - (void) optreset; +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } #endif - ; - return 0; -} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -7428,34 +8021,42 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_have_decl_optreset=yes + ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_optreset=no + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5 -echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; } -if test $ac_cv_have_decl_optreset = yes; then - GETOPT_H=getopt.h -fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } - fi - if test -z "$GETOPT_H"; then - { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5 -echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; } -if test "${gl_cv_func_gnu_getopt+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5 -echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_getopt_clip+set}" = set; then +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 + + + { echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 +echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; } +if test "${am_cv_langinfo_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -7464,27 +8065,23 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - +#include int main () { -#ifndef getopt_clip - (void) getopt_clip; -#endif - +char* cs = nl_langinfo(CODESET); return !cs; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -7493,91 +8090,33 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_getopt_clip=yes + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + am_cv_langinfo_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_getopt_clip=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5 -echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; } -if test $ac_cv_have_decl_getopt_clip = yes; then - gl_cv_func_gnu_getopt=no -else - gl_cv_func_gnu_getopt=yes + am_cv_langinfo_codeset=no fi -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 *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; - return getopt (2, myargv, "+a") != '?'; - - ; - 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 - gl_cv_func_gnu_getopt=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 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext -( exit $ac_status ) -gl_cv_func_gnu_getopt=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +{ echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 +echo "${ECHO_T}$am_cv_langinfo_codeset" >&6; } + if test $am_cv_langinfo_codeset = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_LANGINFO_CODESET 1 +_ACEOF -fi -{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5 -echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; } - if test "$gl_cv_func_gnu_getopt" = "no"; then - GETOPT_H=getopt.h - fi fi -{ echo "$as_me:$LINENO: checking whether getenv is declared" >&5 -echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_getenv+set}" = set; then +{ echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 +echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -7590,8 +8129,8 @@ $ac_includes_default int main () { -#ifndef getenv - (void) getenv; +#ifndef getc_unlocked + (void) getc_unlocked; #endif ; @@ -7615,63 +8154,120 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_have_decl_getenv=yes + ac_cv_have_decl_getc_unlocked=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_getenv=no + ac_cv_have_decl_getc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5 -echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6; } -if test $ac_cv_have_decl_getenv = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6; } +if test $ac_cv_have_decl_getc_unlocked = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETENV 1 +#define HAVE_DECL_GETC_UNLOCKED 1 _ACEOF else cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETENV 0 +#define HAVE_DECL_GETC_UNLOCKED 0 _ACEOF fi -{ echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 -echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6; } -if test "${ac_cv_c_restrict+set}" = set; then + + { echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 +echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6; } +if test "${ac_cv_gnu_library_2_1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_c_restrict=no - # Try the official restrict keyword, then gcc's __restrict, and - # the less common variants. - for ac_kw in restrict __restrict __restrict__ _Restrict; do - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } -int -main () -{ -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) - ; - return 0; -} + +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky GNU user" >/dev/null 2>&1; then + ac_cv_gnu_library_2_1=yes +else + ac_cv_gnu_library_2_1=no +fi +rm -f conftest* + + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 +echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6; } + + GLIBC21="$ac_cv_gnu_library_2_1" + + + + GNULIB_CHOWN=0; + GNULIB_DUP2=0; + GNULIB_FCHDIR=0; + GNULIB_FTRUNCATE=0; + GNULIB_GETCWD=0; + GNULIB_GETLOGIN_R=0; + GNULIB_LCHOWN=0; + GNULIB_LSEEK=0; + GNULIB_READLINK=0; + GNULIB_SLEEP=0; + HAVE_DUP2=1; + HAVE_FTRUNCATE=1; + HAVE_READLINK=1; + HAVE_SLEEP=1; + HAVE_DECL_GETLOGIN_R=1; + REPLACE_CHOWN=0; + REPLACE_FCHDIR=0; + REPLACE_GETCWD=0; + REPLACE_LCHOWN=0; + REPLACE_LSEEK=0; + + + +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" @@ -7690,395 +8286,186 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_c_restrict=$ac_kw + 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 - test "$ac_cv_c_restrict" != no && break - done - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 -echo "${ECHO_T}$ac_cv_c_restrict" >&6; } - case $ac_cv_c_restrict in - restrict) ;; - no) -cat >>confdefs.h <<\_ACEOF -#define restrict -_ACEOF - ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $ac_cv_c_restrict -_ACEOF - ;; - esac - - - - - - - - - - - - - if test $ac_cv_header_sys_time_h = yes; then - { echo "$as_me:$LINENO: checking absolute name of " >&5 -echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } -if test "${gl_cv_absolute_sys_time_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - - - +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } - if test $ac_cv_header_sys_time_h = yes; then - cat >conftest.$ac_ext <<_ACEOF +# 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 -_ACEOF - gl_cv_absolute_sys_time_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | -sed -n '\#/sys/time.h#{s#.*"\(.*/sys/time.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` - fi - -fi -{ echo "$as_me:$LINENO: result: $gl_cv_absolute_sys_time_h" >&5 -echo "${ECHO_T}$gl_cv_absolute_sys_time_h" >&6; } -cat >>confdefs.h <<_ACEOF -#define ABSOLUTE_SYS_TIME_H "$gl_cv_absolute_sys_time_h" +#include <$ac_header> _ACEOF - - - ABSOLUTE_SYS_TIME_H=\"$gl_cv_absolute_sys_time_h\" - HAVE_SYS_TIME_H=1 - else - ABSOLUTE_SYS_TIME_H=\"no/such/file/sys/time.h\" - HAVE_SYS_TIME_H=0 - fi - - - - { echo "$as_me:$LINENO: checking for struct timeval" >&5 -echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; } -if test "${gl_cv_sys_struct_timeval+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 HAVE_SYS_TIME_H - #include - #endif - #include - -int -main () -{ -static struct timeval x; x.tv_sec = x.tv_usec; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (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); } && { - test -z "$ac_c_werror_flag" || + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gl_cv_sys_struct_timeval=yes + }; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_sys_struct_timeval=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_header_preproc=no fi -{ echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timeval" >&5 -echo "${ECHO_T}$gl_cv_sys_struct_timeval" >&6; } - if test $gl_cv_sys_struct_timeval = yes; then - HAVE_STRUCT_TIMEVAL=1 - else - HAVE_STRUCT_TIMEVAL=0 - fi - - - REPLACE_GETTIMEOFDAY=0 - - if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then - SYS_TIME_H=sys/time.h - else - SYS_TIME_H= - fi - - - - - +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then +# 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 bug-m4@gnu.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 - 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 + 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 -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break done -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } - - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - - - { echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 -echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; } -if test "${am_cv_langinfo_codeset+set}" = set; then +{ 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. */ -#include +#if defined STDC_HEADERS || defined HAVE_STDLIB_H +# include +#else +char *malloc (); +#endif + int main () { -char* cs = nl_langinfo(CODESET); return !cs; +return ! malloc (0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +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>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 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 - am_cv_langinfo_codeset=yes + (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: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - am_cv_langinfo_codeset=no +( 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 -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 -echo "${ECHO_T}$am_cv_langinfo_codeset" >&6; } - if test $am_cv_langinfo_codeset = yes; then +{ 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 + gl_cv_func_malloc_0_nonnull=1 +else + gl_cv_func_malloc_0_nonnull=0 +fi -cat >>confdefs.h <<\_ACEOF -#define HAVE_LANGINFO_CODESET 1 -_ACEOF - fi -{ echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 -echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef getc_unlocked - (void) getc_unlocked; -#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_have_decl_getc_unlocked=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl_getc_unlocked=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 -echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6; } -if test $ac_cv_have_decl_getc_unlocked = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETC_UNLOCKED 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETC_UNLOCKED 0 -_ACEOF - - -fi - - - - { echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 -echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6; } -if test "${ac_cv_gnu_library_2_1+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 -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/dev/null 2>&1; then - ac_cv_gnu_library_2_1=yes -else - ac_cv_gnu_library_2_1=no -fi -rm -f conftest* -fi -{ echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 -echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6; } - - GLIBC21="$ac_cv_gnu_library_2_1" - GNULIB_GETSUBOPT=0; @@ -8102,6 +8489,15 @@ echo "${ECHO_T}$ac_cv_gnu_library_2_1" > + + + + GNULIB_SIGPROCMASK=0; + HAVE_POSIX_SIGNALBLOCKING=1; + HAVE_SIGSET_T=1; + + + { 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 @@ -8293,6 +8689,10 @@ _ACEOF + + + + { echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6; } if test "${ac_cv_header_stat_broken+set}" = set; then @@ -8364,22 +8764,6 @@ fi - GNULIB_CHOWN=0; - GNULIB_DUP2=0; - GNULIB_FCHDIR=0; - GNULIB_FTRUNCATE=0; - GNULIB_GETCWD=0; - GNULIB_GETLOGIN_R=0; - GNULIB_READLINK=0; - HAVE_DUP2=1; - HAVE_FTRUNCATE=1; - HAVE_READLINK=1; - HAVE_DECL_GETLOGIN_R=1; - REPLACE_CHOWN=0; - REPLACE_FCHDIR=0; - REPLACE_GETCWD=0; - - { echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5 echo $ECHO_N "checking whether clearerr_unlocked is declared... $ECHO_C" >&6; } @@ -9612,132 +9996,6 @@ _ACEOF - { echo "$as_me:$LINENO: checking for wchar_t" >&5 -echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; } -if test "${gt_cv_c_wchar_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. */ -#include - wchar_t foo = (wchar_t)'\0'; -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 - gt_cv_c_wchar_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_c_wchar_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 -echo "${ECHO_T}$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_WCHAR_T 1 -_ACEOF - - fi - - - { echo "$as_me:$LINENO: checking for wint_t" >&5 -echo $ECHO_N "checking for wint_t... $ECHO_C" >&6; } -if test "${gt_cv_c_wint_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. */ - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0'; -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 - gt_cv_c_wint_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gt_cv_c_wint_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 -echo "${ECHO_T}$gt_cv_c_wint_t" >&6; } - if test $gt_cv_c_wint_t = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_WINT_T 1 -_ACEOF - - fi - - { echo "$as_me:$LINENO: checking for inttypes.h" >&5 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; } if test "${gl_cv_header_inttypes_h+set}" = set; then @@ -9949,122 +10207,232 @@ _ACEOF + { echo "$as_me:$LINENO: checking whether printf supports size specifiers as in C99" >&5 +echo $ECHO_N "checking whether printf supports size specifiers as in C99... $ECHO_C" >&6; } +if test "${gl_cv_func_printf_sizes_c99+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; + # Guess yes on FreeBSD >= 5. + freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; + # Guess yes on MacOS X >= 10.3. + darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; + darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; + # Guess yes on OpenBSD >= 3.9. + openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) + gl_cv_func_printf_sizes_c99="guessing no";; + openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; + # Guess yes on Solaris >= 2.10. + solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";; + solaris*) gl_cv_func_printf_sizes_c99="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_printf_sizes_c99="guessing no";; + netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_sizes_c99="guessing no";; + esac - - - - if false; then - GL_COND_LIBTOOL_TRUE= - GL_COND_LIBTOOL_FALSE='#' else - GL_COND_LIBTOOL_TRUE='#' - GL_COND_LIBTOOL_FALSE= -fi - - gl_cond_libtool=false - gl_libdeps= - gl_ltlibdeps= - gl_source_base='lib' - - - - - - if test $ac_cv_func_alloca_works = no; then - : - fi - - # Define an additional variable used in the Makefile substitution. - if test $ac_cv_working_alloca_h = yes; then - { echo "$as_me:$LINENO: checking for alloca as a compiler built-in" >&5 -echo $ECHO_N "checking for alloca as a compiler built-in... $ECHO_C" >&6; } -if test "${gl_cv_rpl_alloca+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#if defined __GNUC__ || defined _AIX || defined _MSC_VER - Need own alloca +#include +#include +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +# include #endif - +#if HAVE_INTTYPES_H_WITH_UINTMAX +# include +#endif +static char buf[100]; +int main () +{ +#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX + buf[0] = '\0'; + if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 + || strcmp (buf, "12345671 33") != 0) + return 1; +#endif + buf[0] = '\0'; + if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 + || strcmp (buf, "12345672 33") != 0) + return 1; + buf[0] = '\0'; + if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 + || strcmp (buf, "12345673 33") != 0) + return 1; + buf[0] = '\0'; + if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 + || strcmp (buf, "1.5 33") != 0) + return 1; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Need own alloca" >/dev/null 2>&1; then - gl_cv_rpl_alloca=yes +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 + gl_cv_func_printf_sizes_c99=yes else - gl_cv_rpl_alloca=no -fi -rm -f conftest* - + 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 ) +gl_cv_func_printf_sizes_c99=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $gl_cv_rpl_alloca" >&5 -echo "${ECHO_T}$gl_cv_rpl_alloca" >&6; } - if test $gl_cv_rpl_alloca = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA 1 -_ACEOF - - ALLOCA_H=alloca.h - else - ALLOCA_H= - fi - else - ALLOCA_H=alloca.h - fi - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_ALLOCA_H 1 -_ACEOF +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_printf_sizes_c99" >&5 +echo "${ECHO_T}$gl_cv_func_printf_sizes_c99" >&6; } + { echo "$as_me:$LINENO: checking whether printf supports 'long double' arguments" >&5 +echo $ECHO_N "checking whether printf supports 'long double' arguments... $ECHO_C" >&6; } +if test "${gl_cv_func_printf_long_double+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + case "$host_os" in + beos*) gl_cv_func_printf_long_double="guessing no";; + mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; + *) gl_cv_func_printf_long_double="guessing yes";; + esac -cat >>confdefs.h <<\_ACEOF -#define SIGNAL_SAFE_LIST 1 +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 +static char buf[100]; +int main () +{ + buf[0] = '\0'; + if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 + || strcmp (buf, "1.750000 33") != 0) + return 1; + buf[0] = '\0'; + if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 + || strcmp (buf, "1.750000e+00 33") != 0) + return 1; + buf[0] = '\0'; + if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 + || strcmp (buf, "1.75 33") != 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 + gl_cv_func_printf_long_double=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 - M4_LIBOBJS="$M4_LIBOBJS cloexec.$ac_objext" - - - M4_LIBOBJS="$M4_LIBOBJS close-stream.$ac_objext" - - : - +( exit $ac_status ) +gl_cv_func_printf_long_double=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi -cat >>confdefs.h <<\_ACEOF -#define GNULIB_CLOSE_STREAM 1 -_ACEOF +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_printf_long_double" >&5 +echo "${ECHO_T}$gl_cv_func_printf_long_double" >&6; } - M4_LIBOBJS="$M4_LIBOBJS closeout.$ac_objext" - : + { echo "$as_me:$LINENO: checking whether printf supports infinite 'double' arguments" >&5 +echo $ECHO_N "checking whether printf supports infinite 'double' arguments... $ECHO_C" >&6; } +if test "${gl_cv_func_printf_infinite+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_printf_infinite="guessing yes";; + # Guess yes on FreeBSD >= 6. + freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; + # Guess yes on MacOS X >= 10.3. + darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; + darwin*) gl_cv_func_printf_infinite="guessing yes";; + # Guess yes on HP-UX >= 11. + hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; + hpux*) gl_cv_func_printf_infinite="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_printf_infinite="guessing no";; + netbsd*) gl_cv_func_printf_infinite="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_printf_infinite="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_infinite="guessing no";; + esac - { echo "$as_me:$LINENO: checking for error_at_line" >&5 -echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6; } -if test "${ac_cv_lib_error_at_line+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10072,82 +10440,146 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () + +#include +#include +static int +strisnan (const char *string, size_t start_index, size_t end_index) { -error_at_line (0, 0, "", 0, "an error occurred"); - ; + if (start_index < end_index) + { + if (string[start_index] == '-') + start_index++; + if (start_index + 3 <= end_index + && memcmp (string + start_index, "nan", 3) == 0) + { + start_index += 3; + if (start_index == end_index + || (string[start_index] == '(' && string[end_index - 1] == ')')) + return 1; + } + } + return 0; +} +static char buf[100]; +static double zero = 0.0; +int main () +{ + if (sprintf (buf, "%f", 1.0 / 0.0) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + return 1; + if (sprintf (buf, "%f", -1.0 / 0.0) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + return 1; + if (sprintf (buf, "%f", zero / zero) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%e", 1.0 / 0.0) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + return 1; + if (sprintf (buf, "%e", -1.0 / 0.0) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + return 1; + if (sprintf (buf, "%e", zero / zero) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%g", 1.0 / 0.0) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + return 1; + if (sprintf (buf, "%g", -1.0 / 0.0) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + return 1; + if (sprintf (buf, "%g", zero / zero) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +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>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 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_error_at_line=yes + (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 + gl_cv_func_printf_infinite=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_error_at_line=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +( exit $ac_status ) +gl_cv_func_printf_infinite=no fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5 -echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6; } -if test $ac_cv_lib_error_at_line = no; then - M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext" +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - : - - - - M4_LIBOBJS="$M4_LIBOBJS exitfail.$ac_objext" - - : - - - - - - - +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_printf_infinite" >&5 +echo "${ECHO_T}$gl_cv_func_printf_infinite" >&6; } + if test -n "$gl_printf_safe"; then +cat >>confdefs.h <<\_ACEOF +#define CHECK_PRINTF_SAFE 1 +_ACEOF + fi + case "$gl_cv_func_printf_long_double" in + *yes) + { echo "$as_me:$LINENO: checking whether printf supports infinite 'long double' arguments" >&5 +echo $ECHO_N "checking whether printf supports infinite 'long double' arguments... $ECHO_C" >&6; } +if test "${gl_cv_func_printf_infinite_long_double+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + + case "$host_cpu" in + # Guess no on ia64, x86_64, i386. + ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; + *) + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; + # Guess yes on FreeBSD >= 6. + freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; + # Guess yes on MacOS X >= 10.3. + darwin[1-6].*) gl_cv_func_printf_infinite_long_double="guessing no";; + darwin*) gl_cv_func_printf_infinite_long_double="guessing yes";; + # Guess yes on HP-UX >= 11. + hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; + hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; + # Guess yes on NetBSD >= 3. + netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) + gl_cv_func_printf_infinite_long_double="guessing no";; + netbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_infinite_long_double="guessing no";; + esac + ;; + esac -for ac_func in sigaction -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. */ @@ -10155,111 +10587,252 @@ _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 () +#include +#include +#include +static int +strisnan (const char *string, size_t start_index, size_t end_index) { -return $ac_func (); - ; + if (start_index < end_index) + { + if (string[start_index] == '-') + start_index++; + if (start_index + 3 <= end_index + && memcmp (string + start_index, "nan", 3) == 0) + { + start_index += 3; + if (start_index == end_index + || (string[start_index] == '(' && string[end_index - 1] == ')')) + return 1; + } + } + return 0; +} +static char buf[100]; +static long double zeroL = 0.0L; +int main () +{ + if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + return 1; + if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + return 1; + if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + return 1; + if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + return 1; + if (sprintf (buf, "%Le", zeroL / zeroL) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0 + || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) + return 1; + if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0 + || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) + return 1; + if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; +#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + } + { + /* Signalling NaN. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + } + { /* Pseudo-NaN. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + } + { /* Pseudo-Infinity. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + } + { /* Pseudo-Zero. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + } + { /* Unnormalized number. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + } + { /* Pseudo-Denormal. */ + static union { unsigned int word[4]; long double value; } x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + if (sprintf (buf, "%Lf", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Le", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + if (sprintf (buf, "%Lg", x.value) < 0 + || !strisnan (buf, 0, strlen (buf))) + return 1; + } +#endif return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +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>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 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" + (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 + gl_cv_func_printf_infinite_long_double=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +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 +( exit $ac_status ) +gl_cv_func_printf_infinite_long_double=no 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 - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -done - - - - M4_LIBOBJS="$M4_LIBOBJS fopen-safer.$ac_objext" -cat >>confdefs.h <<\_ACEOF -#define GNULIB_FOPEN_SAFER 1 -_ACEOF - +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_printf_infinite_long_double" >&5 +echo "${ECHO_T}$gl_cv_func_printf_infinite_long_double" >&6; } + ;; + *) + gl_cv_func_printf_infinite_long_double="irrelevant" + ;; + esac + { echo "$as_me:$LINENO: checking whether printf supports the 'a' and 'A' directives" >&5 +echo $ECHO_N "checking whether printf supports the 'a' and 'A' directives... $ECHO_C" >&6; } +if test "${gl_cv_func_printf_directive_a+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + case "$host_os" in + # Guess yes on glibc >= 2.5 systems. + *-gnu*) + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #include + #ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2) + BZ2908 + #endif + #endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "BZ2908" >/dev/null 2>&1; then + gl_cv_func_printf_directive_a="guessing yes" +else + gl_cv_func_printf_directive_a="guessing no" +fi +rm -f conftest* + ;; + # If we don't know, assume the worst. + *) gl_cv_func_printf_directive_a="guessing no";; + esac -for ac_func in __fpending -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. */ @@ -10267,361 +10840,424 @@ _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 () +#include +#include +static char buf[100]; +int main () { -return $ac_func (); - ; + if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 + || (strcmp (buf, "0x1.922p+1 33") != 0 + && strcmp (buf, "0x3.244p+0 33") != 0 + && strcmp (buf, "0x6.488p-1 33") != 0 + && strcmp (buf, "0xc.91p-2 33") != 0)) + return 1; + if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 + || (strcmp (buf, "-0X1.922P+1 33") != 0 + && strcmp (buf, "-0X3.244P+0 33") != 0 + && strcmp (buf, "-0X6.488P-1 33") != 0 + && strcmp (buf, "-0XC.91P-2 33") != 0)) + return 1; + /* This catches a FreeBSD 6.1 bug: it doesn't round. */ + if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 + || (strcmp (buf, "0x1.83p+0 33") != 0 + && strcmp (buf, "0x3.05p-1 33") != 0 + && strcmp (buf, "0x6.0ap-2 33") != 0 + && strcmp (buf, "0xc.14p-3 33") != 0)) + return 1; + /* This catches a FreeBSD 6.1 bug. See + */ + if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0 + || buf[0] == '0') + return 1; + /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */ + if (sprintf (buf, "%.1a", 1.999) < 0 + || (strcmp (buf, "0x1.0p+1") != 0 + && strcmp (buf, "0x2.0p+0") != 0 + && strcmp (buf, "0x4.0p-1") != 0 + && strcmp (buf, "0x8.0p-2") != 0)) + return 1; + /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a + glibc 2.4 bug . */ + if (sprintf (buf, "%.1La", 1.999L) < 0 + || (strcmp (buf, "0x1.0p+1") != 0 + && strcmp (buf, "0x2.0p+0") != 0 + && strcmp (buf, "0x4.0p-1") != 0 + && strcmp (buf, "0x8.0p-2") != 0)) + return 1; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext +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>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 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" + (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 + gl_cv_func_printf_directive_a=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" +( exit $ac_status ) +gl_cv_func_printf_directive_a=no fi - -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.$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 -else - M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext" + + fi -done +{ echo "$as_me:$LINENO: result: $gl_cv_func_printf_directive_a" >&5 +echo "${ECHO_T}$gl_cv_func_printf_directive_a" >&6; } - fp_headers=' -# include -# if HAVE_STDIO_EXT_H -# include -# endif -' - { echo "$as_me:$LINENO: checking whether __fpending is declared" >&5 -echo $ECHO_N "checking whether __fpending is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl___fpending+set}" = set; then + + + { echo "$as_me:$LINENO: checking whether printf supports the 'F' directive" >&5 +echo $ECHO_N "checking whether printf supports the 'F' directive... $ECHO_C" >&6; } +if test "${gl_cv_func_printf_directive_f+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + + if test "$cross_compiling" = yes; then + + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; + # Guess yes on FreeBSD >= 6. + freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";; + freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; + # Guess yes on MacOS X >= 10.3. + darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; + darwin*) gl_cv_func_printf_directive_f="guessing yes";; + # Guess yes on Solaris >= 2.10. + solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";; + solaris*) gl_cv_func_printf_directive_f="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_directive_f="guessing no";; + esac + +else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$fp_headers -int -main () +#include +#include +static char buf[100]; +int main () { -#ifndef __fpending - (void) __fpending; -#endif - - ; + if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 + || strcmp (buf, "1234567.000000 33") != 0) + return 1; + if (sprintf (buf, "%F", 1.0 / 0.0) < 0 + || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) + return 1; + /* This catches a Cygwin 2007 bug. */ + if (sprintf (buf, "%.F", 1234.0) < 0 + || strcmp (buf, "1234") != 0) + return 1; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$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_have_decl___fpending=yes -else - echo "$as_me: failed program was:" >&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 + gl_cv_func_printf_directive_f=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 - ac_cv_have_decl___fpending=no +( exit $ac_status ) +gl_cv_func_printf_directive_f=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___fpending" >&5 -echo "${ECHO_T}$ac_cv_have_decl___fpending" >&6; } -if test $ac_cv_have_decl___fpending = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL___FPENDING 1 -_ACEOF -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL___FPENDING 0 -_ACEOF - fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_printf_directive_f" >&5 +echo "${ECHO_T}$gl_cv_func_printf_directive_f" >&6; } - if test $ac_cv_func___fpending = no; then - { echo "$as_me:$LINENO: checking how to determine the number of pending output bytes on a stream" >&5 -echo $ECHO_N "checking how to determine the number of pending output bytes on a stream... $ECHO_C" >&6; } -if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then + + { echo "$as_me:$LINENO: checking whether printf supports the 'n' directive" >&5 +echo $ECHO_N "checking whether printf supports the 'n' directive... $ECHO_C" >&6; } +if test "${gl_cv_func_printf_directive_n+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - for ac_expr in \ - \ - '# glibc2' \ - 'fp->_IO_write_ptr - fp->_IO_write_base' \ - \ - '# traditional Unix' \ - 'fp->_ptr - fp->_base' \ - \ - '# BSD' \ - 'fp->_p - fp->_bf._base' \ - \ - '# SCO, Unixware' \ - '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ - \ - '# old glibc?' \ - 'fp->__bufp - fp->__buffer' \ - \ - '# old glibc iostream?' \ - 'fp->_pptr - fp->_pbase' \ - \ - '# VMS' \ - '(*fp)->_ptr - (*fp)->_base' \ - \ - '# e.g., DGUX R4.11; the info is not available' \ - 1 \ - ; do + if test "$cross_compiling" = yes; then - # Skip each embedded comment. - case "$ac_expr" in '#'*) continue;; esac + case "$host_os" in + *) gl_cv_func_printf_directive_n="guessing yes";; + esac - cat >conftest.$ac_ext <<_ACEOF +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 () +#include +#include +static char buf[100]; +int main () { -FILE *fp = stdin; (void) ($ac_expr); - ; + int count = -1; + if (sprintf (buf, "%d %n", 123, &count, 33, 44, 55) < 0 + || strcmp (buf, "123 ") != 0 + || count != 4) + return 1; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - fp_done=yes - + (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 + gl_cv_func_printf_directive_n=yes else - echo "$as_me: failed program was:" >&5 + 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 ) +gl_cv_func_printf_directive_n=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$fp_done" = yes && break - done - - ac_cv_sys_pending_output_n_bytes=$ac_expr fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_pending_output_n_bytes" >&5 -echo "${ECHO_T}$ac_cv_sys_pending_output_n_bytes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes -_ACEOF +{ echo "$as_me:$LINENO: result: $gl_cv_func_printf_directive_n" >&5 +echo "${ECHO_T}$gl_cv_func_printf_directive_n" >&6; } - fi - { echo "$as_me:$LINENO: checking whether free (NULL) is known to work" >&5 -echo $ECHO_N "checking whether free (NULL) is known to work... $ECHO_C" >&6; } -if test "${gl_cv_func_free+set}" = set; then + { echo "$as_me:$LINENO: checking whether printf supports POSIX/XSI format strings with positions" >&5 +echo $ECHO_N "checking whether printf supports POSIX/XSI format strings with positions... $ECHO_C" >&6; } +if test "${gl_cv_func_printf_positions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + + if test "$cross_compiling" = yes; then + + case "$host_os" in + netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) + gl_cv_func_printf_positions="guessing no";; + beos*) gl_cv_func_printf_positions="guessing no";; + mingw* | pw*) gl_cv_func_printf_positions="guessing no";; + *) gl_cv_func_printf_positions="guessing yes";; + esac + +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 () + +#include +#include +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; +static char buf[100]; +int main () { -#if _POSIX_VERSION < 199009L && \ - (defined unix || defined _unix || defined _unix_ \ - || defined __unix || defined __unix__) - #error "'free (NULL)' is not known to work" - #endif - ; - return 0; + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gl_cv_func_free=yes + (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 + gl_cv_func_printf_positions=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_func_free=no +( exit $ac_status ) +gl_cv_func_printf_positions=no fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $gl_cv_func_free" >&5 -echo "${ECHO_T}$gl_cv_func_free" >&6; } - if test $gl_cv_func_free = no; then - M4_LIBOBJS="$M4_LIBOBJS free.$ac_objext" -cat >>confdefs.h <<\_ACEOF -#define free rpl_free -_ACEOF - fi +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_printf_positions" >&5 +echo "${ECHO_T}$gl_cv_func_printf_positions" >&6; } - if test -n "$GETOPT_H"; then + { echo "$as_me:$LINENO: checking whether printf supports the grouping flag" >&5 +echo $ECHO_N "checking whether printf supports the grouping flag... $ECHO_C" >&6; } +if test "${gl_cv_func_printf_flag_grouping+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else - M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext" - M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext" + if test "$cross_compiling" = yes; then - GETOPT_H=getopt.h + case "$host_os" in + cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; + netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; + mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; + *) gl_cv_func_printf_flag_grouping="guessing yes";; + esac -cat >>confdefs.h <<\_ACEOF -#define __GETOPT_PREFIX rpl_ +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 +static char buf[100]; +int main () +{ + if (sprintf (buf, "%'d %d", 1234567, 99) < 0 + || buf[strlen (buf) - 1] != '9') + 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 + gl_cv_func_printf_flag_grouping=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 ) +gl_cv_func_printf_flag_grouping=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: $gl_cv_func_printf_flag_grouping" >&5 +echo "${ECHO_T}$gl_cv_func_printf_flag_grouping" >&6; } + { echo "$as_me:$LINENO: checking whether printf supports the zero flag correctly" >&5 +echo $ECHO_N "checking whether printf supports the zero flag correctly... $ECHO_C" >&6; } +if test "${gl_cv_func_printf_flag_zero+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; + # Guess yes on BeOS. + beos*) gl_cv_func_printf_flag_zero="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_printf_flag_zero="guessing no";; + esac - - - - { echo "$as_me:$LINENO: checking for gettimeofday with POSIX signature" >&5 -echo $ECHO_N "checking for gettimeofday with POSIX signature... $ECHO_C" >&6; } -if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10629,87 +11265,16 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - struct timeval c; -int -main () -{ - - int (*f) (struct timeval *restrict, void *restrict) = gettimeofday; - int x = f (&c, 0); - return !(x | c.tv_sec | c.tv_usec); - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gl_cv_func_gettimeofday_posix_signature=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - gl_cv_func_gettimeofday_posix_signature=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_posix_signature" >&5 -echo "${ECHO_T}$gl_cv_func_gettimeofday_posix_signature" >&6; } - - - - - { echo "$as_me:$LINENO: checking whether gettimeofday clobbers localtime buffer" >&5 -echo $ECHO_N "checking whether gettimeofday clobbers localtime buffer... $ECHO_C" >&6; } -if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - gl_cv_func_gettimeofday_clobber=yes -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 - #include - -int -main () +static char buf[100]; +int main () { - - time_t t = 0; - struct tm *lt; - struct tm saved_lt; - struct timeval tv; - lt = localtime (&t); - saved_lt = *lt; - gettimeofday (&tv, NULL); - return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; - - ; + if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0 + || (strcmp (buf, " inf") != 0 + && strcmp (buf, " infinity") != 0)) + return 1; return 0; } _ACEOF @@ -10733,63 +11298,192 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gl_cv_func_gettimeofday_clobber=no + gl_cv_func_printf_flag_zero=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 ) -gl_cv_func_gettimeofday_clobber=yes +gl_cv_func_printf_flag_zero=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: $gl_cv_func_gettimeofday_clobber" >&5 -echo "${ECHO_T}$gl_cv_func_gettimeofday_clobber" >&6; } +{ echo "$as_me:$LINENO: result: $gl_cv_func_printf_flag_zero" >&5 +echo "${ECHO_T}$gl_cv_func_printf_flag_zero" >&6; } - if test $gl_cv_func_gettimeofday_clobber = yes; then - REPLACE_GETTIMEOFDAY=1 - SYS_TIME_H=sys/time.h - M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext" + GNULIB_WCWIDTH=0; + HAVE_DECL_WCWIDTH=1; + REPLACE_WCWIDTH=0; + WCHAR_H= -for ac_header in sys/timeb.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 + + + + + + + + + if false; then + GL_COND_LIBTOOL_TRUE= + GL_COND_LIBTOOL_FALSE='#' +else + GL_COND_LIBTOOL_TRUE='#' + GL_COND_LIBTOOL_FALSE= +fi + + gl_cond_libtool=false + gl_libdeps= + gl_ltlibdeps= + gl_source_base='lib' + + + + + + if test $ac_cv_func_alloca_works = no; then + : + fi + + # Define an additional variable used in the Makefile substitution. + if test $ac_cv_working_alloca_h = yes; then + { echo "$as_me:$LINENO: checking for alloca as a compiler built-in" >&5 +echo $ECHO_N "checking for alloca as a compiler built-in... $ECHO_C" >&6; } +if test "${gl_cv_rpl_alloca+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 __GNUC__ || defined _AIX || defined _MSC_VER + Need own alloca +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Need own alloca" >/dev/null 2>&1; then + gl_cv_rpl_alloca=yes +else + gl_cv_rpl_alloca=no fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } +rm -f conftest* + + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_rpl_alloca" >&5 +echo "${ECHO_T}$gl_cv_rpl_alloca" >&6; } + if test $gl_cv_rpl_alloca = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA 1 +_ACEOF + + ALLOCA_H=alloca.h + else + ALLOCA_H= + fi + else + ALLOCA_H=alloca.h + fi + + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF + + + + { echo "$as_me:$LINENO: checking whether to enable assertions" >&5 +echo $ECHO_N "checking whether to enable assertions... $ECHO_C" >&6; } + # Check whether --enable-assert was given. +if test "${enable_assert+set}" = set; then + enableval=$enable_assert; { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define NDEBUG 1 +_ACEOF + 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 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +fi + + + +cat >>confdefs.h <<\_ACEOF +#define SIGNAL_SAFE_LIST 1 +_ACEOF + + + M4_LIBOBJS="$M4_LIBOBJS cloexec.$ac_objext" + + + M4_LIBOBJS="$M4_LIBOBJS close-stream.$ac_objext" + + : + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_CLOSE_STREAM 1 +_ACEOF + + + + M4_LIBOBJS="$M4_LIBOBJS closein.$ac_objext" + + : + + + M4_LIBOBJS="$M4_LIBOBJS closeout.$ac_objext" + + : + + + + { echo "$as_me:$LINENO: checking for error_at_line" >&5 +echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6; } +if test "${ac_cv_lib_error_at_line+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> +#include +int +main () +{ +error_at_line (0, 0, "", 0, "an error occurred"); + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -10798,111 +11492,51 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_error_at_line=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no + ac_cv_lib_error_at_line=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 +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_lib_error_at_line" >&5 +echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6; } +if test $ac_cv_lib_error_at_line = no; then + M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext" 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 bug-m4@gnu.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 + + M4_LIBOBJS="$M4_LIBOBJS exitfail.$ac_objext" + + : -for ac_func in _ftime + + + + + + + + + + + + + + +for ac_func in sigaction do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -10997,177 +11631,175 @@ done -cat >>confdefs.h <<\_ACEOF -#define gmtime rpl_gmtime -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define localtime rpl_localtime -_ACEOF - - - -cat >>confdefs.h <<\_ACEOF -#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1 -_ACEOF - - fi - - - if test $gl_cv_func_gettimeofday_posix_signature != yes; then - REPLACE_GETTIMEOFDAY=1 - SYS_TIME_H=sys/time.h - if test $gl_cv_func_gettimeofday_clobber != yes; then - M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext" - - -for ac_header in sys/timeb.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 "$as_me:$LINENO: checking whether fflush works on input streams" >&5 +echo $ECHO_N "checking whether fflush works on input streams... $ECHO_C" >&6; } +if test "${gl_cv_func_fflush_stdin+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 + echo hello world > conftest.txt + if test "$cross_compiling" = yes; then + gl_cv_func_fflush_stdin=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 -#include <$ac_header> + +#include +#include + +int +main () +{ +FILE *f = fopen ("conftest.txt", "r"); + char buffer[10]; + int fd = fileno (f); + if (!f || 0 > fd || fread (buffer, 1, 5, f) != 5) + return 2; + /* For deterministic results, ensure f read a bigger buffer. */ + if (lseek (fd, 0, SEEK_CUR) == 5) + return 3; + /* POSIX requires fflush-fseek to set file offset of fd. */ + if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0) + return 4; + return !(lseek (fd, 0, SEEK_CUR) == 5); + + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$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 + (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 + gl_cv_func_fflush_stdin=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +( exit $ac_status ) +gl_cv_func_fflush_stdin=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 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 + rm conftest.txt + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_fflush_stdin" >&5 +echo "${ECHO_T}$gl_cv_func_fflush_stdin" >&6; } + if test $gl_cv_func_fflush_stdin = no; then + + M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext" + M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext" + + REPLACE_FFLUSH=1 + REPLACE_FSEEKO=1 + + fi + + + + GNULIB_FFLUSH=1 + + + + + FLOAT_H= + case "$host_os" in + beos*) + FLOAT_H=float.h + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_float_h='<'float.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_next_float_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test $ac_cv_header_float_h = yes; then + 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> +#include + _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + gl_cv_next_float_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/float.h#{ + s#.*"\(.*/float.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_float_h='<'float.h'>' + fi - ac_header_preproc=no fi +{ echo "$as_me:$LINENO: result: $gl_cv_next_float_h" >&5 +echo "${ECHO_T}$gl_cv_next_float_h" >&6; } + fi + NEXT_FLOAT_H=$gl_cv_next_float_h -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 bug-m4@gnu.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 + ;; + esac + + + + M4_LIBOBJS="$M4_LIBOBJS fopen-safer.$ac_objext" + + + +cat >>confdefs.h <<\_ACEOF +#define GNULIB_FOPEN_SAFER 1 _ACEOF -fi -done -for ac_func in _ftime + + + + + + +for ac_func in __fpending do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -11257,36 +11889,37 @@ if test `eval echo '${'$as_ac_var'}'` = #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF +else + M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext" fi done - - fi - fi - - - - { echo "$as_me:$LINENO: checking whether the compiler generally respects inline" >&5 -echo $ECHO_N "checking whether the compiler generally respects inline... $ECHO_C" >&6; } -if test "${gl_cv_c_inline_effective+set}" = set; then + fp_headers=' +# include +# if HAVE_STDIO_EXT_H +# include +# endif +' + { echo "$as_me:$LINENO: checking whether __fpending is declared" >&5 +echo $ECHO_N "checking whether __fpending is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl___fpending+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test $ac_cv_c_inline = no; then - gl_cv_c_inline_effective=no - else - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +$fp_headers int main () { -#ifdef __NO_INLINE__ - #error "inline is not effective" - #endif +#ifndef __fpending + (void) __fpending; +#endif + ; return 0; } @@ -11308,66 +11941,86 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - gl_cv_c_inline_effective=yes + ac_cv_have_decl___fpending=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_c_inline_effective=no + ac_cv_have_decl___fpending=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - fi -{ echo "$as_me:$LINENO: result: $gl_cv_c_inline_effective" >&5 -echo "${ECHO_T}$gl_cv_c_inline_effective" >&6; } - if test $gl_cv_c_inline_effective = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___fpending" >&5 +echo "${ECHO_T}$ac_cv_have_decl___fpending" >&6; } +if test $ac_cv_have_decl___fpending = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_INLINE 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___FPENDING 1 _ACEOF - fi - - - - - - - +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL___FPENDING 0 +_ACEOF +fi + if test $ac_cv_func___fpending = no; then + { echo "$as_me:$LINENO: checking how to determine the number of pending output bytes on a stream" >&5 +echo $ECHO_N "checking how to determine the number of pending output bytes on a stream... $ECHO_C" >&6; } +if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + for ac_expr in \ + \ + '# glibc2' \ + 'fp->_IO_write_ptr - fp->_IO_write_base' \ + \ + '# traditional Unix' \ + 'fp->_ptr - fp->_base' \ + \ + '# BSD' \ + 'fp->_p - fp->_bf._base' \ + \ + '# SCO, Unixware' \ + '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ + \ + '# old glibc?' \ + 'fp->__bufp - fp->__buffer' \ + \ + '# old glibc iostream?' \ + 'fp->_pptr - fp->_pbase' \ + \ + '# VMS' \ + '(*fp)->_ptr - (*fp)->_base' \ + \ + '# e.g., DGUX R4.11; the info is not available' \ + 1 \ + ; do + # Skip each embedded comment. + case "$ac_expr" in '#'*) continue;; esac -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 + 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> +#include + +int +main () +{ +FILE *fp = stdin; (void) ($ac_expr); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -11386,245 +12039,207 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + fp_done=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; } + test "$fp_done" = yes && break + done -# 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 + ac_cv_sys_pending_output_n_bytes=$ac_expr + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_pending_output_n_bytes" >&5 +echo "${ECHO_T}$ac_cv_sys_pending_output_n_bytes" >&6; } + +cat >>confdefs.h <<_ACEOF +#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes +_ACEOF + + fi + + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking whether fpurge is declared" >&5 +echo $ECHO_N "checking whether fpurge is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_fpurge+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 <$ac_header> +#include + +int +main () +{ +#ifndef fpurge + (void) fpurge; +#endif + + ; + return 0; +} _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_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 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? 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 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_fpurge=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no + ac_cv_have_decl_fpurge=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 bug-m4@gnu.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" +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; } +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fpurge" >&5 +echo "${ECHO_T}$ac_cv_have_decl_fpurge" >&6; } +if test $ac_cv_have_decl_fpurge = yes; then -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FPURGE 1 +_ACEOF + + +else cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_DECL_FPURGE 0 _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 "$as_me:$LINENO: checking whether free (NULL) is known to work" >&5 +echo $ECHO_N "checking whether free (NULL) is known to work... $ECHO_C" >&6; } +if test "${gl_cv_func_free+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 - +#include int main () { -return ! malloc (0); +#if _POSIX_VERSION < 199009L && \ + (defined unix || defined _unix || defined _unix_ \ + || defined __unix || defined __unix__) + #error "'free (NULL)' is not known to work" + #endif ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_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 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_malloc_0_nonnull=yes + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_func_free=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&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 + gl_cv_func_free=no fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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 +{ echo "$as_me:$LINENO: result: $gl_cv_func_free" >&5 +echo "${ECHO_T}$gl_cv_func_free" >&6; } - M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext" + if test $gl_cv_func_free = no; then + M4_LIBOBJS="$M4_LIBOBJS free.$ac_objext" cat >>confdefs.h <<\_ACEOF -#define malloc rpl_malloc +#define free rpl_free _ACEOF -fi - - - + fi -for ac_func in mkdtemp -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 "$as_me:$LINENO: checking whether frexpl() can be used without linking with libm" >&5 +echo $ECHO_N "checking whether frexpl() can be used without linking with libm... $ECHO_C" >&6; } +if test "${gl_cv_func_frexpl_no_libm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + 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 - +#include + long double x; int main () { -return $ac_func (); +int e; return frexpl (x, &e) > 0; ; return 0; } @@ -11647,53 +12262,36 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" + gl_cv_func_frexpl_no_libm=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + gl_cv_func_frexpl_no_libm=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 -else - M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext" fi -done - - if test $ac_cv_func_mkdtemp = no; then - HAVE_MKDTEMP=0 - : - - fi - - - - GNULIB_MKDTEMP=1 +{ echo "$as_me:$LINENO: result: $gl_cv_func_frexpl_no_libm" >&5 +echo "${ECHO_T}$gl_cv_func_frexpl_no_libm" >&6; } + if test $gl_cv_func_frexpl_no_libm = yes; then - - - - { echo "$as_me:$LINENO: checking for working mkstemp" >&5 -echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6; } -if test "${gl_cv_func_working_mkstemp+set}" = set; then + { echo "$as_me:$LINENO: checking whether frexpl works" >&5 +echo $ECHO_N "checking whether frexpl works... $ECHO_C" >&6; } +if test "${gl_cv_func_frexpl_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - mkdir conftest.mkstemp if test "$cross_compiling" = yes; then - gl_cv_func_working_mkstemp=no + case "$host_os" in + aix* | beos* | darwin* | irix* | mingw* | pw*) + gl_cv_func_frexpl_works="guessing no";; + *) gl_cv_func_frexpl_works="guessing yes";; + esac + else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -11701,25 +12299,54 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -int i; - off_t large = (off_t) 4294967295u; - if (large < 0) - large = 2147483647; - for (i = 0; i < 70; i++) - { - char templ[] = "conftest.mkstemp/coXXXXXX"; - int (*mkstemp_function) (char *) = mkstemp; - int fd = mkstemp_function (templ); - if (fd < 0 || lseek (fd, large, SEEK_SET) != large) - return 1; - close (fd); - } - return 0; - ; + +#include +extern long double frexpl (long double, int *); +int main() +{ + volatile long double x; + /* Test on finite numbers that fails on AIX 5.1. */ + x = 16.0L; + { + int exp = -9999; + frexpl (x, &exp); + if (exp != 5) + return 1; + } + /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl + function returns an invalid (incorrectly normalized) value: it returns + y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } + but the correct result is + 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ + x = 1.01L; + { + int exp = -9999; + long double y = frexpl (x, &exp); + if (!(exp == 1 && y == 0.505L)) + return 1; + } + /* Test on large finite numbers. This fails on BeOS at i = 16322, while + LDBL_MAX_EXP = 16384. + In the loop end test, we test x against Infinity, rather than comparing + i with LDBL_MAX_EXP, because BeOS has a wrong LDBL_MAX_EXP. */ + { + int i; + for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) + { + int exp = -9999; + frexpl (x, &exp); + if (exp != i) + return 1; + } + } + /* Test on infinite numbers. */ + x = 1.0L / 0.0L; + { + int exp; + long double y = frexpl (x, &exp); + if (y != x) + return 1; + } return 0; } _ACEOF @@ -11743,39 +12370,41 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gl_cv_func_working_mkstemp=yes + gl_cv_func_frexpl_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 ) -gl_cv_func_working_mkstemp=no +gl_cv_func_frexpl_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - rm -rf conftest.mkstemp fi -{ echo "$as_me:$LINENO: result: $gl_cv_func_working_mkstemp" >&5 -echo "${ECHO_T}$gl_cv_func_working_mkstemp" >&6; } - - if test $gl_cv_func_working_mkstemp != yes; then - REPLACE_MKSTEMP=1 - M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext" - +{ echo "$as_me:$LINENO: result: $gl_cv_func_frexpl_works" >&5 +echo "${ECHO_T}$gl_cv_func_frexpl_works" >&6; } + case "$gl_cv_func_frexpl_works" in + *yes) gl_func_frexpl_no_libm=yes ;; + *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; + esac + else + gl_func_frexpl_no_libm=no + REPLACE_FREXPL=1 fi + if test $gl_func_frexpl_no_libm = yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_FREXPL_IN_LIBC 1 +_ACEOF - - GNULIB_MKSTEMP=1 - - { echo "$as_me:$LINENO: checking for obstacks" >&5 -echo $ECHO_N "checking for obstacks... $ECHO_C" >&6; } -if test "${ac_cv_func_obstack+set}" = set; then + { echo "$as_me:$LINENO: checking whether frexpl is declared" >&5 +echo $ECHO_N "checking whether frexpl is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_frexpl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -11784,28 +12413,27 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - #include "obstack.h" +#include + int main () { -struct obstack mem; - #define obstack_chunk_alloc malloc - #define obstack_chunk_free free - obstack_init (&mem); - obstack_free (&mem, 0); +#ifndef frexpl + (void) frexpl; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_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 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -11814,80 +12442,67 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec (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_obstack=yes + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_frexpl=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_obstack=no + ac_cv_have_decl_frexpl=no fi -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_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_obstack" >&5 -echo "${ECHO_T}$ac_cv_func_obstack" >&6; } -if test $ac_cv_func_obstack = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_OBSTACK 1 -_ACEOF - +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_frexpl" >&5 +echo "${ECHO_T}$ac_cv_have_decl_frexpl" >&6; } +if test $ac_cv_have_decl_frexpl = yes; then + : else - M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext" + HAVE_DECL_FREXPL=0 fi + else + HAVE_DECL_FREXPL=0 + M4_LIBOBJS="$M4_LIBOBJS frexpl.$ac_objext" + fi + GNULIB_FREXPL=1 - - - - - M4_LIBOBJS="$M4_LIBOBJS quotearg.$ac_objext" - - - - - - - - { echo "$as_me:$LINENO: checking for mbstate_t" >&5 -echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; } -if test "${ac_cv_type_mbstate_t+set}" = set; then + { echo "$as_me:$LINENO: checking for fseeko" >&5 +echo $ECHO_N "checking for fseeko... $ECHO_C" >&6; } +if test "${gl_cv_func_fseeko+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + 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 +#include int main () { -mbstate_t x; return sizeof x; +fseeko (stdin, 0, 0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -11896,53 +12511,62 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_mbstate_t=yes + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + gl_cv_func_fseeko=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_type_mbstate_t=no + gl_cv_func_fseeko=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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_type_mbstate_t" >&5 -echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; } - if test $ac_cv_type_mbstate_t = yes; then +{ echo "$as_me:$LINENO: result: $gl_cv_func_fseeko" >&5 +echo "${ECHO_T}$gl_cv_func_fseeko" >&6; } + if test $gl_cv_func_fseeko = no; then + HAVE_FSEEKO=0 -cat >>confdefs.h <<\_ACEOF -#define HAVE_MBSTATE_T 1 -_ACEOF + M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext" - else + REPLACE_FSEEKO=1 -cat >>confdefs.h <<\_ACEOF -#define mbstate_t int -_ACEOF + elif test $gl_cv_var_stdin_large_offset = no; then - fi + M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext" - { echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5 -echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6; } -if test "${gl_cv_func_mbrtowc+set}" = set; then + REPLACE_FSEEKO=1 + + fi + + + + GNULIB_FSEEKO=1 + + + + + + { echo "$as_me:$LINENO: checking for ftello" >&5 +echo $ECHO_N "checking for ftello... $ECHO_C" >&6; } +if test "${gl_cv_func_ftello+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + 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 () { -wchar_t wc; - char const s[] = ""; - size_t n = 1; - mbstate_t state; - return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); +ftello (stdin); ; return 0; } @@ -11965,26 +12589,52 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - gl_cv_func_mbrtowc=yes + gl_cv_func_ftello=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_func_mbrtowc=no + gl_cv_func_ftello=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: $gl_cv_func_mbrtowc" >&5 -echo "${ECHO_T}$gl_cv_func_mbrtowc" >&6; } - if test $gl_cv_func_mbrtowc = yes; then +{ echo "$as_me:$LINENO: result: $gl_cv_func_ftello" >&5 +echo "${ECHO_T}$gl_cv_func_ftello" >&6; } + if test $gl_cv_func_ftello = no; then + HAVE_FTELLO=0 + + M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext" + + REPLACE_FTELLO=1 + + elif test $gl_cv_var_stdin_large_offset = no; then + + M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext" + + REPLACE_FTELLO=1 + + fi + + + + GNULIB_FTELLO=1 + + + + if test -n "$GETOPT_H"; then + + M4_LIBOBJS="$M4_LIBOBJS getopt.$ac_objext" + M4_LIBOBJS="$M4_LIBOBJS getopt1.$ac_objext" + + GETOPT_H=getopt.h cat >>confdefs.h <<\_ACEOF -#define HAVE_MBRTOWC 1 +#define __GETOPT_PREFIX rpl_ _ACEOF - fi @@ -11994,29 +12644,87 @@ _ACEOF +fi -# Check whether --with-included-regex was given. -if test "${with_included_regex+set}" = set; then - withval=$with_included_regex; + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking for gettimeofday with POSIX signature" >&5 +echo $ECHO_N "checking for gettimeofday with POSIX signature... $ECHO_C" >&6; } +if test "${gl_cv_func_gettimeofday_posix_signature+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 + struct timeval c; + +int +main () +{ + + int (*f) (struct timeval *restrict, void *restrict) = gettimeofday; + int x = f (&c, 0); + return !(x | c.tv_sec | c.tv_usec); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_func_gettimeofday_posix_signature=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_gettimeofday_posix_signature=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_posix_signature" >&5 +echo "${ECHO_T}$gl_cv_func_gettimeofday_posix_signature" >&6; } - case $with_included_regex in #( - yes|no) ac_use_included_regex=$with_included_regex - ;; - '') - # If the system regex support is good enough that it passes the - # following run test, then default to *not* using the included regex.c. - # If cross compiling, assume the test would fail and use the included - # regex.c. - { echo "$as_me:$LINENO: checking for working re_compile_pattern" >&5 -echo $ECHO_N "checking for working re_compile_pattern... $ECHO_C" >&6; } -if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then + + + + { echo "$as_me:$LINENO: checking whether gettimeofday clobbers localtime buffer" >&5 +echo $ECHO_N "checking whether gettimeofday clobbers localtime buffer... $ECHO_C" >&6; } +if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - gl_cv_func_re_compile_pattern_working=no + gl_cv_func_gettimeofday_clobber=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -12024,122 +12732,24 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default - #if HAVE_LOCALE_H - #include - #endif - #include - #include +#include + #include + #include + #include int main () { -static struct re_pattern_buffer regex; - unsigned char folded_chars[UCHAR_MAX + 1]; - int i; - const char *s; - struct re_registers regs; - #if HAVE_LOCALE_H - /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html - This test needs valgrind to catch the bug on Debian - GNU/Linux 3.1 x86, but it might catch the bug better - on other platforms and it shouldn't hurt to try the - test here. */ - if (setlocale (LC_ALL, "en_US.UTF-8")) - { - static char const pat[] = "insert into"; - static char const data[] = - "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; - re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE - | RE_ICASE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern (pat, sizeof pat - 1, ®ex); - if (s) - return 1; - if (re_search (®ex, data, sizeof data - 1, - 0, sizeof data - 1, ®s) - != -1) - return 1; - if (! setlocale (LC_ALL, "C")) - return 1; - } - #endif - - /* This test is from glibc bug 3957, reported by Andrew Mackey. */ - re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("a[^x]b", 6, ®ex); - if (s) - return 1; - - /* This should fail, but succeeds for glibc-2.5. */ - if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) - return 1; - - /* This regular expression is from Spencer ere test number 75 - in grep-2.3. */ - re_set_syntax (RE_SYNTAX_POSIX_EGREP); - memset (®ex, 0, sizeof regex); - for (i = 0; i <= UCHAR_MAX; i++) - folded_chars[i] = i; - regex.translate = folded_chars; - s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); - /* This should fail with _Invalid character class name_ error. */ - if (!s) - return 1; - - /* This should succeed, but does not for glibc-2.1.3. */ - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("{1", 2, ®ex); - - if (s) - return 1; - - /* The following example is derived from a problem report - against gawk from Jorge Stolfi . */ - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("[an\371]*n", 7, ®ex); - if (s) - return 1; - - /* This should match, but does not for glibc-2.2.1. */ - if (re_match (®ex, "an", 2, 0, ®s) != 2) - return 1; - - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - return 1; - - /* glibc-2.2.93 does not work with a negative RANGE argument. */ - if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) - return 1; - - /* The version of regex.c in older versions of gnulib - ignored RE_ICASE. Detect that problem too. */ - re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - return 1; - - if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) - return 1; - - /* REG_STARTEND was added to glibc on 2004-01-15. - Reject older versions. */ - if (! REG_STARTEND) - return 1; - - /* Reject hosts whose regoff_t values are too narrow. - These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t - and 32-bit int. */ - if (sizeof (regoff_t) < sizeof (ptrdiff_t) - || sizeof (regoff_t) < sizeof (ssize_t)) - return 1; + time_t t = 0; + struct tm *lt; + struct tm saved_lt; + struct timeval tv; + lt = localtime (&t); + saved_lt = *lt; + gettimeofday (&tv, NULL); + return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; - return 0; ; return 0; } @@ -12164,153 +12774,54 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - gl_cv_func_re_compile_pattern_working=yes + gl_cv_func_gettimeofday_clobber=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -gl_cv_func_re_compile_pattern_working=no +gl_cv_func_gettimeofday_clobber=yes 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: $gl_cv_func_re_compile_pattern_working" >&5 -echo "${ECHO_T}$gl_cv_func_re_compile_pattern_working" >&6; } - case $gl_cv_func_re_compile_pattern_working in #( - yes) ac_use_included_regex=no;; #( - no) ac_use_included_regex=yes;; - esac - ;; - *) { { echo "$as_me:$LINENO: error: Invalid value for --with-included-regex: $with_included_regex" >&5 -echo "$as_me: error: Invalid value for --with-included-regex: $with_included_regex" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - if test $ac_use_included_regex = yes; then - -cat >>confdefs.h <<\_ACEOF -#define _REGEX_LARGE_OFFSETS 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define re_syntax_options rpl_re_syntax_options -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define re_set_syntax rpl_re_set_syntax -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define re_compile_pattern rpl_re_compile_pattern -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define re_compile_fastmap rpl_re_compile_fastmap -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define re_search rpl_re_search -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define re_search_2 rpl_re_search_2 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define re_match rpl_re_match -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define re_match_2 rpl_re_match_2 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define re_set_registers rpl_re_set_registers -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define re_comp rpl_re_comp -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define re_exec rpl_re_exec -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define regcomp rpl_regcomp -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define regexec rpl_regexec -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define regerror rpl_regerror -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define regfree rpl_regfree -_ACEOF - - M4_LIBOBJS="$M4_LIBOBJS regex.$ac_objext" - - - - - - - - - - - +{ echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_clobber" >&5 +echo "${ECHO_T}$gl_cv_func_gettimeofday_clobber" >&6; } + if test $gl_cv_func_gettimeofday_clobber = yes; then + REPLACE_GETTIMEOFDAY=1 + SYS_TIME_H=sys/time.h + M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext" - { echo "$as_me:$LINENO: checking whether isblank is declared" >&5 -echo $ECHO_N "checking whether isblank is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_isblank+set}" = set; then +for ac_header in sys/timeb.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 - cat >conftest.$ac_ext <<_ACEOF + # 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. */ -#include - -int -main () -{ -#ifndef isblank - (void) isblank; -#endif - - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -12329,60 +12840,115 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_cv_have_decl_isblank=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl_isblank=no + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isblank" >&5 -echo "${ECHO_T}$ac_cv_have_decl_isblank" >&6; } -if test $ac_cv_have_decl_isblank = yes; then +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ISBLANK 1 +# 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 - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ISBLANK 0 +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 bug-m4@gnu.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 - - - signals_not_posix= - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _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 "sigset_t" >/dev/null 2>&1; then - : -else - signals_not_posix=1 fi -rm -f conftest* - if test -z "$signals_not_posix"; then - { echo "$as_me:$LINENO: checking for sigprocmask" >&5 -echo $ECHO_N "checking for sigprocmask... $ECHO_C" >&6; } -if test "${ac_cv_func_sigprocmask+set}" = set; then +done + + +for ac_func in _ftime +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 @@ -12391,12 +12957,12 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define sigprocmask to an innocuous variant, in case declares sigprocmask. +/* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ -#define sigprocmask innocuous_sigprocmask +#define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char sigprocmask (); below. + which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ @@ -12406,7 +12972,7 @@ cat >>conftest.$ac_ext <<_ACEOF # include #endif -#undef sigprocmask +#undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -12414,18 +12980,18 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char sigprocmask (); +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_sigprocmask || defined __stub___sigprocmask +#if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { -return sigprocmask (); +return $ac_func (); ; return 0; } @@ -12448,119 +13014,56 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_func_sigprocmask=yes + eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_sigprocmask=no + 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 -{ echo "$as_me:$LINENO: result: $ac_cv_func_sigprocmask" >&5 -echo "${ECHO_T}$ac_cv_func_sigprocmask" >&6; } -if test $ac_cv_func_sigprocmask = yes; then - gl_cv_func_sigprocmask=1 -fi - - fi - if test -n "$gl_cv_func_sigprocmask"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_POSIX_SIGNALBLOCKING 1 -_ACEOF - - else - M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext" - - { echo "$as_me:$LINENO: checking for sigset_t" >&5 -echo $ECHO_N "checking for sigset_t... $ECHO_C" >&6; } -if test "${ac_cv_type_sigset_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. */ -#include -/* Mingw defines sigset_t not in , but in . */ -#include - -typedef sigset_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} +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 -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$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_sigset_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_sigset_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_sigset_t" >&5 -echo "${ECHO_T}$ac_cv_type_sigset_t" >&6; } -if test $ac_cv_type_sigset_t = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_SIGSET_T 1 -_ACEOF +done -gl_cv_type_sigset_t=yes -else - gl_cv_type_sigset_t=no -fi - if test $gl_cv_type_sigset_t = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_SIGSET_T 1 +#define gmtime rpl_gmtime _ACEOF - fi - +cat >>confdefs.h <<\_ACEOF +#define localtime rpl_localtime +_ACEOF +cat >>confdefs.h <<\_ACEOF +#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1 +_ACEOF + fi - fi + if test $gl_cv_func_gettimeofday_posix_signature != yes; then + REPLACE_GETTIMEOFDAY=1 + SYS_TIME_H=sys/time.h + if test $gl_cv_func_gettimeofday_clobber != yes; then + M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext" -for ac_header in stdint.h +for ac_header in sys/timeb.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 @@ -12704,52 +13207,127 @@ fi done - { echo "$as_me:$LINENO: checking for SIZE_MAX" >&5 -echo $ECHO_N "checking for SIZE_MAX... $ECHO_C" >&6; } - if test "${gl_cv_size_max+set}" = set; then + +for ac_func in _ftime +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 - - gl_cv_size_max= - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#include -#if HAVE_STDINT_H -#include +/* 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 -#ifdef SIZE_MAX -Found it + +#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 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Found it" >/dev/null 2>&1; then - gl_cv_size_max=yes +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 conftest* - if test -z "$gl_cv_size_max"; then - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF +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 + fi + + + + { echo "$as_me:$LINENO: checking whether the compiler generally respects inline" >&5 +echo $ECHO_N "checking whether the compiler generally respects inline... $ECHO_C" >&6; } +if test "${gl_cv_c_inline_effective+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test $ac_cv_c_inline = no; then + gl_cv_c_inline_effective=no + else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include + int main () { -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= 0)]; -test_array [0] = 0 - +#ifdef __NO_INLINE__ + #error "inline is not effective" + #endif ; return 0; } @@ -12771,34 +13349,59 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF + gl_cv_c_inline_effective=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_c_inline_effective=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_c_inline_effective" >&5 +echo "${ECHO_T}$gl_cv_c_inline_effective" >&6; } + if test $gl_cv_c_inline_effective = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INLINE 1 +_ACEOF + + fi + + + { echo "$as_me:$LINENO: checking whether isnan(double) can be used without linking with libm" >&5 +echo $ECHO_N "checking whether isnan(double) can be used without linking with libm... $ECHO_C" >&6; } +if test "${gl_cv_func_isnan_no_libm+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 + double x; int main () { -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; -test_array [0] = 0 - +return isnan (x); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -12807,39 +13410,77 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + gl_cv_func_isnan_no_libm=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + gl_cv_func_isnan_no_libm=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_isnan_no_libm" >&5 +echo "${ECHO_T}$gl_cv_func_isnan_no_libm" >&6; } + if test $gl_cv_func_isnan_no_libm = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNAN_IN_LIBC 1 +_ACEOF + + else + M4_LIBOBJS="$M4_LIBOBJS isnan.$ac_objext" + + { echo "$as_me:$LINENO: checking where to find the exponent in a 'double'" >&5 +echo $ECHO_N "checking where to find the exponent in a 'double'... $ECHO_C" >&6; } +if test "${gl_cv_cc_double_expbit0+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + + 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 defined arm || defined __arm || defined __arm__ + mixed_endianness +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "mixed_endianness" >/dev/null 2>&1; then + gl_cv_cc_double_expbit0="unknown" +else + + : +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + int main () { -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)]; -test_array [0] = 0 +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif ; return 0; @@ -12862,21 +13503,22 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include +#include +#include + int main () { -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)]; -test_array [0] = 0 +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif ; return 0; @@ -12899,49 +13541,39 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break + ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + # It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { -static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; -test_array [0] = 0 - + _ascii (); _ebcdic (); ; return 0; } @@ -12963,20 +13595,25 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) size_t_bits_minus_1=$ac_lo;; -'') size_t_bits_minus_1= ;; -esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -12984,34 +13621,19 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include -static long int longval () { return sizeof (size_t) * CHAR_BIT - 1; } -static unsigned long int ulongval () { return sizeof (size_t) * CHAR_BIT - 1; } -#include -#include +$ac_includes_default int main () { - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if ((sizeof (size_t) * CHAR_BIT - 1) < 0) - { - long int i = longval (); - if (i != (sizeof (size_t) * CHAR_BIT - 1)) - return 1; - fprintf (f, "%ld\n", i); - } - else - { - unsigned long int i = ulongval (); - if (i != (sizeof (size_t) * CHAR_BIT - 1)) - return 1; - fprintf (f, "%lu\n", i); - } - return ferror (f) || fclose (f) != 0; + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; ; return 0; @@ -13037,121 +13659,214 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - size_t_bits_minus_1=`cat conftest.val` + ac_cv_c_bigendian=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -size_t_bits_minus_1= +ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.val - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +: +case $ac_cv_c_bigendian in + yes) + gl_cv_cc_double_expbit0="word 0 bit 20" ;; + no) + gl_cv_cc_double_expbit0="word 1 bit 20" ;; + *) + gl_cv_cc_double_expbit0="unknown" ;; +esac + + +fi +rm -f conftest* + + +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + +#include #include -int -main () +#include +#include +#define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { double value; unsigned int word[NWORDS]; } memory_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (double x) +{ + memory_double m; + size_t i; + /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ + memset (&m, 0, sizeof (memory_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () { -static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)]; -test_array [0] = 0 - - ; - return 0; + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25); + add_to_ored_words (0.5); + add_to_ored_words (1.0); + add_to_ored_words (2.0); + add_to_ored_words (4.0); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); } + _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in + (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_compile") 2>conftest.er1 + (eval "$ac_try") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break + (exit $ac_status); }; }; then + gl_cv_cc_double_expbit0=`cat conftest.out` else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` +( exit $ac_status ) +gl_cv_cc_double_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done + + rm -f conftest.out + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_cc_double_expbit0" >&5 +echo "${ECHO_T}$gl_cv_cc_double_expbit0" >&6; } + case "$gl_cv_cc_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` + +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_WORD $word +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_BIT $bit +_ACEOF + + ;; + esac + + fi + + + { echo "$as_me:$LINENO: checking where to find the exponent in a 'double'" >&5 +echo $ECHO_N "checking where to find the exponent in a 'double'... $ECHO_C" >&6; } +if test "${gl_cv_cc_double_expbit0+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + +#if defined arm || defined __arm || defined __arm__ + mixed_endianness +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "mixed_endianness" >/dev/null 2>&1; then + gl_cv_cc_double_expbit0="unknown" +else + + : +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + int main () { -static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)]; -test_array [0] = 0 +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif ; return 0; @@ -13174,20 +13889,22 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include +#include + int main () { -static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)]; -test_array [0] = 0 +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif ; return 0; @@ -13210,48 +13927,39 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break + ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + # It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { -static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; -test_array [0] = 0 - + _ascii (); _ebcdic (); ; return 0; } @@ -13273,20 +13981,25 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` + fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) fits_in_uint=$ac_lo;; -'') fits_in_uint= ;; -esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -13294,33 +14007,19 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -static long int longval () { return sizeof (size_t) <= sizeof (unsigned int); } -static unsigned long int ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } -#include -#include +$ac_includes_default int main () { - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if ((sizeof (size_t) <= sizeof (unsigned int)) < 0) - { - long int i = longval (); - if (i != (sizeof (size_t) <= sizeof (unsigned int))) - return 1; - fprintf (f, "%ld\n", i); - } - else - { - unsigned long int i = ulongval (); - if (i != (sizeof (size_t) <= sizeof (unsigned int))) - return 1; - fprintf (f, "%lu\n", i); - } - return ferror (f) || fclose (f) != 0; + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; ; return 0; @@ -13346,117 +14045,201 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - fits_in_uint=`cat conftest.val` + ac_cv_c_bigendian=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -fits_in_uint= +ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.val - if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then - if test $fits_in_uint = 1; then - cat >conftest.$ac_ext <<_ACEOF + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +: +case $ac_cv_c_bigendian in + yes) + gl_cv_cc_double_expbit0="word 0 bit 20" ;; + no) + gl_cv_cc_double_expbit0="word 1 bit 20" ;; + *) + gl_cv_cc_double_expbit0="unknown" ;; +esac + + +fi +rm -f conftest* + + +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include - extern size_t foo; - extern unsigned long foo; -int -main () +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { double value; unsigned int word[NWORDS]; } memory_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (double x) +{ + memory_double m; + size_t i; + /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ + memset (&m, 0, sizeof (memory_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () { - - ; - return 0; + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25); + add_to_ored_words (0.5); + add_to_ored_words (1.0); + add_to_ored_words (2.0); + add_to_ored_words (4.0); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); } + _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - fits_in_uint=0 + (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 + gl_cv_cc_double_expbit0=`cat conftest.out` else - echo "$as_me: failed program was:" >&5 + 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 ) +gl_cv_cc_double_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - if test $fits_in_uint = 1; then - gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" - else - gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" - fi - else - gl_cv_size_max='((size_t)~(size_t)0)' - fi - fi + + rm -f conftest.out fi +{ echo "$as_me:$LINENO: result: $gl_cv_cc_double_expbit0" >&5 +echo "${ECHO_T}$gl_cv_cc_double_expbit0" >&6; } + case "$gl_cv_cc_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` + +cat >>confdefs.h <<_ACEOF +#define DBL_EXPBIT0_WORD $word +_ACEOF - { echo "$as_me:$LINENO: result: $gl_cv_size_max" >&5 -echo "${ECHO_T}$gl_cv_size_max" >&6; } - if test "$gl_cv_size_max" != yes; then cat >>confdefs.h <<_ACEOF -#define SIZE_MAX $gl_cv_size_max +#define DBL_EXPBIT0_BIT $bit _ACEOF - fi + ;; + esac - { echo "$as_me:$LINENO: checking for ssize_t" >&5 -echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } -if test "${gt_cv_ssize_t+set}" = set; then + + { echo "$as_me:$LINENO: checking whether isnan(float) can be used without linking with libm" >&5 +echo $ECHO_N "checking whether isnan(float) can be used without linking with libm... $ECHO_C" >&6; } +if test "${gl_cv_func_isnanf_no_libm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include + #ifdef isnan + # undef isnanf + # define isnanf(x) isnan ((float)(x)) + #endif + float x; int main () { -int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x; +return isnanf (x); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -13465,389 +14248,435 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gt_cv_ssize_t=yes + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + gl_cv_func_isnanf_no_libm=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gt_cv_ssize_t=no + gl_cv_func_isnanf_no_libm=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5 -echo "${ECHO_T}$gt_cv_ssize_t" >&6; } - if test $gt_cv_ssize_t = no; then +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext -cat >>confdefs.h <<\_ACEOF -#define ssize_t int -_ACEOF +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_isnanf_no_libm" >&5 +echo "${ECHO_T}$gl_cv_func_isnanf_no_libm" >&6; } - fi + if test $gl_cv_func_isnanf_no_libm = yes; then - { echo "$as_me:$LINENO: checking for va_copy" >&5 -echo $ECHO_N "checking for va_copy... $ECHO_C" >&6; } - if test "${gl_cv_func_va_copy+set}" = set; then + { echo "$as_me:$LINENO: checking whether isnan(float) works" >&5 +echo $ECHO_N "checking whether isnan(float) works... $ECHO_C" >&6; } +if test "${gl_cv_func_isnanf_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + case "$host_os" in + irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; + *) gl_cv_func_isnanf_works="guessing yes";; + esac + +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 () -{ -#ifndef va_copy -void (*func) (va_list, va_list) = va_copy; +#include +#ifdef isnan +# undef isnanf +# define isnanf(x) isnan ((float)(x)) +#endif +/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ +#ifdef __DECC +static float +NaN () +{ + static float zero = 0.0f; + return zero / zero; +} +#else +# define NaN() (0.0f / 0.0f) #endif - - ; +int main() +{ + if (!isnanf (NaN ())) + return 1; + if (isnanf (1.0f / 0.0f)) + return 1; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gl_cv_func_va_copy=yes + (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 + gl_cv_func_isnanf_works=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_func_va_copy=no +( exit $ac_status ) +gl_cv_func_isnanf_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_isnanf_works" >&5 +echo "${ECHO_T}$gl_cv_func_isnanf_works" >&6; } - { echo "$as_me:$LINENO: result: $gl_cv_func_va_copy" >&5 -echo "${ECHO_T}$gl_cv_func_va_copy" >&6; } - if test $gl_cv_func_va_copy = no; then - # Provide a substitute, either __va_copy or as a simple assignment. - if test "${gl_cv_func___va_copy+set}" = set; then + fi + if test $gl_cv_func_isnanf_no_libm = yes \ + && { case "$gl_cv_func_isnanf_works" in + *yes) true;; + *) false;; + esac + }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNANF_IN_LIBC 1 +_ACEOF + + else + M4_LIBOBJS="$M4_LIBOBJS isnanf.$ac_objext" + + { echo "$as_me:$LINENO: checking where to find the exponent in a 'float'" >&5 +echo $ECHO_N "checking where to find the exponent in a 'float'... $ECHO_C" >&6; } +if test "${gl_cv_cc_float_expbit0+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + gl_cv_cc_float_expbit0="word 0 bit 23" +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 () -{ - -#ifndef __va_copy -error, bail out -#endif - ; - return 0; +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { float value; unsigned int word[NWORDS]; } memory_float; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (float x) +{ + memory_float m; + size_t i; + /* Clear it first, in case + sizeof (float) < sizeof (memory_float). */ + memset (&m, 0, sizeof (memory_float)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25f); + add_to_ored_words (0.5f); + add_to_ored_words (1.0f); + add_to_ored_words (2.0f); + add_to_ored_words (4.0f); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); } + _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gl_cv_func___va_copy=yes + (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 + gl_cv_cc_float_expbit0=`cat conftest.out` else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - gl_cv_func___va_copy=no +( exit $ac_status ) +gl_cv_cc_float_expbit0="unknown" fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - if test $gl_cv_func___va_copy = yes; then - -cat >>confdefs.h <<\_ACEOF -#define va_copy __va_copy -_ACEOF - - else + rm -f conftest.out +fi +{ echo "$as_me:$LINENO: result: $gl_cv_cc_float_expbit0" >&5 +echo "${ECHO_T}$gl_cv_cc_float_expbit0" >&6; } + case "$gl_cv_cc_float_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` -cat >>confdefs.h <<\_ACEOF -#define va_copy gl_va_copy +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_WORD $word _ACEOF - fi - fi - - +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_BIT $bit +_ACEOF - # Define two additional variables used in the Makefile substitution. + ;; + esac - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' - else - STDBOOL_H='stdbool.h' fi - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - - - - - - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - - - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi - - - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 - fi - - - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 - fi - - - if test $ac_cv_header_stdint_h = yes; then - { echo "$as_me:$LINENO: checking absolute name of " >&5 -echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } -if test "${gl_cv_absolute_stdint_h+set}" = set; then + { echo "$as_me:$LINENO: checking where to find the exponent in a 'float'" >&5 +echo $ECHO_N "checking where to find the exponent in a 'float'... $ECHO_C" >&6; } +if test "${gl_cv_cc_float_expbit0+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - - - - - if test $ac_cv_header_stdint_h = yes; then - cat >conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then + gl_cv_cc_float_expbit0="word 0 bit 23" +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 +#include +#define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { float value; unsigned int word[NWORDS]; } memory_float; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (float x) +{ + memory_float m; + size_t i; + /* Clear it first, in case + sizeof (float) < sizeof (memory_float). */ + memset (&m, 0, sizeof (memory_float)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25f); + add_to_ored_words (0.5f); + add_to_ored_words (1.0f); + add_to_ored_words (2.0f); + add_to_ored_words (4.0f); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} + _ACEOF - gl_cv_absolute_stdint_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | -sed -n '\#/stdint.h#{s#.*"\(.*/stdint.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` - fi +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 + gl_cv_cc_float_expbit0=`cat conftest.out` +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 ) +gl_cv_cc_float_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm -f conftest.out fi -{ echo "$as_me:$LINENO: result: $gl_cv_absolute_stdint_h" >&5 -echo "${ECHO_T}$gl_cv_absolute_stdint_h" >&6; } +{ echo "$as_me:$LINENO: result: $gl_cv_cc_float_expbit0" >&5 +echo "${ECHO_T}$gl_cv_cc_float_expbit0" >&6; } + case "$gl_cv_cc_float_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` + cat >>confdefs.h <<_ACEOF -#define ABSOLUTE_STDINT_H "$gl_cv_absolute_stdint_h" +#define FLT_EXPBIT0_WORD $word _ACEOF - ABSOLUTE_STDINT_H=\"$gl_cv_absolute_stdint_h\" - HAVE_STDINT_H=1 - else - ABSOLUTE_STDINT_H=\"no/such/file/stdint.h\" - HAVE_STDINT_H=0 - fi +cat >>confdefs.h <<_ACEOF +#define FLT_EXPBIT0_BIT $bit +_ACEOF + + ;; + esac - if test $ac_cv_header_stdint_h = yes; then - { echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 -echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6; } -if test "${gl_cv_header_working_stdint_h+set}" = set; then + { echo "$as_me:$LINENO: checking whether isnan(long double) can be used without linking with libm" >&5 +echo $ECHO_N "checking whether isnan(long double) can be used without linking with libm... $ECHO_C" >&6; } +if test "${gl_cv_func_isnanl_no_libm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - gl_cv_header_working_stdint_h=no - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -#include -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#include ABSOLUTE_STDINT_H -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; -struct s { - int check_PTRDIFF: PTRDIFF_MIN < 0 && 0 < PTRDIFF_MAX ? 1 : -1; - int check_SIG_ATOMIC: SIG_ATOMIC_MIN <= 0 && 0 < SIG_ATOMIC_MAX ? 1 : -1; - int check_SIZE: 0 < SIZE_MAX ? 1 : -1; - int check_WCHAR: WCHAR_MIN <= 0 && 0 < WCHAR_MAX ? 1 : -1; - int check_WINT: WINT_MIN <= 0 && 0 < WINT_MAX ? 1 : -1; - - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; - - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; - +#include + #ifdef isnan + # undef isnanl + # define isnanl(x) isnan ((long double)(x)) + #endif + long double x; int main () { - +return isnanl (x); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -13856,339 +14685,525 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - gl_cv_header_working_stdint_h=yes + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + gl_cv_func_isnanl_no_libm=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + gl_cv_func_isnanl_no_libm=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi -{ echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 -echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6; } - fi - if test "$gl_cv_header_working_stdint_h" = yes; then - STDINT_H= - else +{ echo "$as_me:$LINENO: result: $gl_cv_func_isnanl_no_libm" >&5 +echo "${ECHO_T}$gl_cv_func_isnanl_no_libm" >&6; } + gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm + if test $gl_func_isnanl_no_libm = yes; then -for ac_header in sys/inttypes.h sys/bitypes.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 "$as_me:$LINENO: checking whether isnanl works" >&5 +echo $ECHO_N "checking whether isnanl works... $ECHO_C" >&6; } +if test "${gl_cv_func_isnanl_works+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 + + if test "$cross_compiling" = yes; then + case "$host_cpu" in + # Guess no on ia64, x86_64, i386. + ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; + *) + case "$host_os" in + netbsd*) gl_cv_func_isnanl_works="guessing no";; + *) gl_cv_func_isnanl_works="guessing yes";; + esac + ;; + esac + +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + +#include +#include +#include +#ifdef isnan +# undef isnanl +# define isnanl(x) isnan ((long double)(x)) +#endif +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { unsigned int word[NWORDS]; long double value; } + memory_long_double; +int main () +{ + memory_long_double m; + unsigned int i; + + /* The isnanl function should be immune against changes in the sign bit and + in the mantissa bits. The xor operation twiddles a bit that can only be + a sign bit or a mantissa bit (since the exponent never extends to + bit 31). */ + m.value = 0.0L / 0.0L; + m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); + for (i = 0; i < NWORDS; i++) + m.word[i] |= 1; + if (!isnanl (m.value)) + return 1; + +#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) +/* Representation of an 80-bit 'long double' as an initializer for a sequence + of 'unsigned int' words. */ +# ifdef WORDS_BIGENDIAN +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ + ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + (unsigned int) (mantlo) << 16 \ + } +# else +# define LDBL80_WORDS(exponent,manthi,mantlo) \ + { mantlo, manthi, exponent } +# endif + { /* Quiet NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; + if (!isnanl (x.value)) + return 1; + } + { + /* Signalling NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; + if (!isnanl (x.value)) + return 1; + } + /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, + Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in + Intel IA-64 Architecture Software Developer's Manual, Volume 1: + Application Architecture. + Table 5-2 "Floating-Point Register Encodings" + Figure 5-6 "Memory to Floating-Point Register Data Translation" + */ + { /* Pseudo-NaN. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; + if (!isnanl (x.value)) + return 1; + } + { /* Pseudo-Infinity. */ + static memory_long_double x = + { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; + if (!isnanl (x.value)) + return 1; + } + { /* Pseudo-Zero. */ + static memory_long_double x = + { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; + if (!isnanl (x.value)) + return 1; + } + { /* Unnormalized number. */ + static memory_long_double x = + { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; + if (!isnanl (x.value)) + return 1; + } + { /* Pseudo-Denormal. */ + static memory_long_double x = + { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; + if (!isnanl (x.value)) + return 1; + } +#endif + + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$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 + (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 + gl_cv_func_isnanl_works=yes else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no +( exit $ac_status ) +gl_cv_func_isnanl_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 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 + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_isnanl_works" >&5 +echo "${ECHO_T}$gl_cv_func_isnanl_works" >&6; } + + case "$gl_cv_func_isnanl_works" in + *yes) ;; + *) gl_func_isnanl_no_libm=no ;; + esac + fi + if test $gl_func_isnanl_no_libm = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNANL_IN_LIBC 1 +_ACEOF + + else + M4_LIBOBJS="$M4_LIBOBJS isnanl.$ac_objext" + + + { echo "$as_me:$LINENO: checking where to find the exponent in a 'long double'" >&5 +echo $ECHO_N "checking where to find the exponent in a 'long double'... $ECHO_C" >&6; } +if test "${gl_cv_cc_long_double_expbit0+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + + gl_cv_cc_long_double_expbit0="unknown" + +else + 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> + +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { long double value; unsigned int word[NWORDS]; } + memory_long_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (long double x) +{ + memory_long_double m; + size_t i; + /* Clear it first, in case + sizeof (long double) < sizeof (memory_long_double). */ + memset (&m, 0, sizeof (memory_long_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () +{ + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25L); + add_to_ored_words (0.5L); + add_to_ored_words (1.0L); + add_to_ored_words (2.0L); + add_to_ored_words (4.0L); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); +} + _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" +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_cpp conftest.$ac_ext") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - 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 + (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 + gl_cv_cc_long_double_expbit0=`cat conftest.out` else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +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 bug-m4@gnu.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" +( exit $ac_status ) +gl_cv_cc_long_double_expbit0="unknown" fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 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 + rm -f conftest.out - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - else - HAVE_SYS_INTTYPES_H=0 - fi +fi +{ echo "$as_me:$LINENO: result: $gl_cv_cc_long_double_expbit0" >&5 +echo "${ECHO_T}$gl_cv_cc_long_double_expbit0" >&6; } + case "$gl_cv_cc_long_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - else - HAVE_SYS_BITYPES_H=0 - fi +cat >>confdefs.h <<_ACEOF +#define LDBL_EXPBIT0_WORD $word +_ACEOF +cat >>confdefs.h <<_ACEOF +#define LDBL_EXPBIT0_BIT $bit +_ACEOF + ;; + esac + fi + { echo "$as_me:$LINENO: checking where to find the exponent in a 'long double'" >&5 +echo $ECHO_N "checking where to find the exponent in a 'long double'... $ECHO_C" >&6; } +if test "${gl_cv_cc_long_double_expbit0+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + gl_cv_cc_long_double_expbit0="unknown" - for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do - { echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 -echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6; } -if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #include - #include - #include - -#include -int -main () +#include +#include +#include +#include +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { long double value; unsigned int word[NWORDS]; } + memory_long_double; +static unsigned int ored_words[NWORDS]; +static unsigned int anded_words[NWORDS]; +static void add_to_ored_words (long double x) +{ + memory_long_double m; + size_t i; + /* Clear it first, in case + sizeof (long double) < sizeof (memory_long_double). */ + memset (&m, 0, sizeof (memory_long_double)); + m.value = x; + for (i = 0; i < NWORDS; i++) + { + ored_words[i] |= m.word[i]; + anded_words[i] &= m.word[i]; + } +} +int main () { -static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; -test_array [0] = 0 - - ; - return 0; + size_t j; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + for (j = 0; j < NWORDS; j++) + anded_words[j] = ~ (unsigned int) 0; + add_to_ored_words (0.25L); + add_to_ored_words (0.5L); + add_to_ored_words (1.0L); + add_to_ored_words (2.0L); + add_to_ored_words (4.0L); + /* Remove bits that are common (e.g. if representation of the first mantissa + bit is explicit). */ + for (j = 0; j < NWORDS; j++) + ored_words[j] &= ~anded_words[j]; + /* Now find the nonzero word. */ + for (j = 0; j < NWORDS; j++) + if (ored_words[j] != 0) + break; + if (j < NWORDS) + { + size_t i; + for (i = j + 1; i < NWORDS; i++) + if (ored_words[i] != 0) + { + fprintf (fp, "unknown"); + return (fclose (fp) != 0); + } + for (i = 0; ; i++) + if ((ored_words[j] >> i) & 1) + { + fprintf (fp, "word %d bit %d", (int) j, (int) i); + return (fclose (fp) != 0); + } + } + fprintf (fp, "unknown"); + return (fclose (fp) != 0); } + _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #include - #include - #include - -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in + (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_compile") 2>conftest.er1 + (eval "$ac_try") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break + (exit $ac_status); }; }; then + gl_cv_cc_long_double_expbit0=`cat conftest.out` else - echo "$as_me: failed program was:" >&5 + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` +( exit $ac_status ) +gl_cv_cc_long_double_expbit0="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + rm -f conftest.out + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_cc_long_double_expbit0" >&5 +echo "${ECHO_T}$gl_cv_cc_long_double_expbit0" >&6; } + case "$gl_cv_cc_long_double_expbit0" in + word*bit*) + word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` + +cat >>confdefs.h <<_ACEOF +#define LDBL_EXPBIT0_WORD $word _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #include - #include - #include -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; -test_array [0] = 0 +cat >>confdefs.h <<_ACEOF +#define LDBL_EXPBIT0_BIT $bit +_ACEOF - ; - return 0; + ;; + esac + + + + + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking whether lseek detects pipes" >&5 +echo $ECHO_N "checking whether lseek detects pipes... $ECHO_C" >&6; } +if test "${gl_cv_func_lseek_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test $cross_compiling = no; then + cat >conftest.$ac_ext <<_ACEOF + +#include /* for off_t */ +#include /* for SEEK_CUR */ +#include +int main () +{ + /* Exit with success only if stdin is seekable. */ + return lseek (0, (off_t)0, SEEK_CUR) < 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -14197,34 +15212,31 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + if test -s conftest$ac_exeext \ + && ./conftest$ac_exeext < conftest.$ac_ext \ + && { echo hi | ./conftest$ac_exeext; test $? = 1; }; then + gl_cv_func_lseek_pipe=yes + else + gl_cv_func_lseek_pipe=no + fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #include - #include - #include + gl_cv_func_lseek_pipe=no +fi -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; -test_array [0] = 0 +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + else + cat >conftest.$ac_ext <<_ACEOF - ; - return 0; -} +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* mingw mistakenly returns 0 when trying to seek on pipes. */ + Choke me. +#endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -14243,60 +15255,61 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break + gl_cv_func_lseek_pipe=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + gl_cv_func_lseek_pipe=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= + fi fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_lseek_pipe" >&5 +echo "${ECHO_T}$gl_cv_func_lseek_pipe" >&6; } + if test $gl_cv_func_lseek_pipe = no; then -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi + M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext" -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF + REPLACE_LSEEK=1 + +cat >>confdefs.h <<\_ACEOF +#define LSEEK_PIPE_BROKEN 1 +_ACEOF + + + fi + + + + GNULIB_LSEEK=1 + + +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. */ - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #include - #include - #include - -#include -int -main () -{ -static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -14315,64 +15328,132 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_lo=`expr '(' $ac_mid ')' + 1` + ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) result=$ac_lo;; -'') result=unknown ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF +{ 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 - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #include - #include - #include + 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 bug-m4@gnu.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 -#include -static long int longval () { return sizeof ($gltype) * CHAR_BIT; } -static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } -#include -#include int main () { - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if ((sizeof ($gltype) * CHAR_BIT) < 0) - { - long int i = longval (); - if (i != (sizeof ($gltype) * CHAR_BIT)) - return 1; - fprintf (f, "%ld\n", i); - } - else - { - unsigned long int i = ulongval (); - if (i != (sizeof ($gltype) * CHAR_BIT)) - return 1; - fprintf (f, "%lu\n", i); - } - return ferror (f) || fclose (f) != 0; - +return ! malloc (0); ; return 0; } @@ -14397,35 +15478,5734 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - result=`cat conftest.val` + 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 ) -result=unknown +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 -rm -f conftest.val - eval gl_cv_bitsizeof_${gltype}=\$result + fi -ac_res=`eval echo '${'gl_cv_bitsizeof_${gltype}'}'` +{ 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 + + M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext" + +cat >>confdefs.h <<\_ACEOF +#define malloc rpl_malloc +_ACEOF + +fi + + + + + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_math_h='<'math.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_next_math_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test $ac_cv_header_math_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF + gl_cv_next_math_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/math.h#{ + s#.*"\(.*/math.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_math_h='<'math.h'>' + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_next_math_h" >&5 +echo "${ECHO_T}$gl_cv_next_math_h" >&6; } + fi + NEXT_MATH_H=$gl_cv_next_math_h + + + + + + + +for ac_func in mkdtemp +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; } - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - cat >>confdefs.h <<_ACEOF -#define BITSIZEOF_${GLTYPE} $result +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext" +fi +done + + if test $ac_cv_func_mkdtemp = no; then + HAVE_MKDTEMP=0 + : + + fi + + + + GNULIB_MKDTEMP=1 + + + + + + { echo "$as_me:$LINENO: checking for working mkstemp" >&5 +echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6; } +if test "${gl_cv_func_working_mkstemp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + mkdir conftest.mkstemp + if test "$cross_compiling" = yes; then + gl_cv_func_working_mkstemp=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 +int +main () +{ +int i; + off_t large = (off_t) 4294967295u; + if (large < 0) + large = 2147483647; + for (i = 0; i < 70; i++) + { + char templ[] = "conftest.mkstemp/coXXXXXX"; + int (*mkstemp_function) (char *) = mkstemp; + int fd = mkstemp_function (templ); + if (fd < 0 || lseek (fd, large, SEEK_SET) != large) + return 1; + close (fd); + } + 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 "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 + gl_cv_func_working_mkstemp=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 ) +gl_cv_func_working_mkstemp=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm -rf conftest.mkstemp + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_func_working_mkstemp" >&5 +echo "${ECHO_T}$gl_cv_func_working_mkstemp" >&6; } + + if test $gl_cv_func_working_mkstemp != yes; then + REPLACE_MKSTEMP=1 + M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext" + + + fi + + + + GNULIB_MKSTEMP=1 + + { echo "$as_me:$LINENO: checking for obstacks" >&5 +echo $ECHO_N "checking for obstacks... $ECHO_C" >&6; } +if test "${ac_cv_func_obstack+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 "obstack.h" +int +main () +{ +struct obstack mem; + #define obstack_chunk_alloc malloc + #define obstack_chunk_free free + obstack_init (&mem); + obstack_free (&mem, 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_obstack=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_obstack=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_obstack" >&5 +echo "${ECHO_T}$ac_cv_func_obstack" >&6; } +if test $ac_cv_func_obstack = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_OBSTACK 1 +_ACEOF + +else + M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext" +fi + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking whether frexp can be used without linking with libm" >&5 +echo $ECHO_N "checking whether frexp can be used without linking with libm... $ECHO_C" >&6; } +if test "${gl_cv_func_frexp_no_libm+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 + double x; + int y; +int +main () +{ +return frexp (x, &y) < 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 "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 + gl_cv_func_frexp_no_libm=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_frexp_no_libm=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: $gl_cv_func_frexp_no_libm" >&5 +echo "${ECHO_T}$gl_cv_func_frexp_no_libm" >&6; } + if test $gl_cv_func_frexp_no_libm = yes; then + + + { echo "$as_me:$LINENO: checking whether frexp works" >&5 +echo $ECHO_N "checking whether frexp works... $ECHO_C" >&6; } +if test "${gl_cv_func_frexp_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + case "$host_os" in + netbsd* | irix*) gl_cv_func_frexp_works="guessing no";; + *) gl_cv_func_frexp_works="guessing yes";; + esac + +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int main() +{ + int i; + volatile double x; + /* Test on denormalized numbers. */ + for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) + ; + if (x > 0.0) + { + int exp; + double y = frexp (x, &exp); + /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. + On NetBSD: y = 0.75. Correct: y = 0.5. */ + if (y != 0.5) + return 1; + } + /* Test on infinite numbers. */ + x = 1.0 / 0.0; + { + int exp; + double y = frexp (x, &exp); + if (y != x) + 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 + gl_cv_func_frexp_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 ) +gl_cv_func_frexp_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: $gl_cv_func_frexp_works" >&5 +echo "${ECHO_T}$gl_cv_func_frexp_works" >&6; } + + case "$gl_cv_func_frexp_works" in + *yes) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FREXP_IN_LIBC 1 +_ACEOF + + ;; + esac + fi + + { echo "$as_me:$LINENO: checking whether ldexp can be used without linking with libm" >&5 +echo $ECHO_N "checking whether ldexp can be used without linking with libm... $ECHO_C" >&6; } +if test "${gl_cv_func_ldexp_no_libm+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 + double x; + int y; +int +main () +{ +return ldexp (x, y) < 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 "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 + gl_cv_func_ldexp_no_libm=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_ldexp_no_libm=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: $gl_cv_func_ldexp_no_libm" >&5 +echo "${ECHO_T}$gl_cv_func_ldexp_no_libm" >&6; } + if test $gl_cv_func_ldexp_no_libm = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LDEXP_IN_LIBC 1 +_ACEOF + + fi + + + + { echo "$as_me:$LINENO: checking whether frexpl can be used without linking with libm" >&5 +echo $ECHO_N "checking whether frexpl can be used without linking with libm... $ECHO_C" >&6; } +if test "${gl_cv_func_frexpl_no_libm+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 + long double x; + int y; +int +main () +{ +return frexpl (x, &y) < 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 "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 + gl_cv_func_frexpl_no_libm=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_frexpl_no_libm=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: $gl_cv_func_frexpl_no_libm" >&5 +echo "${ECHO_T}$gl_cv_func_frexpl_no_libm" >&6; } + if test $gl_cv_func_frexpl_no_libm = yes; then + + + { echo "$as_me:$LINENO: checking whether frexpl works" >&5 +echo $ECHO_N "checking whether frexpl works... $ECHO_C" >&6; } +if test "${gl_cv_func_frexpl_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + case "$host_os" in + aix* | beos* | darwin* | irix* | mingw* | pw*) + gl_cv_func_frexpl_works="guessing no";; + *) gl_cv_func_frexpl_works="guessing yes";; + esac + +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +extern long double frexpl (long double, int *); +int main() +{ + volatile long double x; + /* Test on finite numbers that fails on AIX 5.1. */ + x = 16.0L; + { + int exp = -9999; + frexpl (x, &exp); + if (exp != 5) + return 1; + } + /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl + function returns an invalid (incorrectly normalized) value: it returns + y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } + but the correct result is + 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ + x = 1.01L; + { + int exp = -9999; + long double y = frexpl (x, &exp); + if (!(exp == 1 && y == 0.505L)) + return 1; + } + /* Test on large finite numbers. This fails on BeOS at i = 16322, while + LDBL_MAX_EXP = 16384. + In the loop end test, we test x against Infinity, rather than comparing + i with LDBL_MAX_EXP, because BeOS has a wrong LDBL_MAX_EXP. */ + { + int i; + for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) + { + int exp = -9999; + frexpl (x, &exp); + if (exp != i) + return 1; + } + } + /* Test on infinite numbers. */ + x = 1.0L / 0.0L; + { + int exp; + long double y = frexpl (x, &exp); + if (y != x) + 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 + gl_cv_func_frexpl_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 ) +gl_cv_func_frexpl_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: $gl_cv_func_frexpl_works" >&5 +echo "${ECHO_T}$gl_cv_func_frexpl_works" >&6; } + + case "$gl_cv_func_frexpl_works" in + *yes) gl_func_frexpl_no_libm=yes ;; + *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; + esac + else + gl_func_frexpl_no_libm=no + REPLACE_FREXPL=1 + fi + if test $gl_func_frexpl_no_libm = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FREXPL_IN_LIBC 1 +_ACEOF + + { echo "$as_me:$LINENO: checking whether frexpl is declared" >&5 +echo $ECHO_N "checking whether frexpl is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_frexpl+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 () +{ +#ifndef frexpl + (void) frexpl; +#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_have_decl_frexpl=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_frexpl=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_frexpl" >&5 +echo "${ECHO_T}$ac_cv_have_decl_frexpl" >&6; } +if test $ac_cv_have_decl_frexpl = yes; then + : +else + HAVE_DECL_FREXPL=0 +fi + + fi + + { echo "$as_me:$LINENO: checking whether ldexpl can be used without linking with libm" >&5 +echo $ECHO_N "checking whether ldexpl can be used without linking with libm... $ECHO_C" >&6; } +if test "${gl_cv_func_ldexpl_no_libm+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 + long double x; + int y; +int +main () +{ +return ldexpl (x, y) < 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 "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 + gl_cv_func_ldexpl_no_libm=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_ldexpl_no_libm=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: $gl_cv_func_ldexpl_no_libm" >&5 +echo "${ECHO_T}$gl_cv_func_ldexpl_no_libm" >&6; } + if test $gl_cv_func_ldexpl_no_libm = yes; then + + + { echo "$as_me:$LINENO: checking whether ldexpl works" >&5 +echo $ECHO_N "checking whether ldexpl works... $ECHO_C" >&6; } +if test "${gl_cv_func_ldexpl_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + case "$host_os" in + aix*) gl_cv_func_ldexpl_works="guessing no";; + *) gl_cv_func_ldexpl_works="guessing yes";; + esac + +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +extern long double ldexpl (long double, int); +int main() +{ + volatile long double x = 1.0; + volatile long double y = ldexpl (x, -1); + return (y != 0.5L); +} +_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 + gl_cv_func_ldexpl_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 ) +gl_cv_func_ldexpl_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: $gl_cv_func_ldexpl_works" >&5 +echo "${ECHO_T}$gl_cv_func_ldexpl_works" >&6; } + + case "$gl_cv_func_ldexpl_works" in + *yes) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LDEXPL_IN_LIBC 1 +_ACEOF + + { echo "$as_me:$LINENO: checking whether ldexpl is declared" >&5 +echo $ECHO_N "checking whether ldexpl is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_ldexpl+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 () +{ +#ifndef ldexpl + (void) ldexpl; +#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_have_decl_ldexpl=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_ldexpl=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_ldexpl" >&5 +echo "${ECHO_T}$ac_cv_have_decl_ldexpl" >&6; } +if test $ac_cv_have_decl_ldexpl = yes; then + : +else + HAVE_DECL_LDEXPL=0 +fi + + ;; + esac + fi + + + + M4_LIBOBJS="$M4_LIBOBJS quotearg.$ac_objext" + + + + + + + + { echo "$as_me:$LINENO: checking for mbstate_t" >&5 +echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; } +if test "${ac_cv_type_mbstate_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 +# include +int +main () +{ +mbstate_t x; return sizeof x; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$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_mbstate_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_mbstate_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5 +echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; } + if test $ac_cv_type_mbstate_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MBSTATE_T 1 +_ACEOF + + else + +cat >>confdefs.h <<\_ACEOF +#define mbstate_t int +_ACEOF + + fi + + { echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5 +echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6; } +if test "${gl_cv_func_mbrtowc+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 () +{ +wchar_t wc; + char const s[] = ""; + size_t n = 1; + mbstate_t state; + return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); + ; + 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 + gl_cv_func_mbrtowc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_mbrtowc=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: $gl_cv_func_mbrtowc" >&5 +echo "${ECHO_T}$gl_cv_func_mbrtowc" >&6; } + if test $gl_cv_func_mbrtowc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MBRTOWC 1 +_ACEOF + + fi + + + + + + + + + + + +# Check whether --with-included-regex was given. +if test "${with_included_regex+set}" = set; then + withval=$with_included_regex; +fi + + + case $with_included_regex in #( + yes|no) ac_use_included_regex=$with_included_regex + ;; + '') + # If the system regex support is good enough that it passes the + # following run test, then default to *not* using the included regex.c. + # If cross compiling, assume the test would fail and use the included + # regex.c. + { echo "$as_me:$LINENO: checking for working re_compile_pattern" >&5 +echo $ECHO_N "checking for working re_compile_pattern... $ECHO_C" >&6; } +if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + gl_cv_func_re_compile_pattern_working=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 + #if HAVE_LOCALE_H + #include + #endif + #include + #include + +int +main () +{ +static struct re_pattern_buffer regex; + unsigned char folded_chars[UCHAR_MAX + 1]; + int i; + const char *s; + struct re_registers regs; + + #if HAVE_LOCALE_H + /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html + This test needs valgrind to catch the bug on Debian + GNU/Linux 3.1 x86, but it might catch the bug better + on other platforms and it shouldn't hurt to try the + test here. */ + if (setlocale (LC_ALL, "en_US.UTF-8")) + { + static char const pat[] = "insert into"; + static char const data[] = + "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE + | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern (pat, sizeof pat - 1, ®ex); + if (s) + return 1; + if (re_search (®ex, data, sizeof data - 1, + 0, sizeof data - 1, ®s) + != -1) + return 1; + if (! setlocale (LC_ALL, "C")) + return 1; + } + #endif + + /* This test is from glibc bug 3957, reported by Andrew Mackey. */ + re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("a[^x]b", 6, ®ex); + if (s) + return 1; + + /* This should fail, but succeeds for glibc-2.5. */ + if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) + return 1; + + /* This regular expression is from Spencer ere test number 75 + in grep-2.3. */ + re_set_syntax (RE_SYNTAX_POSIX_EGREP); + memset (®ex, 0, sizeof regex); + for (i = 0; i <= UCHAR_MAX; i++) + folded_chars[i] = i; + regex.translate = folded_chars; + s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); + /* This should fail with _Invalid character class name_ error. */ + if (!s) + return 1; + + /* This should succeed, but does not for glibc-2.1.3. */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("{1", 2, ®ex); + + if (s) + return 1; + + /* The following example is derived from a problem report + against gawk from Jorge Stolfi . */ + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[an\371]*n", 7, ®ex); + if (s) + return 1; + + /* This should match, but does not for glibc-2.2.1. */ + if (re_match (®ex, "an", 2, 0, ®s) != 2) + return 1; + + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + return 1; + + /* glibc-2.2.93 does not work with a negative RANGE argument. */ + if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) + return 1; + + /* The version of regex.c in older versions of gnulib + ignored RE_ICASE. Detect that problem too. */ + re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("x", 1, ®ex); + if (s) + return 1; + + if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) + return 1; + + /* Catch a bug reported by Vin Shelton in + http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html + */ + re_set_syntax (RE_SYNTAX_POSIX_BASIC + & ~RE_CONTEXT_INVALID_DUP + & ~RE_NO_EMPTY_RANGES); + memset (®ex, 0, sizeof regex); + s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); + if (s) + return 1; + + /* REG_STARTEND was added to glibc on 2004-01-15. + Reject older versions. */ + if (! REG_STARTEND) + return 1; + + /* Reject hosts whose regoff_t values are too narrow. + These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t + and 32-bit int. */ + if (sizeof (regoff_t) < sizeof (ptrdiff_t) + || sizeof (regoff_t) < sizeof (ssize_t)) + return 1; + + 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 "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 + gl_cv_func_re_compile_pattern_working=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 ) +gl_cv_func_re_compile_pattern_working=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: $gl_cv_func_re_compile_pattern_working" >&5 +echo "${ECHO_T}$gl_cv_func_re_compile_pattern_working" >&6; } + case $gl_cv_func_re_compile_pattern_working in #( + yes) ac_use_included_regex=no;; #( + no) ac_use_included_regex=yes;; + esac + ;; + *) { { echo "$as_me:$LINENO: error: Invalid value for --with-included-regex: $with_included_regex" >&5 +echo "$as_me: error: Invalid value for --with-included-regex: $with_included_regex" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if test $ac_use_included_regex = yes; then + +cat >>confdefs.h <<\_ACEOF +#define _REGEX_LARGE_OFFSETS 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_syntax_options rpl_re_syntax_options +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_set_syntax rpl_re_set_syntax +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_compile_pattern rpl_re_compile_pattern +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_compile_fastmap rpl_re_compile_fastmap +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_search rpl_re_search +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_search_2 rpl_re_search_2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_match rpl_re_match +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_match_2 rpl_re_match_2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_set_registers rpl_re_set_registers +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_comp rpl_re_comp +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define re_exec rpl_re_exec +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regcomp rpl_regcomp +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regexec rpl_regexec +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regerror rpl_regerror +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define regfree rpl_regfree +_ACEOF + + M4_LIBOBJS="$M4_LIBOBJS regex.$ac_objext" + + + + + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking whether isblank is declared" >&5 +echo $ECHO_N "checking whether isblank is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_isblank+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 () +{ +#ifndef isblank + (void) isblank; +#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_have_decl_isblank=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_isblank=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isblank" >&5 +echo "${ECHO_T}$ac_cv_have_decl_isblank" >&6; } +if test $ac_cv_have_decl_isblank = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISBLANK 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISBLANK 0 +_ACEOF + + +fi + + + + fi + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_signal_h='<'signal.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_next_signal_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test $ac_cv_header_signal_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF + gl_cv_next_signal_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/signal.h#{ + s#.*"\(.*/signal.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_signal_h='<'signal.h'>' + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_next_signal_h" >&5 +echo "${ECHO_T}$gl_cv_next_signal_h" >&6; } + fi + NEXT_SIGNAL_H=$gl_cv_next_signal_h + + + + + + + { echo "$as_me:$LINENO: checking for signbit macro" >&5 +echo $ECHO_N "checking for signbit macro... $ECHO_C" >&6; } +if test "${gl_cv_func_signbit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + gl_cv_func_signbit="guessing no" +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 +float p0f = 0.0f; +float m0f = -0.0f; +double p0d = 0.0; +double m0d = -0.0; +long double p0l = 0.0L; +long double m0l = -0.0L; +int main () +{ + { + float plus_inf = 1.0f / p0f; + float minus_inf = -1.0f / p0f; + if (!(!signbit (255.0f) + && signbit (-255.0f) + && !signbit (p0f) + && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f)) + && !signbit (plus_inf) + && signbit (minus_inf))) + return 1; + } + { + double plus_inf = 1.0 / p0d; + double minus_inf = -1.0 / p0d; + if (!(!signbit (255.0) + && signbit (-255.0) + && !signbit (p0d) + && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d)) + && !signbit (plus_inf) + && signbit (minus_inf))) + return 1; + } + { + long double plus_inf = 1.0L / p0l; + long double minus_inf = -1.0L / p0l; + if (!(!signbit (255.0L) + && signbit (-255.0L) + && !signbit (p0l) + && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l)) + && !signbit (plus_inf) + && signbit (minus_inf))) + 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 + gl_cv_func_signbit=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 ) +gl_cv_func_signbit=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: $gl_cv_func_signbit" >&5 +echo "${ECHO_T}$gl_cv_func_signbit" >&6; } + if test "$gl_cv_func_signbit" != yes; then + REPLACE_SIGNBIT=1 + M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext" + M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext" + M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext" + + + { echo "$as_me:$LINENO: checking where to find the sign bit in a 'float'" >&5 +echo $ECHO_N "checking where to find the sign bit in a 'float'... $ECHO_C" >&6; } +if test "${gl_cv_cc_float_signbit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + + gl_cv_cc_float_signbit="unknown" + +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 +#define NWORDS \ + ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { float value; unsigned int word[NWORDS]; } + memory_float; +static memory_float plus = { 1.0f }; +static memory_float minus = { -1.0f }; +int main () +{ + size_t j, k, i; + unsigned int m; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + /* Find the different bit. */ + k = 0; m = 0; + for (j = 0; j < NWORDS; j++) + { + unsigned int x = plus.word[j] ^ minus.word[j]; + if ((x & (x - 1)) || (x && m)) + { + /* More than one bit difference. */ + fprintf (fp, "unknown"); + return 1; + } + if (x) + { + k = j; + m = x; + } + } + if (m == 0) + { + /* No difference. */ + fprintf (fp, "unknown"); + return 1; + } + /* Now m = plus.word[k] ^ ~minus.word[k]. */ + if (plus.word[k] & ~minus.word[k]) + { + /* Oh? The sign bit is set in the positive and cleared in the negative + numbers? */ + fprintf (fp, "unknown"); + return 1; + } + for (i = 0; ; i++) + if ((m >> i) & 1) + break; + fprintf (fp, "word %d bit %d", (int) k, (int) i); + return (fclose (fp) != 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 + gl_cv_cc_float_signbit=`cat conftest.out` +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 ) +gl_cv_cc_float_signbit="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm -f conftest.out + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_cc_float_signbit" >&5 +echo "${ECHO_T}$gl_cv_cc_float_signbit" >&6; } + case "$gl_cv_cc_float_signbit" in + word*bit*) + word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'` + +cat >>confdefs.h <<_ACEOF +#define FLT_SIGNBIT_WORD $word +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define FLT_SIGNBIT_BIT $bit +_ACEOF + + ;; + esac + + + + + { echo "$as_me:$LINENO: checking where to find the sign bit in a 'double'" >&5 +echo $ECHO_N "checking where to find the sign bit in a 'double'... $ECHO_C" >&6; } +if test "${gl_cv_cc_double_signbit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + + gl_cv_cc_double_signbit="unknown" + +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 +#define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { double value; unsigned int word[NWORDS]; } + memory_float; +static memory_float plus = { 1.0 }; +static memory_float minus = { -1.0 }; +int main () +{ + size_t j, k, i; + unsigned int m; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + /* Find the different bit. */ + k = 0; m = 0; + for (j = 0; j < NWORDS; j++) + { + unsigned int x = plus.word[j] ^ minus.word[j]; + if ((x & (x - 1)) || (x && m)) + { + /* More than one bit difference. */ + fprintf (fp, "unknown"); + return 1; + } + if (x) + { + k = j; + m = x; + } + } + if (m == 0) + { + /* No difference. */ + fprintf (fp, "unknown"); + return 1; + } + /* Now m = plus.word[k] ^ ~minus.word[k]. */ + if (plus.word[k] & ~minus.word[k]) + { + /* Oh? The sign bit is set in the positive and cleared in the negative + numbers? */ + fprintf (fp, "unknown"); + return 1; + } + for (i = 0; ; i++) + if ((m >> i) & 1) + break; + fprintf (fp, "word %d bit %d", (int) k, (int) i); + return (fclose (fp) != 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 + gl_cv_cc_double_signbit=`cat conftest.out` +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 ) +gl_cv_cc_double_signbit="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm -f conftest.out + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_cc_double_signbit" >&5 +echo "${ECHO_T}$gl_cv_cc_double_signbit" >&6; } + case "$gl_cv_cc_double_signbit" in + word*bit*) + word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'` + +cat >>confdefs.h <<_ACEOF +#define DBL_SIGNBIT_WORD $word +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define DBL_SIGNBIT_BIT $bit +_ACEOF + + ;; + esac + + + + + { echo "$as_me:$LINENO: checking where to find the sign bit in a 'long double'" >&5 +echo $ECHO_N "checking where to find the sign bit in a 'long double'... $ECHO_C" >&6; } +if test "${gl_cv_cc_long_double_signbit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + + gl_cv_cc_long_double_signbit="unknown" + +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 +#define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +typedef union { long double value; unsigned int word[NWORDS]; } + memory_float; +static memory_float plus = { 1.0L }; +static memory_float minus = { -1.0L }; +int main () +{ + size_t j, k, i; + unsigned int m; + FILE *fp = fopen ("conftest.out", "w"); + if (fp == NULL) + return 1; + /* Find the different bit. */ + k = 0; m = 0; + for (j = 0; j < NWORDS; j++) + { + unsigned int x = plus.word[j] ^ minus.word[j]; + if ((x & (x - 1)) || (x && m)) + { + /* More than one bit difference. */ + fprintf (fp, "unknown"); + return 1; + } + if (x) + { + k = j; + m = x; + } + } + if (m == 0) + { + /* No difference. */ + fprintf (fp, "unknown"); + return 1; + } + /* Now m = plus.word[k] ^ ~minus.word[k]. */ + if (plus.word[k] & ~minus.word[k]) + { + /* Oh? The sign bit is set in the positive and cleared in the negative + numbers? */ + fprintf (fp, "unknown"); + return 1; + } + for (i = 0; ; i++) + if ((m >> i) & 1) + break; + fprintf (fp, "word %d bit %d", (int) k, (int) i); + return (fclose (fp) != 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 + gl_cv_cc_long_double_signbit=`cat conftest.out` +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 ) +gl_cv_cc_long_double_signbit="unknown" +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + rm -f conftest.out + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_cc_long_double_signbit" >&5 +echo "${ECHO_T}$gl_cv_cc_long_double_signbit" >&6; } + case "$gl_cv_cc_long_double_signbit" in + word*bit*) + word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'` + bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'` + +cat >>confdefs.h <<_ACEOF +#define LDBL_SIGNBIT_WORD $word +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define LDBL_SIGNBIT_BIT $bit +_ACEOF + + ;; + esac + + + if test "$gl_cv_cc_float_signbit" = unknown; then + { echo "$as_me:$LINENO: checking whether copysignf is declared" >&5 +echo $ECHO_N "checking whether copysignf is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_copysignf+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 () +{ +#ifndef copysignf + (void) copysignf; +#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_have_decl_copysignf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_copysignf=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_copysignf" >&5 +echo "${ECHO_T}$ac_cv_have_decl_copysignf" >&6; } +if test $ac_cv_have_decl_copysignf = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_COPYSIGNF 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_COPYSIGNF 0 +_ACEOF + + +fi + + + if test "$ac_cv_have_decl_copysignf" = yes; then + { echo "$as_me:$LINENO: checking whether copysignf can be used without linking with libm" >&5 +echo $ECHO_N "checking whether copysignf can be used without linking with libm... $ECHO_C" >&6; } +if test "${gl_cv_func_copysignf_no_libm+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 + float x, y; +int +main () +{ +return copysignf (x, y) < 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 + gl_cv_func_copysignf_no_libm=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_copysignf_no_libm=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: $gl_cv_func_copysignf_no_libm" >&5 +echo "${ECHO_T}$gl_cv_func_copysignf_no_libm" >&6; } + if test $gl_cv_func_copysignf_no_libm = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_COPYSIGNF_IN_LIBC 1 +_ACEOF + + fi + fi + fi + if test "$gl_cv_cc_double_signbit" = unknown; then + { echo "$as_me:$LINENO: checking whether copysign is declared" >&5 +echo $ECHO_N "checking whether copysign is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_copysign+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 () +{ +#ifndef copysign + (void) copysign; +#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_have_decl_copysign=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_copysign=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_copysign" >&5 +echo "${ECHO_T}$ac_cv_have_decl_copysign" >&6; } +if test $ac_cv_have_decl_copysign = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_COPYSIGN 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_COPYSIGN 0 +_ACEOF + + +fi + + + if test "$ac_cv_have_decl_copysign" = yes; then + { echo "$as_me:$LINENO: checking whether copysign can be used without linking with libm" >&5 +echo $ECHO_N "checking whether copysign can be used without linking with libm... $ECHO_C" >&6; } +if test "${gl_cv_func_copysign_no_libm+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 + double x, y; +int +main () +{ +return copysign (x, y) < 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 + gl_cv_func_copysign_no_libm=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_copysign_no_libm=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: $gl_cv_func_copysign_no_libm" >&5 +echo "${ECHO_T}$gl_cv_func_copysign_no_libm" >&6; } + if test $gl_cv_func_copysign_no_libm = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_COPYSIGN_IN_LIBC 1 +_ACEOF + + fi + fi + fi + if test "$gl_cv_cc_long_double_signbit" = unknown; then + { echo "$as_me:$LINENO: checking whether copysignl is declared" >&5 +echo $ECHO_N "checking whether copysignl is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_copysignl+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 () +{ +#ifndef copysignl + (void) copysignl; +#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_have_decl_copysignl=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_copysignl=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_copysignl" >&5 +echo "${ECHO_T}$ac_cv_have_decl_copysignl" >&6; } +if test $ac_cv_have_decl_copysignl = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_COPYSIGNL 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_COPYSIGNL 0 +_ACEOF + + +fi + + + if test "$ac_cv_have_decl_copysignl" = yes; then + { echo "$as_me:$LINENO: checking whether copysignl can be used without linking with libm" >&5 +echo $ECHO_N "checking whether copysignl can be used without linking with libm... $ECHO_C" >&6; } +if test "${gl_cv_func_copysignl_no_libm+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 + long double x, y; +int +main () +{ +return copysignl (x, y) < 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 + gl_cv_func_copysignl_no_libm=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_copysignl_no_libm=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: $gl_cv_func_copysignl_no_libm" >&5 +echo "${ECHO_T}$gl_cv_func_copysignl_no_libm" >&6; } + if test $gl_cv_func_copysignl_no_libm = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_COPYSIGNL_IN_LIBC 1 +_ACEOF + + fi + fi + fi + fi + + + + GNULIB_SIGNBIT=1 + + + + + + + signals_not_posix= + 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 "sigset_t" >/dev/null 2>&1; then + : +else + signals_not_posix=1 +fi +rm -f conftest* + + if test -z "$signals_not_posix"; then + { echo "$as_me:$LINENO: checking for sigprocmask" >&5 +echo $ECHO_N "checking for sigprocmask... $ECHO_C" >&6; } +if test "${ac_cv_func_sigprocmask+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 sigprocmask to an innocuous variant, in case declares sigprocmask. + For example, HP-UX 11i declares gettimeofday. */ +#define sigprocmask innocuous_sigprocmask + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char sigprocmask (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef sigprocmask + +/* 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 sigprocmask (); +/* 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_sigprocmask || defined __stub___sigprocmask +choke me +#endif + +int +main () +{ +return sigprocmask (); + ; + 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_sigprocmask=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_sigprocmask=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_sigprocmask" >&5 +echo "${ECHO_T}$ac_cv_func_sigprocmask" >&6; } +if test $ac_cv_func_sigprocmask = yes; then + gl_cv_func_sigprocmask=1 +fi + + fi + if test -z "$gl_cv_func_sigprocmask"; then + HAVE_POSIX_SIGNALBLOCKING=0 + M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext" + + + { echo "$as_me:$LINENO: checking for sigset_t" >&5 +echo $ECHO_N "checking for sigset_t... $ECHO_C" >&6; } +if test "${ac_cv_type_sigset_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. */ +#include +/* Mingw defines sigset_t not in , but in . */ +#include + +typedef sigset_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_sigset_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_sigset_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_sigset_t" >&5 +echo "${ECHO_T}$ac_cv_type_sigset_t" >&6; } +if test $ac_cv_type_sigset_t = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGSET_T 1 +_ACEOF + +gl_cv_type_sigset_t=yes +else + gl_cv_type_sigset_t=no +fi + + if test $gl_cv_type_sigset_t != yes; then + HAVE_SIGSET_T=0 + fi + + + + + + + + + fi + + + + GNULIB_SIGPROCMASK=1 + + + +for ac_header in stdint.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 bug-m4@gnu.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 SIZE_MAX" >&5 +echo $ECHO_N "checking for SIZE_MAX... $ECHO_C" >&6; } + if test "${gl_cv_size_max+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + gl_cv_size_max= + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#if HAVE_STDINT_H +#include +#endif +#ifdef SIZE_MAX +Found it +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Found it" >/dev/null 2>&1; then + gl_cv_size_max=yes +fi +rm -f conftest* + + if test -z "$gl_cv_size_max"; then + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) size_t_bits_minus_1=$ac_lo;; +'') size_t_bits_minus_1= ;; +esac +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 +static long int longval () { return sizeof (size_t) * CHAR_BIT - 1; } +static unsigned long int ulongval () { return sizeof (size_t) * CHAR_BIT - 1; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if ((sizeof (size_t) * CHAR_BIT - 1) < 0) + { + long int i = longval (); + if (i != (sizeof (size_t) * CHAR_BIT - 1)) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != (sizeof (size_t) * CHAR_BIT - 1)) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + size_t_bits_minus_1=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +size_t_bits_minus_1= +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) fits_in_uint=$ac_lo;; +'') fits_in_uint= ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +static long int longval () { return sizeof (size_t) <= sizeof (unsigned int); } +static unsigned long int ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if ((sizeof (size_t) <= sizeof (unsigned int)) < 0) + { + long int i = longval (); + if (i != (sizeof (size_t) <= sizeof (unsigned int))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != (sizeof (size_t) <= sizeof (unsigned int))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + fits_in_uint=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +fits_in_uint= +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val + if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then + if test $fits_in_uint = 1; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + extern size_t foo; + extern unsigned long foo; + +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 + fits_in_uint=0 +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 + if test $fits_in_uint = 1; then + gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" + else + gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" + fi + else + gl_cv_size_max='((size_t)~(size_t)0)' + fi + fi + +fi + + { echo "$as_me:$LINENO: result: $gl_cv_size_max" >&5 +echo "${ECHO_T}$gl_cv_size_max" >&6; } + if test "$gl_cv_size_max" != yes; then + +cat >>confdefs.h <<_ACEOF +#define SIZE_MAX $gl_cv_size_max +_ACEOF + + fi + + + { echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } +if test "${gt_cv_ssize_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. */ +#include +int +main () +{ +int x = sizeof (ssize_t *) + sizeof (ssize_t); + return !x; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gt_cv_ssize_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_ssize_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5 +echo "${ECHO_T}$gt_cv_ssize_t" >&6; } + if test $gt_cv_ssize_t = no; then + +cat >>confdefs.h <<\_ACEOF +#define ssize_t int +_ACEOF + + fi + + + { echo "$as_me:$LINENO: checking for va_copy" >&5 +echo $ECHO_N "checking for va_copy... $ECHO_C" >&6; } + if test "${gl_cv_func_va_copy+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 () +{ + +#ifndef va_copy +void (*func) (va_list, va_list) = va_copy; +#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 + gl_cv_func_va_copy=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func_va_copy=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + { echo "$as_me:$LINENO: result: $gl_cv_func_va_copy" >&5 +echo "${ECHO_T}$gl_cv_func_va_copy" >&6; } + if test $gl_cv_func_va_copy = no; then + # Provide a substitute, either __va_copy or as a simple assignment. + if test "${gl_cv_func___va_copy+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 () +{ + +#ifndef __va_copy +error, bail out +#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 + gl_cv_func___va_copy=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_func___va_copy=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test $gl_cv_func___va_copy = yes; then + +cat >>confdefs.h <<\_ACEOF +#define va_copy __va_copy +_ACEOF + + else + + + +cat >>confdefs.h <<\_ACEOF +#define va_copy gl_va_copy +_ACEOF + + fi + fi + + + + + # Define two additional variables used in the Makefile substitution. + + if test "$ac_cv_header_stdbool_h" = yes; then + STDBOOL_H='' + else + STDBOOL_H='stdbool.h' + fi + + + if test "$ac_cv_type__Bool" = yes; then + HAVE__BOOL=1 + else + HAVE__BOOL=0 + fi + + + + + + if test $ac_cv_type_long_long_int = yes; then + HAVE_LONG_LONG_INT=1 + else + HAVE_LONG_LONG_INT=0 + fi + + + if test $ac_cv_type_unsigned_long_long_int = yes; then + HAVE_UNSIGNED_LONG_LONG_INT=1 + else + HAVE_UNSIGNED_LONG_LONG_INT=0 + fi + + + if test $ac_cv_header_inttypes_h = yes; then + HAVE_INTTYPES_H=1 + else + HAVE_INTTYPES_H=0 + fi + + + if test $ac_cv_header_sys_types_h = yes; then + HAVE_SYS_TYPES_H=1 + else + HAVE_SYS_TYPES_H=0 + fi + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdint_h='<'stdint.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_next_stdint_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test $ac_cv_header_stdint_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF + gl_cv_next_stdint_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stdint.h#{ + s#.*"\(.*/stdint.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_stdint_h='<'stdint.h'>' + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5 +echo "${ECHO_T}$gl_cv_next_stdint_h" >&6; } + fi + NEXT_STDINT_H=$gl_cv_next_stdint_h + + + + if test $ac_cv_header_stdint_h = yes; then + HAVE_STDINT_H=1 + else + HAVE_STDINT_H=0 + fi + + + if test $ac_cv_header_stdint_h = yes; then + { echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 +echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6; } +if test "${gl_cv_header_working_stdint_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gl_cv_header_working_stdint_h=no + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + +#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ +#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include +#ifdef INT8_MAX +int8_t a1 = INT8_MAX; +int8_t a1min = INT8_MIN; +#endif +#ifdef INT16_MAX +int16_t a2 = INT16_MAX; +int16_t a2min = INT16_MIN; +#endif +#ifdef INT32_MAX +int32_t a3 = INT32_MAX; +int32_t a3min = INT32_MIN; +#endif +#ifdef INT64_MAX +int64_t a4 = INT64_MAX; +int64_t a4min = INT64_MIN; +#endif +#ifdef UINT8_MAX +uint8_t b1 = UINT8_MAX; +#else +typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; +#endif +#ifdef UINT16_MAX +uint16_t b2 = UINT16_MAX; +#endif +#ifdef UINT32_MAX +uint32_t b3 = UINT32_MAX; +#endif +#ifdef UINT64_MAX +uint64_t b4 = UINT64_MAX; +#endif +int_least8_t c1 = INT8_C (0x7f); +int_least8_t c1max = INT_LEAST8_MAX; +int_least8_t c1min = INT_LEAST8_MIN; +int_least16_t c2 = INT16_C (0x7fff); +int_least16_t c2max = INT_LEAST16_MAX; +int_least16_t c2min = INT_LEAST16_MIN; +int_least32_t c3 = INT32_C (0x7fffffff); +int_least32_t c3max = INT_LEAST32_MAX; +int_least32_t c3min = INT_LEAST32_MIN; +int_least64_t c4 = INT64_C (0x7fffffffffffffff); +int_least64_t c4max = INT_LEAST64_MAX; +int_least64_t c4min = INT_LEAST64_MIN; +uint_least8_t d1 = UINT8_C (0xff); +uint_least8_t d1max = UINT_LEAST8_MAX; +uint_least16_t d2 = UINT16_C (0xffff); +uint_least16_t d2max = UINT_LEAST16_MAX; +uint_least32_t d3 = UINT32_C (0xffffffff); +uint_least32_t d3max = UINT_LEAST32_MAX; +uint_least64_t d4 = UINT64_C (0xffffffffffffffff); +uint_least64_t d4max = UINT_LEAST64_MAX; +int_fast8_t e1 = INT_FAST8_MAX; +int_fast8_t e1min = INT_FAST8_MIN; +int_fast16_t e2 = INT_FAST16_MAX; +int_fast16_t e2min = INT_FAST16_MIN; +int_fast32_t e3 = INT_FAST32_MAX; +int_fast32_t e3min = INT_FAST32_MIN; +int_fast64_t e4 = INT_FAST64_MAX; +int_fast64_t e4min = INT_FAST64_MIN; +uint_fast8_t f1 = UINT_FAST8_MAX; +uint_fast16_t f2 = UINT_FAST16_MAX; +uint_fast32_t f3 = UINT_FAST32_MAX; +uint_fast64_t f4 = UINT_FAST64_MAX; +#ifdef INTPTR_MAX +intptr_t g = INTPTR_MAX; +intptr_t gmin = INTPTR_MIN; +#endif +#ifdef UINTPTR_MAX +uintptr_t h = UINTPTR_MAX; +#endif +intmax_t i = INTMAX_MAX; +uintmax_t j = UINTMAX_MAX; + +#include /* for CHAR_BIT */ +#define TYPE_MINIMUM(t) \ + ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))) +#define TYPE_MAXIMUM(t) \ + ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))) +struct s { + int check_PTRDIFF: + PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) + && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) + ? 1 : -1; + /* Detect bug in FreeBSD 6.0 / ia64. */ + int check_SIG_ATOMIC: + SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) + && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) + ? 1 : -1; + int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; + int check_WCHAR: + WCHAR_MIN == TYPE_MINIMUM (wchar_t) + && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) + ? 1 : -1; + /* Detect bug in mingw. */ + int check_WINT: + WINT_MIN == TYPE_MINIMUM (wint_t) + && WINT_MAX == TYPE_MAXIMUM (wint_t) + ? 1 : -1; + + /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ + int check_UINT8_C: + (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; + int check_UINT16_C: + (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; + + /* Detect bugs in OpenBSD 3.9 stdint.h. */ +#ifdef UINT8_MAX + int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; +#endif +#ifdef UINT16_MAX + int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; +#endif +#ifdef UINT32_MAX + int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; +#endif +#ifdef UINT64_MAX + int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; +#endif + int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; + int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; + int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; + int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; + int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; + int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; + int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; + int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; + int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; + int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; + int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; +}; + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_header_working_stdint_h=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 +{ echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 +echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6; } + fi + if test "$gl_cv_header_working_stdint_h" = yes; then + STDINT_H= + else + + +for ac_header in sys/inttypes.h sys/bitypes.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 bug-m4@gnu.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 + + if test $ac_cv_header_sys_inttypes_h = yes; then + HAVE_SYS_INTTYPES_H=1 + else + HAVE_SYS_INTTYPES_H=0 + fi + + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + else + HAVE_SYS_BITYPES_H=0 + fi + + + + + + + + + + + + + + + + + + for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do + { echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 +echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6; } +if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include +int +main () +{ +static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) result=$ac_lo;; +'') result=unknown ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + +#include +static long int longval () { return sizeof ($gltype) * CHAR_BIT; } +static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if ((sizeof ($gltype) * CHAR_BIT) < 0) + { + long int i = longval (); + if (i != (sizeof ($gltype) * CHAR_BIT)) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != (sizeof ($gltype) * CHAR_BIT)) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + result=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +result=unknown +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val + eval gl_cv_bitsizeof_${gltype}=\$result + +fi +ac_res=`eval echo '${'gl_cv_bitsizeof_${gltype}'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + eval result=\$gl_cv_bitsizeof_${gltype} + if test $result = unknown; then + result=0 + fi + GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + cat >>confdefs.h <<_ACEOF +#define BITSIZEOF_${GLTYPE} $result +_ACEOF + + eval BITSIZEOF_${GLTYPE}=\$result + done + + + + + + + + for gltype in sig_atomic_t wchar_t wint_t ; do + { echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 +echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6; } +if { as_var=gl_cv_type_${gltype}_signed; 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. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + result=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + result=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval gl_cv_type_${gltype}_signed=\$result + +fi +ac_res=`eval echo '${'gl_cv_type_${gltype}_signed'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + eval result=\$gl_cv_type_${gltype}_signed + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + if test "$result" = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGNED_${GLTYPE} 1 +_ACEOF + + eval HAVE_SIGNED_${GLTYPE}=1 + else + eval HAVE_SIGNED_${GLTYPE}=0 + fi + done + + + gl_cv_type_ptrdiff_t_signed=yes + gl_cv_type_size_t_signed=no + + + + + + + + for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do + { echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 +echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6; } +if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval gl_cv_type_${gltype}_suffix=no + eval result=\$gl_cv_type_${gltype}_signed + if test "$result" = yes; then + glsufu= + else + glsufu=u + fi + for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do + case $glsuf in + '') gltype1='int';; + l) gltype1='long int';; + ll) gltype1='long long int';; + i64) gltype1='__int64';; + u) gltype1='unsigned int';; + ul) gltype1='unsigned long int';; + ull) gltype1='unsigned long long int';; + ui64)gltype1='unsigned __int64';; + esac + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include + #include + #if HAVE_WCHAR_H + # include + # include + # include + #endif + + extern $gltype foo; + extern $gltype1 foo; +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 + eval gl_cv_type_${gltype}_suffix=\$glsuf +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 + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" != no && break + done +fi +ac_res=`eval echo '${'gl_cv_type_${gltype}_suffix'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` + eval result=\$gl_cv_type_${gltype}_suffix + test "$result" = no && result= + eval ${GLTYPE}_SUFFIX=\$result + cat >>confdefs.h <<_ACEOF +#define ${GLTYPE}_SUFFIX $result +_ACEOF + + done + + + + STDINT_H=stdint.h + fi + + + + { echo "$as_me:$LINENO: checking for wchar_t" >&5 +echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; } +if test "${gt_cv_c_wchar_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. */ +#include + wchar_t foo = (wchar_t)'\0'; +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 + gt_cv_c_wchar_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_c_wchar_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5 +echo "${ECHO_T}$gt_cv_c_wchar_t" >&6; } + if test $gt_cv_c_wchar_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WCHAR_T 1 +_ACEOF + + fi + + + { echo "$as_me:$LINENO: checking for wint_t" >&5 +echo $ECHO_N "checking for wint_t... $ECHO_C" >&6; } +if test "${gt_cv_c_wint_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. */ + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include + wint_t foo = (wchar_t)'\0'; +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 + gt_cv_c_wint_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_c_wint_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5 +echo "${ECHO_T}$gt_cv_c_wint_t" >&6; } + if test $gt_cv_c_wint_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WINT_T 1 +_ACEOF + + fi + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdio_h='<'stdio.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_next_stdio_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test $ac_cv_header_stdio_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF + gl_cv_next_stdio_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stdio.h#{ + s#.*"\(.*/stdio.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_stdio_h='<'stdio.h'>' + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_next_stdio_h" >&5 +echo "${ECHO_T}$gl_cv_next_stdio_h" >&6; } + fi + NEXT_STDIO_H=$gl_cv_next_stdio_h + + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdlib_h='<'stdlib.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_next_stdlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test $ac_cv_header_stdlib_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF + gl_cv_next_stdlib_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/stdlib.h#{ + s#.*"\(.*/stdlib.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_stdlib_h='<'stdlib.h'>' + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_next_stdlib_h" >&5 +echo "${ECHO_T}$gl_cv_next_stdlib_h" >&6; } + fi + NEXT_STDLIB_H=$gl_cv_next_stdlib_h + + + + + + M4_LIBOBJS="$M4_LIBOBJS mkstemp-safer.$ac_objext" + + + +for ac_func in strtol +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 + +else + M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext" +fi +done + + + + + + + + + + if test $ac_cv_func_lstat = yes; then + HAVE_LSTAT=1 + else + HAVE_LSTAT=0 + fi + + + { echo "$as_me:$LINENO: checking whether mkdir is declared" >&5 +echo $ECHO_N "checking whether mkdir is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_mkdir+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 () +{ +#ifndef mkdir + (void) mkdir; +#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_have_decl_mkdir=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_mkdir=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_mkdir" >&5 +echo "${ECHO_T}$ac_cv_have_decl_mkdir" >&6; } +if test $ac_cv_have_decl_mkdir = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MKDIR 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_MKDIR 0 +_ACEOF + + +for ac_header in io.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 bug-m4@gnu.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 + +fi + + + if test $ac_cv_have_decl_mkdir = yes; then + HAVE_DECL_MKDIR=1 + else + HAVE_DECL_MKDIR=0 + fi + + if test "$ac_cv_header_io_h" = yes; then + HAVE_IO_H=1 + else + HAVE_IO_H=0 + fi + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_stat_h='<'sys/stat.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_next_sys_stat_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test $ac_cv_header_sys_stat_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF + gl_cv_next_sys_stat_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/sys/stat.h#{ + s#.*"\(.*/sys/stat.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_sys_stat_h='<'sys/stat.h'>' + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_next_sys_stat_h" >&5 +echo "${ECHO_T}$gl_cv_next_sys_stat_h" >&6; } + fi + NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h + + + + SYS_STAT_H='sys/stat.h' + + + { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + + + + + { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + + + + + M4_LIBOBJS="$M4_LIBOBJS tempname.$ac_objext" + + : + + + + +for ac_func in __secure_getenv +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 $gl_cv_have_include_next = yes; then + gl_cv_next_unistd_h='<'unistd.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_next_unistd_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test $ac_cv_header_unistd_h = yes; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF + gl_cv_next_unistd_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/unistd.h#{ + s#.*"\(.*/unistd.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_unistd_h='<'unistd.h'>' + fi + +fi +{ echo "$as_me:$LINENO: result: $gl_cv_next_unistd_h" >&5 +echo "${ECHO_T}$gl_cv_next_unistd_h" >&6; } + fi + NEXT_UNISTD_H=$gl_cv_next_unistd_h + + + + + + + + + + + if test $ac_cv_header_unistd_h = yes; then + HAVE_UNISTD_H=1 + else + HAVE_UNISTD_H=0 + fi + + + + + + + + + + M4_LIBOBJS="$M4_LIBOBJS dup-safer.$ac_objext" + M4_LIBOBJS="$M4_LIBOBJS fd-safer.$ac_objext" + M4_LIBOBJS="$M4_LIBOBJS pipe-safer.$ac_objext" + + + +cat >>confdefs.h <<\_ACEOF +#define USE_UNLOCKED_IO 1 _ACEOF - eval BITSIZEOF_${GLTYPE}=\$result - done @@ -14433,84 +21213,84 @@ _ACEOF - for gltype in sig_atomic_t wchar_t wint_t ; do - { echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 -echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6; } -if { as_var=gl_cv_type_${gltype}_signed; 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. */ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #include - #include - #include - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - result=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - result=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval gl_cv_type_${gltype}_signed=\$result -fi -ac_res=`eval echo '${'gl_cv_type_${gltype}_signed'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_SIGNED_${GLTYPE} 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + if test $ac_cv_func_vasnprintf = no; then + + + + + + + + M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext" + M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext" + M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext" + M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext" + if test $ac_cv_func_vasnprintf = yes; then + +cat >>confdefs.h <<\_ACEOF +#define REPLACE_VASNPRINTF 1 _ACEOF - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done + fi - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no @@ -14518,51 +21298,27 @@ _ACEOF - for gltype in ptrdiff_t sig_atomic_t size_t wchar_t wint_t ; do - { echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 -echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6; } -if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then + + { echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 +echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6; } +if test "${ac_cv_type_ptrdiff_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #include - #include - #include - - extern $gltype foo; - extern $gltype1 foo; +$ac_includes_default +typedef ptrdiff_t ac__type_new_; int main () { - +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; ; return 0; } @@ -14584,80 +21340,37 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - eval gl_cv_type_${gltype}_suffix=\$glsuf + ac_cv_type_ptrdiff_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_type_ptrdiff_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done fi -ac_res=`eval echo '${'gl_cv_type_${gltype}_suffix'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - cat >>confdefs.h <<_ACEOF -#define ${GLTYPE}_SUFFIX $result -_ACEOF - - done - - - - STDINT_H=stdint.h - fi - - - - - { echo "$as_me:$LINENO: checking absolute name of " >&5 -echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } -if test "${gl_cv_absolute_stdlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - +{ echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 +echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6; } +if test $ac_cv_type_ptrdiff_t = yes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_PTRDIFF_T 1 +_ACEOF +fi - if test $ac_cv_header_stdlib_h = yes; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF - gl_cv_absolute_stdlib_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | -sed -n '\#/stdlib.h#{s#.*"\(.*/stdlib.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` - fi -fi -{ echo "$as_me:$LINENO: result: $gl_cv_absolute_stdlib_h" >&5 -echo "${ECHO_T}$gl_cv_absolute_stdlib_h" >&6; } -cat >>confdefs.h <<_ACEOF -#define ABSOLUTE_STDLIB_H "$gl_cv_absolute_stdlib_h" -_ACEOF - ABSOLUTE_STDLIB_H=\"$gl_cv_absolute_stdlib_h\" - M4_LIBOBJS="$M4_LIBOBJS mkstemp-safer.$ac_objext" -for ac_func in strtol +for ac_func in snprintf wcslen do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -14711,88 +21424,13 @@ return $ac_func (); } _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 - -else - M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext" -fi -done - - - - - - - - - - - { echo "$as_me:$LINENO: checking whether mkdir is declared" >&5 -echo $ECHO_N "checking whether mkdir is declared... $ECHO_C" >&6; } -if test "${ac_cv_have_decl_mkdir+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 () -{ -#ifndef mkdir - (void) mkdir; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +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_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -14801,56 +21439,53 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_mkdir=yes + } && 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 - ac_cv_have_decl_mkdir=no + eval "$as_ac_var=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +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_have_decl_mkdir" >&5 -echo "${ECHO_T}$ac_cv_have_decl_mkdir" >&6; } -if test $ac_cv_have_decl_mkdir = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_MKDIR 1 -_ACEOF - - -else +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 HAVE_DECL_MKDIR 0 +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF +fi +done -for ac_header in io.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 "$as_me:$LINENO: checking whether _snprintf is declared" >&5 +echo $ECHO_N "checking whether _snprintf is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl__snprintf+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 + 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> +#include + +int +main () +{ +#ifndef _snprintf + (void) _snprintf; +#endif + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -14869,249 +21504,43 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - ac_header_compiler=yes + ac_cv_have_decl__snprintf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no + ac_cv_have_decl__snprintf=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 bug-m4@gnu.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 - -fi - - - - - - - { echo "$as_me:$LINENO: checking absolute name of " >&5 -echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } -if test "${gl_cv_absolute_sys_stat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - - - - - if test $ac_cv_header_sys_stat_h = yes; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF - gl_cv_absolute_sys_stat_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | -sed -n '\#/sys/stat.h#{s#.*"\(.*/sys/stat.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` - fi - -fi -{ echo "$as_me:$LINENO: result: $gl_cv_absolute_sys_stat_h" >&5 -echo "${ECHO_T}$gl_cv_absolute_sys_stat_h" >&6; } -cat >>confdefs.h <<_ACEOF -#define ABSOLUTE_SYS_STAT_H "$gl_cv_absolute_sys_stat_h" -_ACEOF - - - ABSOLUTE_SYS_STAT_H=\"$gl_cv_absolute_sys_stat_h\" - - SYS_STAT_H='sys/stat.h' - - - { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5 +echo "${ECHO_T}$ac_cv_have_decl__snprintf" >&6; } +if test $ac_cv_have_decl__snprintf = yes; then +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SNPRINTF 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SNPRINTF 0 +_ACEOF - - { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } - M4_LIBOBJS="$M4_LIBOBJS tempname.$ac_objext" - : + fi -for ac_func in __secure_getenv +for ac_func in vasprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -15204,8 +21633,16 @@ _ACEOF fi done + if test $ac_cv_func_vasprintf = no; then + M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext" + M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext" + if test $ac_cv_func_vasprintf = yes; then + REPLACE_VASPRINTF=1 + else + HAVE_VASPRINTF=0 + fi @@ -15214,46 +21651,11 @@ done - if test $ac_cv_header_unistd_h = yes; then - HAVE_UNISTD_H=1 - { echo "$as_me:$LINENO: checking absolute name of " >&5 -echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } -if test "${gl_cv_absolute_unistd_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - - - - - if test $ac_cv_header_unistd_h = yes; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF - gl_cv_absolute_unistd_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | -sed -n '\#/unistd.h#{s#.*"\(.*/unistd.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` - fi - -fi -{ echo "$as_me:$LINENO: result: $gl_cv_absolute_unistd_h" >&5 -echo "${ECHO_T}$gl_cv_absolute_unistd_h" >&6; } -cat >>confdefs.h <<_ACEOF -#define ABSOLUTE_UNISTD_H "$gl_cv_absolute_unistd_h" -_ACEOF - - - ABSOLUTE_UNISTD_H=\"$gl_cv_absolute_unistd_h\" - else - HAVE_UNISTD_H=0 fi + GNULIB_VASPRINTF=1 @@ -15261,81 +21663,350 @@ _ACEOF - M4_LIBOBJS="$M4_LIBOBJS dup-safer.$ac_objext" - M4_LIBOBJS="$M4_LIBOBJS fd-safer.$ac_objext" - M4_LIBOBJS="$M4_LIBOBJS pipe-safer.$ac_objext" - - - -cat >>confdefs.h <<\_ACEOF -#define USE_UNLOCKED_IO 1 -_ACEOF - - - + gl_cv_func_vasprintf_posix=no +for ac_func in vasprintf +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 + case "$gl_cv_func_printf_sizes_c99" in + *yes) + case "$gl_cv_func_printf_long_double" in + *yes) + case "$gl_cv_func_printf_infinite" in + *yes) + case "$gl_cv_func_printf_infinite_long_double" in + *yes) + case "$gl_cv_func_printf_directive_a" in + *yes) + case "$gl_cv_func_printf_directive_f" in + *yes) + case "$gl_cv_func_printf_directive_n" in + *yes) + case "$gl_cv_func_printf_positions" in + *yes) + case "$gl_cv_func_printf_flag_grouping" in + *yes) + case "$gl_cv_func_printf_flag_zero" in + *yes) + if test $ac_cv_func_vasprintf = yes; then + # vasprintf exists and is already + # POSIX compliant. + gl_cv_func_vasprintf_posix=yes + fi + ;; + esac + ;; + esac + ;; + esac + ;; + esac + ;; + esac + ;; + esac + ;; + esac + ;; + esac + ;; + esac + ;; + esac + if test $gl_cv_func_vasprintf_posix = no; then + case "$gl_cv_func_printf_long_double" in + *yes) + ;; + *) +cat >>confdefs.h <<\_ACEOF +#define NEED_PRINTF_LONG_DOUBLE 1 +_ACEOF + ;; + esac + case "$gl_cv_func_printf_infinite" in + *yes) + ;; + *) +cat >>confdefs.h <<\_ACEOF +#define NEED_PRINTF_INFINITE_DOUBLE 1 +_ACEOF + ;; + esac + case "$gl_cv_func_printf_long_double" in + *yes) + case "$gl_cv_func_printf_infinite_long_double" in + *yes) + ;; + *) +cat >>confdefs.h <<\_ACEOF +#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1 +_ACEOF + ;; + esac + ;; + esac + case "$gl_cv_func_printf_directive_a" in + *yes) + ;; + *) +cat >>confdefs.h <<\_ACEOF +#define NEED_PRINTF_DIRECTIVE_A 1 +_ACEOF +for ac_func in nl_langinfo +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 + ;; + esac + case "$gl_cv_func_printf_directive_f" in + *yes) + ;; + *) +cat >>confdefs.h <<\_ACEOF +#define NEED_PRINTF_DIRECTIVE_F 1 +_ACEOF + ;; + esac + case "$gl_cv_func_printf_flag_grouping" in + *yes) + ;; + *) +cat >>confdefs.h <<\_ACEOF +#define NEED_PRINTF_FLAG_GROUPING 1 +_ACEOF + ;; + esac + case "$gl_cv_func_printf_flag_zero" in + *yes) + ;; + *) +cat >>confdefs.h <<\_ACEOF +#define NEED_PRINTF_FLAG_ZERO 1 +_ACEOF + ;; + esac - if test $ac_cv_func_vasnprintf = no; then @@ -15364,8 +22035,6 @@ _ACEOF - - { echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6; } if test "${ac_cv_type_ptrdiff_t+set}" = set; then @@ -15437,7 +22106,6 @@ fi - for ac_func in snprintf wcslen do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -15531,20 +22199,9 @@ _ACEOF fi done - - - - - fi - - - -for ac_func in vasprintf -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 "$as_me:$LINENO: checking whether _snprintf is declared" >&5 +echo $ECHO_N "checking whether _snprintf is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl__snprintf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -15553,53 +22210,27 @@ _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 +#include int main () { -return $ac_func (); +#ifndef _snprintf + (void) _snprintf; +#endif + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_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 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -15608,40 +22239,47 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec (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" + } && test -s conftest.$ac_objext; then + ac_cv_have_decl__snprintf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" + ac_cv_have_decl__snprintf=no fi -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_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 +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5 +echo "${ECHO_T}$ac_cv_have_decl__snprintf" >&6; } +if test $ac_cv_have_decl__snprintf = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL__SNPRINTF 1 +_ACEOF + + +else cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_DECL__SNPRINTF 0 _ACEOF + fi -done - if test $ac_cv_func_vasprintf = no; then + + + + + M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext" M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext" - if test $ac_cv_func_vasprintf = yes; then - -cat >>confdefs.h <<\_ACEOF -#define REPLACE_VASPRINTF 1 -_ACEOF + if test $ac_cv_func_vasprintf = yes; then + REPLACE_VASPRINTF=1 + else + HAVE_VASPRINTF=0 fi @@ -15654,6 +22292,7 @@ _ACEOF fi + { echo "$as_me:$LINENO: checking whether is standalone" >&5 echo $ECHO_N "checking whether is standalone... $ECHO_C" >&6; } if test "${gl_cv_header_wchar_h_standalone+set}" = set; then @@ -15692,43 +22331,69 @@ rm -f core conftest.err conftest.$ac_obj fi { echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5 echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6; } - if test $gl_cv_header_wchar_h_standalone = yes; then - WCHAR_H= + if test $gl_cv_header_wchar_h_standalone != yes; then + WCHAR_H=wchar.h + fi + + + + + + + + if test $ac_cv_header_wchar_h = yes; then + HAVE_WCHAR_H=1 else - { echo "$as_me:$LINENO: checking absolute name of " >&5 -echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } -if test "${gl_cv_absolute_wchar_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + HAVE_WCHAR_H=0 + fi - if test $ac_cv_header_wchar_h = yes; then - cat >conftest.$ac_ext <<_ACEOF + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_wchar_h='<'wchar.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_next_wchar_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test $ac_cv_header_wchar_h = yes; then + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include + _ACEOF - gl_cv_absolute_wchar_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | -sed -n '\#/wchar.h#{s#.*"\(.*/wchar.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` - fi + gl_cv_next_wchar_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/wchar.h#{ + s#.*"\(.*/wchar.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_wchar_h='<'wchar.h'>' + fi fi -{ echo "$as_me:$LINENO: result: $gl_cv_absolute_wchar_h" >&5 -echo "${ECHO_T}$gl_cv_absolute_wchar_h" >&6; } -cat >>confdefs.h <<_ACEOF -#define ABSOLUTE_WCHAR_H "$gl_cv_absolute_wchar_h" -_ACEOF +{ echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5 +echo "${ECHO_T}$gl_cv_next_wchar_h" >&6; } + fi + NEXT_WCHAR_H=$gl_cv_next_wchar_h - ABSOLUTE_WCHAR_H=\"$gl_cv_absolute_wchar_h\" - WCHAR_H=wchar.h - fi @@ -15738,6 +22403,11 @@ _ACEOF + if test $ac_cv_func_iswcntrl = yes; then + HAVE_ISWCNTRL=1 + else + HAVE_ISWCNTRL=0 + fi @@ -15757,51 +22427,65 @@ _ACEOF WCTYPE_H=wctype.h if test $ac_cv_header_wctype_h = yes; then - if test "$ac_cv_func_iswcntrl" = yes; then + if test $ac_cv_func_iswcntrl = yes; then WCTYPE_H= fi - { echo "$as_me:$LINENO: checking absolute name of " >&5 -echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } -if test "${gl_cv_absolute_wctype_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test $ac_cv_header_wctype_h = yes; then - cat >conftest.$ac_ext <<_ACEOF + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_wctype_h='<'wctype.h'>' + else + { echo "$as_me:$LINENO: checking absolute name of " >&5 +echo $ECHO_N "checking absolute name of ... $ECHO_C" >&6; } +if test "${gl_cv_next_wctype_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test $ac_cv_header_wctype_h = yes; then + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include + _ACEOF - gl_cv_absolute_wctype_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | -sed -n '\#/wctype.h#{s#.*"\(.*/wctype.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'` - fi + gl_cv_next_wctype_h='"'`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | + sed -n '\#/wctype.h#{ + s#.*"\(.*/wctype.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' + else + gl_cv_next_wctype_h='<'wctype.h'>' + fi fi -{ echo "$as_me:$LINENO: result: $gl_cv_absolute_wctype_h" >&5 -echo "${ECHO_T}$gl_cv_absolute_wctype_h" >&6; } -cat >>confdefs.h <<_ACEOF -#define ABSOLUTE_WCTYPE_H "$gl_cv_absolute_wctype_h" -_ACEOF +{ echo "$as_me:$LINENO: result: $gl_cv_next_wctype_h" >&5 +echo "${ECHO_T}$gl_cv_next_wctype_h" >&6; } + fi + NEXT_WCTYPE_H=$gl_cv_next_wctype_h + - ABSOLUTE_WCTYPE_H=\"$gl_cv_absolute_wctype_h\" HAVE_WCTYPE_H=1 else - ABSOLUTE_WCTYPE_H=\"no/such/file/wctype.h\" HAVE_WCTYPE_H=0 fi - M4_LIBOBJS="$M4_LIBOBJS xmalloc.$ac_objext" @@ -16432,7 +23116,7 @@ fi ac_config_commands="$ac_config_commands stamp-h" -ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile checks/Makefile examples/Makefile" +ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile checks/Makefile examples/Makefile" cat >confcache <<\_ACEOF @@ -16876,7 +23560,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU M4 $as_me 1.4.9, which was +This file was extended by GNU M4 $as_me 1.4.10, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16929,7 +23613,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -GNU M4 config.status 1.4.9 +GNU M4 config.status 1.4.10 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -17050,6 +23734,7 @@ do "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "checks/Makefile") CONFIG_FILES="$CONFIG_FILES checks/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; @@ -17205,12 +23890,12 @@ GL_COND_LIBTOOL_TRUE!$GL_COND_LIBTOOL_TR GL_COND_LIBTOOL_FALSE!$GL_COND_LIBTOOL_FALSE$ac_delim ALLOCA!$ALLOCA$ac_delim ALLOCA_H!$ALLOCA_H$ac_delim -GETOPT_H!$GETOPT_H$ac_delim -ABSOLUTE_SYS_TIME_H!$ABSOLUTE_SYS_TIME_H$ac_delim -HAVE_SYS_TIME_H!$HAVE_SYS_TIME_H$ac_delim -HAVE_STRUCT_TIMEVAL!$HAVE_STRUCT_TIMEVAL$ac_delim -REPLACE_GETTIMEOFDAY!$REPLACE_GETTIMEOFDAY$ac_delim -SYS_TIME_H!$SYS_TIME_H$ac_delim +GNULIB_FPRINTF_POSIX!$GNULIB_FPRINTF_POSIX$ac_delim +GNULIB_PRINTF_POSIX!$GNULIB_PRINTF_POSIX$ac_delim +GNULIB_SNPRINTF!$GNULIB_SNPRINTF$ac_delim +GNULIB_SPRINTF_POSIX!$GNULIB_SPRINTF_POSIX$ac_delim +GNULIB_VFPRINTF_POSIX!$GNULIB_VFPRINTF_POSIX$ac_delim +GNULIB_VPRINTF_POSIX!$GNULIB_VPRINTF_POSIX$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -17252,20 +23937,146 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +GNULIB_VSNPRINTF!$GNULIB_VSNPRINTF$ac_delim +GNULIB_VSPRINTF_POSIX!$GNULIB_VSPRINTF_POSIX$ac_delim +GNULIB_VASPRINTF!$GNULIB_VASPRINTF$ac_delim +GNULIB_FSEEK!$GNULIB_FSEEK$ac_delim +GNULIB_FSEEKO!$GNULIB_FSEEKO$ac_delim +GNULIB_FTELL!$GNULIB_FTELL$ac_delim +GNULIB_FTELLO!$GNULIB_FTELLO$ac_delim +GNULIB_FFLUSH!$GNULIB_FFLUSH$ac_delim +REPLACE_FPRINTF!$REPLACE_FPRINTF$ac_delim +REPLACE_VFPRINTF!$REPLACE_VFPRINTF$ac_delim +REPLACE_PRINTF!$REPLACE_PRINTF$ac_delim +REPLACE_VPRINTF!$REPLACE_VPRINTF$ac_delim +REPLACE_SNPRINTF!$REPLACE_SNPRINTF$ac_delim +HAVE_DECL_SNPRINTF!$HAVE_DECL_SNPRINTF$ac_delim +REPLACE_VSNPRINTF!$REPLACE_VSNPRINTF$ac_delim +HAVE_DECL_VSNPRINTF!$HAVE_DECL_VSNPRINTF$ac_delim +REPLACE_SPRINTF!$REPLACE_SPRINTF$ac_delim +REPLACE_VSPRINTF!$REPLACE_VSPRINTF$ac_delim +HAVE_VASPRINTF!$HAVE_VASPRINTF$ac_delim +REPLACE_VASPRINTF!$REPLACE_VASPRINTF$ac_delim +HAVE_FSEEKO!$HAVE_FSEEKO$ac_delim +REPLACE_FSEEKO!$REPLACE_FSEEKO$ac_delim +REPLACE_FSEEK!$REPLACE_FSEEK$ac_delim +HAVE_FTELLO!$HAVE_FTELLO$ac_delim +REPLACE_FTELLO!$REPLACE_FTELLO$ac_delim +REPLACE_FTELL!$REPLACE_FTELL$ac_delim +REPLACE_FFLUSH!$REPLACE_FFLUSH$ac_delim +INCLUDE_NEXT!$INCLUDE_NEXT$ac_delim +NEXT_FLOAT_H!$NEXT_FLOAT_H$ac_delim +FLOAT_H!$FLOAT_H$ac_delim +GNULIB_FREXP!$GNULIB_FREXP$ac_delim +GNULIB_FREXPL!$GNULIB_FREXPL$ac_delim +GNULIB_LDEXPL!$GNULIB_LDEXPL$ac_delim +GNULIB_MATHL!$GNULIB_MATHL$ac_delim +GNULIB_SIGNBIT!$GNULIB_SIGNBIT$ac_delim +HAVE_DECL_ACOSL!$HAVE_DECL_ACOSL$ac_delim +HAVE_DECL_ASINL!$HAVE_DECL_ASINL$ac_delim +HAVE_DECL_ATANL!$HAVE_DECL_ATANL$ac_delim +HAVE_DECL_CEILL!$HAVE_DECL_CEILL$ac_delim +HAVE_DECL_COSL!$HAVE_DECL_COSL$ac_delim +HAVE_DECL_EXPL!$HAVE_DECL_EXPL$ac_delim +HAVE_DECL_FLOORL!$HAVE_DECL_FLOORL$ac_delim +HAVE_DECL_FREXPL!$HAVE_DECL_FREXPL$ac_delim +HAVE_DECL_LDEXPL!$HAVE_DECL_LDEXPL$ac_delim +HAVE_DECL_LOGL!$HAVE_DECL_LOGL$ac_delim +HAVE_DECL_SINL!$HAVE_DECL_SINL$ac_delim +HAVE_DECL_SQRTL!$HAVE_DECL_SQRTL$ac_delim +HAVE_DECL_TANL!$HAVE_DECL_TANL$ac_delim +REPLACE_FREXP!$REPLACE_FREXP$ac_delim +REPLACE_FREXPL!$REPLACE_FREXPL$ac_delim +REPLACE_LDEXPL!$REPLACE_LDEXPL$ac_delim +REPLACE_SIGNBIT!$REPLACE_SIGNBIT$ac_delim +GETOPT_H!$GETOPT_H$ac_delim +LIBINTL!$LIBINTL$ac_delim +LTLIBINTL!$LTLIBINTL$ac_delim +NEXT_SYS_TIME_H!$NEXT_SYS_TIME_H$ac_delim +HAVE_SYS_TIME_H!$HAVE_SYS_TIME_H$ac_delim +HAVE_STRUCT_TIMEVAL!$HAVE_STRUCT_TIMEVAL$ac_delim +REPLACE_GETTIMEOFDAY!$REPLACE_GETTIMEOFDAY$ac_delim +SYS_TIME_H!$SYS_TIME_H$ac_delim GLIBC21!$GLIBC21$ac_delim +GNULIB_CHOWN!$GNULIB_CHOWN$ac_delim +GNULIB_DUP2!$GNULIB_DUP2$ac_delim +GNULIB_FCHDIR!$GNULIB_FCHDIR$ac_delim +GNULIB_FTRUNCATE!$GNULIB_FTRUNCATE$ac_delim +GNULIB_GETCWD!$GNULIB_GETCWD$ac_delim +GNULIB_GETLOGIN_R!$GNULIB_GETLOGIN_R$ac_delim +GNULIB_LCHOWN!$GNULIB_LCHOWN$ac_delim +GNULIB_LSEEK!$GNULIB_LSEEK$ac_delim +GNULIB_READLINK!$GNULIB_READLINK$ac_delim +GNULIB_SLEEP!$GNULIB_SLEEP$ac_delim +HAVE_DUP2!$HAVE_DUP2$ac_delim +HAVE_FTRUNCATE!$HAVE_FTRUNCATE$ac_delim +HAVE_READLINK!$HAVE_READLINK$ac_delim +HAVE_SLEEP!$HAVE_SLEEP$ac_delim +HAVE_DECL_GETLOGIN_R!$HAVE_DECL_GETLOGIN_R$ac_delim +REPLACE_CHOWN!$REPLACE_CHOWN$ac_delim +REPLACE_FCHDIR!$REPLACE_FCHDIR$ac_delim +REPLACE_GETCWD!$REPLACE_GETCWD$ac_delim +REPLACE_LCHOWN!$REPLACE_LCHOWN$ac_delim +REPLACE_LSEEK!$REPLACE_LSEEK$ac_delim +NEXT_MATH_H!$NEXT_MATH_H$ac_delim GNULIB_GETSUBOPT!$GNULIB_GETSUBOPT$ac_delim GNULIB_MKDTEMP!$GNULIB_MKDTEMP$ac_delim GNULIB_MKSTEMP!$GNULIB_MKSTEMP$ac_delim HAVE_GETSUBOPT!$HAVE_GETSUBOPT$ac_delim HAVE_MKDTEMP!$HAVE_MKDTEMP$ac_delim REPLACE_MKSTEMP!$REPLACE_MKSTEMP$ac_delim +GNULIB_SIGPROCMASK!$GNULIB_SIGPROCMASK$ac_delim +HAVE_POSIX_SIGNALBLOCKING!$HAVE_POSIX_SIGNALBLOCKING$ac_delim +HAVE_SIGSET_T!$HAVE_SIGSET_T$ac_delim +NEXT_SIGNAL_H!$NEXT_SIGNAL_H$ac_delim STDBOOL_H!$STDBOOL_H$ac_delim HAVE__BOOL!$HAVE__BOOL$ac_delim HAVE_LONG_LONG_INT!$HAVE_LONG_LONG_INT$ac_delim HAVE_UNSIGNED_LONG_LONG_INT!$HAVE_UNSIGNED_LONG_LONG_INT$ac_delim HAVE_INTTYPES_H!$HAVE_INTTYPES_H$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF HAVE_SYS_TYPES_H!$HAVE_SYS_TYPES_H$ac_delim -ABSOLUTE_STDINT_H!$ABSOLUTE_STDINT_H$ac_delim +NEXT_STDINT_H!$NEXT_STDINT_H$ac_delim HAVE_STDINT_H!$HAVE_STDINT_H$ac_delim HAVE_SYS_INTTYPES_H!$HAVE_SYS_INTTYPES_H$ac_delim HAVE_SYS_BITYPES_H!$HAVE_SYS_BITYPES_H$ac_delim @@ -17283,30 +24094,25 @@ SIZE_T_SUFFIX!$SIZE_T_SUFFIX$ac_delim WCHAR_T_SUFFIX!$WCHAR_T_SUFFIX$ac_delim WINT_T_SUFFIX!$WINT_T_SUFFIX$ac_delim STDINT_H!$STDINT_H$ac_delim -ABSOLUTE_STDLIB_H!$ABSOLUTE_STDLIB_H$ac_delim -ABSOLUTE_SYS_STAT_H!$ABSOLUTE_SYS_STAT_H$ac_delim +NEXT_STDIO_H!$NEXT_STDIO_H$ac_delim +NEXT_STDLIB_H!$NEXT_STDLIB_H$ac_delim +HAVE_LSTAT!$HAVE_LSTAT$ac_delim +HAVE_DECL_MKDIR!$HAVE_DECL_MKDIR$ac_delim +HAVE_IO_H!$HAVE_IO_H$ac_delim +NEXT_SYS_STAT_H!$NEXT_SYS_STAT_H$ac_delim SYS_STAT_H!$SYS_STAT_H$ac_delim -GNULIB_CHOWN!$GNULIB_CHOWN$ac_delim -GNULIB_DUP2!$GNULIB_DUP2$ac_delim -GNULIB_FCHDIR!$GNULIB_FCHDIR$ac_delim -GNULIB_FTRUNCATE!$GNULIB_FTRUNCATE$ac_delim -GNULIB_GETCWD!$GNULIB_GETCWD$ac_delim -GNULIB_GETLOGIN_R!$GNULIB_GETLOGIN_R$ac_delim -GNULIB_READLINK!$GNULIB_READLINK$ac_delim -HAVE_DUP2!$HAVE_DUP2$ac_delim -HAVE_FTRUNCATE!$HAVE_FTRUNCATE$ac_delim -HAVE_READLINK!$HAVE_READLINK$ac_delim -HAVE_DECL_GETLOGIN_R!$HAVE_DECL_GETLOGIN_R$ac_delim -REPLACE_CHOWN!$REPLACE_CHOWN$ac_delim -REPLACE_FCHDIR!$REPLACE_FCHDIR$ac_delim -REPLACE_GETCWD!$REPLACE_GETCWD$ac_delim +NEXT_UNISTD_H!$NEXT_UNISTD_H$ac_delim HAVE_UNISTD_H!$HAVE_UNISTD_H$ac_delim -ABSOLUTE_UNISTD_H!$ABSOLUTE_UNISTD_H$ac_delim EOVERFLOW!$EOVERFLOW$ac_delim -ABSOLUTE_WCHAR_H!$ABSOLUTE_WCHAR_H$ac_delim +GNULIB_WCWIDTH!$GNULIB_WCWIDTH$ac_delim +HAVE_DECL_WCWIDTH!$HAVE_DECL_WCWIDTH$ac_delim +REPLACE_WCWIDTH!$REPLACE_WCWIDTH$ac_delim WCHAR_H!$WCHAR_H$ac_delim +HAVE_WCHAR_H!$HAVE_WCHAR_H$ac_delim +NEXT_WCHAR_H!$NEXT_WCHAR_H$ac_delim +HAVE_ISWCNTRL!$HAVE_ISWCNTRL$ac_delim HAVE_WINT_T!$HAVE_WINT_T$ac_delim -ABSOLUTE_WCTYPE_H!$ABSOLUTE_WCTYPE_H$ac_delim +NEXT_WCTYPE_H!$NEXT_WCTYPE_H$ac_delim HAVE_WCTYPE_H!$HAVE_WCTYPE_H$ac_delim WCTYPE_H!$WCTYPE_H$ac_delim LIBM4_LIBDEPS!$LIBM4_LIBDEPS$ac_delim @@ -17319,7 +24125,7 @@ M4_LIBOBJS!$M4_LIBOBJS$ac_delim M4_LTLIBOBJS!$M4_LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 48; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 @@ -17337,7 +24143,7 @@ if test -n "$ac_eof"; then fi cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' @@ -17606,7 +24412,7 @@ s&@abs_top_builddir@&$ac_abs_top_builddi s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && diff -ruNp m4-1.4.9/configure.ac m4-1.4.10/configure.ac --- m4-1.4.9/configure.ac 2007-03-23 06:40:49.000000000 -0600 +++ m4-1.4.10/configure.ac 2007-07-09 21:09:35.000000000 -0600 @@ -4,7 +4,7 @@ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# 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, @@ -18,7 +18,7 @@ # 02110-1301 USA AC_PREREQ([2.60]) -AC_INIT([GNU M4], [1.4.9], [bug-m4@gnu.org]) +AC_INIT([GNU M4], [1.4.10], [bug-m4@gnu.org]) AM_INIT_AUTOMAKE([1.9.6 dist-bzip2 gnu]) PACKAGE=$PACKAGE_TARNAME; AC_SUBST([PACKAGE]) VERSION=$PACKAGE_VERSION; AC_SUBST([VERSION]) @@ -165,6 +165,7 @@ AC_CONFIG_FILES([Makefile doc/Makefile lib/Makefile src/Makefile + tests/Makefile checks/Makefile examples/Makefile ]) diff -ruNp m4-1.4.9/depcomp m4-1.4.10/depcomp --- m4-1.4.9/depcomp 2007-03-23 06:54:11.000000000 -0600 +++ m4-1.4.10/depcomp 2007-07-09 21:15:35.000000000 -0600 @@ -1,14 +1,14 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2006-10-15.18 +scriptversion=2007-03-29.01 -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) +# the Free Software Foundation; either version 3, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, @@ -215,34 +215,39 @@ aix) # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u "$@" -M fi stat=$? - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - if test $stat -eq 0; then : else - rm -f "$tmpdepfile" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then - outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile diff -ruNp m4-1.4.9/doc/Makefile.am m4-1.4.10/doc/Makefile.am --- m4-1.4.9/doc/Makefile.am 2006-07-27 12:12:08.000000000 -0600 +++ m4-1.4.10/doc/Makefile.am 2007-07-09 21:27:07.000000000 -0600 @@ -1,10 +1,10 @@ ## This file is part of GNU M4. ## -## Copyright (C) 2006 Free Software Foundation, Inc. +## Copyright (C) 2006, 2007 Free Software Foundation, Inc. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or +## 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, @@ -20,7 +20,7 @@ ## This file written by Eric Blake info_TEXINFOS = m4.texinfo -m4_TEXINFOS = fdl.texi +m4_TEXINFOS = fdl.texi gpl-3.0.texi man_MANS = m4.1 EXTRA_DIST = $(man_MANS) gendocs_template MAINTAINERCLEANFILES = $(man_MANS) gendocs_template diff -ruNp m4-1.4.9/doc/Makefile.in m4-1.4.10/doc/Makefile.in --- m4-1.4.9/doc/Makefile.in 2007-03-23 07:32:33.000000000 -0600 +++ m4-1.4.10/doc/Makefile.in 2007-07-09 21:30:30.000000000 -0600 @@ -36,36 +36,48 @@ DIST_COMMON = $(m4_TEXINFOS) $(srcdir)/M $(srcdir)/Makefile.in $(srcdir)/stamp-vti \ $(srcdir)/version.texi mdate-sh texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \ - $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \ - $(top_srcdir)/m4/cloexec.m4 $(top_srcdir)/m4/close-stream.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/alloca.m4 \ + $(top_srcdir)/m4/assert.m4 $(top_srcdir)/m4/cloexec.m4 \ + $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/closein.m4 \ $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \ $(top_srcdir)/m4/config-h.m4 $(top_srcdir)/m4/eealloc.m4 \ $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \ $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \ - $(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fpending.m4 \ - $(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/getopt.m4 \ - $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gl_list.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ - $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/inline.m4 \ + $(top_srcdir)/m4/fatal-signal.m4 $(top_srcdir)/m4/fflush.m4 \ + $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fpending.m4 \ + $(top_srcdir)/m4/fpieee.m4 $(top_srcdir)/m4/fpurge.m4 \ + $(top_srcdir)/m4/freading.m4 $(top_srcdir)/m4/free.m4 \ + $(top_srcdir)/m4/frexp.m4 $(top_srcdir)/m4/frexpl.m4 \ + $(top_srcdir)/m4/fseeko.m4 $(top_srcdir)/m4/ftello.m4 \ + $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettimeofday.m4 \ + $(top_srcdir)/m4/gl_list.m4 $(top_srcdir)/m4/glibc21.m4 \ + $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/gnulib-comp.m4 \ + $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/localcharset.m4 \ - $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbstate_t.m4 \ - $(top_srcdir)/m4/mkdtemp.m4 $(top_srcdir)/m4/mkstemp.m4 \ - $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/quotearg.m4 \ - $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/sig_atomic_t.m4 \ - $(top_srcdir)/m4/signalblocking.m4 \ + $(top_srcdir)/m4/isnan.m4 $(top_srcdir)/m4/isnanf.m4 \ + $(top_srcdir)/m4/isnanl.m4 $(top_srcdir)/m4/ldexpl.m4 \ + $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/longlong.m4 \ + $(top_srcdir)/m4/lseek.m4 $(top_srcdir)/m4/malloca.m4 \ + $(top_srcdir)/m4/math_h.m4 $(top_srcdir)/m4/mbrtowc.m4 \ + $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mkdtemp.m4 \ + $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/pathmax.m4 \ + $(top_srcdir)/m4/printf-frexp.m4 \ + $(top_srcdir)/m4/printf-frexpl.m4 $(top_srcdir)/m4/printf.m4 \ + $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/regex.m4 \ + $(top_srcdir)/m4/sig_atomic_t.m4 $(top_srcdir)/m4/signal_h.m4 \ + $(top_srcdir)/m4/signalblocking.m4 $(top_srcdir)/m4/signbit.m4 \ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/ssize_t.m4 \ $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/stdio-safer.m4 \ + $(top_srcdir)/m4/stdio-safer.m4 $(top_srcdir)/m4/stdio_h.m4 \ $(top_srcdir)/m4/stdlib-safer.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/tempname.m4 \ $(top_srcdir)/m4/tmpdir.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \ + $(top_srcdir)/m4/vasprintf-posix.m4 \ $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar.m4 \ $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype.m4 \ $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \ @@ -101,13 +113,6 @@ man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ -ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ -ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ -ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ -ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ -ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ -ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ @@ -135,30 +140,80 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EOVERFLOW = @EOVERFLOW@ EXEEXT = @EXEEXT@ +FLOAT_H = @FLOAT_H@ GETOPT_H = @GETOPT_H@ GLIBC21 = @GLIBC21@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ +GNULIB_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ +GNULIB_FREXP = @GNULIB_FREXP@ +GNULIB_FREXPL = @GNULIB_FREXPL@ +GNULIB_FSEEK = @GNULIB_FSEEK@ +GNULIB_FSEEKO = @GNULIB_FSEEKO@ +GNULIB_FTELL = @GNULIB_FTELL@ +GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ GNULIB_GETCWD = @GNULIB_GETCWD@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_LCHOWN = @GNULIB_LCHOWN@ +GNULIB_LDEXPL = @GNULIB_LDEXPL@ +GNULIB_LSEEK = @GNULIB_LSEEK@ +GNULIB_MATHL = @GNULIB_MATHL@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ +GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ GNULIB_READLINK = @GNULIB_READLINK@ +GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ +GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@ +GNULIB_SLEEP = @GNULIB_SLEEP@ +GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ +GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ +GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ +GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ +GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ +GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ +GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ +GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ GREP = @GREP@ +HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ +HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ +HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ +HAVE_DECL_CEILL = @HAVE_DECL_CEILL@ +HAVE_DECL_COSL = @HAVE_DECL_COSL@ +HAVE_DECL_EXPL = @HAVE_DECL_EXPL@ +HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@ +HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ +HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ +HAVE_DECL_LOGL = @HAVE_DECL_LOGL@ +HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@ +HAVE_DECL_SINL = @HAVE_DECL_SINL@ +HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ +HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ +HAVE_DECL_TANL = @HAVE_DECL_TANL@ +HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ +HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ HAVE_DUP2 = @HAVE_DUP2@ +HAVE_FSEEKO = @HAVE_FSEEKO@ +HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ +HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ +HAVE_LSTAT = @HAVE_LSTAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ +HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@ HAVE_READLINK = @HAVE_READLINK@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ +HAVE_SIGSET_T = @HAVE_SIGSET_T@ +HAVE_SLEEP = @HAVE_SLEEP@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ @@ -167,24 +222,40 @@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ +HAVE_VASPRINTF = @HAVE_VASPRINTF@ +HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE__BOOL = @HAVE__BOOL@ +INCLUDE_NEXT = @INCLUDE_NEXT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ +LIBINTL = @LIBINTL@ LIBM4_LIBDEPS = @LIBM4_LIBDEPS@ LIBM4_LTLIBDEPS = @LIBM4_LTLIBDEPS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ M4_LIBOBJS = @M4_LIBOBJS@ M4_LTLIBOBJS = @M4_LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NEXT_FLOAT_H = @NEXT_FLOAT_H@ +NEXT_MATH_H = @NEXT_MATH_H@ +NEXT_SIGNAL_H = @NEXT_SIGNAL_H@ +NEXT_STDINT_H = @NEXT_STDINT_H@ +NEXT_STDIO_H = @NEXT_STDIO_H@ +NEXT_STDLIB_H = @NEXT_STDLIB_H@ +NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ +NEXT_UNISTD_H = @NEXT_UNISTD_H@ +NEXT_WCHAR_H = @NEXT_WCHAR_H@ +NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -197,9 +268,30 @@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ +REPLACE_FFLUSH = @REPLACE_FFLUSH@ +REPLACE_FPRINTF = @REPLACE_FPRINTF@ +REPLACE_FREXP = @REPLACE_FREXP@ +REPLACE_FREXPL = @REPLACE_FREXPL@ +REPLACE_FSEEK = @REPLACE_FSEEK@ +REPLACE_FSEEKO = @REPLACE_FSEEKO@ +REPLACE_FTELL = @REPLACE_FTELL@ +REPLACE_FTELLO = @REPLACE_FTELLO@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_LCHOWN = @REPLACE_LCHOWN@ +REPLACE_LDEXPL = @REPLACE_LDEXPL@ +REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ +REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ +REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ +REPLACE_SPRINTF = @REPLACE_SPRINTF@ +REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ +REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ +REPLACE_VPRINTF = @REPLACE_VPRINTF@ +REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ +REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ +REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ @@ -264,7 +356,7 @@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ info_TEXINFOS = m4.texinfo -m4_TEXINFOS = fdl.texi +m4_TEXINFOS = fdl.texi gpl-3.0.texi man_MANS = m4.1 EXTRA_DIST = $(man_MANS) gendocs_template MAINTAINERCLEANFILES = $(man_MANS) gendocs_template diff -ruNp m4-1.4.9/doc/gendocs_template m4-1.4.10/doc/gendocs_template --- m4-1.4.9/doc/gendocs_template 2007-03-23 06:50:37.000000000 -0600 +++ m4-1.4.10/doc/gendocs_template 2007-07-05 05:47:49.000000000 -0600 @@ -1,14 +1,7 @@ - - - - - + %%TITLE%% - GNU Project - Free Software Foundation (FSF) - - - - + +

%%TITLE%%

@@ -16,76 +9,74 @@ - - -

%%TITLE%%

-
Free Software Foundation
last updated %%DATE%%
-

- -  [image of the head of a GNU] - -

-

This manual (%%PACKAGE%%) is available in the following formats:

+

You can buy printed copies of +some manuals (among other items) from the Free Software Foundation; +this helps support FSF activities.

+

(This page generated by the %%SCRIPTNAME%% script.)

- + + - + diff -ruNp m4-1.4.9/doc/gpl-3.0.texi m4-1.4.10/doc/gpl-3.0.texi --- m4-1.4.9/doc/gpl-3.0.texi 1969-12-31 17:00:00.000000000 -0700 +++ m4-1.4.10/doc/gpl-3.0.texi 2007-07-05 05:47:50.000000000 -0600 @@ -0,0 +1,717 @@ +@node Copying +@appendixsec GNU General Public License +@center Version 3, 29 June 2007 + +@c This file is intended to be included in another file. + +@display +Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/} + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. +@end display + +@heading 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. + +@heading TERMS AND CONDITIONS + +@enumerate 0 +@item 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. + +@item 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. + +@item 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. + +@item 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. + +@item 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. + +@item 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: + +@enumerate a +@item +The work must carry prominent notices stating that you modified it, +and giving a relevant date. + +@item +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''. + +@item +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. + +@item +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. +@end enumerate + +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. + +@item 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: + +@enumerate a +@item +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. + +@item +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. + +@item +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. + +@item +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. + +@item +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. + +@end enumerate + +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. + +@item 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: + +@enumerate a +@item +Disclaiming warranty or limiting liability differently from the terms +of sections 15 and 16 of this License; or + +@item +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 + +@item +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 + +@item +Limiting the use for publicity purposes of names of licensors or +authors of the material; or + +@item +Declining to grant rights under trademark law for use of some trade +names, trademarks, or service marks; or + +@item +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. +@end enumerate + +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. + +@item 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. + +@item 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. + +@item 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. + +@item 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. + +@item 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. + +@item 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. + +@item 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. + +@item 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. + +@item 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. + +@item 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 enumerate + +@heading END OF TERMS AND CONDITIONS + +@heading 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. + +@smallexample +@var{one line to give the program's name and a brief idea of what it does.} +Copyright (C) @var{year} @var{name of author} + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 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 @url{http://www.gnu.org/licenses/}. +@end smallexample + +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: + +@smallexample +@var{program} Copyright (C) @var{year} @var{name of author} +This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}. +This is free software, and you are welcome to redistribute it +under certain conditions; type @samp{show c} for details. +@end smallexample + +The hypothetical commands @samp{show w} and @samp{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 +@url{http://www.gnu.org/licenses/}. + +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 @url{http://www.gnu.org/philosophy/why-not-lgpl.html}. diff -ruNp m4-1.4.9/doc/m4.1 m4-1.4.10/doc/m4.1 --- m4-1.4.9/doc/m4.1 2007-03-23 07:36:08.000000000 -0600 +++ m4-1.4.10/doc/m4.1 2007-07-09 21:20:51.000000000 -0600 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35. -.TH M4 "1" "March 2007" "FSF" "User Commands" +.TH M4 "1" "July 2007" "FSF" "User Commands" .SH NAME m4 \- macro processor .SH SYNOPSIS @@ -124,7 +124,7 @@ Written by Rene' Seindal. Report bugs to . .SH COPYRIGHT Copyright \(co 2007 Free Software Foundation, Inc. -License GPLv2+: GNU GPL version 2 or later +License GPLv3+: GNU GPL version 3 or later .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. diff -ruNp m4-1.4.9/doc/m4.info m4-1.4.10/doc/m4.info --- m4-1.4.9/doc/m4.info 2007-03-23 07:36:05.000000000 -0600 +++ m4-1.4.10/doc/m4.info 2007-07-09 21:20:52.000000000 -0600 @@ -1,6 +1,6 @@ This is m4.info, produced by makeinfo version 4.8 from m4.texinfo. - This manual is for GNU M4 (version 1.4.9, 23 March 2007), a package + This manual is for GNU M4 (version 1.4.10, 4 July 2007), a package containing an implementation of the m4 macro language. Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2004, 2005, 2006, @@ -13,7 +13,7 @@ containing an implementation of the m4 m no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License." -INFO-DIR-SECTION GNU programming tools +INFO-DIR-SECTION Text creation and manipulation START-INFO-DIR-ENTRY * M4: (m4). A powerful macro processor. END-INFO-DIR-ENTRY @@ -24,7 +24,7 @@ File: m4.info, Node: Top, Next: Prelim GNU M4 ****** -This manual is for GNU M4 (version 1.4.9, 23 March 2007), a package +This manual is for GNU M4 (version 1.4.10, 4 July 2007), a package containing an implementation of the m4 macro language. Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2004, 2005, 2006, @@ -46,10 +46,10 @@ generating `configure' scripts, but not GNU `m4' was originally written by Rene' Seindal, with subsequent changes by Franc,ois Pinard and other volunteers on the Internet. All -names and email addresses can be found in the files `m4-1.4.9/AUTHORS' -and `m4-1.4.9/THANKS' from the GNU M4 distribution. +names and email addresses can be found in the files `m4-1.4.10/AUTHORS' +and `m4-1.4.10/THANKS' from the GNU M4 distribution. - This is release 1.4.9. It is now considered stable: future + This is release 1.4.10. It is now considered stable: future releases in the 1.4.x series are only meant to fix bugs, increase speed, or improve documentation. However... @@ -86,6 +86,7 @@ will go away and _you should not count o * Compatibility:: Compatibility with other versions of `m4' * Answers:: Correct version of some examples +* Copying This Package:: How to make copies of the overall M4 package * Copying This Manual:: How to make copies of this manual * Indices:: Indices of concepts and macros @@ -218,8 +219,9 @@ Correct version of some examples * Improved cleardivert:: Solution for `cleardivert' * Improved fatal_error:: Solution for `fatal_error' -How to make copies of this manual +How to make copies of this package or manual +* Copying:: GNU General Public License * GNU Free Documentation License:: License for copying this manual Indices of concepts and macros @@ -332,7 +334,7 @@ addressed some long standing bugs in the 1.4 that were floating around the net and released 1.4.3 and 1.4.4. And in 2006, Eric Blake joined the team and prepared patches for the release of 1.4.5, 1.4.6, 1.4.7, and 1.4.8. The 1.4.x series remains -open for bug fixes, including release 1.4.9 in 2007. +open for bug fixes, including release 1.4.9 and 1.4.10 in 2007. Meanwhile, development has continued on new features for `m4', such as dynamic module loading and additional builtins. When complete, GNU @@ -381,8 +383,11 @@ shown in a fixed width font, like this To distinguish input from output, all output from `m4' is prefixed by the string `=>', and all error messages by the string `error-->'. -Thus +When showing how command line options affect matters, the command line +is shown with a prompt `$ like this', otherwise, you can assume that a +simple `m4' invocation will work. Thus: + $ command line to invoke m4 Example of input line =>Output line from m4 error-->and an error message @@ -391,7 +396,12 @@ Thus The sequence `' refers to the newline character. The majority of these examples are self-contained, and you can run them with similar results by invoking `m4 -d'. In fact, the testsuite that is bundled in -the GNU M4 package consists of the examples in this document! +the GNU M4 package consists of the examples in this document! Some of +the examples assume that your current directory is located where you +unpacked the installation, so if you plan on following along, you may +find it helpful to do this now: + + $ cd m4-1.4.10 As each of the predefined macros in `m4' is described, a prototype call of the macro will be shown, giving descriptive names to the @@ -587,7 +597,39 @@ from. These features occur with the fol Synchronization directives are always given on complete lines by themselves. When a synchronization discrepancy occurs in the middle of an output line, the associated synchronization directive - is delayed until the beginning of the next generated line. + is delayed until the next newline that does not occur in the + middle of a quoted string or comment. + + define(`twoline', `1 + 2') + =>#line 2 "stdin" + => + changecom(`/*', `*/') + => + define(`comment', `/*1 + 2*/') + =>#line 5 + => + dnl no line + hello + =>#line 7 + =>hello + twoline + =>1 + =>#line 8 + =>2 + comment + =>/*1 + =>2*/ + one comment `two + three' + =>#line 10 + =>one /*1 + =>2*/ two + =>three + goodbye + =>#line 12 + =>goodbye `-U NAME' `--undefine=NAME' @@ -749,7 +791,17 @@ string. The options `--define' (`-D'), `--undefine' (`-U'), `--synclines' (`-s'), and `--trace' (`-t') only take effect after processing input -from any file names that occur earlier on the command line. +from any file names that occur earlier on the command line. For +example, assume the file `foo' contains: + + $ cat foo + bar + + The text `bar' can then be redefined over multiple uses of `foo': + + $ m4 -Dbar=hello foo -Dbar=world foo + =>hello + =>world If none of the input files invoked `m4exit' (*note M4exit::), the exit status of `m4' will be 0 for success, 1 for general failure (such @@ -768,13 +820,14 @@ File: m4.info, Node: Syntax, Next: Mac As `m4' reads its input, it separates it into "tokens". A token is either a name, a quoted string, or any single character, that is not a part of either a name or a string. Input to `m4' can also contain -comments. GNU `m4' does not yet understand locales; all operations are -byte-oriented rather than character-oriented (although if your locale -uses a single byte encoding, such as ISO-8859-1, you will not notice a -difference). However, `m4' is eight-bit clean, so you can use -non-ASCII characters in quoted strings (*note Changequote::), comments -(*note Changecom::), and macro names (*note Indir::), with the -exception of the NUL character (the zero byte `'\0''). +comments. GNU `m4' does not yet understand multibyte locales; all +operations are byte-oriented rather than character-oriented (although +if your locale uses a single byte encoding, such as ISO-8859-1, you +will not notice a difference). However, `m4' is eight-bit clean, so +you can use non-ASCII characters in quoted strings (*note +Changequote::), comments (*note Changecom::), and macro names (*note +Indir::), with the exception of the NUL character (the zero byte +`'\0''). * Menu: @@ -835,6 +888,7 @@ the output--comments are _not_ discarded comment. The commenting effect of the begin-comment string can be inhibited by quoting it. + $ m4 `quoted text' # `commented text' =>quoted text # `commented text' `quoting inhibits' `#' `comments' @@ -1090,6 +1144,7 @@ specifically states that invoking those unspecified, because many other implementations simply invoke the builtin as though it were given one empty argument instead. + $ m4 eval =>eval eval(`1') @@ -1102,6 +1157,16 @@ on user defined macros. For example, wi write `m4_dnl' and even `m4_m4exit'. It also has no effect on whether a macro requires parameters. + $ m4 -P + eval + =>eval + eval(`1') + =>eval(1) + m4_eval + =>m4_eval + m4_eval(`1') + =>1 + Another alternative is to redefine problematic macros to a name less likely to cause conflicts, *Note Definitions::. @@ -1219,6 +1284,24 @@ an inappropriate number of arguments, bu m4: Operation modes.). For user defined macros, there is no check of the number of arguments given. + $ m4 + index(`abc') + error-->m4:stdin:1: Warning: too few arguments to builtin `index' + =>0 + index(`abc',) + =>0 + index(`abc', `b', `ignored') + error-->m4:stdin:3: Warning: excess arguments to builtin `index' ignored + =>1 + + $ m4 -Q + index(`abc') + =>0 + index(`abc',) + =>0 + index(`abc', `b', `ignored') + =>1 + Macros are expanded normally during argument collection, and whatever commas, quotes and parentheses that might show up in the resulting expanded text will serve to define the arguments as well. Thus, if FOO @@ -1315,12 +1398,14 @@ therefore result in more macros being ca completely or partially, in the first macro calls' expansion. Taking a very simple example, if FOO expands to `bar', and BAR -expands to `Hello world', the input +expands to `Hello', the input + $ m4 -Dbar=Hello -Dfoo=bar foo + =>Hello will expand first to `bar', and when this is reread and expanded, into -`Hello world'. +`Hello'.  File: m4.info, Node: Definitions, Next: Conditionals, Prev: Macros, Up: Top @@ -1906,6 +1991,7 @@ NAME, that will be reflected in the fina than the behavior when invoking macros directly, where the definition that was in effect before argument collection is used. + $ m4 -d define(`f', `1') => f(define(`f', `2')) @@ -1920,6 +2006,7 @@ that was in effect before argument colle arguments, `indir' defers to the invoked NAME for whether a token representing a builtin is recognized or flattened to the empty string. + $ m4 -d indir(defn(`defn'), `divnum') error-->m4:stdin:1: Warning: indir: invalid macro name ignored => @@ -1983,6 +2070,18 @@ even when the `--prefix-builtins' option Operation modes.) is in effect. This is different from `indir', which only tracks current macro names. + $ m4 -P + m4_builtin(`divnum') + =>0 + m4_builtin(`m4_divnum') + error-->m4:stdin:2: undefined builtin `m4_divnum' + => + m4_indir(`divnum') + error-->m4:stdin:3: undefined macro `divnum' + => + m4_indir(`m4_divnum') + =>0 + Note that `indir' and `builtin' can be used to invoke builtins without arguments, even when they normally require parameters to be recognized; but it will provoke a warning, and result in a void @@ -2197,9 +2296,10 @@ requires adding quotes to each element: levels of quoting are added around each element. An actual implementation of these three macros is distributed as -`m4-1.4.9/examples/quote.m4' in this package. First, let's examine +`m4-1.4.10/examples/quote.m4' in this package. First, let's examine their usage: + $ m4 -I examples include(`quote.m4') => -quote-dquote-dquote_elt- @@ -2228,6 +2328,7 @@ an empty first argument. `dquote', on t string no matter what, since it is still possible to tell whether it was invoked without arguments based on the resulting string. + $ m4 -I examples undivert(`quote.m4')dnl =>divert(`-1') =># quote(args) - convert args to single-quoted string @@ -2277,6 +2378,7 @@ Here is an example of a loop macro that It can, for example, be used for simple counting: + $ m4 -I examples include(`forloop.m4') => forloop(`i', `1', `8', `i ') @@ -2284,6 +2386,7 @@ Here is an example of a loop macro that For-loops can be nested, like: + $ m4 -I examples include(`forloop.m4') => forloop(`i', `1', `4', `forloop(`j', `1', `8', ` (i, j)') @@ -2306,8 +2409,9 @@ finished, it increments the iterator (us `incr', *note Incr::), and recurses. Here is an actual implementation of `forloop', distributed as -`m4-1.4.9/examples/forloop.m4' in this package: +`m4-1.4.10/examples/forloop.m4' in this package: + $ m4 -I examples undivert(`forloop.m4')dnl =>divert(`-1') =># forloop(var, from, to, stmt) - simple version @@ -2346,9 +2450,10 @@ Here is an example of a loop macro that As an example, this displays each word in a list inside of a sentence, using an implementation of `foreach' distributed as -`m4-1.4.9/examples/foreach.m4', and `foreachq' in -`m4-1.4.9/examples/foreachq.m4'. +`m4-1.4.10/examples/foreach.m4', and `foreachq' in +`m4-1.4.10/examples/foreachq.m4'. + $ m4 -I examples include(`foreach.m4') => foreach(`x', (foo, bar, foobar), `Word was: x @@ -2368,6 +2473,7 @@ sentence, using an implementation of `fo QUOTE-LIST can itself be a list, to pass as further arguments to a helper macro. This example generates a shell case statement: + $ m4 -I examples include(`foreach.m4') => define(`_case', ` $1) @@ -2393,6 +2499,7 @@ grab the first element of a list. Secon recursion, successively walking through the original list. Here is a simple implementation of `foreach': + $ m4 -I examples undivert(`foreach.m4')dnl =>divert(`-1') =># foreach(x, (item_1, item_2, ..., item_n), stmt) @@ -2415,6 +2522,7 @@ pass double-quoted macro names in a list output after one layer of quotes is removed during list iteration and the final layer removed during the final rescan: + $ m4 -I examples define(`a', `1')define(`b', `2')define(`c', `3') => include(`foreach.m4') @@ -2436,6 +2544,7 @@ the final layer removed during the final Obviously, `foreachq' did a better job; here is its implementation: + $ m4 -I examples undivert(`foreachq.m4')dnl =>include(`quote.m4')dnl =>divert(`-1') @@ -2495,6 +2604,7 @@ If you want to see what a name expands i The expansion of `dumpdef' is void. + $ m4 -d define(`foo', `Hello world.') => dumpdef(`foo') @@ -2509,6 +2619,7 @@ The definition that is dumped correspond macro were to be called at that point, even if other definitions are still live due to redefining a macro during argument collection. + $ m4 -d pushdef(`f', ``$0'1')pushdef(`f', ``$0'2') => f(popdef(`f')dumpdef(`f')) @@ -2547,6 +2658,7 @@ is not void, the expansion can be displa is printed to the current debug file (defaulting to standard error, *note Debug Output::). + $ m4 -d define(`foo', `Hello World.') => define(`echo', `$@') @@ -2564,12 +2676,27 @@ is printed to the current debug file (de most of the time, signifying an expansion at the outermost level, but it increases when macro arguments contain unquoted macro calls. The maximum number that will appear between dashes is controlled by the -option `--nesting-limit' (*note Invoking m4: Limits control.). +option `--nesting-limit' (or `-L', *note Invoking m4: Limits control.). +Additionally, the option `--trace' (or `-t') can be used to invoke +`traceon(NAME)' before parsing input. + + $ m4 -L 3 -t ifelse + ifelse(`one level') + error-->m4trace: -1- ifelse + => + ifelse(ifelse(ifelse(`three levels'))) + error-->m4trace: -3- ifelse + error-->m4trace: -2- ifelse + error-->m4trace: -1- ifelse + => + ifelse(ifelse(ifelse(ifelse(`four levels')))) + error-->m4:stdin:3: recursion limit of 3 exceeded, use -L to change it Tracing by name is an attribute that is preserved whether the macro -is defined or not. This allows the `-t' option to select macros to -trace before those macros are defined. +is defined or not. This allows the selection of macros to trace before +those macros are defined. + $ m4 -d traceoff(`foo') => traceon(`foo') @@ -2601,6 +2728,7 @@ trace before those macros are defined. Tracing even works on builtins. However, `defn' (*note Defn::) does not transfer tracing status. + $ m4 -d traceon(`eval', `m4_divnum') => define(`m4_eval', defn(`eval')) @@ -2701,6 +2829,7 @@ control of the debugging output format: The expansion of `debugmode' is void. + $ m4 define(`foo', `FOO') => traceon(`foo') @@ -2742,6 +2871,7 @@ or with the builtin macro `debugfile': The expansion of `debugfile' is void. + $ m4 traceon(`divnum') => divnum(`extra') @@ -3391,18 +3521,20 @@ There are two builtin macros in `m4' for The rest of this section assumes that `m4' is invoked with the `-I' option (*note Invoking m4: Preprocessor features.) pointing to the -`m4-1.4.9/examples' directory shipped as part of the GNU `m4' package. -The file `m4-1.4.9/examples/incl.m4' in the distribution contains the +`m4-1.4.10/examples' directory shipped as part of the GNU `m4' package. +The file `m4-1.4.10/examples/incl.m4' in the distribution contains the lines: - Include file start - foo - Include file end + $ cat examples/incl.m4 + =>Include file start + =>foo + =>Include file end Normally file inclusion is used to insert the contents of a file into the input stream. The contents of the file will be read by `m4' and macro calls in the file will be expanded: + $ m4 -I examples define(`foo', `FOO') => include(`incl.m4') @@ -3416,6 +3548,7 @@ file can be used to define macros that o is an example, which defines `bar' to expand to the contents of `incl.m4': + $ m4 -I examples define(`bar', include(`incl.m4')) => This is `bar': >>bar<< @@ -3660,8 +3793,13 @@ not get rearranged among the other diver GNU `m4' allows named files to be undiverted. Given a non-numeric argument, the contents of the file named will be copied, uninterpreted, to the current output. This complements the builtin `include' (*note -Include::). To illustrate the difference, the file -`m4-1.4.9/examples/foo' contains the word `bar': +Include::). To illustrate the difference, assume the file `foo' +contains: + + $ cat foo + bar + +then define(`bar', `BAR') => @@ -3673,7 +3811,18 @@ Include::). To illustrate the differenc => If the file is not found (or cannot be read), an error message is -issued, and the expansion is void. +issued, and the expansion is void. It is possible to intermix files +and diversion numbers. + + divert(`1')diversion one + divert(`2')undivert(`foo')dnl + divert(`3')diversion three + divert`'dnl + undivert(`1', `2', `foo', `3')dnl + =>diversion one + =>bar + =>bar + =>diversion three  File: m4.info, Node: Divnum, Next: Cleardivert, Prev: Undivert, Up: Diversions @@ -4064,14 +4213,25 @@ Formatted output can be made with `forma => format(`The string "%s" uses %d characters', foo, len(foo)) =>The string "The brown fox jumped over the lazy dog" uses 38 characters + format(`%*.*d', `-1', `-1', `1') + =>1 format(`%.0f', `56789.9876') =>56790 - len(format(`%-*X', `300', `1')) - =>300 + len(format(`%-*X', `5000', `1')) + =>5000 + ifelse(format(`%010F', `infinity'), ` INF', `success', + format(`%010F', `infinity'), ` INFINITY', `success', + format(`%010F', `infinity')) + =>success + ifelse(format(`%.1A', `1.999'), `0X1.0P+1', `success', + format(`%.1A', `1.999'), `0X2.0P+0', `success', + format(`%.1A', `1.999')) + =>success Using the `forloop' macro defined earlier (*note Forloop::), this example shows how `format' can be used to produce tabular output. + $ m4 -I examples include(`forloop.m4') => forloop(`i', `1', `10', `format(`%6d squared is %10d @@ -4090,15 +4250,26 @@ example shows how `format' can be used t The builtin `format' is modeled after the ANSI C `printf' function, and supports these `%' specifiers: `c', `s', `d', `o', `x', `X', `u', -`e', `E', `f', `F', `g', `G', and `%'; it supports field widths and -precisions, and the modifiers `+', `-', ` ', `0', `#', `h' and `l'. -For more details on the functioning of `printf', see the C Library -Manual. - - For now, unrecognized specifiers are silently ignored, but it is -anticipated that a future release of GNU `m4' will support more -specifiers, and give warnings when problems are encountered. Likewise, -escape sequences are not yet recognized. +`a', `A', `e', `E', `f', `F', `g', `G', and `%'; it supports field +widths and precisions, and the flags `+', `-', ` ', `0', `#', and `''. +For integer specifiers, the width modifiers `hh', `h', and `l' are +recognized, and for floating point specifiers, the width modifier `l' +is recognized. Items not yet supported include positional arguments, +the `n', `p', `S', and `C' specifiers, the `z', `t', `j', `L' and `ll' +modifiers, and any platform extensions available in the native +`printf'. For more details on the functioning of `printf', see the C +Library Manual, or the POSIX specification (for example, `%a' is +supported even on platforms that haven't yet implemented C99 +hexadecimal floating point output natively). + + Unrecognized specifiers result in a warning. It is anticipated that +a future release of GNU `m4' will support more specifiers, and give +better warnings when various problems such as overflow are encountered. +Likewise, escape sequences are not yet recognized. + + format(`%p', `0') + error-->m4:stdin:1: Warning: unrecognized specifier in `%p' + =>  File: m4.info, Node: Arithmetic, Next: Shell commands, Prev: Text handling, Up: Top @@ -4308,6 +4479,12 @@ relation return `0'. eval(`-3 * 5') =>-15 + eval(`-99 / 10') + =>-9 + eval(`-99 % 10') + =>-9 + eval(`99 % -10') + =>9 eval(index(`Hello world', `llo') >= 0) =>1 eval(`0r1:0111 + 0b100 + 0r3:12') @@ -4321,7 +4498,7 @@ relation return `0'. define(`foo', `666') => eval(`foo / 6') - error-->m4:stdin:8: bad expression in eval: foo / 6 + error-->m4:stdin:11: bad expression in eval: foo / 6 => eval(foo / 6) =>111 @@ -4501,13 +4678,17 @@ Any shell command can be executed, using Note how the expansion of `syscmd' keeps the trailing newline of the command, as well as using the newline that appeared after the macro. - As an example of SHELL-COMMAND using the same standard input as -`m4', the command line `echo "m4wrap(\`syscmd(\`cat')')" | m4' will -tell `m4' to read all of its input before executing the wrapped text, -then hand a valid (albeit emptied) pipe as standard input for the `cat' -subcommand. Therefore, you should be careful when using standard input -(either by specifying no files, or by passing `-' as a file name on the -command line, *note Invoking m4: Command line files.), and also + The following is an example of SHELL-COMMAND using the same standard +input as `m4': + + $ echo "m4wrap(\`syscmd(\`cat')')" | m4 + => + + It tells `m4' to read all of its input before executing the wrapped +text, then hand a valid (albeit emptied) pipe as standard input for the +`cat' subcommand. Therefore, you should be careful when using standard +input (either by specifying no files, or by passing `-' as a file name +on the command line, *note Invoking m4: Command line files.), and also invoking subcommands via `syscmd' or `esyscmd' that consume data from standard input. When standard input is a seekable file, the subprocess will pick up with the next character not yet processed by `m4'; when it @@ -4658,6 +4839,7 @@ file, for output or for some other purpo output for the two file names, since the replacement characters are randomly chosen: + $ m4 maketemp(`/tmp/fooXXXXXX') =>/tmp/fooa07346 ifdef(`mkstemp', `define(`maketemp', defn(`mkstemp'))', @@ -4675,6 +4857,7 @@ generate multiple files. However, we re `mkstemp' macro, introduced in GNU M4 1.4.8, which is secure even in traditional mode. + $ m4 syscmd(`echo foo??????')dnl =>foo?????? define(`file1', maketemp(`fooXXXXXX'))dnl @@ -4771,11 +4954,12 @@ the file name. The syncline option (`-s Preprocessor features.), and the `f' and `l' flags of `debugmode' (*note Debug Levels::), also use this notion of current file and line. Redefining the three location macros has no effect on syncline, debug, -or warning message output. Assume this example is run in the -`m4-1.4.9/checks' directory of the GNU M4 package, using -`--include=../examples' in the command line to find the file `incl.m4' -mentioned earlier: +warning, or error message output. + + This example reuses the file `incl.m4' mentioned earlier (*note +Include::): + $ m4 -I examples define(`foo', ``$0' called at __file__:__line__') => foo @@ -4912,20 +5096,20 @@ File: m4.info, Node: Using frozen files Suppose a user has a library of `m4' initializations in `base.m4', which is then used with multiple input files: - m4 base.m4 input1.m4 - m4 base.m4 input2.m4 - m4 base.m4 input3.m4 + $ m4 base.m4 input1.m4 + $ m4 base.m4 input2.m4 + $ m4 base.m4 input3.m4 Rather than spending time parsing the fixed contents of `base.m4' every time, the user might rather execute: - m4 -F base.m4f base.m4 + $ m4 -F base.m4f base.m4 once, and further execute, as often as needed: - m4 -R base.m4f input1.m4 - m4 -R base.m4f input2.m4 - m4 -R base.m4f input3.m4 + $ m4 -R base.m4f input1.m4 + $ m4 -R base.m4f input2.m4 + $ m4 -R base.m4f input3.m4 with the varying input. The first call, containing the `-F' option, only reads and executes file `base.m4', defining various application @@ -4948,15 +5132,15 @@ However, frozen files may be updated inc and `-F' options simultaneously. For example, if some care is taken, the command: - m4 file1.m4 file2.m4 file3.m4 file4.m4 + $ m4 file1.m4 file2.m4 file3.m4 file4.m4 could be broken down in the following sequence, accumulating the same output: - m4 -F file1.m4f file1.m4 - m4 -R file1.m4f -F file2.m4f file2.m4 - m4 -R file2.m4f -F file3.m4f file3.m4 - m4 -R file3.m4f file4.m4 + $ m4 -F file1.m4f file1.m4 + $ m4 -R file1.m4f -F file2.m4f file2.m4 + $ m4 -R file2.m4f -F file3.m4f file3.m4 + $ m4 -R file3.m4f file4.m4 Some care is necessary because not every effort has been made for this to work in all cases. In particular, the trace attribute of @@ -5041,7 +5225,7 @@ characters. The directives are: the same name, and its order, along with `F', is important. `V NUMBER ' - Confirms the format of the file. `m4' 1.4.9 only creates and + Confirms the format of the file. `m4' 1.4.10 only creates and understands frozen files where NUMBER is 1. This directive must be the first non-comment in the file, and may not appear more than once. @@ -5192,7 +5376,7 @@ behaviors is non-portable, as a future r all arguments, with output separated by spaces. However, it is possible to emulate POSIX behavior by including the - file `m4-1.4.9/examples/wrapfifo.m4' from the distribution: + file `m4-1.4.10/examples/wrapfifo.m4' from the distribution: undivert(`wrapfifo.m4')dnl =>dnl Redefine m4wrap to have FIFO semantics. @@ -5336,7 +5520,26 @@ There are a few other incompatibilities The sync line option is used mostly when using `m4' as a front end to a compiler. If a diverted line causes a compiler error, the error messages should most probably refer to the place where the - diversion were made, and not where it was inserted again. + diversion was made, and not where it was inserted again. + + divert(2)2 + divert(1)1 + divert`'0 + =>#line 3 "stdin" + =>0 + ^D + =>#line 2 "stdin" + =>1 + =>#line 1 "stdin" + =>2 + + The current `m4' implementation has a limitation that the syncline + output at the start of each diversion occurs no matter what, even + if the previous diversion did not end with a newline. This goes + contrary to the claim that synclines appear on a line by + themselves, so this limitation may be corrected in a future + version of `m4'. In the meantime, when using `-s', it is wisest + to make sure all diversions end with newline. * GNU `m4' makes no attempt at prohibiting self-referential definitions like: @@ -5361,7 +5564,7 @@ There are a few other incompatibilities endless loops in traditional programming languages.  -File: m4.info, Node: Answers, Next: Copying This Manual, Prev: Compatibility, Up: Top +File: m4.info, Node: Answers, Next: Copying This Package, Prev: Compatibility, Up: Top 17 Correct version of some examples *********************************** @@ -5407,10 +5610,11 @@ The `forloop' macro (*note Forloop::) as an infinite loop if given an iterator that is not parsed as a macro name. It does not do any sanity checking on its numeric bounds, and only permits decimal numbers for bounds. Here is an improved version, -shipped as `m4-1.4.9/examples/forloop2.m4'; this version also optimizes -based on the fact that the starting bound does not need to be passed to -the helper `_forloop'. +shipped as `m4-1.4.10/examples/forloop2.m4'; this version also +optimizes based on the fact that the starting bound does not need to be +passed to the helper `_forloop'. + $ m4 -I examples undivert(`forloop2.m4')dnl =>divert(`-1') =># forloop(var, from, to, stmt) - improved version: @@ -5451,6 +5655,7 @@ The `foreach' and `foreachq' macros (*no earlier each have flaws. First, we will examine and fix the quadratic behavior of `foreachq': + $ m4 -I examples include(`foreachq.m4') => traceon(`shift')debugmode(`aq') @@ -5485,8 +5690,9 @@ recursion use fewer arguments, rather th uses of `shift'. By doing so, `m4' uses less memory, invokes fewer macros, is less likely to run into machine limits, and most importantly, performs faster. The fixed version of `foreachq' can be -found in `m4-1.4.9/examples/foreachq2.m4': +found in `m4-1.4.10/examples/foreachq2.m4': + $ m4 -I examples include(`foreachq2.m4') => undivert(`foreachq2.m4')dnl @@ -5520,11 +5726,12 @@ Contrast the use of `_arg1q', which quot element directly. For a different approach, the improved version of `foreach', -available in `m4-1.4.9/examples/foreach2.m4', simply overquotes the +available in `m4-1.4.10/examples/foreach2.m4', simply overquotes the arguments to `_foreach' to begin with, using `dquote_elt'. Then `_foreach' can just use `_arg1' to remove the extra layer of quoting that was added up front: + $ m4 -I examples include(`foreach2.m4') => undivert(`foreach2.m4')dnl @@ -5566,6 +5773,7 @@ list elements twice while visiting the f one must take into account whether repeating the side effects of unquoted list elements will have any detrimental effects. + $ m4 -I examples include(`foreach2.m4') => include(`foreachq2.m4') @@ -5695,11 +5903,753 @@ series, a better implementation would be error-->m4:stdin:6: fatal error: inside wrapped text  -File: m4.info, Node: Copying This Manual, Next: Indices, Prev: Answers, Up: Top +File: m4.info, Node: Copying This Package, Next: Copying This Manual, Prev: Answers, Up: Top + +Appendix A How to make copies of the overall M4 package +******************************************************* + +This appendix covers the license for copying the source code of the +overall M4 package. This manual is under a different set of +restrictions, covered later (*note Copying This Manual::). + +* Menu: + +* Copying:: GNU General Public License + + +File: m4.info, Node: Copying, Up: Copying This Package + +A.1 GNU General Public License +============================== + + Version 3, 29 June 2007 -Appendix A How to make copies of this manual + Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/' + + 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. + + ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. + Copyright (C) YEAR NAME OF AUTHOR + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 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 `http://www.gnu.org/licenses/'. + + 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: + + PROGRAM Copyright (C) YEAR NAME OF AUTHOR + 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 `http://www.gnu.org/licenses/'. + + 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 `http://www.gnu.org/philosophy/why-not-lgpl.html'. + + +File: m4.info, Node: Copying This Manual, Next: Indices, Prev: Copying This Package, Up: Top + +Appendix B How to make copies of this manual ******************************************** +This appendix covers the license for copying this manual. Note that +some of the longer examples in this manual are also distributed in the +directory `m4-1.4.10/examples/', where a more permissive license is in +effect when copying just the examples. + * Menu: * GNU Free Documentation License:: License for copying this manual @@ -5707,7 +6657,7 @@ Appendix A How to make copies of this ma  File: m4.info, Node: GNU Free Documentation License, Up: Copying This Manual -A.1 GNU Free Documentation License +B.1 GNU Free Documentation License ================================== Version 1.2, November 2002 @@ -6139,7 +7089,7 @@ permit their use in free software.  File: m4.info, Node: Indices, Prev: Copying This Manual, Up: Top -Appendix B Indices of concepts and macros +Appendix C Indices of concepts and macros ***************************************** * Menu: @@ -6150,7 +7100,7 @@ Appendix B Indices of concepts and macro  File: m4.info, Node: Macro index, Next: Concept index, Up: Indices -B.1 Index for all `m4' macros +C.1 Index for all `m4' macros ============================= This index covers all `m4' builtins, as well as several useful @@ -6167,7 +7117,7 @@ macro is introduced the first time. * __program__: Location. (line 12) * __unix__: Platform macros. (line 15) * __windows__: Platform macros. (line 17) -* argn: Shift. (line 110) +* argn: Shift. (line 112) * array: Define. (line 56) * array_set: Define. (line 57) * builtin: Builtin. (line 9) @@ -6191,7 +7141,7 @@ macro is introduced the first time. * errprint: Errprint. (line 9) * esyscmd: Esyscmd. (line 9) * eval: Eval. (line 9) -* example: Manual. (line 32) +* example: Manual. (line 40) * exch: Arguments. (line 13) * fatal_error: M4exit. (line 25) * foreach: Foreach. (line 9) @@ -6234,7 +7184,7 @@ macro is introduced the first time.  File: m4.info, Node: Concept index, Prev: Macro index, Up: Indices -B.2 Index for many concepts +C.2 Index for many concepts =========================== [index] @@ -6244,16 +7194,16 @@ B.2 Index for many concepts * arguments to macros: Arguments. (line 6) * arguments to macros, special: Pseudo Arguments. (line 6) * arguments, more than nine <1>: Arguments. (line 54) -* arguments, more than nine: Shift. (line 104) +* arguments, more than nine: Shift. (line 106) * arguments, quoted macro: Quoting Arguments. (line 6) * arithmetic: Arithmetic. (line 6) * arrays: Define. (line 52) -* avoiding quadratic behavior: Improved foreach. (line 37) -* basic regular expressions <1>: Regexp. (line 6) -* basic regular expressions: Patsubst. (line 6) -* blind macro <1>: Ifelse. (line 52) -* blind macro: Inhibiting Invocation. +* avoiding quadratic behavior: Improved foreach. (line 38) +* basic regular expressions <1>: Patsubst. (line 6) +* basic regular expressions: Regexp. (line 6) +* blind macro <1>: Inhibiting Invocation. (line 14) +* blind macro: Ifelse. (line 52) * bug reports: Bugs. (line 6) * builtins, indirect call of: Builtin. (line 6) * builtins, special tokens: Defn. (line 79) @@ -6291,12 +7241,12 @@ B.2 Index for many concepts * definitions, displaying macro: Defn. (line 6) * deleting macros: Undefine. (line 6) * deleting whitespace in input: Dnl. (line 6) -* delimiters, changing <1>: Changecom. (line 6) -* delimiters, changing: Changequote. (line 6) +* delimiters, changing <1>: Changequote. (line 6) +* delimiters, changing: Changecom. (line 6) * discarding diverted text: Cleardivert. (line 6) -* discarding input <1>: Ifelse. (line 6) -* discarding input <2>: Divert. (line 42) -* discarding input: Dnl. (line 6) +* discarding input <1>: Dnl. (line 6) +* discarding input <2>: Ifelse. (line 6) +* discarding input: Divert. (line 42) * displaying macro definitions: Dumpdef. (line 6) * diversion numbers: Divnum. (line 6) * diverted text, discarding: Cleardivert. (line 6) @@ -6321,8 +7271,8 @@ B.2 Index for many concepts * FDL, GNU Free Documentation License: GNU Free Documentation License. (line 6) * file format, frozen file: Frozen file format. (line 6) -* file inclusion <1>: Undivert. (line 13) -* file inclusion: File Inclusion. (line 6) +* file inclusion <1>: File Inclusion. (line 6) +* file inclusion: Undivert. (line 13) * file names, on the command line: Command line files. (line 6) * files, diverting output to: Divert. (line 6) * files, names of temporary: Mkstemp. (line 6) @@ -6331,25 +7281,26 @@ B.2 Index for many concepts * formatted output: Format. (line 6) * frozen file format: Frozen file format. (line 6) * frozen files for fast loading: Using frozen files. (line 6) -* GNU extensions <1>: Mkstemp. (line 55) -* GNU extensions <2>: Divert. (line 54) -* GNU extensions <3>: Undivert. (line 81) -* GNU extensions <4>: Patsubst. (line 6) -* GNU extensions <5>: Inhibiting Invocation. +* GNU extensions <1>: Inhibiting Invocation. (line 14) -* GNU extensions <6>: Builtin. (line 6) -* GNU extensions <7>: Esyscmd. (line 6) -* GNU extensions <8>: Eval. (line 125) -* GNU extensions <9>: Extensions. (line 6) -* GNU extensions <10>: Debug Output. (line 6) -* GNU extensions <11>: Arguments. (line 54) -* GNU extensions <12>: Format. (line 6) -* GNU extensions <13>: Debug Levels. (line 71) -* GNU extensions <14>: Search Path. (line 6) -* GNU extensions <15>: Indir. (line 6) -* GNU extensions <16>: Define. (line 41) -* GNU extensions <17>: Using frozen files. (line 6) -* GNU extensions: Regexp. (line 6) +* GNU extensions <2>: Search Path. (line 6) +* GNU extensions <3>: Divert. (line 54) +* GNU extensions <4>: Undivert. (line 13) +* GNU extensions <5>: Esyscmd. (line 6) +* GNU extensions <6>: Regexp. (line 6) +* GNU extensions <7>: Builtin. (line 6) +* GNU extensions <8>: Using frozen files. (line 6) +* GNU extensions <9>: Debug Output. (line 6) +* GNU extensions <10>: Define. (line 41) +* GNU extensions <11>: Debug Levels. (line 71) +* GNU extensions <12>: Eval. (line 125) +* GNU extensions <13>: Patsubst. (line 6) +* GNU extensions <14>: Mkstemp. (line 56) +* GNU extensions <15>: Undivert. (line 81) +* GNU extensions <16>: Format. (line 6) +* GNU extensions <17>: Extensions. (line 6) +* GNU extensions <18>: Arguments. (line 54) +* GNU extensions: Indir. (line 6) * GNU M4, history of: History. (line 6) * history of m4: History. (line 6) * included files, search path for: Search Path. (line 6) @@ -6359,9 +7310,9 @@ B.2 Index for many concepts * indirect call of builtins: Builtin. (line 6) * indirect call of macros: Indir. (line 6) * initialization, frozen state: Using frozen files. (line 6) -* input location <1>: Preprocessor features. +* input location <1>: Location. (line 6) +* input location: Preprocessor features. (line 28) -* input location: Location. (line 6) * input tokens: Syntax. (line 6) * input, discarding <1>: Divert. (line 42) * input, discarding <2>: Ifelse. (line 6) @@ -6374,13 +7325,15 @@ B.2 Index for many concepts * iterating over lists: Foreach. (line 6) * length of strings: Len. (line 6) * lexical structure of words: Changeword. (line 6) -* License: Copying This Manual. (line 6) +* License, code: Copying This Package. + (line 6) +* License, manual: Copying This Manual. (line 6) * limit, nesting: Limits control. (line 27) * literal output: Pseudo Arguments. (line 106) * local variables: Pushdef. (line 79) -* location, input <1>: Location. (line 6) -* location, input: Preprocessor features. +* location, input <1>: Preprocessor features. (line 28) +* location, input: Location. (line 6) * loops: Shift. (line 10) * loops, counting: Forloop. (line 6) * loops, list iteration: Foreach. (line 6) @@ -6395,8 +7348,8 @@ B.2 Index for many concepts * macros, arguments to <1>: Macro Arguments. (line 6) * macros, arguments to: Arguments. (line 6) * macros, debugging: Debugging. (line 6) -* macros, displaying definitions <1>: Dumpdef. (line 6) -* macros, displaying definitions: Defn. (line 6) +* macros, displaying definitions <1>: Defn. (line 6) +* macros, displaying definitions: Dumpdef. (line 6) * macros, expansion of: Macro expansion. (line 6) * macros, how to define new: Definitions. (line 6) * macros, how to delete: Undefine. (line 6) @@ -6408,13 +7361,13 @@ B.2 Index for many concepts * macros, temporary redefinition of: Pushdef. (line 6) * messages, printing error: Errprint. (line 6) * more than nine arguments <1>: Arguments. (line 54) -* more than nine arguments: Shift. (line 104) +* more than nine arguments: Shift. (line 106) * multibranches: Ifelse. (line 66) * names: Names. (line 6) * nesting limit: Limits control. (line 27) -* nine arguments, more than <1>: Shift. (line 104) +* nine arguments, more than <1>: Shift. (line 106) * nine arguments, more than: Arguments. (line 54) -* numbers: Manual. (line 49) +* numbers: Manual. (line 57) * options, command line: Invoking m4. (line 10) * output, diverting to files: Divert. (line 6) * output, formatted: Format. (line 6) @@ -6429,7 +7382,7 @@ B.2 Index for many concepts * preprocessor features: Preprocessor features. (line 6) * printing error messages: Errprint. (line 6) -* quadratic behavior, avoiding: Improved foreach. (line 37) +* quadratic behavior, avoiding: Improved foreach. (line 38) * quote delimiters, changing: Changequote. (line 6) * quoted macro arguments: Quoting Arguments. (line 6) * quoted string: Quoted strings. (line 6) @@ -6442,13 +7395,13 @@ B.2 Index for many concepts * reloading a frozen file: Using frozen files. (line 6) * renaming macros: Defn. (line 6) * reporting bugs: Bugs. (line 6) -* rescanning <1>: Other Incompatibilities. - (line 33) -* rescanning <2>: Pseudo Arguments. (line 106) -* rescanning <3>: Inhibiting Invocation. - (line 76) -* rescanning <4>: Limits control. (line 40) -* rescanning: Defn. (line 59) +* rescanning <1>: Pseudo Arguments. (line 106) +* rescanning <2>: Defn. (line 59) +* rescanning <3>: Other Incompatibilities. + (line 52) +* rescanning <4>: Inhibiting Invocation. + (line 87) +* rescanning: Limits control. (line 40) * rule of thumb, quoting: Quoting Arguments. (line 22) * running shell commands: Shell commands. (line 6) * saving debugging output: Debug Output. (line 6) @@ -6458,9 +7411,9 @@ B.2 Index for many concepts * shell commands, running: Shell commands. (line 6) * special arguments to macros: Pseudo Arguments. (line 6) * stack, macro definition: Pushdef. (line 6) -* standard error, output to <1>: Dumpdef. (line 6) +* standard error, output to <1>: Trace. (line 6) * standard error, output to <2>: Errprint. (line 6) -* standard error, output to: Trace. (line 6) +* standard error, output to: Dumpdef. (line 6) * status of shell commands: Sysval. (line 6) * status, setting m4 exit: M4exit. (line 6) * string, quoted: Quoted strings. (line 6) @@ -6493,104 +7446,106 @@ B.2 Index for many concepts  Tag Table: -Node: Top843 -Node: Preliminaries9202 -Node: Intro9888 -Node: History11520 -Node: Bugs14233 -Node: Manual15484 -Node: Invoking m418470 -Node: Operation modes20618 -Node: Preprocessor features23590 -Node: Limits control26054 -Node: Frozen state28990 -Node: Debugging options29789 -Node: Command line files31528 -Node: Syntax32891 -Node: Names34000 -Node: Quoted strings34462 -Node: Comments35111 -Node: Other tokens35978 -Node: Input processing36556 -Ref: Input processing-Footnote-144229 -Node: Macros44424 -Node: Invocation44918 -Node: Inhibiting Invocation45719 -Node: Macro Arguments49668 -Node: Quoting Arguments52360 -Node: Macro expansion54483 -Node: Definitions55151 -Node: Define55936 -Node: Arguments58374 -Node: Pseudo Arguments62046 -Node: Undefine65588 -Node: Defn66718 -Node: Pushdef69451 -Node: Indir72077 -Node: Builtin74179 -Node: Conditionals75941 -Node: Ifdef76760 -Node: Ifelse77623 -Node: Shift80836 -Node: Forloop85291 -Node: Foreach87860 -Node: Debugging92839 -Node: Dumpdef93424 -Node: Trace94808 -Node: Debug Levels97511 -Node: Debug Output100971 -Node: Input Control102242 -Node: Dnl102779 -Node: Changequote104680 -Node: Changecom109476 -Node: Changeword112992 -Node: M4wrap118433 -Node: File Inclusion120694 -Node: Include121011 -Node: Search Path123611 -Node: Diversions124528 -Node: Divert126319 -Node: Undivert128845 -Node: Divnum131727 -Node: Cleardivert132191 -Node: Text handling133396 -Node: Len134119 -Node: Index macro134504 -Node: Regexp135275 -Node: Substr137695 -Node: Translit138746 -Node: Patsubst141468 -Node: Format145009 -Node: Arithmetic147108 -Node: Incr147557 -Node: Eval148332 -Node: Shell commands156199 -Node: Platform macros157121 -Node: Syscmd158865 -Node: Esyscmd160670 -Node: Sysval161718 -Node: Mkstemp163336 -Node: Miscellaneous166733 -Node: Errprint167166 -Node: Location168385 -Node: M4exit171187 -Node: Frozen files173274 -Node: Using frozen files174055 -Node: Frozen file format177295 -Node: Compatibility180358 -Node: Extensions180973 -Node: Incompatibilities184795 -Node: Other Incompatibilities193002 -Node: Answers194985 -Node: Improved exch195602 -Node: Improved forloop196140 -Node: Improved foreach197976 -Node: Improved cleardivert204915 -Node: Improved fatal_error205898 -Node: Copying This Manual206960 -Node: GNU Free Documentation License207216 -Node: Indices229610 -Node: Macro index229890 -Node: Concept index235324 +Node: Top851 +Node: Preliminaries9359 +Node: Intro10045 +Node: History11677 +Node: Bugs14401 +Node: Manual15652 +Node: Invoking m419050 +Node: Operation modes21198 +Node: Preprocessor features24170 +Node: Limits control27267 +Node: Frozen state30203 +Node: Debugging options31002 +Node: Command line files32741 +Node: Syntax34314 +Node: Names35433 +Node: Quoted strings35895 +Node: Comments36544 +Node: Other tokens37421 +Node: Input processing37999 +Ref: Input processing-Footnote-145672 +Node: Macros45867 +Node: Invocation46361 +Node: Inhibiting Invocation47162 +Node: Macro Arguments51242 +Node: Quoting Arguments54304 +Node: Macro expansion56427 +Node: Definitions57128 +Node: Define57913 +Node: Arguments60351 +Node: Pseudo Arguments64023 +Node: Undefine67565 +Node: Defn68695 +Node: Pushdef71428 +Node: Indir74054 +Node: Builtin76182 +Node: Conditionals78203 +Node: Ifdef79022 +Node: Ifelse79885 +Node: Shift83098 +Node: Forloop87598 +Node: Foreach90234 +Node: Debugging95325 +Node: Dumpdef95910 +Node: Trace97320 +Node: Debug Levels100540 +Node: Debug Output104010 +Node: Input Control105291 +Node: Dnl105828 +Node: Changequote107729 +Node: Changecom112525 +Node: Changeword116041 +Node: M4wrap121482 +Node: File Inclusion123743 +Node: Include124060 +Node: Search Path126740 +Node: Diversions127657 +Node: Divert129448 +Node: Undivert131974 +Node: Divnum135138 +Node: Cleardivert135602 +Node: Text handling136807 +Node: Len137530 +Node: Index macro137915 +Node: Regexp138686 +Node: Substr141106 +Node: Translit142157 +Node: Patsubst144879 +Node: Format148420 +Node: Arithmetic151574 +Node: Incr152023 +Node: Eval152798 +Node: Shell commands160761 +Node: Platform macros161683 +Node: Syscmd163427 +Node: Esyscmd165246 +Node: Sysval166294 +Node: Mkstemp167912 +Node: Miscellaneous171329 +Node: Errprint171762 +Node: Location172981 +Node: M4exit175710 +Node: Frozen files177797 +Node: Using frozen files178578 +Node: Frozen file format181842 +Node: Compatibility184906 +Node: Extensions185521 +Node: Incompatibilities189343 +Node: Other Incompatibilities197551 +Node: Answers200197 +Node: Improved exch200815 +Node: Improved forloop201353 +Node: Improved foreach203212 +Node: Improved cleardivert210241 +Node: Improved fatal_error211224 +Node: Copying This Package212286 +Node: Copying212757 +Node: Copying This Manual250280 +Node: GNU Free Documentation License250800 +Node: Indices273194 +Node: Macro index273474 +Node: Concept index278908  End Tag Table diff -ruNp m4-1.4.9/doc/m4.texinfo m4-1.4.10/doc/m4.texinfo --- m4-1.4.9/doc/m4.texinfo 2007-03-23 06:40:02.000000000 -0600 +++ m4-1.4.10/doc/m4.texinfo 2007-07-04 21:56:03.000000000 -0600 @@ -55,7 +55,7 @@ entitled ``@acronym{GNU} Free Documentat @end quotation @end copying -@dircategory GNU programming tools +@dircategory Text creation and manipulation @direntry * M4: (m4). A powerful macro processor. @end direntry @@ -137,6 +137,7 @@ changeword will go away and @emph{you sh * Compatibility:: Compatibility with other versions of @code{m4} * Answers:: Correct version of some examples +* Copying This Package:: How to make copies of the overall M4 package * Copying This Manual:: How to make copies of this manual * Indices:: Indices of concepts and macros @@ -270,8 +271,9 @@ Correct version of some examples * Improved cleardivert:: Solution for @code{cleardivert} * Improved fatal_error:: Solution for @code{fatal_error} -How to make copies of this manual +How to make copies of this package or manual +* Copying:: GNU General Public License * GNU Free Documentation License:: License for copying this manual Indices of concepts and macros @@ -385,8 +387,8 @@ addressed some long standing bugs in the @acronym{GNU} @code{m4} 1.4 that were floating around the net and released 1.4.3 and 1.4.4. And in 2006, Eric Blake joined the team and prepared patches for the release of 1.4.5, 1.4.6, 1.4.7, and 1.4.8. The -1.4.x series remains open for bug fixes, including release 1.4.9 in -2007. +1.4.x series remains open for bug fixes, including release 1.4.9 and +1.4.10 in 2007. Meanwhile, development has continued on new features for @code{m4}, such as dynamic module loading and additional builtins. When complete, @@ -437,10 +439,14 @@ This is an example of an example! To distinguish input from output, all output from @code{m4} is prefixed by the string @samp{@result{}}, and all error messages by the string -@samp{@error{}}. Thus +@samp{@error{}}. When showing how command line options affect matters, +the command line is shown with a prompt @samp{$ @kbd{like this}}, +otherwise, you can assume that a simple @kbd{m4} invocation will work. +Thus: @comment ignore @example +$ @kbd{command line to invoke m4} Example of input line @result{}Output line from m4 @error{}and an error message @@ -451,7 +457,14 @@ file. The sequence @samp{@key{NL}} refe The majority of these examples are self-contained, and you can run them with similar results by invoking @kbd{m4 -d}. In fact, the testsuite that is bundled in the @acronym{GNU} M4 package consists of the examples -in this document! +in this document! Some of the examples assume that your current +directory is located where you unpacked the installation, so if you plan +on following along, you may find it helpful to do this now: + +@comment ignore +@example +$ @kbd{cd m4-@value{VERSION}} +@end example As each of the predefined macros in @code{m4} is described, a prototype call of the macro will be shown, giving descriptive names to the @@ -664,7 +677,42 @@ the file name did not change from the pr Synchronization directives are always given on complete lines by themselves. When a synchronization discrepancy occurs in the middle of an output line, the associated synchronization directive is delayed -until the beginning of the next generated line. +until the next newline that does not occur in the middle of a quoted +string or comment. + +@comment options: -s +@example +define(`twoline', `1 +2') +@result{}#line 2 "stdin" +@result{} +changecom(`/*', `*/') +@result{} +define(`comment', `/*1 +2*/') +@result{}#line 5 +@result{} +dnl no line +hello +@result{}#line 7 +@result{}hello +twoline +@result{}1 +@result{}#line 8 +@result{}2 +comment +@result{}/*1 +@result{}2*/ +one comment `two +three' +@result{}#line 10 +@result{}one /*1 +@result{}2*/ two +@result{}three +goodbye +@result{}#line 12 +@result{}goodbye +@end example @item -U @var{NAME} @itemx --undefine=@var{NAME} @@ -824,7 +872,24 @@ string. The options @option{--define} (@option{-D}), @option{--undefine} (@option{-U}), @option{--synclines} (@option{-s}), and @option{--trace} (@option{-t}) only take effect after processing input from any file -names that occur earlier on the command line. +names that occur earlier on the command line. For example, assume the +file @file{foo} contains: + +@comment ignore +@example +$ @kbd{cat foo} +bar +@end example + +The text @samp{bar} can then be redefined over multiple uses of +@file{foo}: + +@comment options: -Dbar=hello foo -Dbar=world foo +@example +$ @kbd{m4 -Dbar=hello foo -Dbar=world foo} +@result{}hello +@result{}world +@end example If none of the input files invoked @code{m4exit} (@pxref{M4exit}), the exit status of @code{m4} will be 0 for success, 1 for general failure @@ -844,7 +909,7 @@ As @code{m4} reads its input, it separat token is either a name, a quoted string, or any single character, that is not a part of either a name or a string. Input to @code{m4} can also contain comments. @acronym{GNU} @code{m4} does not yet understand -locales; all operations are byte-oriented rather than +multibyte locales; all operations are byte-oriented rather than character-oriented (although if your locale uses a single byte encoding, such as @sc{ISO-8859-1}, you will not notice a difference). However, @code{m4} is eight-bit clean, so you can @@ -916,6 +981,7 @@ the comment. The commenting effect of t can be inhibited by quoting it. @example +$ @kbd{m4} `quoted text' # `commented text' @result{}quoted text # `commented text' `quoting inhibits' `#' `comments' @@ -1202,6 +1268,7 @@ implementations simply invoke the builti empty argument instead. @example +$ @kbd{m4} eval @result{}eval eval(`1') @@ -1215,6 +1282,19 @@ no effect whatsoever on user defined mac one has to write @code{m4_dnl} and even @code{m4_m4exit}. It also has no effect on whether a macro requires parameters. +@comment options: -P +@example +$ @kbd{m4 -P} +eval +@result{}eval +eval(`1') +@result{}eval(1) +m4_eval +@result{}m4_eval +m4_eval(`1') +@result{}1 +@end example + Another alternative is to redefine problematic macros to a name less likely to cause conflicts, @xref{Definitions}. @@ -1349,6 +1429,29 @@ the @option{--quiet} command line option @option{-Q}, @pxref{Operation modes, , Invoking m4}). For user defined macros, there is no check of the number of arguments given. +@example +$ @kbd{m4} +index(`abc') +@error{}m4:stdin:1: Warning: too few arguments to builtin `index' +@result{}0 +index(`abc',) +@result{}0 +index(`abc', `b', `ignored') +@error{}m4:stdin:3: Warning: excess arguments to builtin `index' ignored +@result{}1 +@end example + +@comment options: -Q +@example +$ @kbd{m4 -Q} +index(`abc') +@result{}0 +index(`abc',) +@result{}0 +index(`abc', `b', `ignored') +@result{}1 +@end example + Macros are expanded normally during argument collection, and whatever commas, quotes and parentheses that might show up in the resulting expanded text will serve to define the arguments as well. Thus, if @@ -1465,16 +1568,18 @@ therefore result in more macros being ca completely or partially, in the first macro calls' expansion. Taking a very simple example, if @var{foo} expands to @samp{bar}, and -@var{bar} expands to @samp{Hello world}, the input +@var{bar} expands to @samp{Hello}, the input -@comment ignore +@comment options: -Dbar=Hello -Dfoo=bar @example +$ @kbd{m4 -Dbar=Hello -Dfoo=bar} foo +@result{}Hello @end example @noindent will expand first to @samp{bar}, and when this is reread and -expanded, into @samp{Hello world}. +expanded, into @samp{Hello}. @node Definitions @chapter How to define new macros @@ -2148,6 +2253,7 @@ where the definition that was in effect used. @example +$ @kbd{m4 -d} define(`f', `1') @result{} f(define(`f', `2')) @@ -2165,6 +2271,7 @@ token representing a builtin is recogniz string. @example +$ @kbd{m4 -d} indir(defn(`defn'), `divnum') @error{}m4:stdin:1: Warning: indir: invalid macro name ignored @result{} @@ -2233,6 +2340,21 @@ even when the @option{--prefix-builtins} @pxref{Operation modes, , Invoking m4}) is in effect. This is different from @code{indir}, which only tracks current macro names. +@comment options: -P +@example +$ @kbd{m4 -P} +m4_builtin(`divnum') +@result{}0 +m4_builtin(`m4_divnum') +@error{}m4:stdin:2: undefined builtin `m4_divnum' +@result{} +m4_indir(`divnum') +@error{}m4:stdin:3: undefined macro `divnum' +@result{} +m4_indir(`m4_divnum') +@result{}0 +@end example + Note that @code{indir} and @code{builtin} can be used to invoke builtins without arguments, even when they normally require parameters to be recognized; but it will provoke a warning, and result in a void expansion. @@ -2473,6 +2595,7 @@ An actual implementation of these three let's examine their usage: @example +$ @kbd{m4 -I examples} include(`quote.m4') @result{} -quote-dquote-dquote_elt- @@ -2504,6 +2627,7 @@ possible to tell whether it was invoked resulting string. @example +$ @kbd{m4 -I examples} undivert(`quote.m4')dnl @result{}divert(`-1') @result{}# quote(args) - convert args to single-quoted string @@ -2564,6 +2688,7 @@ invocation is restored. It can, for example, be used for simple counting: @example +$ @kbd{m4 -I examples} include(`forloop.m4') @result{} forloop(`i', `1', `8', `i ') @@ -2573,6 +2698,7 @@ forloop(`i', `1', `8', `i ') For-loops can be nested, like: @example +$ @kbd{m4 -I examples} include(`forloop.m4') @result{} forloop(`i', `1', `4', `forloop(`j', `1', `8', ` (i, j)') @@ -2599,6 +2725,7 @@ Here is an actual implementation of @cod @file{m4-@value{VERSION}/@/examples/@/forloop.m4} in this package: @example +$ @kbd{m4 -I examples} undivert(`forloop.m4')dnl @result{}divert(`-1') @result{}# forloop(var, from, to, stmt) - simple version @@ -2644,6 +2771,7 @@ using an implementation of @code{foreach in @file{m4-@value{VERSION}/@/examples/@/foreachq.m4}. @example +$ @kbd{m4 -I examples} include(`foreach.m4') @result{} foreach(`x', (foo, bar, foobar), `Word was: x @@ -2665,6 +2793,7 @@ or @var{quote-list} can itself be a list to a helper macro. This example generates a shell case statement: @example +$ @kbd{m4 -I examples} include(`foreach.m4') @result{} define(`_case', ` $1) @@ -2693,6 +2822,7 @@ through the original list. Here is a si @code{foreach}: @example +$ @kbd{m4 -I examples} undivert(`foreach.m4')dnl @result{}divert(`-1') @result{}# foreach(x, (item_1, item_2, ..., item_n), stmt) @@ -2718,6 +2848,7 @@ during list iteration and the final laye rescan: @example +$ @kbd{m4 -I examples} define(`a', `1')define(`b', `2')define(`c', `3') @result{} include(`foreach.m4') @@ -2741,6 +2872,7 @@ foreachq(`x', ```a'', ``(b'', ``c)''', ` Obviously, @code{foreachq} did a better job; here is its implementation: @example +$ @kbd{m4 -I examples} undivert(`foreachq.m4')dnl @result{}include(`quote.m4')dnl @result{}divert(`-1') @@ -2803,6 +2935,7 @@ The expansion of @code{dumpdef} is void. @end deffn @example +$ @kbd{m4 -d} define(`foo', `Hello world.') @result{} dumpdef(`foo') @@ -2819,6 +2952,7 @@ macro were to be called at that point, e still live due to redefining a macro during argument collection. @example +$ @kbd{m4 -d} pushdef(`f', ``$0'1')pushdef(`f', ``$0'2') @result{} f(popdef(`f')dumpdef(`f')) @@ -2861,6 +2995,7 @@ to the current debug file (defaulting to Output}). @example +$ @kbd{m4 -d} define(`foo', `Hello World.') @result{} define(`echo', `$@@') @@ -2879,13 +3014,33 @@ The number between dashes is the depth o of the time, signifying an expansion at the outermost level, but it increases when macro arguments contain unquoted macro calls. The maximum number that will appear between dashes is controlled by the -option @option{--nesting-limit} (@pxref{Limits control, , Invoking m4}). +option @option{--nesting-limit} (or @option{-L}, @pxref{Limits control, +, Invoking m4}). Additionally, the option @option{--trace} (or +@option{-t}) can be used to invoke @code{traceon(@var{name})} before +parsing input. + +@comment options: -dp -L3 -tifelse +@comment status: 1 +@example +$ @kbd{m4 -L 3 -t ifelse} +ifelse(`one level') +@error{}m4trace: -1- ifelse +@result{} +ifelse(ifelse(ifelse(`three levels'))) +@error{}m4trace: -3- ifelse +@error{}m4trace: -2- ifelse +@error{}m4trace: -1- ifelse +@result{} +ifelse(ifelse(ifelse(ifelse(`four levels')))) +@error{}m4:stdin:3: recursion limit of 3 exceeded, use -L to change it +@end example Tracing by name is an attribute that is preserved whether the macro is -defined or not. This allows the @option{-t} option to select macros to -trace before those macros are defined. +defined or not. This allows the selection of macros to trace before +those macros are defined. @example +$ @kbd{m4 -d} traceoff(`foo') @result{} traceon(`foo') @@ -2919,6 +3074,7 @@ Tracing even works on builtins. However does not transfer tracing status. @example +$ @kbd{m4 -d} traceon(`eval', `m4_divnum') @result{} define(`m4_eval', defn(`eval')) @@ -3025,7 +3181,9 @@ are reset to the default of @samp{aeq}. The expansion of @code{debugmode} is void. @end deffn +@comment options: -dp @example +$ @kbd{m4} define(`foo', `FOO') @result{} traceon(`foo') @@ -3071,6 +3229,7 @@ The expansion of @code{debugfile} is voi @end deffn @example +$ @kbd{m4} traceon(`divnum') @result{} divnum(`extra') @@ -3878,9 +4037,10 @@ contains the lines: @comment ignore @example -Include file start -foo -Include file end +$ @kbd{cat examples/incl.m4} +@result{}Include file start +@result{}foo +@result{}Include file end @end example Normally file inclusion is used to insert the contents of a file @@ -3888,6 +4048,7 @@ into the input stream. The contents of @code{m4} and macro calls in the file will be expanded: @example +$ @kbd{m4 -I examples} define(`foo', `FOO') @result{} include(`incl.m4') @@ -3903,6 +4064,7 @@ Here is an example, which defines @samp{ of @file{incl.m4}: @example +$ @kbd{m4 -I examples} define(`bar', include(`incl.m4')) @result{} This is `bar': >>bar<< @@ -4241,11 +4403,19 @@ divert`'undivert`'dnl @cindex file inclusion @cindex inclusion, of files @acronym{GNU} @code{m4} allows named files to be undiverted. Given a -non-numeric -argument, the contents of the file named will be copied, uninterpreted, to -the current output. This complements the builtin @code{include} -(@pxref{Include}). To illustrate the difference, the file -@file{m4-@value{VERSION}/@/examples/@/foo} contains the word @samp{bar}: +non-numeric argument, the contents of the file named will be copied, +uninterpreted, to the current output. This complements the builtin +@code{include} (@pxref{Include}). To illustrate the difference, assume +the file @file{foo} contains: + +@comment ignore +@example +$ @kbd{cat foo} +bar +@end example + +@noindent +then @example define(`bar', `BAR') @@ -4259,7 +4429,20 @@ include(`foo') @end example If the file is not found (or cannot be read), an error message is -issued, and the expansion is void. +issued, and the expansion is void. It is possible to intermix files +and diversion numbers. + +@example +divert(`1')diversion one +divert(`2')undivert(`foo')dnl +divert(`3')diversion three +divert`'dnl +undivert(`1', `2', `foo', `3')dnl +@result{}diversion one +@result{}bar +@result{}bar +@result{}diversion three +@end example @node Divnum @section Diversion numbers @@ -4706,21 +4889,34 @@ The macro @code{format} is recognized on Its use is best described by a few examples: +@comment This test is a bit fragile, if someone tries to port to a +@comment platform without infinity. @example define(`foo', `The brown fox jumped over the lazy dog') @result{} format(`The string "%s" uses %d characters', foo, len(foo)) @result{}The string "The brown fox jumped over the lazy dog" uses 38 characters +format(`%*.*d', `-1', `-1', `1') +@result{}1 format(`%.0f', `56789.9876') @result{}56790 -len(format(`%-*X', `300', `1')) -@result{}300 +len(format(`%-*X', `5000', `1')) +@result{}5000 +ifelse(format(`%010F', `infinity'), ` INF', `success', + format(`%010F', `infinity'), ` INFINITY', `success', + format(`%010F', `infinity')) +@result{}success +ifelse(format(`%.1A', `1.999'), `0X1.0P+1', `success', + format(`%.1A', `1.999'), `0X2.0P+0', `success', + format(`%.1A', `1.999')) +@result{}success @end example Using the @code{forloop} macro defined earlier (@pxref{Forloop}), this example shows how @code{format} can be used to produce tabular output. @example +$ @kbd{m4 -I examples} include(`forloop.m4') @result{} forloop(`i', `1', `10', `format(`%6d squared is %10d @@ -4739,18 +4935,32 @@ forloop(`i', `1', `10', `format(`%6d squ @end example The builtin @code{format} is modeled after the ANSI C @samp{printf} -function, and supports these @samp{%} specifiers: @samp{c}, -@samp{s}, @samp{d}, @samp{o}, @samp{x}, @samp{X}, @samp{u}, @samp{e}, -@samp{E}, @samp{f}, @samp{F}, @samp{g}, @samp{G}, and @samp{%}; it -supports field widths and precisions, and the -modifiers @samp{+}, @samp{-}, @samp{@w{ }}, @samp{0}, @samp{#}, @samp{h} and -@samp{l}. For more details on the functioning of @code{printf}, see the -C Library Manual. - -For now, unrecognized specifiers are silently ignored, but it is -anticipated that a future release of @acronym{GNU} @code{m4} will support more -specifiers, and give warnings when problems are encountered. Likewise, -escape sequences are not yet recognized. +function, and supports these @samp{%} specifiers: @samp{c}, @samp{s}, +@samp{d}, @samp{o}, @samp{x}, @samp{X}, @samp{u}, @samp{a}, @samp{A}, +@samp{e}, @samp{E}, @samp{f}, @samp{F}, @samp{g}, @samp{G}, and +@samp{%}; it supports field widths and precisions, and the flags +@samp{+}, @samp{-}, @samp{ }, @samp{0}, @samp{#}, and @samp{'}. For +integer specifiers, the width modifiers @samp{hh}, @samp{h}, and +@samp{l} are recognized, and for floating point specifiers, the width +modifier @samp{l} is recognized. Items not yet supported include +positional arguments, the @samp{n}, @samp{p}, @samp{S}, and @samp{C} +specifiers, the @samp{z}, @samp{t}, @samp{j}, @samp{L} and @samp{ll} +modifiers, and any platform extensions available in the native +@code{printf}. For more details on the functioning of @code{printf}, +see the C Library Manual, or the @acronym{POSIX} specification (for +example, @samp{%a} is supported even on platforms that haven't yet +implemented C99 hexadecimal floating point output natively). + +Unrecognized specifiers result in a warning. It is anticipated that a +future release of @acronym{GNU} @code{m4} will support more specifiers, +and give better warnings when various problems such as overflow are +encountered. Likewise, escape sequences are not yet recognized. + +@example +format(`%p', `0') +@error{}m4:stdin:1: Warning: unrecognized specifier in `%p' +@result{} +@end example @node Arithmetic @chapter Macros for doing arithmetic @@ -4966,6 +5176,12 @@ Here are a few examples of use of @code{ @example eval(`-3 * 5') @result{}-15 +eval(`-99 / 10') +@result{}-9 +eval(`-99 % 10') +@result{}-9 +eval(`99 % -10') +@result{}9 eval(index(`Hello world', `llo') >= 0) @result{}1 eval(`0r1:0111 + 0b100 + 0r3:12') @@ -4979,7 +5195,7 @@ square(square(`5')` + 1') define(`foo', `666') @result{} eval(`foo / 6') -@error{}m4:stdin:8: bad expression in eval: foo / 6 +@error{}m4:stdin:11: bad expression in eval: foo / 6 @result{} eval(foo / 6) @result{}111 @@ -5173,20 +5389,14 @@ syscmd(`echo foo') Note how the expansion of @code{syscmd} keeps the trailing newline of the command, as well as using the newline that appeared after the macro. -As an example of @var{shell-command} using the same standard input as -@code{m4}, the command line @kbd{echo "m4wrap(\`syscmd(\`cat')')" | m4} -will tell @code{m4} to read all of its input before executing the -wrapped text, then hand a valid (albeit emptied) pipe as standard input -for the @code{cat} subcommand. Therefore, you should be careful when -using standard input (either by specifying no files, or by passing -@samp{-} as a file name on the command line, @pxref{Command line files, -, Invoking m4}), and -also invoking subcommands via @code{syscmd} or @code{esyscmd} that -consume data from standard input. When standard input is a seekable -file, the subprocess will pick up with the next character not yet -processed by @code{m4}; when it is a pipe or other non-seekable file, -there is no guarantee how much data will already be buffered by -@code{m4} and thus unavailable to the child. +The following is an example of @var{shell-command} using the same +standard input as @code{m4}: + +@comment ignore +@example +$ @kbd{echo "m4wrap(\`syscmd(\`cat')')" | m4} +@result{} +@end example @ignore @comment If the user types the example below with stdin being an @@ -5204,6 +5414,18 @@ m4wrap(`syscmd(`cat')') @end example @end ignore +It tells @code{m4} to read all of its input before executing the wrapped +text, then hand a valid (albeit emptied) pipe as standard input for the +@code{cat} subcommand. Therefore, you should be careful when using +standard input (either by specifying no files, or by passing @samp{-} as +a file name on the command line, @pxref{Command line files, , Invoking +m4}), and also invoking subcommands via @code{syscmd} or @code{esyscmd} +that consume data from standard input. When standard input is a +seekable file, the subprocess will pick up with the next character not +yet processed by @code{m4}; when it is a pipe or other non-seekable +file, there is no guarantee how much data will already be buffered by +@code{m4} and thus unavailable to the child. + @node Esyscmd @section Reading the output of commands @@ -5370,6 +5592,7 @@ chosen: @comment ignore @example +$ @kbd{m4} maketemp(`/tmp/fooXXXXXX') @result{}/tmp/fooa07346 ifdef(`mkstemp', `define(`maketemp', defn(`mkstemp'))', @@ -5390,6 +5613,7 @@ recommend that you use the new @code{mks @acronym{GNU} M4 1.4.8, which is secure even in traditional mode. @example +$ @kbd{m4} syscmd(`echo foo??????')dnl @result{}foo?????? define(`file1', maketemp(`fooXXXXXX'))dnl @@ -5490,13 +5714,14 @@ reflected in the file name. The synclin @pxref{Preprocessor features, , Invoking m4}), and the @samp{f} and @samp{l} flags of @code{debugmode} (@pxref{Debug Levels}), also use this notion of current file and line. Redefining the three -location macros has no effect on syncline, debug, or warning message -output. Assume this example is run in the -@file{m4-@value{VERSION}/@/checks} directory of the @acronym{GNU} M4 -package, using @samp{--include=../examples} in the command line to find -the file @file{incl.m4} mentioned earlier: +location macros has no effect on syncline, debug, warning, or error +message output. + +This example reuses the file @file{incl.m4} mentioned earlier +(@pxref{Include}): @example +$ @kbd{m4 -I examples} define(`foo', ``$0' called at __file__:__line__') @result{} foo @@ -5645,9 +5870,9 @@ Suppose a user has a library of @code{m4 @comment ignore @example -m4 base.m4 input1.m4 -m4 base.m4 input2.m4 -m4 base.m4 input3.m4 +$ @kbd{m4 base.m4 input1.m4} +$ @kbd{m4 base.m4 input2.m4} +$ @kbd{m4 base.m4 input3.m4} @end example Rather than spending time parsing the fixed contents of @file{base.m4} @@ -5655,7 +5880,7 @@ every time, the user might rather execut @comment ignore @example -m4 -F base.m4f base.m4 +$ @kbd{m4 -F base.m4f base.m4} @end example @noindent @@ -5663,9 +5888,9 @@ once, and further execute, as often as n @comment ignore @example -m4 -R base.m4f input1.m4 -m4 -R base.m4f input2.m4 -m4 -R base.m4f input3.m4 +$ @kbd{m4 -R base.m4f input1.m4} +$ @kbd{m4 -R base.m4f input2.m4} +$ @kbd{m4 -R base.m4f input3.m4} @end example @noindent @@ -5692,7 +5917,7 @@ some care is taken, the command: @comment ignore @example -m4 file1.m4 file2.m4 file3.m4 file4.m4 +$ @kbd{m4 file1.m4 file2.m4 file3.m4 file4.m4} @end example @noindent @@ -5701,10 +5926,10 @@ output: @comment ignore @example -m4 -F file1.m4f file1.m4 -m4 -R file1.m4f -F file2.m4f file2.m4 -m4 -R file2.m4f -F file3.m4f file3.m4 -m4 -R file3.m4f file4.m4 +$ @kbd{m4 -F file1.m4f file1.m4} +$ @kbd{m4 -R file1.m4f -F file2.m4f file2.m4} +$ @kbd{m4 -R file2.m4f -F file3.m4f file3.m4} +$ @kbd{m4 -R file3.m4f file4.m4} @end example Some care is necessary because not every effort has been made for @@ -6127,7 +6352,29 @@ diverted text as being generated at the The sync line option is used mostly when using @code{m4} as a front end to a compiler. If a diverted line causes a compiler error, the error messages should most probably refer to the place where the -diversion were made, and not where it was inserted again. +diversion was made, and not where it was inserted again. + +@comment options: -s +@example +divert(2)2 +divert(1)1 +divert`'0 +@result{}#line 3 "stdin" +@result{}0 +^D +@result{}#line 2 "stdin" +@result{}1 +@result{}#line 1 "stdin" +@result{}2 +@end example + +The current @code{m4} implementation has a limitation that the syncline +output at the start of each diversion occurs no matter what, even if the +previous diversion did not end with a newline. This goes contrary to +the claim that synclines appear on a line by themselves, so this +limitation may be corrected in a future version of @code{m4}. In the +meantime, when using @option{-s}, it is wisest to make sure all +diversions end with newline. @item @acronym{GNU} @code{m4} makes no attempt at prohibiting self-referential @@ -6205,6 +6452,7 @@ version also optimizes based on the fact not need to be passed to the helper @code{@w{_forloop}}. @example +$ @kbd{m4 -I examples} undivert(`forloop2.m4')dnl @result{}divert(`-1') @result{}# forloop(var, from, to, stmt) - improved version: @@ -6244,6 +6492,7 @@ presented earlier each have flaws. Firs quadratic behavior of @code{foreachq}: @example +$ @kbd{m4 -I examples} include(`foreachq.m4') @result{} traceon(`shift')debugmode(`aq') @@ -6284,6 +6533,7 @@ importantly, performs faster. The fixed be found in @file{m4-@value{VERSION}/@/examples/@/foreachq2.m4}: @example +$ @kbd{m4 -I examples} include(`foreachq2.m4') @result{} undivert(`foreachq2.m4')dnl @@ -6325,6 +6575,7 @@ overquotes the arguments to @code{@w{_fo front: @example +$ @kbd{m4 -I examples} include(`foreach2.m4') @result{} undivert(`foreach2.m4')dnl @@ -6369,6 +6620,7 @@ repeating the side effects of unquoted l detrimental effects. @example +$ @kbd{m4 -I examples} include(`foreach2.m4') @result{} include(`foreachq2.m4') @@ -6500,9 +6752,28 @@ fatal_error(`inside wrapped text')') @c ========================================================== Appendices +@node Copying This Package +@appendix How to make copies of the overall M4 package +@cindex License, code + +This appendix covers the license for copying the source code of the +overall M4 package. This manual is under a different set of +restrictions, covered later (@pxref{Copying This Manual}). + +@menu +* Copying:: GNU General Public License +@end menu + +@include gpl-3.0.texi + @node Copying This Manual @appendix How to make copies of this manual -@cindex License +@cindex License, manual + +This appendix covers the license for copying this manual. Note that +some of the longer examples in this manual are also distributed in the +directory @file{m4-@value{VERSION}/@/examples/}, where a more +permissive license is in effect when copying just the examples. @menu * GNU Free Documentation License:: License for copying this manual diff -ruNp m4-1.4.9/doc/mdate-sh m4-1.4.10/doc/mdate-sh --- m4-1.4.9/doc/mdate-sh 2007-03-23 06:54:09.000000000 -0600 +++ m4-1.4.10/doc/mdate-sh 2007-07-09 21:15:35.000000000 -0600 @@ -1,15 +1,15 @@ #!/bin/sh # Get modification time of a file or directory and pretty-print it. -scriptversion=2005-06-29.22 +scriptversion=2007-03-30.02 -# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005 Free Software +# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software # Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute 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) +# the Free Software Foundation; either version 3, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, @@ -75,6 +75,10 @@ if ls -L /dev/null 1>/dev/null 2>&1; the else ls_command='ls -l -d' fi +# Avoid user/group names that might have spaces, when possible. +if ls -n /dev/null 1>/dev/null 2>&1; then + ls_command="$ls_command -n" +fi # A `ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo @@ -89,7 +93,7 @@ fi # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. -set x`ls -l -d /` +set x`$ls_command /` # Find which argument is the month. month= diff -ruNp m4-1.4.9/doc/stamp-vti m4-1.4.10/doc/stamp-vti --- m4-1.4.9/doc/stamp-vti 2007-03-23 07:36:04.000000000 -0600 +++ m4-1.4.10/doc/stamp-vti 2007-07-09 21:20:49.000000000 -0600 @@ -1,4 +1,4 @@ -@set UPDATED 23 March 2007 -@set UPDATED-MONTH March 2007 -@set EDITION 1.4.9 -@set VERSION 1.4.9 +@set UPDATED 4 July 2007 +@set UPDATED-MONTH July 2007 +@set EDITION 1.4.10 +@set VERSION 1.4.10 diff -ruNp m4-1.4.9/doc/texinfo.tex m4-1.4.10/doc/texinfo.tex --- m4-1.4.9/doc/texinfo.tex 2007-03-23 06:54:13.000000000 -0600 +++ m4-1.4.10/doc/texinfo.tex 2007-07-09 21:15:36.000000000 -0600 @@ -3,16 +3,16 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2007-03-14.11} +\def\texinfoversion{2007-07-05.10} % -% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 2007, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007 Free Software Foundation, Inc. % % This texinfo.tex 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. +% published by the Free Software Foundation; either version 3 of the +% License, or (at your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty @@ -20,9 +20,7 @@ % General Public License for more details. % % You should have received a copy of the GNU General Public License -% along with this texinfo.tex file; see the file COPYING. If not, write -% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -% Boston, MA 02110-1301, USA. +% along with this program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without @@ -375,7 +373,7 @@ % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi -\dimen@=\dp#1 \unvbox#1 +\dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } @@ -1262,7 +1260,30 @@ be supported due to the design of the PD output) for that.)} \ifpdf - \input pdfcolor + % + % Color manipulation macros from pdfcolor.tex. + \def\cmykDarkRed{0.28 1 1 0.35} + \def\cmykBlack{0 0 0 1} + % + \def\pdfsetcolor#1{\pdfliteral{#1 k}} + \def\setcolor#1{\mark{#1}\pdfsetcolor{#1}} + % + \def\maincolor{\cmykBlack} + \pdfsetcolor{\maincolor} + % + \def\makefootline{ + \baselineskip24pt + \line{\pdfsetcolor{\maincolor}\the\footline}} + % + \def\makeheadline{% + \edef\M{\topmark} + \ifx\M\empty\let\M=\maincolor\fi + \vbox to 0pt{\vskip-22.5pt + \line{\vbox to8.5pt{}% + \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\M}}\vss}% + \nointerlineskip} + % + % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). @@ -1321,14 +1342,17 @@ output) for that.)} \makevalueexpandable \def\pdfdestname{#1}% \backslashparens\pdfdestname - \pdfdest name{\pdfdestname} xyz% + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % - \let\linkcolor = \Blue % was Cyan, but that seems light? - \def\endlink{\Black\pdfendlink} + % by default, use a color that is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. + \def\urlcolor{\cmykDarkRed} + \def\linkcolor{\cmykDarkRed} + \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak @@ -1431,7 +1455,7 @@ output) for that.)} \indexnofonts \setupdatafile \catcode`\\=\active \otherbackslash - \input \jobname.toc + \input \tocreadfilename \endgroup } % @@ -1461,7 +1485,7 @@ output) for that.)} \def\@{@}% \let\/=\empty \makevalueexpandable - \leavevmode\Red + \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} @@ -1488,13 +1512,14 @@ output) for that.)} {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} - \linkcolor #1\endlink} + \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax - \let\linkcolor = \relax + \let\setcolor = \gobble + \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput @@ -1551,11 +1576,276 @@ output) for that.)} }% } +% +% PDF CMaps. See also LaTeX's t1.cmap. +% +% \cmapOT1 +\ifpdf + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1-0) +%%Title: (TeX-OT1-0 TeX OT1 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1) +/Supplement 0 +>> def +/CMapName /TeX-OT1-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<23> <26> <0023> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +40 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1IT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1IT-0) +%%Title: (TeX-OT1IT-0 TeX OT1IT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1IT) +/Supplement 0 +>> def +/CMapName /TeX-OT1IT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +8 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<25> <26> <0025> +<28> <3B> <0028> +<3F> <5B> <003F> +<5D> <5E> <005D> +<61> <7A> <0061> +<7B> <7C> <2013> +endbfrange +42 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <00660066> +<0C> <00660069> +<0D> <0066006C> +<0E> <006600660069> +<0F> <00660066006C> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<21> <0021> +<22> <201D> +<23> <0023> +<24> <00A3> +<27> <2019> +<3C> <00A1> +<3D> <003D> +<3E> <00BF> +<5C> <201C> +<5F> <02D9> +<60> <2018> +<7D> <02DD> +<7E> <007E> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1IT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +% +% \cmapOT1TT + \begingroup + \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. + \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap +%%DocumentNeededResources: ProcSet (CIDInit) +%%IncludeResource: ProcSet (CIDInit) +%%BeginResource: CMap (TeX-OT1TT-0) +%%Title: (TeX-OT1TT-0 TeX OT1TT 0) +%%Version: 1.000 +%%EndComments +/CIDInit /ProcSet findresource begin +12 dict begin +begincmap +/CIDSystemInfo +<< /Registry (TeX) +/Ordering (OT1TT) +/Supplement 0 +>> def +/CMapName /TeX-OT1TT-0 def +/CMapType 2 def +1 begincodespacerange +<00> <7F> +endcodespacerange +5 beginbfrange +<00> <01> <0393> +<09> <0A> <03A8> +<21> <26> <0021> +<28> <5F> <0028> +<61> <7E> <0061> +endbfrange +32 beginbfchar +<02> <0398> +<03> <039B> +<04> <039E> +<05> <03A0> +<06> <03A3> +<07> <03D2> +<08> <03A6> +<0B> <2191> +<0C> <2193> +<0D> <0027> +<0E> <00A1> +<0F> <00BF> +<10> <0131> +<11> <0237> +<12> <0060> +<13> <00B4> +<14> <02C7> +<15> <02D8> +<16> <00AF> +<17> <02DA> +<18> <00B8> +<19> <00DF> +<1A> <00E6> +<1B> <0153> +<1C> <00F8> +<1D> <00C6> +<1E> <0152> +<1F> <00D8> +<20> <2423> +<27> <2019> +<60> <2018> +<7F> <00A8> +endbfchar +endcmap +CMapName currentdict /CMap defineresource pop +end +end +%%EndResource +%%EOF + }\endgroup + \expandafter\edef\csname cmapOT1TT\endcsname#1{% + \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% + }% +\else + \expandafter\let\csname cmapOT1\endcsname\gobble + \expandafter\let\csname cmapOT1IT\endcsname\gobble + \expandafter\let\csname cmapOT1TT\endcsname\gobble +\fi + % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). -% #3 is the font's design size, #4 is a scale factor -\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} +% #3 is the font's design size, #4 is a scale factor, #5 is the CMap +% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass +% empty to omit). +\def\setfont#1#2#3#4#5{% + \font#1=\fontprefix#2#3 scaled #4 + \csname cmap#5\endcsname#1% +} +% This is what gets called when #5 of \setfont is empty. +\let\cmap\gobble % Use cm as the default font prefix. @@ -1588,59 +1878,59 @@ output) for that.)} % Text fonts (11.2pt, mag