From 9646c781d2c83b8d2bd007a1ecd4886c11adb2a2 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Jan 21 2021 22:16:26 +0000 Subject: autoconf-2.69 base --- diff --git a/.prev-version b/.prev-version new file mode 100644 index 0000000..292b239 --- /dev/null +++ b/.prev-version @@ -0,0 +1 @@ +2.68b diff --git a/.tarball-version b/.tarball-version new file mode 100644 index 0000000..5e1b8b0 --- /dev/null +++ b/.tarball-version @@ -0,0 +1 @@ +2.69 diff --git a/.version b/.version new file mode 100644 index 0000000..292b239 --- /dev/null +++ b/.version @@ -0,0 +1 @@ +2.68b diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..79e939a --- /dev/null +++ b/AUTHORS @@ -0,0 +1,127 @@ +Authors of GNU Autoconf. + +Autoconf was originally written by David MacKenzie, with help from +François Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, Roland +McGrath, Noah Friedman, david d zuhn, and many others. + +Ben Elliston next took over the maintenance, facing a huge Autoconf +backlog that had been piling up since the departure of David. Other +maintainers have included Akim Demaille, Jim Meyering, Alexandre +Oliva, and Tom Tromey, with plenty of contributions from Lars J. Aas, +Mo DeJong, Steven G. Johnson, Matthew D. Langston, Pavel Roskin. + +Today, the primary maintainers are Paul Eggert and Eric Blake, with +help from Ralf Wildenhues, Stepan Kasal, and Benoit Sigoure. Many +other people have contributed, as listed in the THANKS file. + +The following contributors have warranted legal paper exchanges with +the Free Software Foundation for their contributions to GNU Autoconf. +This list results from searching for AUTOCONF in the file +/gd/gnuorg/copyright.list on the fencepost.gnu.org machine. + +David J. MacKenzie djm@gnu.org 1991-07-09 +James L. Avera ? 1993-10-04 +Roland McGrath roland@gnu.org 1994-06-24 +Noah Friedman friedman@gnu.org 1994-07-15 +Francois Pinard pinard@iro.umontreal.ca 1997-02-02 +Thomas E. Dickey dickey@clark.net 1998-01-11 +Matthew D. Langston langston@slac.stanford.edu 1998-09-29 +Mark Elbrecht snowball3@usa.net 1999-01-11 +Akim Demaille akim@gnu.org 1999-02-02 +Pavel Roskin pavel_roskin@geocities.com 1999-02-24 +Alexandre Oliva oliva@dcc.unicamp.br 1999-03-26 +Thomas Tanner tanner@ffii.org 1999-06-23 +Gary V. Vaughan gary@gnu.org 2000-01-10 +Joseph Samuel Myers jsm28@cam.ac.uk 2000-03-13 +Lars J. Aas larsa@sim.no 2000-07-07 +Morten Eriksen mortene@sim.no 2000-07-07 +Martin Wilck martin@tropos.de 2000-07-12 +Paul Eggert eggert@twinsun.com 2000-10-13 +Alexandre Duret-Lutz duret_g@epita.fr 2001-02-12 +Tim Van Holder tim.van.holder@pandora.be 2001-02-13 +Christian Marquardt marq@gfz-potsdam.de 2001-02-19 +Derek R. Price dprice@collab.net 2001-03-12 +Markus Kuhn Markus.Kuhn@cl.cam.ac.uk 2001-07-07 +Erik Lindahl erik@theophys.kth.se 2001-08-22 +Hans-Peter Nilsson hp@bitrange.com 2001-10-24 +Paul Wagland paul@wagland.net 2001-10-30 +Paolo Bonzini bonzini@gnu.org 2001-11-08 +Nishio Futoshi fut_nis@d3.dion.ne.jp 2002-01-23 +Federico G. Schwindt fgsch@openbsd.org 2002-05-21 +Mark D. Roth roth@feep.net 2002-05-28 +Greg McGary greg@mcgary.org 2002-06-05 +Charles Stephen Wilson cwilson@ece.gatech.edu 2002-07-25 +Robert Bernstein rocky@panix.com 2002-08-20 +Assar Westerlund assar@kth.se 2002-09-13 +Scott Bambrough sbambrough@storm.ca 2002-09-24 +Richard Dawe rich@phekda.freeserve.co.uk 2003-01-23 +Andreas Buening andreas.buening@nexgo.de 2003-02-18 +Raja R. Harinath harinath@acm.org 2003-02-25 +Ilya Zakharevich ilya@Math.Berkeley.EDU 2003-03-11 +Kaveh Ghazi ghazi@caip.rutgers.edu 2003-03-15 +Felix Lee felix.1@canids.net 2003-03-31 +Nathanael Nerode neroden@twcny.rr.com 2003-04-04 +Gavin Puche user42@zip.com.au 2003-04-10 +Steven Glenn Johnson stevenj@alum.mit.edu 2003-07-26 +Bernardo Innocenti bernie@codewiz.org 2003-07-31 +Albert Marsden Chin-A-Young china@thewrittenword.com 2003-08-02 +Ralf Corsepius corsepiu@faw.uni-ulm.de 2003-09-03 +Scott Remnant scott@netsplit.com 2003-10-04 +Daniel Jacobowitz dan@debian.org 2003-10-17 +Kevin Fleming kpfleming@backtobasicsmgmt.com 2003-11-17 +John David Anglin dave.anglin@nrc-cnrc.gc.ca 2004-01-21 +Eric Sunshine sunshine@sunshineco.com 2004-01-25 +Ralf Wildenhues Ralf.Wildenhues@gmx.de 2004-02-12 +Noah Jeffrey Misch noah@cs.caltech.edu 2004-07-05 +Thorsten Glaser tg@66h.42h.de 2004-10-11 +Peter O'Gorman peter@pogma.com 2004-11-14 +Toshio Ernie Kuratomi toshio@tiki-lounge.com 2004-11-17 +Roger Leigh rleigh@whinlatter.ukfsn.org 2004-12-09 +Ian Lance Taylor ian@airs.com 2004-12-22 +Daniel Manthey dan_manthey@partech.com 2005-02-14 +Gregorio Guidi greg_g@gentoo.org 2005-03-03 +Bruno Haible bruno@clisp.org 2005-06-12 +Toby Oliver Hilary White tow21@cam.ac.uk 2005-10-18 +Eric Benjamin Blake ebb9@byu.net 2006-01-18 +Romain Lenglet romain.lenglet@laposte.net 2006-02-10 +Markus Duft markus.duft@salomon.at 2006-08-03 +Robert Schiele rschiele@gmail.com 2006-09-12 +Joel Edward Denny jdenny@clemson.edu 2006-09-15 +Helge Deller deller@gmx.de 2007-02-01 +Benoit Sigoure tsuna@lrde.epita.fr 2007-04-20 +Bob Proulx bob@proulx.com 2007-06-25 +Bruce Korb bkorb@gnu.org 2008-05-06 +Benjamin Pfaff blp@gnu.org 2008-09-29 +Peter Breitenlohner peb@mppmu.mpg.de 2009-08-18 +Stefano Lattarini stefano.lattarini@gmail.com 2009-10-01 +Reuben Thomas rrt@sc3d.org 2010-03-10 +Peter Rosin peda@lysator.liu.se 2010-07-21 +John W. Eaton jwe@gnu.org 2010-11-05 +Christopher Hulbert cchgroupmail@gmail.com 2010-11-09 +Tim Rice tim@multitalents.net 2011-01-24 +KO Myun-Hun komh78@gmail.com 2011-04-05 +Christian Roessel christian.roessel@gmx.de 2011-08-26 +Nicolai Stange nicolai.stange@zmaw.de 2011-10-13 + +======================================================================== + +Local Variables: +mode: text +coding: utf-8 +End: + +Copyright (C) 1996, 2000-2001, 2005, 2007-2012 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 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 . diff --git a/BUGS b/BUGS new file mode 100644 index 0000000..175bed8 --- /dev/null +++ b/BUGS @@ -0,0 +1,37 @@ +-*- outline -*- + +This file lists the bugs you must be aware of. Be sure to check this +file before using Autoconf, and especially git versions of Autoconf. + + Copyright (C) 2000-2002, 2006-2012 Free Software Foundation, + Inc. + + Copying and distribution of this file, with or without + modification, are permitted in any medium without royalty provided + the copyright notice and this notice are preserved. This file is + offered as-is, without warranty of any kind. + +Autoconf must not be used in production if there are ``Serious'' bugs, +and use with caution an Autoconf with ``Important bugs''. + +* Status + + /*------------------------------------. + | New features need further testing. | + `------------------------------------*/ + +* Now that configure depends on shell functions, it is possible that + configure scripts may fail to run on old platforms that lack a shell + with proper function support. + +* Autotest parallel testsuite support is still a work in progress. + There are known issues in job handling under dash and some ksh + variants, where a parallel testsuite can hang or cause a 100% + processor load. In the current release, the overall autoconf + testsuite only exercises parallel autotest under bash and zsh, or if + you have defined TEST_PARALLEL_AUTOTEST in the environment. + Meanwhile, Cygwin has known problems with named fifos that cause + failures when attempting parallel tests in an autotest suite. It is + possible that other difficulties will be encountered, whether with + shell or platform limitations; help is appreciated in improving + parallel testsuite support. diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..d511905 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/COPYING.EXCEPTION b/COPYING.EXCEPTION new file mode 100644 index 0000000..4695835 --- /dev/null +++ b/COPYING.EXCEPTION @@ -0,0 +1,43 @@ + AUTOCONF CONFIGURE SCRIPT EXCEPTION + Version 3.0, 18 August 2009 + + Copyright (C) 2009 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +This Exception is an additional permission under section 7 of the GNU +General Public License, version 3 ("GPLv3"). It applies to a given +file that bears a notice placed by the copyright holder of the file +stating that the file is governed by GPLv3 along with this Exception. + +The purpose of this Exception is to allow distribution of Autoconf's +typical output under terms of the recipient's choice (including +proprietary). + +0. Definitions + +"Covered Code" is the source or object code of a version of Autoconf +that is a covered work under this License. + +"Normally Copied Code" for a version of Autoconf means all parts of +its Covered Code which that version can copy from its code (i.e., not +from its input file) into its minimally verbose, non-debugging and +non-tracing output. + +"Ineligible Code" is Covered Code that is not Normally Copied Code. + +1. Grant of Additional Permission. + +You have permission to propagate output of Autoconf, even if such +propagation would otherwise violate the terms of GPLv3. However, if +by modifying Autoconf you cause any Ineligible Code of the version you +received to become Normally Copied Code of your modified version, then +you void this Exception for the resulting covered work. If you convey +that resulting covered work, you must remove this Exception in accordance +with the second paragraph of Section 7 of GPLv3. + +2. No Weakening of Autoconf Copyleft. + +The availability of this Exception does not imply any general presumption +that third-party software is unaffected by the copyleft requirements of +the license of Autoconf. diff --git a/COPYINGv3 b/COPYINGv3 new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/COPYINGv3 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..3fed19c --- /dev/null +++ b/ChangeLog @@ -0,0 +1,562 @@ +2012-04-24 Eric Blake + + Release Version 2.69. + * NEWS: Mention the release. + +2012-04-24 Eric Blake + + maint: drop bz2 tarball + At 2.68b, I asked whether anyone would miss .gz and .bz2 formats. + Consensus was overwhelming that .gz still holds a place in people's + hearts, in spite of .xz compressing to smaller files, but no one + was able to make a convincing argument for .bz2. + + * configure.ac (AM_INIT_AUTOMAKE): Drop bzip2; xz wins hands down. + +2012-04-24 Eric Blake + + maint: resync files from upstream + The files in lib/Autom4te/ are intentionally not synced at this + point, since this recent Automake patch: + https://lists.gnu.org/archive/html/automake-patches/2012-03/msg00111.html + + was buggy regarding '-' as stdout, and also exposes some latent + bugs in autoconf where we use raw 'open' instead of XFile::open. + + * build-aux/announce-gen: Resync via 'make fetch'. + * build-aux/config.sub: Likewise. + * build-aux/git-version-gen: Likewise. + * build-aux/gnupload: Likewise. + * build-aux/move-if-change: Likewise. + * build-aux/texinfo.tex: Likewise. + * doc/standards.texi: Likewise. + * maint.mk: Likewise. + +2012-04-24 Eric Blake + + doc: fix bad @xref uses + Upstream gnulib maint.mk improvements caught a few issues we + should fix, as well as a few issues in files we copy from + other sources that we will just ignore here. + + * doc/autoconf.texi (Generic Programs, Special Shell Variables) + (Limitations of Builtins): Use references correctly. + * cfg.mk + (exclude_file_name_regexp--sc_prohibit_undesirable_word_seq) + (exclude_file_name_regexp--sc_useless_cpp_parens): Add exemptions. + +2012-04-24 Bruno Haible + + AC_INIT: remove a transitional warning + On bi-arch systems (such as x86 / x86_64) it is often necessary to pass + the --host option together with an appropriate value for CC. But this + triggers a warning: + + $ ./configure --host=i686-pc-linux-gnu CC="gcc -m32 -march=i586" + configure: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used + .. + + This warning was introduced on 2000-06-30, in commit + + with the remark "Re-enable the old behavior of --host and --build." + + This warning was meant to warn users about a changed semantics of + --build and --host. This change is now 12 years in the past; users + have had enough time to learn it. I therefore suggest to remove the + warning. + + I've done lots of cross and bi-arch compilations in the last 10 years, + all with --host and without --build, and have never observed a problem + with it, except for the warning. Simply relying on config.guess is sufficient. + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Don't warn if --host + given without --build. + +2012-04-24 Bruno Haible + + doc: fix incorrect and incomplete doc about cross-compilation mode + * doc/autoconf.texi (Runtime): Mention the effect of the cross- + compilation mode on AC_RUN_IFELSE. + (Specifying Target Triplets): Fix description of --host's effects. + (Hosts and Cross-Compilation): Remove incorrect statement about + --host's effects. + +2012-04-23 Paul Eggert + + doc: document --build and cross-compilation better + * doc/autoconf.texi (Specifying Target Triplets): Mention that + specifying a build-type that differs from host-type enables + cross-compilation. Problem reported by Bruno Haible in: + http://lists.gnu.org/archive/html/autoconf-patches/2012-04/msg00009.html + +2012-04-11 Jim Meyering + + maint: avoid "make syntax-check" failure + * cfg.mk (old_NEWS_hash): Update to reflect typo fix in old news. + +2012-03-28 Stefano Lattarini + + cosmetics fix imprecise comment in Autom4te::General + * lib/Autom4te/General.pm: This file is *not* used by Automake; + adjust comments accordingly. + +2012-03-07 Paul Eggert + + tests: fix port of AT_CHECK_ENV to hosts with flaky grep + * tests/local.at (AT_CHECK_ENV): Don't copy the buggy grep's + diagnostics to stderr, as that causes AT_CHECK to fail. They can + be found in the stderr-* files if this is needed for debugging. + +2012-03-07 Eric Blake + + docs: document set -n pitfalls + * doc/autoconf.texi (Limitations of Builtins) : Document + issues with set -n. + +2012-03-07 Eric Blake + + build: require perl 5.6 + This reduces the implicit requirement from 5.6.2 back to 5.6, + while raising the explicit requirement to match the actual code. + + * configure.ac (PERL): Fail up front if perl is too old. + * NEWS: Document this. + * README: Likewise. + * README-hacking: Likewise. + * lib/Autom4te/ChannelDefs.pm: Bump requirement. + * lib/Autom4te/General.pm: Relax requirement. + +2012-03-07 Eric Blake + + tests: ignore ksh -n warnings + Recent ksh is noisy: + + $ ksh -nc '``'; echo $? + ksh: warning: line 1: `...` obsolete, use $(...) + 0 + + * tests/local.at (AT_CHECK_SHELL_SYNTAX): Ignore noisy ksh on. + Reported by Martin Zaun. + +2012-03-06 Paul Eggert + + tests: port AT_CHECK_ENV to hosts with flaky grep + * tests/local.at (AT_CHECK_ENV): Don't assume that if one grep + fails, the other will too. It could be that 'grep' is flaky, + and fails somewhat at random. This would explain the problems + reported for autoconf-2.68b on FreeBSD and MacOS X, for example: + + + + + +2012-03-06 Stefano Lattarini + + maint: resync files from upstream + Since the perl version required in Automake::Getopt has been + recently lowered from 5.6.2 to 5.6.0, this change has the nice + effect of making autoconf compatible again with all perls in + the 5.6.x release series. + + * maint.mk: Resync via 'make fetch'. + * lib/Autom4te/Channels.pm: Likewise. + * lib/Autom4te/Configure_ac.pm: Likewise. + * lib/Autom4te/FileUtils.pm: Likewise. + * lib/Autom4te/Getopt.pm: Likewise. + * lib/Autom4te/XFile.pm: Likewise. + +2012-03-05 Stefano Lattarini + + maint: drop syncing with Automake::Struct + The module Automake::Struct has been removed in automake master + branch (with yesterday's commit v1.11-2055-g74a7f49 "maint: drop + 'Automake::Struct' module"): since Automake now requires Perl 5.6, + that module has become obsolete, being basically just a backport + of Perl 5.6's 'Class::Struct' to Perl 5.5. With this change, we + follow suite in Autoconf, which syncs some of its internal modules + with Automake. + + * lib/Autom4te/Struct.pm: Delete. + * lib/Autom4te/Makefile.am (dist_perllib_DATA): Don't list it + anymore. + * cfg.mk: Don't sync it with the Automake repository anymore. + * lib/Autom4te/Request.pm: Use 'Class::Struct' instead of + 'Autom4te::Struct'. + +2012-03-04 Paul Eggert + + doc: mention PATH bug with "ksh foo" + * doc/autoconf.texi (Invoking the Shell): Mention ksh PATH bug. + +2012-03-04 Stefano Lattarini + + tests: fix spurious failure due to Solaris XPG4 sh bug + On Solaris 10, the /usr/xpg4/bin/sh shell seems unable to execute + a shell script named 'script': + + $ touch script + $ /bin/sh script; echo status: $? # As expected. + status: 0 + $ /usr/xpg4/bin/sh script; echo status: $? # Weirdness follows. + /usr/xpg4/bin/sh: script: cannot execute + status: 1 + + This was causing a spurious testsuite failure for users which have + /usr/xpg4/bin in $PATH before /bin and /usr/bin. Fix that. + + * tests/m4sh.at (Configure re-execs self with CONFIG_SHELL): Rename + the m4sh-produced script to 'script2', to avoid the just-described + issue. + +2012-03-04 Stefano Lattarini + + tests: fix spurious failure when CONFIG_SITE is set + * tests/m4sh.at (Configure re-execs self with CONFIG_SHELL): Export + $CONFIG_SITE to "/dev/null", to avoid spurious diffs in expected + stdout/stderr. + +2012-03-03 Paul Eggert + + fortran: clean up core files after AC_FC_CHECK_BOUNDS + * lib/autoconf/fortran.m4 (AC_FC_CHECK_BOUNDS): Clean up core + files, too. Needed for Sun Fortran 95 8.2 2005/10/13 on Solaris 8. + + tests: port AS_TR_SH and AS_TR_CPP test to Solaris 8 wc + * tests/m4sh.at (AS@&t@_TR_SH and AS@&t@_TR_CPP): Do not assume + that "wc -l" outputs only digits; on Solaris 8 it also outputs + blanks and POSIX allows this. + + tests: fix "#/bin/sh" typo + * tests/m4sh.at (AS@&t@_EXECUTABLE): "#!/bin/sh", not "#/bin/sh". + Typo reported by Tim Rice in: + http://lists.gnu.org/archive/html/autoconf-patches/2012-03/msg00009.html + + tests: port AS_EXECUTABLE_P test to Solaris 8 /bin/sh + * tests/m4sh.at (AS@&t@_EXECUTABLE): Treat any nonzero exit + status as failure. This is needed for Solaris 8 /bin/sh, + where executing a nonexecutable file causes the shell + to say the file had exit status 1. + +2012-03-03 Stefano Lattarini + + configure: don't infloop when re-executing with $CONFIG_SHELL + It turns out our guard against infinite recursion wasn't good + enough when shells without $LINENO support were involved, since + the creation-and-sourcing of configure.lineno broke the guard's + expectations. Reports by Tim Rice and Paul Eggert. + + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Export '_as_can_reexec' + to "no" before sourcing the just-created configure.lineno. + +2012-03-01 Paul Eggert + + maint: spelling fixes + +2012-03-01 Eric Blake + + maint: post-release administrivia + * NEWS: Add header line for next release. + * .prev-version: Record previous version. + * cfg.mk (old_NEWS_hash): Auto-update. + +2012-03-01 Eric Blake + + Release Version 2.68b. + It's been more than a year since 2.68; time for a beta release + to shake out any last minute bugs, before a release of 2.69 + in the near future. + + * NEWS: Mention the release. + * HACKING: Update some instructions. + +2012-03-01 Eric Blake + + maint: resync files from upstream + * GNUmakefile: Resync via 'make fetch'. + * build-aux/config.guess: Likewise. + * build-aux/config.sub: Likewise. + * build-aux/texinfo.tex: Likewise. + * build-aux/update-copyright: Likewise. + * doc/standards.texi: Likewise. + * lib/Autom4te/Channels.pm: Likewise. + * lib/Autom4te/Configure_ac.pm: Likewise. + * lib/Autom4te/FileUtils.pm: Likewise. + * lib/Autom4te/Getopt.pm: Likewise. + * lib/Autom4te/Struct.pm: Likewise. + * lib/Autom4te/XFile.pm: Likewise. + * maint.mk: Likewise. + +2012-02-25 Eric Blake + + tests: add test for AS_EXECUTABLE_P + Now that this is public, we should regression test it. + + * tests/m4sh.at (AS@&t@_EXECUTABLE): New test. + +2012-02-24 Eric Blake + + m4sh: make AS_EXECUTABLE_P public + In the process of making it public, factor it into a reusable + function. This makes constructs like AC_CHECK_PROGRAM smaller, + as well as making libtool's naughty use of $as_executable_p safer. + + * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Add a shell function. + (AS_EXECUTABLE_P): Forward to shell function. + * doc/autoconf.texi (Common Shell Constructs): Document it. + * NEWS: Mention this. + +2012-02-24 Eric Blake + + m4sh: require that 'test -x' works + 4.3BSD is no longer a reasonable portability target; and we are + pretty sure that these days we can find at least one shell on any + platform that supports 'test -x'. Drop a horribly unsafe use of + eval as a result. :) + + Libtool still uses $as_executable_p without so much as calling + either AS_TEST_X or AS_EXECUTABLE_P; even though the latter has + existed, although undocumented, since at least 2.59; furthermore, + libtool uses it in a context where filtering out directories + would have been desirable. Shame on them. + + * lib/m4sugar/m4sh.m4 (_AS_TEST_X_WORKS): New probe. + (AS_SHELL_SANITIZE, AS_INIT): Use it in shell searching. + (AS_TEST_X, AS_EXECUTABLE_P): Simplify. + +2012-02-24 Eric Blake + + doc: mention more pitfalls of file mode tests + 4.3BSD is museum-ware now, so we can assume that test -x exists; + however, we still can't assume that it always does what we want. + + * doc/autoconf.texi (Limitations of Builtins) : + Treat 'test -x' as mostly portable, but mention problems with + root user, ACLs, and TOCTTOU races. + +2012-02-16 Eric Blake + + docs: tweak 'rm -f' limitations + Based on http://debbugs.gnu.org/10819 and + http://austingroupbugs.net/view.php?id=542 + + * doc/autoconf.texi (Limitations of Usual Tools) : More + details on 'rm -f' without files. + +2012-02-10 Paul Eggert + + maint: replace FSF snail-mail addresses with URLs + * tests/erlang.at, tests/go.at, tests/statesave.m4: + Replace FSF snail mail addresses with URLs, as per GNU coding + standards, and for consistency with other tests. + +2012-01-28 Jim Meyering + + maint: avoid "make syntax-check" failure + * Makefile.am ($(srcdir)/INSTALL): Remove spurious space-before-TAB. + +2012-01-23 Eric Blake + + tests: fix test regression due to additional output + This test has been failing since commit 5285ea8c (sadly, since + last July; thankfully, unreleased). + + * tests/m4sugar.at (m4@&t@_require: nested): Fix test. + +2012-01-23 Eric Blake + + INSTALL: convert to '' quoting, drop blank line at end + This is allowed by recent GNU Coding Standards changes, and + mirrors recent gnulib changes: + https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00267.html + https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00298.html + + I've confirmed that after these changes, the INSTALL generated and + installed by autoconf matches the INSTALL.ISO in gnulib. + + * Makefile.am ($(srcdir)/INSTALL): Match gnulib INSTALL.ISO. + +2012-01-23 Jim Meyering + + maint: convert .x-sc_* into exclude_file_name_regexp--sc_* exemptions + Many of the .x-sc_* exemptions were no long necessary. Remove those + files and instead, provide exemptions via variable definitions in + cfg.mk to address the few remaining exceptions. + * .x-sc_prohibit_atoi_atof: Remove file. + * .x-sc_space_tab: Likewise. + * .x-sc_sun_os_names: Likewise. + * .x-sc_trailing_blank: Likewise. + * .x-sc_two_space_separator_in_usage: Likewise. + * .x-sc_useless_cpp_parens: Likewise. + * cfg.mk: Add minimal exemptions. + * cfg.mk: Add minimal exemptions. + * doc/standards.texi (Standard C): Address the sole useless-cpp-parens + violation in this file: + -#if defined (__STDC__) || defined (WINDOWSNT) + +#if defined __STDC__ || defined WINDOWSNT + With that, the only remaining offender is config.guess, whose name + is now listed in cfg.mk. + Suggested by Eric Blake. + +2012-01-23 Paul Eggert + + doc: work around mingw-w64 alloca problem with example + * doc/autoconf.texi (Particular Functions): In example code for + alloca, do not re-#define alloca. This works around a mingw-w64 + problem reported by Vincent Torri in + . + +2012-01-21 Jim Meyering + + maint: fix or disable failing syntax-check rules + * cfg.mk (local-checks-to-skip): List failing tests, so we skip + them, for now. + (old_NEWS_hash): Update. + * doc/autoconf.texi: Per suggestion from Eric Blake, obfuscate + the first word of "Filesystem Hierarchy Standard" as File@/system + so it continues to render as one word, yet doesn't trigger the + syntax-check prohibition. + + maint: also sync maint.mk and useless-if-before-free from gnulib + * cfg.mk (gnulib-update): Add them to the list. + * maint.mk: Update from gnulib. + * build-aux/gitlog-to-changelog: Likewise. + * build-aux/useless-if-before-free: New file, from gnulib. + * doc/gnu-oids.texi: Update. + + maint.mk: update from gnulib + * maint.mk: Update. + + maint: placate syntax-check rules: exempt some false positives + * cfg.mk: Exempt maint.mk from the "undesirable word seq" check. + Exempt maint.mk and autoconf.texi from the test_minus_ao check. + + maint: tweak to avoid triggering space-tab-prohibiting syntax-check + * tests/m4sh.at (nargs): Use TAB-SP, not SP-TAB in abusive file name, + to avoid triggering the space-tab-prohibiting syntax-check. + + maint: remove empty lines at EOF + * man/autoconf.x: Remove empty line at EOF. + * man/autoheader.x: Likewise. + * man/autoscan.x: Likewise. + * man/autoupdate.x: Likewise. + * man/ifnames.x: Likewise. + * tests/compile.at: Likewise. + * doc/fdl.texi: Likewise. + + doc: fix grammar/doubled-word errors + * doc/autoconf.texi: Remove/fix doubled-word errors. + Also, s/can not/cannot/. + * lib/m4sugar/m4sh.m4: Reword "if IF" comment to avoid triggering + the doubled-word warning. + +2012-01-21 Stefano Lattarini + + maint: sync files from gnulib + * GNUmakefile: Sync from gnulib. + * build-aux/announce-gen: Likewise. + * build-aux/config.guess: Likewise. + * build-aux/config.sub: Likewise. + * build-aux/git-version-gen: Likewise. + * build-aux/gnupload: Likewise. + * build-aux/move-if-change: Likewise. + * build-aux/texinfo.tex: Likewise. + * build-aux/update-copyright: Likewise. + * build-aux/vc-list-files: Likewise. + * doc/gendocs_template: Likewise. + * doc/standards.texi: Likewise. + * m4/autobuild.m4: Likewise. + +2012-01-21 Stefano Lattarini + + maint: make position of gnulib checkout configurable + Some gnulib-related tools (most prominently, the gnulib-provided + 'bootstrap' script) allow the user to define the position of his + gnulib's repository checkout through the use of the 'GNULIB_SRCDIR' + environment variable. We should do the same, for consistency and + to easily support slightly unusual layouts in developers' source + trees. + + * cfg.mk (gnulib_dir): Define to "$GNULIB_SRCDIR" if that's set, + and to default value of "'$(abs_srcdir)'/../gnulib" otherwise. + Update comments. + +2012-01-20 Stefano Lattarini + + getopt: sync from Automake repository + * lib/Autom4te/Getopt.am: The master copy of this file has + been moved to the Automake repository (see Automake commit + 'v1.11-662-g52246cc' 2012-01-18, "cmdline parsing: move into + a dedicated perl module"). So we now we sync it from there, + by listing it ... + * cfg.mk (autom4te_files): ... in this variable. + +2012-01-20 Stefano Lattarini + + build: fix automake error due to missing ChangeLog + Apparently, Automake does not accept the '$(srcdir)/ChangeLog' + target in Makefile.am as a declaration that ChangeLog is + automatically generated (and thus does not need to exist at + automake time). One has to use a *literal* 'ChangeLog' target. + + Problem introduced in commit v2.68-118-g6ed5195 of 2012-01-17, + "maint: generate ChangeLog from git log". + + * Makefile.ma ($(srcdir)/ChangeLog): Renamed ... + (ChangeLog): ... to this. + +2012-01-17 Stefano Lattarini + + getopt: new Autom4te::Getopt module + * lib/Autom4te/General.pm (getopt): Move the guts of its + implementation ... + * lib/Autom4te/Getopt.pm (parse_options): .. into this function + in the new Autom4te::Getopt module. This will make it simpler + for the implementation to be shared with other projects (right + now, Automake). + * lib/Automake/Makefile.am (dist_perllib_DATA): Add the new + module. + +2012-01-17 Jim Meyering + + tests: avoid spurious failure for each gnu-fortran-using test + The tests compare pre- and post-run lists of envvars, which must + be the same, modulo a list of known, filtered-out exceptions. + However, when running fortran-checking tests with GNU fortran, each + would fail due to the post-run addition of the GFC symbol added in + v2.68-97-gbd962ac. + * tests/local.at (AT_CHECK_ENV): Add GFC to the list of symbols + that we ignore in pre-/post-run environment diffs. + +2012-01-17 Stefano Lattarini + + maint: generate ChangeLog from git log + Following the practice set by various other GNU projects, we start + to automatically generate the ChangeLog file from the git commit + messages. This will avoid duplication (as the ChangeLog entries + were always inserted both in the git commit message and in the + version-controlled ChangeLog file), and potential problems with + spurious merge conflicts (which, although greatly mitigated by + Bruno Haible's `git-merge-changelog' helper program, have never + been completely solved). + + * ChangeLog: Moved ... + * ChangeLog.3: ... to this. + * build-aux/gitlog-to-changelog: New script, synced from gnulib. + * cfg.mk (gnulib-update): Also sync gitlog-to-changelog. + * Makefile.am (gen-ChangeLog): New .PHONY rule, generate the + ChangeLog for distribution. + (dist-hook): Depend on it. + ($(srcdir)/ChangeLog): New dummy rule, to pacify automake "gnu" + strictness. Creates a dummy ChangeLog, that will be overridden + by the proper one at distribution time. + (gen_start_date): New variable, the date starting from which the + git log entries are to be copied in the generated ChangeLog. + (EXTRA_DIST): Add ChangeLog.3 and gitlog-to-changelog. + * configure.ac (AC_CONFIG_SRCDIR): Use 'lib/autoconf/autoconf.m4' + instead of 'ChangeLog' as the sentinel file. + * .gitignore: Add ChangeLog. + +2012-01-15 Stefano Lattarini + + cosmetics: fix some typos in ChangeLog diff --git a/ChangeLog.0 b/ChangeLog.0 new file mode 100644 index 0000000..b46523f --- /dev/null +++ b/ChangeLog.0 @@ -0,0 +1,362 @@ +Mon Jul 20 01:08:01 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_ALLOCA): Don't try -lucb -- it's too often broken. + +Sat Jul 18 13:40:46 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_MAJOR_HEADER): Add missing "$". + + * acspecific.m4 (AC_ALLOCA): Put -lc before -lucb. + +Fri Jul 17 00:00:07 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * autoconf.sh: Print the lines of the input file where + unresolved macros occur. From Francois Pinard. + + * acspecific.m4 (AC_PROG_INSTALL), acgeneral.m4 + (AC_PROGRAM_CHECK): Use test -f instead of -s. + + * autoconf.sh: grep for undefined macros in output. + +Tue Jul 14 01:19:26 1992 David J. MacKenzie (djm@apple-gunkies.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PROGRAM_CHECK): Search PATH manually to + avoid "command not found" messages on /dev/tty. Remove "args + for check" argument. + (AC_INIT): Don't define checkfor; no longer needed. + * acspecific.m4 (AC_PROG_CC, AC_PROG_RANLIB, AC_PROG_YACC, + AC_PROG_LEX): Don't pass "args for check" argument. + + * acgeneral.m4 (AC_PROGRAMS_CHECK): New macro. + * acspecific.m4 (AC_PROG_AWK): Use it. Check for mawk, gawk, + nawk, and awk. + (AC_PROG_YACC): Check for byacc if bison isn't found. + + * acspecific.m4 (AC_PROG_CC): Renamed from AC_PROG_GCC. + (AC_PROG_YACC): Renamed from AC_PROG_BISON. + (AC_PROG_AWK): Renamed from AC_PROG_GAWK. + (AC_PROG_LEX): Renamed from AC_PROG_FLEX. + + * acgeneral.m4 (AC_TEST_PROGRAM): Redirect stderr to /dev/null + both inside and outside the subshell to try to prevent core + dumped messages. Who knows, it might even help. + +Thu Jul 9 21:37:45 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): Check for DGUX before SVR4. + +Fri Jul 3 01:01:50 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acspecific.m4 (AC_REMOTE_TAPE): Renamed from AC_MTIO. + Define HAVE_SYS_MTIO_H instead of NO_MTIO. + (AC_LONG_FILE_NAMES): Renamed from AC_LONG_FILENAMES. + (AC_RSH): Define HAVE_NETDB_H instead of USE_REXEC. + Above mostly from Richard Stallman. + + * acgeneral.m4 (AC_MISSING_FUNCS): Macro removed. + * acspecific.m4 (AC_VPRINTF, AC_WAIT3, AC_UTIME_NULL, + AC_TIMEZONE, AC_ST_BLOCKS, AC_ST_BLKSIZE): Change from + FOO_MISSING to HAVE_FOO. + (AC_WAIT3): Renamed from AC_WAIT3_RUSAGE. + (AC_TIMEZONE): Require AC_STRUCT_TM. + (AC_STRUCT_TM): Provide itself. + + * acgeneral.m4 (AC_OUTPUT): Add --recheck option to config.status. + + * acspecific.m4 (AC_ST_RDEV, AC_CONST): New macros. + + * acgeneral.m4 (AC_DEFINE): Don't consider an empty value arg to + be an omitted arg. + +Thu Jul 2 16:05:05 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): New macro. + + * autoconf.sh: Only reject an arg that's not a known option if it + is an option. + +Tue Jun 30 16:08:04 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_INIT, AC_OUTPUT): Eliminate vpsub. + +Thu Jun 25 12:42:10 1992 David J. MacKenzie (djm@apple-gunkies.gnu.ai.mit.edu) + + * autoconf.sh: Add --version option. + * acgeneral.m4: Support it. + +Wed Jun 24 14:04:13 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_TIMEZONE): Do the checks unconditionally, + not only if strftime.o is in LIBOBJS. + + * acspecific.m4 (AC_DIR_HEADER): Don't assume sys/dir.h exists. + + * acgeneral.m4 (AC_PROGRAM_CHECK): Don't include the program + name in the value-if-found. From Rich Murphey. + * acspecific.m4 (AC_PROG_{GCC,RANLIB,GAWK,BISON,FLEX}): Change + callers. + + * acgeneral.m4 (AC_OUTPUT): Mention the args given to + configure in a comment in config.status. + +Fri Jun 19 13:18:12 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_FUNC_CHECK): Use the third arg when it's + non-null, not when it's null. From Ian Lance Taylor. + +Thu Jun 18 12:10:27 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_BEFORE): Print message in next-error format. + From Franc,ois Pinard. + + * acgeneral.m4 (AC_PROGRAM_CHECK): If args-for-use is empty, + don't put a space after the program name. + + * acspecific.m4 (AC_DECLARE_YYTEXT): Move AC_REQUIREs from + AC_PROG_FLEX to here, where they belong. + + * acspecific.m4 (AC_MEMORY_H): Look for memchr instead of memcpy. + From Karl Berry. + +Wed Jun 17 09:56:59 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_BEFORE): New macro. + * acspecific.m4 (AC_PROG_GCC, AC_DIR_HEADER, AC_AIX, + AC_MINIX, AC_ISC_POSIX): Use it. + +Tue Jun 16 14:46:29 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * autoconf.sh: Remove incomplete output file if interrupted. + + * acgeneral.m4 (AC_INIT): Avoid running an extra subshell for pwd. + From Franc,ois Pinard. + +Mon Jun 15 21:27:49 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_TEST_PROGRAM): Take another arg for + cross-compiling. + * acspecific.m4 (AC_CROSS_CHECK): New program. + + * acgeneral.m4 (AC_REQUIRE, AC_PROVIDE): New macros. + (AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_TEST_CPP): Use them. + * acspecific.m4 (AC_PROG_GCC, AC_GCC_TRADITIONAL, AC_PROG_CPP, + AC_PROG_FLEX, AC_INLINE): Ditto. + +Sat Jun 13 17:54:24 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acspecific.m4 (AC_MEMORY_H): echo what it's doing. + +Thu Jun 11 14:18:35 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acspecific.m4 (AC_MINUS_C_MINUS_O, AC_INLINE, + AC_SETVBUF_REVERSED): New macros. + (AC_ALLOCA): Define HAVE_ALLOCA_H if appropriate. + + * acgeneral.m4 (AC_INIT): Do pwd in the srcdir, not current dir. + Scan through "$@" (implicitly) instead of $*. + (AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_COMPILE_CHECK, + AC_TEST_PROGRAM, AC_TEST_CPP): Supply a `:' if `true' argument + is empty. + * acgeneral.m4, acspecific.m4: Omit `:' in callers. + +Wed Jun 10 12:03:11 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_HEADER_CHECK, + AC_COMPILE_CHECK, AC_TEST_PROGRAM, AC_TEST_CPP, AC_FUNC_CHECK): + Make the last argument (program to run if test fails) optional. + (AC_HAVE_FUNCS, AC_HAVE_HEADERS): Don't pass optional last args. + * acspecific.m4 (most macros): Likewise. + +Mon Jun 8 16:27:10 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_VFORK): Get rid of backquotes. + + * acgeneral.m4 (AC_OUTPUT): Exit with 0 status when + --no-create was given. + Only write to the AC_CONFIG_NAME file if it doesn't exist or is + different from what we'd write. From Ian Lance Taylor. + +Thu Jun 4 14:46:22 1992 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_UNISTD_H, AC_UID_T, AC_SIZE_T, AC_PID_T, + AC_ST_BLKSIZE, AC_STRUCT_TM): Quote the whole macro body. + + * acgeneral.m4 (AC_OUTPUT): Look for config header.in in + top_srcdir, not srcdir. From Garrett Wollman. + + * acgeneral.m4 (AC_OUTPUT): Don't add make .NOEXPORT rule to + output files. + + * acgeneral.m4, acspecific.m4: Rename AC_PROG_CHECK to + AC_PROGRAM_CHECK, AC_PROG_EGREP to AC_PROGRAM_EGREP, + AC_TEST_PROG to AC_TEST_PROGRAM. + +Wed Jun 3 14:00:07 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_INIT, AC_OUTPUT): Add --no-create option. + + * acgeneral.m4 (AC_COMPILE_CHECK): Check the C compiler exit + status instead of trying to run the test program. + + * acspecific.m4 (AC_RESTARTABLE_SYSCALLS): Use AC_TEST_PROG + instead of doing it by hand. + + * acspecific.m4 (AC_PROG_GCC, AC_AIX, AC_XENIX_DIR, + AC_SCO_INTL, AC_DYNIX_SEQ): Use AC_PROG_EGREP instead of + AC_TEST_PROG. + + * acgeneral.m4 (AC_TEST_PROG): Renamed from AC_TEST_PROGRAM. + + * acgeneral.m4 (AC_INIT): Don't relativize `.'. + (AC_OUTPUT): Substitute the subdirectory path, not the top + path, for srcdir, unless the top path is `.'. + + * acgeneral.m4 (AC_OUTPUT): Special-case substituting DEFS. + From Ian Lance Taylor. + + * acspecific.m4 (AC_GCC_TRADITIONAL): Use CPP instead of + compiling a test program. + + * acgeneral.m4 (AC_TEST_CPP): Pass DEFS to CPP. + (AC_HEADER_EGREP): Don't echo anything. + (AC_PROG_EGREP): New macro. + +Tue Jun 2 14:07:27 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_CONFIG_HEADER): Renamed from AC_HEADER_FILE. + Rename AC_HEADER_NAME TO AC_CONFIG_NAME. + (AC_SUBST): Add the arg variable to a diversion for config.status. + (AC_OUTPUT): Write the code to create output files into config.status, + then run that. Always use `awk'; checking for nawk in a subshell + doesn't seem to work on 4.3BSD. + + * acgeneral.m4 (AC_HEADER_EGREP): Pass DEFS to CPP. + + * acspecific.m4 (AC_SIZE_T): Define size_t as int, not long. + From Ian Lance Taylor. + + * acspecific.m4 (AC_STDC_HEADERS): Also check for stdarg.h. + From Garrett Wollman. + +Wed May 20 00:34:03 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Use nawk if available. + + * acgeneral.m4 (AC_INIT): Make srcdir=`.' absolute. + + * acspecific.m4 (AC_DIR_HEADER): Include sys/types.h before + dir header in closedir test. + + * acgeneral.m4, acspecific.m4: AC_LIBTHING_CHECK renamed to + AC_COMPILE_CHECK. + + * acspecific.m4 (AC_AIX, AC_XENIX_DIR, AC_SCO_INTL, AC_DYNIX_SEQ): + Use the C preprocessor instead of just looking for files. + +Mon May 18 20:51:50 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acspecific.m4 (WORDS_BIGENDIAN): Fix exit expression. + (AC_DECLARE_YYTEXT): Eval $CPP. + (AC_DIR_HEADER): Compile the test program; don't just + preprocess it. Above all from Karl Berry. + +Fri May 15 00:57:01 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_AIX): Don't define _BSD, to avoid getting + union wait. + + * acgeneral.m4 (AC_HEADER_EGREP): New macro, replacing AC_IDENT*. + * acspecific.m4 (AC_MEMORY_H, AC_RETSIGTYPE, AC_{UID,SIZE,PID}_T): + Use it. + + * acgeneral.m4 (AC_TEST_CPP): New macro. + (AC_IDENT_{PRESENT,MISSING}): Macros deleted. + (AC_HEADER_CHECK): Use AC_TEST_CPP, replaces AC_HEADER_{PRESENT, + MISSING}. + (AC_LIBTHING_CHECK): Replace AC_LIBTHING_{PRESENT,MISSING}. + (AC_FUNC_CHECK): Replace AC_FUNC_PRESENT. + (AC_INIT): Don't set INCLUDEDIR. + * acspecific.m4 (AC_DIR_HEADER): Use AC_TEST_CPP. + * All other macros: Don't refer to INCLUDEDIR; use + AC_HEADER_CHECK instead. + + * acspecific.m4 (AC_PROG_CPP): Don't evaluate $CC until called. + Try $CC -E before /lib/cpp. + +Thu May 14 23:15:02 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Remove each file before creating it. + +Sat May 9 14:52:57 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_WAIT3_RUSAGE): New macro. + + * acgeneral.m4 (AC_INIT, AC_OUTPUT): Use AC_SUBST instead of a + special mechanism to substitute for srcdir. + + * acgeneral.m4 (AC_OUTPUT): Substitute for exec_prefix if it + was given, even if not substituting for prefix. + + * acgeneral.m4 (AC_INIT, AC_OUTPUT): Remove @VPATH@ + substitution; use @srcdir@ instead. + +Sun May 3 01:21:47 1992 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_NOTICE): New macro taken from AC_INIT, to avoid + m4 coredump. From Karl Berry. + + * acgeneral.m4 (AC_OUTPUT): Look for header-file.in in $srcdir, + not current dir. + + * acgeneral.m4 (AC_IDENT_{MISSING,PRESENT}): Make them agree + with the documentation -- the third arg is a shell command, + not an identifier to define. + * acspecific.m4 (AC_DIR_HEADER): Change the caller. + +Mon Apr 27 09:15:15 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * acspecific.m4: Use AC_TEST_PROGRAM wherever $compile was + being used directly. + + * acgeneral.m4 (AC_HAVE_HEADERS, AC_HAVE_FUNCS, + AC_FUNC_PRESENT, AC_TEST_PROGRAM): New macros from Ian Lance Taylor. + + * acspecific.m4 (AC_PROG_INSTALL): Screen out /usr/sbin/install. + (AC_CHAR_UNSIGNED): Don't define __CHAR_UNSIGNED__ if it's + predefined. + +Fri Apr 24 10:08:21 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Make the arg a list of files instead of + directories. + + * acspecific.m4 (AC_ALLOCA): Check whether the alternate libraries + actually contain alloca. From Ian Lance Taylor. + + * acspecific.m4 (AC_PROG_CPP): New macro. + + * acgeneral.m4 (AC_OUTPUT): Allow newly defined values to be more + than one word for AC_HEADER_FILE. From Karl Berry. + + * acgeneral.m4 (AC_OUTPUT): Don't substitute DEFS if AC_HEADER_FILE. + (AC_LIBTHING{PRESENT,MISSING}): Run conftest in subshell. + From Ian Lance Taylor. + + + ----- + + Copyright (C) 1992 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 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 + . diff --git a/ChangeLog.1 b/ChangeLog.1 new file mode 100644 index 0000000..a28662b --- /dev/null +++ b/ChangeLog.1 @@ -0,0 +1,1939 @@ +Thu May 12 15:55:40 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * Version 1.11. + + * autoconf.texi: Document filename restriction on CPP. + +Thu May 12 10:11:20 1994 David J. MacKenzie (djm@hill.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Treat "./Makefile" like "Makefile". + From Karl Berry. + +Tue May 10 00:08:19 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Set prefix and exec_prefix if they + weren't set already. + +Sat May 7 20:06:59 1994 Noah Friedman (friedman@kropotkin.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_INSTALL): If using install.sh, add `-c' + to INSTALL. + +Sat May 7 15:36:22 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acgeneral.m4 (AC_OUTPUT): If configuring in the source tree, + don't end top_srcdir with "/.". + * acspecific.m4 (AC_SET_MAKE): Remove temp file. + From John Interrante . + +Fri May 6 15:26:48 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acgeneral.m4 (AC_SIZEOF_TYPE): Fatal error if test program fails. + +Fri May 6 12:52:19 1994 David J. MacKenzie (djm@gamera.eng.umd.edu) + + * acgeneral.m4 (AC_OUTPUT): Run "./config.status", not "config.status". + From Kevin Gallagher . + +Fri May 6 00:45:29 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acspecific.m4 (AC_WAIT3): Sleep in the parent to avoid rm + problems on fast machines. From david d zuhn. + +Thu May 5 12:51:32 1994 David J. MacKenzie (djm@gamera.eng.umd.edu) + + * Version 1.10. + + * Makefile.in (install): Don't install INSTALL. + (installcheck, install-info): New targets. + +Mon May 2 16:31:33 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * autoconf.sh, autoheader.sh: If M4 is an absolute file name that + no longer exists, use M4=m4. + +Mon May 2 13:06:06 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) + + * acspecific.m4 (AC_HAVE_POUNDBANG): Quote # in message. + From schwab@issan.informatik.uni-dortmund.de (Andreas Schwab). + + * autoconf.texi: Document config.h.bot. Fix typo in AC_HAVE_POUNDBANG. + + * acspecific.m4 (AC_PROG_CXX): Look for "cxx" (DEC C++ compiler) too. + + * autoheader.sh: Fix tr string for Solaris tr. + Add config.h.bot if present. + From richard@sol.kbsi.com (Richard Henderson). + +Fri Apr 29 12:53:53 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) + + * acspecific.m4 (AC_PROG_INSTALL): Use install.sh from srcdir + or srcdir/.. or srcdir/../.. and never default to cp. + +Thu Apr 28 12:01:01 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) + + * acconfig.h: Add HAVE_MMAP entry. + * acspecific.m4 (AC_MMAP): If NBPC is not defined, use PAGESIZE. + From "Kaveh R. Ghazi" . + + * acgeneral.m4 (AC_OUTPUT_HEADER): For each file being created, + munge a copy of conftest.sed rather than the original. + From brook@trillium.botany.utexas.edu (Brook Milligan). + +Tue Apr 26 00:27:21 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_LANG_C, AC_LANG_CPLUSPLUS): Remove CFLAGS and + CXXFLAGS from ac_cpp. + +Thu Apr 21 19:43:20 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * Version 1.9. + + * autoconf.texi: Document special AC_FIND_XTRA ordering + dependencies. + + * acspecific.m4 (AC_FIND_XTRA): Reorder AC_REQUIREs. + + * acspecific.m4 (AC_FIND_X): AC_REQUIRE_CPP. + + * acspecific.m4 (AC_PROG_LEX): Say what we set LEXLIB to. + +Wed Apr 20 13:17:05 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PARSEARGS): Allow . in hostnames. Use string + comparison on them. + (AC_HAVE_LIBRARY): namespace cleanup. + + * autoconf.texi: Describe changes to AC_FIND_X, AC_FIND_XTRA, and + AC_YYTEXT_POINTER. + + * acconfig.h: Replace DECLARE_YYTEXT with YYTEXT_POINTER. + + * acgeneral.m4 (AC_PARSEARGS): --gas and --x set with_gas and + with_x to yes, not 1. + + * acspecific.m4 (AC_YYTEXT_POINTER): New macro, replacing + AC_DECLARE_YYTEXT. + (AC_FIND_X): Assume no X if --without-x was given. + (AC_FIND_XTRA): Quotes AC_REQUIRE args. Run uname in a subshell in + case it's missing. Put -l options in X_EXTRA_LIBS. Print values + of the variables we set if verbose. + +Tue Apr 19 14:14:25 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * autoconf.texi: Note GNU m4 1.0 bugs. + + * acspecific.m4 (AC_FIND_X_XMKMF): Set variables correctly. + + * autoconf.texi: Don't @setchapternewpage odd by default. Mention + autoheader AC_SIZEOF_TYPE symbol generation. + + * acgeneral.m4 (AC_SIZEOF_TYPE): Fix typo. + + * Makefile.in (install): Don't install aclocal.m4. + + * autoheader.sh: Generate entries for AC_SIZEOF_TYPE + automatically. + +Mon Apr 18 22:14:59 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_SIZEOF_TYPE): Remove second arg, and generate a + symbol name automatically. + + * autoconf.texi: Document new AC_SIZEOF_TYPE usage. + + * acspecific.m4 (AC_PROG_INSTALL): Only filter out "install" + containing "dspmsg". + (AC_FIND_X_XMKMF): Fix variable names to not conflict with grep -v. + + * autoconf.texi: Various small fixes. + + * INSTALL: Say configure takes "awhile". + +Sat Apr 16 15:05:31 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4: Call AC_LANG_C in AC_PREPARE, not AC_INIT. + +Fri Apr 15 07:00:37 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * Version 1.8. + + * acgeneral.m4: Rename ac_configure_args back to configure_args, + since some people have been using it. + +Thu Apr 14 14:45:29 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * autoconf.texi: Note that AC_ENABLE and AC_WITH arguments + shouldn't contain blanks, for now. + +Wed Apr 13 17:26:36 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_SET_MAKE): Use $MAKE if defined, else "make". + + * autoconf.texi: Add missing files to diagram. + + * acgeneral.m4 (AC_TEST_CPP): Propogate comment about Coherent + lossage into configures. + +Sat Apr 9 17:34:29 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PARSEARGS): Unknown option is a fatal error. + + * acgeneral.m4: Remove ac_ prefix from some variables set by + options, for consistency and backward compatibility. + +Fri Apr 8 13:24:29 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_FIND_XTRA): Don't test for -lsocket on IRIX. + From Karl Berry. + + * acspecific.m4 (AC_FIND_X_XMKMF, AC_FIND_X_DIRECT): Don't + override --x-includes and --x-libraries. Check openwin last due + to its bugs. + + * acgeneral.m4: Add --x-includes, --x-libraries options. Document + them and --build, --host, --target. + + * autoconf.texi: Mention --x-includes and --x-libraries. + + * INSTALL: Mention --x-includes and --x-libraries. + +Tue Apr 5 12:46:47 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * autoconf.texi: Document top_srcdir substitution. + + * acspecific.m4 (AC_PROG_INSTALL): Look for install.sh in + @top_srcdir@, not $srcdir. + + * acgeneral.m4 (AC_OUTPUT): AC_SUBST top_srcdir. Set it. + +Mon Apr 4 20:13:08 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * autoconf.texi: Fix dependencies examples. + + * Makefile.in: Update configuration dependencies. + + * acgeneral.m4: Add back --no-create option. Make config.status + --recheck use it. + + * autoheader.sh: Go back to doing move-if-change. (Work around in + dependencies by using stamp files.) + +Thu Mar 31 11:34:50 1994 David J. MacKenzie (djm@hill.gnu.ai.mit.edu) + + * Makefile.in (autoconf, autoheader, configure): Write to $@.tmp + instead of to $@ directly so that after a disk full error, the + targets to not exist. Otherwise, a subsequent make could install + a corrupt (but not executable) script. From Jim Meyering. + +Thu Mar 31 08:22:29 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * autoconf.texi: Re-document --with argument. + + * acgeneral.m4 (AC_PARSEARGS): --with can take an argument again. + +Wed Mar 30 20:01:57 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * autoconf.texi: Document --disable- options. + + * acgeneral.m4 (AC_PARSEARGS): Add --disable-FEATURE. + + * INSTALL: Mention --enable- options. + +Mon Mar 28 17:43:22 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PARSEARGS): Make multiple non-option args a + fatal error. + + * acspecific.m4: Change all occurrences of $(MAKE_VAR) to + ${MAKE_VAR}. + + * autoconf.texi (Command Line): New node. Move some descriptions + here from General Feature Tests. Describe --without- options. + + * acgeneral.m4 (AC_PARSEARGS): Rewrite again, using ideas from the + GNU libc configure.in. All options that take an argument set + shell variables. + (AC_COMPILE_CHECK): Add `return' in `int' function. + + * INSTALL: Fix typo. + +Sun Mar 27 00:44:07 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_NOTICE): Don't save original args or initialize + options here. + (AC_PARSEARGS): Do them here. + (AC_PREPARE): Save a copy of original args here, if it hasn't been + done yet. + +Sat Mar 26 01:32:40 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acgeneral.m4: Omit obsolete options from usage message. + Quote args to AC_CHECKING that contain m4 variables. + + * INSTALL: Note that env can be used to set env vars. + + * autoconf.texi: Document AC_SET_MAKE. + Note that vsprintf and vfprintf come with vprintf. + Note that env can be used to set env vars. + + * acspecific.m4 (AC_SET_MAKE): New macro. + (AC_PROG_INSTALL): Find scoinst as a good install program. + + * acgeneral.m4: Initialize variables set by options. + (AC_HAVE_HEADERS): Require cpp. + + * autoconf.texi: Document AC_ENABLE and @prefix@ and @exec_prefix@ + substitutions. + + * acgeneral.m4: Recognize all the Cygnus configure options; warn + about other arguments. Make default value for --with "yes", not + "1". AC_SUBST for prefix and exec_prefix. + (AC_ENABLE): New macro. + +Thu Mar 24 18:11:00 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * INSTALL: Describe recently added configure options. + + * autoconf.texi: Style cleanups. Mention config.h.top. + + * autoheader.sh: Add ${config_h}.top to the output, if it's + present. + +Thu Mar 24 13:36:19 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * autoconf.sh: Remove all temp files when exiting. If m4 fails, + produce no output and exit with the m4 exit status. + + * autoconf.texi: Document AC_PREREQ. + + * acgeneral.m4 (AC_PREREQ): New macro, with some helper macros. + +Thu Mar 24 01:20:49 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * Makefile.in (acdatadir): New variable based on datadir, giving + Autoconf lib files their own subdirectory. Use it instead of + datadir. + +Wed Mar 23 22:41:54 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * autoconf.texi: Change names of nodes that describe invoking + configure and config.status to conform to coding standards. + Document --version, --help, --silent/--quiet, --verbose options to + configure and config.status. + + * acgeneral.m4 (AC_PARSEARGS): Add --help and --version to + configure. Simplify getting option arguments. Complain about + impossible host arguments. + (AC_OUTPUT): Add --help and --version to config.status. + +Wed Mar 23 00:16:28 1994 Roland McGrath (roland@mole.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_CHECKING): Do nothing if $ac_silent is set. + (AC_PARSEARGS): Grok -q/--quiet/--silent and set $ac_silent. + +Tue Mar 22 18:28:30 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * autoconf.texi: Document AC_SIZEOF_TYPE. + + * acspecific.m4 (AC_INT_16_BITS, AC_LONG_64_BITS): Mark obsolete + with advice to use AC_SIZEOF_TYPE instead. + + * acgeneral.m4 (AC_SIZEOF_TYPE): New macro. + +Tue Mar 22 08:44:40 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * autoconf.texi: Describe AC_CHECKING et al. + + * acspecific.m4: Use AC_CHECKING et al. where appropriate. + + * acgeneral.m4 (AC_CHECKING, AC_VERBOSE, AC_ERROR, AC_WARN): New + macros. Use them where appropriate. + (AC_LANG_C, AC_LANG_CPLUSPLUS): Fix quoting of ac_cpp. + + * acspecific.m4 (AC_PROG_CPP): Don't add $CFLAGS to CPP. + (AC_PROG_CXXCPP): Don't add $CXXFLAGS to CXXCPP. + + * acgeneral.m4 (AC_OUTPUT): Don't remove VPATH lines containing + colons. From Jim Meyering (meyering@comco.com). + (AC_LANG_C): Add CFLAGS to ac_cpp. + (AC_LANG_CPLUSPLUS): Add CXXFLAGS to ac_cpp. + +Sat Mar 19 16:38:03 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_LANG_RESTORE): Only emit shell code to change + the current language if it actually changed. + + * autoconf.texi: Add info dir entry. Describe new C++ macros and + AC_MMAP. + (Language Choice): New section. + Add another example of dependencies. + + * acspecific.m4 (AC_PROG_CXX, AC_PROG_CXXCPP, AC_REQUIRE_CPP): New + macros based on work by zoo@aggregate.com (david d zuhn). + (AC_DECLARE_YYTEXT): Use AC_REQUIRE_CPP. Warn that it's broken. + (AC_STDC_HEADERS): Use AC_REQUIRE_CPP. + (AC_MMAP): New macro from Mike Haertel and Jim Avera. + + * acgeneral.m4 (AC_PARSEARGS): Check for missing arguments to + options. Recognize --target. Save the original args before + modifying them. + (AC_INIT): Call AC_LANG_C. + (AC_PREPARE): Don't save the original args here (too late). + (AC_LANG_C, AC_LANG_CPLUSPLUS, AC_LANG_SAVE, AC_LANG_RESTORE): + New macros based on work by zoo@aggregate.com (david d zuhn). + (AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_COMPILE_CHECK, + AC_TEST_PROGRAM, AC_TEST_CPP): Use AC_REQUIRE_CPP and ac_ext and + ac_cpp. + + * autoheader.sh: Update the file even if it is unchanged, to avoid + foiling a Makefile rule that makes it from configure.in. If you + let the rule for making config.status from configure create + config.h from config.h.in, then an unnecessary update here will + not cause unneeded recompilation. Recompilation should only + happen if config.h is updated, which won't occur if config.h.in + had the same contents, even if its timestamp changed. (Ick.) + + * Makefile.in (Makefile): Don't depend on config.status, to avoid + running config.status too many times. + +Fri Mar 18 00:43:21 1994 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * autoconf.texi: Document AC_FIND_XTRA. + + * acgeneral.m4 (AC_OUTPUT): Remove VPATH lines if srcdir=., to + work around Sun make bug. From Karl Berry. + + Rename internal use shell variables to start with "ac_". + + Trap signal 2 (SIGINT), not signal 3 (SIGQUIT), which means stop + without cleaning up. From eggert@twinsun.com (Paul Eggert). + + * acspecific.m4 (AC_FIND_XTRA): New macro from Karl Berry + (karl@cs.umb.edu). + (AC_FIND_X, AC_ISC_POSIX): Provide self. + + (AC_DECLARE_YYTEXT): Move AC_SUBST. Don't quote value of + DECLARE_YYTEXT. From Karl Berry. + + (AC_PROG_CPP): Include $CFLAGS in CPP. + + Rename internal use shell variables to start with "ac_". + + * autoconf.sh, autoheader.sh: Trap signal 2 (SIGINT), not signal 3 + (SIGQUIT), which means stop without cleaning up. From + eggert@twinsun.com (Paul Eggert). + + * autoconf.texi: Mention shell variable prefixes. + + * autoconf.texi: Work around RCS substitution in AC_REVISION + example. + +Wed Mar 16 19:55:17 1994 Noah Friedman (friedman@prep.ai.mit.edu) + + * acgeneral.m4 (compile): Include $LDFLAGS. + +Thu Mar 10 01:27:20 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PREPARE): Don't absolutize relative paths. + (AC_OUTPUT): For relative paths, prepend to $srcdir as many + "../" as the number of subdirectories deep the file being created is. + +Tue Feb 15 16:02:19 1994 Noah Friedman (friedman@prep.ai.mit.edu) + + * acspecific.m4 (AC_PROG_INSTALL): Reject /sbin/install. + +Sun Feb 13 21:15:45 1994 Noah Friedman (friedman@prep.ai.mit.edu) + + * autoconf.texi (Setting Variables, Sample configure.in): Replace + references to AC_UNISTD_H with AC_HAVE_HEADERS(unistd.h). + +Thu Feb 10 21:39:43 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_SYS_SIGLIST_DECLARED): New macro. + +Sat Feb 5 13:35:52 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): Check for -lkvm separately after + -lutil check. + +Fri Feb 4 17:17:11 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT_HEADER): Move creation of conftest.sed + outside of `for' loop. We need only do this once for all the + output files. + +Fri Jan 21 16:35:00 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_INSTALL_INSTALL_SH): New macro for + INSTALL value to use install.sh. + (AC_PROG_INSTALL): Use it. + +Thu Jan 6 16:22:25 1994 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_DEFINE): Use AC_QUOTE_SQUOTE instead of + AC_DEFINE_QUOTE on AC_VAL. From Bruno Haible + . + * acgeneral.m4 (AC_DEFINE_UNQUOTED): pushdef/popdef + AC_QUOTE_SQUOTE instead of AC_DEFINE_QUOTE. + +Wed Dec 22 03:51:53 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_DEFINE): in verbose strings, put + AC_DEFINE_QUOTE exprs in double quotes to avoid shell wildcard + expansion. + + * acgeneral.m4 (AC_PROGRAM_PATH, AC_PROGRAMS_PATH): New macros. + * autoconf.texi (General Tests): Document them. + + * configure.in: Use AC_PROGRAMS_PATH to find m4, not AC_PROGRAMS_CHECK. + Put `m4' in the list of progs-to-check, since we want the absolute + pathname for that too if we can get it. + +Fri Dec 17 13:44:24 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_ALLOCA): define HAVE_ALLOCA if alloca is + present in system libraries. + +Tue Dec 14 14:53:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PREPARE): Remove $ac_clean_files in traps. + + * acspecific.m4 (AC_STDC_HEADERS): Check that free appears in stdlib.h. + +Fri Dec 10 06:35:25 1993 Noah Friedman (friedman@gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_INSTALL): Don't look for install in `.'. + +Wed Dec 8 12:10:59 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_FIND_X_XMKMF): Redirect stderr to /dev/null in + eval'd make pipeline. + + * acgeneral.m4 (AC_QUOTE_SED): Quote ! as well. + +Mon Dec 6 23:41:05 1993 Noah Friedman (friedman@gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_CPP): Try 'cc -E -traditional-cpp' for NeXT. + +Thu Dec 2 02:25:39 1993 Noah Friedman (friedman@gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PREPARE): use rm -r to remove conftest* both in + exit traps and at start of script. + +Wed Dec 1 03:22:21 1993 Noah Friedman (friedman@gnu.ai.mit.edu) + + * acspecific.m4 (AC_FIND_X_DIRECT): Search for includes and libs + in more places. + +Sun Nov 28 21:57:31 1993 Noah Friedman (friedman@gnu.ai.mit.edu) + + * acgeneral.m4 (AC_NOTICE): Replace "this program" with "this + configure script" to disambiguate between configure and the + program it is distributed with (which can have different terms). + +Tue Nov 23 19:41:53 1993 Noah Friedman (friedman@gnu.ai.mit.edu) + + * acspecific.m4 (AC_FIND_X_DIRECT): Use the shell variable + `x_direct_test_include' to choose the include file to search for. + +Sat Nov 20 17:58:09 1993 Noah Friedman (friedman@gnu.ai.mit.edu) + + * acspecific.m4 (AC_FIND_X_DIRECT): Search for R6 includes & libs + in various places. Look for /usr/athena/include & /usr/athena/lib. + Make AC_HAVE_LIBRARY check for the library specified by the shell + variable `x_direct_test_library', rather than hardcoding Xt (to + which the shell variable now defaults). + +Thu Nov 18 18:17:21 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT_HEADER): Use ! instead of @ as the + sed substitution separator. + + * install.sh: New file. + * Makefile.in (DISTFILES): Add it. + * acspecific.m4 (AC_PROG_INSTALL): Use it as the default + instead of cp, if it's there. + +Sat Nov 13 12:24:57 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Extend that last change to also + happen for .C, .cc, and .m (objc) files. + +Wed Nov 10 09:26:35 1993 Noah Friedman (friedman@gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): When substituting .c or .h files, put + autoconf-added comments in '/* ... */'. + +Mon Nov 8 16:22:48 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_NOTICE): Put autoconf version number in configure. + +Fri Nov 5 23:31:28 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_FIND_X_XMKMF): properly quote `acfindx' rule. + +Fri Oct 29 21:46:57 1993 Jim Meyering (meyering@comco.com) + + * acspecific.m4 (HAVE_LONG_DOUBLE): Add code to detect Stardent + Vistra lossage. From Kaveh R. Ghazi (ghazi@noc.rutgers.edu). + +Tue Oct 26 15:24:33 1993 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * Version 1.7. + +Tue Oct 19 23:49:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_TEST_PROGRAM): Don't remove conftest* before + running $2 or $3 or $4; just once at the end. + +Mon Oct 18 01:38:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PREPARE): Echo a newline into confdefs.h so it + is never empty. + +Fri Oct 15 18:49:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_CONST): Added test of trivial use for broken + Ultrix-32 V3.1 Rev 9 vcc. + +Fri Oct 15 15:44:39 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OBSOLETE): New macro. + * acspecific.m4 (AC_UNISTD_H, AC_USG, AC_MEMORY_H): Call it. + + * acspecific.m4 (AC_LONG_FILE_NAMES): Try to create files in + ${prefix}/lib and ${exec_prefix}/lib instead of ${prefix} and + ${exec_prefix}; they are more likely to be writable. + + * Makefile.in (clean): Remove *.ma and *.mas, the macro index files. + +Tue Oct 12 16:02:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_RETSIGTYPE): AC_PROVIDE self. + +Mon Oct 11 19:09:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makefile.in (editsh): Obfuscate @M4@ and @datadir@ references so + configure doesn't edit them. + +Sun Oct 10 14:01:35 1993 Jim Meyering (meyering@comco.com) + + * autoconf.sh (--help): Exit successfully. + +Sat Oct 9 08:29:15 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * Version 1.6. + + * acconfig.h (inline): New entry. + + * acspecific.m4 (AC_DIR_HEADER_CHECK): Don't call opendir, in + case the needed libraries (e.g., -ldir on Xenix) aren't in + LIBS yet. From Jim Meyering (meyering@comco.com). + + * acspecific.m4 (AC_PROG_LEX): Fix typo. + + * acgeneral.m4 (AC_HEADER_EGREP, AC_PROGRAM_EGREP, + AC_COMPILE_CHECK, AC_TEST_PROGRAM, AC_TEST_CPP): Remove any + temporary files before doing the actions, in case they're + nested tests. From gray@antaire.com (Gray Watson). + + * configure.in: Check for GNU m4 under several names. + * Makefile.in: Use that value. + From Franc,ois Pinard. + + * acspecific.m4 (AC_STRUCT_TM): Use a member of struct tm, to + make sure the compiler complains if it's not defined. + From Bruno Haible (haible@ma2s2.mathematik.uni-karlsruhe.de). + + * acspecific.m4 (AC_FIND_X_XMKMF): If libX11.a isn't in + USRLIBDIR, check in LIBDIR. Filter out any make verbose messages. + +Tue Oct 05 19:21:29 1993 Jim Meyering (meyering@comco.com) + + * acspecific.m4 (AC_LONG_DOUBLE): Announce that this feature is being + checked even if the test is simply whether $CC is gcc. + +Tue Oct 5 14:23:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoheader.sh: Produce HAVE_LIBfoo for AC_HAVE_LIBRARY. + +Sun Oct 3 15:41:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Write assignment for `extrasub'; in sed + cmds, write "$extrasub" so configure.in can set it to do sed frobs. + Take second arg and write it to config.status before `exit 0'. + + * acspecific.m4 (AC_CONST): Say `checking for lack of working + const'. That is precisely accurate. + +Wed Sep 22 15:47:50 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acgeneral.m4: If not using GNU m4, abort. + + * acgeneral.m4 (AC_PREPARE): Lose if we're not in the srcdir, + not if we're in it. But disable the check for now. + +Mon Sep 20 15:32:30 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PREPARE): Check for $srcdir being configured, + diagnose and lose. + + * acgeneral.m4 (AC_QUOTE_SED): Quote @ and %. + + * acgeneral.m4 (AC_OUTPUT): Say "$file is unchanged" when it is. + +Sat Sep 18 14:32:04 1993 Ian Lance Taylor (ian@airs.com) + + * acgeneral.m4: Substitute for CONFIG_FILES and CONFIG_HEADERS + before using them, in case they have multiple values. + +Fri Sep 17 14:40:20 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_WAIT3): wait3 works if ru_stime is + nonzero, too. + +Thu Sep 16 15:39:53 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_FIND_X_XMKMF): Code moved from AC_FIND_X. + (AC_FIND_X_DIRECT): New function, derived from code by Karl + Berry and Rob Savoye. + (AC_FIND_X): Call them. + +Wed Sep 15 19:06:46 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PREPARE): Remove confdefs* on exit with trap 0. + (AC_OUTPUT): Don't bother removing it. + + * acgeneral.m4: Remove --no-create option; not useful. + +Mon Sep 13 21:54:46 1993 Paul Eggert (eggert@twinsun.com) + + * autoheader.sh: Rename the temporary output to the real + output if their contents differ, not if their contents are identical. + This fixes bug introduced in Aug 30 change. + +Mon Sep 13 16:50:30 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Run config.status with + CONFIG_SHELL if defined. Same for configure run from config.status. + Rename gen_files to CONFIG_FILES and gen_config to CONFIG_HEADERS. + + * acgeneral.m4 (AC_PREPARE): Remove confdefs* in trap. + +Fri Sep 10 00:29:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_LONG_FILE_NAMES): Test /var/tmp as well. + In loop, skip past nonexistent dirs. + + * acspecific.m4 (AC_CONST): Say "working", not "broken". We are + checking for a working const as opposed to a broken or absent + const, not for a broken const as opposed to a working one. + +Thu Sep 9 09:25:49 1993 Jim Meyering (meyering@comco.com) + + * acspecific.m4, acconfig.h (AC_LONG_64_BITS): New macro. + +Wed Sep 1 18:54:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PROGRAM_CHECK): Use && instead of test -a. + +Tue Aug 31 19:21:35 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT_HEADER): Support generating multiple + .h files. From gray@antaire.com (Gray Watson). + + * acspecific.m4 (AC_ALLOCA): If using alloca.o, define C_ALLOCA. + + * acgeneral.m4 (compile, AC_HEADER_EGREP, AC_PROGRAM_EGREP, + AC_COMPILE_CHECK, AC_TEST_PROGRAM, AC_TEST_CPP): Remove $DEFS + from cc and cpp command lines; include "confdefs.h" in test + files. + (AC_DEFINE): Append a #define to confdefs.h. + Reduce duplicated code by introducing a temp variable, AC_VAL. + +Mon Aug 30 17:36:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoheader.sh: Don't write output if it is the same as output file. + +Wed Aug 25 14:14:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_VFORK): Check for SunOS 5.2 bug with ignoring + signal in parent before vfork. From eggert. + +Fri Aug 20 10:14:42 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PARSEARGS): Support giving values to --with + options. Go back to using sed for invalid test, but without + using '*' in the regex. + +Thu Aug 19 14:53:29 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_LONG_FILE_NAMES): eval the args. + + * acgeneral.m4 (AC_PARSEARGS): Use case instead of sed and + test to detect invalid package names. Remove =value from + --with options until we support it. + +Wed Aug 11 18:52:41 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_FIND_X): Don't set x_includes if it's + /usr/include or x_libraries if it's /lib or /usr/lib. + +Wed Aug 11 13:00:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_LONG_FILE_NAMES): If we cannot write $dir, echo + a warning msg and continue the loop to skip that directory. + + * acgeneral.m4 (AC_REVISION): Also eat double quotes. + +Thu Aug 5 14:55:59 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acconfig.h: Add TIME_WITH_SYS_TIME. + +Mon Aug 2 14:55:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_DECLARE_YYTEXT): \-escape "s in rhs of + AC_DEFINE_UNQUOTED. + Remove gratuitous second arg to AC_SUBST. + +Sun Aug 1 19:13:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): Define HAVE_GETLOADAVG if we find + one and don't use our own getloadavg.c. + * acconfig.h: Add HAVE_GETLOADAVG. + +Sat Jul 31 17:28:48 1993 Karl Berry (karl@cs.umb.edu) + + * acspecific.m4 (AC_PROG_INSTALL): Report results under -v. + +Fri Jul 30 18:08:30 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoheader.sh (syms, headers, funcs, libs): Run values through + sort|uniq to remove duplicates. + +Wed Jul 28 00:02:34 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * Makefile.in (config.status): Run config.status --recheck, + not configure. + (install): Remove refs to install-info until it's released, + because people are getting confused. + + * acgeneral.m4 (AC_OUTPUT): For config.status --recheck, echo + the configure command line that we run. + + * acspecific.m4 (AC_PROG_FLEX): Use AC_HAVE_LIBRARY. + +Mon Jul 26 19:11:01 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): Check that both -lutil and -lkvm + exist before choosing them in hopes they will define getloadavg. + + * autoheader.sh (frob): Put $2 and $3 in the expansion of + AC_HAVE_LIBRARY, so AC_DEFINE there is noticed. + +Mon Jul 26 14:21:33 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acspecific.m4 (INT_16_BITS): Check the obvious way, so it + doesn't pick up machines with 64 bit longs. + +Mon Jul 26 14:01:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): Check for -lelf with + AC_HAVE_LIBRARY instead of checking for with AC_HEADER_CHECK. + +Mon Jul 26 13:58:39 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acspecific.m4 (AC_SCO_INTL, AC_IRIX_SUN, AC_DYNIX_SEQ): Use + AC_HAVE_LIBRARY. + +Mon Jul 26 13:55:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoheader.sh (eval frob): Restore hairy sed use; we need it to + handle multi-line macro invocations. + +Mon Jul 26 00:50:43 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acspecific.m4 (AC_FIND_X): Quote the Imakefile. + +Sun Jul 25 08:17:11 1993 Jim Meyering (meyering@comco.com) + + * acconfig.h (CRAY_STACKSEG_END): New #undef. + +Thu Jul 22 20:26:12 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * Version 1.5. + + * acspecific.m4 (AC_FIND_X): Let make substitute any variables + in INCROOT and USRLIBDIR, instead of using sed. + From wojo@veritas.com (Jack Woychowski). + + * acgeneral.m4 (AC_DEFINE): When printing value verbosely, use + double quotes and AC_DEFINE_QUOTE, like we do when assigning + the value, so shell variables get expanded the same way. + + * acgeneral.m4 (AC_REVISION): New macro. + From wollman@uvm-gen.EMBA.UVM.EDU (Garrett Wollman). + + * acgeneral.m4 (AC_DEFINE): Add newline before open brace. + +Thu Jul 22 17:07:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_STAT_MACROS_BROKEN): New macro. + * acconfig.h (STAT_MACROS_BROKEN): New #undef. + +Wed Jul 21 15:44:32 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_DECLARE_YYTEXT): Use AC_DEFINE_UNQUOTED so + shell var is replaced in rhs. + +Wed Jul 21 13:31:38 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acconfig.h (size_t, mode_t, off_t): Added. + * acspecific.m4 (AC_OFF_T): New macro. + +Tue Jul 20 15:39:44 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * autoheader.sh: Put header-file.in in comment at top. + + * acconfig.h (NDIR): Added. + +Mon Jul 19 22:10:49 1993 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * Makefile.in (info, dvi): New targets. + +Sun Jul 18 22:36:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoheader.sh (frob): Use `#' as the first line of each definition. + (eval frob): Totally simplify sed use to just handle "^@@@.*@@@$". + +Wed Jul 14 22:44:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acconfig.h: Restore blank lines between paragraphs. + + * autoheader.sh (libs): New variable and frob to set it from + AC_HAVE_LIBRARY uses. Produce #undef HAVE_* for each $libs. + +Tue Jul 13 19:03:46 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acconfig.h: Sort the entries, like the comment says. + + * acspecific.m4 (AC_GETLOADAVG): Only check for the AIX library + once, looking in both local and system dirs. + Consolidate SVR4 and Solaris cases. + +Mon Jul 12 20:33:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): If we find sys/dg_sys_info.h, do + AC_HAVE_LIBRARY on -ldgc. + +Sun Jul 11 00:43:51 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): BSD library is -lutil, not + -lutils, and requires -lkvm too. + Check for local AIX library using AC_HAVE_LIBRARY, not + AC_COMPILE_CHECK. + Un-nest some conditionals. Stop checking once we've + found a way to get getloadavg. + +Thu Jul 8 20:21:28 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * Makefile.in: Remove rules for making *.conf; make + Autoconf's configure script semi-normally. + +Wed Jul 7 14:37:35 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * autoheader.sh (--help): Print help message to stdout and exit 0. + (--version): Exit after printing version number. + * autoconf.sh (--version): Exit after printing version number. + + * acspecific.m4 (AC_LONG_DOUBLE): Make sure that long double + isn't smaller than double, as in Ultrix 4.[23] cc. + + * acgeneral.m4 (AC_REPLACE_FUNCS): Include ctype.h in the test + program to get stubs. + + * acspecific.m4 (AC_FIND_X): New macro. + +Tue Jul 6 19:15:17 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): Try ls -L first, in case + /dev/kmem is a symlink (as on Solaris). + +Wed Jun 30 22:08:22 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_MINUS_C_MINUS_O): Remove spurious `then'. + +Fri Jun 25 23:16:42 1993 Paul Eggert (eggert@twinsun.com) + + * acspecific.m4 (AC_CONST): Replace `p = ' + with `ccp = '; the former wasn't ANSI C, and + was causing working compilers to be rejected. + +Fri Jun 25 13:26:34 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_LONG_FILE_NAMES): Redirect rm's stderr to + /dev/null. + +Thu Jun 24 15:58:04 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * autoconf.sh, autoheader.sh, acgeneral.m4 (AC_PREPARE): Undo + change of Jun 16 1993. Only set `LANG' and `LC_ALL' to "C" if + already set. + +Sat Jun 19 00:01:51 1993 Jim Meyering (meyering@comco.com) + + * acgeneral.m4: Undefine m4's `format' builtin. + * acspecific.m4 (AC_HAVE_POUNDBANG): Make conftest executable, + but not necessarily writable by group or other. + +Thu Jun 17 21:10:33 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_CPP): Put double quotes around ${CC-cc}, + not single quotes. + If --verbose option given, say what CPP is being set to. + +Wed Jun 16 17:50:00 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_CPP): Make sure that `cc -E` doesn't + run the program through the C compiler too. Bob Olson + says it does on the NeXT. + +Wed Jun 16 16:17:05 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * autoconf.sh, autoheader.sh, acgeneral.m4 (AC_PREPARE): Always set + `LANG' and `LC_ALL' environment variables to `C'. + +Fri Jun 11 14:29:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_MINUS_C_MINUS_O): Test that cc works at all, + and only test it for -c -o if it does. + +Tue Jun 8 01:47:22 1993 Paul Eggert (eggert@twinsun.com) + + * acgeneral.m4 (AC_OUTPUT): The line + DEFS="`echo \"$DEFS\" | sed 's%[&\\\]%\\\&%g'`" + doesn't work in some shells, which don't allow nesting + \"\" inside `` inside "", and which don't unescape \\\& in the + expected (?) way. Also, some versions of echo interpret + backslashes inside $DEFS. Put $DEFS into a temporary file + to avoid these portability minefields. + +Mon Jun 7 20:11:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): In setting KMEM_GROUP, use new sed + magic from friedman which should win with both meanings of ls -lg. + +Mon Jun 7 06:48:49 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * Makefile.in (dist): Change gzipped tar file extension to `.gz'. + Use explicit --gzip option to tar to make sure tar uses the right + compression program (or else exits from failure to understand the + option). + + * acgeneral.m4 (AC_OUTPUT): Don't split sed expr for exec_prefix + across two lines, since not all versions of sed understand that. + + * acspecific.m4 (AC_HAVE_POUNDBANG): Complete rewrite which doesn't + depend on csh. + +Tue Jun 1 03:06:28 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * Version 1.4.1 (not announced to the general public, but + a snapshot was put on the June '93 GNU CDROM). + + * Makefile.in (dist): If ln fails (e.g. because of cross-device + links), mention on stdout that file is being copied. + + * acgeneral.m4 (AC_PREPARE): Use `[$]*' in assignment to + configure_args to get shell positional args, rather than m4 args to + AC_PREPARE. + (AC_OUTPUT): Use `configure_args' in config.status + when invoked with --recheck, rather than $*. + +Mon May 31 13:12:56 1993 Paul Eggert (eggert@twinsun.com) + + * acspecific.m4 (AC_LONG_FILE_NAMES): rm $dir/conftest*, + not conftest*. + +Mon May 31 04:18:18 1993 Roland McGrath (friedman@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_HAVE_LIBRARY): Quote libname in define. + +Sun May 30 19:52:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_SETVBUF_REVERSED): Pass (char *) main to + setvbuf instead of zero. + +Thu May 27 20:30:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PREPARE): Save $* in shell var `configure_args'. + (AC_OUTPUT): Use $configure_args in place of $*. + +Wed May 26 16:19:51 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * autoconf.texi (AC_PROG_INSTALL): Doc fix. + (Automatic Remaking): Put code fragment in @example ... @end example. + +Mon May 24 15:46:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoheader.sh (frob): Redefine AC_CONFIG_HEADER to set shell + variable `config_h'. + (config_h): New variable, initialize to "config.h" before frobbing. + (final output): Write ${config_h}.in. + +Sat May 22 17:45:19 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * Version 1.4 released. + +Thu May 20 20:25:45 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_IDENTITY): New function. + (AC_DEFINE_UNQUOTED): Use it to fix this; due to a + misunderstanding of m4, this was using its first argument as + the definition. + +Thu May 20 09:21:55 1993 Jim Meyering (meyering@comco.com) + + * acspecific.m4 (AC_ALLOCA) [find_stack_direction]: Return the + value from the recursive call. If it worked before, it was by luck. + From Bruno Haible . + +Tue May 18 23:40:21 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_STDC_HEADERS): Require AC_PROG_CPP. + +Mon May 17 18:01:09 1993 Karl Berry (karl@hal.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Use variables gen_files and + gen_config in the loop that generates the output (Make)files, + instead of hardwiring the filenames. + +Sat May 15 17:23:19 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * autoconf.sh: Accept `-' to mean read stdin as input. + * autoheader.sh: Likewise. + +Fri May 14 12:41:02 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * autoheader.sh, acspecific.m4 (AC_PREPARE): If `LANG' environment + variable is set, reset its value to `C'. This is so `tr [...]' + works more portably. + +Thu May 13 22:56:20 1993 Paul Eggert (eggert@twinsun.com) + + * acspecific.m4 (VOID_CLOSEDIR): Test closedir instead of assuming + that it works. E.g. dynix closedir yields garbage, but has no + prototype. Presumably Xenix closedir had the same problem, so + stop special-casing it. + +Wed May 12 20:25:36 1993 Jim Meyering (meyering@comco.com) + + * acconfig.h: Add HAVE_LONG_DOUBLE. + +Wed May 12 15:07:36 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_DEFINE_UNQUOTED): New macro. + + * acgeneral.m4 (AC_FUNC_CHECK): Include ctype.h instead of stdio.h. + We want it only to define __stub_* in glibc. Using stdio.h lost + when it contained a conflicting prototype for $1; ctype.h has fewer + prototypes. + + * acconfig.h: Add GETGROUPS_T. + + * acspecific.m4 (AC_PROG_RANLIB): Use : instead of @: for no-op. + Some braindead make does bizarre magical things with @ in variables. + +Mon May 10 14:24:27 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_HAVE_POUNDBANG): New feature. + + * acgeneral.m4 (AC_OUTPUT): Add more backslashes to character class + in DEFS filter (sigh). + +Sun May 9 14:04:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_DEFINE_QUOTE): No AC_QUOTE_SED (was innermost). + (AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_TEST_CPP): Put a \ before + $DEFS in string to be evalled. + (AC_OUTPUT): Run DEFS through a sed filter that quotes things in it + from sed (woo woo!) before writing it into config.status. + + * acspecific.m4 (AC_ALLOCA): Use AC_PROGRAM_EGREP to test for [CRAY + && !CRAY2], instead of AC_TEST_PROGRAM. No need to run a program + for this. + + * acgeneral.m4 (AC_PROGRAM_CHECK): Extract the first word of $2 + when looking for it in PATH, so it can be a program name with args. + Omit default assignment if $4 is empty. + Only write verbose msg if $1 was set nonempty. + * acspecific.m4 (AC_PROG_YACC): Pass 'bison -y' (quoted like that) + in list to AC_PROGRAMS_CHECK. Don't test for bison later to add -y + flag. + +Sat May 8 00:23:58 1993 Jim Meyering (meyering@comco.com) + + * acgeneral.m4 (AC_REPLACE_FUNCS): Add a trailing newline in + code for AC_COMPILE_CHECK. Otherwise it got spurious failures. + + * acspecific.m4 (TIME_WITH_SYS_TIME): New macro. + + * Makefile.in (dist): Depend on Makefile. Use gzip instead + of compress. Link files individually instead of en masse; + if a link fails, use `cp -f' on the losing file. + + * acspecific.m4 (AC_ALLOCA): Define CRAY_STACKSEG_END (the + name of a function used in alloca.c) for CRAY-1, CRAY X-MP, + and CRAY Y-MP. + +Fri May 7 15:56:26 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): Check for mach/mach.h, but don't + disable nlist checks if found. + +Fri May 7 04:59:25 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_INSTALL): Don't look for `install' in + /usr/ucb. + +Thu May 6 20:41:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_FUNC_CHECK): The test program should choke on + #ifdef __stub___$1 as well. + (AC_REPLACE_FUNCS): Make the test program choke on stubs. + +Wed May 5 20:43:13 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoconf.sh ($infile existence check): Fixed test for + nonemptiness of $print_version to not always be true. + +Wed May 5 17:22:42 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PREFIX, AC_PROGRAM_CHECK), acspecific.m4 + (AC_PROG_INSTALL): If IFS wasn't set initially, give it a + normal default value. Happens on LynxOS (x86), says + Pete Klammer . + +Wed May 5 13:22:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4: Undefine the `shift' builtin. + + * acspecific.m4 (AC_PROG_YACC): Use AC_PROGRAMS_CHECK to check for + both bison and yacc, instead of two AC_PROGRAM_CHECK uses. + + * autoheader.sh ($# -eq 0): Set var $tmpout to name of temp file, + send stdout there instead of config.h.in. + (just before exit): If $# -eq 0, then move $tmpout to config.h.in + if $status -eq 0, or remove $tmpout otherwise. + + * acspecific.m4 (AC_STRCOLL): Rewritten to use a test program that + verifies that `strcoll' does vaguely reasonable ordering. + +Tue May 4 19:59:00 1993 Jim Meyering (meyering@comco.com) + + * acspecific.m4 (AC_LONG_DOUBLE): Don't explicitely echo + `checking for long double'. + +Mon May 3 22:04:35 1993 Jim Meyering (meyering@comco.com) + + * acspecific.m4 (AC_GETGROUPS_T): New macro. + +Sat May 1 22:37:55 1993 Jim Meyering (meyering@comco.com) + + * acspecific.m4 (AC_LONG_DOUBLE): New macro. + +Wed Apr 28 15:52:42 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PROGRAM_CHECK): Write msg under --verbose. + +Thu Apr 22 18:24:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_FUNC_CHECK): Remove spurious `#endif' line at end. + + * acgeneral.m4 (AC_WITH): Fix reversed args to patsubst. + Test $with_FOO, not $FOO. + +Wed Apr 21 18:14:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_QUOTE_TOKEN): New macro. + (AC_DEFINE_QUOTE): Use it. + +Tue Apr 20 18:02:46 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_DECLARE_YYTEXT): Guess name of lex output file + and do AC_SUBST of `LEX_OUTPUT_ROOT'. + Add `dnl' after calling some autoconf macros. + +Mon Apr 19 15:46:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_MINUS_C_MINUS_O): Do each compile a second time + after testing for the existence of the output. Some compilers + refuse to overwrite an existing .o file with -o, though they will + create one. + + * acspecific.m4 (AC_DECLARE_YYTEXT): Changed lex input to two lines + of "%%", not just one. + +Sat Apr 17 17:26:12 1993 Jim Meyering (meyering@comco.com) + + * acgeneral.m4 (AC_COMPILE_CHECK): Don't print `checking for ...' + message if first argument is empty. + +Sat Apr 17 01:18:41 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PID_T): provide self. + (AC_VFORK): Require AC_PID_T. + +Fri Apr 16 11:57:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PROGRAMS_CHECK): Take optional third arg; if + given, use it as the default value. + +Thu Apr 15 16:43:45 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_REPLACE_FUNCS): Print a message under --verbose. + + * acgeneral.m4 (AC_HAVE_LIBRARY): Use m4's patsubst and translit + instead of running sed and tr at runtime. + + * acconfig.h: Add STACK_DIRECTION. + +Wed Apr 14 17:08:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_ALLOCA): If we chose alloca.c, run a test + program to define STACK_DIRECTION. + +Mon Apr 5 19:02:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_LONG_FILE_NAMES): Put test inside a for loop on + several directories: . /tmp $prefix $exec_prefix. Define + HAVE_LONG_FILE_NAMES iff long names win in all those directories. + +Sun Apr 4 18:38:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * Makefile.in (%.info): Removed pattern rule. + (autoconf.info, standards.info): New rules. + + * autoconf.sh (version_only): New variable, set nonempty for + `autoconf --version' with no input file. + (output writing): No output if $version_only is set. + +Wed Mar 31 17:33:57 1993 Jim Meyering (meyering@comco.com) + + * acspecific.m4 (AC_CONST): Uncomment and fix second AIX test. + +Wed Mar 31 16:58:12 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_CONST): Rewrite first AIX XL C 1.02.0.0 test. + Comment out bogosity in second AIX test. + +Wed Mar 31 12:45:59 1993 Jim Meyering (meyering@comco.com) + + * acgeneral.m4 (AC_DEFINE): Put single quotes around definition + that is echoed with --verbose. AC_DEFINE(MVDIR, "$(libdir)/mvdir") + was generating losing code. + +Mon Mar 29 15:44:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acspecific.m4 (AC_STDC_HEADERS): Add a missing pair of [quotes]. + +Mon Mar 29 14:54:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_DECLARE_YYTEXT): Change sed regexp so it won't + match other identifiers beginning with `yytext'. + +Sat Mar 27 00:11:16 1993 Paul Eggert (eggert@twinsun.com) + + * acspecific.m4 (AC_CONST): Detect broken AIX XL C 1.2.0.0 compiler. + +Thu Mar 25 19:54:50 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_CONST): Remove single quotes from the C + program; they produce shell syntax errors. + + * acgeneral.m4 (AC_DEFINE): Add a newline after "}" to prevent + commands following on the same line of configure.in from + generating shell syntax errors. + + * acgeneral.m4 (AC_COMPILE_CHECK): Use explicit return types + to avoid warnings. + (AC_TEST_CPP): Add parens to force redirection order. + (AC_OUTPUT): Allow hostname to return bogus exit status. + From Jean-loup Gailly . + +Mon Mar 22 16:53:01 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoconf.sh: Use $M4, not m4 explicitly. + (M4): If unset in env, initialize to @m4@. + * autoheader.sh: Likewise. + * Makefile.in (M4): Define new variable. + (autoconf.conf, %.conf): Use it. + (editsh): New variable: sed command to replace @datadir@; also + replace @M4@ with $(M4). + (autoconf, autoheader): Use $(editsh) instead of explicit sed command. + +Mon Mar 22 13:08:10 1993 Jim Meyering (meyering@comco.com) + + * acspecific.m4 (AC_CONST): IBM's /bin/cc under AIX-3.2 on an rs6000 + rejects attempts to modify *any* member of a struct that has a + member declared like `const int *ap[2]'. + +Wed Mar 17 18:08:30 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * autoconf.sh, autoheader.sh (MACRODIR): Variable renamed to + AC_MACRODIR. Don't initialize it at runtime if it is already set + in the environment. + (MACROFILES): Don't set until after options are processed. + (print_version): New temp variable. + + * autoconf.sh, autoheader.sh: Rewrote argument parsing. + Added `-m', `--macrodir', `-h', `--help', and `--' options. + Updated usage string. + + * autoconf.texi: Documented --macrodir option and its effects for + both scripts. + +Tue Mar 16 09:10:48 1993 Jim Meyering (meyering@comco.com) + + * acspecific.m4 (AC_CONST): Sun's SC1.0 ANSI compiler (acc) won't + increment a `const int *' pointer declared through a typedef. + +Mon Mar 15 16:08:42 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PARSEARGS): Grok `--verbose' flag; set verbose=yes. + (AC_DEFINE): Only echo "defining $1" if $verbose is set. + +Sun Mar 14 18:19:21 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_INSTALL): Choose `installbsd' if we find + it, in preference to `install'. + + * acspecific.m4 (AC_CONST): Add a check for `const int *foo' not + allowing modification of FOO (not *FOO). + +Fri Mar 12 15:27:53 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT_HEADER): Remove conftest.sh before + creating it. + +Thu Mar 11 12:57:53 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_DEFINE): Surround defn with { and }. + + * acgeneral.m4 (AC_OUTPUT_HEADER): Split up $SEDDEFS into smaller + chunks, since some shells can't handle large here documents. + We write several commands in config.status to create conftest.sed + in pieces. + +Mon Mar 8 14:40:53 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_WITH): Don't echo anything. + Use the m4 patsubst fn instead of a run-time sed invocation to + massage $1. + + * acspecific.m4 (AC_DIR_HEADER_CHECK): #include + before the header we are testing. + + * acgeneral.m4 (AC_DEFINE): If $2 is empty, echo "defining $1 to be + empty", rather than "defining $1 to be ". + + * acspecific.m4 (AC_DIR_HEADER_CHECK): New; subr of AC_DIR_HEADER. + (AC_DIR_HEADER): Use it to test for each possible header file. + +Tue Mar 2 01:06:25 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) + + * autoheader.sh: Don't use /p1/,/p2/ construct with sed---it's not + portable. Handle broken AIX sed that strips \n from hold space + when it shouldn't. From Jun Hamano . + +Tue Mar 02 00:08:39 1993 Jim Meyering (meyering@comco.com) + + * acspecific.m4 (AC_CONST): Fix typo that caused spurious lossage + with /bin/cc from Irix-4. From Karl Berry. + +Fri Feb 26 17:14:58 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_CONST): Add bizarre case that loses on SCO 3.2v4. + +Mon Feb 22 13:02:27 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_QUOTE_HERE, AC_QUOTE_SED): Change the quote + chars to { and } instead of nothing. Then use {} (empty quotes) to + separate the patsubst forms from the following dnl. Otherwise the + result of patsubst is pasted together with dnl and the result is + seen as a single token. + + * acspecific.m4 (AC_MINUS_C_MINUS_O): Print msg saying what we are + doing before we do it. + + * acgeneral.m4 (AC_PREFIX): Print out the choice made. + (AC_DEFINE): Print out the definition being done. + + * acgeneral.m4 (AC_DEFINE_QUOTE): Add dnl at end of line. + + * acspecific.m4 (AC_GETLOADAVG): Do changequote around listing of + /dev/kmem and sed frobbing which needs to use [ and ]. + +Sun Feb 21 13:57:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoheader.sh: Use brackets in tr range args. + + * acspecific.m4 (AC_SETVBUF_REVERSED): Make the test fail if + setvbuf returns nonzero. + + * acspecific.m4 (AC_GETLOADAVG): If we need to install setgid, + figure out what group owns /dev/kmem, and set KMEM_GROUP to that. + + * acspecific.m4 (AC_MINUS_C_MINUS_O): Test plain `cc' after testing + $CC. We want to make sure both compilers grok -c -o. + +Thu Feb 18 18:05:14 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_QUOTE_{DQUOTE,SQUOTE,HERE,SED}): New macros. + (AC_DEFINE_{QUOTE,SEDQUOTE}): New macros; subrs of AC_DEFINE. + (AC_DEFINE): Use them to quote $2. + +Wed Feb 17 14:49:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_TIMEZONE): Fixed quoting in tzname check. + changequote inside quotes lost. + +Mon Feb 8 14:22:11 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acconfig.h (_ALL_SOURCE): Use #ifndef; AIX compiler way too dumb. + +Sun Jan 31 16:39:46 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_TIMEZONE): Put newlines before `#include ...' + in $defs value. + +Thu Jan 28 18:06:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acconfig.h (_ALL_SOURCE): Use "!defined (_ALL_SOURCE) || + _ALL_SOURCE == 0" rather than "!_ALL_SOURCE", which bombs on the + AIX compiler. + +Mon Jan 25 12:09:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acconfig.h (HAVE_UNION_WAIT, SYS_SIGLIST_DECLARED): New #undef's. + + * acconfig.h (_ALL_SOURCE): Surround with #if !_ALL_SOURCE. + +Fri Jan 22 15:08:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): If /usr/local/lib/libgetloadavg.a + exists, add -L/usr/local/lib to LDFLAGS. + +Fri Jan 22 12:49:11 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT_HEADER): Only comment out the #undef NAME + part of the line, to avoid causing errors from existing comments. + +Thu Jan 21 14:50:20 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_HAVE_LIBRARY): Use $libname in "checking for" + message, not $1, to avoid "checking for -l-lfoo". + + * acgeneral.m4 (AC_PREPARE): In compile defn, include $CFLAGS. + + * acgeneral.m4 (AC_OUTPUT): Broke AC_CONFIG_NAME writing out into: + (AC_OUTPUT_HEADER): New macro broken out of AC_OUTPUT. + Add to conftest.sed a new sed command to turn #undef's into comments. + + * acgeneral.m4 (AC_OUTPUT): Use new shell variable, $maxsedlines, + for max number of lines to feed to one sed invocation. + Lower this limit to 20; UTekV 3.2e can't cope with 40. + +Tue Jan 19 13:21:02 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * Version 1.3. + +Fri Jan 15 16:28:18 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_CONFIG_HEADER, AC_HEADER_EGREP, + AC_TEST_PROGRAM): Make DEFS always contain -D commands, + not C code. + +Thu Jan 14 17:05:17 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): Check for -lkvm; don't assume it. + +Thu Jan 14 16:46:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoheader.sh (selecting $syms from $TEMPLATES): Use sed to + replace lines containing only blanks with empty lines. + +Thu Jan 14 15:15:31 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acspecific.m4 (AC_MODE_T): New macro. + + * acgeneral.m4 (AC_OUTPUT): Check for grep -c returning + nothing (AIX 3.1) as well as returning 0. + +Wed Jan 13 16:05:59 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_FUNC_CHECK): Add missing #endif. + + * acgeneral.m4 (AC_OUTPUT): Use sed, not basename. + From Francois Pinard. + +Wed Jan 13 15:49:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Set exec_prefix to ${prefix}, not + $(prefix); it now works in both makefiles and shell scripts. + +Wed Jan 13 15:29:04 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * autoheader.sh: If input is empty, don't print all of + acconfig.h. From Francois Pinard. + + * acgeneral.m4 (AC_OUTPUT): Have config.status check all of its + args for validity. + +Tue Jan 12 11:11:45 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Preserve whitespace around = in prefix + and exec_prefix assignments. + + * acspecific.m4 (AC_GETLOADAVG): Values for getloadavg_missing were + reversed. + +Fri Jan 8 18:45:59 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Make config.status not complain with + usage msg when given no args. + + * acgeneral.m4 (AC_HAVE_LIBRARY): Say "checking for -lfoo", not + just "checking for foo". + + * acgeneral.m4 (AC_HAVE_LIBRARY): Remove excess quoting around $2 + and $3. + + * acspecific.m4 (AC_GETLOADAVG): Check for getloadavg library, both + a normally installed one, and one in /usr/local/lib. + After figuring out params for getloadavg.c, figure out whether it + defined LDAV_PRIVILEGED, and if so, set NEED_SETGID to true, and + define GETLOADAVG_PRIVILEGED. + * acconfig.h: Added GETLOADAVG_PRIVILEGED. + +Fri Jan 8 16:16:35 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_DEFINE, AC_OUTPUT): Restore the third sed string. + + * acgeneral.m4 (AC_FUNC_CHECK): Use __stub_funcname. + + * autoheader.sh: Use Autoconf version number. + + * acgeneral.m4 (AC_OUTPUT): Diagnose usage errors for + config.status. Use grep -c to count nonempty lines instead of + test -s. + + * acspecific.m4 (AC_GETLOADAVG): Use AC_HAVE_LIBRARY. + +Wed Jan 6 19:54:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * autoheader.sh (coverage check): Use $TEMPLATES in error msg, not + hard-wired "config.h". + +Wed Jan 6 18:24:41 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): If AC_CONFIG_NAME, change + @DEFS@ to -DHAVE_CONFIG_H in Makefiles etc. Idea from Roland McGrath. + + * acgeneral.m4 (AC_FUNC_CHECK): If __STUB_funcname is defined, + assume the function isn't present. + + * acgeneral.m4 (AC_OUTPUT): Make no args to AC_OUTPUT work + again. From Ian Lance Taylor. + + * acspecific.m4 (AC_CONST): Fix quoting problem. + + * acconfig.h [const]: New addition. + +Thu Dec 31 17:56:18 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_HAVE_LIBRARY): New macro from Noah Friedman. + + * acconfig.h: Renamed from config.h. + + * autoheader.sh: Renamed from autohead.sh. + Support a local acconfig.h. + Use \\012 instead of \\n for tr for portability. + +Thu Dec 31 12:30:34 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * config.h: Added #undef vfork. + +Tue Dec 29 14:26:43 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_COMPILE_CHECK): Use cat rather than echo to + create conftest.c, to avoid " problems. + +Fri Dec 25 15:07:06 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acspecific.m4 (AC_CONST): Don't define HAVE_CONST. + + * acgeneral.m4 (AC_OUTPUT, AC_DEFINE): Combine the two sed + commands for #undef lines. + * acgeneral.m4 (AC_PROGRAM_EGREP, AC_TEST_PROGRAM, + AC_TEST_CPP, AC_OUTPUT), acspecific.m4 (AC_PROG_CC): Put > + before << when using both, to avoid HP-UX sh bug. + +Wed Dec 23 20:47:53 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PARSEARGS): Use if, not &&, for --with. + From Jan Brittenson. + +Mon Dec 21 17:13:57 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Use sed instead of head and tail. + Trap to remove the temp files. + + * acgeneral.m4 (AC_OUTPUT): Quote DEFS assignment. + From Ian Lance Taylor. + +Mon Dec 21 14:27:44 1992 Jim Meyering (meyering@comco.com) + + * acspecific.m4 (AC_STDC_HEADERS): Make sure ctype.h macros + are ANSI. Nest tests so we don't need shell temporary variable. + +Sun Dec 20 18:12:33 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) + + * Makefile.in (%.h: %.in): New rule using autohead. + (all): Do autohead. + (install): Install autohead and config.h. + (autohead): New rule. + (DISTFILES): Added autohead.sh. + * autohead: New script. + +Fri Dec 18 00:21:23 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_HAVE_FUNCS, AC_HAVE_HEADERS): Change method + of tr quoting to keep old shells happy. From Ian Lance Taylor. + + * acgeneral.m4 (AC_DEFINE): Add to SEDDEFS. + (AC_OUTPUT): Use sed instead of awk. + From Ian Lance Taylor. + +Mon Dec 14 14:33:29 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acspecific.m4 (AC_STDC_HEADERS): Check for string.h + declaring memchr. + + * acgeneral.m4 (AC_NOTICE): Fix comment. + +Fri Dec 11 17:59:23 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) + + * acspecific.m4 (AC_ALLOCA): Don't use libPW; it causes too + much trouble. + +Wed Dec 9 14:04:30 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * config.h: Added HAVE_SYS_WAIT, HAVE_WAITPID, SVR4, UMAX, + [ugp]id_t, UMAX4_3, DGUX. + +Thu Dec 3 13:37:17 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_INSTALL): Ignore AFS install. + From James Clark, jjc@jclark.com. + +Tue Nov 24 07:47:45 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_LEX, AC_DECLARE_YYTEXT, AC_VFORK, AC_WAIT3, + AC_INT_16_BITS, AC_WORDS_BIGENDIAN, AC_ARG_ARRAY): End with a newline. + + * acspecific.m4 (AC_DIR_HEADER): If ndir.h exists and the other + choices don't, define NDIR. + +Sat Nov 21 00:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_RETSIGTYPE): Instead of grepping for the signal + declaration, try redeclaring it and see if we get an error. + Always define RETSIGTYPE, not just if it's int. + From Ian Lance Taylor. + +Fri Nov 20 17:06:09 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_DEFINE): Only put -D option in quotes if it + actually contains blanks. + +Thu Nov 19 17:18:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PARSEARGS): Set a shell var for --with-*. + (AC_WITH): New macro. + + * acspecific.m4 (AC_CONST): If const works, define HAVE_CONST. + + * acspecific.m4 (AC_ALLOCA): Don't use libPW on HP-UX. + +Wed Nov 18 17:36:08 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_DEFINE): When writing a -D with a value, + surround it with 's so the value can contain spaces. + +Thu Nov 12 22:49:35 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_CC): Don't add -O to CC if GNU C. + (-O2, or nothing, might be more appropriate.) + +Sun Nov 8 23:33:23 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * acspecific.m4 (AC_GETLOADAVG): Check for dwarf.h for general + svr4, then elf.h for Solaris 2, which needs additional libraries. + +Thu Nov 12 22:18:54 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PARSEARGS): --exec_prefix -> --exec-prefix. + +Tue Nov 10 16:15:10 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acgeneral.m4: undef m4 `include' builtin. + + * acspecific.m4 (AC_STDC_HEADERS): Don't test for limits.h + due to Ultrix conflict with float.h. + +Thu Oct 29 16:16:11 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PARSEARGS, AC_PREPARE): New macros, broken out + parts of AC_INIT. + (AC_INIT): Use them. + +Thu Oct 22 20:48:12 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_INSTALL): Comment out arg to `:'. + AIX doesn't like it. + +Wed Oct 14 12:41:02 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * Version 1.2. + + * acspecific.m4 (AC_INSTALL): Avoid the AIX install script. + + * acspecific.m4 (AC_RESTARTABLE_SYSCALLS): Wait for child if + sys calls are not restarted, to avoid leaving the child still + running. From Ian Lance Taylor. + +Tue Oct 13 15:43:56 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acspecific.m4 (AC_CONST): Add more tests for brokenness. + From Jim Meyering. + + * acgeneral.m4: Use % instead of ? to avoid shell variable expansion. + +Fri Oct 2 06:55:05 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) + + * acgeneral.m4: Use ? instead of , to separate parts of sed arg. + +Mon Sep 14 12:33:41 1992 David J. MacKenzie (djm@apple-gunkies.gnu.ai.mit.edu) + + * acspecific.m4 (AC_STDC_HEADERS): Also check for float.h. + + * acspecific.m4 (AC_TIMEZONE): Protect [] from being quotes. + +Thu Sep 10 17:12:10 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Include the hostname in config.status. + + * acgeneral.m4 (AC_OUTPUT): Use a separate flag in the awk + script instead of checking for non-empty values, so things + like defining const as empty work. From + Steve Emmerson . + +Fri Aug 28 18:51:13 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_INIT): If there's no path on $0, use '.'. + +Thu Aug 27 16:15:14 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * config.h: New file. + + * acgeneral.m4 (AC_INIT): Look for source files in the + directory containing `configure', if not given explicitly. + + * acspecific.m4 (AC_TIMEZONE): Adjust tzname decl for RS6000. + + * acspecific.m4 (AC_GETLOADAVG): Don't use double quotes in + the test program. + +Thu Aug 27 15:26:49 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): Don't check nlist.h if we found + one of specific things. + +Mon Aug 24 16:22:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * Version 1.1. + + * acspecific.m4 (AC_TIMEZONE): Include time.h. Don't + declare tzname if it's a macro. From Jim Meyering. + +Fri Aug 21 14:12:35 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_ALLOCA): Check whether the alloca defined by + alloca.h works when given a non-constant argument. + + * acspecific.m4 (AC_GETLOADAVG): Define NLIST_STRUCT and + NLIST_NAME_UNION if appropriate. + + * acgeneral.m4 (AC_OUTPUT): If no args are given, omit the loop to + produce output files. + + * acgeneral.m4 (AC_TEST_PROGRAM): Add a call to exit to try to + suppress core dumped message. From Ian Lance Taylor. + + * acgeneral.m4 (AC_PREFIX): Only print the message if prefix + hasn't been set. From James Clark. + + * acspecific.m4 (AC_SIZE_T, AC_UID_T, AC_PID_T, + AC_RETSIGTYPE): Print a message saying what it's checking for. + (AC_SIZE_T): Define size_t to be unsigned, not int, for + ANSI-friendliness. + + * acspecific.m4 (AC_GETLOADAVG): Just check for elf.h, not + dwarf.h too. + + * autoconf.sh: Exit with status 1 if there are unresolved macros. + Isolate the pattern to make adding other prefixes easy. + Look for aclocal.m4 in . as well as MACRODIR. + +Tue Aug 18 16:35:46 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_STRCOLL): New macro. + +Tue Aug 18 15:22:45 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_GETLOADAVG): elf.h implies SVR4. + +Mon Jul 27 14:20:32 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_TEST_PROGRAM): Check for cross-compiling + was missing "test -n". From Ian Lance Taylor. + +Sun Jul 26 16:25:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_SUBST): Support multiple substitutions in a + line. + +Mon Jul 20 01:08:01 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * Version 1.0. + + + ----- + + Copyright (C) 1992, 1993, 1994 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 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 + . diff --git a/ChangeLog.2 b/ChangeLog.2 new file mode 100644 index 0000000..30571bf --- /dev/null +++ b/ChangeLog.2 @@ -0,0 +1,12868 @@ +2001-05-21 Akim Demaille + + Version 2.50. + +2001-05-19 Akim Demaille + + * tests/tools.at: s/undefined macro/possibly undefined macro/. + +2001-05-19 Akim Demaille + + * acgeneral.m4 (AC_SEARCH_LIBS): Unobfuscate. + +2001-05-19 Akim Demaille + + * autoconf.sh: s/undefined macro/possibly undefined macro/. + +2001-05-19 Akim Demaille + + * doc/autoconf.texi (Particular Programs): Explain the + `AC_PROG_LEX invoked multiple times' message. + Reported by Rainer Orth as PR Autoconf/177. + +2001-05-19 Akim Demaille + + * autoheader.sh: Fix file names used in error messages. + Reported by Rainer Orth as PR Autoconf/178. + +2001-05-19 Akim Demaille + + * tests/compile.at (AC_PROG_CPP via CC): Invoke AC_PROG_CC instead + if using `cc'. + +2001-05-19 Akim Demaille + + * tests/compile.at (GNU Fortran 77): Don't AS_EXIT when using + AT_CHECK_MACRO since it skips tests embedded in configure.ac. + Remove files which might have been created when invoking the + compiler. + Reported by Nicolas Joly. + +2001-05-14 Pavel Roskin + + * doc/autoconf.texi (Shellology): Document a quirk in + here-document handling on OpenBSD. + +2001-05-11 Akim Demaille + + * aclang.m4 (_AC_PROG_PREPROC_WORKS_IFELSE): No longer use the + `maybe' strategy: first try cpp's exit status, then its stderr. + (AC_PROG_CPP, AC_PROG_CXXCPP): Adjust. + * tests/compile.at (AC_PROG_CPP via CC): Simplify mycc. + Remove unrelated code. + +2001-05-10 Akim Demaille + + * tests/compile.at (AC_PROG_CPP via CC): New. + From Daniel Carroll. + +2001-04-27 Akim Demaille + + If AC_PROG_CC is invoked but not AC_PROG_CPP, then CPPFLAGS is not + AC_SUBST'ed. + Reported by Ralf Corsepius. + + * aclang.m4 (_AC_ARG_VAR_CPPFLAGS, _AC_ARG_VAR_LDFLAGS): New. + (AC_PROG_CC, AC_PROG_CPP, AC_PROG_CXX, AC_PROG_CXXCPP) + (AC_PROG_F77): Use them. + +2001-04-27 Akim Demaille + + * aclang.m4 (_AC_PROG_PREPROC_WORKS): Rename and extend as... + (_AC_PROG_PREPROC_WORKS_IFELSE): this. + Adjust to admit + (AC_PROG_CPP, AC_PROG_CXXCPP): Use it. + Reported by Daniel Carroll. + +2001-04-26 Pavel Roskin + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use two backslashes + before double quotes in the copyright notice, since the native + OpenBSD shell removes single backslashes in here-documents with + unquoted delimiters. + +2001-04-25 Nicolas Joly + + * acgeneral.m4 (_AC_RUN_IFELSE): Clean `core' files. + +2001-04-24 Steven G. Johnson + + * doc/autoconf.texi (The GNU build system): Add this chapter + introducing Autoconf+Automake+Libtool, and fix references in the + introduction. + +2001-04-24 Akim Demaille + + On HP-UX 10 `ranlib --version' creates `./--version'. + Reported by Bob Proulx and Jim Meyering. + + * acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG): Do not invoke the + program with --version. + +2001-04-22 Jim Meyering + + * acfunctions.m4 (AC_FUNC_MEMCMP): Remove `int main () {' and the + trailing `}', since AC_LANG_PROGRAM provides them. + +2001-04-20 Akim Demaille + + * configure.in: Bump to 2.49f. + +2001-04-20 Akim Demaille + + Version 2.49e. + +2001-04-20 Akim Demaille + + * tests/foreign.at (Libtool): Ignore configure's stderr. + +2001-04-20 Tim Van Holder + + * acgeneral.m4 (AC_OUTPUT): Close the descriptor before running + config.status so config.log is properly created on MS-DOS. + +2001-04-20 Nicolas Joly + + * tests/atspecific.m4 (AT_CHECK_AUTOUPDATE): Be robust to missing + or broken autoupdate. + * tests/tools.at: Likewise. + * tests/Makefile.am (CLEANFILES): Also clean Libtool files. + +2001-04-18 Tim Van Holder + + * acgeneral.m4 (_AC_INIT_SRCDIR): Handle + backslashes (DOS paths) for $ac_confdir and $srcdir. + +2001-04-17 Akim Demaille + + Don't mess with FDs. + + * acgeneral.m4 (_AC_INIT_DEFAULTS_FDS): Remove, replace with + inline setting up of AS_MESSAGE_FD. + (AS_MESSAGE_LOG_FD): Do not define, so that AS_MESSAGE does not + output in it before... + (_AC_INIT_CONFIG_LOG): here, which is run after the handling of + options. + +2001-04-18 Steven G. Johnson + + * doc/autoconf.texi: Replace documentation for obsolete + AC_LIBOBJ_DECL with clearer documentation for AC_LIBSOURCE + and AC_LIBSOURCES, improving the AC_LIBOBJ docs as well. + +2001-04-17 Steven G. Johnson + + * doc/autoconf.texi: Fixes for punctuation and grammar.. Replace + "..." with "@dots{}" except when "..." is in literal code. + +2001-04-17 Nicolas Joly + + * acgeneral.m4 (_AC_LINK_IFELSE): Be sure to remove temporary + `conftest.$ac_objext', as some compilers may forget it. + +2001-04-16 Pavel Roskin + + * acgeneral.m4 (_AC_INIT_VERSION): Use AC_PACKAGE_NAME and + AC_PACKAGE_VERSION only if they are defined. + (_AC_OUTPUT_CONFIG_STATUS): Likewise. + +2001-04-15 Lars J. Aas + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Alter response on + `config.status --version' to be more compliant with the GNU Coding + Standards. + +2001-04-13 Steven G. Johnson + + * doc/autoconf.texi: Still more minor modifications for clarity, + felicity, and grammar. + +2001-04-11 Steven G. Johnson + + * doc/autoconf.texi (AC_F77_WRAPPERS): Mention C++ as well as C. + In the example, don't #ifdef F77_FUNC before using it, as that + would push any errors to link-time rather than compile-time; note + that the user can test this to invoke alternative behavior. + +2001-04-11 Akim Demaille + + * autoconf.sh (Task script): Be sure that `forbidden.rx' and + `allowed.rx' exist when AWK loads then. + Reported by Rainer Orth. + +2001-04-11 Steven G. Johnson + + * doc/autoconf.texi: A few more minor modifications for clarity, + grammar, and formatting. + +2001-04-10 Lars J. Aas + + * Makefile.am: AC_SUBST fixes for PACKAGE_NAME, VERSION, PACKAGE... + * configure.in: Moved here. + Suggested by Akim Demaille and Raja R Harinath. + +2001-04-10 Lars J. Aas + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Re-enable logging to + `config.log' from `config.status', but delay logging till after + command line option processing. + +2001-04-10 Lars J. Aas + + * autoupdate.in (print_usage): print "\ at end of line does not + work as expected, so change block to here-doc instead. + (print_version): Same. + +2001-04-09 Steven G. Johnson + + * doc/autoconf.texi: Replace all tab characters with (8) spaces, + lest the formatting of example code, etcetera, be messed up. + +2001-04-09 Steven G. Johnson + + * doc/autoconf.texi: Rephrase various parts for clarity, felicity, + and/or grammar. + +2001-04-09 Steven G. Johnson + + * doc/autoconf.texi: Clean up cache documentation: Document + --config-cache/-C option, and recommend instead of --cache-file. + Indent example AC_CACHE_VAL macros for clarity. Add new + "Cache Checkpointing" section for AC_CACHE_SAVE (and + AC_CACHE_LOAD), so that the "Cache Files" section focuses solely + on features visible to end-users (e.g. to better fit the cross + references). Various minor rewordings for clarity, felicity, + and/or grammar. + +2001-04-09 Steven G. Johnson + + * doc/autoconf.texi: Revert to "configure.in" in the history, since + "configure.ac" wasn't used in the past, and in any case it is + probably a good idea to preserve this section verbatim. + +2001-04-09 Steven G. Johnson + + * AUTHORS: Fix grammar. + +2001-04-09 Lars J. Aas + + * Makefile.am: Manual addition of @PACKAGE@ substitution variable + needed by dist rules. Added explanatory comment. + Problem reported and comment suggested by Raja R Harinath. + +2001-04-06 Lars J. Aas + + * Makefile.am: Manual addition of @VERSION@ substitution variable + as a temporary Automake fix. Reported by Raja R Harinath. + +2001-04-04 Lars J. Aas + + * acgeneral (_AC_INIT_CONFIG_LOG): New macro for setting up the + config.log file. + (_AC_INIT_DEFAULTS_FDS): Log to /dev/null instead of config.log. + (AC_INIT): Invoke _AC_INIT_CONFIG_LOG after _AC_INIT_VERSION. + +2001-04-04 Lars J. Aas + + * acgeneral.m4 (_AC_INIT_DEFAULTS): Produce better version + information for config.log header. + (_AC_INIT_VERSION): Produce better version information for + `configure --version'. + +2001-03-30 Steven G. Johnson + + * doc/autoconf.texi: Use "invalid" instead of "illegal," as + suggested by the GNU coding standards. + +2001-03-30 Tim Van Holder + + * m4sh.m4 (AS_BASENAME): New. + (AS_SHELL_SANITIZE): Set `$as_me'. + * acgeneral.m4: Don't set as_me; AS_SHELL_SANITIZE now does this. + * tests/atgeneral.m4: Likewise. + (AT_INIT): Use $PATH_SEPARATOR for walking the path. + * autoconf.sh: Be DOS-friendly when setting as_me and M4. + Add quotes to support spaces in $tmp. + Work around problem in DJGPP port of awk by using a temporary file. + * autoheader.sh: Be DOS-friendly when setting as_me. + * autoreconf.sh: Be DOS-friendly when setting as_me, dir and + template_dir. + +2001-03-27 Lars J. Aas + + * acgeneral.m4 (AC_INIT_VERSION): Improved version information string + for `configure --version'. + +2001-03-27 Akim Demaille + + * autoheader.sh (config_h): Be robust to new lines when extracting + the first argument of AC_CONFIG_HEADERS. + Reported by Lars J. Aas. + +2001-03-27 Tim Van Holder + + * doc/autoconf.texi: Minor tweaks. + +2001-03-27 Tim Van Holder + + * Makefile.am, configure.in: autoupdate is a Perl script. + +2001-03-20 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools): Some about + `touch'. + From Jim Meyering, Volker Borchert, and Peter Eisentraut. + +2001-03-20 Akim Demaille + + * tests/foreign.at (Libtool): Don't skip 1.3.5. + Invoke AC_CANONICAL_SYSTEM ---for some reason AC_CANONICAL_HOST is + not enough for 1.3.5. + From Lars J. Aas. + +2001-03-20 Akim Demaille + + * tests/atgeneral.m4: s/Testing suite/Test suite/g. + From Jim. + (AT_INIT): Adjust the error message on invalid options. + * tests/foreign.at (Libtool): Skip Libtool 1.3 too. + +2001-03-20 Kevin Ryde + + * doc/autoconf.texi: A couple of grammatical tweaks. + +2001-03-19 Akim Demaille + + * configure.in: Bump to 2.49e. + +2001-03-19 Akim Demaille + + Version 2.49d. + +2001-03-19 Akim Demaille + + * tests/tools.at (AWK portability): Don't rely on `empty'. + +2001-03-19 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT): Fix the at_diff test. + Reported by Nicolas Joly. + +2001-03-19 Akim Demaille + + * acgeneral.m4 (_AC_PREPROC_IFELSE): Redirect stdout out of the + _AC_EVAL_STDERR invocation to avoid `illegal io' on Ultrix. + Reported by Harlan Stenn, and fixed by Jim Meyering. + +2001-03-19 Akim Demaille + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Don't hard code + `/bin/sh', use $SHELL. + From Paul Eggert. + +2001-03-19 Akim Demaille + + * acfunctions.m4 (AC_FUNC_STRERROR_R): Update to + fileutils-4.0.42's. + +2001-03-19 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT): Don't always create `empty', rather + do it only when diffing `/dev/null' is not supported. + And use `at-devnull' instead of `empty'. + +2001-03-13 Akim Demaille + + * autoscan.pl, autoupdate.in: Use `use' instead of `require' to + require some version of Perl, so that the test is performed at + compile time, not run time. + Suggested by Nicolas Joly. + +2001-03-13 Tim Van Holder + + * tests/aclocal.m4: Fix some typos. Also ignore $PATH_SEPARATOR. + * tests/atconfig.in: Set PATH_SEPARATOR to the proper + path separator. Set SHELL here... + * tests/atgeneral.m4: ... instead of here. Use $PATH_SEPARATOR + when setting AUTOTEST_PATH. Don't default tests to "all" before + deciding whether the help text is needed. + * tests/semantics.at: Use the correct path separator. + +2001-03-13 Tim Van Holder + + * doc/autoconf.texi: Expand section on DOS issues. + Add link to the `doschk' package. Fix minor typo. + Clean up white spaces. + +2001-03-13 Steven G. Johnson + + * aclang.m4 (AC_PROG_F77_C_O): define F77_NO_MINUS_C_MINUS_O + when test fails, not when it succeeds(!). + +2001-03-13 Akim Demaille + + * tests/tools.at (AWK portability): Use AT_CHECK to check for GNU + AWK so that there is always a AT_CHECK between + AT_SETUP/AT_CLEANUP. + Reported by Nicolas Joly. + +2001-03-13 Akim Demaille + + * tests/tools.at: Be sure to remove configure.ac~. + +2001-03-13 Raja R Harinath + + * autoupdate.in (File::Basename): Use package. + (%ac_macros, %au_macros): Save only base filenames. + +2001-03-08 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT): In the AU_DEFUN definition, don't try + to issue an obsolete message, it can't work for macros being + defined both with AC_DEFUN and AU_DEFUN. + Hence do it in the AC_DEFUN definition. + +2001-03-06 Pavel Roskin + + * tests/base.at (AC_TRY_*): Escape `^' - it's a pipe command + separator on Tru64 v5.1. + Reported by Nicolas Joly. + +2001-03-05 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT): Register at-setup-line and + at-check-line for removal. + Check for the presence of at-check-line only when $at_test was + really a test. + Reported by Pavel. + +2001-03-04 Pavel Roskin + + * tests/atgeneral.m4 (AT_INIT): s/am_me/as_me/. Quote AT_CHECK + in the error message. + +2001-03-02 Pavel Roskin + + * acgeneral.m4 (_AC_INIT_PREPARE): Quote `$$*' correctly. + +2001-02-28 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT): Warn when at-check-line is + missing. + * tests/tools.at (Syntax of the scripts): Use AT_CHECK to test + /bin/sh -n. Exit 77 on failure. + Reported by Harlan Stenn. + +2001-02-28 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PREPARE_FS_SEPARATORS): Use `.;.' instead + of `.;`pwd`': if pwd is c:/foo, we might walk through `.:c' + (fails), and then `/foo' which might succeed, resulting in + believing `;' is the right path separator. + +2001-02-26 Akim Demaille + + * acgeneral.m4 (AH_VERBATIM, AH_TEMPLATE): New, use AS_ESCAPE, not + _AS_QUOTE. + (_AH_VERBATIM_OLD, _AH_TEMPLATE_OLD): New, used for bugward + compatibility in... + (AC_DEFINE, AC_DEFINE_UNQUOTED): here. + +2001-02-26 Pavel Roskin + + * autoupdate.in (&mktmpdir): Strip the newline from the output + of mktemp. + +2001-02-26 Pavel Roskin + + * man/Makefile.am: autoupdate.1 now depends on autoupdate.in. + +2001-02-25 Tim Van Holder + + * autoupdate.in: Support DOS paths. Initialize $tmp to + avoid warnings. Default $autoconf to 'autoconf'. + +2001-02-25 Akim Demaille + + * autoupdate.in (&END): Try to preserve the exit status. + Use backquotes where more readable. + Internal details should be dumped when $debug, not when $verbose. + +2001-02-25 Akim Demaille + + * autoupdate.in (&mktmpdir): New. + (&END): Remove $tmp. + (&parse_args): Handle -d and -l. + +2001-02-25 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PREPARE): Remove conf$$* on exit. + * m4sh.m4 (_AS_LN_S_PREPARE, _AS_BROKEN_TEST_PREPARE): + s/conftest/conf$$/ to avoid race conditions. + From Lars J. Aas. + +2001-02-25 Akim Demaille + + * acspecific.m4 (AC_PROG_INSTALL): Use ac_path_separator. + Restore the IFS earlier. + Suggested by Tim Van Holder. + +2001-02-25 Akim Demaille + + * m4sh.m4 (_AS_TEST_PREPARE): Rename as... + (_AS_BROKEN_TEST_PREPARE): this. + (_AS_TEST_PREPARE): New dummy but working version of this macro. + * acspecific.m4 (AC_PROG_INSTALL): Use AS_EXECUTABLE_P. + +2001-02-25 Akim Demaille + + * autoupdate.in (&parse_args): Support `-'. + +2001-02-25 Akim Demaille + + * autoupdate.in: Less Bournisms, more Wallisms. + +2001-02-23 Jim Meyering + + * acgeneral.m4 (_AC_INIT_PREPARE_FS_SEPARATORS): Fix typo: s/;/:/ + * acgeneral.m4 (_AC_INIT_PREPARE_FS_SEPARATORS): Revert that change. + There was no typo. + +2001-02-22 Akim Demaille + + * doc/autoconf.texi: Typos and formatting changes. + +2001-02-21 Lars J. Aas + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use `AS_EXIT(0)' instead + of `exit 0' when exiting config.status. + +2001-02-21 Tim Van Holder + + * doc/autoconf.texi: Add new node discussing issues related to + file systems (DOS, specifically). Document DJGPP's bash's special + handling of $PATH_SEPARATOR. + +2001-02-21 Akim Demaille + + * autoupdate.in: New. Replaces autoupdate.sh. + +2001-02-21 Akim Demaille + + * autoscan.pl (&find_configure_ac): New. + +2001-02-20 Paul Martinolich + + * autoscan.pl (check_configure_ac): Pretty missing macro warnings + output. + +2001-02-19 Paul Eggert + + * aclang.m4 (AC_C_INLINE): Define "inline" to empty if the + compiler doesn't support 'static inline'. This is needed for + Encore Umax-3.0.9.16b. + +2001-02-19 Akim Demaille + + * aclang.m4 (_AC_LANG_COMPILER_WORKS): Rename as... + (_AC_COMPILER_EXEEXT_WORKS): this. Use the `a.out' or `a.exe' + left by _AC_COMPILER_EXEEXT_DEFAULT to check if the compiler works. + (_AC_COMPILER_EXEEXT_CROSS): Extract from the above macro. + (_AC_COMPILER_EXEEXT): Use them. + Adjust all the compiler looking macros to check for EXEEXT + *first*, then OBJEXT. + Set ac_exeext yourself. + (_AC_COMPILER_EXEEXT_O): Don't. + +2001-02-07 Pavel Roskin + + * tests/atspecific.m4 (AT_CONFIGURE_AC): Double quote constant + part of the second argument to AT_DATA. + * tests/compile.at (AC_PROG_CPP with warnings): Fix underquoting + in a call to _AT_CHECK_AC_MACRO. + (AC_PROG_CPP without warnings): Likewise. + +2001-02-11 Jim Meyering + + Ensure that even `autoscan --version' fails when e.g., + writing to a full disk. + * autoscan.pl (END): New function. + + * autoscan.pl: Misc. clean-up: + Move declarations of variables into the scope where they're used. + Use `qw'. Don't use `$_'. + +2001-02-06 Paul Eggert + + * acspecific.m4 (AC_SYS_LARGEFILE_TEST_INCLUDES): Don't reject + C++ compilers that are masquerading as C compilers, and that + incorrectly reject large integers. + +2001-02-07 Pavel Roskin + + * acgeneral.m4 (AC_OUTPUT): Remove $(srcdir), ${srcdir} and + @srcdir@ from VPATH if srcdir is "." and replace blank VPATH + lines with empty lines to preserve line numbers. + Original version by Derek Price. + +2001-02-07 Derek Price + + * acgeneral.m4 (_AC_LIBOBJ): Call AC_LIBSOURCE with '.c' extension + appended to function name. + +2001-02-06 Akim Demaille + + * acgeneral.m4 (_AC_RUN_LOG, _AC_RUN_LOG_STDERR, AC_RUN_LOG): New. + (_AC_EVAL_STDERR, _AC_EVAL): Use them. + (_AC_INIT_PREPARE_FS_SEPARATORS): Use AC_RUN_LOG. + +2001-02-05 Derek Price + + * autoheader.sh: Only set config_h for the first call to + AC_CONFIG_HEADERS. + +2001-02-05 Jim Meyering + + * acspecific.m4 (AC_SYS_LARGEFILE): Add ULL suffix to the + integer constants. + +2001-02-05 Akim Demaille + + acfunctions.m4 was still using the old AC_LIBOBJ_DECL. + Reported by Derek R. Price. + + * tests/semantics.at (AC_REPLACE_FUNCS): New test. + * acfunctions.m4 (AC_REPLACE_FUNCS, _AC_LIBOBJ_ALLOCA): Use + AC_LIBSOURCES. + +2001-02-03 Pavel Roskin + + * tests/base.at (AC_TRY_COMMAND): Add a colon between "then" and + "else". Separate commands inside AC_TRY_COMMAND with semicolons. + From Nicolas Joly. + +2001-02-03 Akim Demaille + + * acgeneral.m4 (_AC_INIT_LOG_COMPLETE): Removed, dead code. + +2001-02-03 Akim Demaille + + * acfunctions.m4 (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK): Use + AC_LIBSOURCES. + +2001-02-03 Akim Demaille + + * acgeneral.m4 (AC_LIBOBJ_DECL): Remove. + (AC_LIBSOURCES, AC_LIBSOURCE): New. + +2001-02-02 Akim Demaille + + * tests/base.at (AC_TRY_COMMAND): Fix the test. + From Nicolas Joly. + + The following patch went into Autoconf between the two previous + entries: + + * acgeneral.m4 (AC_TRY_COMMAND): Use the old code, using a tmp + variable, to recover multiline robustness. + Reported by Tim Van Holder. + * tests/base.at (AC_TRY_COMMAND): New. + +2001-02-02 Pavel Roskin + + * acgeneral.m4 (_AC_COMPUTE_INT_COMPILE): Rename all occurences + of ac_try to ac_mid to avoid a name clash. + +2001-02-02 Pavel Roskin + + * autoscan.pl (scan_c_file): When in verbose mode, don't print + out hashes common for the whole package. Do it in scan_files() + instead. + (scan_makefile): Likewise. + (scan_sh_file): Likewise. + Thanks to Jim Meyering for improved implementation. + +2001-02-01 Pavel Roskin + + * autoreconf.sh: Fix the case when the verbose output was not + redirected to stderr as everywhere else. + +2001-01-30 Ralf Corsepius + + * acgeneral.m4 (_AC_OUTPUT_SUBDIRS): Remove configure.ac + from check for ac_sub_configure. + +2001-01-30 Akim Demaille + + The recent addition of `exit's prototype in confdefs.h causes + AC_OUTPUT_MAKE_DEFS to include junky -D switches. + Reported by Wolfgang Mueller. + + * tests/torture.at (#define header templates): Include trash in + confdefs.h. + * tests/atgeneral.at (AT_INIT): Don't expect `find' to support + -maxdepth, hence don't use -follow either. + Reported by Nicolas Joly. + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS) : In the + `quote' section, `p'rint the result. + If neither `#define' pattern match, just call `d' to start a new + cycle. + Invoke this sed program with -n. + +2001-01-30 Akim Demaille + + * tests/compile.at: New test. + * tests/atspecific.at (AT_CHECK): When given 77 as expected exit + status, don't include the `skip' mechanism. + +2001-01-30 Akim Demaille + + * tests/base.at (AC_CACHE_CHECK): Typo and clean up. + Check only --quiet. + +2001-01-30 Paul Eggert + + * autoheader.sh: Don't pass a string to 'echo' that might + possibly contain backslashes. + +2001-01-29 Pavel Roskin + + Don't use filenames that can be reduced to "conftest" on DOS. + + * acfunctions.m4 (AC_FUNC_MMAP): Use conftest.mmap, not + conftestmmap. + (AC_FUNC_UTIME_NULL): Use conftest.data, not conftestdata. + * acspecific.m4 (AC_PROG_MAKE_SET): Use conftest.make, not + conftestmake. + (_AC_PATH_X_XMKMF): Use conftest.dir, not conftestdir. + * acgeneral.m4 (AC_ARG_PROGRAM): Use conftest.sed, not + conftestsed. + * m4/sanity.m4: Use conftest.file, not conftestfile. + * doc/autoconf.texi (Guidelines for Test Programs): Suggest + using conftest.data, not conftestdata. + +2001-01-29 Akim Demaille + + * tests/atgeneral.m4: Don't redirect builtins' stderr as Ultrix + hates this: use a subshell. + +2001-01-29 Assar Westerlund + + * m4sh.m4 (_AS_TEST_PREPARE): Discard output when testing `test + -x' and `test -f' to avoid confusing users with error messages. + (AS_MKDIR_P): Invert order of separators in IFS to avoid problem + with some shells adding backslash between fields and parsing the + result for escapes. + * doc/autoconf.texi (Special Shell Variables): Document IFS. + +2001-01-29 Steven G. Johnson + + * aclang.m4 (AC_PROG_F77): Improve documentation of the compilers + that are tried, add a few new ones (cft77, af77, epcf90, xlf95, g95), + and put pgf90 in the right place (before the F95 compilers). + +2001-01-29 Jim Meyering + + * autoscan.pl: Do scan `configure.ac' when you claim it. + From Raja R Harinath. + (@kinds): Use `qw', rather than lots of quotes and commas. + (%generic_macro): Use single quotes around literals. + ($configure_scan): Define global, and use it instead of the literal. + Use `warn' in place of `printf STDERR'. + +2001-01-29 Akim Demaille + + * autoscan.pl: `Formatting++' changes: prototypes all the + functions, no longer use `&' to call functions as it disables + prototype checking, topological sort so that functions are defined + before being used, and put an Autoconf like nice comment to + describe the functions. + (output): Accept a CONFIGURE_SCAN parameter, and open CONF. + +2001-01-29 Akim Demaille + + * acgeneral.m4 (AC_SITE_LOAD): Let config.log know what you load. + +2001-01-27 Akim Demaille + + Follow Tim Van Holder's suggestions for a uniform handling of + symlinks. + + * m4sh.m4: Stay in `as_', not `ac_'. + (_AS_LN_S_PREPARE): Eve out from... + * acspecific.m4 (AC_PROG_LN_S): here. Adjust. + * m4sh.m4 (AS_LN_S): New. + (AS_SHELL_PREPARE): Call _AS_LN_S_PREPARE. + +2001-01-26 Assar Westerlund + + * autoreconf.sh (find): Fix precedence. + (aclocal): Same as below for autoheader. + +2001-01-26 Akim Demaille + + * autoreconf.sh (autoheader): Run it when there is no template, as + there is no risk to override a handwritten template. + From Assar Westerlund. + +2001-01-26 Akim Demaille + + * aclang.m4: dnl AC_ARG_VAR's newline. + (AC_PROG_CC, AC_PROG_F77, AC_PROG_CXX): AC_ARG_VAR(LDFLAGS). + * acgeneral.m4 (AC_CHECK_LIB): Don't do it. + +2001-01-26 Akim Demaille + + * tests/mktests.sh: Handle DOS issues: directory separator, single + dot in file names, and one actual bug: when set -e, running + (false; true) will of course fail, use (false || true). + From Tim Van Holder. + +2001-01-26 Tim Van Holder + + * tests/Makefile.am (testsuite): Use testsuite.tmp, not + testsuite-tmp as temporary file. + +2001-01-25 Assar Westerlund + + * autoreconf.sh: Also find configure.in. + +2001-01-24 Akim Demaille + + * configure.in: Bump to 2.49d. + +2001-01-24 Akim Demaille + + Version 2.49c. + +2001-01-24 Jim Meyering + + * autoscan.pl (output): Detect/report a close failure. + +2001-01-24 Akim Demaille + + Preserve INSTALL too. + + * acgeneral.m4 (_AC_OUTPUT_FILES): Use ac_INSTALL for internal + computations, and therefore use INSTALL where ac_given_INSTALL + was used. + (_AC_OUTPUT_SUBDIRS): There is no point in computing INSTALL in + here. It's not even used. + +2001-01-24 Akim Demaille + + While preserved in configure, srcdir is trashed in config.status. + Reported by Ralf Corsepius. + + * tests/aclocal.m4 (AC_STATE_SAVE): It is ok to modify + CONFIG_STATUS, DEFS, prefix and exec_prefix. + It is OK to produce config.* files. + * tests/atspecific.m4 (AT_CONFIGURE_AC): Save the env *after* + AC_OUTPUT to check that it doesn't break anything by itself. + * tests/torture.m4 (srcdir): New test, from Ralf Corsepius. + * acgeneral.m4 (_AC_OUTPUT_FILES): Use ac_top_srcdir and ac_srcdir + to preserve srcdir and top_srcdir. + Remove any use of `ac_given_srcdir' as `$srcdir' being preserved + is usable. + +2001-01-24 Alexandre Duret-Lutz + + configure -q did not work since 2000-11-03. + + * acgeneral.m4 (_AC_INIT_DEFAULTS_FDS): Don't check for $silent, + tie AS_MESSAGE_FD to stdout unconditionally. + (_AC_INIT_PARSE_ARGS): If $silent redirect AS_MESSAGE_FD to + /dev/null. + * tests/base.at (AC_CACHE_CHECK): New test. + +2001-01-24 Tim Van Holder + + * m4sh.m4 (AS_EXECUTABLE_P, _AS_TEST_PREPARE): New macros. + (AS_SANITIZE_SHELL): Call _AS_TEST_PREPARE. + * acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG): Use AS_EXECUTABLE_P + instead of test -f. + +2001-01-24 Akim Demaille + + * autoscan.pl (generic_macro): s/AC_CHECK_FUNCTIONS/AC_CHECK_FUNCS/. + * acfunctions: Just like the previous patch. + +2001-01-24 Akim Demaille + + * autoscan.pl (@kinds, %generic_macro): New. + (&init_tables): Use them. + * acheaders: Run `autoconf -t AC_CHECK_HEADERS:'$1'' on the fileutils, + and include all these headers in here. + Don't specify `AC_CHECK_HEADERS' as it's the default. + +2001-01-24 Akim Demaille + + * autoscan.pl: Just like the previous patch, but for + AC_CHECK_FUNCS, AC_CHECK_TYPES, and AC_CHECK_MEMBERS. + +2001-01-24 Akim Demaille + + * autoscan.pl (print_unique): Push all the macro invocation + locations. + (output_headers): For headers that need to be checked, push either + the specialized macro, or the generic macro call. + (check_configure_ac): Handle AC_CHECK_HEADERS. + +2001-01-24 Raja R Harinath + + Some non-srcdir build fixes. + * configure.in (BUGS): Look for file in $srcdir. + * tests/Makefile.am (MACRO_FILES): Use '..', not '$(top_srcdir)'. + +2001-01-24 Akim Demaille + + Don't AC_SUBST too much, as it makes Automake include those + variables in Makefiles, and drives autoscan to require unneeded + programs. + + * acgeneral.m4 (_AC_INIT_PREPARE): Don't AC_SUBST CFLAGS, + CPPFLAGS, CXXFLAGS and LDFLAGS. + (AC_ARG_VAR): AC_SUBST the var. + Document it only once, even if there are several different docs. + * aclang.m4 (AC_PROG_CPP): Declare CPP and CPPFLAGS to AC_ARG_VAR. + (AC_PROG_CXXCPP): Declare CXXCPP and CPPFLAGS. + +2001-01-24 Akim Demaille + + * m4sugar.m4 (m4_expand_once): Accept a witness. + +2001-01-23 Akim Demaille + + * acgeneral.m4 (AC_EXPAND_ONCE): Remove, use m4_expand_once. + (AC_DIVERT_ONCE): Move to... + * m4sugar.m4 (m4_expand_once): here. + +2001-01-23 Akim Demaille + + * aclang.m4 (_AC_LANG_SET): Turn off optimizations. + +2001-01-23 Akim Demaille + + * configure.in: If this is a beta, dump the core of BUGS. + * tests/base.at (AC_REQUIRE & AC_LANG): New test, currently failing. + +2001-01-23 Akim Demaille + + * autoscan.pl: Don't use `defined' to check whether an array is + defined. + Don't use parens with `defined'. + +2001-01-23 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PREPARE): Be sure to quote hashes to + avoid M4 thinking it's comments. + +2001-01-23 Tim Van Holder + + * aclang.m4 (_AC_COMPILER_EXEEXT_O): Use + AS_IF([AC_TRY_EVAL(ac_link)]) instead of AC_LINK_IFELSE to + avoid depending on ac_exeext before it's found. + (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Check for the + executable extension BEFORE checking whether the compiler + works, as that test depends on a correct ac_exeext. + +2001-01-23 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PREPARE) : Typo. + +2001-01-22 Pavel Roskin + + * autoscan.pl: Use "use strict". Declare all global variables + or make them private. Make all local variables private. + (find_autoconf): New, moved some code from the top level. + Use %ENV outside quotes to eliminate a warning. + +2001-01-22 Tim Van Holder + + * acspecific.m4 (AC_PROG_LN_S): Detect DJGPP < 2.04, which only + supports 'ln -s' for executables. + +2001-01-22 Akim Demaille + + * autoscan.pl ($dir, $autoconf): New. + +2001-01-22 Akim Demaille + + * autoscan.pl ($headers, $functions, $identifiers, $libraries): + Also register locations of their requirement instead of a simple + counter. + (&check_configure_ac): Close TRACES. + +2001-01-22 Akim Demaille + + * autoscan.pl: Formatting changes. + Check `configure.ac' or `configure.in' if present. + +2001-01-22 Akim Demaille + + * autoscan.pl (&wanted): Don't register `Makefile' when + `Makefile.in' is present. + Factor the simplification of $name. + (&scan_makefile, &scan_sh_file): Instead of counting the number of + occurrences where a program/makevar is wanted, register file:line. + Adjust the verbose output. + (&check_configure_ac): Report the location where the macro is required. + +2001-01-22 Akim Demaille + + * autoscan.pl: Instead of undefined globals, set them to empty + values. + (%needed_macros): New. + (&check_configure_ac): New. Call it. + (&output_libraries): Eve out from &output_programs. + (&print_unique): For the time being register in %needed_macros + only argument less macros. + +2001-01-22 Lars J. Aas + + * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): First try no declaration, + then '#include ', before trying the explicit declarations. + +2001-01-22 Akim Demaille + + * acgeneral.m4 (_AC_COMPILE_IFELSE): Wrap the test -s in + AC_TRY_COMMAND to improve config.log. + (_AC_INIT_DEFAULTS): Don't define ac_exeext and ac_objext to + highlight failures. + +2001-01-22 Akim Demaille + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Work around a currently + impossible to describe bug of SunOS 4.1.3 which causes a shell + crash when using `VAR=${VAR="$default"}'. + Reported and diagnosed by Kevin Ryde. + +2001-01-22 Akim Demaille + + * acfunctions.m4 (AC_FUNC_GETGROUPS): Typo :(. + +2001-01-22 Lars J. Aas + + * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O): + Export ac_cv_exeext so ltconfig believes the value is cached and + skips its own faulty test. + +2001-01-22 Jim Meyering + + * actypes.m4 (AC_TYPE_GETGROUPS): Double quote the test program + body. + +2001-01-22 Tim Van Holder + + * aclang.m4 (AC_LANG_INT_SAVE, AC_LANG_INT_SAVE(C)): Use + conftest.val, not conftestval. + * acgeneral.m4 (_AC_COMPUTE_INT_RUN, _AC_COMPUTE_INT): + Likewise. + +2001-01-22 Akim Demaille + + Create actypes.m4. + + * acgeneral.m4 (AC_CHECK_SIZEOF, _AC_CHECK_TYPE_NEW) + (AC_CHECK_TYPES, _AC_CHECK_TYPE_OLD) + (_AC_CHECK_TYPE_REPLACEMENT_TYPE_P, _AC_CHECK_TYPE_MAYBE_TYPE_P) + (AC_CHECK_TYPE, AC_CHECK_MEMBER, AC_CHECK_MEMBERS): Move into... + * actypes.m4: here. + * acgeneral.m4 (AC_TYPE_GETGROUPS, AM_TYPE_PTRDIFF_T) + (AC_TYPE_UID_T, AC_TYPE_SIZE_T, AC_TYPE_PID_T, AC_TYPE_OFF_T) + (AC_TYPE_MODE_T, AC_INT_16_BITS, AC_LONG_64_BITS, AC_TYPE_SIGNAL) + (AC_STRUCT_TM, AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLKSIZE) + (AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_RDEV): Move into... + * actypes.m4: here. + Adjust the test suite. + +2001-01-22 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT): Include a default case for non + existing tests. + * tests/atspecific.m4 (AT_CONFIGURE_AC, AT_CHECK_ENV) + (AT_CHECK_AUTOUPDATE, AT_CHECK_AU_MACRO): New. + Spread their use. + (AT_CHECK_MACRO): Pass `-W obsolete' to autoconf. + * tests/semantics.at (AC_HAVE_FUNCS): Obsolete, don't check. + * tests/mktest.sh: Create one test file per Autoconf source + file instead of separating syntax/update. + +2001-01-22 Akim Demaille + + * doc/autoconf.texi: Some about diff and cmp. + +2001-01-22 Akim Demaille + + * sh.m4 (AS_ESCAPE): New. + (_AS_QUOTE_IFELSE): Use it. + * tests/atgeneral.m4 (AT_INIT) : Define and use. + <--help> Don't display the options help when tests were selected. + Document -d. + : New. + : Give a banner, include ChangeLog snippets, list + the failed and skipped tests. + Remove useless $at_traceoff in sub shells, this improves the + readability of the traces by removing testsuite's implementation + details. + (AT_CHECK): Filter out the shell traces from the tested command's + stderr. + Use AS_ESCAPE. + Don't register experr and expout for clean up, as it's hairy and + easier to do from... + Support STDOUT = stdout, and STDERR = stderr. + Force the output of shell traces. + (AT_INIT): Here. + +2001-01-22 Akim Demaille + + * acgeneral.m4 (AC_INIT, AC_OUTPUT): Don't take care of completing + the log. + (_AC_INIT_PREPARE): Do it in the trap 0. + +2001-01-22 Akim Demaille + + * autoscan.pl: Instead of undefined globals, set them to empty + values. + (%needed_macros): New. + (&check_configure_ac): New. Call it. + (&output_libraries): Eve out from &output_programs. + (&print_unique): For the time being register in %needed_macros + only argument less macros. + +2001-01-22 Raja R Harinath , + Tim Van Holder , + Jim Meyering + + * acspecific.m4 (AC_AIX): Fix typo: s/@\$/@%/. + +2001-01-19 Akim Demaille + + Catch only used patterns. + Reported by the whole Autoconf community. + + * m4sh.m4 (AS_INIT): New. + * acgeneral.m4 (AC_PLAIN_SCRIPT): Use it. + Forbid only AC, AU, AH and AM. + +2001-01-19 Akim Demaille + + Optimizing AC_LANG was broken. Test and fix. + + * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): Don't + use _AC_LANG_ABBREV so that you don't depend upon _AC_LANG. + (_AC_LANG_SET): New. + (AC_LANG, AC_LANG_PUSH, AC_LANG_POP): Use it. + * tests/compile.at: Test AC_LANG, AC_LANG_PUSH & AC_LANG_POP. + +2001-01-19 Akim Demaille + + * sugar.m4 (m4_require): Missing dnl. + +2001-01-18 Akim Demaille + + * acgeneral.m4 (AC_PLAIN_SCRIPT): AF_INET, AF_UNIX, AR_FLAGS, + AS_FLAGS are OK. + +2001-01-18 Tim Van Holder + + * m4sh.m4 (AS_MKDIR_P): Properly support DOS-style paths. + +2001-01-18 Akim Demaille + + * tests/foreign.at (Autoconf & Libtool): `configure.in', not `.ac' + since Libtool does not yet support it. + Let the test suite be more verbose about at-path. + From Patrick Welche. + +2001-01-18 Akim Demaille + + * tests/atspecific.m4 (AT_CHECK_DEFINES): Discard + STDLIB|INTTYPES|MEMORY|STRING|UNISTD. + * tests/semantics.at (AC_CHECK_SIZEOF): Don't check the presence + of default headers, as it's machine dependent. + Reported by Jim Meyering and Nicolas Joly. + +2001-01-18 Akim Demaille + + * acgeneral.m4: Don't leave macro names in comments. + * aclang.m4: Likewise. + * configure.in: Likewise. + * tests/semantics.at: Likewise. + * tests/tools.at: Likewise. + +2001-01-18 Akim Demaille + + Medium term goal: AC_ macros can be tested with -W obsolete. + + * acgeneral.m4 (AC_RUN_IFELSE): Accept IF-CROSS-COMPILING. + (AC_TRY_RUN): Use it. + * acfunctions.m4: Start ousting AC_TRY_RUN and AC_TRY_COMPILE. + * acspecific.m4 (AC_AIX, AC_MINIX, AC_ISC_POSIX): AC_BEFORE on + AC_COMPILE_IFELSE and AC_RUN_IFELSE. + +2001-01-18 Akim Demaille + + * acgeneral.m4 (AC_INCLUDES_DEFAULT): Force the newline to avoid + bad surprises. + Reported by Jim. + +2001-01-18 Akim Demaille + + Require a perfect divert push/pop balance. + + * m4sugar.m4 (m4_divert, m4_divert_push, m4_divert_pop): Keep + track of them in m4_divert_stack. + (m4_divert_pop): Accept the expected current diversion as + argument and m4_fatal if incorrect, or if there is nothing to pop. + (globally): Specify the known m4_divert_pop. + Preserve symbolic values when possible. + * acgeneral.m4: No longer push the first diversion. + Specify the known m4_divert_pop. + (AC_PLAIN_SCRIPT): When m4_divert_push a diversion, m4_wrap its + pop. + (AC_INIT): Run AC_PLAIN_SCRIPT first, not last. + * tests/m4sh.at (AS_DIRNAME & AS_DIRNAME_SED): Can't use m4_defun + without m4_init. + * m4sugar.m4: Likewise. + +2001-01-18 Akim Demaille + + * m4sugar.m4 (m4_defn, m4_undefine, m4_popdef): Unlike the + builtin, fail on undefined symbols. + * tests/torture.at (Torturing config.status): Stop playing nasty + tricks with changequote. + (AC_DEFUBST): Move here from... + * tests/aclocal.m4: there. + +2001-01-18 Akim Demaille + + Various cleanups and consistency checks. + + * m4sugar.m4: Formatting changes. + * acgeneral.m4 (AC_DIVERT_PUSH, AC_DIVERT_POP, AC_REQUIRE) + (AC_DIAGNOSE, AC_FATAL, AC_MSG_WARN, AC_MSG_NOTICE, AC_MSG_ERROR): + Use m4_copy to define them, in order to keep a good $0. + (AC_INIT): AC_LANG_PUSH C, not AC_LANG, to initialize the stack. + * aclang.m4 (AC_LANG_PUSH): Dont't use m4_defn on undefined macros. + (AC_LANG_POP): Admit an argument specifying the language we quit + when popping. + Adjust Autoconf's AC_LANG_POPs. + * tests/tools.at (AWK portability): Don't depend on AC_INIT. + (autoconf --trace: user macros): Obviously I + meant TRACE1, not AC_TRACE1. + +2001-01-17 Akim Demaille + + * m4sugar.m4 (m4_undefine, m4_popdef): Don't tolerate undefined + arguments. + (_m4_expansion_stack): Rename as... + (m4_expansion_stack): this, and change its value: instead of using + the pushdef stack to stack each *line* of the stack, each + definition contains the whole stack. I.e., to display the whole + stack, instead of popdefing and displaying each definition, just + display the current definition. + (m4_expansion_stack_push, m4_expansion_stack_pop): New. + * tests/atspecific.m4 (AT_CHECK_AUTOCONF): Let $2 be the expected + exit status. + * tests/m4sugar.m4 (m4_require: circular dependencies): New test. + +2001-01-17 Pavel Roskin + + * m4sugar.m4 (m4_normalize): New macro - superposition of + m4_flatten and m4_strip. + (m4_join): Use m4_normalize. + * acgeneral.m4 (AC_FOREACH): Use m4_normalize. + (AC_CONFIG_HEADERS): Normalize the first argument. + (AC_CONFIG_LINKS): Likewise. + (AC_CONFIG_SUBDIRS): Likewise. + +2001-01-17 Tim Van Holder + + * acgeneral.m4 (_AC_OUTPUT_SUBDIRS): Quote $ac_sub_srcdir uses. + +2001-01-16 Akim Demaille + + Work around the Ultrix limitations on ``multiple redirections''. + Reported by Harlan Stenn. + + * acgeneral.m4 (_AC_EVAL_STDERR): New. + (_AC_PREPROC_IFELSE): Use it. + +2001-01-16 Akim Demaille + + * tests/atgeneral.m4 (AT_data_files): Fix the computation of PATH. + +2001-01-16 Akim Demaille + + * acgeneral.m4 (_AC_INIT_LOG_COMPLETE): Eve out from AC_OUTPUT. + (_AC_INIT_DEFAULTS, AC_OUTPUT): Use it. + +2001-01-16 Akim Demaille + + * doc/autoconf.texi: Lots of additions and changes. + (File Descriptors): New. + (Limitations of Make): New. + +2001-01-16 Akim Demaille + + * m4sh.m4 (AS_EXIT): Don't rely on exit == exit $?. + Reported by Tim Van Holder. + +2001-01-16 Akim Demaille + + * Makefile.am (editpl, editsh): Merge into... + (edit). + * m4sh.m4 (AS_UNAME): Eved out from... + * acgeneral.m4 (_AC_INIT_DEFAULTS): here. + (_AC_INIT_PACKAGE): Define AC_PACKAGE_NAME. + (_AC_INIT_PARSE_ARGS): AC_SUBST the PACKAGE_ variables. + Propagate their use in the executables and the test suite. + * tests/atgeneral.m4 (PATH): Include only absolute paths. + (AT_INIT): Use AS_UNAME. + +2001-01-16 Akim Demaille + + When default headers are used, check for their presence. + Suggested by Jim. + + * acgeneral.m4 (_AC_INIT_DEFAULTS): Don't define + ac_includes_default, since... + (_AC_INCLUDES_DEFAULT_REQUIREMENTS): this new macro does. + (AC_INCLUDES_DEFAULT): Require the former when default includes + are used. + (AC_CHECK_MEMBERS, _AC_CHECK_TYPE_NEW): Don't require + AC_HEADERS_STDC, that's a job for stupendous AC_INCLUDES_DEFAULT. + * acfunctions.m4 (AC_FUNC_MALLOC): Check for stdlib.h. + +2001-01-15 Akim Demaille + + * doc/autoconf.texi: Normalize sh samples. + +2001-01-15 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT): Simplify the hairy display of the + identity of the tests. + +2001-01-15 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT): When the suite failed, complain + before creating the debug scripts. + Create a log file. + When ignoring a test, display a reassuring `ok' for stressed + users, and say `skipped' instead. + Simply run `testsuite' with the failed tests instead of running + the debug scripts, this avoids having zillions of banners `Testing + Blabla 2.13' (another means to avoid these banners is to have the + test suite succeed :-). + +2001-01-15 Akim Demaille + + * sh.m4 (AS_BOX, _AS_BOX_LITERAL, _AS_BOX_INDIR): New. + * tests/atgeneral.m4: Use it. + +2001-01-15 Akim Demaille + + * acgeneral.m4 (AC_VAR_INDIR_IFELSE): Move as... + * m4sh.m4 (AS_LITERAL_IF): this. + (AS_IFELSE): Rename as... + (AS_IF): this. + +2001-01-12 Akim Demaille + + With `expr's that return `0' on failures, the executable suffix is + `0'. Test and fix. + Reported by Assar Westerlund. + + * Makefile.am (maintainer-check): New target. + * tests/Makefile.am (maintainer-check, maintainer-check-posix) + (maintainer-check-c++, expr): Likewise. + * configure.in (EXPR): Look for it. + * tests/atgeneral.m4 (AT_CHECK): Propagate $2's default value. + * tests/compile.at (Extensions): New test. + * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O): + Distinguish files with or without a dot. + +2001-01-12 Akim Demaille + + * acgeneral.m4: Last changes for `configure.ac'. + (_AC_INIT_HELP, _AC_OUTPUT_SUBDIRS): Take `configure.ac' into + account. + * autoreconf.sh: Likewise. + +2001-01-11 Motoyuki Kasahara + + * acfunctions.m4 (AC_FUNC_MEMCMP): Missing comma in AC_TRY_RUN + invocation. + +2001-01-11 Akim Demaille + + * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): New. + (AC_PROG_CC, AC_PROG_CXX): Use it. + (AC_PROG_CC_STDC): Be sure to remove tmp files. + * tests/compile.at (AC_TRY_LINK_FUNC): Don't use exit to test it, + since it produces a prototype which conflicts with the one + computed by _AC_PROG_CXX_EXIT_DECLARATION. + * tests/semantics.at (AC_CHECK_FUNCS, AC_HAVE_FUNCS): Likewise. + (AC_HAVE_FUNCS): Test AC_HAVE_FUNCS! + +2001-01-11 Kevin Ryde + + * autoconf.texi (Shellology): Fix an @end itemize, and a typo. + +2001-01-11 Kelly Anderson + + * autoconf.sh (M4): Handle PC drive letters. + * autoupdate.sh: Likewise. + +2001-01-11 Steven G. Johnson + + * aclang.m4 (AC_PROG_F77): Add pgf90 to the list of compilers to + look for, after the other Fortran 90 compilers. + +2001-01-11 Akim Demaille + + * aclang.m4: Use m4_copy to duplicate macros. + (AC_LANG_PUSH): In order to have AC_LANG's simplifications + effective, be sure to let _AC_LANG be the old language before + calling AC_LANG. + +2000-12-25 Pavel Roskin + + * autoreconf.sh: s/localddir/localdir/. + Reported by Motoyuki Kasahara. + +2000-12-23 Akim Demaille + + * autoconf.sh: Promote `configure.ac' over `configure.in'. + * autoreconf.sh: Likewise. + * autoheader.sh: Ditto. + * autoupdate.sh: Similarly. + * doc/autoconf.texi: Adjust. + * tests/atspecific.m4: Be sure to remove configure.in. + Adjust the test suite to use `configure.ac'. + +2000-12-22 Akim Demaille + + * acgeneral.m4 (_AC_EVAL, AC_TRY_EVAL, AC_TRY_COMMAND): Be a + single statement, so that one can make pipes with AC_TRYs, just as + in 2.13. + +2000-12-20 Lars J. Aas + + * aclang.m4 (_AC_COMPILER_OBJEXT, _AC_COMPILER_EXEEXT_O): + Make the order of arguments for ls count by splitting the ls + command into a sequence of ls commands. + +2000-12-20 Akim Demaille + + * aclang.m4 (_AC_LANG_COMPILER_GNU): Be sure to have `choke me' on + the seventh column so that the SGI Fortran compiler really chokes + on it. + From Ezra Peisach. + +2000-12-20 Akim Demaille + + * tests/foreign.at (Autoconf & Libtool): Ignore Libtool version + 1.3.[0-5]. + * tests/compile.at (GNU Fortran 77): Use AS_EXIT. + +2000-12-20 Akim Demaille + + * tests/atgeneral.m4 (AT_CLEANUP_FILE_IFELSE): Fix the regexp: the + pattern ` state* ' was added many times for `*' was improperly + escaped. + (AT_INIT): Remove the data files before running the tests. + Define AT_data_files and output it. + (AT_SETUP): Don't. + (_m4_divert(TEST)): Remove, now useless. + +2000-12-20 Akim Demaille + + * aclang.m4: `dnl' the AC_LANG_PUSH and AC_LANG_POP. + (AC_PROG_CXXCPP, AC_PROG_CPP): Set the current language instead of + just asserting it, since these macros can be called directly. + Reported by Raja R. Harinath. + +2000-12-19 Pavel Roskin + + * doc/autoconf.texi (Installation Directory Variables): More info + on prefix and exec_prefix. + +2000-12-19 Akim Demaille + + * aclang.m4 (_AC_COMPILER_OBJEXT): Don't rely on + _AC_COMPILE_IFELSE which uses ac_objext in a `test -s'. + Reported by Lars J. Aas. + +2000-12-19 Akim Demaille + + * tests/compile.at (AC_PROG_CPP without warnings, GNU Fortran 77): + Use AC_TRY_COMMAND when running commands, to enrich the logs. + +2000-12-19 Akim Demaille , Mo DeJong + + * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): New. + (_AC_COMPILER_EXEEXT_O): Extracted from... + (_AC_COMPILER_EXEEXT): here. Adjust. + +2000-12-19 Akim Demaille + + * tests/atgeneral.m4 (AT_CHECK): Make exit status report more + visible. + * tests/atspecific.m4 (AT_CHECK_AUTOCONF): Support FLAGS, STDOUT + and STDERR. + (AT_CHECK_CONFIGURE): Support plenty, cleanup defs when needed. + Spread their use in the whole suite. + Simplify a few AT_CLEANUPs. + +2000-12-19 Akim Demaille + + * tests/atgeneral.m4 (AT_CHECK): Accept if-failed and + if-not-failed. + * tests/atspecific.m4 (AT_CHECK_CONFIGURE): Use it in order to + dump config.log when configure failed. Before, the log was + reported only on success. + +2000-12-19 Akim Demaille + + * tests/foreign.at: New file. + +2000-12-19 Akim Demaille + + * tests/atgeneral.m4 (AT_BANNER, AT_CLEANUP): Formatting changes. + +2000-12-18 Pavel Roskin + + * Makefile.am: Add a comment explaining why suffix rules are not + used there. + +2000-12-15 Pavel Roskin + + * autoconf.sh: If the "allowed" pattern is not defined set it + to "^$". + * tests/tools.at (autoconf: forbidden tokens, basic): New test. + (autoconf: forbidden tokens): Renamed to ... + (autoconf: forbidden tokens, exceptions): ... this. + +2000-12-15 Akim Demaille + + * aclang.m4 (AC_PROG_CXXCPP, AC_PROG_CPP): Require AC_PROG_CXX/CC. + +2000-12-15 Akim Demaille + + * tests/compile.at (GNU Fortran 77): G77 is a `yes'/`' var. + Reported by Ezra Peisach. + +2000-12-15 Akim Demaille + + * tests/compile.at (GNU Fortran 77): s/g77/G77/. + Reported by Ezra Peisach. + +2000-12-15 Akim Demaille + + * man/Makefile.am (.x.1): Fix to work properly with + builddir != srcdir. + +2000-12-15 Akim Demaille + + * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)) + (AC_PROG_CPP, AC_PROG_CXXCPP, AC_PROG_GCC_TRADITIONAL) + (_AC_PROG_CC_G, AC_PROG_CC_C_O, _AC_PROG_CXX_G, AC_PROG_CC_STDC): + Don't use `${CC-cc}' since now the AC_REQUIRE machinery guarantees + that $CC is defined. And if not, it's a bug which must be + observable. + * acspecific.m4 (AC_SYS_LARGEFILE): Likewise. + +2000-12-15 Akim Demaille + + * acgeneral.m4 (_AC_PREPROC_IFELSE): Use ac_status as set by + AC_TRY_EVAL. + (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE): More alike, + using AS_IFELSE, and systematically AC_TRY_COMMAND when testing + something (for the logs). + +2000-12-15 Akim Demaille + + * aclang.m4 (_AC_PROG_PREPROC_WORKS): Use _AC_PREPROC_IFELSE. + * acgeneral.m4 (_AC_TRY_CPP): Its last use was that above, so + inline it into... + (_AC_PREPROC_IFELSE): here. + +2000-12-15 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT): Forget about `-n'. + Adjust so that `./testsuite -h 1 2' explains only tests 1 & 2. + +2000-12-15 Akim Demaille + + * acgeneral.m4 (_AC_EVAL): New. + (AC_TRY_EVAL, AC_TRY_COMMAND): Use it. + +2000-12-15 Akim Demaille + + * acgeneral.m4 (_AC_PREPROC_IFELSE, AC_PREPROC_IFELSE): New. + (AC_TRY_CPP): Use AC_PREPROC_IFELSE. + (AC_CHECK_MEMBER, AC_CHECK_DECL, _AC_CHECK_TYPE_NEW): Quote + properly. + * acheaders.m4 (AC_CHECK_HEADER): Quote properly, use + AC_PREPROC_IFELSE. + * acspecific.m4 (_AC_PATH_X_DIRECT): Use AC_PREPROC_IFELSE. + +2000-12-15 Akim Demaille + + * m4sugar.m4 (m4_init): Catch `dnl'. + +2000-12-15 Pavel Roskin + + * m4sh.sh (AS_ERROR): Restore dnl at the end of the macro. + +2000-12-14 Pavel Roskin + + * tests/semantics.at (AC_CHECK_TYPES): There are two tests with + this name. Rename the second one to "AC_CHECK_TYPES: backward + compatibility" + (AC_TRY_LINK_FUNC): Removed. It's now in tests/compile.at. + (C keywords): Likewise. + (AC_PROG_CPP with warnings): Likewise. + (AC_PROG_CPP without warnings): Likewise. + +2000-12-14 Akim Demaille + + Put back AC_CYGWIN etc. under the responsibility of the + configure.in maintainer, but discourage its use. + + * acspecific.m4 (_AC_CYGWIN, _AC_MINGW32, _AC_EMXOS2): Rename as... + (AC_CYGWIN, AC_MINGW32, AC_EMXOS2): these. + AU defined on top of AC_CANONICAL_HOST and $host_os. + * tests/mktests.sh (update_exclude_list): Add AC_CYGWIN, + AC_MINGW32, and AC_EMXOS2. + +2000-12-13 Pavel Roskin + + * m4sugar.m4 (m4_file_append): Add a newline after _m4eof, + otherwise _m4eof is appended to the output on FreeBSD 4.0. + * tests/atgeneral.m4 (AT_INIT): Avoid using unbalanced "y" + in sed, use "s" instead. + * tests/mktests.sh: Don't use \? in sed - it's a GNU extension. + Use separate patterns for A[CU]_DEFUN and AC_DEFUN_ONCE. + +2000-12-13 Akim Demaille + + EXEEXT and OBJEXT don't need to know $CYGWIN etc. + + * acspecific.m4 (AC_EXEEXT, AC_OBJEXT, _AC_EXEEXT, _AC_OBJEXT): + Move as... + * aclang.m4 (AC_EXEEXT, AC_OBJEXT, _AC_COMPILER_EXEEXT) + (_AC_COMPILER_OBJEXT): these. + (_AC_COMPILER_EXEEXT): Use _AC_LINK_IFELSE. + Don't depend upon $CYGWIN and the like. + (_AC_COMPILER_OBJEXT): Model after _AC_COMPILER_EXEEXT. + Skip more extensions. + Use _AC_COMPILE_IFELSE. + +2000-12-12 Pavel Roskin + + * Makefile.am: Don't use suffix rules for perl and shell + scripts. Use explicit rules instead. + +2000-12-12 Pavel Roskin + + * autoscan.pl (init_tables): Allow spaces on the right hand side + in autoscan tables. Die if there are no spaces at all. + (scan_c_file): Use \b instead of \W so that keywords match at + the beginning and the end of the line. + (scan_sh_file): Likewise. + (scan_makefile): Likewise. Use \B to match before `-l'. + (output): Suggest AC_CONFIG_HEADER if any C/C++ sources are + found. + * acidentifiers: Update macros for structure members st_blksize + and st_rdev. + +2000-12-12 Akim Demaille + + * tests/compile.at (GNU Fortran 77): Be robust to compilers that + choke on `--version'. + +2000-12-12 Akim Demaille + + * tests/suite.at: Run `tools.at' first. + +2000-12-12 Akim Demaille + + * tests/aclocal.m4 (AC_STATE_SAVE): Use a more precise regexp to + keep envvars. + +2000-12-12 Akim Demaille + + AS_ERROR was not properly saving data in the log file. + + * sh.m4 (AS_WARN, AS_ERROR): Use AS_MESSAGE. + (_AS_ECHO): Fix quotation. + (AS_MESSAGE): Use `as_me'. + * acgeneral.m4: More banners in the log. + (_AC_INIT_DEFAULTS): Compute as_me before using it. + +2000-12-08 Akim Demaille + + * doc/autoconf.texi (System Services) : Adjust the + documentation about X_DISPLAY_MISSING to the code. + +2000-12-07 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT): More robust computation of + ac_tests_pattern. + Reported by Andrej Borsenkow. + +2000-12-07 Akim Demaille + + * acspecific.m4 (_AC_EXEEXT): Skip *.pdb. + From Paul Berrevoets. + +2000-12-07 Akim Demaille + + * tests/atgeneral.m4 (AT_CHECK): Bad typo: assign `exit 1' to + at_continue if something failed, not `:'. + * tests/semantics.at (AC_PATH_XTRA): New. + * acspecific.m4 (_AC_PATH_X): New, extracted form AC_PATH_X. + +2000-12-06 Akim Demaille + + * configure.in: Bump version to 2.49c. + +2000-12-06 Akim Demaille + + Version 2.49b. + +2000-12-06 Akim Demaille + + Stop playing with FDs in Autotest. + + * tests/atgeneral.m4 (AT_INIT): Set up FD 5. + (AT_CHECK): Instead of using exec to globally change the FDs of + `testsuite', enclose the body of the test into a + `(..) >stdout 2>stderr'. + In every case, when verbose, display the differences between + expected and observed (stdout, stderr, exit status). + Let `0' be the default for EXIT-STATUS. + Support EXIT-STATUS == `ignore'. + +2000-12-06 Akim Demaille + + * tests/tools.at (autoconf: forbidden tokens): Adjust expected + result. + +2000-12-06 Akim Demaille + + * man/config.guess.x: New file. + * man/config.sub.x: New file. + +2000-12-06 Akim Demaille + + * tests/aclocal.m4 (AT_STATE_SAVE): Don't even try to preserve + egrep error messages, AT_CHECK will find them. + +2000-12-06 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools) : `for' on + arrays is nondeterministic across AWK implementations. + * tests/tools.at (autoconf: forbidden tokens): Sort the error + message to guarantee its uniqueness. + +2000-12-06 Akim Demaille + + The SunOS' egrep fails to process properly the `egrep' invocations + of the test suite. + + * tests/aclocal.m4 (AC_STATE_SAVE): If egrep fails, remove the + output file. + * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Don't check `state-*' + if the files are not present. + + * m4sugar.m4 (m4_join): Rename as... + (m4_smash): this. + * tests/aclocal.m4 (join): Move as... + * m4sugar.m4 (m4_flatten): this. + * autoconf.sh (trace.m4): Rename m4_smash as m4_flatten. + +2000-12-06 Akim Demaille + + * autoconf.sh (task trace): s/m4/$M4/. + * autoheader.sh: When loading trace.sh, catch errors and exit with + a decent error message. + * tests/tools.at: Be sure to test autoconf --trace before + autoheader. + +2000-12-06 Akim Demaille + + * tests/atgeneral.m4 (AT_CHECK): Fix the m4_ifval invocation. + +2000-12-06 Akim Demaille + + * aclang.m4 (AC_LANG): Be `smart': don't issue the sh code if the + current language did not change. + (AC_LANG_ASSERT): New. + (AC_PROG_CPP, AC_PROG_CXXCPP): Assert the language. + (_AC_PROG_F77_V, _AC_F77_NAME_MANGLING): Don't require + AC_PROG_F77, the code you include does it. + (AC_F77_LIBRARY_LDFLAGS): Set the language. + +2000-12-06 Akim Demaille + + * m4sugar.m4 (ifelse): Rename as... + (m4_if): this. + * autoconf.m4 (ifelse): Restore. + +2000-12-06 Akim Demaille + + * m4sugar.m4 (m4_dquote, m4_pattern_forbid, m4_pattern_allow) + (m4_cr_letters, m4_cr_LETTERS, m4_cr_Letters, m4_cr_digits) + (m4_cr_symbols1, m4_cr_symbols2, m4_re_string, m4_re_word) + (m4_init): New macros. + (m4_token_allow): Remove. + * acgeneral.m4: Don't push BODY into the diversion stack. + (AC_PLAIN_SCRIPT): Do it. + Call m4_init, define the Autoconf patterns. + (AC_INIT): Use AC_PLAIN_SCRIPT. + Remove the useless `dnl' (those where the current diversion is + KILL). + * autoconf.sh (m4_common): Fix quotation. + (finalize.awk): Load forbidden.rx and allowed.rx. + Split the line into tokens, and check their validity. + * tests/tools.at (Forbidden tokens): Adjust. + +2000-12-05 Bob Wilson + + * acspecific.m4 (_AC_OBJEXT, _AC_EXEEXT): Ignore .d files produced + by CFLAGS=-MD. + +2000-12-05 Akim Demaille + + * aclang.m4 (AC_PROG_F77): Temporarily set ac_ext to F to run + _AC_LANG_COMPILER_GNU. + From Steven G. Johnson. + * tests/compile.at (GNU Fortran 77): New test. + +2000-12-05 Akim Demaille + + * tests/tools.at (autoupdate): Strengthen and check autoupdate's + idempotency. + +2000-12-05 Akim Demaille + + * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): s/cp -f/mv -f/. + +2000-12-01 Pavel Roskin + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Don't escape + backquotes in AC_MSG_ERROR. Fix error message. + +2000-12-01 Pavel Roskin + + * tests/atgeneral.m4 (AT_INIT): Use ${CONFIG_SHELL-/bin/sh} + to run the testsuite from the debug scripts. + Suggested by Alexandre Oliva. + +2000-11-30 Akim Demaille + + * doc/autoconf.texi (Assignments): Don't use $? from an + assignment. + +2000-11-30 Akim Demaille + + * sh.m4 (AS_EXIT): Don't rely on false exiting 1. + Actually, always use `(exit $val); exit', don't try to be tricky. + * doc/autoconf.texi (Limitations of Builtins) : new. + +2000-11-30 Akim Demaille + + * sh.m4 (_AS_EXPR_PREPARE): Don't rely on the exit status of a + back quote evaluation since the very system for which the test was + written does not propagate it. Groumph! + +2000-11-30 Akim Demaille + + * acspecific.m4 (_AC_EXEEXT): Also remove conftest$ac_exeext. + Reported by Pavel. + +2000-11-30 Akim Demaille + + * acspecific.m4 (_AC_EXEEXT, _AC_OBJEXT): Make the two macros more + alike: a loop over a sorted list of possible files. + Don't cleanup on errors, the trap will do it. + Cleanup when there are no errors. + (_AC_EXEEXT): Use the empty string instead of `no' as the cached + value. + Be sure to prefer `.exe' to `' when the two are observable. + Suggested by Lars and Earnie. + +2000-11-30 Akim Demaille + + When using Cygwin, in spite of all their efforts, it may happen + that `confestval' be read in binary mode. The shell then fails to + properly strip the \r\n. + Reported by Lars J. Aas. + + * aclang.m4 (AC_LANG_INT_SAVE): Don't add any trailing new line, + and close the file. + Suggested by Peter Eisentraut. + +2000-11-30 Akim Demaille + + * doc/autoconf.texi (Systemology): New section. + Some about QNX 4. + +2000-11-30 Akim Demaille + + * doc/autoconf.texi (Special Shell Variables): Document RANDOM. + +2000-11-30 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools): Some about cp + and mv, thanks to Ian. + +2000-11-29 Akim Demaille + + * acspecific.m4 (_AC_OBJEXT): Skip *.tds, special case .o and + .obj. + Suggested by Lars. + +2000-11-29 Akim Demaille + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix the portability of + the default assignment of CONFIG_FILES, CONFIG_HEADERS, + CONFIG_LINKS and CONFIG_COMMANDS. + +2000-11-29 Akim Demaille + + * acgeneral.m4 (AC_CACHE_SAVE): Use the `clear' trick to work + around broken seds. + (_AC_OUTPUT_HEADERS, _AC_OUTPUT_FILES): Rename the sed labels to + match the Autoconf documentation. + +2000-11-29 Akim Demaille + + * doc/autoconf.texi (Shell Substitutions): More on the variations + around ${foo=bar}. + (Assignments): Rewrite as a summary of the previous section. + * acgeneral.m4 (AC_CACHE_SAVE): Be protected against the Solaris' + `${foo='${bar}'}' bug. + +2000-11-29 Akim Demaille + + * acgeneral.m4 (_AC_OUTPUT_HEADERS, _AC_OUTPUT_FILES): Don't use + `... echo "error: \\\`$f'" ...` + as it's not portable to BSDI 1.3. + Do this instead: + `... echo "error: $f" ...` + Reported by Daniele Arena. + +2000-11-29 Akim Demaille + + QNX 4.2.5's expr always exits 1 when `:' is used with parens. + + * doc/autoconf.texi (Limitations of Usual Tools) : More + information, thanks to Paul Berrevoets, Paul Eggert and David + Morgan. + * sh.m4 (_AS_EXPR_PREPARE): New. + (AS_DIRNAME): Use it. + +2000-11-29 Akim Demaille + + sizeof (struct {char a,b; }) is not required to be 2. + Reported by Johan Danielsson. + + * tests/semantics.at (AC_CHECK_SIZEOF): Define charchar as an + array of 2 chars. + Suggested by Alexandre. + +2000-11-29 Akim Demaille + + Provide a means to display banners in the test suite. + + * tests/atgeneral.m4 (AT_INIT): Initialize `AT_banner_ordinal'. + Execute the epilogue of the tests only if a test was run. + Don't build the value of `at_tests_all' with a for loop: expand + `AT_TESTS_ALL'. + (AT_SETUP): Build `AT_TESTS_ALL'. + (AT_BANNER): New. + Adjust all the former banners to use it. + (AT_CHECK): Don't trace the decoding of `$?'. + +2000-11-29 Akim Demaille + + * tests/atgeneral.m4 (AT_DEFINE, AT_UNDEFINE, AT_SHIFT) + (AT_INCLUDE): Remove, use the m4_ macros. + +2000-11-29 Akim Demaille + + * m4sugar.m4 (ifval, ifset, ifdef, ifndef, m4_ifvanl): Rename as... + (m4_ifval, m4_ifset, m4_ifdef, m4_ifndef, m4_ifvaln): this. + (m4_n): New macro. + (m4_ifvaln): Use it. + * autoconf.m4 (ifdef): Restore it. + +2000-11-29 Akim Demaille + + * m4sugar.m4 (m4_errprint, divnum, errprint, esyscmd): Rename as... + (m4_errprintn, m4_divnum, m4_errprint, m4_esyscmd): this. + * autoconf.m4: Restore them. + +2000-11-28 Pavel Roskin + + * doc/autoconf.texi (Fortran 77 Compiler Characteristics): + Don't suggest obsolete AC_LANG_FORTRAN77. + (Language Choice): Better preamble. + +2000-11-28 Pavel Roskin + + * doc/install.texi: Minor changes to eliminate TeX warnings. + * doc/autoconf.texi: Likewise. Typo fixes. + +2000-11-23 Akim Demaille + + * tests/atconfig.in: Move code into... + * tests/atgeneral.m4 (AT_INIT): here. + Use AS_SHELL_SANITIZE. + +2000-11-23 Akim Demaille + + Have the test suite list of the test groups and their references. + + * tests/atgeneral.m4 (_m4_divert(SUITE_PRO)): Remove, replaced + by... + (_m4_divert(DEFAULT), _m4_divert(OPTIONS), _m4_divert(HELP)) + (_m4_divert(SETUP)): these. + (_m4_divert(SUITE_EPI)): Rename as... + (_m4_divert(TAIL)): this. + (AT_INIT): Adjust to the new diversions. + Insert the magic number. + Accept test groups as cli argument. + List the test groups. + Rename TESTS, test, and tests as at_tests_all, at_test, and + at_tests. + Have the debug scripts pass options to test suite. + Remove their banner. + * tests/atspecific.m4: Don't divert to 0. + * suite.at: Don't insert the magic number. + +2000-11-23 Akim Demaille + + * m4sugar.m4 (m4_divert, m4_undivert): Support named diversions. + * tests/atgeneral.m4 (_m4_divert(SUITE_PRO), _m4_divert(TESTS)) + (_m4_divert(SUITE_EPI), _m4_divert(TEST)): New diversions. + Push the first two diversions. + (AT_INIT): Don't. + (AT_INIT, AT_SETUP, AT_CLEANUP): Adjust to use the named + diversions. + +2000-11-23 Akim Demaille + + * tests/atgeneral.m4 (AT_CLEANUP): Factor the computation of + at_test_count into... + (AT_INIT): here. + Use an sh variable, at_data_files, instead of an hard coded list. + +2000-11-23 Akim Demaille + + * tests/atgeneral.m4 (AT_CLEAN_FILE_IFELSE, AT_CLEANUP_FILE) + (AT_CLEANUP_FILES): New macros. + (AT_SETUP, AT_CHECK, AT_CLEANUP): Use them. + (AT_CHECK): Fix a use of at_verbose. + * tests/atspecific.m4 (AT_CHECK_AUTOCONF, AT_CHECK_AUTOHEADER) + (AT_CHECK_CONFIGURE): New macros. + +2000-11-23 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT) : Be a :/echo variable. + : Remove. + (AT_CLEANUP): Clean up the diversion use. + +2000-11-23 Akim Demaille + + Factor part of the prologue of the tests. + + * tests/atgeneral.m4 (AT_SETUP, AT_CLEANUP): No longer handle + at_stop_on_error. + (AT_INIT): After having checked whether the test failed, break out + of the loop if requested (-e). + +2000-11-23 Akim Demaille + + * tests/atgeneral.m4 (AT_SETUP): Don't build at-check-line, that's + AT_CHECK's job. + Remove the code depending upon `at_skip_mode': it's unused. + +2000-11-23 Akim Demaille + + * tests/atconfig.in: Remove the `snippet' marks, there are no + longer used. + * tests/atgeneral.m4: Likewise. + +2000-11-23 Akim Demaille + + Factor the epilogue of the tests. + + * tests/atgeneral.m4 (AT_CLEANUP): Move the reading of at_status + into... + (AT_INIT): here, at the end of the `case'. + +2000-11-23 Akim Demaille + + The debug scripts are only wrapper around testsuite, asking for a + specific test. + + * tests/atgeneral.m4 (AC_INIT) : New variable, new + option, -d, to disable the creation of the debug scripts (when + testsuite was already launched from one). + : Really compute it instead of using the number of + the last test run. + +2000-11-23 Akim Demaille + + Transform Autotest's body into a `for test; case $test'. + As a known side effect, currently any code outside + AT_SETUP/AT_CLEANUP is discarded. + + * acgeneral.m4 (_m4_divert(KILL)): Move to... + * m4sugar.m4: here. + * tests/atgeneral.m4 (AT_INIT): Use m4_divert_push/pop instead of + m4_divert. + Put all the tests inside a for;case. + Define TESTS. + (AT_SETUP, AT_CLEANUP): Open/close each case. + +2000-11-23 Akim Demaille + + Move divert and undivert into m4_. + + * m4sugar.m4 (m4_divert, divert, undivert): Rename as... + (m4_divert_text, m4_divert, m4_undivert): this. + * autoconf.m4 (divert, undivert): Restore them for user macros only. + +2000-11-23 Akim Demaille + + Move Autotest on top of M4sh. + + * tests/atgeneral.m4: Import M4sh. + Adjust the differences on the names of the builtins (define etc.). + (AT_CASE): Remove, use m4_case. + (AT_SETUP): Don't use `AT_group_description', `$1' is OK. + * tests/atspecific.m4 (m4_for, m4_foreach): Remove, use those of + M4sugar. + * tests/m4sugar.at: Strengthen the quotation and adjust to the new + macro names. + * tests/m4sh.at: Ditto. + * tests/torture.at: Ditto. + * tests/base.at: Ditto. + * m4sh.m4: Import M4sugar. + * autoconf.m4: Don't import M4sugar, M4sh does. + +2000-11-20 Pavel Roskin + + * acgeneral.m4 (_AC_RUN_IFELSE): `==' in test is not portable, + replace with `='. + +2000-11-17 Akim Demaille + + * acgeneral.m4 (_AC_INIT_DEFAULTS): Also include `PATH' and + `/bin/machine' in the log. + +2000-11-17 Akim Demaille + + Let AC_TRY_RUN be more verbose + + * acgeneral.m4 (_AC_RUN_IFELSE): Instead of canceling the output + of the test program, save it into the log. + Save the exit status, and report it in the log when non zero. + Just use `(./conftest)' instead of `(./conftest; exit)'. + +2000-11-17 Akim Demaille + + * acgeneral.m4 (_AC_INIT_DEFAULTS) : Include + sys/stat.h. + * acspecific.m4 (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_BLOCKS) + (AC_STRUCT_ST_RDEV): Simplify. + * acfunctions.m4 (AC_FUNC_MMAP): Include sys/stat.h unconditionally. + * doc/autoconf.texi (Default Includes): Adjust. + (Particular Structures) : + Adjust. + +2000-11-16 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools) : + expr 'a' : '\(b\)'. + From Paul Eggert. + +2000-11-16 Akim Demaille + + Reorder the test suite so that low level features are tested + before high level ones. + + * tests/semantics.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): + (missing templates): Move to... + * tests/torture.at: here. + Reorder the file so that the torture test is last. + * tests/semantics.at (AC_TRY_LINK_FUNC, AC_PROG_CPP with warnings) + (AC_PROG_CPP without warnings): Move to... + * tests/compile.at: here, new file. + * tests/suite.at: Run `torture' and then `compile' before + `semantics'. + +2000-11-16 Akim Demaille + + * acspecific.m4 (AC_SYS_LARGEFILE): _AC_SYS_LARGEFILE_SOURCE no + longer exist. + +2000-11-16 Akim Demaille + + POSIX doesn't require s/[^/]// to work. + From Paul Eggert and Johan Danielsson. + + * doc/autoconf.texi (Limitations of Usual Tools) : + Reorganize. Document this issue. + * autoupdate.sh (dir): Use `,' as separator instead of `/' + * autoreconf.sh: Likewise. + * autoupdate.sh: Ditto. + +2000-11-16 Paul Eggert + + * m4/largefile.m4 (_AC_SYS_LARGEFILE_SOURCE): Remove, replaced by... + (_AC_SYS_LARGEFILE_TEST_INCLUDES): this. + (AC_SYS_LARGEFILE_MACRO_VALUE): Use AC_LANG_PROGRAM instead of + _AC_SYS_LARGEFILE_SOURCE, i.e., don't pass + _AC_SYS_LARGEFILE_TEST_INCLUDES by default: this isn't desirable + when checking for fseeko. + (AC_SYS_LARGEFILE): Pass AC_SYS_LARGEFILE_TEST_INCLUDES to + _AC_SYS_LARGEFILE_MACRO_VALUE, since it no longer does this for us. + +2000-11-16 Akim Demaille + + Provide a means for escaping the forbidden patterns test. + + * tests/tools.at (Forbidden tokens): Test m4_token_allow. + * m4sugar.m4 (m4_file_append, m4_token_allow): New macros. + * autoconf.sh (task script): Pass `tmp' and `verbose' to + finalize.awk. + (finalize.awk::check_patterns): Eve out from the body. + (finalize.awk): Read `$tmp/tokens_allowed', and don't complain for + these exceptions. + +2000-11-14 Paul Eggert + + * acspecific.m4 (AC_SYS_LARGEFILE): Don't worry about + whether fseeko and ftello are properly declared. + * acfunctions.m4 (AC_FUNC_FSEEKO): New macro, which worries about + fseeko (and presumably ftello). Do not set _XOPEN_SOURCE; that + causes too many problems in practice. + * acfunctions (fteelo, fseeko): Trigger AC_FUNC_FSEEKO. + * doc/autoconf.texi: Adjust. + +2000-11-14 Akim Demaille + + * doc/autoconf.texi (Limitations of Builtins): Comment `true'. + +2000-11-14 Akim Demaille + + * BUGS: New file. + Be sure to read this file if you're using a non released Autoconf. + * tests/tools.at (Syntax of the scripts): The non built tools are + in `$top_srcdir', not `..'. + (autoconf --trace): When using `-i' we need the src tree, not the + build tree. + +2000-11-14 Akim Demaille + + A single m4_require is enough. + + * m4sugar.m4 (_m4_require): $2 defaults to $1. + Rename as... + (m4_require): this. + * acgeneral.m4 (_AC_REQUIRE): Remove, use m4_require if you want + to get into the gory details. + +2000-11-14 Akim Demaille + + * acgeneral.m4 (_AC_INIT_DEFAULTS_ENVIRONMENT): Rename as... + * m4sh.m4 (AS_SHELL_SANITIZE): this. + +2000-11-14 Akim Demaille + + * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Don't neutralize + autoconf's warnings. + +2000-11-14 Akim Demaille + + Set AC_LANG_PREPROC_REQUIRE which replaces AC_REQUIRE_CPP. + The main difference is that the former requires AC_LANG_COMPILER. + + * aclang (AC_LANG_PREPROC, AC_LANG_PREPROC(C), AC_LANG_PREPROC(C++)) + (AC_LANG_PREPROC(Fortran 77), AC_LANG_PREPROC_REQUIRE): New + macros. Issue a warning when looking for the Fortran 77 + preprocessor instead of an error. + (AC_LANG_COMPILER): Check that it is run before the corresponding + AC_LANG_PREPROC. + (AC_PROG_C + (AC_LANG_COMPILER_REQUIRE): Don't call directly + AC_LANG_COMPILER(_AC_LANG), rather invoke AC_LANG_COMPILER so that + the generic code in AC_LANG_COMPILER is run. + (AC_REQUIRE_CPP): Use AC_LANG_PREPROC_REQUIRE. + (AC_PROG_CC, AC_PROG_CXX): Don't require being run before the + corresponding AC_LANG_PREPROC: AC_LANG_COMPILER does it. + + + Propagate AC_LANG_PREPROC_REQUIRE. + + * acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP): Use it instead of + AC_REQUIRE_CPP. + * acspecific.m4 (_AC_DECL_YYTEXT, AC_PATH_X): Don't + AC_REQUIRE_CPP, inner macro will do it. + * aclang.m4 (AC_PROG_GCC_TRADITIONAL, AC_C_STRINGIZE) + (AC_C_PROTOTYPES): Likewise. + (AC_C_STRINGIZE): Yeeks! The body of AC_CACHE_CHECK was not + quoted. Use @%:@ do assist Emacs. + + + For some reason (don't ask), this revamping revealed that + AC_PROG_CC_STDC, because of the `break', does not clean its tmp + files. + + * aclang.m4 (AC_PROG_CC_STDC): Extract the creation of conftest.c + out of AC_COMPILE_IFELSE. + Be sure to clean the tmp files. + +2000-11-14 Akim Demaille + + * tests/m4sh.at (AS_DIRNAME & AS_DIRNAME_SED): Simplify. + +2000-11-14 Akim Demaille + + * acfunctions.m4 (AC_FUNC_ALLOCA): Don't require AC_PROG_CPP, + since (i) you actually need a compiler, (ii) AC_TRY_LINK handles + it. + * acheaders.m4 (AC_HEADER_STDC): Don't require AC_PROG_CPP, + AC_TRY_CPP does it. + +2000-11-14 Akim Demaille + + Create acheaders.m4. + + * acgeneral.m4 (AC_CHECK_HEADER, AC_CHECK_HEADERS) + (AH_CHECK_HEADERS): Move to... + * acheaders.m4: here, a new file. + * acspecific.m4 (_AC_CHECK_HEADER_DIRENT, AH_CHECK_HEADERS_DIRENT) + (AC_HEADER_DIRENT, AC_HEADER_MAJOR, AC_HEADER_STAT, AC_HEADER_STDC) + (AC_HEADER_SYS_WAIT, AC_HEADER_TIME) + (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H) + (_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL, AC_HEADER_TIOCGWINSZ): Move + to... + * acheaders.m4: here. + +2000-11-14 Akim Demaille + + Move AC_MSG_* into M4sh. + + * acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move + to... + * m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here. + (AS_MESSAGE, AS_WARN, AS_ERROR): New. + * acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them. + (AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of... + (AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new. + Adjust all dependencies. + +2000-11-14 Akim Demaille + + * acgeneral.m4: Spread some AS_EXIT and AC_MSG_ERROR. + (AC_OUTPUT): Don't play with trap, use ac_clean_files. + +2000-11-14 Akim Demaille + + Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0 + instead of hard coded `configure'. + + * acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/. + (_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating + it. No longer insert the configure banner. + (_AC_INIT_DEFAULTS): Create config.log with the banner. + Define `as_me'. + (_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE) + (AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED) + (AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP) + (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE) + (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use + `$as_me' instead of `configure'. + (AC_OUTPUT): Get rid of the UCA, and of the empty line when + dumping confdefs.h into config.log. + (_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS. + Print a banner. + Use AC_MSG_ERROR and AC_MSG_NOTICE. + * acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS) + (_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE. + * tests/semantics.at (missing templates): Adjust. + +2000-11-14 Akim Demaille + + * doc/autoconf.texi (autoconf Invocation): Explain `-W error' + gives back traces. + +2000-11-11 Pavel Roskin + + * acfunctions.m4 (AC_CHECK_FUNCS): Add missing m4 quotes. + (AC_FUNC_GETPGRP): Likewise. + * acspecific.m4 (AC_AIX): Likewise. + * m4/init.m4 (AM_INIT_AUTOMAKE): Likewise. + * m4/missing.m4 (AM_MISSING_PROG): Likewise. + * m4/sanity.m4 (AM_SANITY_CHECK): Likewise. + +2000-11-11 Pavel Roskin + + * acfunctions.m4: Always quote first argument of AC_MSG_ERROR, + AC_MSG_WARN, AC_MSG_CHECKING, AC_MSG_RESULT, + AC_MSG_RESULT_UNQUOTED. + * acgeneral.m4: Likewise. + * aclang.m4: Likewise. + * acspecific.m4: Likewise. + * configure.in: Likewise. + * doc/autoconf.texi: Likewise. + +2000-11-10 Pavel Roskin + + * doc/autoconf.texi (Particular Structures): Fix examples for + AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV. + +2000-11-10 Pavel Roskin + + * doc/autoconf.texi (Limitations of Usual Tools): Don't use + uncommon abbreviations. + +2000-11-10 Akim Demaille + + * doc/autoconf.texi (Limitations of Builtins): Some information + about `trap'. + Document the FreeBSD bug observed by Pavel. + +2000-11-10 Pavel Roskin + + * autoscan.pl (scan_files): Eliminate a warning if no C files + are found. + (output): Likewise. Use AC_CONFIG_SRCDIR and AC_CONFIG_FILES + instead of old-style arguments for AC_INIT and AC_OUTPUT. + +2000-11-10 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools): `&' in sed's rhs + is portable. + +2000-11-10 Akim Demaille + + * doc/autoconf.texi (Shell Substitutions): Some information about + Solaris' sh handling of ``foo=${foo='}'}'' collected by Alexandre, + reported by David Taylor. + +2000-11-10 Akim Demaille + + * tests/m4sh.at (Negated classes in globbing): New test. + +2000-11-10 Akim Demaille + + * doc/autoconf.texi (Limitations of Builtins): `for i; do'. + +2000-11-10 Akim Demaille + + * doc/autoconf.texi (Shellology): Some about /usr/xpg4/bin/sh on + Solaris. + Sort the entries. + Some words about POSIX vs Bourne shell. + From Russ Allbery and Robert Lipe. + +2000-11-10 Akim Demaille + + * doc/autoconf.texi (Shell Substitutions): Split into... + (Shell Substitutions, Assignments): these. + Move them before `Special Shell Variables'. + (Shell Substitutions): Include information on `$()' from Russ + Allbery. + +2000-11-10 Akim Demaille + + When running + + AC_INIT + AC_PROG_CC + AC_LANG_COMPILER_REQUIRE + + AC_PROG_CC is expanded twice, because AC_PROG_CC provides + `AC_PROG_CC', and not `AC_LANG_COMPILER(C)' as expected by + AC_LANG_COMPILER_REQUIRE. + + * aclang.m4 (AC_LANG_COMPILER(C)): Instead of calling AC_PROG_CC, + require it. + (AC_LANG_COMPILER(C++), AC_LANG_COMPILER(Fortran 77)): Likewise. + +2000-11-10 Akim Demaille + + * m4sh.m4 (AS_MKDIR_P, AS_DIRNAME_SED): Don't shell quote $1. + Adjust callers. + Reported by Paul Eggert. + * tests/m4sh.at: Sort. + +2000-11-09 Pavel Roskin + + * install-sh: Use ":" instead of "true". + +2000-11-09 Pavel Roskin + + * tests/tools.at (Syntax of the scripts): Check "autoreconf" + only once. Check "install-sh", "mkinstalldirs" and "missing". + +2000-11-09 Pavel Roskin + + * acgeneral.m4 (_AC_COMPUTE_INT_COMPILE): Use ":" instead of + "true". + * tests/atgeneral.m4 (AT_INIT): Likewise. + * tests/tools.at (Syntax of the scripts): Likewise. + +2000-11-09 Pavel Roskin + + * tests/m4sugar.at (m4_warn): Adjusted to accept stack dump when + -Werror is used. + +2000-11-08 Akim Demaille + + * m4sugar.m4 (_m4_expansion_stack_dump): Really rename as... + (m4_expansion_stack_dump): this. + +2000-11-08 Akim Demaille + + * aclang.m4 (AC_LANG_PROGRAM(Fortran 77): Complain about $1 having + a value. + Reported by Paul Martinolich. + (_AC_LANG_COMPILER_GNU): Pass the test as the body of + AC_LANG_PROGRAM, not the prologue. + +2000-11-07 Pavel Roskin + + * autoconf.sh: Temporarily disable recognizing of abbreviated + long options - it's hard to maintain them by hand. + * autoheader.sh: Likewise. + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * ifnames.sh: Likewise. + +2000-11-07 Akim Demaille + + * aclang.m4 (ac_cv_prog_gcc, ac_cv_prog_gxx, ac_cv_prog_g77): + Be AU_DEFUN'd, not AU_ALIAS'd. + Reported by Ralf Corsepius. + * tests/mktests.sh (exclude_list): Skip these variables. + +2000-11-07 Akim Demaille + + m4_syscmd was reestablished as `syscd' intead of `syscmd' because + instead of `s/^m4_//', m4_copy_unm4 was running `s/[m4_]//'. + + * m4sugar.m4 (m4_copy_unm4): Fix. + +2000-11-07 Akim Demaille + + * acgeneral.m4 (AC_CHECKING): Is not an alias of AC_MSG_NOTICE, + hence use AU_DEFUN, not AU_ALIAS. + +2000-11-03 Jim Meyering + + * acfunctions.m4 (AC_FUNC_FNMATCH): Add a test to detect + the d*/*1 vs d/s/1 bug. + Add a couple more test cases to catch bugs in glibc 2.1.95. + Include fnmatch.h unconditionally + Mention the GNU C library. + From Paul Eggert. + +2000-11-03 Akim Demaille + + AC_CONFIG_AUX_DIR_DEFAULTS overrides AC_CONFIG_AUX_DIR. Ouch. + Reported by Paul Martinolich. + + * acgeneral.m4 (AC_PROVIDE): Don't forget to `m4_provide'!!! + Tss, novice... + * tests/base.at (AC_REQUIRE & AC_PROVIDE): New test. + +2000-11-03 Akim Demaille + + * m4sugar.m4 (m4_location): When using its value, don't use + `m4_defn', since m4_location is not a variable, it's a macro which + expands to __file__:__line__. + * tests/m4sugar.at (m4_warn): New test. + +2000-11-03 Akim Demaille + + * tests/tools.at (unexpanded macros): Strengthen. + * autoconf.sh (finalize.awk): Use `sub' instead of `index' + + `substr'. + More comments. + +2000-11-03 Akim Demaille + + * Makefile.am (.m4.m4f): Check that processing produces only + comments and empty lines. + Check that freezing produced no output. + * m4sugar.m4: Commentize what was not. + * m4sh.m4: Likewise. + * aclang.m4: Formatting changes. + +2000-11-03 Akim Demaille + + * autoconf.m4 (define): Reestablish only after having read the + `ac' files. + Adjust all the Autoconf code to use `m4_define', not `define'. + +2000-11-03 Akim Demaille + + * acgeneral.m4 (AU_ALIAS): Don't forget to pass the arguments to + the new macro... + Reported by Ezra Peisach. + * tests/semantics.m4 (AC_HAVE_FUNCS): New test. + * tests/tools.at (autoupdate): As a benign side effect, updating a + macro that takes no argument produces `UPDATED([])', no longer + `UPDATED()'. Adjust the test. + +2000-11-03 Akim Demaille + + * autoconf.m4: Instead of reactivating the macros before reading + Autoconf's files, do it afterwards, so that Autoconf promotes the + right use, but users still can use the old names. + Of course this revealed numerous non updated uses of old macros in + Autoconf's files. Adjust them. + But for the time being, keep `define' alive for Autoconf. + +2000-11-03 Akim Demaille + + AC_REQUIRE and AC_DEFUN_ONCE don't work properly together. This + caused strange messages about AC_ARG_PROGRAM. + Reported by Jim Meyering. + + * acgeneral.m4 (AC_DEFUN_ONCE): Fix the indirection to + m4_defun_once. + * m4sugar.m4 (m4_defun_once): Also define + `m4_location(MACRO-NAME)'. s/ac_warn/m4_warn/. + Use `m4_defn' to read `m4_location'. + * tests/base.at (AC_REQUIRE & AC_DEFUN_ONCE): Two new tests. + +2000-11-03 Akim Demaille + + Set up config.log earlier so that AC_MSG_ERROR and AC_MSG_WARN can + be used early. + + * acgeneral.m4 (_AC_INIT_DEFAULTS): Call `_AC_INIT_PREPARE_FDS'. + (_AC_INIT_PREPARE): Don't. + (_AC_INIT_PREPARE_ENVIRONMENT, _AC_INIT_PREPARE_FDS): Rename as... + (_AC_INIT_DEFAULTS_ENVIRONMENT, _AC_INIT_DEFAULTS_FDS): these, + since they are called from `_AC_INIT_DEFAULTS', not + `_AC_INIT_PREPARE'. + (_AC_INIT_DEFAULTS_FDS): Dump `$@' in config.log, not + `$ac_configure_args' which is not computed yet. + +2000-11-03 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): TRIPLET can include `_' and + `-'. + Reported by Andreas Jaeger. + +2000-11-03 Akim Demaille + + * m4sh.m4 (_AS_UNSET_PREPARE): New macro, eved from + _AC_INIT_PREPARE_ENVIRONMENT, and fixed: set `FOO' before trying + to unset it: `unset' exits 1 if the variable is not defined. + (AS_UNSET): Require it. Use `as_unset' not `ac_unset'. + * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): Use it. + +2000-11-03 Akim Demaille + + * m4sugar.m4 (builtin, changecom, changequote, decr, dumpdef) + (incr, index, indir, len, syscmd, sysval, traceoff, traceon): + Rename as... + (m4_builtin, m4_changecom, m4_changequote, m4_decr, m4_dumpdef) + (m4_incr, m4_index, m4_indir, m4_len, m4_syscmd, m4_sysval) + (m4_traceoff, m4_traceon): these. + * autoconf.m4 (builtin, changecom, decr, incr, index, indir, len) + (syscmd, sysval, traceoff, traceon): Reactivate. + +2000-11-03 Akim Demaille + + * m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros. + Use them. + (debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp) + (substr, translit, m4_wrap): Rename as... + (m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp) + (m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these. + Adjust all dependencies. + * acgeneral.m4: Adjust. + * tests/m4sugar.at: Adjust. + * autoconf.m4 (m4exit, patsubst, regexp, substr, translit): + Reestablish them. + +2000-11-02 Akim Demaille + + The documentation is not clear about the obsoleteness of + `acconfig.h', `config.h.top', and `config.h.bot'. + Reported by Aharon Robbins. + + * doc/autoconf.texi (Making configure Scripts) + (Automatic Remaking, Defining Symbols, Distributing): Forget about + these files. + (acconfig.h): Reword. + Display the old scheme presenting the dependencies between input + and output files. + (Changed File Names): Clarify. + +2000-11-02 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools): Some about + dirname. + +2000-11-02 Pavel Roskin + + * ifnames.sh: Put the opening brace on the same line with + patterns. Reported by Paul Martinolich. + * tests/tools.at (AWK portability): Check ifnames. + (ifnames): New test for ifnames. + * THANKS: Updated. + +2000-11-02 Pavel Roskin + + * m4/atconfig.m4 (AT_CONFIG): s/AT_TESTPATH/AUTOTEST_PATH/ + because AT_TESTPATH looks like a macro. + * tests/atconfig.in: Likewise. + +2000-11-02 Akim Demaille + + * autoconf.sh (trace.m4): Move all the M4 builtins into `at_'. + Catch the failures of the big pipe. + +2000-11-02 Akim Demaille + + * tests/tools.at (Tracing M4 builtins): New test. + * autoconf.sh (trace_format): Fix its computation. + +2000-11-02 Akim Demaille + + * tests/atgeneral.m4 (AT_CHECK): Check stderr first, since if both + stdout and stderr fail, differences on the latter are probably + more significant than on the former. + +2000-11-02 Akim Demaille + + * autoconf.sh (task trace) [debug]: Instead of a long pipe, extend + trace.m4. + +2000-11-02 Akim Demaille + + * autoupdate.sh (m4.txt): Use `dumpdef' and m4 to build it. + +2000-11-02 Akim Demaille + + * m4sugar.m4 (popdef, pushdef): Rename as... + (m4_popdef, m4_pushdef): these. + Adjust dependencies. + * acgeneral.m4: Adjust. + * aclang.m4: Likewise. + * autoconf.m4 (popdef, pushdef): Reactivate them. + +2000-11-02 Akim Demaille + + * tests/atgeneral.m4 (AT_CHECK, AT_CLEANUP): Be more verbose when + `-v' is passed. + +2000-11-01 Pavel Roskin + + * autoconf.sh: Using trap-safe "exit". + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * tests/base.at: Use AS_EXIT instead of exit in configure.in. + * tests/m4sh.at: Likewise. + * tests/semantics.at: Likewise. + +2000-11-01 Akim Demaille + + In M4sugar, move `define', `undefine', and `defn' into the `m4_' + name space. + + * m4sugar.m4 (m4_define, m4_defn, m4_undefine): New macros. + (define, defn, undefine): Undefine. + Adjust all uses. + * m4sh.m4: Adjust. + * autoconf.m4: Reenable these builtins. + * m4sugar.m4 (m4_expansion_stack_dump): Use m4_copy. + +2000-11-01 Akim Demaille + + GNU M4 1.4 improperly handle the traces of copies of builtins. + + * autoconf.sh (task trace): When tracing `BUILTIN' also trace + `m4_BUILTIN'. + +2000-11-01 Akim Demaille + + Autoupdate should not depend upon foreign macros. + + * autoupdate.sh (ac.m4): Use `_au_define', not `define'. + (input.m4): Use `_au_BUILTIN' not `BUILTIN'. + +2000-11-01 Akim Demaille + + * m4sugar.m4 (m4_fatal): Dump the expansion stack. + * acgeneral.m4 (AC_FATAL): Use m4_fatal. + +2000-11-01 Akim Demaille + + Move the `defun' handling into M4sugar. + + * m4sugar.m4 (_m4_divert(GROW), _m4_expansion_stack_dump) + _m4_defun_pro, _m4_defun_epi, m4_defun, $1, m4_defun_once) + m4_before, _m4_require, m4_require, m4_expand_once, m4_provide) + m4_provide_ifelse): New macros. + * acgeneral.m4 (_AC_EXPANSION_STACK_DUMP, _AC_DEFUN_PRO) + _AC_DEFUN_EPI): Removed. + (AC_DEFUN, AC_DEFUN_ONCE, _AC_REQUIRE, AC_REQUIRE) + AC_PROVIDE_IFELSE, AC_FATAL): Reimplement atop M4sugar. + +2000-11-01 Raja R Harinath + + * tests/tools.at (autoupdating AC_LINK_FILES): Invoke autoconf + like in the rest of the tests. + +2000-11-01 Pavel Roskin + + * autoconf.sh: Typo: s/m4__warnings/m4_warnings/. + +2000-10-31 Pavel Roskin + + * autoupdate.sh: Check that $sed understands the meaning of "\b" + instead of checking "--version". + +2000-10-31 Akim Demaille + + Move the handling of classified warnings into M4sugar. + + * m4sugar.m4 (m4_diagnose): Remove. + (m4_warning): New. + * acgeneral.m4 (AC_WARNING_IFELSE, _AC_WARNING_IFELSE) + (_AC_WARNING_ERROR_IFELSE, __AC_WARNING_ERROR_IFELSE) + (_AC_DIAGNOSE, AC_DIAGNOSE): Rename as... + * m4sugar.m4 (m4_warning_ifelse, _m4_warning_ifelse) + (_m4_warning_error_ifelse, __m4_warning_error_ifelse) + (_m4_warn, m4_warn): these. + * acgeneral.m4 (AC_DIAGNOSE): Wrapper around `m4_warn'. + * autoconf.sh: Define `m4_warnings' instead of `_AC_WARNINGS'. + +2000-10-30 Pavel Roskin + + * acspecific.m4 (AC_PATH_XTRA): Use AC_LANG_PROGRAM() as the + argument to AC_LINK_IFELSE. + +2000-10-30 Pavel Roskin + + * m4sh.m4 (AS_EXIT): Use "false" for exit code 1, ":" for 0. + * acgeneral.m4 (AC_MSG_ERROR): Don't use m4_default for the + second argument - AS_EXIT takes care of it. + +2000-10-30 Akim Demaille + + * m4sugar.m4: Formatting changes. + +2000-10-30 Akim Demaille + + Move the handling of diversions into M4sugar. + + * acgeneral.m4 (_AC_DIVERT, AC_DIVERT, AC_DIVERT_PUSH) + (AC_DIVERT_POP): Move to... + * m4sugar.m4 (_m4_divert, m4_divert, m4_divert_push) + (m4_divert_pop): here. + * acgeneral.m4: Adjust to use only the M4sugar macros. + Nevertheless... + (AC_DIVERT_PUSH, AC_DIVERT_POP): New wrappers around the M4sugar + macros. + (_AC_DIVERT(...)): Rename all the diversions names as... + (_m4_divert(...)): these. + +2000-10-30 Pavel Roskin + + * m4sh.m4 (AS_EXIT): New macro that exits and makes sure that $? + is set correctly within the exit trap. + (AS_TMPDIR): Use it. + * acgeneral.m4 (AC_MSG_ERROR): Likewise, + +2000-10-29 Pavel Roskin + + * acgeneral.m4 (AC_CHECK_TOOL): Set VARIABLE also when using the + cache. From Jim Meyering. + (AC_PATH_TOOL): Likewise. + +2000-10-29 Pavel Roskin + + * tests/atgeneral.m4 (AT_CHECK): Warn if the expected exit status + is different from what we got. Don't preserve exit status other + than 77. + +2000-10-29 Pavel Roskin + + * autoconf.sh: When scanning for unexpanded macros match only + words beginning with "A?_" and "m4_" or containing "_A?_". + Strip the comments before the matching. Don't use character + ranges. + +2000-10-29 Pavel Roskin + + * acgeneral.m4 (_AC_INIT_PREPARE): Don't use a newline before + accessing $? - newlines in "trap" reset $? to 0 on FreeBSD 4.0. + +2000-10-29 Jim Meyering + + * acgeneral.m4 (AC_MSG_WARN): Now that this macro expands to + two stmts, enclose them in `{' ... `}'. + +2000-10-28 Pavel Roskin + + * aclang.m4 (AC_REQUIRE_CPP): Don't default to C++ - call AC_FATAL + for unsupported languages. + +2000-10-27 Pavel Roskin + + * acfunctions.m4 (AC_FUNC_MMAP): Remove conftestmmap from the + shell, not from the test program. + +2000-10-27 Pavel Roskin + + * doc/autoconf.texi (Limitations of Builtins): Recommend using + AC_MSG_ERROR instead of exit. + (Autoconf Language): Fix examples. + +2000-10-27 Pavel Roskin + + * tests/suite.at: Move "-*- Autoconf -*-" to the second line. + +2000-10-27 Akim Demaille + + Use AC_MSG_ERROR in the test suite, not just `exit'. + + * tests/README: New file. + * tests/semantics.at: Don't just `exit 1' or `exit 77' from + configure.in: call AC_MSG_ERROR. + * tests/base.m4: Likewise. + * tests/m4sh.at: Likewise. + * tests/semantics.at (AT_CHECK_PROGS_PREPARE): New macro, eved + out of... + (AC_CHECK_PROG & AC_PATH_PROG): here. + Split into two individual tests... + (AC_CHECK_PROG & AC_CHECK_PROGS, AC_PATH_PROG & AC_PATH_PROGS): these. + +2000-10-27 Pavel Roskin + + * autoconf.sh: Recognize short options followed by arguments + without separators. + * autoheader.sh: Likewise. + * autoreconf.sh: Likewise. Recognize abbreviations for + "--autoconf-dir" and "--m4dir". + * autoupdate.sh: Likewise. Recognize abbreviations for + "--autoconf-dir". + +2000-10-26 Pavel Roskin + + * autoconf.sh: Don't show obsolete options on "--help". Report + obsolete options to stderr. Adjust list of options. Correct + processing of options. Process options with values separated by + "=" first, so that abbreviations work. Don't accept "=" with + short options. + * autoheader.sh: Likewise. + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * ifnames.sh: There is no "--verbose" option. + * doc/autoconf.texi: Option "-A" requires an argument. + (autoreconf Invocation): Document "--install", "--symlink", + "--m4dir" and the options passed to Automake. + +2000-10-26 Akim Demaille + + * shell.m4: Rename as... + * m4sh.m4: this. + * tests/m4sugar.m4, tests/shell.m4, tests/torture.m4: Rename as... + * tests/m4sugar.at, tests/m4sh.at, tests/torture.at: these. + * tests/semantics.m4, tests/base.m4, tests/suite.m4: Rename as... + * tests/semantics.at, tests/base.at, tests/suite.at: these. + * tests/tools.m4, tests/update.m4, tests/syntax.m4: Rename as... + * tests/tools.at, tests/update.at, tests/syntax.at: these. + * tests/mktests.sh: Adjust the output file names. + +2000-10-25 Pavel Roskin + + * autoupdate.sh: Redirect stdin for sed to /dev/null to avoid + hangs with non-GNU versions of sed. + +2000-10-25 Akim Demaille + + Move the Autoconf independent shell macros into the file + `shell.m4' and the name space `AS_*'. + + * acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET) + (AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to... + * shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P) + (AS_DIRNAME): here, a new file. + Adjust all dependencies. + + * tests/base.m4 (m4_wrap): Eve out into... + * tests/shell.m4: here, new file. + * tests/base.m4 (AC_SHELL_MKDIR_P) + (AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into... + * tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED): + here, new file. + Adjust the test suite. + +2000-10-25 Akim Demaille + + * acgeneral.m4 (AC_SHELL_DIRNAME): Split its code into... + (AC_SHELL_DIRNAME_EXPR, AC_SHELL_DIRNAME_SED): these new macros. + * tests/base.m4 (AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): New + test. + +2000-10-25 Pavel Roskin + + * tests/aclocal.m4 (AC_ENV_SAVE): Rename to ... + (AC_STATE_SAVE): ... this. Save the list of all files + in the current directory. + * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Compare lists of + files created by AC_ENV_SAVE. Remove state* before and after + the test. + +2000-10-25 Pavel Roskin + + * Makefile.am: Add acversion.m4.in to EXTRA_DIST. + +2000-10-25 Akim Demaille + + * acgeneral.m4 (AC_SHELL_DIRNAME): The sed fall back was producing + twice the output for it was not using `-n' and used `p'. Remove + the latter. + +2000-10-25 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PREPARE_FDS): Give some information on + the host in config.log. + +2000-10-24 Pavel Roskin + + * tests/mktests.sh: Set locale to C to make sure that syntax.m4 + and update.m4 are locale-independent. + +2000-10-24 Pavel Roskin + + * acgeneral.m4 (_AC_CACHE_DUMP): Add a missing separator for sed + commands. + +2000-10-24 Akim Demaille + + * acgeneral.m4 (AT_FILE_DEPENDENCY): Rename as... + (AC_FILE_DEPENDENCY_TRACE): this. + +2000-10-24 Lars J. Aas + + * m4sugar.m4: (m4_tolower, m4_toupper): New macros. + * acgeneral.m4 (AC_PREFIX_PROGRAM): Use m4_toupper(). + * aclang.m4 (AC_F77_FUNC): Use m4_toupper()/m4_tolower(). + +2000-10-24 Pavel Roskin + + * m4sugar.m4 (m4_quote): Comment change. + +2000-10-24 Akim Demaille + + Start avoiding dependence upon character ranges. + + * acgeneral.m4 (_AC_INIT_DEFAULTS): Introduce `ac_cr_AZ', + `ac_cr_az', `ac_cr_09', `ac_cr_alnum' and `ac_hostname'. + Spread their use. + +2000-10-24 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT): Don't play with `trap'. + (_AC_INIT_PREPARE): Trap after having created config.log. + Also trap on 0. + When trapped, report why in config.log. + (AC_MSG_WARN, AC_MSG_ERROR): Also output the message in + config.log. + +2000-10-24 Akim Demaille + + * acgeneral.m4 (_AC_SHELL_DIRNAME): Rename as... + (AC_SHELL_DIRNAME): this. + s/X$1/X[]$1/ so that when $1 is a macro, it's given a chance to be + expanded. + (AC_PREFIX_PROGRAM): Use AC_SHELL_DIRNAME. + Quote properly. + +2000-10-24 Akim Demaille + + * tests/tools.m4 (Syntax of the scripts): Specify the path to the + tested program, some shells don't honor the PATH with `sh PROG'. + +2000-10-23 Akim Demaille + + Since GNU M4 now comes with its libm4 (binary), to avoid + ambiguities let's rename `libm4' (M4 code) as `m4sugar': + + Readability And Greater Understanding Stands 4 M4sugar + + name coined by Lars J. Aas. + + * libm4.m4: Rename as... + * m4sugar.m4: this. + All dependencies adjusted. + +2000-10-23 Akim Demaille + + * tests/mktests.sh (update_exclude_list, syntax_exclude_list): Add + `AC_PREREQ'. + * tests/tools.m4: Globally, don't use `../' to invoke the tested + tools, since the PATH is properly set, and in most cases it + obfuscates the test code. + (autoupdating AC_PREREQ): New tests. + +2000-10-23 Akim Demaille + + In order to check that all the CPP symbols which are AC_DEFINE'd + are properly templated, autoheader traces + AC_DEFINE/AC_DEFINE_UNQUOTED. Only literals can be traced, and + actually tracing non literals produces invalid autoheader input. + Hence, provide a means to trace calls to + AC_DEFINE/AC_DEFINE_UNQUOTED with literals. + + * acgeneral.m4 (AC_DEFINE_TRACE, AC_DEFINE_TRACE_LITERAL): New + macros. + (AC_DEFINE, AC_DEFINE_UNQUOTED): Use AC_DEFINE_TRACE. + * autoheader.sh: Trace AC_DEFINE_TRACE_LITERAL, not + AC_DEFINE/AC_DEFINE_UNQUOTED. + +2000-10-23 Akim Demaille + + Let autoupdate change AC_PREREQ to require the current version of + Autoconf. + + * acgeneral.m4 (_AC_VERSION_UNLETTER, _AC_VERSION_COMPARE): Move + to... + * libm4.m4 (m4_version_unletter, m4_version_compare): here. + Adjust dependencies. + * acgeneral.m4 (AU::AC_PREREQ): New macro. + * autoupdate.sh: Fail when `m4 input.m4' fails. + +2000-10-21 Pavel Roskin + + * acfunctions.m4 (AC_FUNC_CHOWN): Remove temporary files on exit. + (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise. + (AC_FUNC_SELECT_ARGTYPES): Likewise. + (AC_FUNC_UTIME_NULL): Likewise. + * acgeneral.m4 (_AC_COMPUTE_INT): Likewise. + * aclang.m4 (_AC_F77_NAME_MANGLING): Likewise. + * acspecific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): Likewise. + +2000-10-20 Pavel Roskin + + * tests/tools.m4 (autoupdating AC_LINK FILES): Clean up "src1" + and "src2" at the end of the test. + +2000-10-19 Pavel Roskin + + * NEWS: Documented changes in AC_PROG_CPP and AC_TRY_CPP. + * doc/autoconf.texi (Compilers and Preprocessors): Likewise. + * acgeneral.m4 (AC_TRY_CPP): Comment changes. + +2000-10-19 Pavel Roskin + + * doc/autoconf.texi (Shellology): Documented quirks in ash-0.2. + +2000-10-18 Pavel Roskin + + * mdate-sh: Removed, its copy remains in the doc/ directory. + +2000-10-18 Akim Demaille + + * acgeneral.m4 (AC_CHECK_TOOLS): Use `$' when reading a variable. + +2000-10-18 Morten Eriksen + + * aclang.m4 (_AC_PROG_CC_G): Use the _AC_COMPILE_IFELSE macro + instead of reinventing the wheel. This also takes care of a bug + where the "-g" option was accepted if the compiler silently exits + with status unequal to 0. + (_AC_PROG_CXX_G): Likewise. + (AC_PROG_CC): As _AC_PROG_CC_G depends on $ac_objext and + $ac_exeext, move the expansion of _AC_OBJEXT and _AC_EXEEXT in + front of _AC_PROG_CC_G. + (AC_PROG_CXX, AC_PROG_F77): Likewise. + +2000-10-18 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT): Avoid foo="`bar`", foo=`bar` is + enough. + Use grep to check the presence of a string in a stream. + * m4/atconfig.m4: Quote. + +2000-10-18 Akim Demaille + + * acgeneral.m4 (_AC_SHELL_DIRNAME): Quote the `sed' fall back. + +2000-10-18 Akim Demaille + + * acspecific.m4 (AC_PROG_LN_S): If neither `ln -s' nor `ln' work, + fall back to `cp'. + +2000-10-17 Morten Eriksen + + * acgeneral.m4 (AC_CHECK_TOOL): As AC_CHECK_PROG first tests the + value of the VARIABLE argument when looking for executables, we + need to set it to the correct value from AC_CHECK_TOOL when not + just passing on the incoming VARIABLE directly. + (AC_CHECK_TOOLS, AC_PATH_TOOL): Likewise. + +2000-10-17 Assar Westerlund + + * acgeneral.m4 (_AC_INIT_PREPARE): Move the + _AC_INIT_PREPARE_ENVIRONMENT invocation to... + (_AC_INIT_DEFAULTS): here, so that we keep the same known + environment for more of the script. + +2000-10-17 Akim Demaille + + * doc/autoconf.texi (The GNU build system): Sketch of new a + chapter. + +2000-10-17 Akim Demaille + + Somehow, the adjustment of `mktests.sh' claimed on 2000-10-17 by + myself (`Fix autoupdate...') was not applied. + + * tests/mktests.sh (update_exclude_egrep): Add AC_INIT, AC_OUTPUT, + AC_LINK_IFELSE. + +2000-10-17 Akim Demaille + + * acgeneral.m4 (AC_CHECK_PROG, AC_CHECK_PROGS, AC_PATH_PROG) + (AC_PATH_PROGS, AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Fix + the quotation. + (AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Check with the + $ac_tool_prefix iff it is not empty. + +2000-10-17 Akim Demaille + + * doc/autoconf.texi (Particular Programs): Some notes on the + portability of Flex. + +2000-10-17 Akim Demaille + + * acgeneral.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE) + (_AC_RUN_IFELSE): Before compiling, remove the files expected to + be produced. + (_AC_LINK_IFELSE, _AC_RUN_IFELSE): You don't create object files, + so don't remove them. + +2000-10-17 Akim Demaille + + * acgeneral.m4 (AC_FATAL): Use _AC_EXPANSION_STACK_DUMP. + (_AC_REQUIRE): Use AC_FATAL. + +2000-10-17 Akim Demaille + + Give a means to report where the macros have been defined in error + messages. + + * libm4.m4 (m4_location): New macro. + (m4_errprint): Rename as... + (m4_diagnose): this. Use m4_location. + Adjust dependencies. + (m4_errprint): New macro, similar to `errprint' but for an + additional trailing `\n'. + * acgeneral.m4 (AC_DEFUN, AC_DEFUN_ONCE): Define `m4_location($1)' + to the current location (i.e., that of the definition of $1). + (_AC_DEFUN_PRO, _AC_REQUIRE): Also push the location of the + current macro in the stack. + (_AC_EXPANSION_STACK_DUMP): Adjust. + +2000-10-17 Akim Demaille + + Fix autoupdate: updating `AC_OUTPUT_COMMANDS' was failing because + it includes another AU defined macro. + + * autoupdate.sh (input.m4:_au_defun): New macro. + (au.m4): Use it instead of inlining _au_enable/_au_disable + invocations in the definition of all these macros. + (input.m4:__au_enable, input.m4:__au_disable): New macros. + (input.m4:_au_enable, input.m4:_au_disable): Use them. + * tests/mktests.sh (update_exclude_list): Add `AC_OUTPUT'. + Running it twice in a configure.in is not valid. + Add `AC_LINK_FILES' since it requires arguments. + * tests/tools.m4 (autoupdating AC_LINK_FILES): New test. + +2000-10-17 Raja R Harinath + + * Makefile.am (MAINTAINERCLEANFILES): Add acversion.m4. + (INSTALL.txt): Put into $(srcdir). + (acversion.m4): Build here ... + * configure.in (AC_OUTPUT): Not here. + + * tests/Makefile.am (MACRO_FILES): Don't use $(top_srcdir). + (syntax.m4): Create in $(srcdir). + (update.m4): Likewise. + * tests/atspecific.m4 (AT_CHECK_UPDATE): Look for autoconf + macros in the top source directory. + +2000-10-16 Akim Demaille + + * aclang.m4 (_AC_LANG_COMPILER_GNU): New macro, which unifies... + (_AC_PROG_F77_GNU, _AC_PROG_CC_GNU, _AC_PROG_CXX_GNU): Remove. + Adjust dependencies. + (ac_cv_prog_gcc, ac_cv_prog_gxx, ac_cv_prog_g77): AU_ALIAS'ed. + +2000-10-16 Akim Demaille + + * acgeneral.m4: Adjust copyright notice. + * acspecific.m4: Likewise. + * acoldnames.m4: Likewise. + * acversion.m4.in: Likewise. + * autoconf.sh: Likewise. + * autoheader.sh: Likewise. + * autoreconf.sh: Likewise. + * autoscan.pl: Likewise. + * autoupdate.sh: Likewise. + * ifnames.sh: Likewise. + +2000-10-16 Pavel Roskin + + * tests/aclocal.m4: Don't consider variables @, '*', '?' and + '#' in the output of `set' - they are modified by zsh. + +2000-10-14 Pavel Roskin + + * m4/missing.m4 (AM_MISSING_PROG): Use $SHELL to run "missing". + * configure.in: Don't add $SHELL to the path of help2man - + it is already added by AM_MISSING_PROG. + +2000-10-13 Akim Demaille + + * tests/mktests.sh: If ever it fails, touch the output files + ``a` la missing''. + +2000-10-13 Akim Demaille + + * acgeneral.m4 (AC_LINKER_OPTION): Ahem, err, use `$' when + consulting a variable... + +2000-10-13 Akim Demaille + + * acgeneral.m4: Typos in comments spotted by Pavel. + +2000-10-12 Pavel Roskin + + * acspecific.m4 (AC_PROG_LEX): Don't assume that lex exists. + Don't run _AC_DECL_YYTEXT if it doesn't. Always check libl and + libfl regardless of the $LEX value. + +2000-10-12 Morten Eriksen + + * acgeneral.m4 (AC_CONFIG_SUBDIRS): Fixed nasty typo. + +2000-10-12 Akim Demaille + + * tests/mktests.sh: Backslash the quote in the heredocs to help + syntax highlighting tools. + * tests/atspecific.m4 (AT_CHECK_UPDATE): Give a better AT_SETUP + title. + +2000-10-12 Akim Demaille + + * acgeneral.m4 (_AC_SH_QUOTE): Issue an `obsolete' warning for use + of backquotes, instead of a `syntax' warning. + +2000-10-12 Akim Demaille + + * acgeneral.m4 (AC_VAR_IN_INDIR, AC_VAR_IF_SET): Rename as... + (AC_VAR_INDIR_IFELSE, AC_VAR_SET_IFELSE): this. + +2000-10-12 Akim Demaille + + * tests/mktests.sh: Remove tmp files. + +2000-10-12 Akim Demaille + + Macros used by AC_LANG_COMPILER macros shall not AC_REQUIRE + AC_LANG_COMPILER by the way of AC_COMPILE_IFELSE etc. + + * acspecific.m4 (_AC_EXEEXT): Use _AC_LINK_IFELSE, not + AC_LINK_IFELSE to avoid AC_REQUIREing AC_PROG_CC which precisely + requires _AC_EXEEXT. + Don't run _AC_CYGWIN, _AC_MINGW32, _AC_EMXOS2. + * aclang.m4 (_AC_PROG_F77_G): Use _AC_COMPILE_IFELSE, not + AC_COMPILE_IFELSE. + (_AC_LANG_COMPILER_WORKS): Use _AC_LINK_IFELSE, not + AC_LINK_IFELSE. + +2000-10-12 Akim Demaille + + Diagnose AC_REQUIRE circular dependencies. + + * acgeneral.m4 (_AC_DEFUN_PRO, _AC_DEFUN_EPI): Keep a stack of + macro expansions, _AC_EXPANSION_STACK. + Use `_AC_EXPANDING(FOO)' to record the fact that `FOO' is being + expanded. + (_AC_REQUIRE): Diagnose required macros which are already being + expanded. + Record in _AC_EXPANSION_STACK the AC_REQUIRE calls. + (_AC_EXPANSION_STACK_DUMP): New macro. + +2000-10-12 Akim Demaille + + * libm4.m4 (m4_dumpdefs, _m4_dumpdefs_up, _m4_dumpdefs_down): New + macros. + +2000-10-11 Pavel Roskin + + * tests/atgeneral.m4 (AT_CHECK): Make sure that $? is set to 0 + if diffs have succeeded. + +2000-10-11 Akim Demaille + + * acgeneral.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE) + (_AC_RUN_IFELSE): New macros which are the former + AC_COMPILE_IFELSE etc. without AC_LANG_COMPILER_REQUIRE. + (AC_COMPILE_IFELSE, AC_LINK_IFELSE, AC_RUN_IFELSE): Use them. + +2000-10-11 Morten Eriksen + + * acgeneral.m4 (AC_RUN_IFELSE): Add missing executable suffix. + * aclang.m4 (_AC_LANG_COMPILER_WORKS): Likewise. + * aclang.m4 (AC_PROG_CC_C_O, AC_PROG_F77_C_O): Fix typos where + $objext were used instead of $ac_objext. + +2000-10-05 Akim Demaille + + Check that updated scripts are valid scripts. + + * tests/mktests.sh: Generate `syntax.m4' directly. + * tests/macros.m4: Remove. + Adjust dependencies. + * tests/mktests.sh: Generate `update.m4' too. + * tests/update.m4: New generated file. + Adjust dependencies. + * tests/atspecific.m4 (AT_CHECK_UPDATE): New macro. + +2000-10-05 Akim Demaille + + * tests/mktests.sh: New file, which replaces the code inlined in + Makefile.am. + * src/Makefile.am (macros.m4): Use `mktests.sh'. + * tests/suite.m4: Reorder from low level to high level. + +2000-10-02 Akim Demaille + + * aclang.m4 (_AC_LANG_ABBREV, _AC_LANG_ABBREV(C)) + (_AC_LANG_ABBREV(C++), _AC_LANG_ABBREV(Fortran 77): New macros. + (AC_LANG_(C), AC_LANG_(C++), AC_LANG_(Fortran 77)): Don't define + AC_LANG_ABBREV. + (_AC_PROG_PREPROC_WORKS): Adjust. + * acgeneral.m4 (_AC_TRY_CPP): Likewise. + +2000-10-02 Pavel Roskin + + * acspecific.m4 (AC_PROG_LEX): Use AC_DEFUN_ONCE. + (AC_DECL_YYTEXT): Don't use AC_REQUIRE because autoupdate + would place it into configure.in but it's not allowed + outside AC_DEFUN. + +2000-10-02 Pavel Roskin + + * tests/Makefile.am: Macros defined by AC_DEFUN_ONCE should + go to macros.m4 for testing. + +2000-09-28 Pavel Roskin + + * acgeneral.m4 (AC_SHELL_UNSET): Don't rely on variable + assignments changing $?. + +2000-09-28 Pavel Roskin + + * acgeneral.m4 (_AC_OUTPUT_FILES): Fixed exit status. + (_AC_OUTPUT_HEADERS): Exit if the header template is missing. + +2000-09-28 Pavel Roskin + + * acfunctions.m4: Formatting fixes. + * acgeneral.m4: Likewise. + * aclang.m4: Likewise. + * acspecific.m4: Likewise. + * libm4.m4: Likewise. + +2000-09-27 Pavel Roskin + + * acgeneral.m4 (AC_CHECK_PROG): Added protection against spaces + in $PATH. + * acspecific.m4 (AC_PROG_INSTALL): Likewise. + +2000-09-27 Pavel Roskin + + * acgeneral.m4 (AC_CHECK_LIB): only call AH_CHECK_LIB if + ACTION-IF-TRUE is not given. + (AH_CHECK_LIB): related comment changes. + +2000-09-27 Pavel Roskin + + * aclang.m4 (_AC_LANG_COMPILER_WORKS): Remove []dnl because it + resulted in invalid shell code. + +2000-09-27 Lars J. Aas + + * autoconf.sh: Report full macro name for missing macros. + +2000-09-27 J. David Anglin + + * autoheader.sh: Fix trap (EXIT) status. + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * autoconf.sh: Change `exit' to `{ (exit 1); exit; }' after m4 and + awk commands to ensure exit state is in a defined state. + +2000-09-25 Alexandre Oliva + + * tests/semantics.m4 (AC_PROG_CPP with warning): Simplified. + +2000-09-25 Pavel Roskin + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use + _AC_INIT_PREPARE_ENVIRONMENT to make the shell running + config.status sane and POSIX-compatible. + +2000-09-25 Pavel Roskin + + * autoheader.sh: Don't check status of variable assignments - + it's undefined in ash 0.2. + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * autoconf.sh: Likewise. Also eliminated command substitution + inside variable expansion - ash 0.2 coredumps on it. + +2000-09-21 Pavel Roskin + + * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Check stderr from + autoconf and autoheader. Expected warnings disabled by "-W none" + Preceding comment removed as no longer relevant. + * tests/semantics.m4 (AC_CHECK_PROG & AC_PATH_PROG): Check + stderr from autoconf. + (AC_PATH_PROG & AC_PATH_PROGS): Likewise. + (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Likewise. + * tests/tools.m4 (autoheader): Check that autoheader prints + a warning for missing templates. Check stderr from autoconf. + * tests/torture.m4 (config.status under extreme conditions): + Check stderr from autoconf and autoheader. + (command line interface): Check stderr from autoconf. + +2000-09-21 Pavel Roskin + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix usage info for + config.status - file arguments are optional. + +2000-09-21 Pavel Roskin + + * acgeneral.m4 (_AC_OUTPUT_FILES): Ensure that config.status + exits if any input file is missing. + * tests/semantics.m4 (missing templates): Test it. + +2000-09-21 Pavel Roskin + + * acgeneral.m4 (_AC_SHELL_TMPDIR): Don't check status of variable + assignment - it's undefined in ash 0.2. + +2000-09-21 Akim Demaille + + * src/atgeneral.m4 (AC_CHECK): Display stderr including when the + test failed because of stdout. + +2000-09-21 Akim Demaille + + * tests/atgeneral.m4: Formatting changes. + (AT_INIT): Let `at_stop_on_error' and `at_verbose' be `:'/`false' + variables instead of `'/`1'. + `at_check_stds' replaces `at_no_redirs'. + Rename `Snippet 3' as `Snippet 4'. + Introduce `Snippet 3' for variable initializations. + Adjust the dependencies. + (AT_CHECK): Don't show diff's result unless verbose. + +2000-09-20 Pavel Roskin + + * tests/Makefile.am: AC_PREFIX_PROGRAM and AC_F77_FUNC excluded + from testing because they require an argument. + * tests/atspecific.m4: Make sure that configure doesn't write + anything to stderr. + +2000-09-20 Pavel Roskin + + * acspecific.m4 (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Cache + variable wasn't always set inside AC_CACHE_CHECK. + (_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL): Likewise. + From Nicolas Joly. + +2000-09-20 Pavel Roskin + + * libm4.m4 (m4_ifvanl): Don't output a newline for empty + arguments. + +2000-09-19 Akim Demaille + + * tests/atspecific.m4 (AT_TEST_MACRO): Rename as... + (AT_CHECK_MACRO): this. All dependencies adjusted. + +2000-09-19 Akim Demaille + + * tests/aclocal.m4.new (AC_ENV_SAVE): Skip POW_LIB, used by + AC_FUNC_STRTOD. + From Bernard Dautrevaux. + +2000-09-19 Pavel Roskin + + * tests/atgeneral.m4 (AT_DATA): Use _ATEOF instead of EOF. + +2000-09-19 Pavel Roskin + + * tests/semantics.m4 (AC_PROG_CPP with warnings): Minor + simplification. + +2000-09-19 Akim Demaille + + * autoconf.sh (optarg): More robust expr invocation. + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * autoheader.sh: Likewise. + Reported by Bernard Dautrevaux. + +2000-09-19 Pavel Roskin + + * acgeneral.m4 (AU_ALIAS): Do not use `defn' since then autoupdate + would replace an old macro call with the new macro body instead of + the new macro call. + * tests/tools.m4 (autoupdate): Test an AU_ALIAS'd macro update. + +2000-09-19 Pavel Roskin + + * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): New macro. + (AT_TEST_MACRO): Use it. + * tests/semantics.m4 (AC_PROG_CPP with warnings, AC_PROG_CPP + without warnings): New tests. + +2000-09-18 Ruediger Kuhlmann + + * acgeneral.m4 (_AC_OUTPUT_SUBDIRS): Check for configure.gnu + as well. + (_AC_INIT_HELP): Likewise. + (NEWS): Note checking for configure.gnu. + * doc/autoconf.texi: Document checking for configure.gnu when + recursing subdirectories. + +2000-09-18 Jim Meyering + + * acfunctions.m4 (AC_FUNC_GETLOADAVG): Restore the initial value + of LIBS. Otherwise, everyone ends up linking with -lelf for some + configurations. + Reported by Mike Stone. + +2000-09-14 Pavel Roskin + + * aclang.m4 (AC_PROG_CPP): Use double quotes in the for loop + and eliminate ac_tmp_cpp. + (AC_PROG_CXXCPP): Use double quotes in the for loop and + eliminate ac_tmp_cxxcpp. + +2000-09-14 Pavel Roskin + + * acgeneral.m4 (_AC_TRY_CPP): Don't filter out conftest.$ac_ext + from the output - it is only printed by Visual C that gives + correct exit status. + * aclang.m4 (AC_PROG_CPP): Don't try '${CC-cc} -nologo -E' + by the same reason. + +2000-09-12 Pavel Roskin + + * aclocal.m4 (_AC_PROG_CPP_WORKS): Don't use AC_REQUIRE_CPP - + it's useless here. Rename to ... + (_AC_PROG_PREPROC_WORKS): ... this. + +2000-09-12 Ruediger Kuhlmann + + * acspecific.m4 (AC_PROG_INSTALL): Exclude c:install on AmigaOS. + +2000-09-12 Akim Demaille + + The test suite fails on some hosts because for instance + AC_INIT + AC_CHECK_FUNC(exit) + will not look for a compiler, it will just use `cc'. + Macros that need a compiler should require one. + + * acgeneral.m4 (_AC_REQUIRE): New macro, which is actually the + previous version of AC_REQUIRE plus the possibility to distinguish + the name of the symbol being AC_PROVIDE'd, and the text to expand. + (AC_REQUIRE): Reimplement in terms of _AC_REQUIRE. + * aclang.m4 (AC_LANG_COMPILER, AC_LANG_COMPILER_REQUIRE) + (AC_LANG_COMPILER(C), AC_LANG_COMPILER(C++)) + (AC_LANG_COMPILER(Fortran 77)): + New macros. + * acgeneral.m4 (AC_COMPILE_IFELSE, AC_LINK_IFELSE, AC_RUN_IFELSE): + Require a compiler. + (AC_TRY_RUN): Formatting changes. + * acfunctions.m4 (AC_FUNC_SETPGRP): Quote properly. The previous + changes revealed the weaknesses of this macro. + +2000-09-12 Pavel Roskin + + * acgeneral.m4 (_AC_TRY_CPP): New macro. It runs the preprocessor + and checks whether it produces errors or warnings. Don't put grep + output into a variable, use another grep instead. + (AC_TRY_CPP): Use _AC_TRY_CPP. Copy conftest.err to config.log + if the case of an error. + * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): + define AC_LANG_ABBREV to the short language name. + (_AC_PROG_CPP_WORKS): New macro. It checks whether the current + preprocessor can be used to check for existence of headers. + Most code taken from ... + (AC_PROG_CPP): ... here. Use _AC_PROG_CPP_WORKS. Use shell + "for" to find working CPP. Use AC_LANG_PUSH(C) and AC_LANG_POP - + it's a macro for C only. + (AC_PROG_CXXCPP): Rewritten using _AC_PROG_CPP_WORKS. + +2000-09-12 Akim Demaille + + * autoupdate.sh (sed): Look for GNU sed. + (usage): Ask for GNU sed. + +2000-09-12 Pavel Roskin + + * acgeneral.m4 (AC_EGREP_CPP): Use additional quotes instead of + changequote. + +2000-09-12 Ruediger Kuhlmann + + * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WIDTH): Add trailing + semicolon to final fi. + +2000-09-11 Pavel Roskin + + * acgeneral.m4 (_AC_WARNING_ERROR_IFELSE) + (__AC_WARNING_ERROR_IFELSE): New macros for checking whether + warnings should be considered errors. + (_AC_DIAGNOSE): Use _AC_WARNING_ERROR_IFELSE. + +2000-09-11 Pavel Roskin + + * autoconf.sh: Properly report names of unexpanded macros that + begin with an underscore. + +2000-09-11 Pavel Roskin + + * doc/autoconf.texi (Preset Output Variables): Correctly specify + what languages are affected by CPPFLAGS, LDFLAGS and LIBS. + Extended description of LDFLAGS and LIBS. + (Compilers and Preprocessors, C Compiler Characteristics): + Recommend Automake as the source of ansi2knr. + (Autoconf Language, Quotation and Nested Macros): English fixes. + (Quotation and Nested Macros): Unclear example replaced with + an explanation of when m4 expands quotes. Added explanation why + unquoted calls are dangerous. + +2000-09-08 Pavel Roskin + + * doc/autoconf.texi: Always use one space before the opening + parenthesis in @defmac. + +2000-09-06 Morten Eriksen + + * acspecific.m4 (_AC_OBJEXT): No longer use AC_COMPILE_IFELSE, + which uses $ac_objext hence depends upon _AC_OBJEXT. + * aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call + _AC_OBJEXT before _AC_EXEEXT since the latter needs $ac_objext. + +2000-09-06 Bernard Dautrevaux + + * acspecific.m4 (_AC_EXEEXT): Set extension to void if linking + creates both an unsuffixed file and suffixed ones. + +2000-09-06 Peter Eisentraut + + * autoconf.texi: English and typo fixes. + +2000-09-05 Pavel Roskin + + * autoconf.sh: Consider undefined macros as errors. + * tests/base.m4 (unexpanded macros): Expect error, not warning. + +2000-09-05 Dave Love + + * aclang.m4 (_AC_PROG_F77_GNU): Run command from standard input so + that we can get some standard output. + +2000-09-04 Peter Eisentraut + + * autoscan.pl: Repair broken Getopt::Long use. + +2000-09-04 Akim Demaille + + * configure.in: Bump version to 2.49b. + * Makefile.am (bin_SCRIPTS): Depend upon configure.in. + +2000-08-11 Akim Demaille + + Version 2.49a. + +2000-08-11 Akim Demaille + + * aclang.m4 (AC_NO_EXECUTABLES): New macro. + +2000-08-11 Akim Demaille + + * tests/base.m4 (AC_SHELL_MKDIR_P): Remove `a' too. + +2000-08-11 Akim Demaille + + * configure.in: Bump version to 2.49a. + +2000-08-11 J. David Anglin + + * autoconf.sh: Change `exit N' to `(exit N); exit' to provide + the correct exit status when an exit trap is taken. + +2000-08-11 Akim Demaille + + * acfunctions.m4 (AM_FUNC_ERROR_AT_LINE, AM_FUNC_FNMATCH, + AM_FUNC_MKTIME, AM_FUNC_OBSTACK, AM_FUNC_STRTOD): Deactivate + their AU_ALIAS definition: Automake 1.4 does not quote the name of + these macros, hence when Autoconf reads Automake's definition the + name is expanded with unpredictable results. + +2000-08-09 Akim Demaille + + * autoreconf.sh (Installing Autoconf extensions files): Remove. + +2000-08-09 Akim Demaille + + * autoconf.sh (finalize.awk): Don't leave spaces before the user + function calls. + Reported by John David Anglin. + * doc/autoconf.texi (Limitations of Usual Tools): Start the AWK + section. + * tests/tools.m4 (AWK portability): New test. + +2000-08-08 Pavel Roskin + + * Makefile.am: Substitute @bindir@ in shell scripts, needed by + autoheader. + +2000-08-07 Akim Demaille + + * acfunctions.m4 (_AC_LIBOBJ_ALLOCA, AC_REPLACE_FUNCS): Simplify + ${foo} into $foo. + * aclang.m4 (AC_LANG(C), AC_LANG(C++)): Move some internal + comments into the header comment. + * acgeneral.m4 (AC_TRY_CPP): Likewise. + +2000-08-07 Akim Demaille + + * tests/tools.m4 (undefined macros): New test. + +2000-08-07 Akim Demaille + + * autoconf.sh (finalize.awk): New subtool, eved from the previous + literal AWK program that performed the `oline' and quadrigraphs + substitution. + Fix its `oline' computation which was dead wrong when there are + empty lines (i.e., always). + Enhance it in order to look for and report unexpanded macro. + Don't let it pretend there are bugs in Autoconf (c:, the test + suite makes this scenario pretty unlikely as opposed to an actual + user bug. + Catch `m4_' too. + Remove the shell snippet which used to do this. + +2000-08-07 Akim Demaille + + * acgeneral.m4 (AC_MSG_NOTICE): New macro, suggested by Pavel + Roskin. + (AC_MSG_ERROR): Use it. + +2000-08-04 Ruediger Kuhlmann + + * acspecific.m4 (AC_PROG_RANLIB): Use AC_CHECK_TOOL. + * doc/autoconf.texi (Limitations of Usual Tools): Typos. + +2000-08-04 Akim Demaille + + Solaris' /usr/ucb/expr, and SunOS' /usr/bin/expr fail with the `:' + operator when \(\) is used, and matches a string longer than 120 + characters. + Reported by Geoff Keating. + + * doc/autoconf.texi (Limitations of Usual Tools): Some words about + this. + * acgeneral.m4 (_AC_SHELL_DIRNAME): Fall back to echo|sed if expr + fails. + From Paul Eggert. + +2000-08-04 Akim Demaille + + * acgeneral.m4: (AC_RUN_IFELSE, AC_LINK_IFELSE, AC_COMPILE_IFELSE): + Don't create the source file if none is given, and in this case, + don't remove it either. + +2000-08-04 Akim Demaille + + * libm4.m4 (m4_ifvanl): New macro. + * acgeneral.m4: Use it. + +2000-08-02 Akim Demaille + + Release Automake from being a substitute to Autoconf. + + * acspecific.m4 (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H, + _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL, AC_HEADER_TIOCGWINSZ, + AC_SYS_POSIX_TERMIOS): New macros from both Automake and the + fileutils. + +2000-08-02 Akim Demaille + + * aclang.m4 (_AC_PROG_CC_G, _AC_PROG_CXX_G): Recent changes + inverted the results. Fix that. + +2000-08-02 Akim Demaille + + * doc/autoconf.texi (Special Shell Variables): More emphasis on + the dangers of character ranges. + From Paul Eggert. + +2000-08-01 Akim Demaille + + * autoheader.sh (_ac_warnings): Be robust to LC_COLLATE. + `IFS=,; echo ,' will give a comma. Take this into account. + +2000-08-01 Akim Demaille + + * aclang.m4 (AC_PROG_CC): Also try to find $target_alias-cc. + +2000-08-01 Akim Demaille + + AC_VALIDATE_CACHED_SYSTEM_TUPLE no longer works properly since the + AC_CANONICAL_* revamping. + Reported by Peter Eisentraut. + In fact, let's just use the precious variables handling. + + * acgeneral.m4 (AC_VALIDATE_CACHED_SYSTEM_TUPLE): Obsoleted. + (_AC_ARG_VAR_PRECIOUS): New macro, eved from... + (AC_ARG_VAR): this macro. Adjust. + (_AC_INIT_PREPARE): `build_alias', `host_alias', and + `target_alias' are precious. + * doc/autoconf.texi: Adjust. + +2000-08-01 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): Neutralize also + LC_COLLATE and LC_NUMERIC. + * autoconf.m4: Don't rely on character ranges with tr. + * doc/autoconf.texi (Special Shell Variables): Adjust. + +2000-08-01 Akim Demaille + + * acfunctions.m4 (_AC_LIBOBJ_STRTOD, AC_FUNC_STRTOD, + AM_FUNC_STRTOD): New macros, from Automake. + * acfunctions: Adjust. + +2000-08-01 Akim Demaille + + * acidentifiers: Catch ptrdiff_t. + * acspecific.m4 (AM_TYPE_PTRDIFF_T): AU define. + +2000-08-01 Akim Demaille + + * autoscan.pl: Be ready to handle AC_CHECK_TYPES requests. + Quote properly the output. + Remove useless backslashes. + +2000-08-01 Akim Demaille + + * acfunctions.m4 (AC_FUNC_ONSTACK): New macro, from + Automake. + * doc/autoconf.texi (Particular Functions): Adjust. + +2000-08-01 Akim Demaille + + * acfunctions.m4 (AC_FUNC_ERROR_AT_LINE): New macro, from + Automake. + * doc/autoconf.texi (Particular Functions): Adjust. + +2000-08-01 Akim Demaille + + Create acfunctions.m4, in charge of the macros related to + functions. + + * acgeneral.m4 (AC_CHECK_FUNC, AC_CHECK_FUNCS, AC_REPLACE_FUNCS): + Move to... + * acfunctions.m4: here, new file. + * acspecific.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_ALLOCA, AC_FUNC_CHOWN, + AC_FUNC_CLOSEDIR_VOID, AC_FUNC_FNMATCH, AC_FUNC_GETGROUPS, + _AC_LIBOBJ_GETLOADAVG, AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT, + AC_FUNC_GETPGRP, AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, + AC_FUNC_MALLOC, AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_MMAP, + AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP, _AC_FUNC_STAT, + AC_FUNC_STAT, AC_FUNC_LSTAT, AC_FUNC_STRERROR_R, AC_FUNC_STRFTIME, + AC_FUNC_VFORK, AC_FUNC_VPRINTF, AC_FUNC_WAIT3, AC_FUNC_UTIME_NULL, + AC_FUNC_STRCOLL, AC_FUNC_SETVBUF_REVERSED): Likewise. + * Makefile.am: Adjust. + + Move also the old definitions into acfunctions.m4, and adjust the + test suite. + + * acgeneral.m4 (AU_ALIAS): New macro. + * acoldnames (AC_FUNC_CHECK, AC_HAVE_FUNCS, AC_ALLOCA, + AC_GETLOADAVG, AC_MMAP, AC_SETVBUF_REVERSED, AC_STRCOLL, + AC_UTIME_NULL, AC_VFORK, AC_VPRINTF, AC_WAIT3, AM_FUNC_FNMATCH, + AM_FUNC_MKTIME, fp_FUNC_FNMATCH): Move to... + * acfunctions.m4: here, using AU_ALIAS. + * acgeneral.m4 (AC_FD_CC, AC_CANONICAL_SYSTEM): Use AU_ALIAS to + define them. + * acoldnames.m4: Use AU_ALIAS instead of AU_DEFUN. + * tests/Makefile.am (MACRO_FILES): Adjust. + +2000-08-01 Akim Demaille + + * autoscan.pl: Use Getopt::Long; + * acidentifiers: Classify, sort. + +2000-08-01 Akim Demaille + + * aclang.m4 (_AC_PROG_CXX_GNU, _AC_PROG_CC_GNU, _AC_PROG_F77_GNU): + Use grep instead of egrep, don't redirect stderr. + +2000-08-01 Akim Demaille + + * acgeneral.m4 (_AC_INIT_NOTICE): Adjust so that there are no + empty lines in the header comments (should be `#' alone instead). + Reported by Didier Verna. + +2000-08-01 Greg A. Woods + + * doc/autoconf.texi (Installation Directory Variables): + Clarifications and typos. + +2000-08-01 Didier Verna + + * acgeneral.m4 (AC_REVISION): Put a dot at the end of the line. + (_AC_INIT_HELP): Output the bug report address at + the end of a `configure --help' output. + (_AC_INIT_NOTICE): Ditto, but at the top of `configure'. + +2000-07-31 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PREPARE_FDS): New macro, pulled out of + (_AC_INIT_PREPARE): here, where it is called from. + * aclang.m4 (_AC_PROG_CC_G, _AC_PROG_CXX_G): Don't test -z "`foo`". + +2000-07-31 Akim Demaille + + * acgeneral.m4 (_AC_DIVERT(INIT_PARSE_ARGS)): Rename as... + (_AC_DIVERT(PARSE_ARGS)): this. Adjust dependencies. + (AC_ARG_WITH): Remove spurious newline. + (AC_ARG_VAR): No longer save precious variables in + ac_configure_args, rather snapshot them twice (one kept + unmodified, another one to be written to/overwritten by the cache + file). + (AC_CACHE_SAVE): Let the cache variables named `ac_cv_env_*' + be overwritten when loading the cache (i.e., don't use the + : ${foo=...} trick). + (_AC_ARG_VAR_VALIDATE): Compare the two snapshots of the precious + variables. + (_AC_INIT_PREPARE): Call it after having loaded the cache file. + +2000-07-28 Akim Demaille + + * aclang.m4 (AC_LANG_CONFTEST, _AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, + _AC_PROG_F77_GNU): Use ac_ext. Use _ACEOF instead of ACEOF. + +2000-07-28 Akim Demaille + + * autoconf.sh (--warnings): Catch `no-category', not `nocategory'. + * autoheader.sh: Likewise. + * acgeneral.m4 (_AC_WARNING_IFELSE): Adjust. + +2000-07-28 Akim Demaille + + * doc/autoconf.texi (Installation Directory Variables): New + section, Eved off from `Preset Output Variables', i.e., was a + small part of it, grew independent, and is its equal (at least). + (Coding Style): `$#' padding. + * Makefile.am (editsh, editpl): Do what the doc says you do: use + @datadir\@ instead of @''datadir''@. + +2000-07-28 Akim Demaille + + * aclang.m4 (_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, + _AC_PROG_F77_GNU): Use ac_ext. Use ACEOF instead of EOF. + (AC_LANG_CONFTEST): New macro. + (_AC_PROG_CC_G, AC_PROG_CC_C_O, _AC_PROG_CXX_G, AC_PROG_F77_C_O, + _AC_PROG_F77_V_OUTPUT): Use it. + * acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP, AC_COMPILE_IFELSE, + AC_LINK_IFELSE, AC_RUN_IFELSE): Likewise. + +2000-07-24 Steven G. Johnson + + * aclang.m4 (AC_F77_FUNC): New macro to give the user a clean + way of accessing Fortran name-mangling information other than + through CPP, and without having to know the different possible + name-mangling schemes. + * autoconf.texi: Documented AC_F77_FUNC + +2000-07-24 Akim Demaille + + * acgeneral.m4 (_AC_CHECK_TYPE_BUILTIN_P): Add `off_t' and + `size_t' which are often used too. + Fix a bug which prevents recognition of `bool' and `char'. + (_AC_CHECK_TYPE_MAYBE_TYPE_P): New macro. + (AC_CHECK_TYPE): Use it. + +2000-07-19 Peter Eisentraut + + * Makefile.am: Remove INSTALL.txt by maintainer-clean target. + +2000-07-19 Akim Demaille + + * autoupdate.sh: Typo: s/infile/file/. + +2000-07-19 Martin Wilck + + * aclang.m4 (AC_F77_NAME_MANGLING): Obsolete, becomes + _AC_F77_NAME_MANGLING. + (_AC_F77_NAME_MANGLING): Use independent checks for the + name mangling of symbols with and without underscores. + Use algorithm with for loops instead of recursive macro calls. + (AC_F77_WRAPPERS): Adapt to changes in _AC_F77_NAME_MANGLING. + * doc/autoconf.texi (Fortran 77 Compiler Characteristics): + Remove documentation of AC_F77_NAME_MANGLING. + Remove documentation of f77_case and f77_underscore. + Replace AC_F77_FUNC_WRAPPER with AC_F77_WRAPPERS. + +2000-07-19 Akim Demaille + + * NEWS: Fresh air. + * TODO: Fresh blood. + +2000-07-19 Akim Demaille + + * doc/autoconf.texi (autoheader Invocation): Explain the purpose + of autoheader. + +2000-07-19 Akim Demaille + + * doc/autoconf.texi: Various English fixes from Jim. + +2000-07-19 Akim Demaille + + * doc/autoconf.texi (Compilers and Preprocessors, Obsolete + Macros): Don't give boring internal details. + (Language Choice): Typo. + (Limitations of Builtins): Some about `!', `set', `$@'. + (Coding Style): Some about $[@] quotation. + Some about cross-compilation. + +2000-07-19 Akim Demaille + + * autoreconf.sh (dir): When verbose, say what are the tools you + will use. + +2000-07-19 Akim Demaille + + Warnings related to obsolete constructs should be properly + classified. + + * acspecific.m4 (AC_RSH, AC_USG, AC_MEMORY_H, AC_DIR_HEADER, + AC_INT_16_BITS, AC_LONG_64_BITS, AC_STRUCT_ST_BLKSIZE, + AC_STRUCT_ST_RDEV, AC_HAVE_POUNDBANG, AC_ARG_ARRAY): Use + `AC_DIAGNOSE(obsolete, ...)' instead of `AC_WARNING'. + +2000-07-19 Akim Demaille + + autoconf -W error does not work. + + * acgeneral.m4 (_AC_DIAGNOSE): use _AC_WARNING_IFELSE, + _AC_WARNING_ENABLE is dead. + +2000-07-19 Akim Demaille + + Martin Wilck found a Fortran 77 compiler which always exits with + success. + + * acgeneral.m4 (AC_COMPILE_IFELSE): Also check that the output + file was created and is nonempty. + +2000-07-19 Akim Demaille + + * doc/autoconf.texi (Introduction): More about CVS, Gnats, the web + pages, and the mailing lists. + +2000-07-19 Akim Demaille + + * doc/autoconf.texi (Prerequisite Macros): Dedocument AC_PROVIDE. + (Coding Style): Move some into... + (Macro Definitions): here. + +2000-07-19 Akim Demaille + + The --help message should have paragraphs starting with a title, + the options, and then optionally a small paragraph. + + * acgeneral.m4 (AC_DIVERT_ONCE): New macro. + (HELP_VAR_END): New diversion. + (AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Use AC_DIVERT_ONCE. + (AC_ARG_VAR): Follow the --help style. + * acspecific.m4 (AC_PATH_X): Use AC_DIVERT_ONCE. + +2000-07-19 Akim Demaille + + * aclang.m4 (AC_PROG_CC): Don't require AC_PROG_F77, require + AC_PROG_CC instead. + From Martin Wilck. + (AC_PROG_F77_C_O): Require AC_PROG_F77. + Use a cache variable independent of $F77. + +2000-07-19 Akim Demaille + + * autoreconf.sh: Accept --symbolic and -s. + +2000-07-19 Akim Demaille + + Make it clear that the regular user does not need --macrodir. + In fact, rename this option as -A, --autoconf-dir. + + * autoconf.sh: Complain when -m, --macrodir is used. + Accept -A, --autoconf-dir. + Use $autoconf_dir instead of $AC_MACRODIR. + Adjust --help. + * autoheader.sh: Likewise. + * autoscan.sh: Likewise. + * autoupdate.sh: Likewise. + Use $optarg. + * autoreconf.sh: Likewise. + * doc/autoconf.texi: Adjust. + * tests: Adjust the test suite. + +2000-07-19 Akim Demaille + + * autoreconf.sh: Forward --debug to sub tools. + Let them share the same tmp dir. + +2000-07-18 Akim Demaille + + * acspecific.m4 (AC_MING32): Rename as AC_MINGW32. + +2000-07-18 Steven G. Johnson + + Fixed bug where the F77 compiler output was parsed differently + when detecting the verbose flag than when scanning for linker + options, and as a result the former test failed (under AIX/xlf). + + * aclang.m4 (_AC_PROG_F77_V_OUTPUT): New macro to get the + output of linking an F77 program with a given verbose flag, + and preprocess it as required to scan for linker flags. + (_AC_PROG_F77_V): Use the above macro here... + (AC_F77_LIBRARY_LDFLAGS): ...and here, enforcing consistency. + +2000-07-17 Martin Wilck + + * autoupdate.sh (autoconf): s,$updated,$tmp/updated,. + +2000-07-17 Akim Demaille + + * doc/autoconf.texi (Configuration Actions): Explain the + behavior of AC_CONFIG_HEADERS and AC_CONFIG_FILES with respect to + absolute and relative filenames, and stdin/stdout. + (config.status invocation): Likewise. + +2000-07-17 Akim Demaille + + * doc/autoconf.texi (Configuration Actions): Explain the + behavior of AC_CONFIG_HEADERS and AC_CONFIG_FILES with respect to + absolute and relative filenames, and stdin/stdout. + (config.status invocation): Likewise. + +2000-07-13 Akim Demaille + + Make it easier to trace what autoreconf does. + + * autoheader.sh: Be more verbose, and always report your name in + verbose messages. + * autoconf.sh: Likewise. + * autoreconf.sh: Likewise. + (update.sh): Redirect ls' stderr to /dev/null. + +2000-07-13 Akim Demaille + + * acgeneral.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS): Properly + handle absolute input file names. + From Alexandre Oliva. + +2000-07-12 Martin Wilck + + * aclang.m4 (AC_PROG_F77): Delete AC_BEFORE(AC_PROG_CPP) that + leads to unnecessary warnings if both C and Fortran are checked. + (AC_PROG_F77_C_O): AC_REQUIRE AC_PROG_F77 instead of pretend you + need to be AC_BEFORE it. + +2000-07-12 Akim Demaille + + * autoconf.sh (_ac_warnings): Fix call to tr. + Reported by Johan Danielsson. + +2000-07-11 Martin Wilck + + * aclang.m4 (_AC_PROG_F77_V): New macro to determine the flag that + causes the compiler to output verbose linking information. + (AC_F77_LIBRARY_LDFLAGS): Use _AC_PROG_F77_V instead of + simply "-v" + (AC_F77_LIBRARY_LDFLAGS): New algorithm to parse flags, uses + set/shift shell commands. + (AC_F77_LIBRARY_LDFLAGS): Set FLIBS at end, after determining + ac_cv_flibs. + +2000-07-11 Akim Demaille + + * acgeneral.m4 (_AC_INIT_DEFAULTS) : Set to 38 + instead of 48, to pass the test on RISC/OS 4.52. + +2000-07-11 Akim Demaille + + !*^&$@ sed portability problems... The test on AC_CHECK_TYPES is + failing on RISC/OS 4.52 because of the forget-to-reset-the-flag + bug in its sed. + + * acgeneral.m4 (_AC_OUTPUT_HEADERS): Work around this bug. + +2000-07-11 Akim Demaille + + * acspecific.m4 (AC_INT_16_BITS, AC_LONG_64_BITS): s/ac_check/ac_cv/. + +2000-07-10 Akim Demaille + + * acgeneral.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS): Look for + the input files first in $builddir, then $srcdir. + Suggested by Lars J. Aas, designed by Alexandre Oliva. + +2000-07-10 Lars J. Aas + + * acgeneral.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS): + Accept special filename '-' for stdin and stdout. + +2000-07-10 Akim Demaille + + Alexandre's suggestions. + + * autoreconf.sh (update.sh): Use `ls -1dt' instead of `-lt'. + Use test instead of sed. + : If automake is used, always run it: it has its own + mechanism not to update if unneeded. + +2000-07-10 Akim Demaille + + * acspecific.m4 (_AC_PROG_ECHO): Modernize. + +2000-07-10 Akim Demaille + + Stop being ridiculous :*( + + * acgeneral.m4 (_AC_SHELL_DIRNAME): When using m4 the argument + is named `$1' not `$dir'. + When using m4 you ought to quote properly. + When using m4, you should check that there are not too many shell + quotes (inside the macro itself, and where it is called). + When you do this, Autoconf, hm, works better. + +2000-07-10 Steven G. Johnson + + Improve --help documentation of important environment variables. + + * acgeneral.m4 (_AC_INIT_HELP): Direct reader to descriptions + of useful variables at the end of the --help. + (AC_ARG_VAR): Emphasize use of environment variables to override + and/or help the configure script. Ensure that a given variable + is only documented once in the --help. + (AC_CHECK_LIB): Call AC_ARG_VAR to document and register the + LDFLAGS variable, and... + (AC_CHECK_HEADER): do the same for the CPPFLAGS variable. + * aclang.m4 (AC_PROG_CC): Call AC_ARG_VAR to document and register + the CC and CFLAGS variables, and do the same for... + (AC_PROG_CXX): CXX and CXXFLAGS, and... + (AC_PROG_F77): F77 and FFLAGS. + +2000-07-10 Akim Demaille + + * Makefile.am (wget-update): New target. + (WGET): New variable. + +2000-07-10 Akim Demaille + + * doc/autoconf.texi (Coding Style): Some more constraints :). + +2000-07-10 Akim Demaille + + * acspecific.m4 (AC_FUNC_STRERROR_R): Aaaaaaarg! Don't leave the + AC_DEFINE inside the AC_CACHE_CHECK. + +2000-07-10 Akim Demaille + + * acspecific.m4 (_AC_FUNC_STAT, AC_FUNC_STAT, AC_FUNC_LSTAT): New + macros, from Jim's stat.m4 and lstat.m4 serial 6. + * doc/autoconf.texi (Particular Functions): Document + * acfunctions: Add them. + +2000-07-10 Akim Demaille + + AC_LIBOBJ when used by AC_REPLACE_FUNCS should not complain for + variables as argument. + + * acgeneral.m4 (_AC_LIBOBJ): Same as the former AC_LIBOBJ, but + takes an additional argument: action to perform when non-literal + argument. + (AC_LIBOBJ): Use it. + (AC_REPLACE_FUNCS): Use _AC_LIBOBJ, not AC_LIBOBJ. + +2000-07-10 Akim Demaille + + LANGUAGE should be neutralized too. + + * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): Do it. + * doc/autoconf.texi (Special Shell Variables): Mention it. + +2000-07-10 Akim Demaille + + Set autoconf's default warnings to `syntax'. + + In fact, honor the most recent specification in the concatenation + of `syntax',$WARNINGS, in that order. + Implement support for `none' and `noCATEGORY' so that the options + may override the previous choices. + Suggested by Didier Verna. + + * acgeneral.m4 (_AC_WARNING_IFELSE): New macro. + (AC_WARNING_IFELSE): Use this macro to implement the new specs. + (AC_WARNING): The empty category must not be used, default to + `syntax'. + * doc/autoconf.texi (autoconf Invocation, Reporting Messages): Adjust. + * autoconf.sh: Adjust. + Use `optarg' to fetch the arguments of options. + Fix a bug in the handling of `--trace='. + + * acgeneral.m4 (AC_CACHE_VAL): Typo: the macro was complaining iff + it shouldn't have. + +2000-07-10 Akim Demaille + + * autoreconf.sh (--install, --symlink): New options. + +2000-07-10 Akim Demaille + + * autoreconf.sh (dots, aclocal_m4, acconfig_h): Remove. + Adjust dependencies. + When using $verbose, redirect to stderr. + +2000-07-10 Akim Demaille + + * autoreconf.sh: Clarify the difference between the location of + `aclocal.m4' and that of the location Autoconf extensions. + (-M, --m4dir): New option. + (aclocal_flags): Do not use $localdir, but $m4dir. + (localdir_opt): Remove, since $autoconf, $autoheader already + include `-l $localdir'. + +2000-07-10 Akim Demaille + + * autoconf.sh (task install): We no longer use AC_INCLUDE. + +2000-07-10 Akim Demaille + + * acoldnames.m4: Remove the obsolete comments. The technology is + now detailed in `autoupdate'. + Quote the names being defined. + Formatting changes. + +2000-07-10 Akim Demaille + + * acgeneral.m4 (AC_DEFUNCT): Remove. + (AC_RSH, AC_UNISTD_H, AC_USG, AC_MEMORY_H, AC_DIR_HEADER, + AC_INT_16_BITS, AC_LONG_64_BITS): They're alive!... + * doc/autoconf.texi (Obsolete Macros): but not fresh. + +2000-07-10 Akim Demaille + + * autoreconf.sh (debug): New variable. + (tmp): s/ac/ar/. + : Support --debug. + * doc/autoconf.texi: Adjust. + +2000-07-10 Akim Demaille + + Fix the bugs recently introduced in autoreconf. + + * autoreconf.sh: Don't run automake when the package is not using + it. + When checking whether autoheader should be rerun, don't ask + config.h to be newer than stamp-h and vice-versa. + Remove an unbalanced `fi'. + +2000-07-10 Akim Demaille + + * autoreconf.sh (run_aclocal): Rename as `uses_aclocal' to avoid + the convention clash with autoconf.sh where `run_foo' is the + command to run `foo'. + (uses_autoheader): New variable. + +2000-07-10 Akim Demaille + + * autoreconf.sh (update.sh): New sub program. + Use it in the whole process. + (acconfig_h): New variable. + +2000-07-10 Akim Demaille + + * autoreconf.sh : Use false/: instead of no/yes. + Formatting and factoring changes. + +2000-07-10 Akim Demaille + + * autoreconf.sh: You too can have a $tmp dir if you wish. + (alflags.sed): New sub sed program. + Compute the flags of aclocal from Makefile.am instead of + Makefile.in, it is unlikely that aclocal be used but not automake, + while it is convenient to be able to run autoreconf even if + automake was not run yet. + Use `autoconf --trace' to get the list of configuration headers. + +2000-07-10 Akim Demaille + + * acgeneral.m4 (AC_PLAIN_SCRIPT): New macro. + * tests/base.m4 (m4_wrap, AC_REQUIRE, AC_SHELL_MKDIR_P): Use it. + * autoconf.sh: Properly handle the case where `$output' is `-' + (i.e., stdout). + Handle `-ofile', not just `-o file'. + +2000-07-10 Akim Demaille + + * autoreconf.sh: Formatting changes. + When verbose, display exactly what you do, not just a synopsis. + When using `$verbose' don't use quotes to avoid spurious spaces + for empty arguments. + +2000-07-10 Akim Demaille + + * autoreconf.sh (force): Instead of yes/no, use :/false. + Adjust the code. + (automake_deps, automake_force): No longer used. + +2000-07-10 Akim Demaille + + * acgeneral.m4 (_AC_SHELL_DIRNAME): Use an `expr' solution instead + of echo|sed. + From Paul Eggert. + * doc/autoconf.texi (Limitations of Usual Tools): Include the + words from Paul about `|' with expr(1). + +2000-07-10 Akim Demaille + + * aclang.m4: Promote s,,, over s%%%, and `sed prog' over `sed -e + prog'. + * acgeneral.m4: Likewise. + * acspecific.m4: Likewise. + * doc/autoconf.texi (Limitations of Usual Tools, Coding Style): + Likewise. + +2000-07-10 Akim Demaille + + * autoconf.sh: When using `mktemp -d', be sure that the directory + was created. + * autoheader.sh: Likewise. + * autoreconf.sh: Likewise. + +2000-07-10 Akim Demaille + + * AUTHORS: Update. + * doc/autoconf.texi: Free Franc,ois Pinard from iftex and ifinfo, + use @,c. + Don't use `@code{m4}' when you mean M4, just as you shall not say + `@code{cc}' when you refer to the C language. + +2000-07-10 Akim Demaille + + * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): Set + ac_gnu_compiler. + (_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): Compute + ac_gnu_compiler. + * acgeneral.m4 (AC_LINKER_OPTION): Adjust. + +2000-07-10 Akim Demaille + + * aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Move the code + processing the result of AC_PROG_CC_G, AC_PROG_CXX_G, and + AC_PROG_F77_G into them. + +2000-07-10 Akim Demaille + + * doc/autoconf.texi (Multiple Cases, Quotation Rule Of Thumb): + Follow the coding style. + +2000-07-10 Akim Demaille + + * doc/autoconf.texi (Obsoleting Macros): Is not a subsection of + `Dependencies Between Macros', but rather a section of `Writing + Macros'. + +2000-07-10 Akim Demaille + + * doc/autoconf.texi (Coding Style): New node. + +2000-07-07 Akim Demaille + + * acgeneral.m4 (AC_SHELL_MKDIR_P): s/ac_dir/ac_mkdir_dir/ to avoid + clashes with the numerous ac_dir loops. + Reported by Lars J. Aas. + +2000-07-07 Akim Demaille + + * acgeneral.m4 (_AC_SHELL_DIRNAME): Return `.', not `' when there + is no directory part. + +2000-07-07 Franc,ois Pinard + + * tests/atgeneral.m4 (AT_CHECK): Fix a redirection problem. + +2000-07-07 Akim Demaille + + AC_REVISION must not AC_REQUIRE AC_INIT, it leaves the diversions + in a messy state. Don't even try to emulate AC_REQUIRE: just + introduce a diversion just for AC_REVISION, and let the magic + happen. + Fixes Autoconf PR/134, from Raja R Harinath. + + * acgeneral.m4 (_AC_DIVERT(REVISION)): New diversion. + (AC_REVISION): Don't require AC_INIT, dump in your diversion. + (_AC_INIT): Delete, inline its body in... + (AC_INIT): here. + (_AC_INIT_NOTICE, _AC_INIT_COPYRIGHT): New macros so that... + (AC_INIT): be more uniform. + (AC_INIT, AC_REVISION, AC_COPYRIGHT): `define', don't AC_DEFUN. + +2000-07-07 Martin Wilck + + * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Keep -lm, if a Fortran + compiler needs it, it is likely to be required when linking C/C++ + with Fortran. + <-YP,*>: Fix the list of arguments to loop on. + Don't mess with the user variable name space. + : Prepend LD_RUN_PATH directories with -R only + when running Solaris (without this, link errors occur). + +2000-07-06 Akim Demaille + + * acgeneral.m4 (_AC_SHELL_DIRNAME): Fix quotation. + +2000-07-06 Akim Demaille + + * aclang.m4: Formatting and quotations changes. + +2000-07-06 Raja R Harinath + + * aclang.m4 (AC_LANG_INT_SAVE(C++)): Be a copy of + AC_LANG_INT_SAVE(C), not AC_LANG_INT_SAVE_TRY(C). + Fixes Autoconf PR/133. + +2000-07-06 Mo DeJong + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS, AC_CHECK_TOOLS): Change + warning message printed when only --host is given. Fix printing + of multiple compiler cache values, use PATH argument. + * aclang.m4 (AC_LANG_COMPILER_WORKS): Print the cross compile + status, fix problem where two results were printed at once. + +2000-07-06 Akim Demaille + + * acgeneral.m4 (_AC_SHELL_TMPDIR): Typo. + +2000-07-06 Alexandre Oliva + + * acgeneral.m4 (_AC_SHELL_DIRNAME): Behave properly when the + argument has trailing slashes, and when its depth is just one + (`/tmp'). + +2000-07-06 Lars J. Aas + + * acgeneral.m4 (_AC_SHELL_DIRNAME): New macro. + (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_OUTPUT_LINKS): + Use _AC_SHELL_DIRNAME. + +2000-07-06 Martin Wilck + + * aclang.m4 (AC_PROG_F77): Add two compilers, + lf95 (Lahey/Fujitsu Fortran) and pgf77 (Portland Group Fortran) + (_AC_PROG_F77_G): Some Fortran compilers produce stdout/stderr + output even if no errors occur - check exit status rather than + output. + +2000-07-05 Akim Demaille + + * acgeneral.m4 (_AC_SHELL_TMPDIR): When using `mktemp -d', be sure + that the directory was created: under Ultrix 4.3 it just returns + a name, but does not create the directory. + Reported by Christian Krackowizer. + +2000-07-03 Lars J. Aas + + * acgeneral.m4 (AC_SHELL_MKDIR_P): New macro. + (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_OUTPUT_LINKS, + AC_PROG_INSTALL): Use AC_SHELL_MKDIR_P. + * tests/base.m4 (AC_SHELL_MKDIR_P): Test it. + +2000-07-04 Akim Demaille + + * acgeneral.m4 (AC_CACHE_LOAD): Be ready to read the cache even + when `.' is not in the PATH. + * doc/install.texi (configure Invocation): Adjust. + +2000-06-30 Jim Meyering + + * acgeneral.m4 (AC_REQUIRE): Tweak a diagnostic. + +2000-06-30 Alexandre Oliva + + Re-enable the old behavior of --host and --build. + + * acgeneral.m4 (build_alias): Set to host_alias if --build is not + given but --host is, and enable cross-compile auto-detection. If + both are, and are different, enable cross compilation. + (AC_CANONICAL_HOST): Adjust help message. + (cross_compiling): Enclose in quotes when testing. + * aclang.m4 (_AC_LANG_COMPILER_WORKS): If cross_compiling is + maybe, set it to yes or no depending on the result of the + execution test. + * doc/autoconf.texi: Document the change. + * doc/install.texi: Likewise. + +2000-06-27 Jim Meyering + + * acspecific.m4 (_AC_LIBOBJ_GETLOADAVG): Put quotes around use of + `$ac_cv_lib_elf_elf_begin', since that variable may not be defined. + From Volker Borchert. + +2000-06-26 Akim Demaille + + * doc/autoconf.texi: Fix various typos. + (Limitations of Usual Tools) : Anchors and groups. + (Language Choice): Don't mention cross_compiling here, do it... + (Specifying Names) <--host>: here. + (Obsoleting Macros): Don't document AC_DEFUNCT, it's going to be + removed anyway, obsoleted itself by AU_DEFUN. + +2000-06-26 Akim Demaille + + * acgeneral.m4 (AC_CACHE_VAL): Swap the arguments of `regexp'. + Reported by Alexandre Oliva. + +2000-06-26 Akim Demaille + + * autoreconf.sh (automake, aclocal): New variables. Import + $AUTOMAKE and $ACLOCAL. + Pass --verbose to the tools. + Avoid using plenty of variables, just append to existing + variables. + * doc/autoconf.texi: List options in the order --help, --version, + --verbose, --debug, and then specific options. + +2000-06-26 Akim Demaille + + * doc/autoconf.texi: Various Texinfo adjustments. + (Specifying Names): When describing the system triplets, use the + same names as the shell variables. + (System Type Variables): Delete, merge its content into... + (Canonicalizing): here. + Clarify the difference between the `foo_target' and `foo' + variables. + +2000-06-26 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS, _AC_OUTPUT_CONFIG_STATUS): + s/echo | sed/expr/. + +2000-06-26 Akim Demaille + + * acgeneral.m4 (AC_CONFIG_LINKS, AC_CONFIG_HEADERS, + AC_CONFIG_COMMANDS, AC_CONFIG_FILES): Use a shell variable instead + of an m4 variable to store what must be done, so that sh + conditionals are honored. + (_AC_OUTPUT_LINKS, _AC_OUTPUT_HEADERS, + _AC_OUTPUT_COMMANDS, _AC_OUTPUT_FILES): Adjust. + * tests/semantics.m4: Test the four AC_CONFIG sisters. + * doc/autoconf.texi (Configuration Actions): Promote the use of + literals, show it works properly with sh conditionals. + +2000-06-26 Akim Demaille + + * acgeneral.m4 (AC_CACHE_VAL): Too many people put AC_DEFINE in + the commands-to-set-it part of it. Give them a warning. + +2000-06-26 Akim Demaille + + * doc/autoconf.texi (Prerequisite Macros): More about AC_REQUIRE. + +2000-06-26 Akim Demaille + + Given better names to the diversions. + + * acgeneral.m4 (_AC_DIVERT(NORMAL_2), _AC_DIVERT(NORMAL_3), + _AC_DIVERT(NORMAL_4)): Delete, unused. + (_AC_DIVERT(NORMAL_1), _AC_DIVERT(NORMAL), AC_DIVERT_DIVERSION): + Rename as _AC_DIVERT(PREPARE), _AC_DIVERT(BODY), + _AC_DIVERT_DIVERSION. + +2000-06-26 Akim Demaille + + The current implementation of AC_REQUIRE fails on + + | AC_DEFUN([TEST1], [REQUIRE([TEST2a])REQUIRE([TEST2b])]) + | AC_DEFUN([TEST2a], []) + | AC_DEFUN([TEST2b], [REQUIRE([TEST3])]) + | AC_DEFUN([TEST3], [REQUIRE([TEST2a])]) + | + | AC_INIT + | TEST1 + + because it produces TEST3; TEST2a; TEST2b; TEST1. + Fix this bug, implement the solution provided by Axel Thimm, + and test AC_REQUIRE. + + * acgeneral.m4: Document this implementation. + (_AC_DEFUN_PRO, _AC_DEFUN_EPI, AC_REQUIRE): Be sure that macros + are emitted in the same order as they are expanded. + (AC_REQUIRE): Forbid being calling out of an AC_DEFUN'd macro (in + particular the top level). + * tests/base.m4 (AC_REQUIRE): New test. + +2000-06-26 Akim Demaille + + A macro which is not defined with AC_DEFUN should not be + AC_REQUIRE'd, since it doesn't AC_PROVIDE itself. + + * acgeneral.m4 (AC_REQUIRE): Issue a warning when after expansion, + the macro is not AC_PROVIDE'd. + +2000-06-26 Akim Demaille + + Various cleanups. + + * acgeneral.m4 (AC_PRO, AC_EPI): Rename as _AC_DEFUN_PRO and + _AC_DEFUN_EPI. + Adjust dependencies. + (AC_DEFUN): Remove the not-to-be-released specializing mechanism. + (AC_SPECIALIZE): Remove for the same reasons. + Adjust dependencies. + (_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS, _AC_INIT_VERSION, + _AC_INIT_PREPARE, _AC_CANONICAL_SPLIT, _AC_CHECK_TYPE_NEW, + _AC_CHECK_TYPE_OLD): Define via `define' instead of `AC_DEFUN': + they are not related to AC_REQUIRE in any way. + * acspecific.m4 (AC_PROG_ECHO, _AC_DECL_YYTEXT, _AC_PATH_X_XMKMF, + _AC_PATH_X_DIRECT): Define via `define' instead of `AC_DEFUN'. + +2000-06-19 Steven G. Johnson + + * acgeneral.m4 (AC_CHECK_TOOL): Use two variables in order to + avoid cache variable conflicts between AC_CHECK_PROG invocations. + (AC_PATH_TOOL): Fix same bugs as in 6/9/00 fixes to AC_CHECK_TOOL. + Pass correct arguments to AC_CHECK_PATH (different from + AC_CHECK_PROG). Use AC_CHECK_PATH cache variable, not + AC_CHECK_PROG var, and use two variables for two invocations as + above. Quote AC_CHECK_* args. + +2000-06-16 Akim Demaille + + The test suite reveals AC_OUTPUT_MAKE_DEFS fails on RISC/OS. + + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS) : Reset the + t flag between each cycle. + * doc/autoconf.texi (Limitations of Usual Tools): Some about the t + flag in sed. + +2000-06-16 Akim Demaille + + * acspecific.m4 (AC_EXEEXT, AC_OBJEXT): Don't obsolete them, let + them be empty, so that Automake still provide support for $(EXEEXT). + +2000-06-15 Akim Demaille + + * autoconf.sh (option handling): Give a more understandable + message when an option is missing its argument. + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * autoheader.sh: Likewise. + +2000-06-13 Akim Demaille + + `./config.status -d' is buggy. + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Remove the `shift' in + --debug. + * doc/autoconf.texi (Limitations of Builtins): Some about shift. + +2000-06-13 Akim Demaille + + * doc/autoconf.texi (Caching Results): Bigger warning about the + extremely frequent action-in-commands bug. + Move the documentation of AC_CACHE_SAVE and AC_CACHE_LOAD... + (Cache Files): into here. + +2000-06-09 Steven G. Johnson + + * acgeneral.m4 (AC_CHECK_TOOL): Even if VALUE-IF-NOT-FOUND is not + specified, we should still check whether PROG-TO-CHECK-FOR + actually works before returning it when the prefixed program is + not found. Also, fixed a bug where it failed to pass the PATH + argument in the second call to AC_CHECK_PROG. + +2000-06-09 Akim Demaille + + * acgeneral.m4 (AC_CHECK_TOOLS): Rewrite. + +2000-06-09 Paul Eggert + + * doc/autoconf.texi: Use `@option' for options, not `@samp' nor + `@code'. + * doc/install.texi: Likewise. + +2000-06-09 Akim Demaille + + * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Don't require AC_CYGWIN. + (AC_F77_NAME_MANGLING): Removed useless comment. + (_AC_PROG_F77_GNU): Use `.f' not `.fpp' which is not properly + processed by Abysoft's Fortran compiler. + +2000-06-09 Steven G. Johnson + + * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Fixed bug where + compiler output to stdout was not caught and interpreted. + +2000-06-09 Akim Demaille + + `autoconf --trace' dies on filenames with `:'. + Reported by Mark Elbrecht. + + * autoconf.sh (trace2m4.sed): Use `..*' instead of + `[^:][^:]*' to catch file names. The rest of regex is probably + precise enough to avoid incorrect parsing. + +2000-06-09 Akim Demaille + + * acspecific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): Always initialize + $3 to no. + +2000-06-08 Paul Eggert + + Import AC_SYS_LARGEFILE from largefile.m4 serial 12. + + * acspecific.m4 (AC_SYS_LARGEFILE, _AC_SYS_LARGEFILE_MACRO_VALUE, + _AC_SYS_LARGEFILE_SOURCE): New. + * doc/autoconf.texi (System Services): Document AC_SYS_LARGEFILE. + +2000-06-08 Steven G. Johnson + + * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Don't override FLIBS if + specified by the user. + Fix a bug: use the cached value to set FLIBS. + +2000-06-07 Dave Love + + * aclang.m4 (AC_PROG_F77): Check for f95 and fc too. + +2000-06-07 Philippe De Muyter + + `foo=1 foo=2 cmd' has an undefined behavior. + + * acgeneral.m4 (_AC_COMPUTE_INT_COMPILE): Do not put two shell + variable assignments in one shell command. + * doc/autoconf.texi (Shell Substitutions): Document. + +2000-06-07 Steven G. Johnson + + * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Fix problem on Cray due to + confusion from the link command getting echoed in quotes. In the + future, a more general fix for quoted arguments with spaces might + be better. + +2000-06-07 Akim Demaille + + * doc/autoconf.texi (Limitations of Builtins): More on `test' and + `case'. + Some on `if' and `break'. + +2000-06-07 Morten Eriksen + + * acspecific.m4 (_AC_PATH_X_DIRECT): Include `X11/Intrinsic.h' + when trying to use `XtMalloc' to actually have a chance of + succeeding. + +2000-06-07 Akim Demaille + + Hard (code) X. + + * acspecific.m4 (_AC_PATH_X_DIRECT): Hard code `X11/Intrinsic.h' + instead of using `ac_x_direct_test_include', likewise for `Xt' and + `ac_x_direct_test_lib', `XtMalloc' and + `ac_x_direct_test_function'. + +2000-06-07 Akim Demaille + + * acspecific.m4 (AC_PATH_X): Use AC_DIVERT. + Use `no', not `NO' for ac_x_includes and ac_x_libraries. + Adjust dependencies. + (_AC_PATH_X_DIRECT): Introduce ac_x_header_dirs to factor the list + of places where headers and libs might be. + (AC_PATH_XTRA): Don't quote the argument of `case'. + +2000-06-07 Jim Meyering + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Put the expansion of + AC_LIST_LINKS in an unquoted `here'-document. + +2000-06-06 Akim Demaille + + * tests/aclocal.m4 (AC_ENV_SAVE): Skip `no_x'. + From Mark Elbrecht. + +2000-06-05 Mo DeJong + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Move the setting + of ac_tool_prefix before the call to AC_DIVERT_POP. + +2000-06-05 Akim Demaille + + * acgeneral.m4 (AC_CHECK_TOOL_PREFIX): AU define it. + Suggested by Mo DeJong. + +2000-06-05 Steven G. Johnson + + * aclang.m4 (AC_C_CHAR_UNSIGNED): Use the new compiler-test + technology so that we can do the test via compilations only. Also + use (char) -1 instead of (char) 255 to check if char is unsigned. + +2000-05-28 Jim Meyering + + * acspecific.m4 (AC_FUNC_STRERROR_R): Call strerror_r with 2nd arg + of type char*, not int. Suggestion from Paul Eggert. + + * doc/autoconf.texi (Particular Functions): Give better description of + AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK. From Paul Eggert. + +2000-05-26 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools): Document `ln -s' + on DJGPP, based on the comments from Mark Elbrecht. + +2000-05-26 Akim Demaille + + * autoreconf.sh (autoconf, autoheader): Be more conscientious when + looking for the executable. + * autoupdate.sh: Likewise. + * autoheader.sh: Likewise. + Suggested by Alexandre Oliva. + +2000-05-26 Akim Demaille + + Thanks to --program-transform-name, `autoconf' might be install as + `yo-man-i-am-the-all-mighty-AVt0c0nF-eh-eh'. But when + `yo-man-i-am-the-all-mighty-AVt0h3Ad3R-eh-eh' and the other tools + want to trace, they might stupidly invoke the program named + `autoconf' instead. Pfff, stupid scripts :) + + * Makefile.am (editsh): Transfer the names of the install + `autoconf' and `autoheader'. + * autoconf.sh: Add a missing period at the end of the comment + # Parse command line + Make sure to have a ChangeLog much longer than the patch. + * autoheader.sh: Use the right `autoconf'. + * autoupdate.sh: Likewise. + * autoreconf.sh: Likewise, and for `autoheader' too. + Simplify the handling of localdir and AC_MACRODIR. + * ifnames.sh: Formatting changes. + +2000-05-25 Steven G. Johnson + + Don't use f2c as a possible Fortran compiler, since by itself it + cannot produce object code. + + * aclang.m4 (AC_PROG_F77): Remove f2c from the search list. + * doc/autoconf.texi: Excise mentions of f2c in AC_PROG_F77 docs. + +2000-05-26 Mark Elbrecht + + Currently, AC_PROG_LN_S incorrectly reports yes with DJGPP. This + is because the DJGPP `ln' emulates soft links for executables by + generating a stub that in turn calls the real program. This + feature also works with nonexistent files like in the Unix + spec. So `ln -s X conftestdata' will generate `conftestdata.exe' + which will attempt to call 'X.exe'. But this feature only works + for executables. Fix it. + + * acspecific.m4 (AC_PROG_LN_S): Create a sample file and use it to + test `ln -s'. + +2000-05-26 Ossama Othman + + * aclang.m4 (AC_PROG_CXX): Look for aCC before CC. + +2000-05-26 Akim Demaille + + * acspecific.m4 (AC_FUNC_STRERROR_R): New, from `strerror_r.m4', + serial 2, by Jim Meyering. + (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): New, from + `lstat-slash.m4', serial 1, by Jim Meyering. + * acfunctions: Adjust. + +2000-05-26 Akim Demaille + + * acgeneral.m4 (AC_CHECK_TOOLS): Don't require + AC_CHECK_TOOL_PREFIX, it's dead. + +2000-05-26 Akim Demaille + + * acgeneral.m4: Simplify all the + case "$switch" in + into + case $switch in + * acspecific.m4: Likewise. + * aclang.m4: Likewise. + +2000-05-26 Akim Demaille + + * acgeneral.m4 (AC_CHECK_TOOL_PREFIX): Remove. + Adjust dependencies. + (_AC_INIT_PARSE_ARGS): Set ac_tool_prefix. + +2000-05-26 Akim Demaille + + In `info', it is easier to type `autoconf ' to reach the list + of options, that `Invoking autoc'. + + * doc/autoconf.texi: s/Invoking foo/foo Invocation/. + +2000-05-26 Akim Demaille + + Merge `Upgrading' and `Obsolete Constructs' together. + + * doc/autoconf.texi (Obsolete Constructs): Move right after + `Recreation a Configuration. + (Invoking autoupdate): Be a subsection of + `Obsolete Constructs'. + (Upgrading): Demote from chapter to section. + Be a section of `Obsolete Constructs'. + Rename as `Autoconf 1'. + +2000-05-26 Akim Demaille + + Find a means to extract integers from the compiler. + Use this technology to compute `sizeof' even when cross-compiling. + Ideas and initial suggestion by Kaveh Ghazi. + Binary search by Bruno Haible. + + * aclang.m4 (AC_LANG_BOOL_COMPILE_TRY, + AC_LANG_BOOL_COMPILE_TRY(C), AC_LANG_BOOL_COMPILE_TRY(C++), + AC_LANG_INT_SAVE, AC_LANG_INT_SAVE(C), AC_LANG_INT_SAVE(C++)): New + macros. + * acgeneral.m4 (_AC_COMPUTE_INT_COMPILE, _AC_COMPUTE_INT_RUN, + _AC_COMPUTE_INT): New. + (AC_CHECK_SIZEOF): Use them. + Check whether the type exists beforehand. + * tests/semantics.m4 (AC_CHECK_SIZEOF): Strengthen. + +2000-05-26 Ossama Othman + + * aclang.m4 (AC_PROG_CXX): Look for aCC KCC RCC xlC_r xlC. + s/c++ g++/g++ c++/. + * doc/autoconf.texi (Compilers and Preprocessors): Adjust. + +2000-05-26 Akim Demaille + + No library nor special privilege is needed to run `getloadavg' + under FreeBSD. + Reported by Alec Wolman. + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Check for `getloadavg' + without any additional library. + Fixes Autoconf/109. + +2000-05-26 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools, Limitations of + Builtins): Integrate comments from Paul Eggert and Jim Meyering. + Add the sed limitation discovered by Philippe De Muyter. + Fix a typo spotted by Pavel Roskin. + +2000-05-25 Akim Demaille + + The test suite needs GNU m4. + Reported by Bob Friesenhahn. + + * tests/atconfig.in (M4): Set it. + * tests/base.m4: Use it. + +2000-05-25 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Don't use negated character + classes with `case'. Use `expr' instead. + Suggested by Paul Eggert. + * doc/autoconf.texi (Limitations of Builtins): Explain expr, the + `x' trick, and negated character classes. + +2000-05-24 Didier Verna + + * acgeneral.m4 (AC_INIT): Call _AC_PACKAGE before _AC_INIT. + +2000-05-24 Ossama Othman + + * aclang.m4 (AC_LANG(C++)): Change `ac_ext' from from `C' to `cc' + to avoid potential ambiguities on case-insensitive shells. + +2000-05-24 Mo DeJong + + Have --host=sun4 automatically look for CC=sun4-cc etc. + + * acgeneral.m4 (AC_CHECK_TOOLS): New. + * aclang.m4 (AC_PROG_CXX, AC_PROG_CC, AC_PROG_F77): Use new + AC_CHECK_TOOLS macro instead of AC_CHECK_PROGS so that a cross + compiler is found by default with --host. + * doc/autoconf.texi (Generic Programs, Manual Configuration): + Describe new AC_CHECK_TOOLS macro. Fix unclear working about + AC_CHECK_PROGS. + * tests/Makefile.am (FILTER_MACROS): Adjust. + +2000-05-24 Akim Demaille + + The night of the living dead... + + * acspecific.m4 (AC_XENIX_DIR, AC_DYNIX_SEQ, AC_IRIX_SUN, + AC_SCO_INTL): Wake up a few zombies. + * doc/autoconf.texi: Adjust. + * tests/aclocal.m4 (AC_ENV_SAVE): Likewise. + +2000-05-24 Akim Demaille + + * acgeneral.m4 (AC_LANG_FUNC_LINK_TRY, AC_LANG_FUNC_LINK_TRY(C), + AC_LANG_FUNC_LINK_TRY(C++)): New macros. + (AC_CHECK_FUNC): Use it, together with AC_LINK_ELSE. + +2000-05-24 Akim Demaille + + * acspecific.m4 (AC_FUNC_VFORK): Quote properly. + (AC_FUNC_STRFTIME, AC_FUNC_VFORK, AC_FUNC_VPRINTF): Don't use + AC_DEFINE, just use the AC_CHECK_*S macro. + +2000-05-24 Akim Demaille + + * acgeneral.m4 (_AC_WHICH_A): Replace it with... + (AC_SHELL_PATH_WALK): this. + (AC_CHECK_PROG, AC_PATH_PROG): Use it. + +2000-05-24 Akim Demaille + + * doc/autoconf.texi (Limitations of Builtins): Document `unset'. + (Special Shell Variables): Adjust. + (Shellology): New section. Introduce bash and zsh. + (Special Shell Variables): Some data on NULLCMD. + (Quotation Thumb Rule): Rename as + (Quotation Rule of Thumb): this. + * acgeneral.m4 (AC_SHELL_UNSET): Remove. + (AC_SHELL_UNSETENV): Rename as... + (AC_SHELL_UNSET): this. + (_AC_INIT_PREPARE_ENVIRONMENT): Prepare bash and zsh. + Adjust to AC_SHELL_UNSET. + +2000-05-24 Akim Demaille + + The options --build etc. used to set `$build'. *If* + AC_CANONICAL_SYSTEM was run, then the value of `$build' given by + the user was saved into `$build_alias', and `$build' was + normalized using `config.sub'. + + Now, let `--build' set `$build_alias' so that scripts with or + without `AC_CANONICAL_BUILD' have the same semantics. This allows + to use `AC_CHECK_TOOL' without requiring `config.guess' and + `config.sub' (which was bizarre anyway). + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target + set `build_alias' etc. + After the option handling, set host to $host_alias etc. for + bugward compatibility. + (AC_CANONICALIZE): Mutate into... + (_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just + computes `$foo_os' etc. + (_AC_CANONICAL_THING): Remove, too confusing. + (AC_CANONICAL_BUILD): Adjust. + Do not assign any value to `build_alias', just compute `build', and + `build_{cpy, vendor, os}'. + (AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise. + (AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is + given, not when `$host != $build'. + + * acgeneral.m4 (sinclude): Fix typo. + +2000-05-23 Akim Demaille + + * doc/autoconf.texi (Limitations of Builtins): More details on + `test -n ='. + +2000-05-23 Akim Demaille + + Simplify the interface: users shouldn't need to explicitly check + for special environments. + + * acspecific.m4 (AC_EXEEXT, AC_OBJEXT): AU defined to + nothing. Replace them by... + (_AC_EXEEXT, _AC_OBJEXT): this. + * aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call them. + (AC_PROG_CC_G, AC_PROG_CXX_G, AC_PROG_F77_G): Rename as... + (_AC_PROG_CC_G, _AC_PROG_CXX_G, _AC_PROG_F77_G): this. + Adjust dependencies. + * tests/Makefile.am (FILTER_MACROS): Adjust. + * doc/autoconf.texi (Compilers and Preprocessors): New section, + move the documentation of AC_PROG_CC, AC_PROG_CC_C_O, + AC_PROG_CC_STDC, AC_PROG_CPP, AC_PROG_CXX, AC_PROG_CXXCPP, + AC_PROG_F77, AC_PROG_F77_C_O, AC_PROG_GCC_TRADITIONAL here. + Factor the comment documentation of AC_PROG_CC, AC_PROG_CXX, + AC_PROG_F77. + +2000-05-23 Akim Demaille + + Modernize AC_EXEEXT and AC_OBJEXT. + Now work with other languages than C and C++. + + * acspecific.m4 (AC_EXEEXT, AC_OBJEXT): Use + AC_COMPILE_IFELSE/AC_LINK_IFELSE and AC_LANG_PROGRAM instead of + ad hoc code. + Use `$ac_ext' instead of listing `.c', `.C' etc. + Use AC_CACHE_CHECK. + * doc/autoconf.texi (System Services): Adjust. + +2000-05-23 Akim Demaille + + Simplify the interface: users shouldn't need to explicitly check + for special environments. + + * acspecific.m4 (AC_CYGWIN, AC_EMXOS2, AC_MINGW32): AU defined to + nothing. Replace them by... + (_AC_CYGWIN, _AC_EMXOS2, _AC_MINGW32): these, which are + automatically called by... + (AC_EXEEXT): this. + * doc/autoconf.texi (System Services, Obsolete Macros): Adjust. + +2000-05-23 Akim Demaille + + AC_PROG_GNU_M4 should actually be private to the package + Autoconf. + + * acspecific.m4 (AC_PROG_GNU_M4): Move to... + * m4/m4.m4: here. + * m4/Makefile.am (EXTRA_DIST): Adjust. + * doc/autoconf.texi (Particular Programs): Adjust. + +2000-05-23 Akim Demaille + + * doc/autoconf.texi (Exiting from Shell Scripts): Move contents + into... + (Limitations of Builtins): this new node. + Document limitations of `exit', `export' and `case'. + Welcome the documentation of `test' from... + (Limitations of Usual Tools): here. + +2000-05-22 Akim Demaille + + Load the additions *before* running AC_INIT. + This is important if you want to redefine AC_INIT or some of its + sub macros (eeerk!), or if you want to use user defined macros + before AC_INIT. + Suggested by Didier Verna. + + * acgeneral.m4 (_AC_INIT): Don't include `acsite.m4' and + `aclocal.m4'. + * autoconf.sh (run_m4, run_m4f): Do it. + +2000-05-22 Akim Demaille + + Reading the ChangeLog revealed that the recent update of + AC_FUNC_GETLOADAVG introduced a bug which already happened (see + Mon Nov 11 18:02:58 1996 David J MacKenzie). + + * acgeneral.m4 (AC_CHECK_LIB): Use a less tempting name: + s/ac_save_LIBS/ac_check_lib_save_LIBS/. + +2000-05-22 Akim Demaille + + * acspecific.m4 (_AC_LIBOBJ_ALLOCA): New macro, extracted from... + (AC_FUNC_ALLOCA): here. Adjust. + +2000-05-22 Akim Demaille + + Add `configure --config-cache', `-C' as a shortcut for + `--cache-file=config.cache'. + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Let `configure' support + `--config-cache' and `-C'. + Report them in `--help'. + Fix the display of missing argument. + (_AC_OUTPUT_SUBDIRS): Adjust. + * doc/install.texi (Invoking configure): Rename the node as + (Running configure scripts): this, the name of the chapter. + (Operation Controls): Rename as... + (Invoking configure): this. + Document the new options. + * doc/autoconf.texi (direntry): Huh? What is this `aclocal' doing + here? Point to `Invoking configure'. + (Cache Files): No need to document the disabling of the cache. + +2000-05-22 Mark Elbrecht , Eli Zaretskii + + More MS-DOS support. + + * acgeneral.m4 (_AC_OUTPUT_FILES): Fix the computation of + `ac_file_inputs' for `$ac_given_srcdir' containing a colon. + (AC_CHECK_MEMBERS, AC_PATH_PROG): s/ac_save_ifs/ac_save_IFS/. + +2000-05-22 Akim Demaille + + * acspecific.m4 (AC_FUNC_CHOWN): New macro, based on Jim + Meyering's `chown.m4' serial 4. + (AC_FUNC_GETGROUPS): New macro, based on Jim Meyering's + `getgroups.m4' serial 3. + (AC_FUNC_MEMCMP): Updated, based on Jim Meyering's `memcmp.m4' + serial 3. + (AC_FUNC_MALLOC): New macro, based on Jim Meyering's + `malloc.m4' serial 3. + (AC_FUNC_MMAP): Include `stdlib.h' when `STDC_HEADERS'. + * acfunctions: Sort. + Add `chown' and `malloc', point `getgroups' to `AC_FUNC_GETGROUPS' + instead of `AC_TYPE_GETGROUPS'. + * doc/autoconf.texi (Particular Functions): Adjust. + +2000-05-22 Akim Demaille + + * acgeneral.m4: Quote the names being m4-defined. + * acspecific.m4: Likewise. + * aclang.m4: Likewise. + +2000-05-22 Akim Demaille + + Factor the AC_PROG__WORKS macros. + + * acgeneral.m4 (_AC_INIT_DEFAULTS): Set `cross_compiling'. + (AC_TRY_COMPILER): Remove. + * aclang.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS, + AC_PROG_F77_WORKS): Removed. + (_AC_LANG_COMPILER_WORKS): New macro. + (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Adjust. + +2000-05-22 Akim Demaille + + * aclang.m4: Formatting changes. + +2000-05-22 Akim Demaille + + More than one argument to `configure' builds a broken + `config.status'. Fix and test. + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use + `$ac_configure_args' directly, not via a tmp variable. + * tests/torture.m4 (command line interface): Test with more than + one argument. + +2000-05-19 Akim Demaille + + * acgeneral.m4 (AC_MSG_WARN): s/warning/WARNING/. + * autoheader.sh: Likewise. + From Franc,ois Pinard. + +2000-05-19 Akim Demaille + + * acgeneral.m4 (AC_PACKAGE): Rename as _AC_INIT_PACKAGE. + (AC_INIT): Dispatch arguments either to _AC_INIT_PACKAGE or + to AC_CONFIG_SRCDIR. + (AU::AC_INIT): New. + * configure.in: Adjust. + Use `#', not `dnl'. + * doc/autoconf.texi (configure.in Layout): Document the new form + of AC_INIT. + Document AC_CONFIG_SRCDIR. + (Obsolete Macros): Document the old one. + +2000-05-19 Akim Demaille + + * acgeneral.m4: Simplify all the unjustified `[\$]foo' into + `\$foo', the quotes are needed only for `\$[1]', `\$[@]' etc. + Prefer `$$1' to `[$]$1', `$foo' to `[$]foo', `$[1]' to `[$]1' etc. + * aclang.m4: Likewise. + * acspecific.m4: Likewise. + +2000-05-19 Akim Demaille + + * acgeneral.m4 (AC_TRY_COMPILER): Fix quotation. + +2000-05-19 Akim Demaille + + Fix Autoconf/123. + + * libm4.m4: Rename `symbols' as `m4_symbols'. + +2000-05-19 Akim Demaille + + * aclang.m4 (AC_PROG_CC_GNU, AC_PROG_CXX_GNU, AC_PROG_F77_GNU): + Rename as: + (_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): these. + Compute the value of GCC, GXX and G77 here. + Set to `no' (instead of empty) if not the GNU compiler. + (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Adjust. + * doc/autoconf.texi: Adjust. + +2000-05-19 Akim Demaille + + Fix Autoconf/106. + + * aclang.m4 (AC_PROG_F77): Follow strictly the same scheme as + AC_PROG_CC to compute the default FFLAGS. + +2000-05-19 Akim Demaille + + Either we cross-compile the whole package, or we don't. + Using --host enables cross-compilation. + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): `--host' enables cross + compilation. + (AC_CANONICAL_BUILD): The help string should explicitly mention + cross compilation. + * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): Don't + set `cross_compiling'. + (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Run your `WORK' partner + only if not cross-compiling. + (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS, AC_PROG_F77_WORKS): + If does not work, don't assume an implicit cross-compilation: + fail. + * doc/autoconf.texi: Adjust. + +2000-05-19 Akim Demaille + + * acgeneral.m4 (AC_SHELL_UNSETENV, AC_SHELL_UNSET): Add the + missing quotes. + +2000-05-19 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Prefer + case $foo in + *[^-a-zA-Z0-9_]*) AC_ACTION;; + esac + over + if echo "$foo" | grep '[^-a-zA-Z0-9_]' >/dev/null 2>&1; then + AC_ACTION + fi + +2000-05-19 Akim Demaille + + * doc/autoconf.texi (Testing Values and Files): Delete, move its + content into... + (Limitations of Usual Tools::test): here. + Document more limitations. + +2000-05-19 Akim Demaille + + * acspecific.m4 (_AC_LIBOBJ_GETLOADAVG): New macro, extracted from + (AC_FUNC_GETLOADAVG): here. + Use it. + +2000-05-19 Akim Demaille + + * acgeneral.m4 (AC_SPECIALIZE): Avoid a useless `indir'. + (AC_CHECK_MEMBER, AC_CHECK_MEMBERS): Fix to work properly on + `struct f.g.h'. + * acspecific.m4 (AC_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS and + AC_CHECK_MEMBERS instead of performing their task by hand. + +2000-05-19 Akim Demaille + + Synchronize AC_FUNC_GETLOADAVG with the version of the shellutils + 1.16f (serial 4). + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Check for + `pstat_getdynamic'. + Define `C_GETLOADAVG' if compiling `getloadavg.c'. + Check for NLS. + Compute `GETLOADAVG_LIBS'. + (AC_FUNC_MKTIME): Remove a forgotten `AC_SUBST(LIBOBJS)'. + +2000-05-19 Akim Demaille + + * acgeneral.m4 (AC_SHELL_UNSET, AC_SHELL_UNSETENV): New macro. + (_AC_INIT_PREPARE_ENVIRONMENT): Use AC_SHELL_UNSETENV. + Set CDPATH. Fixes Autoconf/96. + + * doc/autoconf.texi (Special Shell Variables): New node. + Document `status', `CDPATH', `LANG', `LC_ALL', `LC_MESSAGES' and + `LC_CTYPE'. + +2000-05-12 Akim Demaille + + * acgeneral.m4 (sinclude): Define, some packages (binutils) need + it. + +2000-05-12 Akim Demaille + + * doc/autoconf.texi (Invoking config.status): Move the + documentation of the envvar CONFIG_(FILES, HEADERS, COMMANDS, + LINKS) to + (Obsolete config.status Use): here. + +2000-05-12 Paul Eggert + + * doc/autoconf.texi (Exiting from Shell Scripts): New node. + (Autoconf Language): Follow the advice in the new node. + +2000-05-12 Peter Eisentraut + + * doc/autoconf.texi: Fix typos. + +2000-05-11 Akim Demaille + + AC_CONFIG_SUBDIRS needs two lists: one, ac_subdirs_all, which + contains all the possible subdirs for `--help=recursive', and + another, `subdirs' which can be built dynamically for launching + sub configurations. + + * acgeneral.m4 (AC_CONFIG_SUBDIRS): Define `subdirs' dynamically. + Define `ac_subdirs_all' statically. + Warn if the argument is not a literal. + (AC_LIST_SUBDIRS): Rename as... + (_AC_LIST_SUBDIRS): this. + (_AC_INIT_HELP): Loop over `ac_subdirs_all', not `subdirs'. + (_AC_OUTPUT_SUBDIRS): Loop over `subdirs', not `AC_LIST_SUBDIRS'. + * doc/autoconf.texi (Subdirectories): Adjust. + + * acgeneral.m4: Replace all the `test ! -d foo && bar' with + `test -d foo || bar'. + + * Makefile.am (.m4.m4f): Stop hiding what you're doing. + Don't check for GNU m4, let it die. + +2000-05-11 Akim Demaille + + The Associated Rewriters are even prouder to present... + . + | + | + /-\ + / \ + )===( U T O U P D A T E I V + // \\ + ========= + _//_ _\\_ The ``Eiffel Tower'' Release + + * autoupdate.sh: Complete rewrite. See that file for a detailed + explanation. Basically, simulate the name spaces thanks to + `autoconf --trace' and auxiliary files. + No longer use `autoupdate.m4', remove the dependencies. + Synchronize the options and `--help'. + * doc/autoconf.texi (Invoking autoupdate): Humanoupdate. + * autoupdate.m4: Delete. + * tests/Makefile.am (FILTER_MACROS): Add `AC_OUTPUT'. + Since `AC_OUTPUT' is now AU_DEFUN'd, it is extracted for testing, + while it was not before. + * tests/tools.m4 (autoupdate): Re-enable. Adjust the expected + output with the right quotation (yeah!). + Pass `-m $top_srcdir': autoupdate wants the `.m4' files, not the + frozen files. + * Makefile.am (nodistpkgdataDATA): Move `acversion.m4' to + (distpkgdataDATA): here, so that all the `.m4' files are in the + source hierarchy, not split across src and build. + * acversion.m4.in: Update to today's standards. + * Makefile.am: Adjust. + +2000-05-11 Akim Demaille + + * libm4.m4: Be robust to multiple inclusion. + Have the first `changequote' robust to the current quotation + system. + Always quote the first argument of `define'. + +2000-05-11 Akim Demaille + + The Associated Rewriters are proud to present... + + ^ + / \ U T O U P D A T E I I I + /===\ + / \ It bells, It whistles... + + * autoupdate.sh: Complete rewrite. See that file for a detailed + explanation. + * acgeneral.sh: Don't use AU_DEFINE, but AU_DEFUN. + (AC_OUTPUT_COMMANDS_CNT): Renamed as... + (_AC_OUTPUT_COMMANDS_CNT): this. + +2000-05-11 Akim Demaille + + Get rid of the m4 name spaces. + + * libm4.m4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir, + m4_popdef, m4_pushdef, m4_undefine, m4_namespace_push, + m4_namespace_pop, m4_namespace_register, m4_namespace_define, + m4_disable, m4_enable): Removed. + All dependencies adjusted. + * libm4.m4: Remove all the name space initialization. + * acgeneral.m4: Adjust. + (AU_DEFINE): Redefine as `AC_DEFUN'. + * autoupdate.m4: Adjust. + * tests/tools.m4: Temporarily disable the `autoupdate' test. + +2000-05-11 Akim Demaille + + Eradicate AC_TRY_COMPILE. + + * aclang.m4 (AC_PROG_CC_STDC, AC_C_BIGENDIAN, AC_C_INLINE, + AC_C_CONST, AC_C_VOLATILE, AC_F77_NAME_MANGLING): Use + `AC_COMPILE_IFELSE'. + * acspecific.m4 (AC_DECL_SYS_SIGLIST, _AC_CHECK_HEADER_DIRENT, + AC_HEADER_SYS_WAIT, AC_HEADER_TIME, AC_TYPE_SIGNAL, + AC_FUNC_GETLOADAVG, AC_FUNC_SELECT_ARGTYPES, AC_STRUCT_TM, + AC_CYGWIN, AC_MINGW32, AC_EMXOS2): Likewise. + * tests/semantics.m4 (C keywords): Check that AC_C_CONST, + AC_C_VOLATILE, and AC_C_INLINE function properly with GCC. + +2000-05-11 Akim Demaille + + Replace AC_LANG_SAVE/AC_LANG_RESTORE with AC_LANG_PUSH/AC_LANG_POP. + + * aclang.m4 (_AC_LANG_CURRENT, AC_LANG_STACK): You two are the same + thing, which now we shall name `_AC_LANG'. + All users adjusted. + (AC_LANG_PUSH, AC_LANG_POP): New macros. + (AC_LANG_SAVE, AC_LANG_RESTORE): AU defined. + (AC_PROG_CC_WORKS, AC_PROG_CXXCPP, AC_PROG_CXX_WORKS, + AC_PROG_F77_WORKS, AC_F77_LIBRARY_LDFLAGS, AC_F77_NAME_MANGLING): + Use them. + (AC_F77_LIBRARY_LDFLAGS): Move the requirements to its top. + * doc/autoconf.texi (Language Choice): Document them. + (Old Macros): Welcome AC_LANG_SAVE and AC_LANG_RESTORE. + +2000-05-11 Akim Demaille + + * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Less adventurous use of + `test'. + Fixes Autoconf/108. + +2000-05-11 Akim Demaille + + * doc/autoconf.texi (Particular Headers): Some more sorting. + Use `@multitable'. + +2000-05-11 Akim Demaille + + * acspecific.m4 (_AC_CHECK_HEADER_DIRENT): Use more modern + Autoconf idioms. + (_AC_CHECK_HEADERS_DIRENT): Removed, instead... + (AC_HEADER_DIRENT): Handle the loop. + +2000-05-11 Akim Demaille + + Provide a means to track the dependencies of files created by + `configure'. + + * acgeneral.m4 (AT_FILE_DEPENDENCY, _AC_CONFIG_DEPENDENCY, + _AC_CONFIG_DEPENDENCIES): New macros. + (AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_LINKS): Use them. + +2000-05-11 Akim Demaille + + Merge AC_DECL_YYTEXT into AC_PROG_LEX. + + * acgeneral.m4 (AC_DECL_YYTEXT): Rename as + (_AC_DECL_YYTEXT): this. + (AC_PROG_LEX): Use it. + (AC_DECL_YYTEXT): New AU macro. + * doc/autoconf.texi: Adjust. + +2000-05-10 Akim Demaille + + * aclang.m4 (AC_F77_NAME_MANGLING): Use AC_COMPILE_IFELSE. + Move the requirements to the top of the macro. + +2000-05-10 Akim Demaille + + Update and polish the documentation. + + * doc/autoconf.texi: Use @sc where upper case names were used. + Remove a few useless `dnl'. + Convert some `dnl' into comments. + Promote `$(foo)' in Makefiles, not `${foo}'. + Promote `$foo' in shell scripts, not `${foo}'. + Promote `foo = bar' in Makefiles, not `foo=bar'. + (Language Choice): Document `AC_LANG', move `AC_LANG_C', + `AC_LANG_CPLUSPLUS' and `AC_LANG_FORTRAN77' to + (Old Macros): here. + * doc/install.texi: Fix a typo in the specification of the system + quadruples. + +2000-05-10 Akim Demaille + + * libm4.m4 (m4_foreach): Rewritten so that it does not require + lists in between parens. + (m4_foreach_quoted): new copy of the previous `m4_foreach' which + is still used by `m4_wrap'. + * acgeneral.m4 (AC_INCLUDE, AC_INCLUDES): Removed. + (AC_FOREACH): Don't use parens with `m4_foreach'. + (AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES): Adjust the + description. + * acspecific.m4 (AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLKSIZE, + AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_RDEV): Adjust. + * autoconf.texi (AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES): + Adjust their documentation. + (AC_INCLUDE): Undocument. + * tests/semantics.m4: Adjust. + * tests/actest.m4: Rename as... + * tests/aclocal.m4: this. + * tests/atspecific.m4: No longer include actest.m4. + * tests/torture.m4: Likewise. + * tests/Makefile.am: Adjust. + +2000-05-10 Akim Demaille + + * doc/autoconf.texi (Obsolete Macros): Document `AU_DEFUN'. + Move the documentation of `AC_OBSOLETE' from here, to... + (Old Macros): here. + * acspecific.m4 (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV): + AU_DEFUN'd. + +2000-05-10 Akim Demaille + + * acgeneral.m4 (AC_LIBOBJ_DECL, AC_LIBOBJ): New macros. + (AC_REPLACE_FUNCS): Use AC_LIBOBJ. + * acspecific.m4 (AC_FUNC_MKTIME, AC_FUNC_MEMCMP, + AC_STRUCT_ST_BLOCKS): Use AC_LIBOBJ. + * doc/autoconf.texi : Adjust so that the user is not encouraged to + use LIBOBJS directly. + (Generic Functions): Document AC_LIBOBJ_DECL and AC_LIBOBJ. + +2000-05-09 Jim Meyering + + * acgeneral.m4 (AC_SEARCH_LIBS): Remove double quotes around `no'. + +2000-05-09 Akim Demaille + + * acgeneral.m4 (_AC_OUTPUT_FILES): Don't automatically spit + `Generated by...' in Makefiles. + Fixes Autoconf/102. + +2000-05-09 Akim Demaille + + Let `config.status' use a private temp dir. + Suggested by Jim Meyering. + + * acgeneral.m4 (_AC_SHELL_TMPDIR): New macro. + (_AC_OUTPUT_CONFIG_STATUS): Use it. + Use more quoted here docs to improve readability. + Compute `$me' and use it in the error messages. + Define `$configure' and `$configure_args' to avoid continuously + mixing the uses of `configure' and `config.status' evaluation in a + single line. + Define `$SHELL' and use it. + Simplify all the unjustified `[\$]foo' into `\$foo', the quotes + are needed only for `\$[1]', `\$[@]' etc. + Replace all the uses of `ac_cs_root' with files in the tmp dir of + `config.status'. + Remove a few `rm' covered by the removal of the `$tmp' dir. + Let `config.status' support `--debug'. + (_AC_INIT_PREPARE): Avoid the leading space in `ac_configure_args'. + * doc/autoconf.texi (Invoking config.status): Adjust. + +2000-05-05 Jim Meyering + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Set up traps to remove + temporaries upon exit, too, not just upon receipt of signal. + +2000-05-05 Akim Demaille + + AC_CHECK_PROG macro fails if REJECT value is set under Digital + Unix 4.0x and 5.0 because `"$@"' expands into an empty parameter + (instead of nothing) when there are no positional parameters. + From Nicolas Joly. + + * acgeneral.m4 (AC_CHECK_PROG, AC_CHECK_PROGS): Prefer + `$$1' to `[$]$1', `$foo' to `[$]foo', `$[1]' to `[$]1', and + `${1+"$[@]"}' to `"[$]@"'. + +2000-05-04 Akim Demaille + + AC_PREREQ understands `2.14a' as `2.141'. + Reported by Didier Verna. + + * acgeneral.m4 (AC_PREREQ): Don't quote AC_ACVERSION. + +2000-05-04 Akim Demaille + + * acgeneral.m4 (AH_TOP, AH_BOTTOM): New macros. + (_AH_COUNTER): New variable. + * tests/tools.m4 (autoheader): Check their proper functioning. + +2000-05-04 Akim Demaille + + * doc/autoconf.texi (Obsolete Macros): Rename as... + (Obsoleting Macros): this. + (Old Macros): Rename as... + (Obsolete Macros): this. + Be a section of... + (Obsolete Constructs): New chapter. + (Invoking autoheader): Move the `acconfig.h' documentation to... + (acconfig.h): here, new section of `Obsolete Constructs'. + (Autoheader Macros): Document AH_VERBATIM, AH_TEMPLATE, AH_TOP and + AH_BOTTOM. + +2000-05-03 Nicolas Joly + + * autoheader.sh (config_h): Sort the templates. + Under NetBSD 1.4.1 /bin/sh `set' command does not return a sorted + variables list. + +2000-05-03 Akim Demaille + + * tests/tools.m4 (autoheader): Don't pass `-l at_srcdir' to + `autoheader', since `acconfig.h' is created in the build dir. + There's one empty line less in `config.h.in' than before when + using `acconfig.h'. + +2000-05-03 Akim Demaille + + Simplify the handling of `acconfig.h'. + + * autoheader.sh: No longer try to select the needed paragraphs of + `acconfig.h', just dump everything into `config.h.in'. + Implement support for `--warnings'. + Warn the users that these auxiliary files are obsolete when `-W + obsolete'. + * doc/autoconf.texi (Invoking autoheader): Adjust. + +2000-05-03 Akim Demaille + + Support of acconfig.h was broken. Fix and test. + Reported by Jim Meyering. + + * autoheader.sh: Trace AC_DEFINE and AC_DEFINE_UNQUOTED to build + the list of $syms which are defined. + * tests/tools.m4 (autoheader): New test. + +2000-05-03 Akim Demaille + + Rename the language FORTRAN77 as Fortran 77. + + * aclang.m4 (AC_LANG(FORTRAN77), AC_LANG_SOURCE(FORTRAN77), + AC_LANG_PROGRAM(FORTRAN77), AC_LANG_CALL(FORTRAN77)): Rename as... + (AC_LANG(Fortran 77), AC_LANG_SOURCE(Fortran 77), + AC_LANG_PROGRAM(Fortran 77), AC_LANG_CALL(Fortran 77)): This. + (AC_LANG_FORTRAN77): Adjust. + +2000-05-03 Akim Demaille + + Provide a macro to canonicalize a configuration name. + Suggested by Ralf Corsepius. + + * acgeneral.m4 (AC_CANONICALIZE): New macro. + (_AC_CANONICAL_THING): Use it. + + + Change the defaults for build, host, and target systems: + build defaults to `config.guess`. + host defaults to $build. + target defaults to $host. + Suggested by Mo DeJong, Pavel Roskin, Tom Tromey, Ian Lance + Taylor, and many others. + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Set `$build', `$host' and + `$target' to nothing instead of NONE. + (AC_CANONICAL_SYSTEM): AU_DEFUN'd as `AC_CANONICAL_TARGET'. + (_AC_CANONICAL_THING): Use an explicit m4_case to set the defaults + depending upon the THING. + Implement the default values. + (AC_CANONICAL_TARGET): Handle the `AC_ARG_PROGRAM' part + `AC_CANONICAL_SYSTEM' used to provide. + * doc/autoconf.texi: Adjust. + + + When receiving an explicit argument, consider this is a default + for --build, --host and --target (unless set). + Some scripts might still depend on this historical syntax. + Suggested by Alexandre Oliva. + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Do that. + (_AC_CANONICAL_THING): Drop the support of `$nonopt'. + + + Documenting --build, --host and --target when configure does not + handle them causes confusion. + Suggested by Pavel Roskin. + Nevertheless configure must not die on such an `unsupported' + option: it does happen that people build an entire tree of + packages, some of them expecting `--host' etc. some others not. + Stressed by Tom Tromey and Ian Lance Taylor. + + * acgeneral.m4 (HELP_CANON): New diversion. + (_AC_INIT_PARSE_ARGS): Don't document these options. + (AC_CANONICAL_BUILD, AC_CANONICAL_HOST, AC_CANONICAL_TARGET): + Document your associated option. + +2000-04-28 Akim Demaille + + Don't double quote in AC_MSG_*. + + * acgeneral.m4 (_AC_SH_QUOTE): Don't double quote. Escape the + double quotes too. + (_AC_ECHO_UNQUOTED): Don't double quote :). + (_AC_ECHO, _AC_ECHO_N): Quote the call to _AC_SH_QUOTE. + + The autoheader chain needs to be adjusted. + + * acgeneral.m4 (AH_VERBATIM): Just pass two arguments to AH_OUTPUT + instead of trying to build what `autoheader' needs: let it handle + the format by itself. + * autoheader.m4: Adjust. + s,tmp/config.h,tmp/config.hin. + + The adjustment revealed that `autoconf --trace' is not robust to + single quotes in its argument. + + * autoconf.sh: Fix this issue. + Rename the escape `$*' as `$%'. Implement `$@'. + * doc/autoconf.texi: Adjust. + +2000-04-28 Akim Demaille + + mawk suffers a severe performance loss when using `sub' with a + changing value. On the `configure' script of the fileutils: + mawk '{ sub (/foo/, foo++) }' -> 14s. + mawk '{ if ($0 ~ /foo/) sub (/foo/, foo++) }' -> 0.03s. + mawk '{ sub (/foo/, foo) }' -> 0.03s. + + * autoconf.sh (task script, AWK script): Run `sub (__oline__, + oline)' only in the lines that match `__oline__'. + Suggested by Paul Eggert. + +2000-04-28 Akim Demaille + + * autoconf.sh (options handling::-W*): Strip two leading chars, not + just one. + +2000-04-20 Dave Love + + * acspecific.m4 (AC_FUNC_MKTIME): Use AC_SUBST. + +2000-04-12 Akim Demaille + + Provide a fine grained control over autoconf's warnings. + + * acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE): + New macros. + (AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ, + AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE. + * autoconf.sh: Provide support for `--warnings', `-W'. + * doc/autoconf.texi (Invoking autoconf): Adjust. + (Reporting Messages): New section. + +2000-04-12 Akim Demaille + + * acgeneral.m4 (_AC_INIT_HELP): Move --srcdir in the first + section. + Document --help=short and recursive. + Split the `Directory' section into `Installation directories' for + --prefix and --exec-prefix, and all the others into `Fine tuning + of the installation directories'. + In the latter, don't repeat `in DIR', the user understands, and it + comes out better. + Default for --exec-prefix is PREFIX. + Reported by Kathryn Hargreaves. + Move --host before --build. + Fix a test on `$ac_init_help' which was not updated. + +2000-04-11 Akim Demaille + + Have `make check' succeed with CC=g++. + + * tests/atspecific.m4 (AT_TEST_MACRO): Don't check `env-after' if + the file does not exist, which may happen when a `configure' exits + brutally. + * tests/semantics.m4 (AC_CHECK_MEMBERS, AC_CHECK_TYPES): ANSI C++ + forbids members named like their hosting struct, so don't do it. + +2000-04-11 Akim Demaille + + * autoscan.pl: Reindent using 2 spaces, not 4. + Use `#' to denote Autoconf comments, not `dnl'. + Put a few `\' here and there to avoid misfontification and + misindentation. + Use your base name when reporting errors. + (parse_args::usage): Use $0, use the same order as the other + executables. + (parse_args): Don't dump `--help' on cmd line errors. + +2000-04-11 Akim Demaille + + * acgeneral.m4 (AC_PROVIDE_IF): Rename as... + (AC_PROVIDE_IFELSE): this. Change all callers. + Spread the use of AC_PROVIDE_IFELSE, no macro should know how + AC_PROVIDE names its internal variables. + +2000-04-11 Akim Demaille + + * acgeneral.m4: Simplify all the `foo="$bar"' into `foo=$bar'. + * acspecific.m4: Likewise. + * aclang.m4: Likewise. + +2000-04-11 Akim Demaille + + Move obsolete macros' definitions out of the way. + + * doc/autoconf.texi (Old Macro Names): Rename as... + (Old Macros): this. Change the @table enumeration into a list of + @defmac. + (AC_CHECKING, AC_CHECK_TYPE, AC_COMPILE_CHECK, AC_C_CROSS, + AC_DYNIX_SEQ, AC_HAVE_LIBRARY, AC_IRIX_SUN, AC_LINK_FILES, + AC_OUTPUT, AC_OUTPUT_COMMANDS, AC_SCO_INTL, AC_VERBOSE, + AC_XENIX_DIR): Move their descriptions into here. + Kill a few TeX warnings. + +2000-04-11 Akim Demaille + + * acgeneral.m4 (AC_MSG_ERROR_UNQUOTED): Remove. + (AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED): Output to the log too. + (AC_CHECKING, AC_VERBOSE): AU_ define. + +2000-04-07 Akim Demaille + + * acgeneral.m4: s/1>&/>&/g. + (AC_FD_LOG): New macro, replaces... + (AC_FD_CC): this. Provide an AU definition. + (_AC_ECHO_UNQUOTED, _AC_ECHO_N): Use m4_default. + +2000-04-05 Akim Demaille + + At the end of `./configure', save the cache values, and the CPP + values. + + * acgeneral.m4 (_AC_CACHE_DUMP): New macro. + (AC_CACHE_SAVE, AC_OUTPUT): Use it. + (AC_OUTPUT): Dump confdefs.h into config.log. + (_AC_INIT_PREPARE::config.log): Name the package being configured + if you can. + +2000-04-05 Steven G. Johnson + + Disable caching by default, so as not to cause problems when + newbies accidentally use a stale cache file. + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Set cache_file to /dev/null + to disable caching by default. + (_AC_INIT_HELP): Adjust the --help message. + (AC_CACHE_LOAD, AC_CACHE_SAVE): Don't print "loading/updating + /dev/null" messages. + * autoconf.texi: Note that caching is disabled, how to enable it, + and that `./config.cache' is the traditional name of the cache file. + * install.texi: Likewise. + +2000-04-03 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): If any option waiting for a + directory receives a relative path, die (bindir, sbindir, + libexecdir, datadir, sysconfdir, sharedstatedir, localstatedir, + libdir, includedir, oldincludedir, infodir, mandir, exec_prefix, + prefix). Fixes Autoconf 42. + +2000-04-03 Akim Demaille + + * doc/autoconf.texi (Canonicalizing): Officially recognize + AC_CANONICAL_TARGET and AC_CANONICAL_BUILD. + +2000-04-03 Akim Demaille + + * doc/autoconf.texi (Writing configure.in): Explain what Autoconf + is. Explain how to use the quotation scheme used in Autoconf. + (Quoting): Update. Do not advocate changequote. + +2000-03-30 Steven G. Johnson + + Fix F77 name-mangling macros to work with cached values (so + they don't break the second time you run configure). + + * aclang.m4 (AC_F77_NAME_MANGLING): Extract f77_case, + f77_underscore from cache variable. + (AC_F77_WRAPPERS): Get rid of ac_cv_f77_wrappers, it's useless. + Simplify the nested case-esac into a single one. + Simplify the documentation strings of CPP symbols. + +2000-03-31 Akim Demaille + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix the accumulation in + CONFIG_HEADERS. + +2000-03-31 Akim Demaille + + * autoheader.sh: Catch up with the `mktemp -d' changes in + autoconf.sh. + * autoupdate.sh: Likewise. + +2000-03-31 Steven G. Johnson + + * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): bug fix in F77 test program + (missing whitespace--F77 requires program statements to start in + column 7). + +2000-03-29 Akim Demaille + + Rewrite the autoheader chain on top of `autoconf --trace'. + + * autoheader.m4: Dispatch the prototypes next to there AC_ + siblings. + (AH_TEMPLATE, AH_VERBATIM): Move to... + * acgeneral.m4: here. + (AH_OUTPUT): New macro. + * autoheader.sh: Run `autoconf --trace' instead of `m4 autoheader.m4'. + * autoheader.m4: Remove. + * Makefile.am: Adjust. + * tests/tools.m4 (AH_DEFUN): Remove, no longer makes sense. + * tests/actests.m4 (autoheader::AC_TATOOINE): Remove, was used by + the test above. + +2000-03-29 Akim Demaille + + silent.m4 depends upon the current quotation in m4, which changes + if `-i' is used or not. + + * autoconf.sh (trace::silent.m4): Removed. + (trace::run_m4_trace): Pass -Derrprint. + +2000-03-29 Akim Demaille + + Use `mktemp -d' when possible to create securely a tmp work dir. + + * autoconf.sh: Use it when possible to create the dir $tmp. + Stop using variables for tmp files, use their names in $tmp. + [install]: Use the new features of autoconf --trace. + +2000-03-28 Akim Demaille + + Probably all the versions of bash up to 2.04 fail on + fnmatch ("/tmp", "[/\\\\]") + The backslash must not be last. + + * acgeneral.m4 (_AC_INIT_HELP, AC_PATH_PROG, _AC_OUTPUT_FILES, + _AC_OUTPUT_LINKS, _AC_OUTPUT_SUBDIRS): Always make `\\' be the + first character in all the `[]' of `case' patterns. + +2000-03-27 Akim Demaille + + * acgeneral.m4 (_AC_CHECK_TOOL_PREFIX): Rename back as + AC_CHECK_TOOL_PREFIX since some packages rely on it. + +2000-03-27 Akim Demaille + + Move all the language dependent macros into aclang.m4. + + * aclang.m4: New file. + * autoconf.m4: Include it. + * autoheader.m4: Likewise. + * autoupdate.m4: Likewise. + * Makefile.am: Adjust. + * test/Makefile.am: Likewise. + * acgeneral.m4 (AC_LANG_CASE,AC_LANG_SAVE, _AC_LANG_DISPATCH, + AC_LANG, _AC_LANG_CURRENT, AC_LANG_SOURCE, AC_LANG_PROGRAM, + AC_LANG_CALL, AC_LANG(C), AC_LANG_SOURCE(C), AC_LANG_PROGRAM(C), + AC_LANG_CALL(C), AC_LANG(C++), AC_LANG_SOURCE(C++), + AC_LANG_PROGRAM(C++), AC_LANG_CALL(C++), AC_LANG(FORTRAN77), + AC_LANG_SOURCE(FORTRAN77), AC_LANG_PROGRAM(FORTRAN77), + AC_LANG_CALL(FORTRAN77): Move to... + * aclang.m4: here. + * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77, + AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS, AC_PROG_F77_WORKS, + AC_PROG_CC_GNU, AC_PROG_CXX_GNU, AC_PROG_F77_GNU, AC_PROG_CC_G, + AC_PROG_CXX_G, AC_PROG_F77_G, AC_PROG_GCC_TRADITIONAL, + AC_PROG_CC_C_O, AC_PROG_F77_C_O, AC_PROG_CC_STDC, AC_PROG_CPP, + AC_PROG_CXXCPP, AC_REQUIRE_CPP, AC_PROG_LEX, AC_TYPE_MODE_T, + AC_C_CROSS, AC_C_CHAR_UNSIGNED, AC_C_LONG_DOUBLE, AC_C_BIGENDIAN, + AC_C_INLINE, AC_C_CONST, AC_C_VOLATILE, AC_C_STRINGIZE, + AC_C_PROTOTYPES, AC_F77_LIBRARY_LDFLAGS, AC_F77_NAME_MANGLING, + AC_F77_WRAPPERS): Move to... + * aclang.m4: here. + +2000-03-27 Akim Demaille + + * autoconf.sh (trace): Let translate_awk do the whole translation + from `$trace' to the m4 program. + +2000-03-27 Akim Demaille + + * acgeneral.m4 (AC_PACKAGE): Also define AC_PACKAGE_STRING. + Use it here and there. + +2000-03-27 Ralf Corsepius + + * acgeneral.m4 (_AC_INIT_HELP, _AC_OUTPUT_SUBDIRS): Fix the DOS + absolute path pattern: s/?:[[/\\]]/?:[[/\\]]*/. + +2000-03-25 Akim Demaille + + * acgeneral.m4 (_AC_CANONICAL_TARGET, _AC_CANONICAL_BUILD): Rename + as (AC_CANONICAL_TARGET, AC_CANONICAL_BUILD), although internal, + too much foreign code depends upon them. + +2000-03-25 Akim Demaille + + * autoconf.sh (translate_awk): `> "/dev/stderr"' is not portable + to systems without a real /dev/stderr in the file system or if not + using one of the three free awks. Use + print message | "cat >&2" + ... + END { close("cat >&2") } + From Aharon Robbins. + +2000-03-25 Akim Demaille + + * autoheader.sh (checking completeness): Be ready to recognize + patterns with a value, and spaces between `#' and the directive, e.g. + # define FOO FIXME: + Reported by John Fortin. + +2000-03-25 Akim Demaille + + * acgeneral.m4 (AC_RUN_IFELSE): New macro. + (AC_TRY_RUN_NATIVE): Remove. + (AC_TRY_RUN): Use AC_RUN_IFELSE, not AC_TRY_RUN_NATIVE. + +2000-03-25 Akim Demaille + + * acgeneral.m4 (AC_CHECK_LIB): Ah ah! I recognized you, even + masked: you are AC_TRY_LINK_FUNC. + Fix quotation. + (AC_SEARCH_LIBS): Use AC_SHELL_IFELSE. + +2000-03-25 Akim Demaille + + * tests/semantics.m4 (AC_TRY_LINK_FUNC, AC_CHECK_LIB): New tests. + +2000-03-25 Akim Demaille + + * acgeneral.m4 (AC_LANG_CALL, AC_LANG_CALL(C), AC_LANG_CALL(C++), + AC_LANG_CALL(FORTRAN77)): New macros. + (AC_TRY_LINK_FUNC): Use it. + (AC_TRY_CPP): Argument was output twice. + (AC_COMPILE_IFELSE, AC_LINK_IFELSE): Output $3 only if needed. + +2000-03-25 Akim Demaille + + * acgeneral.m4 (AC_TRY_COMPILER): Use AC_LINK_IFELSE. + (AC_TRY_LINK_FUNC, AC_CHECK_LIB, AC_CHECK_FUNC): Don't check that + the current language is C++ to output `extern "C"': the CPP + condition is enough. + +2000-03-25 Akim Demaille + + * acgeneral.m4 (AC_LINK_IFELSE, AC_COMPILE_IFELSE): New macros. + (AC_TRY_LINK, AC_TRY_COMPILE): Use them. + (AC_CHECK_MEMBER, AC_COMPILE_CHECK, AC_CHECK_DECL, + _AC_CHECK_TYPE_NEW): Adjust. + * acspecific.m4 (AC_DECL_YYTEXT, AC_PATH_XTRA): Adjust. + +2000-03-23 Steven G. Johnson + + * acspecific.m4 (AC_F77_NAME_MANGLING): Need to use + AC_F77_LIBRARY_LDFLAGS when linking C and Fortran code. + +2000-03-23 Akim Demaille + + * acgeneral.m4 (AC_LANG_PROGRAM, AC_LANG_PROGRAM(C), + AC_LANG_PROGRAM(C++), AC_LANG_PROGRAM(FORTRAN77)): New macros. + (AC_TRY_COMPILE, AC_TRY_LINK): Use them. + +2000-03-23 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Support --help={long, short, + recursive}. + (_AC_INIT_HELP): Propagate --help=recursive to CONFIG_SUBDIRS. + Code stolen from... + (AC_OUTPUT_SUBDIRS): s/ac_config_dir/ac_subdir/g. + +2000-03-23 Lars J. Aas + + * libm4.m4 (m4_do): New macro. + +2000-03-21 Akim Demaille + + Provide a language independent means to generate language specific + programs. + + * acgeneral.m4 (_AC_LANG_DISPATCH): New macro. + (AC_LANG): Use it. + (AC_LANG_SOURCE, AC_LANG_SOURCE(C), AC_LANG_SOURCE(C++), + AC_LANG_SOURCE(FORTRAN77)): New macros. + (AC_TRY_COMPILER, AC_EGREP_CPP, AC_TRY_RUN_NATIVE): Use + AC_LANG_SOURCE. + +2000-03-21 Akim Demaille + + Fix a bug: some macros (e.g., AC_REVISION, AC_COPYRIGHT etc.) can + be used before AC_INIT, but they do require it. But then, the + argument of the explicit AC_INIT call is lost. + + * acgeneral.m4 (AC_CONFIG_SRCDIR): New macro. + (_AC_INIT_SRCDIR): Adjust. + (_AC_INIT): Pass your argument to AC_CONFIG_SRCDIR. + +2000-03-21 Akim Demaille + + * tests/semantics.m4 (AC_PATH_PROG, AC_PATH_PROGS): New tests. + +2000-03-21 Akim Demaille + + Start the language support overhaul: Introduce AC_LANG(). + + * acgeneral.m4 (AC_LANG): Renamed as _AC_LANG_CURRENT. + (AC_LANG, AC_LANG(C), AC_LANG(C++), AC_LANG(FORTRAN77)): New + macros. + (AC_LANG_C, AC_LANG_CPLUSPLUS, AC_LANG_FORTRAN): AU_DEFUN'ed. + Adjust all callers. + * acspecific.m4 (AC_F77_NAME_MANGLING): Remove the exceeding + AC_LANG_RESTORE. + * tests/Makefile.am (FILTER_MACROS): Add AC_LANG. + +2000-03-21 Akim Demaille + + Speed ups. + + * libm4.m4 (m4_append, m4_list_append): Use m4_define, not define. + On my machine the former implementation takes 4mn 40s to run the + test suite. Using m4_define leads to 4mn 15s. + * acgeneral.m4 (_AC_SUBST): Use AC_EXPAND_ONCE (which uses + m4_define, not define). 4mn. + (_AC_DIVERT): Don't use m4_case. Starting from those 4mn, if you + just move NORMAL* first in m4_case, the test suite is run in 3mn. + If instead of using m4, you use an `associative array' plus a + wrapper (current implementation), it falls to 2mn. + +2000-03-21 Akim Demaille + + * tests/tools.m4 (autoconf --trace): New test. + +2000-03-21 Akim Demaille + + * autoconf.sh (task trace): Pipe the output of the first m4 into + the second one, instead of saving to a tmp file, so that we can + trace endless configure.in expansion. + +2000-03-21 Akim Demaille + + Uniform idioms. + + * acgeneral.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, + _AC_OUTPUT_LINKS, _AC_OUTPUT_COMMANDS): Prefer + for i in : $is; do test $i = : && continue + over + for i in .. $is; do if test $i != ..; then + +2000-03-21 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PREPARE, _AC_INIT_PARSE_ARGS): Move more + initializations to... + (_AC_INIT_DEFAULTS): here. + +2000-03-21 Akim Demaille + + Give a means to compute `srcdir' earlier in configure. + + * acgeneral.m4 (_AC_INIT_SRCDIR): New macro, pulled out from... + (_AC_INIT_PREPARE): No longer compute `srcdir'. + (_AC_INIT): Use _AC_INIT_SRCDIR. + (AC_INIT): Don't forget to pass the argument to _AC_INIT. + +2000-03-20 Jim Meyering + + * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Don't test for existence + of $ac_xdir. Not only is `test -e' not portable, but the test isn't + necessary at all; the following mkdir ends up accomplishing the + same goal. Suggestion from Alexandre Oliva. + + * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT) [setting IFS]: Be careful + to use space, tab and new line, in precisely that order. + +2000-03-20 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Rename as _AC_OUTPUT_SUBDIRS. + No argument, use AC_LIST_SUBDIRS. + Adjust callers. + +2000-03-20 Akim Demaille + + * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Double quote the head + of the help snippet. + +2000-03-20 Akim Demaille + + Give an identity to `configure' scripts. + + * acgeneral.m4 (AC_PACKAGE): New macro. + (_AC_COPYRIGHT_SEPARATOR): Remove. + (AC_COPYRIGHT): Adjust. + (_AC_INIT_HELP, _AC_INIT_VERSION): Name the package you configure + when you want. + (_AC_INIT): Adjust. + * configure.in (AC_PACKAGE): Add. + +2000-03-20 Akim Demaille + + * acgeneral.m4: Formatting changes. + +2000-03-20 Akim Demaille + + Don't rely on RS = "\0" to swallow the whole input as a single + record, this is not portable: mawk and nawk understand it as RS = + "". gawk understands it as expected. + + * autoconf.sh (translate_awk::BEGIN): No longer change RS. + (translate_awk::body): Move to the END. + Instead, accumulate the input in `request'. + +2000-03-20 Akim Demaille + + * doc/autoconf.texi (Testing Values and Files): Be a subsection of + `Portable Shell Programming'. + (Shell Substitutions, Limitations of Usual Tools): New subsections. + +2000-03-17 Akim Demaille + + Use a single tool to reformat the raw `configure' script output by + m4. + Suggested by Paul Eggert. + + * autoconf.sh: Stop playing with 2 seds and an AWK to finalize + `configure', a single AWK program is enough. + +2000-03-17 Akim Demaille + + In Autoconf 2.13, although AC_OUTPUT_COMMANDS did double quote its + arguments, AC_OUTPUT arguments 2 and 3 were not! Currently, + AC_OUTPUT over quotes too: stop that. + Reported by Martin Buchholz. + + * doc/autoconf.texi (Output): Don't expand on the ternary + AC_OUTPUT. + * acgeneral.m4 (AC_OUTPUT): Don't over quote $2 and $3. + +2000-03-17 Joseph S. Myers + + * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Security fixes: create + the temp files in a private temporary directory, not directly in + TMPDIR. + +2000-03-17 Akim Demaille + + Install the IFS we need once for all. + + * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): New macro. + Handle the NLS envvars, and IFS. + (_AC_INIT_PREPARE): Use it, no longer set the NLS envvars. + (_AC_WHICH_A, AC_PATH_PROG): Rely on the default IFS. + * acspecific.m4 (AC_PROG_INSTALL, AC_FUNC_SELECT_ARGTYPES): + Likewise. + +2000-03-17 Akim Demaille + + * acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP, AC_TRY_COMPILE, + AC_TRY_LINK, AC_TRY_RUN_NATIVE): Simplify the removal of the + contest files: don't remove them before running the actions, just + remove them at the end of the macro. + +2000-03-16 Akim Demaille + + * acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): Use + : ${foo='some words'} + not + : ${foo=some words} + since this is not portable: Digital Unix v5.0: `bad substitution'. + From Nicolas Joly. + +2000-03-16 Lars J. Aas + + * libm4.m4 (m4_assert, m4_shiftn): New macros. + (m4_case,m4_match): Rewrite to use m4_shiftn (for readability reasons). + (m4_for): Add the STEP argument and some argument-verifying asserts. + (m4_split): Correct spaces to tabulator in regexp. + +2000-03-15 Akim Demaille + + Revamp AC_FUNC_SELECT_ARGTYPES. + + * acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): Use a single cache + variable instead of three. + Use AC_CACHE_CHECK. + Shorten the name of the var loops, they are no longer cached. + Include sys/types.h unconditionally. + `select' returns an int, fixes Autoconf/46. + Don't display parens in the user messages. + +2000-03-14 Akim Demaille + + * autoheader.sh: Use run_m4f, not run_m4. + +2000-03-14 John David Anglin + + * tests/actest.m4 (AC_ENV_SAVE): Don't consider RANDOM and LINENO + which some shells update. At least ksh on HP-UX 10.20 and sh on + IRIX 6.5 do change their `RANDOM' even if `read' via `set'. + +2000-03-14 Akim Demaille + + * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): No use for @%:@ here, + no need to over quote $1 in the comments. + +2000-03-14 Akim Demaille + + * acgeneral.m4: Replace some ifelse with ifval or m4_default, or + even nothing when not needed. + * acspecific.m4: Likewise. + +2000-03-14 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PREPARE): Insert the Autoconf version in + config.log, and the command line which ran configure. + Kill a couple of useless quote around dollars. + +2000-03-14 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PREPARE): Kill a changequote in the + building of `ac_configure_args'. + +2000-03-14 Akim Demaille + + * acgeneral.m4 (AC_DIVERT): Rename _AC_DIVERT. + (AC_DIVERT): New macro. + Spread its use where better than a pair of AC_DIVERT_PUSH/POP. + +2000-03-14 Akim Demaille + + * acgeneral.m4 (_AC_INIT_BINSH): Remove, useless now that... + (AC_REVISION): Require AC_INIT, not _AC_INIT_BINSH. + (AC_INIT): Do what _AC_INIT_BINSH used to. + Don't require _AC_INIT_VERSION, just call it. + Rename as _AC_INIT. + (AC_INIT): New macro, single expansion wrapper around _AC_INIT. + (_AC_COPYRIGHT_SEPARATOR): New. + (AC_COPYRIGHT): Use it. + Require AC_INIT, not _AC_INIT_VERSION. + * doc/autoconf.texi (Versions): Promote as first section of + `Setup'. + Rename as `Notices'. + Document AC_COPYRIGHT. + Don't give false reasons for placing AC_REVISION before AC_INIT, + the place no longer matters. + +2000-03-14 Akim Demaille + + * autoconf.sh (trace_m4::smash): Double quote, we don't want the + result to be evaluated. + +2000-03-14 Akim Demaille + + * acgeneral.m4: s/@%:@line __oline__/#line __oline__/g. __oline__ + is not a macro, so there is just no use in avoiding `#'. + +2000-03-14 Akim Demaille + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): When there were no + CONFIG_FILES, we had to expand _AC_OUTPUT_FILES into the KILL + diversion, because it is AC_OUTPUT_FILES which undiverted the + AC_SUBST sed script at its proper place, otherwise it would have + been undiverted at the end of `configure', leading to an sh syntax + error. + Now that we no longer use a diversion, we don't need to call + AC_OUTPUT_FILES if useless. + (AC_OUTPUT_FILES): Rename as _AC_OUTPUT_FILES. + (AC_OUTPUT_LINKS): Rename as _AC_OUTPUT_LINKS. + +2000-03-14 Akim Demaille + + AC_ARG_PROGRAM must not be expanded twice, which is likely since + Automake calls it, and usually users do too. If it happens, + `--program-prefix=g' actually prepend two (or more) `g'. + + * acgeneral.m4 (AC_DEFUN_ONCE): New macro. + (AC_ARG_PROGRAM): AC_DEFUNed_ONCE. Or is it AC_DEFUN_ONCE'd? :). + No longer AC_EXPAND_ONCE the help string, the macro itself is + expanded at most once. + Rename the here-doc tag EOF_SED as EOF. + +2000-03-14 Akim Demaille + + Get rid of the ICMDS diversion. + + * acgeneral.m4 (AC_DIVERT): Remove ICMDS. + (_AC_OUTPUT_COMMANDS_INIT): New growing string. + (_AC_CONFIG_COMMANDS_INIT, _AC_OUTPUT_CONFIG_STATUS): Adjust. + +2000-03-14 Akim Demaille + + Introduce AC_SUBST(VAR, VAL). + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Stop global double quoting, + failed experiment. + Merge all the var=val AC_SUBST(var) into AC_SUBST(var, val). + (AC_SUBST): Implement support for 2nd arg. + * doc/autoconf.texi (Setting Output Variables): Adjust. + +2000-03-13 Akim Demaille + + Simplify the diversions naming system. + Suggested by Alexandre Oliva and Lars J. Aas + + * libm4.m4 (ifndef): New macro. + * acgeneral.m4 (AC_DIVERT): New macro, maps a diversion name to + its value. The diversions now have a short name, e.g., `NOTICE', + instead of the former macros which had long names, e.g., + `AC_DIVERSION_NOTICE'. + (AC_DIVERT_PUSH): Adjust. + (AC_DIVERT_POP): Use ifndef. + (AC_DIVERSION_CURRENT): Rename as `AC_DIVERT_DIVERSION' to stay + within the `AC_DIVERT' name domain. + Adjust all callers. + * acspecific.m4: Adjust all callers. + +2000-03-13 Akim Demaille + + * doc/autoconf.texi (Invoking autoconf): Update documentation of + `autoconf --trace'. + +2000-03-13 Akim Demaille + + * autoconf.sh (tmpbase): New var. Adjust trap code and other tmp + file names. + (translate_awk::BEGIN): Set RS to "\0" so that the whole file be a + single record. + (translate_awk::trans): Convert from array to function. + (translate_awk::error): New function. + (translate_awk::main action): Implement support for ${sep}@ and + ${sep}*. Use trans() and error(). + (translate_awk): Don't put space before user functions call, it is + not portable. + Remove trailing `;', this is not C :). + (task trace): Quote `$traces' when you eval it, to protect the + white spaces. + Propagate `translate_awk' failures to `autoconf.sh'. + Translate the quadrigraphs. + +2000-03-13 Akim Demaille + + Trap on 0 is not executed when `exit' is called without argument. + + * autoheader.sh (trap 1 2 13 15): s/exit/exit $?/. + * autoconf.sh: Likewise. + Remove translate_awk too. + * autoupdate.sh: Likewise. + Handle `--debug'. + +2000-03-13 Akim Demaille + + More uniform style in scripts. + + * autoheader.sh: s/-eq/=/. + Uniform ordering of variable initializations, option handling. + Don't use quotes where useless (foo=$1, not foo="$1"). + Propagate `run_m4' and `run_m4f'. + Use `$0' in --help. + * autoconf.sh: Likewise. + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * ifnames.sh: Likewise. + * autoupdate.m4: Small bug: at the end `dnl' is disabled, so use + `m4_dnl'. + +2000-03-13 Akim Demaille + + `autoconf --trace': faster. + + * autoconf.sh (initialization): New var, new option. + (option loop): When you need an arg, make sure there is one. + (run_m4f): New var, which content is that of the former... + (run_m4): Don't use m4 frozen state files. + Change all callers. + Don't pass AC_LOCALDIR, not documented, and unused. + (task trace): Honor `--verbose' and `--initialization'. + (globally): Send `--verbose' messages in stderr. + Fix random typos. + +2000-03-13 Akim Demaille + + * acspecific.m4 (AC_PROG_BINSH): Removed. + +2000-03-13 Akim Demaille + + Start revamping `autoconf --trace'. + + * autoconf.sh (debug): New var, new option. + Adjust the trap code. + (task trace): Instead of decoding `m4 --trace' with sed, decode it + with m4 itself. + ($silent_m4): New file, which disables m4's `errprint'. + ($trace_m4): New file. Logistic for the m4 which is in charge of + decoding the traces of the first. + ($translate_awk): Transform a user trace request into $trace_m4 + code. + +2000-03-10 Akim Demaille + + Multiple `-e' to egrep are not portable. On IRIX 6.5 and Solaris + 2.5.1 only the last one is honored: + > printf "foo\nbar\n" | egrep -e 'foo' -e 'bar' + bar + > printf "foo\nbar\n" | egrep -e 'bar' -e 'foo' + foo + Reported by Nicolas Joly. + An alternative would have been to use `sed', unfortunately + alternation is not portable. + + * tests/actest.m4 (join): New macro. + (AC_ENV_SAVE): Join the egrep patterns into a single big one. + * tests/Makefile.am (EGREP_EXCLUDE): Rename as FILTER_MACROS. + Join the egrep patterns into a single big one. + +2000-03-10 Jim Meyering + + * acgeneral.m4 (_AC_CHECK_TOOL_PREFIX): Correct typos in definition: + add `_' prefix to make the function name match comments and existing + uses. Remove leading prefix from _AC_CANONICAL_HOST. + +2000-03-09 Ossama Othman + + * acspecific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Added some missing + headers if they exist (needed for some missing prototypes) and + corrects the signal handler prototype/definition. The signal + handler prototype is now prepended with an `extern "C"' for C++ + compilers since some platforms explicitly require an `extern "C"' + signal handler. + +2000-03-08 Akim Demaille + + * autoheader.m4 (autoheader::AC_CHECK_HEADERS_DIRENT): Rename as + (autoheader::_AC_CHECK_HEADERS_DIRENT): to cope with the new name + of the autoconf:: macro. + Fixes autoconf/119, reported by Raja R Harinath. + +2000-03-08 Akim Demaille + + * acgeneral.m4 (AC_PATH_PROG, AC_OUTPUT_FILES, AC_OUTPUT_SUBDIRS): + Fix quotation problems in DOS path handling. + +2000-03-08 Franz Sirl + + * acspecific.m4 (AC_FUNC_MMAP, AC_FUNC_ALLOCA): Make them C++ + safe: include the right headers, cast the allocations etc. + +2000-03-08 Akim Demaille + + The argument of AC_COPYRIGHT should be plain text, not an sh + comment. + + * libm4.m4 (m4_quote): s/$@/$*/. + * acgeneral.m4 (AC_COPYRIGHT): Prepend `# ' to the lines that go + on the top of `configure'. Actually, prepend `@%:@ ' so that + there are as many evaluations on both sides. + (_AC_INIT_VERSION): No longer strip `# '. + +2000-03-08 Akim Demaille + + * tests/Makefile.am (all-local): Remove. It wastes time to have + testsuite rebuilt each time an ac*.m4 file changes. It is enough + to build it for each `make check'. + +2000-03-08 Akim Demaille + + Leave a diversion exclusively for Copyright notices. + + * acgeneral.m4 (AC_DIVERSION_DEFAULTS): New diversion number. + (_AC_INIT_NOTICE): Move definition of `ac_includes_default' from + here... + (_AC_INIT_PREPARE): to here. + (_AC_INIT_NOTICE): Play with your diversion yourself, don't let + (AC_INIT): do it for you. + (_AC_INIT_DEFAULTS): New macro. + (AC_INIT): Use it. + +2000-03-08 Akim Demaille + + Provide a means to specify more Copyright information in + `configure'. And after all, it suits to `configure --version' too. + + * acgeneral.m4 (AC_DIVERSION_DEFAULTS, AC_DIVERSION_INIT_PREPARE): + New diversion numbers. + (AC_DIVERSION_INIT): Rename as... + (AC_DIVERSION_INIT_PARSE_ARGS): this. + (AC_DIVERT_POP): Instead of going into wild endless loops when + there are more pops than pushes, die with dignity. + (AC_COPYRIGHT): New macro. + (_AC_INIT_NOTICE): Move definition of `ac_includes_default' from + here... + (_AC_INIT_PREPARE): to here. + (_AC_INIT_NOTICE): Remove. + (AC_INIT): Use it to install Autoconf's Copyright. + (_AC_INIT_DEFAULTS): New macro. + (AC_INIT): Use it. + (AC_PREFIX_DEFAULTS): Dump in AC_DIVERSION_DEFAULTS. + (_AC_INIT_PARSE_ARGS): Dump in AC_DIVERSION_INIT_PREPARE. + +2000-03-08 Akim Demaille + + We don't need _AC_ARG_*_HELP_PROLOGUE. + + * acgeneral.m4 (AC_EXPAND_ONCE): AC_PROVIDE yourself, in case + there is no AC_DEFUN associated with the text to expand. + (_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE, + _AC_ARG_VAR_HELP_PROLOGUE): Remove, instead... + (AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): do it yourself. + +2000-03-08 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Fix copy n' paste typos in + `--with-*', `--without-*' and `*' decoding. + Reported by Raja R Harinath. + Fixes autoconf/118. + +2000-03-08 Akim Demaille + + Don't dump AC_ARG_PROGRAM help messages if not used. + + * acgeneral.m4 (_AC_INIT_HELP): Don't. + (AC_ARG_PROGRAM): Do. + +2000-03-08 Akim Demaille + + Don't dump X help messages when `configure' does not check for X. + + * acgeneral.m4 (_AC_INIT_HELP): Don't dump X help messages. + * acspecific.m4 (AC_PATH_X): Do it. + +2000-03-08 Akim Demaille + + No longer rely on /bin/sh to compose the optional parts of + `configure --help'. + + * acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE, + AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR, + AC_DIVERSION_HELP_END): New diversion numbers. + (AC_EXPAND_ONCE): New macro. + (AC_PROVIDE_IF): New macro. + (AC_BEFORE, AC_REQUIRE): Use it. + (AC_REQUIRE): Don't use indir. + (_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE, + _AC_ARG_VAR_HELP_PROLOGUE): New macros. + (AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the + _HELP_PROLOGUE macro which corresponds. + (_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and + AC_DIVERSION_HELP_END. + (_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled + the optional help strings. + +2000-03-08 Akim Demaille + + AC_OUTPUT_COMMANDS no longer uses a diversion. + + * acgeneral.m4 (AC_DIVERSION_CMDS): Removed. + (_AC_OUTPUT_CONFIG_STATUS): Don't undivert it. + +2000-03-08 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Fix quoted/non quoted here + document problems. + +2000-03-08 Akim Demaille + + * acgeneral.m4 (AC_INIT_BINSH, AC_INIT_NOTICE, AC_INIT_PREPARE): + Rename as... + (_AC_INIT_BINSH, _AC_INIT_NOTICE, _AC_INIT_PREPARE): this. + All callers adjusted. + +2000-03-08 Akim Demaille + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Rename as... + (_AC_INIT_PARSE_ARGS): this. + Move the display of help and version strings to... + (_AC_INIT_HELP, _AC_INIT_VERSION): here. + (AC_INIT): Adjust. Also, fix quotation. + +2000-03-08 Akim Demaille + + Some tests are failing with srcdir != builddir, because they can't + find config.guess, install-sh etc. + Reported by Erez Zadok. + + * tests/atspecific.m4 (AT_TEST_MACRO): Set AC_CONFIG_AUX_DIR to + top_srcdir in configure.in, and pass the value of top_srcdir to + configure. + +2000-03-08 Akim Demaille + + * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH, AC_PATH_PROG, + AC_PATH_PROGS, AC_PATH_TOOL, AC_CHECK_TOOL, AC_PREFIX_PROGRAM, + AC_EGREP_CPP, AC_TRY_LINK, AC_COMPILE_CHECK, AC_TRY_RUN_NATIVE): + Use ifval instead of ifelse. + +2000-03-07 Mark Elbrecht + + Support absolute DOS-style paths. + + Any character before the colon is accepted because network drives + can be assigned characters outside the [a-zA-Z] range. DOS-style + relative paths (?:foo/bar) are also considered absolute for + Autoconf's purposes since the path '../?:foo/bar' is invalid. + + * acgeneral.m4 (AC_OUTPUT_FILES): Treat DOS-style paths (?:*') as + absolute. + (AC_OUTPUT_SUBDIRS): Likewise. + (AC_PATH_PROG): Make pattern for matching DOS-style paths the same + as that used in AC_OUTPUT_FILES and AC_OUTPUT_SUBDIRS. + +2000-03-06 Akim Demaille + + * tests/atspecific.m4 (m4_match): Remove, no longer used. + +2000-03-04 Jim Meyering + + * autoheader.sh: Use `rm -f', not just `rm' when removing temporaries. + Preserve exit status in trap handler. + Based on suggestions from Paul Eggert. + +2000-03-03 Paul Eggert + + Move the quadrigraphs out of the user name space. + + * acgeneral.m4: 's/\@BKL@/@<:@/g', 's/\@BKR@/\@:>@/g', + 's/\@DLR@/\@S|@/g', 's/\@PND@/@%:@/g'. + * acspecific.m4: Likewise. + * autoconf.sh: Likewise. + +2000-03-03 Akim Demaille + + * acgeneral.m4 (_AC_WHICH_A): New macro. + (AC_CHECK_PROG): Use it. Use ifval. + (AC_CHECK_PROGS): Use ifval. Fix the quoting. + * tests/semantics.m4: Test AC_CHECK_PROG. + * tests/Makefile.am (EGREP_EXCLUDE): Add /AC_CHECK_PROGS?/. + +2000-03-02 Russ Allbery + + * autoscan.pl (parse_args): Add support for -m . + +2000-03-02 Akim Demaille + + The whole family supports -V = --version. + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Report and support -V. + * autoconf.sh: Likewise. + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * autoheader.sh: Likewise. + * autoscan.pl: Likewise. + * ifnames.sh: Likewise. + In addition, don't dump --help on invalid options. + * doc/autoconf.texi: Adjusted. + * doc/install.texi: Likewise. + +2000-03-02 Lars J. Aas + + * libm4.m4 (m4_noquote): New macro. + +2000-03-02 Akim Demaille + + * acspecific.m4 (AC_PATH_X_DIRECT): Moved all the shell variable + into the ac_ name space. + Reported by Nicolas Joly. + +2000-03-02 Akim Demaille + + * acspecific.m4: Move some macros to a better place. + +2000-03-02 Akim Demaille + + Internal macros are named `_AC_'. + + * acgeneral.m4 (AC_CANONICAL_TARGET, AC_CANONICAL_BUILD, + AC_CANONICAL_THING, AC_CHECK_TOOL_PREFIX, AC_CONFIG_UNIQUE): + Prepend `_' to their names. + * acspecific.m4 (AC_CHECK_HEADER_DIRENT, AC_CHECK_HEADERS_DIRENT, + AC_PATH_X_XMKMF, AC_PATH_X_DIRECT): Prepend `_' to their names. + * doc/autoconf.texi (Macro Names): Adjusted. + +2000-03-02 Akim Demaille + + * acgeneral.m4: Formatting changes. + * acspecific.m4: Likewise. + +2000-03-01 Akim Demaille + + The empty regexp cannot be portably used in egrep's alternation. + For instance with Digital Unix v5.0: + > echo "foo" | egrep -e "^(|foo|bar)$" + > echo "|foo" | egrep -e "^(|foo|bar)$" + |foo + > echo "|bar" | egrep -e "^(|foo|bar)$" + > echo "bar" | egrep -e "^(|foo|bar)$" + bar + > echo "bar" | egrep '^(foo|bar|)$' + > echo "bar|" | egrep '^(foo|bar|)$' + bar| + > echo "bar" | egrep '^(foo||bar)$' + > echo "|bar" | egrep '^(foo||bar)$' + |bar + > echo "foo" | egrep '^(foo||bar)$' + foo + > echo "foo|" | egrep '^(foo||bar)$' + > + Reported by Nicolas Joly. + + * src/actest.m4 (AC_ENV_SAVE): s/(|EXTRA_|PRE_)/(EXTRA_|PRE_)?/. + +2000-03-01 Akim Demaille + + * acspecific.m4: Removed a few addresses, the map is... + * THANKS: here. + +2000-03-01 Lars Hecking + + * acspecific.m4 (AC_PATH_XTRA): On LynxOS 3.0.1/i386, + gethostbyname(), getservbyname(), and inet_addr() are in -lbsd. + +2000-03-01 Akim Demaille + + * tests/actest.m4 (AC_ENV_SAVE): Use multiple -e instead of + multiple egrep. + +2000-03-01 Akim Demaille + + * config.guess: Updated from master repository. + * config.sub: Likewise. + +2000-03-01 Akim Demaille + + Test suite: instead of using a full list of the AC macros and an + AT macro with selects which are the AC macros to test, just + produce the list of the AC macros we want to test. + + * tests/atspecific.m4 (TEST_MACRO): Removed. + * tests/Makefile.am (EGREP_EXCLUDE): New variable, performing the + selection TEST_MACRO used to do. + (macros.m4): Use it. Use AT_TEST_MACRO, not TEST_MACRO. Check + also AU macros. + +2000-03-01 Akim Demaille + + * doc/autoconf.texi: Tune the use of quotes, add missing + @noindents, remove dead FIXME:s, promote #if ! over #ifndef, + simplify duplicated text. + +2000-03-01 Akim Demaille + + * doc/autoconf.texi (Configuration Commands): Document + AC_CONFIG_COMMANDS_PRE and _POST. + +2000-02-29 Akim Demaille + + Test suite: more debugging information. + + * tests/atspecific.m4 (AT_TEST_MACRO): When verbose, report the + content of config.log. + +2000-02-29 Akim Demaille + + * Makefile.am (MAKEINFO): Removed. + (INSTALL.txt): Call $(MAKEINFO) with --no-split. + Reported by Nicolas Joly. + +2000-02-28 Akim Demaille + + * doc/Makefile.am (MAKEINFO): s/makeinfo/@MAKEINFO@/. + * missing: chmod +x. + +2000-02-28 Akim Demaille + + * tests/Makefile.am (testsuite): Use $(M4), not m4. + From Patrick Tullmann. + +2000-02-25 Akim Demaille + + * src/acgeneral.texi (AC_INIT_NOTICE): Include inttypes.h in the + ac_includes_default. + * doc/autoconf.texi (Default Includes): Adjust. + +2000-02-25 Akim Demaille + + Export the knowledge on disabling echo's trailing new line. + + * acspecific.m4 (AC_PROG_ECHO_N): Rename as... + (_AC_PROG_ECHO): this. + Set ECHO_N, ECHO_C, ECHO_T instead of ac_n, ac_c and ac_t. + All dependencies changed. + * doc/autoconf.texi (Preset Output Variables): Document ECHO_C, + ECHO_N and ECHO_T. + * m4/atconfig.m4 (fp_PROG_ECHO): Removed. + (AT_CONFIG): Don't use it. + +2000-02-24 Akim Demaille + + * autoconf.sh (AC_ACLOCALDIR): Use `(aclocal) 2>/dev/null`, not + `aclocal 2>/dev/null` if you want no complaints for missing + aclocal. + From Nicolas Joly. + +2000-02-22 Pavel Roskin + + * configure.in (HELP2MAN): Specify the third argument of + AM_MISSING_PROG. Fixes autoconf/116. + +2000-02-21 Akim Demaille + + * tests/tools.m4 (syntax.sh): The logic of the previous patch was + twisted. Fix it so that it performs what claims the entry below. + From Nicolas Joly. + +2000-02-21 Akim Demaille + + * tests/tools.m4 (syntax.sh): Exit 1 if you managed to kill the + child, since it means `/bin/sh -n' went loopy. + +2000-02-18 Akim Demaille + + Some `diff' refuse to diff with /dev/null, such as Tru64's. + Reported by Nicolas Joly. + + * tests/atgeneral.m4 (empty): New dummy file. + Changed various `diff /dev/null' as `diff empty'. + +2000-02-18 Akim Demaille + + * tests/atspecific.m4 (TEST_MACRO): Don't run AC_PATH_TOOL and + AC_PATH_PROG. + +2000-02-18 Akim Demaille + + * tests/atgeneral.m4 (at_diff): Don't use `cmp -s', on DOS it + differentiate between Unix and DOS EOL. `diff' does not. + Reported by Eli Zaretski. + Also, be ready to use a diff that does not support `-u'. + +2000-02-18 Akim Demaille + + * tests/tools.m4 (Syntax of the scripts): Be robust to shells that + never return on some `/bin/sh -n foo.sh'. + Reported by Nicolas Joly. + +2000-02-17 Akim Demaille + + Move the documentation into doc/. + Some CVS tricks were used so that history is kept in both the top + directory, and in doc/. + + * doc/Makefile.am: New file. + * Makefile.am: Adjusted. + * configure.in: Adjusted. + * autoconf.texi: Moved from here to... + * doc/autoconf.texi: here. + * make-stdts.texi: Likewise. + * install.texi: Likewise. + * texinfo.tex: Likewise. + +2000-02-17 Akim Demaille + + * tests/actest.m4 (AC_ENV_SAVE): Added ALLOCA. + +2000-02-17 Akim Demaille + + * tests/semantics.m4 (AC_CHECK_TYPES): `addr, addr' is not + portable sed: use `addr,addr'. + +2000-02-17 Akim Demaille + + Fix the `missing dummy.in' reported by the test suite. + Reported by Erez Zadok. + + * tests/torture.m4 (config.status under extreme conditions): + Reorganized. Because files required by this test were created + outside the pair AT_SETUP/AT_CLEANUP, when the test fails and + autotest extracts this test, the `debug' script does not contain + the files it needs. Now AT_SETUP/AT_CLEANUP encloses the full + auto contained section. + +2000-02-16 Akim Demaille + + * tests/actest.m4 (AC_ENV_SAVE): X_EXTRA_LIBS can be changed by + AC_PATH_EXTRA. + Reported by Erez Zadok. + +2000-02-15 Akim Demaille + + Define HAVE_DECL_FOO both to 1 if found and 0 otherwise. + + * acgeneral.m4 (AC_CHECK_DECLS): Define HAVE_DECL_FOO to 1 instead + of NEED_FOO_DECL if found. Define to 0 if not found. + * autoheader.m4 (AC_CHECK_DECLS): Template HAVE_DECL_FOO. + * tests/semantics.m4 (AC_CHECK_DECLS): Adjusted. + * doc/autoconf.texi (Generic Declarations): Adjusted. + +2000-02-15 Akim Demaille + + * doc/autoconf.texi (Generic Structures): + s/AC_FATAL/AC_MSG_ERROR. + +2000-02-15 Akim Demaille + + autoreconf had a silly syntax error, test it and fix it. + Reported by Franc,ois Pinard and Rainer Orth. + + * autoreconf.sh: Removed spurious `;;'. + Formatting changes. + * tests/tools.m4 (Syntax of the scripts): Run `sh -n' on all the + shell scripts. + +2000-02-15 Akim Demaille + + * autoconf.sh (options handling): --v* of --version was shadowing + --verbose. + +2000-02-11 Akim Demaille + + * tests/torture.m4: Nuke the trailing space in defs. + +2000-02-11 Akim Demaille + + * tests/atspecific.m4: Really added to the CVS repository. + +2000-02-11 Akim Demaille + + Don't use `cat -s' to single out new-lines, it is not portable. + Also remove trailing blanks. + + * tests/Makefile.am (testsuite): Use sed instead of cat. + * tests/torture.m4: No longer check for a trailing space. + * autoconf.sh: Likewise. + +2000-02-10 Akim Demaille + + * tests/actest.m4 (AC_ENV_SAVE): OpenBSD-2.3's /bin/sh defines an + envvar SECONDS which does change with time. + KMEM_GROUP is set by AC_FUNC_GETLOADAVG. + Reported by Volker Borchert. + +2000-02-10 Akim Demaille + + * tests/Makefile.am (macros.m4): Better regex to build `macro'. + Depend upon acgeneral.m4. + +2000-02-10 Akim Demaille + + * autoheader.sh: Remove the duplicate trap code. + +2000-02-10 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT): When dispatching your arguments, use + ifval, not ifset! + Dispatch actions to AC_CONFIG_COMMANDS not AC_OUTPUT_COMMANDS, to + avoid unneeded warnings for obsolete use of AC_OUTPUT_COMMANDS. + +2000-02-10 Akim Demaille + + * acgeneral.m4 (AC_VERBOSE): This is a tab, not spaces. + +2000-02-10 Akim Demaille + + Changequote busters II. + They're back to save the world. + + * acspecific.m4 (AC_PROG_CC_C_O, AC_PROG_F77_C_O, + AC_PROG_MAKE_SET, AC_TYPE_GETGROUPS, AC_FUNC_GETLOADAVG, + AC_FUNC_MKTIME, AC_STRUCT_TIMEZONE, AC_F77_LIBRARY_LDFLAGS): Blast + that jelly o' changequote. Set the quotes free. + +2000-02-10 Akim Demaille + + Interrupting autoheader left temp files. + From Jim Meyering. + + * autoheader.sh (usage): The usage is to use $0 here. + (ah_base): Be in TMPDIR. + Install the `trap' before creating the first tmp file. + Also trap on 0. + +2000-02-10 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): This is a routine of + `configure', not `config.status', hence use `conftest' for tmp + files, not `$ac_cs_root'. + Removed forgotten developer comment. + Double quoting the whole body is nicer than just the part that + needs to be. + +2000-02-10 Akim Demaille + + * tests/torture.m4: Also check the value of @DEFS@ when no + CONFIG_HEADER is used. + +2000-02-10 Akim Demaille + + Changequote-busters! + From Dan Ackroyd. + + * acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE, + AC_CACHE_SAVE, AC_PREFIX_PROGRAM, AC_OUTPUT, + _AC_OUTPUT_CONFIG_STATUS, AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_FILES, + _AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS, AC_OUTPUT_SUBDIRS): Quit + playing with changequotes, @BKL@ and Co.! Just quote properly. + +2000-02-10 Akim Demaille + + Honor properly the `#define' config.h.in templates. + Test it. + + * acgeneral.m4 (AC_OUTPUT_HEADERS): Rename as... + (_AC_OUTPUT_HEADERS): this. All callers changed. + Don't mess with changequote, just quote properly. + Bug 1. Because of the `#' in `ac_dA', the quotes <<>> were not + removed, and therefore the sed script contained `<>' + instead of `define'. Now that the block is properly quoted, there + is no need to quote `define'. + Bug 2. Once a `#define' substitution performed, we were branching + to the top of the sed script (`t top'). This resulted in an + endless substitution of `#define foo 1' to `#define foo 1'. + Branching is not enough: you also have to fetch the next input + line, i.e., use `t' instead of `t t' in ac_dD, and don't output + `: top' in `config.defines'. + Though it was correct for `#undef' templates, just apply the same + transformation to `ac_uD' and `config.undefs'. + Bug 3. Don't try to preserve what was behind the value in the + template, since on + #define NAME "bar baz" + it leads to + #define NAME 1 baz" + Now `ac_dB' catches everything behind the NAME (making sure there + is at least a space) and `ac_dC' only outputs a space. + * tests/torture.m4: Check that various forms of `#define' header + templates are properly handled. + +2000-02-10 Akim Demaille + + Avoid calling `rm' without arguments. + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): It is smarter to use a + quoted here doc to output the section providing defaults for + CONFIG_*. + Don't rm the CONFIG_FILES here but in.. + (AC_OUTPUT_FILES) [test -n "$CONFIG_FILES"]: here. + Hm, actually, no, just don't remove them at all, let the newly + created files replace the old ones, exactly as in + AC_OUTPUT_HEADERS. + From Graham Jenkins. + +2000-02-10 Akim Demaille + + * acgeneral.m4 (AC_LIST_MEMBER_OF): s/ac_$exists/$ac_exists/! + +2000-02-10 Akim Demaille + + * acgeneral.m4: Formatting changes. + * acspecific.m4: Likewise. + +2000-02-10 Akim Demaille + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Don't + : ${FOO="$foo"} + but + : ${FOO=$foo} + Since Ultrix will also assign the quotes to FOO. + Reported by Harlan Stenn. + +2000-02-10 Akim Demaille + + Keep `AC_CHECK_TYPE' backward compatibility and provide a proper + `AC_CHECK_TYPE', + Based on ideas from Paul Eggert and Alexandre Oliva. + + * acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Rename as... + (_AC_CHECK_TYPE_NEW): this. + (AC_CHECK_TYPES): Adjusted. + (AC_CHECK_TYPE): Rename as... + (_AC_CHECK_TYPE_OLD): This. Adjusted to _AC_CHECK_TYPE_NEW. + No longer support extra includes, stick to 2.13's interface. + (_AC_CHECK_TYPE_BUILTIN_P): New macro. + (AC_CHECK_TYPE): New macro. + * autoheader.m4 (autoheader::AC_CHECK_TYPE): Rename as... + (autoheader::_AC_CHECK_TYPE_OLD): this. + * tests/atspecific.m4 (TEST_MACRO): Skip /^_AC_/ macros. + * tests/semantics.m4: Test the choices of AC_CHECK_TYPE (wrt _NEW + or _OLD implementation). + * doc/autoconf.texi (Generic Types): Reorganized. Explain + everything about AC_CHECK_TYPE and Co. + +2000-02-10 Akim Demaille + + * libm4.m4 (near m4_split): Remove the buggy additional + changequote. + Quote properly `m4_split' when registering it. + +2000-02-10 Akim Demaille + + The AU-glue code for AC_LINK_FILES was not fully compatible: in + AC_LINK_FILES($from, $to) + `$from' and `$to' can be lists, hence `AC_CONFIG_LINKS($to:$from)' + is wrong. + Reported by H.J. Lu. + + * acgeneral.m4 (AC_LINK_FILES): Replace the m4-glue code from + AC_LINK_FILES to AC_CONFIG_LINKS, with sh-glue code. + Give a detailed update message. + (_AC_LINK_FILES_CNT): New variable. Initialize. + * tests/tools.m4 (autoupdate): No longer exercise `autoupdate' + with AC_LINK_FILES. + +2000-02-10 Akim Demaille + + * acspecific.m4 (AC_PROG_SED): Removed. + +2000-02-10 Akim Demaille + + AC_CHECK_FILES has never worked properly. + + * acgeneral.m4 (AC_CHECK_FILE): Use AC_CACHE_CHECK. + * autoheader.m4 (AC_CHECK_FILES): AH-define. + * tests/semantics.m4: Test AC_CHECK_FILES. + * tests/atspecific.m4 (TEST_MACRO): Don't. + +2000-02-10 Akim Demaille + + No longer use a diversion to store the sed program implementing + AC_SUBST. + + * acgeneral.m4 (_AC_SUBST): New macro. + (_AC_SUBST_SED_PROGRAM): Initialize. + (AC_SUBST): Use _AC_SUBST. + (AC_SUBST_FILE): Likewise. + (AC_DIVERSION_SED): Removed. Renumber the AC_DIVERSIONs. + (AC_OUTPUT_FILES): Instead on undiverting AC_DIVERSION_SED, output + _AC_SUBST_SED_PROGRAM. + +2000-02-10 Akim Demaille + + Standardize the error messages in the options handling of + `configure' and `config.status'. + + * acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): Rename as... + (_AC_OUTPUT_CONFIG_STATUS): this. + Change the error messages from + value: invalid feature name + to + invalid feature: value + Invite the user to try --help for invalid options. + (AC_INIT_PARSE_ARGS): Likewise. + +2000-02-10 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT_COMMANDS_COMMANDS): Rename as... + (_AC_OUTPUT_COMMANDS): This. All callers changed. + Disable the verbose message until Automake uses the new features + of `config.status'. + Reported by Jim Meyering. + +2000-02-10 Akim Demaille + + Clean up a few changequotes. + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Instead of using changequote + to protect a few `[ ]', double quote the constant sections. + +2000-02-10 Akim Demaille + + Restore AC_HAVE_LIBRARY. + + * acgeneral.m4 (AC_HAVE_LIBRARY): AU_DEFUNed in terms of + AC_CHECK_LIB. + * doc/autoconf.texi (Libraries): Document. + +2000-02-09 Akim Demaille + + Fix the handling of `./configure foo=bar' and test it. + + * acgeneral.m4 (AC_INIT_PARSE_ARGS, getopt loop): Always define + ac_optarg as the rhs of the first `=', not only on `-.*=', so that + `configure var=val' defines ac_optarg=val. + Improve the robustness to shell special characters: + - Use grep when checking that shell variable names are valid. + - Quote the quotes in ac_optarg before `eval var='$ac_optarg''. + - Quote the quotes when building ac_configure_args. + + * tests/torture.m4: Test that `./configure foo=bar' works properly. + +2000-02-09 Akim Demaille + + Resynchronize `INSTALL' with the current `configure', and + conversely... + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Let `configure' support `-h = + --help' and `-n = --no-create'. + Document -h, -n and -q in configure's help message. + * install.texi (Operation Controls): Formatting changes. + Document `configure -h'. + +2000-02-09 Akim Demaille + + * README: Updated. + +2000-02-09 Akim Demaille + + * ChangeLog.1: Formatting changes. + +2000-02-09 Akim Demaille + + Clean up `make clean'. + + * Makefile.am (CLEANFILES): Added autoupdate.m4f and autoconf.tmp. + * tests/torture.m4: Rm dummy and dummy.in. + +2000-02-09 Akim Demaille + + Test `autoupdate'. + + * tests/tools.m4 (AH_DEFUN): Fix the comments. + Quote properly. + (autoupdate): New test. + +2000-02-09 Akim Demaille + + AU_ glue code for AC_OUTPUT with arguments. + + * acgeneral.m4 (AU_DEFINE): New macros, pulled out from AU_DEFUN. + Defines a macro in `autoupdate::' with all the required wrapping + for `autoupdate'. + (AU_DEFUN): Use it. + (AC_OUTPUT): When dispatching your arguments, use ifval, not + ifset! + Dispatch actions to AC_CONFIG_COMMANDS not AC_OUTPUT_COMMANDS, to + avoid unneeded warnings for obsolete use of AC_OUTPUT_COMMANDS. + (autoupdate::AC_OUTPUT): New macro. + * doc/autoconf.texi (Writing configure.in, the example): Don't + advocate AC_OUTPUT with args. + (Output, AC_OUTPUT with args): Simplify the documentation, and + provide the translation into the new scheme. + Propagate what remained into the proper sections. + +2000-02-09 Akim Demaille + + AU_ glue code for AC_OUTPUT_COMMANDS. + + * acgeneral.m4 (AC_OUTPUT_COMMANDS): AU_DEFUNed in terms of + AC_CONFIG_COMMANDS. + (AC_OUTPUT_COMMANDS_CNT): New variable, declared both in + `autoconf::' and `autoupdate::'. + (AC_OUTPUT): Register your arguments to AC_OUTPUT_COMMANDS only if + there are to avoid spurious `run autoupdate' messages. + * doc/autoconf.texi (Libraries): Document the changes. + +2000-02-09 Akim Demaille + + Avoid outputting `config_files' code in `config.status' if there + are none. + + * acgeneral.m4 (AC_OUTPUT): Don't register $1 to `AC_CONFIG_FILES' + if $1 is empty. + Normalize the names of the sections in `config.status --help'. + +2000-02-09 Akim Demaille + + * README-alpha: New file, based on Automake's. + * Makefile.am: Tuned. + +2000-02-09 Akim Demaille + + Extend the concept of `INIT-CMDS' to the AC_CONFIG_FOOS. + + * acgeneral.m4 (_AC_CONFIG_COMMANDS_INIT): New macro which will + collect the `INIT-CMDS'. + (AC_CONFIG_COMMANDS, AC_CONFIG_LINKS, AC_CONFIG_HEADERS, + AC_CONFIG_FILES): Use it, and also temporarily divert to -1 + instead of spamming dnl everywhere. + (AC_OUTPUT_CONFIG_STATUS): Make sure to output the INIT-CMDS + before the other sections, it'd be a pity to initialize after the + use :). + + * doc/autoconf.texi (Configuration Actions): New section, + documenting the common behavior of AC_CONFIG_FILES, + AC_CONFIG_HEADERS, macro AC_CONFIG_COMMANDS, and AC_CONFIG_LINKS. + (Configuration Files): Document $2 and $3 of AC_CONFIG_FILES. + (Configuration Headers): Document $2 and $3 of AC_CONFIG_HEADERS. + (Configuration Commands): Document $2 and $3 of AC_CONFIG_COMMANDS. + (Configuration Links): Document $2 and $3 of AC_CONFIG_FILES. + +2000-02-09 Akim Demaille + + * libm4.m4 (m4_sign, m4_cmp, m4_list_cmp): New macros. + * acgeneral.m4 (AC_UNGNITS): Rename as... + (_AC_VERSION_UNLETTER): this. All callers changed. + Implement the scheme proposed by Alexandre Oliva: + Nl -> (N+1).-1.(l#) + (_AC_VERSION_COMPARE): New macro. + (AC_PREREQ): Use it. + +2000-02-09 Akim Demaille + + * tests/base.m4: Really added to the CVS repository. + * tests/tools.m4: Likewise. + +2000-02-09 Akim Demaille + + * tests/base.m4: s/m4 -I ../m4 -I $at_top_srcdir/. + +2000-02-08 Akim Demaille + + * autoheader.sh (debug): Initialize to `false', not 0. + +2000-02-08 Akim Demaille + + Fix a bug: `libm4::define' was incorrectly registered. + + * libm4.m4 (libm4::define): Not only register, define too. + +2000-02-08 Akim Demaille + + * acgeneral.m4 (AC_COMPILE_CHECK): Use AU_DEFUN, remove the call + to AC_OBSOLETE. + +2000-02-08 Akim Demaille + + * acgeneral.m4 (AC_PROVIDE): Use `m4_define', not `define'. + Because of the names pace machinery this change makes `autoconf' + about four times faster on complex `configure.in's. + +2000-02-08 Akim Demaille + + Open the access to AH_ to users. + + * autoheader.m4 (autoheader::AH_DEFUN): New macro. + * tests/tools.m4: New file, in charge of testing the scripts. + All the dependencies adapted. + * tests/actest.m4 (autoheader::AC_TATOOINE): New macro, used while + testing autoheader. + * tests/atspecific.m4: Create config.hin instead of config.h.in. + +2000-02-08 Akim Demaille + + Because of commas and brackets, m4_split must mess with the + quotes. + + * libm4.m4 (m4_split): Quote the elements of the list you produce. + * tests/base.m4: New file, testing libm4. + All callers adapted. + Test m4_wrap. + +2000-02-08 Akim Demaille + + * acgeneral.m4 (AC_CONFIG_UNIQUE): Strip the `:foo.in' part + yourself, in order to give better error messages. + (AC_CONFIG_IF_MEMBER): Adapted to the above change. + Quote some regexp active characters ([+.*]). + Suggested by Alexandre Oliva. + +2000-02-08 Akim Demaille + + * acgeneral.m4 (AC_INCLUDES_DEFAULT): Make it more robust to + the fact it is used non quoted. + Reported by Jim Meyering. + +2000-02-08 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT_FILES): Simplify some excess in + changequote. + (AC_OUTPUT_SUBDIRS): Likewise. + +2000-02-08 Akim Demaille + + * autoupdate.sh: Don't dump --help on --wrong-option. + * autoconf.sh: Reformatting, and use >&2 instead of 1>&2. + * autoreconf.sh: Likewise. + * autoheader.sh: Likewise. + +2000-02-08 Akim Demaille + + * libm4.m4 (m4_namespace_push, m4_namespace_pop): Use the private + macros to be robust to name space changes. + (m4_popdef, m4_pushdef): New private macros. + +2000-02-08 Akim Demaille + + Let the doc catch up. + + * doc/autoconf.texi (Common Behavior): New section, to document + the common behavior of the macros. + (Standard Symbols): New subsection. Describes the transformation + of the AC_DEFINEd names. + (Default Includes): New subsection. Obvious content. + All the ``callers'' updated. + +2000-02-08 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT_HEADERS): Don't use `break' to exit the + while loops which are breaking conftest.defines and + conftest.undefs into smaller snippets: just use the proper + condition for the while. + Suggested by Alexandre Oliva. + +2000-02-08 Akim Demaille + + * doc/autoconf.texi (Configuration Commands): New section, for + AC_CONFIG_COMMANDS. + Move the definition of AC_OUTPUT_COMMANDS here. + (Configuration Links): New section, for AC_CONFIG_LINKS and + AC_LINK_FILES. + (Configuration Files): New section, for AC_CONFIG_FILES. + (Globally) Promote AC_CONFIG_HEADERS over AC_CONFIG_HEADER. + (Using System Type): Don't document AC_CONFIG_LINKS and + AC_LINK_FILES. + (Invoking config.status): Mention CONFIG_COMMANDS. + Document --file and --header. + Talk first of the newest interface of config.status. + +2000-02-08 Akim Demaille + + Introduce a concept index, and update a bit the documentation. + + * doc/autoconf.texi (Concept Index): New section. + Various entries added. + (Typedefs): Rename as... + (Types): this. Pay attention to not limiting the documentation to + the typedefs. + (Particular Types): Mention the equivalent generic test. + Promote the GNU coding style at various places. + +2000-02-08 Akim Demaille + + Revamp the autoupdate/AC_OBSOLETE chain. All the details are + given in the prologue of acoldnames.m4. + + * acgeneral.m4 (Prologue): Enter the `autoconf' name space. + (AU_DEFUN): New macro. + + * autoupdate.m4: New file. + Disable the name spaces `autoconf', and `libm4'. Disable libm4. + * Makefile.am: Tuned to support the changes above. + + * autoupdate.sh: Model after autoconf.sh. + Can run on several files at once (for instance m4/*.m4). + Don't touch files that are up to date. + Run m4 on autoupdate.m4f instead of playing with sed. + + + Use AU_DEFUN. + + * acgeneral.m4 (AC_LINK_FILES, AC_ENABLE, AC_WITH): Use AU_DEFUN, + remove the call to AC_OBSOLETE. + * acspecific.m4 (AC_CYGWIN32): Likewise. + * acoldnames.m4: Replaced all the definitions via `define' or + `AC_DEFUN' to use `AU_DEFUN'. + +2000-02-08 Akim Demaille + + Clean up some m4 files. + + * acoldnames.m4: Use `#', not `dnl'. + Don't spread `dnl' everywhere, anyway, we are in a divert(-1). + * autoconf.m4: Likewise. + * autoheader.m4: Likewise. + +2000-02-08 Akim Demaille + + Clean up autoconf. + + * autoconf.sh: Minor reorganizations to clearly separate the + prologue, which is almost common to all the shell scripts of + Autoconf, and the body. + +2000-02-08 Akim Demaille + + Improve support of name spaces in libm4. Put the m4 builtins + in the `libm4' name space. + + * libm4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir, + m4_undefine): Private copies in the global name space. Used by + the name space mechanisms. + (m4_namespace_register): New macro. + (m4_namespace_define): Use it. + (builtin, changequote, defn, dnl, esyscmd, ifdef, ifelse, indir, + patsubst, popdef, pushdef, regexp, undefine, syscmd, sysval): Put + in the `libm4' name space. + (m4_disable, m4_enable): Use the private m4_indir, otherwise once + `libm4' closed, there is no `indir' available, and therefore no + means to reopen a name space. + +2000-02-08 Akim Demaille + + Output really nothing if AC_INIT was not given. Unconditional + output can be problematic with autoupdate. + + * acgeneral.m4 (AC_INIT_NOTICE): Output ac_includes_default. + (Default includes section): No longer dump ac_includes_default in + AC_DIVERSION_INIT. + +2000-02-08 Akim Demaille + + * libm4.m4 (m4_namespace_define): Fix a bug: `m4_namespace' + instead of `$1'. + Simplify some excess in quoting. + Use NAMESPACE::MACRONAME instead of `m4_defn(NAMESPACE, + MACRONAME)'. + +2000-02-08 Akim Demaille + + Adapt autoheader to use libm4's name spaces. + + * autoheader.m4 (AH_HOOK): Removed. + (AH_DEFUN): Define in the `autoheader' name space. + Use only AH_DEFUN to define macros in this file. + (epilogue): No longer run the `AH_HOOKS', enter the `autoheader' + name space. + +2000-02-08 Akim Demaille + + Clean up a bit the user interface. + + * autoconf.sh: Give your name while reporting errors. + Don't spit --help for errors on arguments. + * autoreconf.sh: Likewise. + * autoheader.sh: Likewise. + More temporary files that one can browse when debugging. + Don't ${var}, just $var. + Don't dump --help when the arguments are invalid. + (config_h): Use the empty value instead of `undefined' to check + that it is defined. + * acspecific.m4: Formatting changes. + +2000-02-08 Akim Demaille + + Introduce name spaces in libm4. + + * libm4.m4 (m4_namespace_push, m4_namespace_pop, + m4_namespace_define, define, m4_disable, m4_enable, m4_rename): + New macros. + (_m4_foreach, _m4_for, m4_wrap): Use m4_define for temporaries. + (m4_split): Don't mess with the quotes. + + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_HEADERS): Quote + `define'. + +2000-02-08 Akim Demaille + + * doc/autoconf.texi (Introduction): m4 1.4 is now required. + (Invoking autoconf): A better help on --trace. + (Defining Symbols): Advocate a proper use of the quotes in m4 + code, including if the quotes are sometimes useless. It is bad, + very bad not to quote properly, so quote all the examples + properly. + (Cache Files): Use a unary call to define, instead of an empty + $2. + (Using System Type): Watch out TeX wrapping. + (Pretty Help Strings): Don't give too long a snippet of --help. + Promote the coding style of Autoconf. Quote properly. + +2000-02-08 Akim Demaille + + * acgeneral.m4 (AC_PRO): Use AC_PROVIDE instead of defining + yourself. This allows to see everything that is AC_PROVIDEd via + autoconf --trace. + (AC_SPECIALIZE): define'd, not AC_DEFUN'd. + (AC_PROVIDE): Use define with a single arg, instead of an empty $2. + +2000-02-08 Akim Demaille + + * acgeneral.m4 (ac_includes_default): Don't use simple quotes, but + doubles quotes if you want to use \-continuation lines: this is + not recognized by MIPS' sh. + +2000-02-08 Akim Demaille + + * acgeneral.m4. Formatting changes. + * acspecific.m4: Likewise. + +2000-02-08 Akim Demaille + + * acgeneral.m4 (AC_CONFIG_HEADERS, AC_CONFIG_LINKS, + AC_CONFIG_SUBDIRS): A space was missing to separate the arguments + of m4_append. + +2000-02-08 Akim Demaille + + Arrange that config.status creates the file with the AC_SUBSTing + engine only if needed. + + * acgeneral.m4 (AC_OUTPUT_FILES): Create the sed code only if test + -n "$CONFIG_FILES". + +2000-02-08 Akim Demaille + + Promote AC_LANG_CASE. + + * acgeneral.m4 (AC_TRY_COMPILER, AC_TRY_LINK_FUNC, AC_CHECK_LIB, + AC_TRY_COMPILE, AC_TRY_LINK, AC_TRY_RUN_NATIVE, AC_CHECK_FUNC): + Use AC_LANG_CASE instead of ifelse (AC_LANG, ...). + (AC_TRY_LINK_FUNC): Quote the body the the AC_DEFUN (whoa, how + could this survive so long?!?). + +2000-02-08 Akim Demaille + + * acgeneral.m4: Formatting changes. + * acspecific.m4: Likewise. + +2000-02-08 Akim Demaille + + Use the style we promote. + + * doc/autoconf.texi (Header Templates): Promote #if over #ifdef; + and #undef over #define in templates. + * acspecific.m4 (AC_DECL_SYS_SIGLIST, AC_FUNC_MMAP, + AC_FUNC_SETPGRP, AC_FUNC_VFORK, AC_FUNC_SELECT_ARGTYPES): Use #if, + not #ifdef and #ifndef, indent CPP directives. + +2000-02-08 Akim Demaille + + Quote properly AC_SHELL_IFELSE and callers. + + * acgeneral.m4 (AC_SHELL_IFELSE): Don't overquote $1. + (AC_VAR_IF_SET, AC_CHECK_MEMBER, AC_CHECK_LIB, AC_CHECK_HEADER, + AC_CHECK_DECL, AC_CHECK_FUNC, AC_CHECK_TYPE_INTERNAL): Quote the + first argument of AC_SHELL_IFELSE. + +2000-02-08 Akim Demaille + + It seems quite delicate to have AC_INCLUDES_DEFAULT insert the + default headers in the INIT section of configure: the reason is + that AC_INCLUDES_DEFAULT is called unquoted, and this results in + an un expected behavior. Thanks to Roman V. Shaposhnick for the + details. + + The current implementation is not satisfying: the default headers + are defined in the INIT section even if they are not used. + + * acgeneral.m4 (Prologue of AC_INCLUDES_DEFAULTS): Dump the + definition of ac_includes_default in the INIT section of + configure. + (AC_INCLUDES_DEFAULTS): Use it. + +2000-02-08 Akim Demaille + + * TODO: Updated. + * THANKS: Updated. + +2000-02-08 Akim Demaille + + * libm4.m4 (m4_for): New macro. + +2000-02-07 Akim Demaille + + Stay in Autoconf's name space. + + * acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): Prefixed with 'ac_': + arg, save_arg, i, seen, previous_arg, ld_run_path. + Rename f77_link_output as ac_link_output. + * tests/actest.m4 (AC_ENV_SAVE): Don't note F77, FFLAGS, FLIBS, + G77, f77_case, f77_underscore. + +2000-02-07 Akim Demaille + + Use `#' for comments instead of `dnl'. + Better highlighting of the sections in the sources. + + * acgeneral.m4: Formatting changes. + * acspecific.m4: Likewise. + * autoheader.m4: Likewise. + * acoldnames.m4: Likewise. + +2000-02-07 Akim Demaille + + Create libm4.m4. + + * Makefile.am: Adjusted for libm4.m4. + + * acgeneral.m4 (m4_errprint, m4_warn, m4_fatal, m4_prefix, + m4_eval, m4_shift, m4_format, m4_include_unique, m4_include, + m4_sinclude, m4_quote, m4_split, m4_join, m4_strip, m4_append, + m4_list_append, ifval, ifset, m4_default, m4_case, m4_match, + m4_foreach): Moved from here, to... + * libm4.m4: here. + * acgeneral.m4 (AC_WRAP): Moved from here, to... + * libm4.m4 (m4_wrap): here. All callers changed. + + * acgeneral.m4: Don't include acversion.m4. + * autoconf.m4: Include libm4.m4 and acversion.m4. + * autoheader.m4: Likewise. + +2000-02-07 Akim Demaille + + AC_CHECK_SIZEOF: Fix a bug, use standard default headers, and + test. + + * acgeneral.m4 (AC_CHECK_SIZEOF): Don't over quote $1, some [] + were left in the C code, and had the macro fail. + Use AC_INCLUDES_DEFAULT. + * doc/autoconf.texi: Mention default includes. Explain stdio.h + must always be given. + + * tests/atspecific.m4 (TEST_MACRO): Updated the list of + exceptions. + (AT_CHECK_DEFINES): New macro, to check the content of config.h. + * tests/semantics.m4: All the tests are updated to use + AT_CHECK_DEFINES. + Test AC_CHECK_SIZEOF, AC_CHECK_HEADERS, and AC_CHECK_FUNCS. + +2000-02-07 Akim Demaille + + Give explicit diagnostics when an input file (for config headers; + config files etc.) does not exist. + From Jim Meyering. + + * acgeneral.m4 (AC_OUTPUT_FILES, AC_OUTPUT_HEADERS): Check for the + existence of source files. + +2000-02-07 Akim Demaille + + Torture test config.status, AC_SUBST and AC_DEFINE. + + * tests/torture.m4: New file. + * tests/suite.m4: Include it. + +2000-02-07 Akim Demaille + + * tests/atspecific.m4 (m4_for, m4_foreach): New macros. + +2000-02-07 Akim Demaille + + * acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Instead of defining an + unused pointer to the type $1, use + if (($1 *) 0) return 0; + to avoid warnings from the compiler. + From Paul Eggert. + +2000-02-07 Akim Demaille + + * acgeneral.m4 (AC_INCLUDES_DEFAULT): Include sys/types.h + Reported by Jim Meyering. + +2000-02-07 Akim Demaille + + * tests/atspecific.m4: New file, for AT macros specific to + Autoconf testing. + * tests/suite.m4 (AT_TEST_MACRO): Moved to + * tests/atspecific.m4 (AT_TEST_MACRO): here. + * tests/syntax.m4 (TEST_MACRO): Moved to + * tests/atspecific.m4 (TEST_MACRO): here. Don't test /^AC_INIT/, + nor /^AC_PROG_\(CC\|CXX\|F77\)_\(GNU\|WORKS\)$/: they are already + tried elsewhere. + * tests/Makefile.am: Adjusted. + +2000-02-07 Akim Demaille + + * acgeneral.m4 (m4_case): Fixed a typo and a bug: one shift was + missing. + (m4_match): New macro. + * tests/atgeneral.m4 (AT_CASE): Fixed. + +2000-02-07 Akim Demaille + + * acgeneral.m4: Formatting changes. + * acspecific.m4: Likewise. + +2000-02-07 Akim Demaille + + * acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): Don't use FFLAGS_SAVE + but ac_save_FFLAGS. + (AC_F77_NAME_MANGLING): Don't use foo_bar but ac_foo_bar. + +2000-02-07 Akim Demaille + + * acspecific.m4 (AC_C_INLINE): Proceed as for AC_C_CONST: + condition out the test case if __cpluscplus. + Don't document the autoheader template twice, one is enough. + * autoheader.m4 (AC_CONFIG_HEADER): don't hook on this guy, but + on... + (AC_CONFIG_HEADERS), since the former is defined on the latter. + +2000-02-07 Akim Demaille + + * acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): Use the scheme proposed + by Alexandre Oliva for testing the definition of TYPE: + TYPE *foo; + sizeof (TYPE); + +2000-02-07 Akim Demaille + + * acspecific.m4 (AC_C_CONST): Don't changequote, there is no need + for it. Just quote properly! + condition out the test case if __cpluscplus. + AC_REQUIRE AC_PROG_CC_STDC. + Fix slightly the display of the result (formerly the first run + says `none needed', and later, because of the cache `no'). + (AC_C_INLINE, AC_C_VOLATILE): AC_REQUIRE AC_PROG_CC_STDC. + * doc/autoconf.texi (AC_C_CONST): Give a few hints on the + motivation for trusting the C++ compilers. + +2000-02-07 Akim Demaille + + * tests/atgeneral.m4: Updated. + (AT_CASE): new macro. + (AT_CHECK): Use it. Don't changequote for patsubst, there is no + need. + * tests/syntax.m4 (TEST_MACRO): Don't run AC_ARG_VAR. + Reported by Jim Meyering. + Use AT_CASE. + +2000-02-07 Akim Demaille + + Test that the macros respect the user variable name space. + + * acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN. + Don't AC_PROVIDE, there is no need. + When calling `config.sub`, also || exit 1, to catch failures from + config.sub. + * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val. + (AC_EXEEXT): Use ac_file, not file. + * tests/actest.m4: New file, holding extra Autoconf macros used + during the testing. + (AC_ENV_SAVE): New macro, save the sh variables in a file. + * tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in): + include actest.m4, and call twice AC_ENV_SAVE to compare the + variables before and after the macro. + * tests/Makefile.am (macro.m4): Don't test macros that are + required: they will be tested somewhere else. + +2000-02-07 Akim Demaille + + * acgeneral.m4(AC_CONFIG_PRE_COMMANDS, AC_CONFIG_POST_COMMANDS): + Rename as AC_CONFIG_COMMANDS_PRE, AC_CONFIG_COMMANDS_POST. All + dependencies changed. + From Jim Meyering. + +2000-02-07 Akim Demaille + + * acgeneral.m4: Formatting changes. + * acspecific.m4: Likewise. + +2000-02-07 Akim Demaille + + Start a new series of tests which check the semantics. + + * acgeneral.m4 (AC_CHECK_MEMBER): It is not smart to define + ac_Foo, and use AC_Foo. Got rid of AC_Member_Aggregate and + AC_Member_Member which were complicating more than simplifying. + (AC_CHECK_DECLS): Use m4 lists. + (AC_CHECK_TYPES): A comma was missing. + * autoheader.m4: (AC_CHECK_DECLS): Use m4 lists. + * doc/autoconf.texi (Generic Declarations): AC_CHECK_DELCS uses m4 + lists. + * tests/semantics.m4: New file. Collection of semantical tests: + verify that the tests are positive and negative when appropriate. + Test AC_CHECK_MEMBERS, AC_CHECK_DECLS and AC_CHECK_TYPES. + +2000-02-04 Akim Demaille + + * tests/Makefile.am (macros.m4): Fix the sed snippet. + +2000-02-04 Akim Demaille + + * testsuite/autoconf.g/init.exp: Removed, test performed by + tests/syntax.m4. + * testsuite/autoconf.g/sizeof.exp: Likewise. + * testsuite/autoconf.s/defines.exp: Likewise. + * configure.in (AC_OUTPUT): Adjusted. + * Makefile.am (SUBDIRS): Adjusted. + +2000-02-04 Akim Demaille + + * tests/syntax.m4: Test AC_CHECK_SIZEOF. + * tests/Makefile.am (CLEANFILES, DISTCLEANFILES): Adjusted. + (macros.m4): Use tmp dest files ($@-t), not directly `$@'. + +2000-02-04 Akim Demaille + + Hide AH_HOOK behind AH_DEFUN. + + * autoheader.m4 (AH_DEFUN): New macro. Combination of define and + AH_HOOK. + (AC_TRY_RUN, AC_DEFINE, AC_DEFINE_UNQUOTED, AC_CHECK_LIB, + AC_CHECK_HEADERS, AC_CHECK_HEADERS_DIRENT, AC_CHECK_DECLS, + AC_CHECK_FUNCS, AC_CHECK_SIZEOF, AC_PROG_LEX, AC_CHECK_MEMBERS, + AC_CHECK_TYPE, AC_FUNC_ALLOCA, AC_CHECK_TYPES, AC_C_CHAR_UNSIGNED, + AC_AIX, AC_F77_WRAPPERS, AC_CONFIG_HEADER): All the former calls + to define and AH_HOOK in autoheader.m4 are replaced by AH_DEFUN. + +2000-02-04 Akim Demaille + + * acspecific.m4 (AC_RSH, AC_ARG_ARRAY, AC_HAVE_POUNDBANG): No use + to hide, you are DEFUNCT. + +1999-11-14 Akim Demaille + + * autoconf.texi (Invoking ifnames): ifnames no longer supports + --macrodir. + +1999-11-13 Akim Demaille + + Run the `syntax' test on acgeneral macros too. + Fix the bugs discovered. + + * acgeneral.m4 (AC_CANONICAL_THING): Quote the + AC_REQUIRE([AC_CANONICAL_HOST]). Bug triggered by the use of + AC_CANONICAL_BUILD alone in configure.in. Also, quote the + arguments of macros (eg, ifelse([$1]...), not ifelse($1...)). + (m4_case): New macro. + (AC_LINKER_OPTION): Don't clash with user's name space + (s/i/ac_link_opt). + (AC_LIST_MEMBER_OF). You mean AC_FATAL, not AC_MSG_ERROR. + Quote properly the argument. + dnl out the empty lines that result from m4 pure code. + Don't pollute the user name space. + Use AC_SHELL_IFELSE. + (AC_F77_NAME_MANGLING): Don't use `test -o'. There are still + name space problems. + * tests/Makefile.am (macros.m4): Also fetch the macros from + acgeneral.m4. + +1999-11-13 Akim Demaille + + Really install this patch. + + * acgeneral.m4 (AC_MSG_ERROR, AC_MSG_ERROR_UNQUOTED): Allow an + optional $2: exit status. + +1999-11-13 Akim Demaille + + Check that the AC_DEFINEs from acspecific.m4 do have a template. + Fix the discovered bugs. + + * tests/atgeneral.m4 (AT_CHECK): Don't just exit 1 when you want + to propagate the failure of a test: exit with the same exit + status, at least to preserve 77 (=ignore). + * tests/syntax.m4 (TEST_MACRO): Run also autoheader. Don't run + this test on all the macros, some just cannot run without + arguments. + * acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): In the if egrep/fi for + #define templates, add a `:' to prevent syntax errors in + config.status when there are no AC_DEFINE performed. + * autoheader.m4 (AH_TEMPLATE): Don't use _AC_SH_QUOTE here, use it + in... + (AH_VERBATIM): here. Now AH_C_UNSIGNED_CHAR is no longer failing + (formerly it would produce a non backslashed backquote, which + made sh choke). + +1999-11-13 Akim Demaille + + Introduce a means to distinguish failures of `configure' due to + extern software (so that the test suite doesn't fail on them). + + * acgeneral.m4 (AC_MSG_ERROR, AC_MSG_ERROR_UNQUOTED): Allow an + optional $2: exit status. + * doc/autoconf.texi: Document. + * acspecific.m4 (AC_PROG_CC_WORKS, PROG_CXX_WORKS, + AC_PROG_F77_WORKS): Exit 77 if the compiler does not work. + +1999-11-13 Akim Demaille + + Clean up a bit the handling of the LANG stack. More is needed. + + * acgeneral.m4 (AC_LANG_CASE): New macro. + (AC_LANG_RESTORE): Use m4_case. + (AC_LINKER_OPTION): Use AC_LANG_CASE. + +1999-11-11 Akim Demaille + + * autoconf.texi (Generic Declarations): Fixed a typo which + prevented `make distcheck' from succeeding. + * texinfo.tex: Updated for the same reasons. + +1999-11-11 Akim Demaille + + Introduce a new style of testing, independent from DejaGNU. + + + Introduce the logistics. + + * configure.in: Initialize AT, and output tests/atconfig, and + tests/Makefile. + * m4/atconfig.m4: New file. + * m4/Makefile.am: Adjusted. + * aclocal.m4: Include atconfig.m4. + * Makefile.am: Adjusted. + * tests/Makefile.am: New file. + * tests/atgeneral.m4: Likewise. + * tests/atconfig.in: Likewise. + + + Write tests. + + * tests/syntax.m4: New file, in charge of checking the validity of + the sh code produced by the macros defined in acspecific.m4. + acgeneral.m4 is not checked here, because these macros require + arguments. + * tests/suite.m4: New file. Run syntax.m4. + +1999-11-10 Akim Demaille + + A test suite will be introduced which tries to run all the + specific macros, but hasbeen'd macro make configure die with bad + exit status. So we wish to distinguish live macros from defunct + macros at the moment they are AC_DEFUN'd, not in their body. Hm, + defunct, defunct... Hey! That's a good name! + + * acgeneral.m4 (AC_DEFUNCT): New macro, comparable to AC_DEFUN, + but for macros which are no longer defined. Replaces AC_HASBEEN. + (AC_HASBEEN): Defunct. Well, removed in fact. + (AC_HAVE_LIBRARY): Don't use AC_DEFUN and AC_HASBEEN, just + AC_DEFUNCT. + * acspecific.m4 (AC_UNISTD_H, AC_USG, AC_MEMORY_H, AC_DIR_HEADER, + AC_INT_16_BITS, AC_LONG_64_BITS): Likewise. + (AC_XENIX_DIR): It was defunct even before I declared it was: was + depending upon AC_DIR_HEADER which is defunct. So AC_DEFUNCT'ed + now. + (AC_DYNIX_SEQ, AC_IRIX_SUN, AC_SCO_INTL): While we're here, you + too are defunct now. + * autoconf.texi (Obsolete Macros): Replace the documentation of + AC_HASBEEN with that of AC_DEFUNCT. + +1999-11-10 Akim Demaille + + * autoconf.sh: Formatting changes. + Removed development junk. + * acspecific.m4: Formatting changes. + * autoconf.m4: Likewise. + * autoheader.m4: Likewise. + +1999-11-10 Akim Demaille + + Let Autoconf use autoconf's `--install'. + + * m4/Makefile.am: New file. + * m4/init.am: New file, required by Automake. + * m4/missing.am: Likewise. + * m4/sanity.am: Likewise. + * aclocal.m4: Include them. + * configure.in (AC_OUTPUT): Added m4/Makefile. + +1999-11-10 Akim Demaille + + Make autoconf support --install. + + * autoconf.sh (task install): New task. Extract the set of + auxiliary m4 files a configure.in depends upon. Install links + from library files to the local dir so that the packages depends + only on local extensions. Check that the user includes exactly + the files she needs. + +1999-11-10 Akim Demaille + + Require GNU m4 1.4 (well 1.3 in fact). + + Because we are ready to handle the case where there are no frozen + files, we *have* to pass a -I, which is dangerous in conjunction + with the silent including of `aclocal.m4': you may include things + that were not expected. Since anyway handling pre 1.3 complicates + the task, just require an m4 which supports reloading of frozen + files. + + * acspecific.m4 (AC_PROG_GNU_M4): Check for --reload. + * autoconf.sh: Likewise + * autoheader.sh: Likewise. + * configure.in: Explicitly state the m4 version you want. + +1999-11-10 Akim Demaille + + No need for foo="`bar`", foo=`bar` is fine. + Simplify ${foo} and ${1} into $foo and $1. + + * acgeneral.m4 (ac_LF_and_DOT): Remove the double quotes. + * acspecific.m4 (AC_PROG_CC_C_O, AC_PROG_F77_C_O): Likewise. + * autoconf.sh: Likewise. + * autoheader.sh: Likewise. + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * ifnames.sh: Remove all the code and messages related to + AC_MACRODIR, since ifnames is not related to macros in anyway. + +1999-11-10 Akim Demaille + + New version of AC_INCLUDE, which does not glob, nor rely upon the + shell. Add AC_INCLUDES too. Help tracking multiple inclusions. + + * acgeneral.m4 (m4_errprint, m4_warn, m4_fatal): New macros, + variations around errprint. + (m4_include_unique): New macro which registers what are the files + already included, and warns if some are included several times. + (m4_include, m4_sinclude): New macro, using m4_include_unique. + (AC_INCLUDE): Is now just a wrapper of m4_include. + (AC_INIT): Use m4_sinclude, not sinclude. + (_AC_ERRPRINT): Removed, m4_errprint is here! + (AC_WARNING, AC_FATAL): Wrappers of m4_warn and m4_fatal. + +1999-11-01 Akim Demaille + + * autoheader.sh: No longer rely on a system acconfig.h. + +1999-11-01 Akim Demaille + + Be kind to Automake: list the arguments of selected macros + (for instance AC_SUBST will list each variable which may be + substitued). + + * autoconf.sh (--trace, --output): New options. + Implement tracing of macros. + trap also on 0, so that there is no need to rm here and there. + * autoconf.texi (Output): Document --trace and --output. + +1999-11-01 Akim Demaille + + Clean up the macros for testing members of aggregates. + + * acgeneral.m4 (AC_CHECK_MEMBER): FATAL if $1 has no dot in it. + Use AC_INCLUDE_DEFAULTS. + (AC_C_STRUCT_MEMBER): Removed. + * acspecific.m4 (AC_STRUCT_TIMEZONE): Adapted to AC_CHECK_MEMBERS. + (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV): Adapted to + AC_CHECK_MEMBERS and obsoleted. + (AC_STRUCT_ST_BLOCKS): Adapted to AC_CHECK_MEMBERS. + * autoconf.texi (AC_STRUCT_ST_BLKSIZE, HAVE_STRUCT_STAT_ST_RDEV): + Explain they are obsoleted, and how to migrate. + (AC_STRUCT_ST_BLOCKS, AC_STRUCT_TIMEZONE): Explain that the + AC_DEFINE changed (but the former #defines remain defined + currently). + (AC_C_STRUCT_MEMBER): Removed, replaced by the definitions of + AC_CHECK_MEMBER and AC_CHECK_MEMBERS. + +1999-11-01 Akim Demaille + + Install a uniform set of default includes. + + * acgeneral.m4 (AC_INCLUDES_DEFAULT): New macro. Expands in its + argument if non empty, otherwise a default list of includes. + (AC_CHECK_DECL, AC_CHECK_TYPE_INTERNAL): Use AC_INCLUDES_DEFAULT. + * autoconf.texi: Adjusted. + +1999-11-01 Akim Demaille + + * autoheader.m4 (AH_FUNC_ALLOCA, AH_C_CHAR_UNSIGNED, AH_AIX): + Don't leave `[]dnl' in pseudo #-comment (actually CPP directives). + +1999-11-01 Akim Demaille + + Fix a bit of the brokenness of AC_CHECK_TYPE. + + * acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): New macro, inspired from + the former AC_CHECK_TYPE. This macro is exactly the one that + ought to be named AC_CHECK_TYPE: it just checks, and executes user + actions. In the future, this macro ought to be renamed + AC_CHECK_TYPE. + There is a big difference with the former AC_CHECK_TYPE: instead + of grepping in the headers, it tries to compile a variable + declaration. This is both safer, slower, and better, since now we + can check for compiler types (e.g., unsigned long long). + (AC_CHECK_TYPES): The looping and AC_DEFINEing version of the + previous macro. Uses m4 loops. + (AC_CHECK_TYPE): Reimplemented on top of AC_CHECK_TYPE_INTERNAL. + * autoheader.m4 (AH_CHECK_TYPE, AH_CHECK_TYPES): New macros, + hooked. + * autoconf.texi (@ovar): New macro, for optional variables. + (Generic Typedefs): Document AC_CHECK_TYPES. + * autoheader.texi: (AH_CHECK_TYPE, AH_CHECK_TYPES): New macros. + (Epilogue): Hooks them. + +1999-11-01 Akim Demaille + + Update autoupdate. + + * acoldnames.m4: Sort the two sections. + * acoldnames.m4 (AM_CYGWIN32, AM_EXEEXT, AM_FUNC_FNMATCH, + AM_FUNC_MKTIME, AM_PROG_LIBTOOL, AM_MINGW32, AM_PROG_INSTALL, + fp_FUNC_FNMATCH): Added their new names. + +1999-10-31 Akim Demaille + + Create man pages for the executables. + + * Makefile.am (SUBDIRS): Add `man' and prepend `.' so that + executables be built before help2man is run. + * configure.in (AC_OUTPUT): Add man/Makefile. + AC_MSG_ERROR, not AC_ERROR. + Check for missing help2man. + * man/Makefile.am: New file. + * man/autoconf.x: Likewise. + * man/autoreconf.x: Likewise. + * man/autoheader.x: Likewise. + * man/autoscan.x: Likewise. + * man/autoupdate.x: Likewise. + * man/ifnames.x: Likewise. + * man/common.x: Likewise. + +1999-10-31 Akim Demaille + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Reformating of configure and + config.status --help. + +1999-10-31 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): Implement `config.status + --file' and `--header'. + +1999-10-31 Akim Demaille + + * autoheader.m4 (AH_TEMPLATE): Quote $2 once, now _AC_SH_QUOTE + behaves properly. + +1999-10-31 Akim Demaille + + * acgeneral.m4: Formatting changes. + * acspecific.m4: Likewise. + +1999-10-31 Akim Demaille + + * acgeneral.m4 (AC_CONFIG_LINKS): Allow a second argument, + commands to run, as AC_CONFIG_FILES and HEADERS. + (AC_LIST_LINKS_COMMANDS): New growing string. Initialize. + (AC_OUTPUT_LINKS): Use it. + (AC_OUTPUT_FILES, AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS): Don't + pretend to have arguments: you don't depend upon it. + (AC_OUTPUT): Call the previous macros without arguments. + +1999-10-31 Akim Demaille + + * acgeneral.m4 (AC_PREFIX_PROGRAM): Don't use define/undefine, but + pushdef/podef. AC_UPCASE_NAME no longer exist. + +1999-10-31 Akim Demaille + + * acgeneral.m4: Formatting changes. + +1999-10-31 Akim Demaille + + * TODO: Updated. + +1999-10-31 Akim Demaille + + Clean up dead comments/code. Clean up the incompatibilities + between quoted and non quoted _AC_ECHO and the like. + + * acgeneral.m4: Remove the comments on the no longer defined AC_TR. + (_AC_SH_QUOTE): Be robust to active symbols. + (_AC_ECHO): Quote properly the argument. + (AC_TRY_RUN): Don't quote [AC_TRY_RUN] in the warning. + +1999-10-31 Akim Demaille + + * acspecific.m4: Formatting changes. + +1999-10-31 Akim Demaille + + * acgeneral.m4 (AC_INIT_NOTICE, AC_INIT_PREPARE, AC_ARG_ENABLE, + AC_ARG_WITH, AC, TRY_COMPILER, AC_TRY_RUN, AC_TRY_CPP, + AC_EGREP_CPP): Use @PND@ instead of [#]: it looses the editors + that try to match the pairs of (), [] etc. + +1999-10-31 Akim Demaille + + Fix the compatibility of the compiling macros with C++. + + * acgeneral.m4 (AC_TRY_COMPILE, AC_TRY_LINK, AC_CHECK_SIZEOF): Use + `int main () {...}', instead of `main () {...}'. + * acspecific.m4 (AC_TYPE_GETGROUPS, AC_FUNC_CLOSEDIR_VOID, + AC_FUNC_FNMATCH, AC_FUNC_GETPGRP, AC_FUNC_SETPGRP, AC_FUNC_VFORK, + AC_FUNC_WAIT3, AC_FUNC_ALLOCA, AC_FUNC_UTIME_NULL, + AC_FUNC_SETVBUF_REVERSED, AC_FUNC_MEMCMP, AC_C_CHAR_UNSIGNED, + AC_C_LONG_DOUBLE, AC_C_BIGENDIAN, AC_SYS_RESTARTABLE_SYSCALLS): + Likewise. + * acspecific.m4 (AC_FUNC_FNMATCH): Call + AC_CHECK_HEADERS(fnmatch.h), and include fnmatch.h in the compiled + code. + +1999-10-31 Akim Demaille + + * acgeneral.m4 (AC_COMPILE_CHECK, AC_TRY_COMPILE, + AC_TRY_RUN_NATIVE, AC_OUTPUT_CONFIG_STATUS): Use @PND@ instead of + [#]: it looses the editors that try to match the pairs of (), [] + etc. + Formatting changes. + * acspecific.m4: Formatting changes. + +1999-10-31 Akim Demaille + + Allow standard beta version numbers. + + * configure.in: Declare version 2.14a. + * acgeneral.m4 (AC_UNGNITS): New macro which transform version + numbers to pure digits (2.14a to 2.14.0.1, 2.15z to 2.15.0.26 + etc.). + (AC_PREREQ): Normalize argument and AC_ACVERSION via AC_UNGNITS. + +1999-10-31 Akim Demaille + + Fix the --version of all the executables. + + * Makefile.am (editsh, editpl): Substitute also PACKAGE and + VERSION. + * autoconf.sh (version): New string. + (--version): Use it. + (--help) Output on stdout, not stderr. + * autoheader.sh: Likewise. + * autoreconf.sh: Likewise. + * autoscan.pl: Likewise. + * autoupdate.sh: Likewise. + * ifnames.sh: Likewise. + +1999-10-31 Akim Demaille + + Perform a better checking for missing templates in autoheader. + + * autoheader.m4 (AH_HOOK): When hook AC_FOO on AH_FOO, define the + new AC_FOO to be the expansion of both AH_FOO *and* AC_FOO. See + its definition for the motivations. + + * autoheader.m4 (AH_FUNC_ALLOCA): Remove the now useless + additional templates. + +1999-10-31 Akim Demaille + + Work properly with Automake 1.4. + + * Makefile.am (distpkgdataDATA): Replaces dist_pkgdata_DATA. + (nodistpkgdataDATA): Replaces nodist_pkgdata_DATA. + (EXTRA_DIST): Added $(distpkgdataDATA). + (pkgdata_DATA): Adapted. + (AUTOMAKE_OPTION): Require 1.4. + +1999-10-31 Akim Demaille + + Fix a bug in templates of AC_CHECK_LIB. + + * autoheader.m4 (AH_CHECK_LIB): Template HAVE_LIBFOO, not + HAVE_FOO. + +1999-10-31 Akim Demaille + + * acspecific.m4: Formating changes. + +1999-10-31 Akim Demaille + + * acgeneral.m4: Formating changes. + * acspecific.m4: Likewise. + +1999-10-31 Akim Demaille + + * Makefile.am (pkgdata_DATA): Split into dist_pkgdata_DATA and + nodist_pkgdata_DATA. + +1999-10-31 Akim Demaille + + * acspecific.m4 (AC_PROG_GNU_M4): New macro. + * configure.in: Use it. + +1999-10-31 Akim Demaille + + Provide a means to specify commands to run before config.status is + created (and, for symmetry, after it is created). + + This is typically needed by Automake so that AC_REPLACEd functions + go through deansification via + + LIBOBJS=`echo $LIBOBJS | sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` + + and/or by Libtool which needs to define LTLIBOBJS and others: + + LTLIBOBJS=`echo $LIBOBJS | sed 's/\.o/\.lo/g'` + AC_SUBST(LTLIBOBJS) + + * acgeneral.m4 (AC_OUTPUT_PRE_COMMANDS): New growing string. + Initialize. + (AC_OUTPUT_POST_COMMANDS): Likewise. + (AC_CONFIG_PRE_COMMANDS): New macro, grows AC_OUTPUT_PRE_COMMANDS. + (AC_CONFIG_PRE_COMMANDS): Likewise. + (AC_OUTPUT): Run AC_OUTPUT_PRE_COMMANDS before + AC_OUTPUT_CONFIG_STATUS, and AC_OUTPUT_POST_COMMANDS after. + +1999-10-31 Akim Demaille + + Remove spurious empty lines appearing in configures. + + * acgeneral.m4 (AC_CONFIG_UNIQUE): Produce no output. Instead of + fighting with dnl, divert to KILL upon entry, and pop at exit. + +1999-10-31 Akim Demaille + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Avoid using double quotes + inside "`...`": some shells parse this incorrectly. + +1999-10-31 Akim Demaille + + * Makefile.am (pkgdata_DATA, EXTRA_DIST): Removed acconfig.h. + * testsuite/autoconf.s/defines.exp: Commented out, there is no + longer an acconfig.h. + +1999-10-31 Akim Demaille + + * autoconf.m4: Insert -*- Autoconf -*-. + * acgeneral.m4: Likewise. + * acspecific.m4: Likewise. + * acoldnames.m4: Likewise. + +1999-10-31 Akim Demaille + + Create AC_CONFIG_HEADERS which has the same interface as the other + AC_CONFIG_*S. + + * acgeneral.m4 (AC_CONFIG_HEADERS): New macro, with the same + interface as AC_CONFIG_LINKS and AC_CONFIG_FILES. + (AC_LIST_HEADERS_COMMANDS): New growing string, initialize it. + (AC_CONFIG_HEADER): Rename as... + (AC_CONFIG_HEADERS): this, for consistency. + (AC_CONFIG_HEADER): New macro, which calls AC_OUTPUT_HEADERS. + (AC_OUTPUT_HEADERS): The square brackets for sed and grep were + not properly quoted: use @BKL@ and @BKR@. + (AC_OUTPUT_HEADERS): Run the AC_LIST_HEADERS_COMMANDS. + + * acgeneral.m4 (AC_OUTPUT): Once config.status created, before + running it, trap to `exit 1' so that config.status is not removed + if configure is interrupted when config.status is complete. + + * acgeneral.m4 (AC_OUTPUT_CONFIG_STATUS): When recognizing + arguments, accept only foo, and no longer foo:foo.in etc. + +1999-10-31 Akim Demaille + + * acgeneral.m4: Formating changes. + +1999-10-31 Akim Demaille + + config.status: Speed up the creation of config headers (about four + times faster on Linux). + + The previous scheme had three sed commands for each AC_DEFINE: one + for #define templates, and two for #undef templates (with or + without trailing spaces). Divide this in three sed scripts + instead: a one liner that removes the trailing spaces, one for + #defines, and then the last for #undef. + + The real speed up comes from the fact that the #define script + starts by checkin if the current input line has a #define, and if + not the script immediately goes to the next line, without running + the rest of the script as was the case before. Equally for the + #undef script. + + Note that this way, users that don't use #define templates don't + pay too much the overhead, since the sed script `realizes' quickly + there are no #define lines. My test case runs in 0.32s with + #define templates, and 0.24s without. To improve this common + case, the whole code for #define templates is conditionalized by a + proper egrep call. The result runs is 0.24s, i.e., almost no cost + at all. + + I made one dangerous change that I carefully evaluated before + commiting: the sed scripts are cut at 48 lines instead of 12 as + before. This produces here docs of about 4Kb. I checked many + `configure's and they all have big here documents, much bigger + than the 12 lines (for instance AC_FUNC_MMAP produces a 150 lines + long, 3800+ character here document). So I moved to the well + known HP UX sed limitations: no more than 100 commands, and there + are two commands per line now, plus a two command preamble. The + speed up is noticeable. + + * acgeneral.m4 (AC_OUTPUT_HEADERS): Remove the ac_e + family. + Changed ac_uD and ac_dD to `...;t t', instead of `...g'. + Instead of creating `conftest.vals' with both ac_e, ac_d, + and ac_u family, preprocess to strip the trailing spaces, and + create `conftest.defines' with the ac_d family, and then + `conftest.undefs' for the ac_e family. + Break up both `conftest.defines' and `conftest.undefs'. Insert a + top label and a global test for `#defines' and `#undef' before. + Call `conftest.defines' if there are #define in the input. + Call `conftest.undefs'. + +1999-10-31 Akim Demaille + + * acgeneral.m4: Prefer `>file' over `> file' etc. + * acspecific.m4: Likewise. + +1999-10-31 Akim Demaille + + Rename the family AC_NEED_DECL as AC_CHECK: it is more uniform, + but keep defining NEED_FOO_DECL when `foo' is not declared. Files + not using Autoconf behave better when declarations lacks than when + they are wrong. So the unset position should off, hence #if NEEDS + instead of #if !HAVE (which is triggered when HAVE is not set). + + * acgeneral.m4 (AC_NEED_DECL): Rename as... + (AC_CHECK_DECL): This. Make sure the arguments are the usual + IF-FOUND, IF-NOT-FOUND. + (AC_NEED_DECLS, AC_CHECK_DECLS): Likewise. + * autoconf.texi (Generic Declarations): Document the changes + aforementioned. + * autoheader.m4 (AH_NEED_DECLS): Rename as + (AH_CHECK_DECLS): This. + (AH_HOOKS): Hook AH_CHECK_DECLS on AC_CHECK_DECLS instead of + _NEED_. + +1999-10-31 Akim Demaille + + Revamp the handling of the arguments of config.status: instead of + looping over config_files etc. to recognize the file names, use + the case which handles the options. + Suggested by Alexandre Oliva. + + * acgeneral.m4 (ifset): Rename as... + (ifval): This. All callers changed. + (ifset): New macro, which tests if a macro is set to a non empty + value. + + * acgeneral.m4: Initialize growing lists and strings to empty, to + ease the tests. + (AC_CONFIG_HEADER): Quote AC_LIST_HEADERS in the define, to handle + the case AC_LIST_HEADERS is initialized. + + * acgeneral.m4: (AC_OUTPUT_CONFIG_STATUS): New macro, pulled out + from... + (AC_OUTPUT): Instead of using $1, $2 and $3, pass them to the + official macros (AC_CONFIG_FILES, AC_OUTPUT_COMMANDS). + Call AC_OUTPUT_CONFIG_STATUS. + (option handling): Use the case-esac to recognize arguments. + (AC_OUTPUT_COMMANDS): Fix the missing fi;done. + +1999-10-31 Akim Demaille + + Add a means to specify commands to be run by config.status. At + the difference of AC_OUTPUT_COMMANDS, require that the set of + commands be named, so that both + CONFIG_COMMANDS=foo ./config.status + and + ./config.status foo + perform the Right Thing. + + * acgeneral.m4 (AC_CONFIG_UNIQUE): Also check in + AC_LIST_COMMANDS. + (AC_CONFIG_FILES): Remove a dead pushdef. + (AC_CONFIG_COMMANDS): New macro. + (AC_LIST_COMMANDS): New config list. + (AC_LIST_COMMANDS_COMMANDS): New growing string. + (AC_OUTPUT_COMMANDS_COMMANDS): New macro, output config commands + in config.status. + (AC_OUTPUT): Take AC_LIST_COMMANDS into account. + (AC_OUTPUT): Call AC_OUTPUT_COMMANDS_COMMANDS. + +1999-10-31 Akim Demaille + + New macro: AC_CONFIG_FILES which is very much like AC_OUTPUT but + that one associates commands to run when a config file is created. + For instance for a shell script `foo', one uses + AC_CONFIG_FILES(foo, chmod +x foo). + + In addition, check that the same name is never used twice in + config files, headers, subdirs and links. + + * acgeneral.m4 (m4_append): Don't insert new line between + elements. + (m4_list_append): New macro. + (AC_CONFIG_IF_MEMBER): New macro which tests if a file is member + of a config list. + (AC_CONFIG_UNIQUE): New macro which ensures that a config file + name is not yet used. + (AC_CONFIG_HEADER, AC_CONFIG_LINKS, AC_CONFIG_SUBDIRS): Use + AC_CONFIG_UNIQUE. + + * acgeneral.m4 (AC_CONFIG_FILES): New macro. + (AC_LIST_FILES): New list, which stores arguments of + AC_CONFIG_LISTS the same as AC_LIST_LINKS stores AC_CONFIG_LINKS + etc. + (AC_OUTPUT): No longer rely on $1 to designate the config files: + register them via AC_CONFIG_FILES. All uses of $1 replaced by + uses of AC_LIST_FILES. + (AC_OUTPUT_FILES): Run the commands associated to the + CONFIG_FILES. + +1999-10-31 Akim Demaille + + * autoconf.sh (Looking for bugs): In addition to AC_, match AH_ + and AM_. + +1999-10-31 Akim Demaille + + Provide the m4 infrastructure for defining AH_ hooks. + + * autoheader.m4 (AH_HOOK): New macro. + Hook all the AC_ macros to their AH_siblings in AH_HOOKS. + Run AH_HOOKS. + + * acgeneral.m4 (m4_append): New macro. + (m4_list_append, m4_list_add): Removed. + +1999-10-31 Akim Demaille + + * acspecific.m4: Formating changes. + * acgeneral.m4: Likewise. + +1999-10-31 Akim Demaille + + * acspecific.m4 (AC_CHECK_MEMBER, AC_CHECK_MEMBERS): New macros. + * autoheader.m4 (AH_CHECK_MEMBERS): New macro. + (epilogue): Hook AH_CHECK_MEMBERS on AC_CHECK_MEMBERS. + +1999-10-31 Akim Demaille + + * autoheader.m4 (AC_FUNC_ALLOCA): Rename from this ... + (AH_FUNC_ALLOCA): ... to this. Includes all the needed templates. + (AC_C_CHAR_UNSIGNED): Rename from this ... + (AH_C_CHAR_UNSIGNED): ... to this. + +1999-10-31 Ben Elliston + + * Makefile.am (CLEANFILES): New explicit variable. + (editsh): acdatadir is no longer defined, so use pkgdatadir. + (editpl): Likewise. From Akim Demaille. + * Makefile.in: Regenerate. + + * configure: Regenerate. + * aclocal.m4: Generate. + * Makefile.in: Regenerate with Automake. + * testsuite/Makefile.in: Likewise. + +1999-10-31 Akim Demaille + + Use Automake. Based on files from Ben Elliston. + + * acgeneral.m4: No longer define AC_ACVERSION, include + acversion.m4. + * acversion.m4.in: New AC_CONFIG_FILE. + * acspecific.m4: Few formating changes. + * autoconf.texi: No longer define EDITION, VERSION and UPDATED: + include version.texi. + AC_OUTPUT the Makefiles mentioned below and acversion.m4. + * configure.in: Use AM_INIT_AUTOMAKE. + Do not AC_ARG_PROGRAM: AM_INIT_AUTOMAKE does it. + * Makefile.am: New file. + * mdate-sh: Likewise. + * missing: Likewise. + * testsuite/Makefile.am: Likewise. + +1999-10-31 Ben Elliston + + * acspecific.m4 (AC_PROG_CC_STDC, AC_C_PROTOTYPES): Inherit from + Automake. From Franc,ois Pinard. + * autoconf.texi (Particular Programs): Document AC_PROG_CC_STDC. + (C Compiler Characteristics): Document AC_C_PROTOTYPES. + + * testsuite/autoconf.s/defines.exp: Changed `fail' and `pass' in + `xfail' and `xpass'. The test suite checks that acconfig.h + templates the AC_DEFINEs. Since we no longer rely on acconfig.h, + the test is obsolete. + * acspecific.m4 (AC_PROG_BINSH, AC_PROG_SED): Don't quote the name + of the macro defined; the test suite does not recognize this + syntax. From Akim Demaille. + +1999-10-27 Ben Elliston + + * autoconf.texi (Generic Programs): @defmac for AC_PATH_TOOL may + not span multiple lines. + +1999-10-26 Ben Elliston + + * INSTALL: Regenerate. + +1999-10-16 Ben Elliston + + * acspecific.m4 (AC_PROG_CXX): gcc is not a C++ compiler. + * autoconf.texi (AC_PROG_CXX): Update documentation. + +1999-10-13 Ben Elliston + + * acconfig.h: Reintroduce missing definitions due to test suite + regressions. + + * autoconf.texi (Configuration Headers): Document the potential + trouble caused by autoheader and boilerplate files. Fix for + PR autoconf/45. + +1999-10-07 Alexandre Oliva + + * Makefile.in (dist): Fixed for srcdir != objdir. + +1999-10-07 Akim Demaille + + * acspecific.m4 (AC_CHECK_HEADER_DIRENT): Reintroduce its + AC_DEFUN. + +1999-10-06 Akim Demaille + + * acspecific.m4: Various formatting changes. + * acspecific.m4 (AC_PROG_CC_WORKS): Declare main returns an int. + +1999-10-05 Andreas Schwab + + Shell meta characters in an argument causes the configure script + to freak out and generate a config.status file that contains + syntax errors. + Bug triggered by ./configure --with-foobar=\''`"$'. + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Quote single quotes that end + up between single quotes. Protect arguments of echo with double + quotes. + (AC_INIT_PREPARE): Likewise. + (AC_PATH_PROG): Protect argument of test. + (AC_OUTPUT): Quote meta characters in ac_configure_args. + +1999-10-05 Ben Elliston + + * autoconf.texi (AC_PATH_XTRA): Correctly document the behaviour + when X is not available. + +1999-10-05 Akim Demaille + + The sed quoting script depends on the shape of the commands used + by AC_SUBST. The latter was changed, but not the former. + Bug triggered with FOO='%\c' AC_SUBST(FOO). + + * acgeneral.m4 (AC_OUTPUT_FILES): Fix the sed quoting script. + +1999-10-05 Akim Demaille + + When you rely on the `t' flag of sed for the immediately + preceding substitution, use a combination of `: foo; t foo'. + Bug triggered if you AC_DEFINE(FOO, "%"). + Additionally, work around a bug in IRIX sed. + Suggested by Ken Pizzini. + + * acgeneral.m4 (AC_OUTPUT_HEADER): Added a label and a test in the + sed code of `$ac_cs_root.hdr'. + +1999-10-05 Akim Demaille + + Implement AC_PATH_TOOL. + Submited by Gary V. Vaughan. + + * acgeneral.m4 (AC_PATH_TOOL): New macro. + * autoconf.texi (Generic Programs): Document. + +1999-10-05 Akim Demaille + + Handle arbitrary version numbers. + Reported by H.J. Lu. + + * acgeneral.m4 (m4_split): Support a second optional argument: a + regexp to specify where to split. + (m4_compare): New macro, compares arbitrary long m4 lists of + integers. + (AC_PREREQ_SPLIT, AC_PREREQ_CANON, AC_PREREQ_COMPARE): Removed, + replaced by more generic macros. + (AC_PREREQ): Reimplemented, using m4_compare and m4_split. + +1999-10-04 Akim Demaille + + Beware of the expansions of $n in comments. + + * acgeneral.m4 (AC_OUTPUT): Changed $1 into $[1] in dnls. + +1999-10-04 Akim Demaille + + Revert partially the previous changes: AC_CHECK_HEADERS_DIRENT is + used by AC_HEADER_DIRENT. + + * autoheader.m4: Restablish the hook for AC_CHECK_HEADERS_DIRENT. + + * acspecific.m4 (AC_CHECK_HEADERS_DIRENT, AC_CHECK_HEADER_DIRENT): + Reinserted. + +1999-10-02 Akim Demaille + + * acgeneral.m4: Instead of just undefining eval, format, include + and shift, rename them to m4_eval, etc. + +1999-10-02 Akim Demaille + + AC_DIR_HEADERS is hasbeen'ed. + + * acspecific.m4 (AC_DIR_HEADER): Raised from obsolete to hasbeen. + + * acspecific.m4 (AC_CHECK_HEADERS_DIRENT, AC_CHECK_HEADER_DIRENT): + Removed, were used only by AC_DIR_HEADER and were not documented. + + * autoheader.m4: Remove the hooks for AC_CHECK_HEADERS_DIRENT. + + * autoconf.texi (Particular Headers): Removed the documentation of + AC_DIR_HEADER. + + * autoconf.texi (Environment Variables): Remove the very last + traces of documentation of --env-VAR. + +1999-10-02 Akim Demaille + + Remove hasbeen'ed macros from the documentation. + + * autoconf.texi (Obsolete Macros): Document AC_HASBEEN. + + * autoconf.texi (Libraries): Remove the documentation of + AC_HAVE_LIB. + (Particular Headers): likewise for AC_UNISTD_H, AC_MEMORY_H, + AC_USG. + (C Compiler Characteristics): Likewise for AC_INT_16_BITS, + AC_LONG_64_BITS. + +1999-10-01 Akim Demaille + + Make the handling of the configuration links (AC_LINK_FILES) + exactly the same as that of configurations files (AC_OUTPUT_FILES) + and headers (AC_CONFIG_HEADERS). As a result, it is sane to run + ./config.status src/libmy_lib + or + CONFIG_LINKS=src/lib_mylib:lib/lib_mylib ./config.status + + * acgeneral.m4 (AC_LINK_FILES): Use AC_FATAL to diagnose bad + number of argument. + Obsoleted (but implemented) in favor of AC_CONFIG_LINKS. + + * acgeneral.m4 (AC_CONFIG_LINKS): New macro. Takes space + separated list of DEST:SOURCES arguments. + + * acgeneral.m4: Rename each occurence of AC_LIST_HEADER as + AC_LIST_HEADERS for consistency. + + * acgeneral.m4 (AC_OUTPUT, config.status prologue): Move the + definition of config_files and config_headers to the top. + Add the definition of config_links. + Change the help message to use the aforementioned variables. + + * acgeneral.m4 (AC_OUTPUT_LINKS): Adapted to the new scheme of + AC_LIST_LINKS. + + * autoconf.texi (Output, AC_OUTPUT): Mention AC_CONFIG_LINKS. + (Invoking config.status): Mention CONFIG_LINKS. + + * autoconf.texi (Using System Type): Document AC_CONFIG_LINKS. + Explicit the obsoleteness of AC_LINK_FILES. + +1999-10-01 Akim Demaille + + Moving most of the task of creating config.h.in from sh to m4. + Getting rid of acconfig.h by supply a major new family of macros: + AH_* which make it possible to insert arbitrary text into + config.h.in. + + * autoheader.m4: Major rewrite: introduction of a set of macros + AH_ that produce code into config.h.in. There are two sets of + macros: generic macros, or specialized, documented below. The + basic idea is that an AC_FOO macro which needs an entry in + config.h.in should have a sibling AH_FOO which expands into that + entry. In a near future, these macros will be moved next to their + siblings. + + * autoheader.m4 (AH_VERBATIM, AH_DEFINE, AH_DEFINE, AH_NEED_DECLS, + AH_CHECK_SIZEOF, AH_CHECK_FUNCS, AH_CHECK_HEADERS, + AH_CHECK_HEADERS, AH_CHECK_LIB, AH_PROG_LEX, AH_FUNC_ALLOCA, + AH_C_CHAR_UNSIGNED, AH_AIX, AH_F77_WRAPPERS): New macros. + + * autoheader.m4 (End section): Bind AC_ macros to their + AH_siblings. + + * autoheader.sh: Remove the sections in charge of SYMS, TYPES, + FUNCS, HEADERS, LIBS and DECLS: autoheader.m4 is now in charge of + these. + + * autoheader.sh (options): Added -d, --debug, which does not + remove the temporary files. + + * autoheader.sh: Instead of redirecting stdout to the output + stream, always output to a temporary file. This allows to change + slightly the consistency check: before autoheader would check that + each non documented AC_DEFINE is templated in an acconfig. Now it + just checks whether the template is in the output file. + + * acconfig.h: Completely emptied, the remaining templates + (_ALL_SOURCE, __CHAR_UNSIGNED__, F77_FUNC, F77_FUNC_, + HAVE_STRINGIZE, and STACK_DIRECTION) are now either associated to + their AC_DEFINE, or to one of the new AH_ macros. + + * acgeneral.m4: Reordering of the m4 macros which are not specific + to Autoconf. + + * acgeneral.m4 (AC_HAVE_LIB): Promoted from obsolete to hasbeen. + + * acgeneral.m4 (AC_TR_CPP): Fixed quoting problem, and missing ^ + in patsubst. + (AC_TR_SH): Fixed quoting problem. + +1999-09-29 Akim Demaille + + * acgeneral.m4 (AC_WRAP): Don't output an extra space after the + last word. + +1999-09-29 Ben Elliston + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Check for the kstat_open() + function in libkstat (on systems such as Solaris). This family of + functions is preferred since they don't require setgid permissions + to use them. Fix for PR autoconf/65. + +1999-09-29 Akim Demaille + + * acconfig.h: Commit the change announced below. + +1999-09-29 Akim Demaille + + * acspecific.m4 (AC_C_CONST): Changed from + const charset x; + to + const charset x = {0, 0}; + From Jim Meyering. + +1999-09-28 Akim Demaille + + Start to get rid of acconfig.h. It is an anachronism. + + * acgeneral.m4 (_AC_SH_QUOTE): Both cases must be evaluated the + same number of times. + + * acconfig.h (_ALLOCA, CLOSEDIR_VOID, const, CRAY_STACKSEG_END, + DGUX, DIRENT, GETGROUPS_T, GETLOADAVG_PRIVILEGED, GETPGRP_VOID, + gid_t, HAVE_ALLOCA, HAVE_ALLOCA_H, HAVE_DOPRNT, HAVE_FNMATCH, + HAVE_GETLOADAVG, HAVE_GETMNTENT, HAVE_LONG_DOUBLE, + HAVE_LONG_FILE_NAMES, HAVE_MMAP, HAVE_RESTARTABLE_SYSCALLS, + HAVE_ST_BLKSIZE, HAVE_ST_BLOCKS, HAVE_STRCOLL, HAVE_ST_RDEV, + HAVE_STRFTIME, HAVE_SYS_WAIT_H, HAVE_TM_ZONE, HAVE_TZNAME, + HAVE_UNISTD_H, HAVE_UTIME_NULL, HAVE_VFORK_H, HAVE_VPRINTF, + HAVE_WAIT3, inline, INT_16_BITS, LONG_64_BITS, MAJOR_IN_MKDEV, + MAJOR_IN_SYSMACROS, _MINIX, NDIR, NEED_MEMORY_H, NLIST_NAME_UNION, + NLIST_STRUCT, NO_MINUS_C_MINUS_O, F77_NO_MINUS_C_MINUS_O, + _POSIX_1_SOURCE, _POSIX_SOURCE, RETSIGTYPE, SELECT_TYPE_ARG1, + SELECT_TYPE_ARG234, SELECT_TYPE_ARG5, SETPGRP_VOID, + SETVBUF_REVERSED, STAT_MACROS_BROKEN, STDC_HEADERS, SVR4, SYSDIR, + SYSNDIR, SYS_SIGLIST_DECLARED, TIME_WITH_SYS_TIME, TM_IN_SYS_TIME, + uid_t, UMAX, UMAX4_3, USG, vfork, VOID_CLOSEDIR, WORDS_BIGENDIAN, + X_DISPLAY_MISSING, YYTEXT_POINTER): Removed their autoheader + template. They are now documented with their own AC_DEFINE. + + * acgeneral.m4 (AC_HASBEEN): New macro. Same as AC_OBSOLETE, but + dies. + + * acspecific.m4 (AC_UNISTD_H, AC_USG, AC_MEMORY_H, AC_INT_16_BITS, + AC_LONG_64_BITS): Promoted from obsolete to hasbeen. + + * autoheader.m4 (AC_DEFINE_UNQUOTED): Define via AC_DEFINE, so + that we program things only once. + (AC_DEFINE): Use AC_WRAP and _AC_SH_QUOTE. It is now safe to have + backquotes and extra spaces in the third argument, without + yielding a bad result. + + * autoheader.m4: Instead of a huge `eval', use a temporary file. + (option handling): Added --debug, to keep the temporary files. + Fixed a couple of missing quotes. + +1999-09-28 Akim Demaille + + Make AC_FOREACH be robust to active symbols. + + * acgeneral.m4 (m4_split, m4_join, m4_strip): New macros. + (AC_FOREACH_COMMA): Rename as... + (m4_foreach): this. + (_AC_CAR): Renamed as... + (_m4_car): this. + (_AC_FOREACH): Renamed as... + (_m4_foreach): this. + (_AC_COMMATIZE): Removed. + (AC_FOREACH): Rewritten using m4_split, m4_join, m4_strip, and + m4_foreach. + * acgeneral.m4: Spell checked. + * autoconf.texi: Likewise. + +1999-09-28 Akim Demaille + + * acgeneral.m4 (AC_NEED_DECL): When $4 is given, don't provide + defaults headers. + Change the message from `have' to `need'. + Change the actions for `if-(not-)found' to `if-(not-)needed. + Remove trailing parentheses. + + * acgeneral.m4 (AC_NEED_DECLS): Change the actions for + `if-(not-)found' to `if-(not-)needed. + Define NEED_DECL_foo, instead of NEED_foo_DECL. + + * autoheader.sh (decls): Reflect this. + + * autoconf.texi (Generic Declarations): Update. + +1999-09-27 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT): Divert AC_OUTPUT_FILE to + AC_DIVERSION_KILL if there are no CONFIG_FILES. + (AC_OUTPUT, ac_cs_usage): Output the list of files to instanciate + only if there are. + +1999-09-27 Akim Demaille + + * acgeneral.m4 (AC_CHECK_DECL): Renamed as... + (AC_NEED_DECL): This. + (AC_CHECK_DECLS): Renamed as... + (AC_NEED_DECLS): This. + (AC_NEED_DECL): Include , , , + , , , and . + + * autoconf.texi (Generic Declarations): Updated. + +1999-09-27 Ben Elliston + + * autoscan.pl (scan_files): Emit an AC_PROG_CC invocation to + configure.scan if there are any C files present. Fix for PR + autoconf/19. + +1999-09-26 Akim Demaille + + * acgeneral.m4 (AC_WRAP): Rewritten. + (AC_HELP_STRING): Wrapper of AC_WRAP. + * acgeneral.m4 (_AC_SH_QUOTE): Rewritten. Don't try to handle + both backslashed and non backslashed backquotes in a single + string: consider that either all the backquotes are quoted, or + none. + +1999-09-26 Akim Demaille + + * acgeneral.m4 (AC_PATH_PROG): Use a single case statement for + Unix and DOS absolute paths. + + * acgeneral.m4 (AC_CHECK_SIZEOF): Fix a typo. + Allow a third default argument: extra headers. + * autoconf.texi (C Compiler Characteristics): Document. + + * acgeneral.m4 (AC_CHECK_TYPE): Convert to the AC_VAR_* family. + Allow a third optional argument: extra includes. + * autoconf.texi (Generic Typedefs): Documents. + +1999-09-26 Ben Elliston + + * acgeneral.m4 (AC_OUTPUT_LINKS): Eliminate gratuitous spaces from + $ac_sources if this variable is otherwise empty. Fix for PR + autoconf/30. + +1999-09-25 Ben Elliston + + * autoconf.texi (AC_FUNC_SETVBUF): Do not mention which systems + might have their setvbuf() arguments reordered. It's difficult to + accurately determine and is not essential. Fix for PR autoconf/7. + + * acgeneral.m4 (AC_LINK_FILES): Emit an error if an incorrect + number of arguments are collected. Fix for PR autoconf/10. + +1999-09-25 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT, handling of options): Make it possible + to specify the files to configure on the command line instead of + via envvars. Document it. + +1999-09-25 Akim Demaille + + * acgeneral.m4: Rename the occurences of the variable `confstat' + as `ac_cs_root'. The previous name was breaking the naming + scheme. + +1999-10-24 Akim Demaille + + * TODO: Updated. + Added a section for 2.15 and 3. + +1999-09-24 Ben Elliston + + * acspecific.m4 (AC_HEADER_STDC): Define ISLOWER and ISUPPER + macros correctly on EBCDIC systems. Contributed by Kurt D. + Zeilenga. Fix for PR autoconf/6. + +1999-09-24 Jim Blandy + + * acspecific.m4 (AC_C_VOLATILE): New test. + * acconfig.h: Add new entry for `volatile'. + * autoconf.texi (C Compiler Characteristics): Document it. + +1999-09-24 Ben Elliston + + * autoreconf.sh: Do not run autoheader if AC_CONFIG_HEADER is + commented out in configure.in. Reported by Erez Zadok + as a fix for PR autoconf/21. + + * install.texi: Replace `can not' with `cannot'. + +1999-09-23 Pavel Roskin + + Avoid that comments from aclocal.m4 show up in configure when + using AC_REVISION. + + * acgeneral.m4: New diversion levels AC_DIVERSION_KILL and + AC_DIVERSION_BINSH introduced. Use AC_DIVERSION_KILL as the + initial value for AC_DIVERSION_CURRENT. + (AC_INIT_BINSH): Set AC_DIVERSION_BINSH explicitly + (AC_REVISION): Likewise. + (AC_INIT): Set AC_DIVERSION_NOTICE when calling AC_INIT_NOTICE. + +1999-09-23 Akim Demaille + + * NEWS: Document AC_ARG_VAR. + + * acspecific.m4 (AC_C_LONG_DOUBLE): Avoid a needed execution by + using a pure compilation test. Excellent for cross compilation. + From Kaveh R. Ghazi. + +1999-09-22 Akim Demaille + + * install.texi: Give more details on envvar handling. + * acgeneral.m4 (AC_HELP_STRING): Add a third argument to tune the + width of the first column. + (AC_INIT_NOTICE): Initialize ac_arg_enable_help, ac_arg_with_help, + and ac_arg_var_help. + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Remove the handling of + --env-var=. After debate, the solution chosen to specify envvars + to configure is a` la make: ./configure VAR=VAL. + (AC_INIT_PARSE_ARGS, --help): Output ac_arg_enable_help, + ac_arg_with_help, and ac_arg_var_help. + * acgeneral.m4 (AC_ARG_VAR): New macro, to register and document + influent envvars. + * acspecific.m4 (AC_PROG_CC): Document CFLAGS. + This is mainly to test AC_ARG_VAR. Var to document are to be + defined. + +1999-09-22 Akim Demaille + + * acgeneral.m4 (m4_default): New macro. + (AC_CHECK_LIB): When ACTION-IF-FOUND is specified, don't perform + the default action. + Reported by Pavel. + +1999-09-22 Ben Elliston + + * config.guess: Clear the CCOPTS environment variable before + invoking the C compiler on HP-UX. This is necessary to guarantee + that the test program is compiled correctly. Reported by Dietmar + P. Schindler. + +1999-09-22 Linas Vepstas + + * config.guess: Add OS/390 match pattern. + * config.sub: Add mvs, openedition targets. + +1999-09-21 Nick Clifton + + * config.sub: Add fr30 target. + +1999-09-21 Ben Elliston + + * configure.in: Check if an appropriate version of GNU m4 is + installed at configure-time rather than at runtime. From Pavel + Roskin. Fix for PR autoconf/2. + * configure: Regenerate. + +1999-09-21 Akim Demaille + + * acgeneral.m4 (AC_INIT_PARSE_ARGS, --help message): Use quoted + heredocs to avoid problems with quotes. + +1999-09-21 Akim Demaille + + * NEWS: Updated. + * THANKS: Likewise. + + * acgeneral.m4 (AC_CHECK_HEADER): Use AC_VAR_*. + (AC_CHECK_HEADERS): Adapted. + + * acgeneral.m4 (AC_TR): Remove, it is useless. + (AC_TR_CPP): Updated version of formerly AC_TR_DEFINE, based on + the model of AC_TR_SH. + All callers changed. + + * autoconf.sh (Checking for Bugs): Remove the indirection that + made the `sort -u' useless. + +1999-09-21 Akim Demaille + + * autoconf.sh (Last sed cmd): Change also @PND@ to `#', since this + is also a symbol very hard to quote in m4. + + * acgeneral.m4 (AC_CHECK_LIB): Use AC_VAR_*. + + * acgeneral.m4: Use `m4_BUILTIN' instead of indirection via + `builtin'. + +1999-09-21 Akim Demaille + + * autoconf.texi (Particular Structures): Move documentation of + AC_HEADER_STAT and AC_HEADER_TIME from here... + (Particular Headers): to here. + (Declarations): New section. + (Particular Headers): Move doc of AC_DECL_SYS_SIGLIST from here... + (Particular Declarations): to here. + +1999-09-21 Kaveh R. Ghazi + + * acgeneral.m4 (AC_CHECK_FUNC_DECL, AC_CHECK_FUNC_DECLS): New + macros. + + * autoconf.texi (AC_CHECK_FUNC_DECL, AC_CHECK_FUNC_DECLS): + Document. + + * autoheader.m4: Add support for AC_CHECK_FUNC_DECLS. + + * autoheader.sh: Likewise. + +1999-09-21 Akim Demaille + + * acgeneral.m4 (AC_SHELL_IFELSE): New macro. + (AC_VAR_IF_SET): Use it. + (AC_CHECK_FUNC): Likewise. + + * Makefile.in (${srcdir}/configure): Use autoconf.sh to build + Autoconf's configure. Before the building was performed running + m4 at hand, but much was not done (e.g., __oline__, + @BKL@... expansion) + +1999-09-20 Akim Demaille + + * acgeneral.m4 (AC_OUTPUT): Don't remove the CONFIG_HEADERS + unconditionaly: it breaks the `config.h has not changed' trick. + +1999-09-20 Ben Elliston + + * autoheader.sh: Bourne shell compatibility fix. From Pavel Roskin. + +1999-09-20 Pavel Roskin + + * autoheader.sh: Fix the tr invocation. + +1999-09-17 Ben Elliston + + * config.guess: Detect QNX version 4. + * config.sub: Handle `qnx' and `i386-qnx' aliases. + +1999-09-17 Erez Zadok + + * config.guess: Eliminate the trailing dot if ${UNAME_RELEASE} is + 1.4-. Fix for PR autoconf/22. + +1999-09-17 Akim Demaille + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Improve configure's --help. + + * acgeneral.m4 (AC_OUTPUT): Change the root of filenames of + config.status from $conftest to $confstat. + The previous patch to make config.status reentrant was wrong, + because it changed some `conftest' that are used by configure into + `$conftest', while it was for config.status only. To avoid + another confusion like this, all the filenames of config.status + should be `$confstat*', and those of configure should be + `conftest*'. + (AC_OUTPUT): Rename the uses of `ac_file' for the sed fragments as + `ac_sed_frag'. + + * acgeneral.m4 (AC_OUTPUT): This macro used to open the here + documents that configure uses to generate config.status, included + that of the submacros. Now, it no longer handles the here + documents for its subroutines (it was far to hard to track). + (AC_OUTPUT_FILES): Open and close your here documents to + $CONFIG_STATUS. + (AC_OUTPUT_HEADER): Likewise. + (AC_OUTPUT_LINKS): Likewise. + + * acgeneral.m4 (AC_OUTPUT_FILES): Move $ac_vpsub and $extrasub + from the AC_SUBST substitutions (i.e., that of @SHELL@ etc.) to + the specific section (that of @srcdir@ etc.). + Now the ``general substitution'' section is absolutely uniform. + + * acgeneral.m4 (AC_SUBST): Change sed call from `s%@from@%to%g' + into `s%@from@%to%;t t'. + (AC_SUBST_FILE): Likewise. + (AC_OUTPUT_FILES): Optimize the sed scripts by branching if there + are no `@' on the line. Impressive speed up. + + * Makefile.in (DISTFILES): Add THANKS. + + * THANKS: New file. + +1999-09-15 Akim Demaille + + * acgeneral.m4 (AC_CHECK_FILE): Use ifset. + (AC_CHECK_FUNC): Updated to use AC_VAR_*, and AC_CACHE_CHECK. + (AC_CHECK_SIZEOF): Likewise. + (AC_CACHE_CHECK): Use AC_MSG_RESULT_UNQUOTED. + (AC_MSG_RESULT_UNQUOTED): New macro. + +1999-09-15 Alexandre Oliva + + Fix for PR autoconf/28. + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't assume LF is \012, use + `echo` followed by a non-blank, within quotes. + * autoheader.sh (syms): Likewise. + * configure: Rebuilt. + +1999-09-14 Alexandre Oliva + + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't assume LF is \012, + use `echo` followed by a non-blank, within quotes. + * autoheader.sh (syms): Likewise. + * configure: Rebuilt. + Reported by Christian Krone. + + * acgeneral.m4 (AC_INCLUDE): New macro. + * autoconf.texi: Document it. + + * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Save INSTALL in + ac_given_INSTALL, so that we can adjust relative pathnames for + sub-configures. + + * acgeneral.m4 (Configuration): Accept --env-VAR=VALUE and + VAR=value. + * autoconf.texi, install.texi: Document it. + * configure: Rebuilt. + +1999-09-14 Akim Demaille + + * acgeneral.m4 (AC_HELP_STRING): Rewrite in m4. Have m4 work, and + give a break to sh. + (_AC_FOREACH): Be careful not to evaluate the arguments. A loop + over *quoted* macro names should loop over the macro names, not + upon their expansion. + (_AC_COMMATIZE): Also swallow end of lines. + + * autoconf.texi (Pretty Help Strings): Updated to reflect the + changes. + +1999-09-13 Akim Demaille + + * acgeneral.m4 (ifset): New helpy tiny macro. + (AC_OUTPUT): Improved --help of config.status. + (AC_OUTPUT): Remove inconditionaly all the files to be updated. + (AC_OUTPUT): Use pid to define the temporary file names in order + to allow parallel builds. + + * autoconf.sh: Substitute also /@BKL@/[/ /@BKR@/]/ /@DLR@/$/ so + that these characters are more easily accessible from m4 without + turning changequote juggling into a nightmare. + + * acgeneral.m4 (AC_WRAP): New macro, for word wrapping. + + * autoconf.texi: Update the direntry for more modern Texinfos. + Add pointer to configure and config.status. + Remove the dots from the menus: horizontal space is precious. + (Invoking config.status): More traditional presentation of the options. + +1999-09-07 Ben Elliston + + * autoreconf.sh: Recognise -v as a synonym for --verbose. + +1999-09-07 Gary V. Vaughan + + * Makefile.in (INSTALL, standards.info, autoconf.info): MiKTeX + for Windows treats all options after the first filename as + additional filenames, so real options must appear before the first + filename. + +1999-09-07 Steven G. Johnson + + * autoconf.texi (LDFLAGS, LIBS): Document that -L linker flags + should be kept in LDFLAGS and not LIBS. + +1999-09-07 Jim Meyering + + * acgeneral.m4 (AC_SEARCH_LIBS): Use $ac_lib as the index, not $i. + +1999-09-06 Ben Elliston + + * acspecific.m4 (AC_FUNC_ALLOCA): Rename cache variable to avoid + name clashes with AC_CHECK_HEADER(alloca.h). + +1999-09-05 Steve Chamberlain + + * config.sub: Add support for configuring for picoJava (pj). + +1999-09-05 Ben Elliston + + * acgeneral.m4 (CONFIG_AUX_DIRS): Try running `shtool install'. + Contributed by Ralf S. Engelschall. + +1999-09-04 Ben Elliston + + * config.guess: Use POSIX compliant shell code on DG/UX. + Suggested by Stephen Gildea. + +1999-09-04 Pavel Roskin + + * acgeneral.m4 (AC_OUTPUT_FILES): Output comment to not only + `Makefile', but also `makefile'. + +1999-09-04 Jim Blandy + + * Makefile.in (install): Don't freak if the M4FROZEN files were + never generated. m4 1.1 is supported, but doesn't freeze files. + +1999-09-04 Scott Bambrough + + * config.guess: Autodetect ArmLinux using 2.9.1.xx linker + emulation names and using the emulation names from the linker from + the binutils CVS tree. + + * config.sub: Change manufacturer name for the NetWinder alias + from Corel to Rebel. + +1999-09-04 Jeremy Elson + + * autoheader.m4 (AC_CHECK_HEADER): Define. + +1999-09-02 Tom Tromey + + * autoheader.sh: Allow multiple spaces between #undef and symbol + name. + +1999-09-01 Akim Demaille + + * acgeneral.m4 (AC_ACVERSION): Bump to 2.14.1 to differenciate the + experimental branch from the main trunk. + + * acgeneral.m4 (AC_FOREACH_COMMA): New macro, to perform m4 loops + on m4 lists (i.e., list='(item_1, item_2, ..., item_n)'). + (AC_FOREACH): New macro, to perform m4 loops on shell lists (i.e., + list='item_1 item_2 ... item_n'). + + * acgeneral.m4 (AC_DEFUN): Now accept two other optionnal + parameters: the name of the macro which is specialized here, and + the name of the first argument. For instance `AC_CHECK_FNMATCH' + should be declared as specializing `AC_CHECK_FUNC' for `fnmatch' + as first argument. + + * acgeneral.m4 (AC_CHECK_FILES): Use AC_FOREACH for looping, + instead of the shell's loop. + + * acgeneral.m4 (AC_TR): In addition to transliteration, provide a + means to specify the valid destination alphabet and a default + character for aliens characters. This is in order to remove + characters such as `+:-' etc. that may appear in file names, but + are not valid for shell variables or #defines. + (AC_TR_DEFINE): New macro, maps anything to a valid uppercase + #define rhs. + (AC_TR_UPCASE_NAME): Replaced by AC_TR_DEFINE. All callers + changed. + (AC_TR_UPCASE_FILE): Likewise. + + * acgeneral.m4 (AC_TR_SH): Don't use the generic AC_TR: there is a + difficult problem of quoting between m4 and sh. Use the variable + $ac_tr_sh to work around this difficulty. + (AC_VAR_TEST_SET): New macro, which tests if a variable is set. + (AC_VAR_IF_SET): New `ifelse' macro. + (AC_CACHE_VAL): Use AC_VAR_IF_SET. + (AC_INIT_NOTICE): Define $ac_tr_sh. + + * acgeneral.m4 (AC_CHECK_FILE): Converted to use AC_TR and AC_VAR + families. + + * acgeneral.m4: Fixed the regular expressions: `$' shall not be + portably in a sed \(\) group. + +1999-08-28 Ben Elliston + + * config.guess: Once and for all, emit the correct string for + Unixware 7! Contributed by Mike Hopkirk. + + * acspecific.m4 (AC_C_INLINE): Qualify the return type of the + dummy inlined function to satisfy newer C++ compilers. Fix for + PR autoconf/49. + +1999-08-26 Ben Elliston + + * autoconf.texi (Changed Results): Correct an error in one of the + examples. Fix for PR autoconf/38. + +1999-08-25 Ben Elliston + + * autoconf.texi (Cache Variable Names): Be more explicit about the + requirements for cache variable names. Fix for PR autoconf/53. + +1999-08-25 Alexandre Oliva + + * autoreconf.sh: Run aclocal with the -I option only if + aclocal_dir != `.'. Fix for PR autoconf/44. + +1999-08-22 Matthew D. Langston + + * acspecific.m4 (AC_PROG_CC): Remove uname test for 32-bit + Windows/Cygwin, and just test for `cl' as a last resort. + + * autoconf.texi (Particular Programs): Document new optional + argument to AC_PROG_CC, AC_PROG_CXX and AC_PROG_F77. Document + additions to the Fortran 77 compiler search list. + + * acspecific.m4 (AC_PROG_F77): Add more Fortran 77 compilers to + the search list. Contributed by Steven G. Johnson. + + (AC_PROG_CC): Likewise. + (AC_PROG_CXX): Likewise. + * acspecific.m4 (AC_PROG_F77): Add an optional first argument + which gives the user an opportunity to specify an alternative + search list for the compiler. + +1999-08-18 Ben Elliston + + * config.guess: Remove "/MP" from the release string on + multiprocessor x86 machines running SVR4.0. Suggested by Tom + Purcell. + +1999-08-16 Kaveh R. Ghazi + + * acgeneral.m4 (AC_CHECK_TYPE): Add optional third argument + INCLUDES, which specifies the headers in which to search for the + type in question. Also, pass a "description" argument to + AC_DEFINE_UNQUOTED. + * acconfig.h (mode_t, off_t, pid_t, size_t): Remove definitions. + * autoconf.texi (AC_CHECK_TYPE): Document optional third argument. + +1999-08-05 Jeffrey A Law + + * config.sub (-wrs case): Use os=-vxworks, not os=vxworks. + +1999-08-05 Ben Elliston + + * config.guess: Update patch submission address. + +1999-08-05 Ben Elliston + + * config.sub: Accept version number appended to OS name for MiNT. + Contributed by Guido Flohr. + +1999-08-04 Ben Elliston + + * Makefile.in (INSTALL_SCRIPT): Substitute. + (install): Install scripts with $(INSTALL_SCRIPT). + +1999-07-20 Tom Tromey + + * autoheader.sh: Fixed regexp when searching for missing symbol. + From Pavel Roskin. + +1999-07-16 Tom Tromey + + * autoheader.sh: Be more stringent when looking to see if symbol + is in a template file. + +1999-07-15 Matthew D. Langston + + * acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): New implementation, to + make maintenance easier. + Grep the initial output so that we don't start parsing "-l" and + "-L" too early. From Christopher Lee. + + * acgeneral.m4 (AC_LIST_MEMBER_OF): New "private implementation + macro" use by AC_F77_LIBRARY_LDFLAGS. + (AC_LINKER_OPTION): Likewise. + +1999-07-11 Ben Elliston + + * config.guess: Cray T3E has an Alpha CPU. + +1999-07-04 Mark Elbrecht + + * acspecific.m4 (AC_PROG_CXX): Look for gpp after g++. gpp is the + DJGPP C++ compiler, since `g++' is not a valid DOS filename. + +1999-06-12 Ben Elliston + + * config.guess: Detect Linux on ia64. + * config.sub: Handle ia64. + +1999-06-12 Ben Elliston + + * config.guess: Handle `elf32ppclinux' from ld. Contributed by + Cort Dougan. + +1999-06-09 Matthew D. Langston + + * autoconf.texi (Pretty Help Strings): Synchronize documentation + with implementation. + +1999-06-04 Matthew D. Langston + + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Fix sed regexp for handling + CPP macros with args. + +1999-06-04 Nick Clifton + + * config.sub: Add mcore target. + +1999-06-03 Ben Elliston + + * acgeneral.m4 (AC_ACVERSION): Correct version number. + * autoconf.texi (EDITION): Likewise. + (VERSION): Likewise. + +1999-06-02 Matthew D. Langston + + * autoconf.texi (Pretty Help Strings): Document and regenerate the + indices. + * acgeneral.m4 (AC_HELP_STRING): New macro. + + * NEWS: Begin documenting "Major changes" for release 2.14. + + * acconfig.h (F77_FUNC): Add. + (F77_FUNC_): Likewise. + +1999-06-01 Akim Demaille + + * acgeneral.m4 (AC_PREFIX_PROGRAM): Use macros of the AC_TR_ + family. + (AC_HAVE_LIBRARY): Likewise. + (AC_CHECK_FUNCS): Likewise. + (AC_CHECK_FILES): Likewise. + (AC_CHECK_SIZEOF): Likewise. + + * acgeneral.m4 (AC_TR): New macro which performs transliteration + by m4 when possible, or by `tr' at configure time. + (AC_TR_UPCASE_NAME): New macro, transliteration 'a-z' to 'A-Z'. + (AC_TR_UPCASE_FILE): New macro, transliteration 'a-z./-' to + 'A-Z___'. + (AC_TR_SH): New macro, transliteration to valid sh var name. + + * acgeneral.m4 (_AC_SH_QUOTE): New macro which protects non + protected backquotes against shell expansion. + (AC_MSG_CHECKING): Use it. + (AC_CHECKING): Use it. + (AC_MSG_RESULT): Use it. + (AC_VERBOSE): Use it. + (AC_MSG_WARN): Use it. + (AC_MSG_ERROR): Use it. + + * acgeneral.m4 (_AC_MESSAGE): New macro to report message at m4 + time. + (AC_WARNING): New macro to report warnings at m4 runtime. + (AC_FATAL): New macro, to report fatal error at m4 runtime. + + * acspecific.m4 (AC_RSH): Use AC_FATAL. + (AC_ARG_ARRAY): Idem. + (AC_HAVE_BOUNDBANG): Idem. + + * acgeneral.m4 (AC_VAR_IF_INDIR): New macro. + (AC_VAR_SET): Likewise. + (AC_VAR_GET): Likewise. + +1999-05-30 Matthew D. Langston + + * autoheader.m4 (AC_DEFINE): Ignore CPP macro arguments. + (AC_DEFINE_UNQUOTED): Likewise. + + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Change sed regexps to + recognize CPP macros that take arguments. Reported, and based on + a patch, by Steven G. Johnson. + (AC_OUTPUT_HEADER): Likewise. + + * autoconf.texi (Fortran 77 Compiler Characteristics): Document + new AC_F77_NAME_MANGLING macro. + +1999-05-30 Steven G. Johnson + + * autoconf.texi (Fortran 77 Compiler Characteristics): Document + new AC_F77_FUNC_WRAPPER macro. + + * acspecific.m4 (AC_F77_WRAPPERS): New macro to define the + F77_FUNC and F77_FUNC_ CPP macros to properly mangle the names of + C identifiers so that they match the name mangling scheme used by + the Fortran 77 compiler. + (AC_F77_NAME_MANGLING): New macro to test for the name mangling + scheme used by the Fortran 77 compiler. + +1999-05-27 Matthew D. Langston + + * acgeneral.m4 (AC_CHECK_LIB): Translate the ":" character to a + "_", which allows checking for member functions in C++ libraries. + +1999-05-25 H.J. Lu + + * config.guess (dummy): Changed to $dummy. + +1999-05-22 Ben Elliston + + * config.guess: Handle NEC UX/4800. Contributed by Jiro Takabatake. + +1999-05-17 Ben Elliston + + Merge with the EGCS source tree. + + * config.guess: Add detection for Interix and UWIN on Windows NT, + OpenBSD on PA-RISC and UnixWare version 7.x. + Improve usage of `tr' where sets are concerned. + Detect all HP 9000 machines. + Determine machine types more completely on older UnixWare systems. + Determine C library version on GNU/Linux for the PowerPC. + * config.sub: Numerous additions. Some cleanup. + +1999-04-29 Ben Elliston + + * config.sub: Handle `t3e' alias for Cray T3E. Contributed by + James A. Lupo. + +1999-04-19 Matthew D. Langston + + * acgeneral.m4 (AC_TRY_LINK_FUNC): Add support for Fortran 77. + +1999-04-17 Paul Eggert + + * autoconf.texi, acspecific.m4 (AC_FUNC_MKTIME): New macro. + taken from automake's AM_FUNC_MKTIME. + * acfunctions: mktime now belongs to AC_FUNC_MKTIME. + +1999-04-11 Philipp Thomas + + * config.sub: Set basic_machine to i586 when target_alias = k6-*. + +1999-04-11 Pavel Roskin + + * autoheader.m4: Do not complain about using AC_TRY_RUN without a + cross-compilation action--only autoconf should do this. + +1999-04-11 Paul Eggert + + * acgeneral.m4 (AC_CHECK_TYPE): Allow first argument to be a + shell variable. + +1999-04-11 Ben Elliston + + * acgeneral.m4 (AC_C_STRUCT_MEMBER): New macro. + * acspecific.m4 (AC_STRUCT_TIMEZONE): Rewrite in terms of + AC_C_STRUCT_MEMBER. + (AC_STRUCT_ST_BLOCKS): Likewise. + (AC_STRUCT_ST_BLKSIZE): Likewise. + (AC_STRUCT_ST_RDEV): Likewise. + * autoconf.texi (Structures): Update. Add menu for subnodes. + (Particular Structures): New node. + (Generic Structures): New node. + (AC_C_STRUCT_MEMBER): Document. + +1999-04-10 Ben Elliston + + * mkinstalldirs: Add `-m' flag to specify the mode of a newly + created directory. Add command line usage and `-h', `--help' + options. Contributed by Jeff Garzik. + +1999-04-08 Ben Elliston + + * acspecific.m4 (AC_PROG_CC): Try using the `cl' C compiler under + Cygwin. Contributed by Scott Stanton. + + * config.sub: Handle MPE/iX. + +1999-04-07 Ben Elliston + + * config.guess: Add more CLIX machines. From Thomas Dickey. + +1999-04-06 Ben Elliston + + * config.guess: Avoid the possibility of `ld' on GNU/Linux systems + being something other than the GNU linker (such as a directory, in + the case of GNU binutils). + +1999-04-05 Ben Elliston + + * config.sub: Add modern Alpha processors. Reorganise. + + * acspecific.m4 (AC_CYGWIN): Do not remove conftest*; let + AC_TRY_COMPILE clean up after itself. + (AC_MINGW32): Likewise. + (AC_EMXOS2): Likewise. + + * acspecific.m4 (AC_EMXOS2): New macro. Contributed by Ryuji Abe. + (AC_EXEEXT): Handle case for OS/2. + (AC_PROG_CC_WORKS): Show $CPPFLAGS when running the compiler. + (AC_PROG_CXX_WORKS): Likewise. + + * autoconf.texi (AC_EMXOS2): Document. + (AC_EXEEXT): Mention OS/2. + (AC_MINGW32): Move. + (UPDATED): Update. + +1999-04-02 Mike Stump + + * acgeneral.m4 (AC_ARG_PROGRAM): Remove spaces, as there is one + more pass through sh than you think. + +1999-04-01 Ben Elliston + + * standards.texi: Update from FSF. + + * acspecific.m4 (AC_PROG_INSTALL): Avoid using the installation + script belonging to HP `pwplus' when running the install + program. Contributed by Steven G. Johnson and Dave Adams. + (AC_EXEEXT): Do not consider `.xcoff' as a possible executable + filename extension. Contributed by Robert S. Maier. + +1999-03-28 Tom Tromey + + * autoconf.texi (AC_OUTPUT_COMMANDS): Add to macro index. + +1999-03-22 Ben Elliston + + * config.guess: Rename BUILD_CC to CC_FOR_BUILD; there is a + precedent for the usual name of this environment variable. + +1999-03-22 Pavel Roskin + + * autoheader.sh: Report an error if AC_CONFIG_HEADER is not + present in the configure input file. + +1999-03-21 Ben Elliston + + * config.guess: Correct typo for detecting ELF on FreeBSD. + +1999-03-14 Alexandre Oliva + + * config.guess: Recognise HP 9000/8x0 machines. + +1999-03-11 Ben Elliston + + * config.sub: Recognise hppa2.0w. Contributed by Erez Zadok. + +1999-03-11 Pavel Roskin + + * config.guess: Prefer $HOST_CC over $CC when deciding on a C + compiler to compile stub programs. Allow this to be overridden + with the value of $BUILD_CC in cross-compilation environments + where the native compiler must be used for running tests on the + host. + +1999-03-11 Ben Elliston + + * config.guess: Recognise MiNT and TOS on Atari machines. + Contributed by Guido Flohr. + + * config.sub: Add aliases for MiNT. + +1999-03-10 Ben Elliston + + * config.guess: Recognise HP 9000/800. Merged from the master + FSF version of this file. + +1999-03-01 Gordon Matzigkeit + + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't require that macro + symbols be valid C identifiers. + +1999-02-28 Ben Elliston + + * acspecific.m4 (AC_FUNC_VFORK): Allow test to behave correctly + when $ac_cv_func_vfork_works is the empty string. Contributed by + . + + * config.sub: Add `oskit' as a basic system type. From Godmar Back. + +1999-02-26 Ben Elliston + + * install-sh: Avoid trailing whitespace. + + * autoscan.pl (parse_args): Make compatible with Perl version 4. + +1999-02-24 Ben Elliston + + * config.guess: Detect LynxOS 3.x. Contributed by Giuseppe + Guerrini. + +1999-02-23 Ben Elliston + + * config.guess: Detect ReliantUNIX on MIPS. Contributed by Andrej + Borsenkow. + Also remove random trailing whitespace. + +1999-02-22 Ben Elliston + + * autoconf.texi (System Services): Explain the semantics of the + AC_SYS_RESTARTABLE_SYSCALLS macro in greater detail. Suggested by + Franc,ois Pinard. + +1999-02-22 Stu Grossman + + * acgeneral.m4 (AC_CANONICAL_SYSTEM): Explicitly require + AC_CANONICAL_HOST, AC_CANONICAL_TARGET and AC_CONICAL_BUILD. + (AC_CONFIG_AUX_DIR): Run auxillary shell scripts through $SHELL. + Do not rely on their magic number. + (AC_CANONICAL_THING): New macro. Cache results. + (AC_CANONICAL_HOST): Reimplement; use AC_CANONICAL_THING. + (AC_CANONICAL_TARGET): Likewise. + (AC_CANONICAL_BUILD): Likewise. + (AC_OUTPUT): Use $SHELL. + (AC_OUTPUT_SUBDIRS): Likewise. + +1999-02-19 Ben Elliston + + * config.guess: Make C code clean for C++ compilers. Contributed + by Markus Oberhumer. + +1999-02-19 Ben Elliston + + * config.guess: Automatically recognise ELF on FreeBSD. From Niall + Smart and improved by Andrew Cagney. + +1999-02-19 Felix Lee + + * acgeneral.m4 (AC_CACHE_VAL): Don't need backticks. This is a + performance enhancement for about a 5% reduction in the runtime of + the generated configure script. + +1999-02-18 Ben Elliston + + * config.guess: Detect NEC EWS4800. Contributed by Koji Arai. + +1999-02-11 Ben Elliston + + * standards.texi: Update from FSF. + +1999-02-10 Tom Tromey + + * acgeneral.m4 (AC_CACHE_LOAD): Avoid sourcing special files. + Works around bug in some versions of bash. + +1999-02-02 Pavel Roskin + + * autoconf.texi: Corrected definitions for AC_CONFIG_AUX_DIR and + AC_PROG_F77. Duplicated descriptions for AC_SEARCH_LIBS and + AC_TRY_LINK_FUNC removed. + +1999-01-29 Ben Elliston + + * acspecific.m4 (AC_EXEEXT): Ignore C++ source files. + +1999-01-28 Gary V. Vaughan + + * acspecific.m4 (AC_PROG_INSTALL): set INSTALL_SCRIPT to + ${INSTALL} so that automake doesn't propogate install time flags + for INSTALL_PROGRAM into INSTALL_SCRIPT. + +1999-01-25 Ben Elliston + + * install-sh: Use $mkdirprog, not `mkdir' directly. Contributed by + Jeff Garzik. + + * Makefile.in (clean mostlyclean distclean maintainer-clean): + Remove .m4f files. + + * config.guess: Synchronise with master FSF version. Add detection + for HP MPE/iX. + + * config.sub: Likewise. + +1999-01-23 Ben Elliston + + * config.guess: Catch more NILE system models. Contributed by + Akim Demaille and Graham Jenkins. + + * autoheader.sh: Force $tmpout to close to avoid Windows file + sharing conflicts. From Mark Elbrecht. + +1999-01-21 Ben Elliston + + * autoconf.texi (Introduction): Update bug reporting address. + + * config.guess: Likewise. + +1999-01-19 Pavel Roskin + + * ifnames.sh: Source lines ending with backslash are prepended to + the following line before further processing. + +1999-01-19 Ben Elliston + + * acspecific.m4 (AC_PROG_CXXCPP): Substitute @CXXCPP@ correctly + when $CXXCPP is overridden in the supervisory shell. Contributed + by Michael Schoene. + +1999-01-16 Ben Elliston + + * acgeneral.m4 (AC_ACVERSION): Bump to 2.14.1 for prereleases. + +1999-01-14 Scott Bambrough + + * config.guess: Recognise armv[234][lb] types (ie. `armv*'). + +1999-01-13 Ben Elliston + + * autoconf.sh: Remove -v and --verbose from the command line usage + help. They do not exist. + +1999-01-12 Scott Bambrough + + * config.sub: Recognize armv[234][lb] types (ie. `armv*'). Add + alias for the NetWinder; set company to `corel'. + +1999-01-11 Akim Demaille + + * autoreconf.sh (verbose): use either `:' or `echo'. + (aclocal_m4): Renamed from aclocal. + (aclocal_flags): New var. + Run aclocal using $aclocal_flags. + Redirect ls' stderr to /dev/null to avoid spurious messages. + +1999-01-11 Ben Elliston + + * config.guess: Detect HP-UX on MPE/iX machines. + + * acgeneral.m4 (AC_ACVERSION): Increment to 2.14. + + * autoconf.texi (EDITION): Likewise. + (VERSION): Likewise. + +1999-01-10 Ben Elliston + + * config.guess: Detect Rhapsody on PowerPC and other machines. + Contributed by Wilfredo Sanchez. + + * config.sub: Add rhapsody and openstep aliases. + +1999-01-09 Ben Elliston + + * Makefile.in (html): New target. Generate HTML documentation. + (install-strip): Add. + Contributed by Wilfredo Sanchez. + + * autoconf.texi (AC_CHECK_LIB): Explain more. Contributed by Bob + Friesenhahn. + (UPDATED): Bump to 1999. + + * config.guess: Distinguish between OpenStep and NeXTStep + platforms. Contributed by Wilfredo Sanchez. + +1999-01-09 J"orn Rennecke + + * acgeneral.m4 (AC_CHECK_FUNC): Don't actually call the function. + +1999-01-09 H.J. Lu + + * config.guess: Permit multiple concurrent instances by including + the process ID of the shell running this script in temporary + filenames. + +1999-01-08 Ben Elliston + + * autoconf.sh: More useful and up-to-date help from the --help + option. Contributed by Akim Demaille. + + * autoheader.sh: Likewise. + + * autoreconf.sh: Likewise. + + * autoscan.pl: Likewise. + + * autoupdate.sh: Likewise. + + * ifnames.sh: Likewise. + + * config.guess: Detect Cray T3E and NEC SX-4, SX-5 machines. + Contributed by Andreas Schott. + +1999-01-06 Ben Elliston + + * autoconf.texi (AC_OBJEXT): Correct documentation. + +1999-01-05 Ben Elliston + + * Version 2.13. + +1999-01-04 Ben Elliston + + * autoconf.texi (AC_CHECK_FILE): Document. + (AC_CHECK_FILES): Likewise. + (AC_SEARCH_LIBS): Likewise. + (AC_FUNC_SELECT_ARGTYPES): Use Jeff Garzik's version. + (AC_C_STRINGIZE): Likewise. + (AC_CYGWIN): Document. + (AC_EXEEXT): Likewise. + (AC_OBJEXT): Likewise. + (AC_MINGW32): Likewise. + (AC_TRY_LINK_FUNC): Likewise. + (AC_VALIDATE_CACHED_SYSTEM_TUPLE): Likewise. + +1999-01-01 Ben Elliston + + * NEWS: Update. + + * acspecific.m4 (AC_PROG_CXX_WORKS): Specify an explicit return + type for `main' to keep modern C++ compilers happy. + +1998-12-28 Jeff Garzik + + * autoconf.texi: + (AC_SEARCH_LIBS, AC_CHECK_FILE, AC_CHECK_FILES, + AC_TRY_LINK_FUNC): Document. + (AC_CHECK_LIB): Indicate the absence of + action-if-not-found will not kill default action. + (AC_SYS_INTERPRETER): Alphabetize with rest of section, + s/ac_cv_sys_interpreter/interpval/ + + * acgeneral.m4: + (AC_TRY_LINK_FUNC): Fix arg transposition. + (AC_SEARCH_LIBS): Require autoconf 2.13, add other-libs arg. + (AC_CHECK_FILES): Add underscore to HAVE_file define. + + * acspecific.m4: + (AC_SYS_INTERPRETER): New shell var 'interpval' stores + internal var ac_cv_sys_interpreter. + +1998-12-27 Ben Elliston + + * autoconf.texi (AC_PROG_INSTALL): Update. + (AC_FUNC_ALLOCA): Correct code fragment. + (AC_FUNC_SELECT_ARGTYPES): Document. + (AC_C_STRINGIZE): Likewise. + (AC_VALIDATE_CACHED_SYSTEM_TUPLE): Likewise. + + * acspecific.m4 (AC_CYGWIN): Rename from `AC_CYGWIN32'. + (AC_CYGWIN32): Warn about deprecated usage. Forward to AC_CYGWIN. + + * config.sub: Drop `32' from `Cygwin32'. + + * config.guess: Likewise. + Handle BSD/OS variants for non-x86 machines. Contributed by Chris + P. Ross. + + * NEWS: Update. + + * configure: Rebuild. + +1998-12-26 Ben Elliston + + * autoreconf.sh (stamp): Add missing quote. + + * mkinstalldirs: Write output which is not diagnostic to standard + output and not standard error. Suggested by Steve Robbins. + +1998-12-11 Matthew D. Langston + + * acconfig.h, acgeneral.m4, acspecific.m4, autoconf.texi: Change + all of the Fortran 77 code to use the new `F77' prefix instead of + the older `FC' prefix. + +1998-12-11 Ben Elliston + + * acgeneral.m4 (AC_ACVERSION): Bump to 2.13. + + * autoconf.texi (EDITION): Likewise. + (VERSION): Likewise. + +1998-10-30 Jeff Garzik + + * autoconf.texi: Document AC_CACHE_LOAD and AC_CACHE_SAVE. Explain + how AC_CACHE_SAVE can be used as a means of syncing the cache to + disk prior to doing something potentially fatal in configure. + +1998-10-29 Alexandre Oliva + + * autoreconf.sh: Support several automake command line options, + and run aclocal and automake when needed. Also, create stamp files + just like automake's Makefiles would do for config headers. + Additional contributions from Tom Tromey. + +1998-10-24 Matthew D. Langston + + * acgeneral.m4 (AC_LANG_FORTRAN77): Remove [] (i.e. the m4 quotes) + since it was confusing the test suite. Also make `f77' the default + for FC, otherwise the test suite fails. + + * autoconf.texi (Fortran 77 Compiler Characteristics): Added new + node documenting the new AC_F77_LIBRARY_LDFLAGS macro. + + * acspecific.m4 (AC_F77_LIBRARY_LDFLAGS): New macro to determine + the linker flags (e.g. `-L' and `-l') for the Fortran 77 intrinsic + and run-time libraries. + +1998-10-24 Ben Elliston + + * acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): New macro. Detects the + types of formal arguments to select(). Contributed by Lars Hecking. + + * acconfig.h (SELECT_TYPE_ARG1): Add. + (SELECT_TYPE_ARG234): Likewise. + (SELECT_TYPE_ARG5): Likewise. + + * config.guess: Hide warnings emitted by the HP linker when + generating a PA 2.0 object file. Contributed by Marcus Thiessel. + +1998-10-20 Ben Elliston + + * acgeneral.m4 (AC_LANG_RESTORE): Fix a typo spotted by Noah + Elliott. + +1998-10-09 Tom Tromey + + * Makefile.in (autoconf.m4f): New target. + (autoheader.m4f): Likewise. + +1998-10-08 Ben Elliston + + * acgeneral.m4 (AC_TRY_LINK_FUNC): Fix macro ordering. + +Sun Oct 4 21:57:20 1998 Tom Tromey + + * autoconf.texi (Defining Symbols): Documented third argument to + AC_DEFINE. + * autoheader.m4 (AC_DEFINE_UNQUOTED): Generate `verbatim' + assignment if third argument given. + (AC_DEFINE): Likewise. + * acgeneral.m4 (AC_DEFINE): Handle case where $# is 3. + (AC_DEFINE_UNQUOTED): Likewise. + * autoheader.sh: Echo $verbatim if not empty. + +1998-10-03 Ben Elliston + + * acconfig.h (FC_NO_MINUS_C_MINUS_O): Add to complete the Fortran + 77 support. + + * README: Update bug reporting address. Include maintainer info. + +1998-10-02 Ben Elliston + + * acgeneral.m4 (AC_VALIDATE_CACHED_SYSTEM_TUPLE): New macro. This + macro can be used to ensure that a configure script will not run + on a second system without removing the cache and re-running + configure. Contributed by Alexandre Oliva. + +1998-09-29 Ben Elliston + + * acgeneral.m4 (AC_SEARCH_LIBS): New macro. Searches a series of + libraries for a given function. Contributed by Jim Blandy. + (AC_TRY_LINK_FUNC): New macro. Again, from Jim. + +1998-09-28 Ben Elliston + + * config.guess: Detect multiprocessor DC/OSx running on Pyramid + MIServer machines. Contributed by Graham K. Jenkins. + + * acgeneral.m4 (AC_CHECK_PROG): Fix a bug if the supplied path + contains colons. This was observed with some versions of NetBSD + `sh' and some versions of `bash'. + (AC_PATH_PROG): Likewise. Contributed by Tom Yu. + +1998-09-27 Ben Elliston + + * Makefile.in (all): Generate frozen .m4 files at build time. + (install): Do not freeze .m4 files. Install pre-frozen .m4f files + using $(INSTALL_DATA). + (.m4.m4f): Freeze files if m4 supports stored internal state. + Contributed by Karl Heuer. + + * install-sh: Import latest version from the FSF. + + * mkinstalldirs: Likewise. + + * config.guess: Apply the sysconf(2) test to HP 9000/600-series, + 9000/802, 9000/804 and 9000/892 machines. Contributed by Pavel + Roskin. + Detect UnixWare 7. Contributed by Paul Gampe. + + * acspecific.m4 (AC_PROG_INSTALL): Substitute `INSTALL_SCRIPT'. + Contributed by Franc,ois Pinard + (AC_C_STRINGIZE): New macro to test the availability of the + stringizing operator in the C preprocessor. Contributed by Arnold + Robbins on behalf of the GNU AWK project. + + * acconfig.h (HAVE_STRINGIZE): Add for the AC_C_STRINGIZE macro. + + * testsuite/Makefile.in (check): If DejaGNU is not installed, + print a warning and skip the `dejacheck' target (which will fail). + (site.exp): Use tests to guard commands from generating error + messages if `site.exp' or `site.bak' do not exist. Contributed by + Karl Heuer. + (dejacheck): Remove unused target. + +1998-09-26 Ben Elliston + + * texinfo.tex: Import latest version from the FSF. + + * config.guess: Treat all SPARC variant processors running BSD/OS + as just `sparc' for compatibility reasons. Contributed by Chris + Torek. + + * acgeneral.m4 (AC_CHECK_FILE): New macro. Checks for the + existence of a file in the file system (native only). + Contributed by Ken Raeburn. + (AC_CHECK_FILES): Likewise. + +1998-09-15 Didier Verna + + * acspecific.m4 (AC_PATH_XTRA): use X_EXTRA_LIBS add-on libraries + in the test for libICE. It is needed at least under Solaris. + +1998-09-15 Ben Elliston + + * config.guess: Handle strange processor ID assignments on AIX + machines. Contributed by Didier Desseaux. + +Sat Sep 12 16:25:00 1998 Aaron Crane + + * acgeneral.m4 (AC_CHECK_TYPE): Changed the egrep regex to avoid + incorrectly assuming that if foobar_t is defined, then so is + bar_t. + +Tue Sep 8 14:06:04 1998 Matthew D. Langston + + * acgeneral.m4: Make the following macros Fortran 77 aware + (i.e. conditionalize whether to `#include "confdefs.h"', etc.): + (AC_TRY_COMPILE) + (AC_TRY_LINK) + (AC_CHECK_LIB) + + * acgeneral.m4 (AC_LANG_FORTRAN77): Rename `AC_LANG_FORTRAN' to + `AC_LANG_FORTRAN77'. Change the Fortran 77 language macro from + `FORTRAN' to `FORTRAN77'. + (AC_LANG_RESTORE): Change the Fortran 77 language macro from + `FORTRAN' to `FORTRAN77' + + * autoconf.texi: Updated Fortran 77 documentation, particularly + for `AC_TRY_COMPILE', `AC_TRY_LINK' and `AC_CHECK_LIB'. + +Thu Sep 3 09:34:39 1998 Matthew D. Langston + + * autoconf.texi: Added Fortran 77 documentation. + + * acspecific.m4 (AC_PROG_FC): New macro. Determine a Fortran + compiler to use. + (AC_PROG_FC_WORKS): New macro. + (AC_PROG_FC_GNU): New macro. + (AC_PROG_FC_G): New macro. + (AC_PROG_FC_C_O): New macro. + + * acgeneral.m4: Add FFLAGS (Fortran 77 flags). + (AC_LANG_FORTRAN): New macro. + (AC_LANG_RESTORE): Make Fortran 77 aware. + (AC_TRY_COMPILER): Make Fortran 77 aware (i.e. conditionalize + whether to `#include "confdefs.h"'). + +Thu Jun 18 12:13:27 1998 Ian Lance Taylor + + * acspecific.m4 (AC_EXEEXT): Correct setting of ac_exeext when + there is no extension. + +Mon Jun 1 12:30:39 1998 Ian Lance Taylor + + * acgeneral.m4 (AC_CHECK_PROG): Set IFS to just ":" when searching + through PATH. + (AC_PATH_PROG): Likewise. + * acspecific.m4 (AC_PROG_INSTALL): Likewise. + (AC_PROG_CC): On cygwin32, if neither gcc nor cc + are found, look for cl. + (AC_PROG_CXX): Look for cl after all other choices. + * configure: Rebuild. + +Thu May 28 18:37:36 1998 Ian Lance Taylor + + * acgeneral.m4 (AC_ACVERSION): Bump to 2.12.2. + + Add support for Visual C++: + * acgeneral.m4 (ac_exeext, ac_objext): New variables. + (ac_link): Use ac_exeext. + (AC_TRY_COMPILER, AC_TRY_LINK, AC_TRY_RUN_NATIVE): Likewise. + (AC_TRY_CPP): Remove lines from stderr which contain only the name + of the file. + (AC_REPLACE_FUNCS): Use ac_objext. + * acspecific.m4 (AC_PROG_CC): Check whether compiler supports -g + even if it is not gcc. + (AC_PROG_CXX): Likewise. + (AC_PROG_CPP): Try running the compiler with the -nologo option. + (AC_FUNC_ALLOCA): Check for _MSC_VER. Use ac_objext. + (AC_FUNC_MEMCMP): Use ac_objext. + (AC_STRUCT_ST_BLOCKS): Likewise. + (AC_OBJEXT): New macro. + (AC_CYGWIN32, AC_MINGW32, AC_EXEEXT): New macros. + * configure: Rebuild. + + * Makefile.in (editsh): Substitute for SHELL. + (Makefile, config.status): Use $(SHELL) when running + config.status. + * autoconf.sh: Change initial /bin/sh to @SHELL@. + * autoheader.sh: Likewise. + * autoreconf.sh: Likewise. + * autoupdate.sh: Likewise. + * ifnames.sh: Likewise. + +Thu Apr 30 16:29:00 1998 Syd Polk + + * acspecific.m4 (SETPGRP_VOID): The test for setpgrp needs + to have unistd.h included or the DEC compiler does not + flag the error that triggers setting the variable. + +Tue Nov 18 14:21:38 1997 Eric Mumpower + + * autoreconf.sh: Do the right thing when AC_CONFIG_HEADER is + given more than one filename. As noted in the "Invoking + autoheader" node of the info files, autoheader will use the first + file argument given to AC_CONFIG_HEADER. Prior to this patch, + autoreconf would end up executing incorrect shell code (e.g. + "test ! -f 1.h 2.h.in") in such cases. + Patch submitted in parallel to bug-gnu-utils@prep.ai.mit.edu. + +Fri Oct 3 18:10:39 1997 Ian Lance Taylor + + * acgeneral.m4 (AC_CACHE_SAVE): Add a grep when checking whether + set quotes correctly, to avoid a cache overflow on HP-UX 9. + * configure: Rebuild. + +Wed Sep 11 15:35:19 1997 Chris Provenzano + + * acgeneral.m4 : Always set SHELL and substitute SHELL. + When looking for a path for an executable allow the + user to override with an DOS path. + * configure : New configure generated by autoconf. + +Thu Sep 4 22:30:40 1997 Jeffrey A Law (law@cygnus.com) + + * acspecific (AC_PROC_INSTALL): Don't use installbsd on OSF. + +Wed Sep 3 23:00:44 1997 Chris Provenzano + + * configure : New configure generated by autoconf. + * Makefile.in : Set SHELL=@SHELL@. configure now substiutes + ${CONFIG_SHELL-/bin/sh} in for @SHELL@ at configure time. + +Mon Aug 11 01:40:37 1997 Jason Molenda + + * acspecific (AC_FUNC_VFORK): If cross-compiling, set + $ac_cv_func_vfork_works to $ac_cv_func_vfork (assume vfork works + if present). + +Tue Aug 5 23:00:05 1997 Ian Lance Taylor + + * acgeneral.m4 (AC_VERSION): Set to 2.12.1. + (AC_CANONICAL_HOST): Use CONFIG_SHELL to run $ac_config_sub and + $ac_config_guess. + (AC_CANONICAL_TARGET, AC_CANONICAL_BUILD): Likewise. + +Tue Dec 10 19:38:59 1996 David J MacKenzie + + * acgeneral.m4 (AC_CACHE_SAVE): Use grep to prevent overflowing + HP-UX 9.05 /bin/sh buffer in case statement. From Eric Backus. + +Mon Dec 9 23:39:17 1996 David J MacKenzie + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Add a semicolon between + shell variable assignments; the evaluation order varies between + implementations. + +Tue Nov 26 13:00:28 1996 David J MacKenzie + + * Version 2.12. + +Wed Nov 20 13:00:21 1996 David J MacKenzie + + * Test release 2.11.2. + + * acgeneral.m4 (AC_OUTPUT): Remove a now-wrong test for whether to + make an unquoted here document. + (AC_CACHE_SAVE): Double-up backslashes in double quotes. + From Paul Eggert. + + * Test release 2.11.1. + + * acgeneral.m4 (AC_TRY_COMPILE, AC_TRY_LINK): Make the final + newline consistent with the other AC_TRY_* macros: no final dnl + is needed to avoid extraneous blank lines. + (AC_CHECK_LIB, AC_HAVE_LIBRARY, AC_COMPILE_CHECK): Remove + extraneous dnl's. + (AC_DIVERSION_CMDS, AC_DIVERSION_ICMDS): New macros. + (AC_OUTPUT_COMMANDS, AC_OUTPUT): Use them instead of appending to + list macros. + + * acgeneral.m4 (AC_CACHE_SAVE): Handle cache variable values + correctly even if they contain single quote, or are quoted by + the shell. From Paul Eggert. + (AC_INIT_PREPARE): Set LC_MESSAGES to C if set. + From Hans Olsson. + Set LC_CTYPE to C if set. + From Thomas Winder. + * autoconf.sh, autoheader.sh: Likewise set LC_MESSAGES and LC_CTYPE. + +Tue Nov 19 10:29:06 1996 David J MacKenzie + + * testsuite/autoconf.g/sizeof.exp: Use the v2 macro name. + + * acgeneral.m4 (AC_OUTPUT_FILES, AC_OUTPUT_HEADER): Support + creating output files from multiple pieces, concatenated. + Suggested by Theodore Ts'o. + (AC_LINK_FILES): If called more than once, concatenate the + arguments. From Roland McGrath. + (AC_CONFIG_SUBDIRS): Likewise. + (AC_OUTPUT_COMMANDS): New macro. Suggested by + Tom Tromey. + (AC_OUTPUT): Use the lists it sets. + + * acgeneral.m4 (AC_TRY_RUN_NATIVE): Fail if linking fails, like + AC_TRY_LINK. + (AC_TRY_RUN): Don't require AC_C_CROSS. + (AC_TRY_COMPILER): New macro. + (AC_LANG_C, AC_LANG_CPLUSPLUS): Set cross_compiling. + * acspecific.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS): Use + AC_TRY_COMPILER instead of AC_TRY_LINK. + (AC_PROG_CC_GNU, AC_PROG_CC_G): Split out of AC_PROG_CC. + (AC_PROG_CXX_GNU, AC_PROG_CXX_G): Split out of AC_PROG_CXX. + For the *_G macros, make the cache variable names non-GNU-specific. + (AC_C_CROSS): Mark obsolete, and otherwise a no-op. + + * AUTHORS: New file. + * Makefile.in (DISTFILES): Add it. + + * acspecific.m4 (AC_FUNC_MMAP): Update the getpagesize + declarations from getpagesize.h. Check for unistd.h. + + * acgeneral.m4 (AC_OUTPUT_FILES): Run the eval in a subshell. + + * acfunctions: Map fnmatch, strftime, getpgrp, setpgrp to their + own macros. + + * acgeneral.m4 (AC_OUTPUT_HEADER): Check that $CONFIG_HEADERS is + unset, not that it's empty. + +Mon Nov 18 10:24:50 1996 David J MacKenzie + + * Version 2.11. + +Sun Nov 17 20:12:05 1996 David J MacKenzie + + * acspecific.m4 (AC_FUNC_STRCOLL): Make the checking message more + accurate. + +Thu Nov 14 11:15:27 1996 David J MacKenzie + + * acheaders: Add entry for malloc.h. Make the strings.h entry + suggest AC_CHECK_HEADERS instead of AC_HEADER_STDC. + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Move initialization of + ac_max_here_lines here from AC_OUTPUT_HEADER. + + * autoheader.sh: Take the multiple-include protection back out. + It's not needed for a file that just #defines stuff, and, as Ken + Raeburn pointed out in Apr 1994: + Since you don't make it optional, and you don't give the writer of + configure.in much control over the name of the symbol, it also would + prevent one "config.h" file in a subdirectory from including + "../config.h" as a way to avoid duplicating some common tests. + + * acspecific.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS): Don't try + running a program, just try linking. + (AC_C_CROSS): Make the wording clearer. + +Wed Nov 13 10:07:14 1996 David J MacKenzie + + * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX): Check whether the + compiler works before checking whether it's a GNU compiler. + (AC_FUNC_VFORK): Call _exit after perror. + (AC_PATH_XTRA): Go back to using -R, as setting an env var as part + of CC doesn't get eval'd correctly to actually work. + Directly test whether a space is needed after -R. + Don't add "-L" to LDFLAGS if $x_libraries is empty. + (AC_FUNC_STRFTIME): Check for it in -lintl only if it's not in the + normal libraries. + + * Test release 2.10.3. + + * testsuite/Makefile.in (dejacheck): New target, suggested by Tom + Tromey. + (check): Depend on dejacheck. + +Tue Nov 12 00:06:14 1996 David J MacKenzie + + * acgeneral.m4 (AC_OUTPUT_FILES): Split the list of sed commands in + conftest.subs into multiple files named conftest.s[1-9][0-9]*. + Create a pipeline of sed commands that use these files, then delete + the temporary files. From John W. Eaton. + + * acspecific.m4 (AC_AIX, AC_MINIX): Remove warnings about AC_TRY_LINK. + These macros don't change the linkage options. + + * Test release 2.10.2. + + * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX) [GCC]: Use -O2 instead + of -O. Suggested by fnf@ninemoons.com (Fred Fish). + + * acgeneral.m4 (AC_OUTPUT_HEADER): Support passing + AC_CONFIG_HEADER a value containing shell variables. Suggested by + Markku Savela and Julian Onions. + * acgeneral.m4 (AC_TRY_RUN_NATIVE, AC_TRY_LINK, AC_TRY_COMPILE, + AC_TRY_CPP): Show the test program in config.log if the test fails. + From Karl Berry. + + * testsuite/config/unix.exp: Run the configure script as "./script" + in case the user doesn't have "." in their PATH. + +Mon Nov 11 18:02:58 1996 David J MacKenzie + + * acgeneral.m4 (AC_TRY_COMPILE, AC_TRY_LINK): Deal with smart + compilers that know that an unused function doesn't have to be + linked in: call the function directly from main(). + (Removing a legacy from when they tried to run the code, I think-djm.) + From fnf@ninemoons.com (Fred Fish). + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Rename ac_save_LIBS to avoid + a clash with AC_CHECK_LIB. + From Jim Meyering. + (AC_FUNC_FNMATCH, AC_FUNC_MMAP, AC_FUNC_VFORK, AC_FUNC_WAIT3, + AC_FUNC_STRCOLL, AC_FUNC_MEMCMP): Rename cache variables to avoid + wrong results if someone calls AC_CHECK_FUNC for these functions. + + * autoheader.sh: Don't cmp with config.h.in if it doesn't exist yet. + Don't frob lines 1-@TOP@ or @BOTTOM@-end of acconfig.h's. + Accept TAB as well as SPC after #undef in acconfig.h's. + +Sat Nov 9 01:54:04 1996 David J MacKenzie + + * Test release 2.10.1. + + * acspecific.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS): New macros + adapted from Bruno Haible. + (AC_PROG_CC, AC_PROG_CXX): Use them. + * acgeneral.m4 (AC_TRY_RUN_NATIVE): Split out of AC_TRY_RUN. + (AC_TRY_LINK): Check that the executable exists after linking. + (AC_EGREP_CPP): Disable m4 quote chars around egrep, so [] in regexps + isn't eaten. + + * autoheader.sh: Add multiple-inclusion protection for config.h. + + * acgeneral.m4 (AC_PREFIX_PROGRAM): Pretty up the output. + (AC_CHECK_LIB): Include the function being tested in the message. + (AC_CHECK_PROG, AC_PATH_PROG): Add a dummy variable to force word + splitting on the path. + + * acspecific.m4 (AC_FUNC_MMAP): Remove check and uses of valloc. + It turns out it's a separate issue, for GNU grep. + Replace the test program with a new version from Mike Haertel. + + * acgeneral.m4 (AC_CACHE_SAVE): Accept the HP-UX sh 'set' output + format. From Marcus Daniels. + + * acgeneral.m4 (AC_MSG_CHECKING, AC_CHECKING): Write a message to + config.log also. From T.E.Dickey. + (AC_CHECK_LIB, AC_CHECK_HEADER, AC_CHECK_HEADERS): Replace use of + tr with sed, to avoid a bug in the AIX 4.1.3.0 tr reported by + Alain Knaff. He says that version of tr interprets \055 as a + range specifier, like an unquoted -. + * acspecific.m4 (AC_PROG_MAKE_SET, AC_CHECK_HEADER_DIRENT, + AC_CHECK_HEADERS_DIRENT): Ditto. + + * acspecific.m4 (AC_FUNC_SETPGRP): New macro. + * acconfig.h (SETPGRP_VOID): New entry. + From T.E.Dickey. + + * acspecific.m4 (AC_PATH_X_DIRECT): Try /lib/usr/lib/X11 for A/UX. + From Guillermo Gomez. + (AC_PATH_XTRA): Replace -R with adding LD_RUN_PATH to CC in the + Solaris kludge. Suggested by Paul Eggert. + Define X_DISPLAY_MISSING with AC_DEFINE, and + if not using X, clear out the X variables. + Check system-dependent libs before system-independent ones. + Check for more system-dependent libs. + From Karl Berry. + Use AC_CHECK_FUNC in the system-dependent libs tests. + From Larry Schwimmer. + Wart removal: Don't require AC_ISC_POSIX. + (AC_ISC_POSIX): Require AC_PROG_CC, since it uses $GCC. + From gvran@uddeborg.pp.se. + Don't blather about being called before AC_TRY_LINK, + which is now called in AC_PROG_CC. Don't encourage using this macro. + * acconfig.h (X_DISPLAY_MISSING): Add entry. + +Fri Nov 8 16:02:08 1996 David J MacKenzie + + * acspecific.m4 (AC_PATH_X_DIRECT): Search for /usr/X11 before + /usr/X11Rn, etc. From bostic@bsdi.com (Keith Bostic). + + * acgeneral.m4 (AC_CHECK_TYPE) [STDC_HEADERS]: Check in stddef.h, too. + From Glenn P. Davis. + Don't require the second char after the type name to be a space. + (AC_TRY_RUN): Remove the test files before executing the "failure" + case code. + + * acspecific.m4 (AC_PROG_CXX): Check for cc++ for NexT. + From Carl Edman. + (AC_PROG_CC, AC_PROG_CXX): Check whether -g works even if + C[XX]FLAGS is set. From T.E.Dickey. + (AC_FUNC_FNMATCH): New macro. + * acconfig.h (HAVE_FNMATCH): New entry. + + * acgeneral.m4 (AC_REPLACE_FUNCS): Call AC_CHECK_FUNCS to do the work. + +Tue Oct 29 13:03:44 1996 Doug Evans + + * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Fix thinko in computation of + ac_sub_srcdir in relative but not "." case. + +Thu Oct 10 22:29:37 1996 David J MacKenzie + + * acgeneral.m4 (AC_CANONICAL_HOST, AC_CANONICAL_TARGET, + AC_CANONICAL_BUILD): Allow the os part of the string returned by + config.sub to contain dashes, as in "linux-gnu". + +Fri Jul 19 16:59:00 1996 Roland McGrath + + * acgeneral.m4 (AC_CHECK_TYPE): Add dnl so regexp doesn't have a + leading newline. + +Wed Jun 12 13:56:57 1996 David J MacKenzie + + * acgeneral.m4 (AC_CHECK_TYPE): Remove extra ')'. + + * Many files: Update the FSF street address. + +Sun Jun 9 17:54:23 1996 Roland McGrath + + * acgeneral.m4 (AC_CHECK_LIB): Add missing \ in last change. + +Fri Jun 7 11:54:58 1996 Roland McGrath + + * acgeneral.m4 (AC_CHECK_LIB): Identifierize lib name in $ac_tr_lib. + +Mon May 27 13:49:02 1996 Roland McGrath + + * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): If $TMPDIR names an + existing, writable directory, then test it instead of /tmp, /var/tmp, + and /usr/tmp for long file name support. + + * acgeneral.m4 (AC_PREREQ): Prepend "FATAL ERROR: " to msg. + +Sun May 26 19:07:15 1996 Roland McGrath + + * acspecific.m4 (AC_PROG_MAKE_SET): Sanitize $MAKE for use as + identifier. + + * acgeneral.m4 (AC_CHECK_TYPE): Tighten regexp so ulong doesn't match + ulong_t. + + * autoheader.sh: Put $syms in a temporary file and use fgrep -f. + +Tue May 7 13:20:33 1996 Roland McGrath + + * acgeneral.m4: Version 2.10 released. + +Tue Mar 26 13:03:12 1996 Roland McGrath + + * acgeneral.m4 (AC_OUTPUT_HEADER): Make subdir if necessary. + +Thu Mar 21 10:52:03 1996 Roland McGrath + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Fix name of -lelf cache variable + name in test of it. + (AC_PATH_XTRA): Fix name of -ldnet cache variable name in test of it. + +Wed Mar 20 09:37:31 1996 Roland McGrath + + * acgeneral.m4 (AC_CHECK_LIB): Use \055 for -; leading and trailing + both lose with some tr. + + * acspecific.m4 (AC_C_CONST): Remove check for gcc 2.7 bug. + RMS wants everyone to lose until gcc is fixed. + + * acgeneral.m4 (AC_CHECK_LIB): Put - last in tr set so it is not + considered a range. + + * acspecific.m4 (AC_C_CONST): Add check for gcc 2.7 bug. + From Paul Eggert and Jim Meyering. + + * acgeneral.m4 (AC_CHECK_LIB): Omit `char $2' decl when $2 is `main'. + +Wed Mar 13 22:10:42 1996 Andreas Schwab + + * acgeneral.m4 (AC_CHECK_LIB): Put quotes around _ when + constructing cache variable name, to separate it from preceding + text. + +Sat Mar 16 15:53:22 1996 Roland McGrath + + * Version 2.9 released. + * acgeneral.m4 (AC_ACVERSION): Updated to 2.9. + +Wed Mar 13 12:49:51 1996 Roland McGrath + + * acgeneral.m4 (AC_OUTPUT_HEADER): Undo last change to $ac_dB, + and instead change the code written into conftest.hdr. + +Tue Mar 12 02:51:24 1996 Roland McGrath + + * acgeneral.m4 (AC_OUTPUT_HEADER): Apply Jan 15 fix to + AC_OUTPUT_MAKE_DEFS here too: Match `#define foo' without trailing + space in confdefs.h. Before configure would lose if all its trailing + whitespace got stripped, and that can happen in mail. + +Sun Mar 10 20:30:09 1996 Roland McGrath + + * acgeneral.m4 (AC_INIT_NOTICE): Add 95 and 96 to copyright years. + +Sat Mar 9 18:28:42 1996 Roland McGrath + + * acgeneral.m4 (AC_CHECK_LIB): Add missing [. + +Fri Mar 8 15:06:48 1996 Roland McGrath + + * acgeneral.m4 (AC_CHECK_LIB): Declare $2 to override gcc2 internal + prototype. + + * Version 2.8 released. + +Wed Mar 6 14:38:31 1996 Roland McGrath + + * acgeneral.m4 (AC_CHECK_LIB): Use a cache variable name containing + both the library and function name. + +Tue Jan 16 16:39:21 1996 Roland McGrath + + * acgeneral.m4 (AC_CHECK_PROG): Take optional 6th arg, full name + of program to reject if found in search path. + * acspecific.m4 (AC_PROG_CC): If gcc not found use AC_CHECK_PROG + for cc, rejecting /usr/ucb/cc. + Fatal configure error if no $CC found at all. + +Mon Jan 15 15:57:36 1996 Roland McGrath + + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Match `#define foo' without + trailing space in confdefs.h. Before configure would lose if + all its trailing whitespace got stripped, and that can happen in mail. + +Fri Jan 12 14:38:37 1996 Roland McGrath + + * acgeneral.m4 (AC_TRY_CPP): Use "" instead of '' when setting + ac_try; we need one level of expansion there for $ac_cpp, then + AC_TRY_EVAL does one more for its the expansion of $ac_cpp. + +Thu Jan 11 10:38:19 1996 Roland McGrath + + * acgeneral.m4 (AC_LANG_C, AC_LANG_CPLUSPLUS): Removed echo cmds + from $ac_cpp, $ac_compile, and $ac_link. + (AC_TRY_EVAL, AC_TRY_COMMAND): New macros for running tests' commands. + Always put the configure source line and command line into config.log. + (AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK): Use them. + * acspecific.m4: Use AC_TRY_EVAL and AC_TRY_COMMAND for running + all tests. + +Fri Jan 5 17:50:28 1996 Roland McGrath + + * acspecific.m4 (AC_PATH_X, AC_PATH_X_XMKMF, AC_PATH_X_DIRECT): + Rearrange logic: do no tests if $with_x=no; make incl and lib + tests independent, and distinguish unset from empty. + + * autoconf.sh (undefined macro check): \ sed \s inside "". If + grep $name in $infile misses, give error message that there must + be an Autoconf bug. + +Tue Dec 19 10:49:20 1995 David J. MacKenzie + + * autoconf.sh: Ignore undefined macros in shell comments. + +Mon Dec 11 22:12:54 1995 Roland McGrath + + * acspecific.m4 (AC_PROG_CC_C_O): Rearrange logic to get the right + answer for cc. + +Fri Nov 24 17:26:38 1995 Miles Bader + + * autoconf.sh: Define $AWK from the subst @AWK@, and use it. + +Wed Nov 22 11:01:16 1995 David J. MacKenzie + + * Version 2.7. + + * autoheader.m4 (AC_CHECK_FUNCS, AC_CHECK_HEADERS): Expand the + optional action args. From jj@jfch.vc.cvut.cz (Jakub Jelinek). + + * acgeneral.m4 (AC_CHECK_LIB): Translate - in library names to _. + (AC_ARG_PROGRAM): Use cat instead of echo to avoid SysV echo + interpreting backslashes. From kim@tac.nyc.ny.US (Kimmo Suominen). + (AC_OUTPUT_FILES): Quote $ and \ for being in an unquoted here + document. From Paul Eggert. + + * acspecific.m4 (AC_PATH_X_XMKMF): Use ${MAKE-make}, not plain make. + (AC_C_CONST): Avoid a warning from g++. + From tgl@sss.pgh.pa.us (Tom Lane). + (AC_FUNC_MMAP): Check for valloc and getpagesize; don't rely on + predefines. + (AC_HEADER_STDC): If cross-compiling, assume the ctype macros are + ANSI. From dje@cygnus.com (Doug Evans). + (AC_TYPE_SIGNAL) [__cplusplus]: Give a full prototype. + From churritz@cts.com (Chad Hurwitz). + (AC_FUNC_VFORK): If cross-compiling, use AC_CHECK_FUNC instead. + From Steve Chamberlain. + +Tue Sep 5 20:37:48 1995 Paul Eggert + + * acspecific.m4 (X_LIBS): Use `-R lib', not `-Rlib', since Sun + CC 3.0 requires this. + +Tue Aug 8 20:10:12 1995 Paul Eggert + + * acgeneral.m4: When creating config.status, start a new + here-script just before building conftest.subs, to work around + a bug in the HP-UX 9 HP9000-800 sh. + +Tue Nov 21 17:36:41 1995 David J. MacKenzie + + * Makefile.in (install): Undo last ASCRIPTS panic change. + The bug reporter hadn't cleaned up his source dir. + +Mon Nov 20 15:26:50 1995 David J. MacKenzie + + * Version 2.6. + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Prettify usage message somewhat. + + * Makefile.in: Use @bindir@, @datadir@, @infodir@. + (install): Find ASCRIPTS in $(srcdir). + +Sat Nov 18 14:21:55 1995 Karl Berry + + * autoconf.sh: Allow lowercase letters in the undefined-macro name. + +Fri Nov 17 15:05:44 1995 Roland McGrath + + * Version 2.5 released. + +Fri Nov 17 15:23:04 1995 David J. MacKenzie + + * acgeneral.m4 (AC_CHECK_LIB): Don't start tr argument with '+', + so as not to confuse old GNU tr's. From + Ian Lance Taylor. + (AC_INIT_PARSE_ARGS): Make sure MFLAGS and MAKEFLAGS are empty. + From Paul Townsend (aab@cc.purdue.edu). + (AC_CHECK_LIB, AC_CHECK_HEADERS, AC_CHECK_FUNC): Remove + duplicate `d' from alphabets. + + * acspecific.m4 (AC_USG): Define USG if we don't have rindex and + bzero, not if we do have them. + From Viktor Dukhovni. + +Sun Oct 29 15:13:37 1995 Richard Stallman + + * acgeneral.m4 (AC_CHECK_PROG): Use arg 5 as search list, not arg 4. + +Wed Aug 30 17:34:48 1995 Roland McGrath + + * acspecific.m4 (AC_PROG_CC_C_O): If $CC groks it and cc doesn't + exist, choose yes. + +Wed Jul 26 00:03:26 1995 David J. MacKenzie + + * Test release 2.4.2. + + * acgeneral.m4 (AC_CHECK_SIZEOF): Take an optional size to + use when cross-compiling. + + * acspecific.m4 (AC_FUNC_CLOSEDIR_VOID, AC_DIR_HEADER): If + cross-compiling, assume it returns void. It's not a big loss. + From Karl Berry. + + * acgeneral.m4 autoheader.sh: Change tr [a-z] [A-Z] into expansion + of the full alphabet, to combat losing AIX 4.1.1 tr when LANG + isn't set the way it likes. + + * acspecific.m4 (AC_FUNC_GETMNTENT): Check in -lgen for Unixware. + From miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza). + + * autoheader.m4 (AC_CONFIG_HEADER): Set config_h to the first + argument. From ghudson@mit.edu (Greg Hudson). + + * Makefile.in (all): Depend on info. + + * acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG, AC_CHECK_PROGS, + AC_PATH_PROGS, AC_CHECK_TOOL): Add optional PATH + parameter. + +Mon Jul 24 17:27:11 1995 David J. MacKenzie + + * acgeneral.m4 (AC_CHECK_LIB): Don't enclose tr args in [], for + SysV and POSIX. From Karl Heuer. + +Wed Jul 19 17:43:44 1995 David J. MacKenzie + + * acgeneral.m4 (AC_CHECK_LIB): Translate + to p in lib name. + +Wed Jun 28 13:45:16 1995 David J. MacKenzie + + * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Allow an empty value + for --enable and --with args. + (AC_CACHE_CHECK): New macro. + * acspecific.m4: Use it where possible. + +Tue Jun 27 13:29:54 1995 David J. MacKenzie + + * acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE): Add options + --bindir, --libdir, etc. + +Mon Jun 26 20:54:36 1995 David J. MacKenzie + + * acgeneral.m4 (AC_LANG_C, AC_LANG_CPLUSPLUS): Put the command + being run into the log file. + +Thu Jun 22 22:33:23 1995 David J. MacKenzie + + * acspecific.m4 (AC_PROG_INSTALL): Don't cache a shell script path. + + * acgeneral.m4 (AC_CHECK_LIB): Allow lib name to contain a . or /, + by fixing the cache variable name. + +Wed Jun 14 23:07:20 1995 David J. MacKenzie + + * Version 2.4. + +Sun May 7 08:09:12 1995 David J. MacKenzie + + * acspecific.m4 (AC_PATH_X_XMKMF): Check for libX11.{so,sl} as + well as .a when seeing whether LIBDIR or USRLIBDIR is right. + +Sat May 6 17:29:07 1995 David J. MacKenzie + + * acspecific.m4 (AC_PROG_CPP): If CPP is already set, use that as + the value and set the cache variable to it. + +Mon Mar 27 10:48:36 1995 David J. MacKenzie + + * Version 2.3. + + * acgeneral.m4 (AC_OUTPUT): Add quotes around the echo arguments + in the trap, so backslashes aren't required for multiline input. + From G.Wilford@ee.surrey.ac.uk. + Also use the sed trick when not using a config header file. + +Thu Mar 23 18:02:25 1995 David J. MacKenzie + + * acgeneral.m4 (AC_LANG_C, AC_LANG_CPLUSPLUS): Put "-c" right + after compiler name. Same for "-o conftest". + + * ifnames.sh (AC_MACRODIR): Default to @datadir@, not a hardcoded + path. + + * Test release 2.2.1. + + * acgeneral.m4 (AC_OUTPUT): Use sed, not tr, so we only remove the + output config header, not the input one too. From + muessig@ipf.bau-verm.uni-karlsruhe.DE (Peter Muessig). + (AC_LANG_C): Undo Feb 7 change. According to Roland McGrath, + most compilers require all options but -l... and -o to come first. + + * Makefile.in (uninstall): Don't use $@, since the cd makes it + invalid when srcdir is relative. + +Wed Mar 8 17:05:06 1995 David J. MacKenzie + + * Version 2.2. + +Wed Mar 8 12:44:34 1995 David J. MacKenzie + + * Makefile.in: Follow cd commands with &&, not ;. + From Franc,ois Pinard. + +Tue Mar 7 11:48:19 1995 David J. MacKenzie + + * acspecific.m4 (AC_FUNC_ALLOCA): Keep sh variable name space + clean. Put newline after AC_DEFINE_UNQUOTED call to avoid Irix + syntax error. + +Mon Mar 6 15:07:00 1995 David J. MacKenzie + + * Test release 2.1.3. + + * acspecific.m4 (AC_FUNC_ALLOCA): Replace nested AC_FUNC_CHECK + calls with a loop. + + * acspecific.m4 (AC_FUNC_VPRINTF): Don't check for signal munging. + From Paul Eggert. + + * acgeneral.m4 (AC_CACHE_SAVE): Tell the user whether the cache + changed or not. From gnu@toad.com (John Gilmore). + + * Makefile.in (install-info): Don't cd, to avoid breaking + install-sh references. + +Fri Mar 3 11:41:01 1995 David J. MacKenzie + + * Makefile.in (autoconf.info, standards.info): Use --no-split to + avoid creating filenames > 14 chars. + + * acgeneral.m4 (AC_CHECK_FUNC): Use assert.h, + to avoid protype conflicts from ctype.h (!!) on OSF/1 3.0. + +Sat Feb 25 01:56:57 1995 Roland McGrath + + * acspecific.m4 (AC_C_BIGENDIAN): Check for BYTE_ORDER macro from + sys/param.h before trying the test program which cannot be + cross-compiled. + +Fri Feb 24 20:02:08 1995 Roland McGrath + + * acgeneral.m4 (AC_CHECK_FUNC): Include errno.h instead of ctype.h + in test program. + +Wed Feb 22 18:01:27 1995 David J. MacKenzie + + * Test release 2.1.2. + +Tue Feb 21 13:00:07 1995 David J. MacKenzie + + * acgeneral.m4 (AC_CACHE_VAL): Add extra quotes to work around AIX + 4.1 bug reported by hyc@locus.com (Howard Chu). + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Check for -lelf before -lkvm. + Reported by Kaveh R. Ghazi. + (AC_HEADER_STAT): Check whether S_IFDIR is defined, to work around + ISC bug reported by rick@anasazi.com (Rick Coupland). + + * autoheader.sh: Better solution to @BOTTOM@ printing. + From Paul Eggert. + +Mon Feb 13 18:13:11 1995 Roland McGrath + + * acspecific.m4 (AC_PROG_CC_C_O): Use sed filter to make sure + ${ac_cc} is always a valid shell variable name. + (AC_PROG_MAKE_SET): Remove gratuitous backslashes in checking message. + +Sun Feb 12 18:42:35 1995 Roland McGrath + + * acgeneral.m4 (AC_CHECK_TOOL_PREFIX): Require AC_CANONICAL_BUILD, + so both $build and $host are definitely set before we compare + them. + +Sat Feb 11 04:37:30 1995 Roland McGrath + + * acgeneral.m4 (AC_CHECK_TOOL): Rewritten. Take optional third + arg VALUE-IF-NOT-FOUND. Check for + ${ac_tool_prefix}PROG-TO-CHECK-FOR first. If not found and third + arg given, and ${ac_tool_prefix} is nonempty, check for unadorned + PROG-TO-CHECK-FOR as well. Last choice use VALUE-IF-NOT-FOUND. + +Fri Feb 10 17:45:53 1995 Roland McGrath + + * acgeneral.m4 (AC_OUTPUT): Fix sed command to produce $ac_dots + for subdir configures. + +Thu Feb 9 14:42:20 1995 David J. MacKenzie + + * testsuite/config/unix.exp (autoconf_load): Run the script with + /dev/null as the cache. + + * acgeneral.m4 (AC_CHECK_TOOL_PREFIX, AC_CHECK_TOOL): New macros, + from Roland McGrath. + + * acspecific.m4 (AC_DECL_YYTEXT): Cache the output file root. + (AC_C_INLINE): If the compiler doesn't recognize it, define it + away. Try __inline__ too. From Jim Avera. + (AC_FUNC_GETPGRP): New macro. From Arnold Robbins. + * acconfig.h: New entry for it. + + * configure.in: Check for new awk. + * Makefile.in (editsh): Substitute in AWK. + + * acspecific.m4 (AC_PROG_INSTALL): Allow trailing slashes in PATH + elements. + * acgeneral.m4 (AC_PREFIX_PROGRAM): Ditto. + +Tue Feb 7 11:32:09 1995 David J. MacKenzie + + * acgeneral.m4 (AC_CHECK_LIB, AC_HAVE_LIBRARY): Check and add the new + library before existing libs, not after, in case it uses them. + * acspecific.m4 (AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT, + AC_FUNC_STRFTIME, AC_DYNIX_SEQ, AC_IRIX_SUN, AC_SCO_INTL): Ditto. + + * autoheader.sh: Allow @BOTTOM@ to be the first line in + acconfig.h. From iwj10@cus.cam.ac.uk (Ian Jackson). + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Add semicolons before + AC_DEFINE. Check for -lkvm before -lutil. Assume it needs setgid + if using -lutil. + + * acgeneral.m4 (ac_compile, ac_link): Put the file name before the + variables, so they can contain -l options. + + * acspecific.m4 (AC_FUNC_WAIT3): Sleep longer for HPUX. + (AC_TYPE_SIGNAL): Declare signal as extern "C" for C++. + + * Makefile.in testsuite/Makefile.in (maintainer-clean): Renamed + from realclean. + + * autoconf.sh (TMPDIR): Inherit from environment, or set if not. + + * acgeneral.m4 (AC_PREFIX_PROGRAM): Say we're checking the prefix. + + * acspecific.m4 (AC_ISC_POSIX): Fix typo. + (AC_PATH_X): Screen out bogus values from imake. + (AC_PROG_LEX): Check for yywrap, not main, in the library. + +Thu Feb 2 11:32:07 1995 David J. MacKenzie + + * acconfig.h (__CHAR_UNSIGNED): Protect with #ifndef. + From marcus@ee.pdx.edu (Marcus Daniels). + + * acgeneral.m4 (AC_CACHE_SAVE): Workaround Ultrix and 4.3BSD sh + bug in setting the high bit on variable values. + From Ken Raeburn. + (AC_OUTPUT_FILES, AC_OUTPUT_SUBDIRS): Ignore initial "./" to + avoid messing up the dot-dot counts. + (AC_OUTPUT_SUBDIRS): Pass INSTALL magic to subdirectories. + From Karl Berry. + + * ifnames.sh: Speed up drastically by folding 3N+2 processes into 2. + From Paul Eggert. + +Wed Feb 1 11:58:27 1995 David J. MacKenzie + + * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Add additional + quoting for internal consistency. + From junio@twinsun.COM (Jun Hamano). + + * acspecific.m4 (AC_PATH_XTRA): R6 function name was wrong. + From Karl Berry. + (AC_C_CROSS): Fix typo in cache var name. + From tgl@sss.pgh.pa.us (Tom Lane). + (AC_PROG_MAKE_SET): Change / in the make program name into _ so it + can be part of a shell variable name. + (AC_DECL_YYTEXT): Fix arguments to AC_TRY_LINK. + From interran@uluru.stanford.edu (John Interrante). + + * acgeneral.m4 (AC_CHECK_SIZEOF): If test program fails, set the + variable to 0 as the doc sez. + From eisen@cc.gatech.edu (Greg Eisenhauer). + + * acgeneral.m4, acspecific.m4: Remove *.core and core.* as well as + core, for recent BSD's. + + * acspecific.m4 (AC_SYS_INTERPRETER): Use `#! /' instead of `#!/'. + * acgeneral.m4 (AC_INIT_BINSH): Likewise. + * All scripts: likewise. + From woods@kuma.web.net (Greg A. Woods). + + * acgeneral.m4 (AC_INIT_PREPARE): Use fd 6 instead of 4, to + prevent a conflict on the Kubota Titan. From + muessig@ipf.bau-verm.uni-karlsruhe.DE (Peter Muessig). + + * autoconf.sh: Use a more concise syntax to set variables. + From Karl Berry. + + * acspecific.m4 (AC_FUNC_WAIT3): Check page fault measurements to + catch Linux. From tobias@server.et-inf.fho-emden.de (Peter Tobias). + + * acgeneral.m4 (AC_OUTPUT): If running config.status + fails, exit with a nonzero status. From Ken Raeburn. + +Tue Dec 6 19:07:07 1994 Roland McGrath + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Use elf_begin in -lelf + check, not elf_read. + +Mon Nov 7 18:18:11 1994 Roland McGrath + + * acspecific.m4 (AC_PROG_MAKE_SET): Fix msg; $MAKE is not useful + Make syntax. + +Fri Nov 4 09:08:33 1994 David J. MacKenzie + + * Version 2.1. + + * autoreconf.sh: Add -f --force option. + From Theodore Ts'o. + +Thu Nov 3 10:24:08 1994 David J. MacKenzie + + * acgeneral.m4 (AC_TRY_RUN): Reword warning. + + * acspecific.m4 (AC_PROG_CXX): Notify the user of the check for + GNU C++. + (AC_PROG_CXX, AC_PROG_CXXCPP): Use g++, not gcc, as default C++ + compiler. + * acgeneral.m4 (AC_LANG_CPLUSPLUS): Ditto. + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Move ac_usage string directly + into the here document to work around A/UX shell limitation. + + * acgeneral.m4 (AC_COMPILE_CHECK): Mention the MSG macros in the + obsolete warning. + + * autoscan.pl (output_programs): Use AC_CHECK_LIB, not + AC_HAVE_LIBRARY. + + * acgeneral.m4 (AC_CHECK_FUNC): Move prototype outside of function + so it works with C++. From ejb@era.COM (E. Jay Berkenbilt). + +Fri Oct 28 11:23:30 1994 David J. MacKenzie + + * acspecific.m4 (AC_CHECK_HEADERS_DIRENT): Use define, not + AC_DEFUN, so the test suite doesn't call it with no arguments, + leading to a syntax error in the real Bourne shell. + +Wed Oct 26 18:40:41 1994 David J. MacKenzie + + * Version 2.0. + +Tue Oct 25 11:04:16 1994 David J. MacKenzie + + * acgeneral.m4 (AC_CHECK_HEADER, AC_CHECK_HEADERS): Change - + in file names to _. + * acspecific.m4 (AC_CHECK_HEADER_DIRENT, AC_CHECK_HEADERS_DIRENT): + Likewise. + +Mon Oct 24 11:28:20 1994 David J. MacKenzie + + * Makefile.in (uninstall): Remove the transformed names. + (SCRIPTS): Rename from PROGS. + * configure.in: Likewise. + +Fri Oct 21 07:14:23 1994 David J. MacKenzie + + * acgeneral.m4 (AC_TRY_COMPILE): New macro. + (AC_LANG_C, AC_LANG_CPLUSPLUS): Set $ac_compile. + (AC_TRY_LINK): Don't declare exit. + * acspecific.m4 (AC_C_INLINE, AC_C_CONST, AC_CHECK_HEADER_DIRENT, + AC_DECL_SYS_SIGLIST, AC_HEADER_SYS_WAIT, AC_TYPE_SIGNAL, + AC_FUNC_GETLOADAVG, AC_HEADER_TIME, AC_STRUCT_TM, + AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_BLKSIZE, + AC_STRUCT_ST_RDEV): Use AC_TRY_COMPILE instead of AC_TRY_LINK. + (AC_AIX, AC_MINIX, AC_ISC_POSIX): Must come before AC_TRY_COMPILE. + + * acspecific.m4 (AC_PROG_LEX): Don't assume -ll if using lex; + check for it. From Mark Eichin. + +Thu Oct 20 07:11:22 1994 David J. MacKenzie + + * acgeneral.m4 (AC_PARSE_ARGS): Ignore --site. + + * autoscan.pl: Add more blank lines to the output. Pacify perl -w. + +Wed Oct 19 09:14:50 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_PREREQ_COMPARE): Allow secondary and ternary + numbers >99. From John Eaton. + +Wed Oct 19 00:06:40 1994 David J. MacKenzie + + * ifnames.sh: Take comments out of sed script. + +Tue Oct 18 00:20:04 1994 David J. MacKenzie + + * acgeneral.m4 (AC_INIT_NOTICE): Set ac_default_prefix. + (AC_INIT_PARSE_ARGS, AC_SITE_LOAD, AC_OUTPUT): Use it. + (AC_PREFIX_DEFAULT): New macro. + From Ken Raeburn. + + * testsuite/autoconf.s/syntax.exp: Renamed from specific.exp. + + * acgeneral.m4 (AC_SITE_LOAD): Change where to look for config.site. + + * configure.in: Call AC_ARG_PROGRAM. + * Makefile.in (install): Use program_transform_name. + + * acgeneral.m4 acspecific.m4 acoldnames.m4: Clarify copying terms. + + * acgeneral.m4 (AC_CANONICAL_BUILD): Default build to host, not empty. + + * acspecific.m4 (AC_PROG_CC): Recognize NeXT cpp as GNU C. + From tom@basil.icce.rug.NL (Tom R.Hageman). + +Mon Oct 17 18:25:53 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PROG_CPP): Use assert.h (comes with gcc), not + stdio.h (loses for new cross-compilers). From Roland McGrath. + +Tue Oct 11 13:22:22 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PATH_XTRA): Add X_PRE_LIBS variable and assume + -lSM if -lICE is found. From Karl Berry. + +Mon Oct 3 20:12:36 1994 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) + + * testsuite/Makefile.in (AUTOCONF, AUTOCONFFLAGS): Test + ../autoconf, not installed autoconf. + +Sat Oct 1 04:43:43 1994 Paul Eggert + + * acspecific.m4: Catch `const' bug in NEC SVR4.0.2 mips cc. + + * Makefile.in (.sh, .pl, configure): Do chmod before mv. + + * acheaders, acspecific.m4 (AC_HEADER_SYS_WAIT): New entry. + + * acconfig.h (HAVE_SYS_WAIT_H): New entry. + +Wed Sep 28 08:59:01 1994 David MacKenzie + + * Makefile.in: Set datadir to $(prefix)/share. + +Tue Sep 27 08:00:38 1994 David MacKenzie + + * Makefile.in: Use implicit rules to make scripts. + From Jim Meyering. + + * acconfig.h: Remove #undefs of unused symbols. + From Paul Eggert. + * testsuite/autoconf.s/defines.exp: New file. + * testsuite/autoconf.s/specific.exp: Extract the list of macros to + test from acspecific.m4 instead of hardcoding it. + * acspecific.m4 (AC_PROG_CXXCPP): Default CXX to gcc, not c++. + +Mon Sep 26 12:32:46 1994 David MacKenzie + + * acspecific.m4 (AC_HEADER_DIRENT): Only check for -lx if not + using dirent. + * autoreconf.sh: Shorten sed label for OSF/1. + * acgeneral.m4 acspecific.m4: Change licensing terms for output. + +Thu Sep 22 15:36:56 1994 David MacKenzie + + * autoconf.sh (tmpin): Always set. + +Wed Sep 21 13:12:10 1994 David MacKenzie + + * acgeneral.m4 (AC_INIT_PREPARE): Remove trailing slashes from + srcdir. + +Mon Sep 19 17:11:39 1994 David MacKenzie + + * acgeneral.m4 (AC_INIT, AC_INIT_PARSE_ARGS, AC_CANONICAL_SYSTEM, + AC_ARG_PROGRAM): Make the default for program_transform_name be + a valid sed script, and substitute it always. + +Sat Sep 17 08:27:58 1994 David MacKenzie + + * autoheader.sh: Protect `for' loop from checking empty $syms. + + * ifnames.sh: Use % instead of , as sed s separator. + + * autoscan.pl: Update output comments. + +Fri Sep 16 11:20:02 1994 David MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_TYPE_GETGROUPS): Provide a cross compiling + default. From Jim Meyering. + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Document + --program-transform-name. + +Thu Sep 15 16:26:36 1994 David MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_INIT_NOTICE): Clarify copying notice. + Fix up comments between sections. + + * acspecific.m4 (AC_PROG_LEX): Omit extra checking message. + + * autoreconf.sh: Give usage if non-option args are given. + * autoconf.sh autoheader.sh: Define AC_LOCALDIR for configure.in. + +Thu Sep 15 11:31:13 1994 Ian Lance Taylor (ian@airs.com) + + * Makefile.in (check): Set AUTOCONFFLAGS from srcdir, not objdir. + +Thu Sep 15 09:06:40 1994 David MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_MSG_ERROR): Say that it's an error in the message. + + * Makefile.in (check): Copy install-sh from srcdir if needed. + + * autoreconf.sh: Only regenerate autoheader-generated header file + templates. Pass relative macrodir properly. + * autoconf.sh autoheader.sh autoreconf.sh: Add -l --localdir option. + Based on work by Mark Eichin. + + * ifnames.sh: Add -h option. + * autoconf.sh autoheader.sh: Remove -v option. + + * acgeneral.m4 (AC_CHECK_TYPE): Require AC_HEADER_STDC and check + stdlib.h if present. + + * acgeneral.m4 (AC_OUTPUT): Protect cache save from interruptions. + +Tue Sep 13 09:46:23 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) + + * Makefile.in (install): Use srcdir. From Mark Eichin. + + * acgeneral.m4 (AC_OUTPUT_FILES): Automatically add + configure_input comment to Makefiles again. + * Makefile.in testsuite/Makefile.in: Remove configure_input ref. + + * acgeneral.m4 (AC_LINK_FILES, AC_OUTPUT_LINKS): Reverse the order + of the arguments. Support relative symlinks. + + * acgeneral.m4 acspecific.m4: Remove some gratuitous {} in shell + variable references. + + * acgeneral.m4 (AC_OUTPUT_FILES): New output variable + configure_input replaces big kludge for adding output comment. + * Makefile.in, testsuite/Makefile.in: Use it. + +Mon Sep 12 23:06:08 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_INIT_PREPARE, AC_OUTPUT_SUBDIRS): Make command + line quoting work for shell metachars besides blanks. + +Sun Sep 11 23:34:24 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_PATH_XTRA): Link with X_EXTRA_LIBS when + checking for -lSM. + + * acfunctions (memcmp): Use AC_FUNC_MEMCMP. From Paul Eggert. + + * acgeneral.m4 (AC_COMPILE_CHECK): Mark obsolete. + +Sat Sep 10 10:59:19 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * Makefile.in (DISTFILES): Include install-sh, not install.sh. + + * autoscan.pl: Check AC_MACRODIR. + + * acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE, + AC_CONFIG_SUBDIRS, AC_OUTPUT_SUBDIRS): Make quoting of command + line options work. + (AC_CONFIG_AUX_DIRS): Check for install-sh over install.sh. + + * acspecific.m4 (AC_FUNC_GETMNTENT): Only check for second lib if + first lib isn't found. From Jim Meyering. + +Fri Sep 9 10:41:42 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_FUNC_MEMCMP): New macro, from Jim Meyering. + * testsuite/autoconf.s/specific.exp: Test it. + + * testsuite/Makefile.in (site.exp): Simplify. + + * acgeneral.m4 (AC_CACHE_SAVE): Use a shorter syntax for setting + the variables. Idea from Karl Berry. + (AC_CHECK_FUNCS, AC_CHECK_HEADERS): Take an action-if-not-found. + From Jim Meyering. + + * acconfig.h: Add entries for getmntent and strftime. + * acspecific.m4 (AC_C_CHAR_UNSIGNED): If GCC, don't run a test + program. + +Thu Sep 8 10:53:53 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_USG): Was passing too many args to AC_TRY_LINK. + (AC_FUNC_STRFTIME, AC_FUNC_GETMNTENT): New macros. + (AC_HEADER_DIRENT): Check for Xenix dir libs. + (AC_XENIX_DIR, AC_SCO_INTL, AC_IRIX_SUN, AC_DYNIX_SEQ, AC_AIX, + AC_ISC_POSIX, AC_MINIX): Go back to the v1 names. + * acoldnames.m4: Delete their aliases. + * testsuite/autoconf.s/specific.exp: Check them. + + * acgeneral.m4 (AC_ARG_PROGRAM): Use `;' instead of `-e' to + separate sed arguments, to simplify Makefile usage and support + sed arguments containing spaces. + (AC_CANONICAL_HOST): Move check for config.sub here from + AC_CANONICAL_SYSTEM. + + * autoheader.m4 (AC_CHECK_HEADERS_DIRENT): Redefine. From Paul Eggert. + (AC_CHECK_SIZEOF): Redefine this, not the old name. + (AC_HAVE_LIBRARY): Redefine. + +Wed Sep 7 09:32:31 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * testsuite/lib/common.exp: Ignore warnings about test programs. + * testsuite/autoconf.s/specific.exp: Check AC_FUNC_CLOSEDIR_VOID. + + * Makefile.in (*clean): Remove the new index. + (dist): Undo adding write perms. Screws up RCS. + * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Remove comments from sed + program. + * acoldnames.m4: Change a couple of AC_DEFUN to define. + +Wed Sep 7 01:27:19 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_SITE_LOAD): Check whether $CONFIG_SITE is empty. + +Tue Sep 6 09:55:30 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_ARG_PROGRAM): New macro. + (AC_INIT_PARSE_ARGS, AC_CANONICAL_SYSTEM): Do a little setup for it. + + * acspecific.m4 (AC_PROG_INSTALL): Clarify comment. Remove check + for bsdinst, since it's no better than our install.sh. + (AC_CHECK_HEADER_DIRENT, AC_CHECK_HEADERS_DIRENT): New macros. + (AC_HEADER_DIRENT, AC_DIR_HEADER): Use them. + (AC_PROG_CC, AC_PROG_CXX): Check whether GCC accepts -g. + + * acgeneral.m4 (AC_INIT_PREPARE): Call AC_PROG_ECHO_N. + Use define instead of AC_DEFUN for some frequently called or + internal macros that aren't involved in ordering constraints. + +Mon Sep 5 17:37:36 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acspecific.m4 (AC_C_CROSS): Provide default argument to AC_TRY_RUN. + +Fri Sep 2 09:30:41 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_TRY_CPP): Use a temp file so sh -x works. + From Mark Nudelman. + + * acgeneral.m4: --norecursion -> --no-recursion. + (AC_OUTPUT_LINKS): Reset srcdir to ac_given_srcdir. + + * acspecific.m4 (AC_PATH_X): Call AC_ARG_WITH(x, ...). + (AC_PROG_INSTALL): Search for bsdinst too. + + * Makefile.in (dist): Make distribution files writable. + + * acgeneral.m4 (AC_OUTPUT): Move trap 0 commands to near the end + of configure, to work around shell bug in failing to execute the + trap when there are commands after AC_OUTPUT. + +Sat Sep 3 19:47:06 1994 Roland McGrath + + * acgeneral.m4 (AC_OUTPUT_FILES): Write CONFIG_FILES defn + unquoted, so $1 can contain references to shell variables in configure. + +Thu Sep 1 15:34:15 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_TRY_RUN): Always warn if no cross-compile + default is given. + * acspecific.m4 (AC_FUNC_MMAP, AC_FUNC_VFORK, AC_FUNC_WAIT3, + AC_FUNC_UTIME_NULL, AC_FUNC_STRCOLL): Provide a default + for AC_TRY_RUN. + (AC_FUNC_CLOSEDIR_VOID): New macro, broken out of AC_HEADER_DIRENT. + +Thu Sep 1 00:06:38 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acgeneral.m4 acspecific.m4: Discard all output until AC_INIT is + called. Remove now-unnecessary dnl's between macro definitions. + (AC_OUTPUT): Add exit 0 and optional unquoted here document to + end of config.status. + +Wed Aug 31 00:11:28 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acspecific.m4 (AC_PATH_X_DIRECT): Use AC_TRY_LINK instead of + AC_CHECK_LIB, so we don't add the library to $LIBS or print anything. + (AC_PATH_XTRA): Remove initial checking message. + (AC_HEADER_STDC): In test program, default to no STDC headers if + cross compiling. + +Tue Aug 30 16:16:29 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * autoreconf.sh: Add -h option. + * autoupdate.sh: Remove -v option. + + * acgeneral.m4 (AC_EGREP_CPP, AC_TRY_CPP): Add parens around eval + for old shells. From Kaveh Ghazi. + (AC_TRY_RUN): Warn when generating configure, if called without + a default parameter and AC_CANONICAL_SYSTEM has been called. + + * autoheader.sh: Don't run `for' loops on empty lists. + From Ken Raeburn. + + * autoconf.sh autoheader.sh: Print the version number using grep + like the other scripts, not using m4. + * acgeneral.m4: Remove conditional for printing version number. + It broke with frozen files. + + * autoheader.m4: New file. + * autoheader.sh: Use it; the frozen version if possible. + * Makefile.in (install): Install a frozen autoheader.m4f if possible. + * autoconf.m4: Don't sinclude acsite.m4 here. + * acgeneral.m4 (AC_INIT): Include it here. + +Tue Aug 30 14:02:07 1994 David J. MacKenzie (djm@mole.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_CHECK_LIB): Use AC_DEFINE_UNQUOTED. + From Jim Meyering. + + * acgeneral.m4: Revise diversions, to topologically order + macros called via AC_REQUIRE. + (AC_DIVERT_PUSH, AC_DIVERT_POP): New macros. + (AC_INIT, AC_ARG_ENABLE, AC_ARG_WITH, AC_SUBST, AC_SUBST_FILE, + AC_REQUIRE): Use them. + From Franc,ois Pinard (bless his soul!). + (AC_PRO, AC_EPI): New macros. + (AC_DEFUN): Use them. + (AC_INIT): sinclude aclocal.m4 herea. + * autoconf.m4: Not here. + + * autoconf.sh: Use a freeze file if available and m4 can do it. + * Makefile.in (install): Install a freeze file if m4 supports it. + +Mon Aug 29 16:18:22 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_TRY_CPP): Remove subshell and move quotes. + +Sun Aug 28 17:37:26 1994 David J. MacKenzie (djm@bennett.eng.umd.edu) + + * acspecific.m4 (AC_C_CHAR_UNSIGNED, AC_C_LONG_DOUBLE, + AC_C_INLINE): Don't AC_REQUIRE AC_PROG_CC. + + * acspecific.m4 (AC_RSH, AC_ARG_ARRAY, AC_HAVE_POUNDBANG): Define + to print error messages. + + * acgeneral.m4 (AC_OUTPUT_LINKS): Insert ac_links and ac_files + into config.status using an *un*quoted here document. + From Ken Raeburn. + +Sat Aug 27 13:31:58 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT_HEADER): Remove comments from within sed + script. From Kaveh Ghazi. + +Fri Aug 26 17:03:18 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) + + * autoconf.sh, acgeneral.m4: __LINE__ -> __oline__. + + * acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP): Append any error output + to config.log. + (AC_EGREP_CPP): Don't use a temp file. + + * acspecific.m4 (AC_FUNC_ALLOCA): Require CPP. + + * acgeneral.m4 (AC_INIT_PREPARE): Replace AC_SUBST_DEFAULT calls + with AC_SUBST. + (AC_SUBST_DEFAULT): Macro removed. + * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX): If CFLAGS or CXXFLAGS + was not set already, give it a default value according to whether + we have gcc. + + * acspecific.m4 (AC_PATH_XTRA): Use AC_CHECK_LIB, not AC_HAVE_LIBRARY. + +Fri Aug 26 00:34:11 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acconfig.h (HAVE_UNION_WAIT): Entry removed; it wasn't defined + anywhere. + + * acgeneral.m4 (AC_OUTPUT_HEADER): rm files before mv onto them. + (AC_OUTPUT): Remove explicit exit at end of configure, to allow + code after AC_OUTPUT (needed for Emacs). + + * acgeneral.m4 (AC_CANONICAL_SYSTEM): Move setting of alias vars + into submacros. + + * acspecific.m4 (AC_PROG_CPP): If $CPP is set and is a directory, + ignore it. + +Thu Aug 25 09:26:36 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acspecific.m4 (AC_SYS_INTERPRETER): Move hash mark out of macro + call. + (AC_FUNC_MMAP): If C++, put malloc decls in extern "C". + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Untabify help message + and indent options. + + * Makefile.in (DISTFILES): Remove ChangeLog.0. + + * acgeneral.m4 (AC_CHECK_LIB): Do uppercasing of library name at + runtime. + (AC_HAVE_LIBRARY): Retain old behavior. + + * acspecific.m4 (AC_FUNC_VFORK): If C++, use a prototype for the + function in the test program. + (AC_C_ARG_ARRAY): Macro deleted. + * acoldnames.m4, acconfig.h, testsuite/autoconf.s/specific.exp: + Remove references to it. + + * autoupdate.sh: Make sure $infile can be read, and $tmpout has + the same permissions. Make sure $infile can be written. From + Paul Eggert. + + * acgeneral.m4 (AC_INIT*): Remove now-incorrect AC_BEFORE calls. + (AC_CHECK_FUNC): If C++, use extern "C". + (AC_TRY_LINK, AC_TRY_RUN): If C++, declare exit. + + * acspecific.m4 (AC_PATH_XTRA): Check for more libraries. + From Karl Berry. + + * acgeneral.m4 (AC_INIT_PREPARE): Substitute CPPFLAGS. + (AC_LANG_C, AC_LANG_CPLUSPLUS): Include CPPFLAGS in the commands. + + * acgeneral.m4 (AC_OUTPUT_FILES): Move protection for right side + of sed substitution here from AC_MAKE_DEFS, so it applies to all + AC_SUBST'd variables. + + * Makefile.in (install): Use for loops. From Jim Meyering. + + * acgeneral.m4: Revise diversions to rely on implicit flushing at + the end of the m4 run. Idea from Franc,ois Pinard. + (AC_INIT_PREPARE, AC_ARG_ENABLE, AC_ARG_WITH, AC_PREFIX_PROGRAM): + Write to the appropriate diversions. + (AC_ENABLE, AC_WITH): Supply default help string. + (AC_ENABLE_INTERNAL, AC_WITH_INTERNAL, AC_PREFIX_INTERNAL): + Macros removed. + (AC_CONFIG_SUBDIRS): Set `subdirs' here instead of in + AC_INIT_PREPARE. + (AC_PREFIX): Macro removed. + * acoldnames.m4 (AC_PREFIX): Make it an alias for AC_PREFIX_PROGRAM. + + * acoldnames.m4: We don't officially support calling + the subroutines of AC_INIT directly, or replacing them, so don't + document it. + +Wed Aug 24 00:19:05 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acgeneral.m4 (AC_EGREP_CPP, AC_TRY_LINK, AC_TRY_RUN, + AC_TRY_CPP): Add #line directives. + * autoconf.sh: Make the #line directives accurate. + From Franc,ois Pinard. + + * acgeneral.m4 (AC_OUTPUT): Set ac_given_INSTALL from INSTALL. + (AC_SUBST_FILE): Replace with what was AC_INSERT_FILE. + (AC_SUBST_DEFAULT): New macro. + (AC_INIT_BINSH): Renamed from AC_BINSH. + (AC_INIT_PREPARE): Call AC_SUBST_DEFAULT for CFLAGS, CXXFLAGS, and + LDFLAGS. + + * acspecific.m4 (AC_HEADER_MAJOR): Don't nest caching tests. + + * Makefile.in (clean): Remove the new index files. + + * configure.in: Check for gm4 before gnum4. + + * acspecific.m4 (AC_PROG_RSH): Macro removed. + + * Makefile.in (install): Install autoconf.m4. + + * acspecific.m4 (AC_SYS_INTERPRETER): New name and calling + convention for AC_HAVE_POUNDBANG. + (AC_OS_XENIX): Check ac_header_dir instead of DEFS. + + * testsuite/autoconf.s/specific.exp: Add AC_HEADER_DIRENT. + Remove AC_SYS_REMOTE_TAPE. Replace AC_HAVE_POUNDBANG with + AC_SYS_INTERPRETER. + + * acspecific.m4 (AC_INT_16_BITS, AC_LONG_64_BITS): Reword messages. + + * acgeneral.m4 (AC_CHECK_LIB): Use our standard alternate m4 quote + characters << and >> instead of /. + + * acspecific.m4 (AC_C_CONST, AC_TYPE_GETGROUPS, + AC_PROG_GCC_TRADITIONAL): Don't put the test program in a + temporary variable. + + * acgeneral.m4 (AC_CHECK_HEADERS, AC_CHECK_FUNCS): Use + AC_DEFINE_UNQUOTED. + * autoheader.sh (AC_DEFINE_UNQUOTED): Define. + +Tue Aug 23 00:03:06 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acgeneral.m4: Improve comments on some macros. + Fix improperly quoted undefine calls. + (AC_QUOTE_DQUOTE, AC_QUOTE_SQUOTE, AC_QUOTE_HERE, AC_QUOTE_SED, + AC_QUOTE_TOKEN, AC_DEFINE_QUOTE, AC_DEFINE_SEDQUOTE, + AC_QUOTE_IDENTITY): Macros removed. + (AC_DEFINE, AC_DEFINE_UNQUOTED): Only write the (correct) value to + confdefs.h. + (AC_OUTPUT_MAKE_DEFS): New macro. + (AC_OUTPUT): Call it. Move AC_SUBST calls to AC_INIT_PREPARE. + (AC_OUTPUT_FILES): Put most variable substitutions in a here document + instead of a string, to avoid unwanted changes to the values. + (AC_OUTPUT_HEADER): Generate the sed script to transform + config.h.in from conftest.h. Only split up the sed script in + configure, not also in config.status. + + * acspecific.m4 (AC_PROG_ECHO_N): Work around some greps lacking -e. + + * acspecific.m4 (AC_PATH_X, AC_PATH_X_XMKMF, AC_PATH_X_DIRECT, + AC_PATH_XTRA): Fix cache use and message printing. + + * acgeneral.m4 (AC_SITE_LOAD): Check env var CONFIG_SITE first. + (AC_OUTPUT_HEADER): New macro broken out of AC_OUTPUT. + + * acgeneral.m4, acspecific.m4 (AC_FD_MSG, AC_FD_CC): New + symbolic constants. + + * acgeneral.m4, acoldnames.m4 (AC_INIT_PARSE_ARGS): Renamed from + AC_INIT_PARSEARGS. + + * autoupdate.sh: Use $SIMPLE_BACKUP_SUFFIX, if set. + + * autoheader.sh (AC_CHECK_LIB): Reflect the added arg. + + * autoconf.m4: New file. + * Makefile.in (DISTFILES): Add it. + * autoconf.sh, autoheader.sh, Makefile.in: Use it. + + * acspecific.m4 (AC_SYS_REMOTE_TAPE): Macro removed. + + * acfunctions, acheaders, acidentifiers, acmakevars, acprograms, + autoscan.pl: Use new macro names. + + * acgeneral.m4 (AC_MSG_ERROR): Enclose within {} so it acts like a + single statement. From mjshield@nyx.cs.du.edu (Michael Shields). + (AC_CHECK_FUNCS, AC_CHECK_HEADERS): Only compute the uppercase + name if we're going to define that symbol. + (global): Remove AC_DIVERSION_VAR. + (AC_OUTPUT): Adjust quoting and substitutions to replace most + variable values directly in the sed script. Handle srcdir, + top_srcdir, and INSTALL specially. + Add .cpp and .hpp to c-ish suffixes list. + + * configure.in: Use the new macro names. + + * ChangeLog.0: New file, broken out of ChangeLog.1. + * Makefile.in (DISTFILES): Add it. + + * autoupdate.sh: Update the regexps to account for changes to + acoldnames.m4. + +Mon Aug 22 23:57:18 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * testsuite/autoconf.s/specific.exp: Use new macro names. + +Fri Aug 12 10:15:51 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acspecific.m4 (AC_HEADER_DIRENT, AC_DIR_HEADER): Use one cache + variable for each header file, not one for all of them. + + * acgeneral.m4 (AC_CACHE_SAVE): Print a message noting when cache + is unwritable. + (AC_CHECK_FUNCS, AC_CHECK_HEADERS): Take an optional arg to + execute on a match. + + * acspecific (AC_OS_AIX, AC_OS_MINIX, AC_OS_ISC): Don't need to be + called before AC_TRY_CPP, since that doesn't use CFLAGS. + + * acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG): Print a result + whether or not we found the program. + (AC_CHECKING): Not obsolete. + (AC_WITH, AC_ENABLE, AC_INIT_PREPARE): Merge the --enable and + --with diversions. + + * acgeneral.m4 (AC_DEFUN): New macro. + Use it globally to define macros that are used as functions, + as opposed to macros that are used as variables. Remove calls to + AC_PROVIDE. + +Thu Aug 11 08:25:08 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acspecific.m4 (AC_OS_XENIX): Fix assignments. From Franc,ois + Pinard. + (AC_SYS_REMOTE_TAPE): Fix typo. + +Wed Aug 10 09:30:11 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acspecific.m4 (AC_C_CHAR_UNSIGNED): Don't lie about the result + if gcc, just ignore it. + + * acgeneral.m4 (AC_CHECK_LIB): Add a function argument. + * acgeneral.m4 (AC_HAVE_LIBRARY): Make it a wrapper around + AC_CHECK_LIB. + * acoldnames.m4: Remove its alias. + * acspecific.m4: Add argument to callers. + + * acspecific.m4 (AC_PROG_ECHO_N): Move from acgeneral.m4 AC_MSG_ECHO_N. + * acgeneral.m4: Callers changed. + + * acgeneral.m4 (AC_CACHE_LOAD, AC_CACHE_SAVE, AC_SITE_LOAD, + AC_MSG_CHECKING): Aesthetic changes to messages, suggested by + Franc,ois Pinard. + + * acspecific.m4 acgeneral.m4 acoldnames.m4: Rename + AC_TRY_CROSS to AC_C_CROSS. + + * acgeneral.m4 (AC_INIT_PARSEARGS): Don't mention --verbose in + help message. + (AC_INIT_PREPARE): Use file descriptor 5 for config.log, and 6 for + nothing. --verbose no longer does anything. + (AC_MSG_ECHO_N): New macro. + (AC_MSG_CHECKING, AC_MSG_RESULT, AC_CACHE_VAL): Require it and use + the shell variables it sets. + (AC_MSG_RESULT, AC_VERBOSE): Print unless --silent/--quiet is given, + not only when --verbose is given. + (AC_DEFINE): Don't echo anything. + (AC_CACHE_VAL): Use a custom echo instead of AC_MSG_RESULT. + * acgeneral.m4 (AC_CHECKING, AC_VERBOSE): Put back real versions, + marked obsolete. + * acoldnames.m4: Delete their aliases. + * acgeneral.m4, acspecific.m4 (many macros): Make sure each call + to AC_MSG_CHECKING has exactly one matching AC_MSG_RESULT, and + make the result messages make sense with the checking messages. + + * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Use echo, not AC_MSG_RESULT, + to print recursion notice. + +Tue Aug 9 00:17:28 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acgeneral.m4 (AC_OUTPUT): Add comment mentioning config.log. + + * ChangeLog.1: File split out of ChangeLog. + * Makefile.in (DISTFILES): Add it. + + * acgeneral.m4 (AC_OUTPUT, AC_OUTPUT_HEADER), autoheader.sh: + Support optional input-file specification in output-file names. + * autoheader.sh: Support top and bottom comments for config.h.in + in acconfig.h. + + * acgeneral.m4, README: Say more about requiring GNU m4. + + * autoheader.sh: In the list of symbols to get template entries + for, start each symbol with a blank. + + * autoupdate.sh: Add sed substitutions for replacing macro + calls without parameters. + + * acgeneral.m4 (AC_CACHE_VAL): Omit the cache var name from the + result message. + + * acspecific.m4 (AC_DIR_HEADER): Define to be similar to + AC_HEADER_DIRENT, but only define the old cpp macros. + (AC_HEADER_DIRENT): Only define the new ones. + * acoldnames.m4: Don't say that those two macros are synonyms. + * acconfig.h: Add the new cpp macros. Add <> to some comments. + + * acgeneral.m4 (AC_OUTPUT): Don't mess with $INSTALL if it starts + with a $, due to user intervention. + + * Makefile.in, testsuite/Makefile.in: Fix *clean targets. + + * acgeneral.m4 (AC_CACHE_SAVE, AC_CACHE_LOAD, AC_SITE_LOAD): + Use echo instead of AC_MSG_RESULT. + (AC_INIT_PARSEARGS): Group options by topic in help message. Idea + from Franc,ois Pinard. + + * TODO: New file. + +Mon Aug 8 23:04:01 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acgeneral.m4 (AC_OUTPUT): Tighten up srcdir handling code slightly. + Add one or more ../ to $INSTALL when it's a relative path and + creating a file in a subdirectory. + +Tue Aug 2 19:54:26 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * autoheader.sh: Read acoldnames.m4. Redefine the new macro names. + Only define HAVE_LIBFOO where AC_CHECK_LIB is called with only one + argument. + +Sat Jul 30 09:53:38 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acgeneral.m4 acspecific.m4: The Great Renaming. + (Well, I think it's great. You may have your own opinion.) + + * acspecific.m4 (AC_DIR_HEADER): Define HAVE__H as well as + the old DIRENT, SYSDIR, etc. + + * acgeneral.m4 acspecific.m4: Add missing spaces between arguments + to m4 calls. From Franc,ois Pinard. + + * autoconf.sh: Read acoldnames.m4. + * Makefile.in (DISTFILES, PROGS, install, clean): Add + acoldnames.m4 and autoupdate.sh. + +Tue Jul 26 08:52:17 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * testsuite/Makefile.in (check): Print a message noting that + runtest is part of DejaGNU. + + * autoscan.pl: Remove unneeded backslash. + +Sun Jul 24 23:30:27 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * Makefile.in (clean mostlyclean distclean realclean): Recurse + into testsuite directory. + +Wed Jul 20 09:38:29 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * Makefile.in (install): Add missing else and fi. + * acspecific.m4 (GETGROUPS_T, RETSIGTYPE, STACK_DIRECTION): Use + AC_DEFINE_UNQUOTED rather than AC_DEFINE. + From Jim Meyering. + +Tue Jul 19 14:49:02 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acspecific.m4 (AC_MEMORY_H): Add more quotes. + + * acgeneral.m4 (AC_TEST_RUN): Check for cross_compiling = yes, not + whether it's non-empty. + + * acspecific.m4 (AC_MINUS_C_MINUS_O, AC_SET_MAKE): Eval the cache var + assignments. + (AC_YYTEXT_POINTER): Fix typo. + + * testsuite/autoconf.s/specific.exp, + testsuite/autoconf.g/sizeof_type.exp, + testsuite/autoconf.g/init.exp: New files. + * testsuite/lib/common.exp, testsuite/config/unix.exp: Many + changes to make them work. + + * acgeneral.m4 (AC_DEFINE): Use redirection for echo, not $verbose. + +Sat Jul 2 22:07:18 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acspecific.m4 (AC_REMOTE_TAPE): Substitute PROGS. + +Thu Jun 30 16:29:15 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acgeneral.m4 (AC_SUBST_FILE): New version from Ken Raeburn. + + * ifnames: Add --help, --version, --macrodir options. + +Fri Jun 24 06:03:35 1994 Paul Eggert (eggert@twinsun.com) + + * acspecific.m4 (AC_VFORK): Improve test for the gcc-sparc vfork bug. + +Thu Jun 30 09:47:17 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Pass correct --srcdir option + to sub configures. Quote args containing spaces. + (AC_PREPARE): Set and substitute `subdirs'. Quote args containing + spaces. + (AC_CANONICAL_HOST, AC_CANONICAL_TARGET, AC_CANONICAL_BUILD): + Substitute the cpu, vendor, os variables. + + * acspecific.m4 (AC_PROG_INSTALL): Look for ginstall before other + names. + + * acgeneral.m4 (AC_TEST_LINK): Add newlines around argument code. + From mjshield@nyx.cs.du.edu (Michael Shields). + +Wed Jun 29 16:56:28 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * autoscan.pl: Add --macrodir option. + + * acgeneral.m4 (AC_CACHE_SAVE): Capture stderr for Ultrix sh. + +Tue Jun 28 18:05:00 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * Makefile.in: Make INSTALL from install.texi. + +Thu Jun 23 02:03:19 1994 David J. MacKenzie (djm@vortex.eng.umd.edu) + + * ifnames.sh: New file. + * Makefile.in: Add it in various places. + +Tue Jun 14 12:58:38 1994 David J. MacKenzie (djm@bleen.eng.umd.edu) + + * Makefile.in (DISTFILES): Add testsuite files. + + * autoconf.sh: Print version number on stdout, not stderr. + * acgeneral.m4: Ditto. + + * acgeneral.m4 (AC_HAVE_LIBRARY): Add OTHER-LIBRARIES arg. + Treat empty commands args as if they weren't given. + +Thu Jun 9 11:39:14 1994 David J. MacKenzie (djm@bleen.eng.umd.edu) + + * acgeneral.m4 (AC_CHECK_TYPE): New macro. + + * acspecific.m4 (AC_PROG_CPP, AC_PROG_CXXCPP, AC_YYTEXT_POINTER, + AC_LN_S, AC_RSH, AC_STDC_HEADERS, AC_MAJOR_HEADER, AC_DIR_HEADER, + AC_STAT_MACROS_BROKEN, AC_SYS_SIGLIST_DECLARED, AC_GETGROUPS_T, + AC_UID_T, AC_RETSIGTYPE, AC_MMAP, AC_VFORK, AC_WAIT3, AC_ALLOCA, + AC_GETLOADAVG, AC_UTIME_NULL, AC_STRCOLL, AC_SETVBUF_REVERSED, + AC_STRUCT_TM, AC_TIME_WITH_SYS_TIME, AC_TIMEZONE, AC_ST_BLOCKS, + AC_ST_BLKSIZE, AC_ST_RDEV, AC_CROSS_CHECK, AC_CHAR_UNSIGNED, + AC_LONG_DOUBLE, AC_WORDS_BIGENDIAN, AC_ARG_ARRAY, AC_INLINE, + AC_CONST, AC_HAVE_POUNDBANG, AC_REMOTE_TAPE, AC_LONG_FILE_NAMES, + AC_RESTARTABLE_SYSCALLS, AC_FIND_X, AC_FIND_X_XMKMF, + AC_FIND_X_DIRECT): Cache results. + (AC_SIZE_T, AC_PID_T, AC_OFF_T, AC_MODE_T): Use AC_CHECK_TYPE. + (AC_DIR_HEADER_CHECK): Macro removed. + +Wed Jun 8 18:03:45 1994 David J. MacKenzie (djm@bleen.eng.umd.edu) + + * acspecific.m4 (AC_MINUS_C_MINUS_O): Cache results. + +Thu May 26 09:43:37 1994 David J. Mackenzie (djm@poseidon.cygnus.com) + + * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX): Cache results. + Eliminate temp file in gcc test. + (AC_GCC_TRADITIONAL): Cache results. + +Wed May 25 14:45:44 1994 David J. Mackenzie (djm@poseidon.cygnus.com) + + * acspecific.m4 (AC_VPRINTF): Use AC_FUNC_CHECK. + + * acgeneral.m4 (AC_CONFIG_AUX_DIR): Renamed from AC_CONFIG_AUXDIR. + (AC_SUBST_FILE): Macro deleted; didn't work, not clear it's needed. + + * acgeneral.m4 (AC_SITE_LOAD): New macro. + (AC_PREPARE): Call it. + +Wed May 25 08:18:07 1994 David J. Mackenzie (djm@rtl.cygnus.com) + + * acgeneral.m4: m4exit if --version, to reduce needless delay. + + * acgeneral.m4 (AC_PREPARE): Redirect file descriptor 6 to + config.log. + (AC_LANG_C, AC_LANG_CPLUSPLUS): Send compiler messages to desc 6. + * acspecific.m4 (AC_MINUS_C_MINUS_O): Likewise. + * Makefile.in (distclean): Remove config.log. + + * acgeneral.m4 (AC_PREPARE): Add AC_BEFORE calls for AC_CONFIG_HEADER, + AC_REVISION, AC_PREREQ, and AC_CONFIG_SUBDIRS. + Add AC_PROVIDE calls to those macros and AC_ARG_ENABLE and AC_ARG_WITH. + + * acgeneral.m4 (AC_CANONICAL_SYSTEM, AC_CANONICAL_HOST, + AC_CANONICAL_TARGET, AC_CANONICAL_BUILD): Add "ICAL" to names. + (AC_LINK_FILES): Renamed from AC_MAKE_LINKS. + (AC_TEST_RUN): Renamed from AC_TEST_PROGRAM, which is now an alias. + * acspecific.m4: Change callers to use new name. + + * acgeneral.m4 (AC_PREFIX_INTERNAL): Renamed from AC_PREFIX. + (AC_PREFIX): Obsolete wrapper for it. + (AC_PREFIX_PROGRAM): Define a variable. + (AC_PREPARE): Call AC_PREFIX_INTERNAL if that variable is set. + +Tue May 24 18:49:35 1994 David J. Mackenzie (djm@rtl.cygnus.com) + + * acspecific.m4 (AC_ALLOCA): Don't declare alloca if it's already + defined. From Bill Sommerfeld. + + * acgeneral.m4 (AC_TEST_PROGRAM): Verbosely note when using the + cross-compiling default. + (AC_CACHE_WRITE): Set the cache values only if not already set. + (AC_PARSEARGS, AC_OUTPUT): Allow giving an empty prefix or exec_prefix. + + * acgeneral.m4, acspecific.m4: Rename AC_CONFIG_AUX* to + AC_CONFIG_AUXDIR*. + + * acgeneral.m4 (AC_OUTPUT, AC_OUTPUT_HEADER): Add an env var + CONFIG_STATUS to allow overriding the name of config.status. + + * acspecific.m4 (AC_MINUS_C_MINUS_O): If $CC=cc, don't duplicate + the check. From Jim Meyering. + + * acgeneral.m4 (AC_TEST_PROGRAM): Add missing newline. + Always include 'fi' for cross-compiling if. + From Jim Meyering. + + * Makefile.in (prefix, exec_prefix): Use @ substitutions. + + * acgeneral.m4: Make default cache file ./config.cache, + so PATH is not used by "." command. From Jim Meyering. + +Thu May 19 06:05:07 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acspecific.m4 (AC_STRUCT_TM): Fixed checking message to be less + confusing. + +Wed May 18 22:11:45 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_BINSH): New macro. + (AC_INIT, AC_REVISION): Require AC_BINSH first thing. + +Wed May 18 09:08:39 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) + + * acgeneral.m4: Rename some internal macros. + Give the diversions symbolic names. + (AC_ARG_ENABLE, AC_ARG_WITH, AC_ENABLE_INTERNAL, AC_WITH_INTERNAL): + New macros. + (AC_PARSEARGS): Print --with and --enable help strings. + (AC_ENABLE, AC_WITH): Make wrappers around _INTERNAL functions. + Mark obsolete. + (AC_PREPARE): Execute any saved up --with or --enable code. + +Tue May 17 15:18:00 1994 David J. MacKenzie (djm@bleen.eng.umd.edu) + + * acgeneral.m4 (AC_REVISION): Move quotes around to make it work + again. + +Sat May 14 07:30:57 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acgeneral.m4, acspecific.m4: Clean up some comments. + +Tue May 10 09:50:12 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acspecific.m4 (AC_PROG_INSTALL): set the _path_ cache variable, + not the _program_ one. + * acgeneral.m4 (AC_PREFIX): Call AC_PROGRAM_PATH instead of + duplicating it. + (AC_PROGRAM_CHECK, AC_PROGRAM_PATH): If the user set the variable + in the environment, cache that value. + (AC_PREPARE, AC_CHECKING, AC_VERBOSE): Use file descriptors 4 and + 5 for checking and results messages. Idea from metaconfig 3.0. + +Mon May 9 08:20:14 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acgeneral.m4 (AC_TEST_PROGRAM): If no default for + cross-compiling is given, but we are cross-compiling, give an error. + (AC_PROGRAM_EGREP, AC_TEST_LINK, AC_TEST_PROGRAM, AC_TEST_CPP): + Don't add an extra blank line after the if-clause. + (AC_REVISION): Merge AC_DOREV into this macro. + Rename some macros: + AC_SYSTEM_TYPE -> AC_CANON_SYSTEM + AC_HOST_TYPE -> AC_CANON_HOST + AC_TARGET_TYPE -> AC_CANON_TARGET + AC_BUILD_TYPE -> AC_CANON_BUILD + (AC_OUTPUT): Don't do Cygnus-style magic + substitutions on prefix and exec_prefix, just initialize and + substitute them normally. + +Sun May 8 01:09:42 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acspecific.m4 (AC_AIX, AC_MINIX, AC_ISC_POSIX): Don't call + AC_BEFORE for AC_HEADER_EGREP, to avoid require loops. + * acgeneral.m4 (AC_HEADER_EGREP): Call AC_PROGRAM_EGREP instead of + duplicating most of it. + +Fri May 6 15:26:48 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acspecific.m4 (AC_YYTEXT_POINTER): Use AC_TEST_LINK, not + AC_TEST_PROGRAM. + +Fri May 6 00:45:29 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acspecific.m4, acgeneral.m4: Add dnl after AC_PROVIDE, + AC_REQUIRE, and AC_BEFORE calls. + Use AC_CHECKING and AC_TEST_LINK instead of AC_COMPILE_CHECK. + + * acgeneral.m4 (AC_TEST_LINK): New macro. + (AC_COMPILE_CHECK): Mark obsolete. Call AC_CHECKING and + AC_TEST_LINK. + (AC_PROGRAM_CHECK, AC_PROGRAM_PATH, AC_HAVE_LIBRARY, AC_HEADER_CHECK, + AC_FUNC_CHECK, AC_SIZEOF_TYPE): Print "checking" messages even if + using cached values. Use AC_TEST_LINK instead of AC_COMPILE_CHECK. + * acspecific.m4 (AC_PROG_INSTALL): Ditto. + + * acgeneral.m4 (AC_PROGRAM_CHECK, AC_PROGRAM_PATH): Fix nesting in + cache use. + + * acspecific.m4 (AC_PROG_INSTALL): Ditto. + + * acgeneral.m4 (AC_OUTPUT_CONFIG_SUBDIRS): Adjust relative cache + file paths before passing them to sub-configures. Omit existing + --cache-file arguments. + +Thu May 5 21:38:51 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acgeneral.m4 (AC_FUNC_CHECK, AC_HEADER_CHECK): Combine redundant + code. Use AC_CACHE_VAL. + (AC_SIZEOF_TYPE): Use AC_CACHE_VAL. + +Thu May 5 12:51:32 1994 David J. MacKenzie (djm@gamera.eng.umd.edu) + + * Makefile.in (all): Don't depend on info files. + (install): Don't install INSTALL. + (installcheck, install-info): New targets. + +Thu May 5 08:49:39 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * Makefile.in (dist): chmod the dist directory, not the current + directory. Don't depend on DISTFILES. + + * autoconf.sh: Go back to old way of doing NLS nuisance test. + * autoheader.sh: Ditto. + * acgeneral.m4: Ditto. + +Thu May 5 08:36:19 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acgeneral.m4: Use "yes" and "no" or "" uniformly for boolean + variables' values. Don't assume default values. + (AC_PROGRAM_CHECK, AC_PROGRAM_PATH): Always set the cache variable + and use different ones. + + * acspecific.m4: Use "yes" and "no" or "" uniformly for boolean + variables' values. Don't assume default values. + (AC_STDC_HEADERS, AC_ALLOCA): Untangle nested tests. + +Thu May 5 07:51:38 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * Makefile.in (distclean): Remove config.cache. + +Wed May 4 19:41:35 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_HAVE_LIBRARY): Use AC_CACHE_VAL. + + * Makefile.in (install): Depend on all again. + (install-info): Depend on info again. + +Wed May 4 15:05:11 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acspecific.m4 (AC_PROG_INSTALL): Use AC_CACHE_VAL. + * acgeneral.m4 (AC_PROGRAM_CHECK, AC_PROGRAM_PATH): Use AC_CACHE_VAL. + (AC_REPLACE_FUNCS): Use AC_FUNC_CHECK. + Rearrange general tests into 4 categories: + Checking for files - fundamental (caching) + Checking for files - derived (caching) + Checking for C features - fundamental (no caching) + Checking for C features - derived (caching) + + * acgeneral.m4 (AC_CACHE_LOAD, AC_CACHE_SAVE, AC_CACHE_VAL): + New macros. + (AC_PREPARE): Call AC_CACHE_LOAD. + (AC_OUTPUT): Call AC_CACHE_SAVE. + (AC_PARSEARGS): Add --cache-file=FILE option. + (AC_CONFIG_SUBDIRS): Pass --cache-file to subdirectory configures. + + * acgeneral.m4 (AC_OUTPUT_CONFIG_SUBDIRS): Renamed from + AC_CONFIG_SUBDIRS. + (AC_CONFIG_SUBDIRS): Just define AC_SUBDIR_LIST. + (AC_OUTPUT): Call AC_OUTPUT_CONFIG_SUBDIRS if AC_SUBDIR_LIST is + defined. + Make config.status --recheck pass --norecursion to configure. + + * acspecific.m4 (AC_SETVBUF_REVERSED): Print "checking" message. + +Wed May 4 10:40:56 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) + + * autoreconf.sh: Add options [--help] [--macrodir=dir] [--verbose] + [--version]. + + * acspecific.m4 (AC_GCC_TRADITIONAL, AC_SET_MAKE, AC_RSH, + AC_GETLOADAVG, AC_CROSS_CHECK): Print results verbosely. + (AC_GETLOADAVG): Name space cleanup. + +Wed May 4 09:32:04 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * autoheader.sh, autoconf.sh, acgeneral.m4: Make the NLS + nuisance test actually do something. + +Mon May 2 16:31:33 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * configure.in: Check for standards.texi. + * Makefile.in: Put everything back into one directory. + Don't assume standards.* exist. + +Sat Apr 30 09:37:06 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * acgeneral.m4 (AC_OUTPUT): Change >> to > in sed command. + +Fri Apr 29 21:56:33 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) + + * Makefile.in (all): Make autoreconf too. + +Fri Apr 29 21:03:48 1994 David J. MacKenzie (djm@aria.eng.umd.edu) + + * acgeneral.m4 (AC_OUTPUT): When doing substitutions on files, if + the file starts with "#!", put the "automatically generated" + comment on the second line instead of the first. + +Fri Apr 29 12:53:53 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) + + * acgeneral.m4 (AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT, + AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE, + AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS, + AC_CONFIG_SUBDIRS): New macros. + + * acspecific.m4 (AC_PROG_INSTALL): Use install.sh from ac_aux_dir. + + * Makefile.in: Remove references to standards.*. + Add autoreconf. + +Thu Apr 28 12:01:01 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) + + * Makefile.in (dist): Add .., ../etc, and ../texinfo files. + + * acspecific.m4 (AC_LN_S): Add verbose messages. + + * Makefile.in, configure.in: Add autoscan and its data files. + Check for perl. + + + ----- + + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free + Software Foundation, Inc. + + This program is free software: you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 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 + . diff --git a/ChangeLog.3 b/ChangeLog.3 new file mode 100644 index 0000000..bedcba3 --- /dev/null +++ b/ChangeLog.3 @@ -0,0 +1,23224 @@ +2012-01-15 Jim Meyering + + getopt: refine syntax of previous change + * lib/Autom4te/General.pm (getopt): Use a more concise test. + +2011-01-15 Stefano Lattarini + + getopt: remove hack for special handling of "-" argument + + Older versions of Getopt::Long acted bogusly and died when they + where configured with the 'bundling' flag and an argument '-' was + seen on the command line they were parsing. That is no longer + the case though, and has not been for quite a long time: the bug + is no longer present in the 5.6.2 version of perl and the 2.25 + version of Getopt::Long (and today, the latest versions of perl + and Getopt::Long are respectively 5.14.2 and 2.38). The obsolete + workaround for that Getopt::Long bug can thus be removed from our + 'getopt' function. + + It is also worth noting that such a workaround was quite buggy + and brittle itself; for example, a command like this: + "autom4te --output -" + would have caused the incorrect diagnostic: + "autom4te: option `--output' requires an argument" + Much worse, a command like this: + "autom4te --language=autoconf --output - configure.ac" + would have caused the standard input of autom4te to be processed + and copied into the 'configure.ac' file, deleting its pre-existing + content! Surely not what a user would have expected. + + After this change, a command like this: + autom4te --language=autoconf --output - - out + works as expected, processing the input from 'configure.ac' and + writing it to the 'out' file. + + * lib/Autom4te/General.pm (use): Require perl version 5.6.2. + (getopt): Remove the old workaround. + +2012-01-15 Jim Meyering + + avoid new warning about undefined $ARGV[0] + * lib/Autom4te/General.pm (getopt): Avoid warning induced by + yesterday's change: $ARGV[0] may not be defined, e.g., when + invoked via autoreconf. + +2011-01-14 Stefano Lattarini + + getopt: fix diagnostic for missing mandatory option argument + Before this change, an incorrect command line usage: + "autom4te --output" + triggered broken diagnostic like: + "autom4te: unrecognized option `--output'" + instead of the expected and correct: + "autom4te: option `--output' requires an argument" + * lib/Autom4te/General.pm (getopt): Give correct diagnostic in + case of usage errors due to missing arguments for options for + which they are mandatory. Code basically copied from automake's + 'parse_arguments' private subroutine. + +2012-01-05 Paul Eggert + + doc: mention Bash 2.03 bug with backslash-newline + * doc/autoconf.texi (Invoking the Shell): New section. + (Backslash-Newline-Empty): Rename from Backslash-Newline-Newline. + Mention problem with Bash 2.03. + + doc: clarify sed buffer limit + * doc/autoconf.texi (Limitations of Usual Tools): + That 4000-byte limit applies to output and internal buffers, too. + +2012-01-03 Paul Eggert + + maint: update copyright year + All files changed to add 2012, via 'make update-copyright'. + + maint: resync upstream files + * ChangeLog, GNUmakefile, build-aux/announce-gen: + * build-aux/config.guess, build-aux/config.sub, build-aux/gendocs.sh: + * build-aux/git-version-gen, build-aux/move-if-change: + * build-aux/texinfo.tex, build-aux/update-copyright: + * build-aux/vc-list-files, doc/fdl.texi, doc/gendocs_template: + * doc/standards.texi, lib/Autom4te/XFile.pm, m4/autobuild.m4: + Regenerated by 'make fetch'. + +2012-01-02 Paul Eggert + + autoconf: remove " -link" and ")" from xlf output + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): + Also remove " -link" and trailing ")" from xlf output. + Problem and fix reported by Thomas Jahns in + . + +2011-12-26 Stefano Lattarini + + configure: will re-execute with $CONFIG_SHELL, if it's set + * lib/m4sugar/general.m4 (_AS_DETECT_BETTER_SHELL): Define the macro + `_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to `yes', so that the code in + `_AS_DETECT_BETTER_SHELL' will cause autoconf-generated configure + scripts to always re-execute themselves with $CONFIG_SHELL, if it's + set in the environment. + * doc/autoconf.texi (config.status Invocation): Update. + * doc/install.texi (Defining Variables): Likewise. + * NEWS: Likewise. + * tests/m4sh.at: Add tests for the new semantics in ... + (Configure re-execs self with CONFIG_SHELL): ... this new + test group. + +2011-12-26 Stefano Lattarini + + m4sh: allow forced re-execution with $CONFIG_SHELL, if it's set + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): If the m4sh client + has defined the macro `_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to + "yes", emit code to always re-execute the current script with + $CONFIG_SHELL, if that's set. + * tests/m4sh.at: Add tests for the new and old semantics, in ... + (Re-exec with CONFIG_SHELL, Forced re-exec with CONFIG_SHELL): ... + these new test groups. + +2011-12-26 Stefano Lattarini + + m4sh: refactor _AS_DETECT_BETTER_SHELL, for future changes + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Move code to + handle the re-execution of the shell ... + (_AS_REEXEC_WITH_SHELL): ... in this new macro. + +2011-12-24 Stefano Lattarini + + docs: issue with shell functions and here-documents on Solaris + * doc/autoconf.texi (Here-Documents): Using a command substitution + in a here-documents being fed to a shell function is unportable. + Problem revealed by the automake testsuite: + + +2011-12-26 Paul Eggert + + AS_LN_S: fall back on 'cp -pR' (not 'cp -p') if 'ln -s' fails + This works better for symlinks to directories. + Problem reported by Eli Zaretskii via Werner Lemberg in + . + * NEWS: + * doc/autoconf.texi (Particular Programs): Document this. + * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Implement this. + +2011-12-07 Paul Eggert + + AC_LANG_BOOL_COMPILE_TRY(C): port to g++ with warnings + * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use the + array as well as setting it, to pacify g++. Reported by + Werner Lemberg in + . + +2011-12-05 Paul Eggert + + doc: document GNU make's \# + * doc/autoconf.texi (Comments in Make Macros): Also mention \# + in the right hand side of a macro, as an unportable usage. + +2011-11-11 Eric Blake + + doc: tweak previous commit + * doc/autoconf.texi (Limitations of Builtins) : Give + concrete example of offender, and drop redundant text. + Reported by Stefano Lattarini. + + doc: mention export portability hint + * doc/autoconf.texi (Limitations of Builtins) : Document + export limitation. + Suggested by Bruno Haible. + +2011-10-21 Stefano Lattarini + + fortran: define $GFC to "yes" if $FC is a GNU compiler + * lib/autoconf/fortran.m4 (AC_PROG_FC): Define `$GFC' to "yes" if + the detected fortran compiler is a GNU compiler, define it to the + empty string otherwise. + This is mostly for consistency for what is done for the C, C++ + and Fortran 77 compilers. + * doc/automake.texi: Update. + +2011-10-13 Eric Blake + + admin: mention recent copyright assignments + * AUTHORS: Update list. + +2011-10-06 Stefano Lattarini + + docs: we prefer US English spelling over British one + * doc/autoconf.texi (Parallel Make): Prefer `behavior' over + `behaviour' in a couple of places. + +2011-10-06 Stefano Lattarini + + docs: some fixlets in section about shell signal handling + * doc/autoconf.texi (Signal handling): Rename ... + (Signal Handling): ... to this, for consistency with other node + names. Fix some typos and grammaros. Add more URL references + in comments. + +2011-10-06 Stefano Lattarini + + docs: korn shells can have $? > 256 for signal-terminated children + Some Korn shells, when a child process dies due to signal number + n, can leave in $? an exit status of 256+n, instead of the more + common 128+n. See also Austin Group issue 0000051: + + * doc/autoconf.texi (Signal handling): Document the described Korn + Shell behaviour, and some of its possible shortcomings. + Suggestion by Eric Blake. + +2011-09-26 Eric Blake + + docs: relax documentation license by dropping cover text + * doc/autoconf.texi (copying): Drop front- and back-cover texts. + * NEWS: Document this. + Reported by Brian Gough. + +2011-09-13 Stefano Lattarini + + docs: signal-related bugs and incompatibilities for the shells + Motivated by recent discussion on the bug-autoconf list, as well + as work in the automake testsuite: + + + + * doc/autoconf.texi (Signal handling): New paragraph. + (@menu at "Portable Shell", @detailmenu): Update. + +2011-09-19 Eric Blake + + docs: refer to correct AC_RUN_IFELSE parameter name + * doc/autoconf.texi (Runtime) : Fix wording. + Reported by Reuben Thomas. + +2011-09-16 Eric Blake + + docs: fix typo in shell example + * doc/autoconf.texi (Shell Substitutions): Fix typo. + * THANKS: Update. + Reported by Nick Bowler. + +2011-09-14 Stefano Lattarini + + docs: more details about make VPATH rewriting woes + * doc/autoconf.texi (Automatic Rule Rewriting): Solaris make + VPATH rewriting applies to any whitespace-separated word in a + rule, so it might apply also to shell variables, functions + and keywords (and automake has already tripped on this once); + document this, with an example. Since we are at it, do some + minor reformatting of existing text. + +2011-09-13 Stefano Lattarini + + docs: document Solaris 10 /bin/ksh and XPG4 sh 'unset' bug + * doc/autoconf.texi (Limitations of Builtins): Solaris 10 ksh + and XPG4 sh also fails upon `unset' of a variable that is not + set. + +2011-07-24 Jim Meyering + + docs: improve the prose describing _AC_CHECK_TYPE_NEW_BODY + * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW_BODY): Improve prose. + +2011-08-31 Paul Eggert + + AC_C_CONST: don't reject gcc -Werror -Wall + * lib/autoconf/c.m4 (AC_C_CONST): Don't reject gcc when it is used + with -Werror -Wall during configuring. It's unwise to use GCC + that way, but apparently enough people do it nowadays that it's an + issue. These days nobody uses the old compilers that the old + tests reject, so we can't test this fix against them, but it's + more important to work with modern GCC (even when misused) than to + work with no-longer-used compilers. Problem reported by Shevek in + + and raised again by Dan Kegel in + . + +2011-08-16 Stefano Lattarini + + docs: other issues with parallel BSD make + Motivated by automake bug#9245: + + and FreeBSD PR bin/159730: + + * doc/autoconf.texi (Parallel Make): Document other BSD make + incompatibilities. Reorganize the existing related documentation + accordingly. + +2011-08-08 Stefano Lattarini + + docs: fix minor typos + * doc/autoconf.texi (Shell Functions): Fix a couple of minor typos. + +2011-08-04 Stefano Lattarini + + docs: another Solaris sh bug with redirected `:' + * doc/autoconf.texi (File Descriptors): Solaris 10 /bin/sh + "optimizes" away redirected `:' commands in a shell function + after the first call. + +2011-07-31 Paul Eggert + + docs: modernize treatment of ns-resolution timestamps + * doc/autoconf.texi (Limitations of Usual Tools): ns-resolution time + stamps are now routinely supported by coreutils 'cp' etc. + +2011-07-30 Paul Eggert + + * lib/autoconf/specific.m4 (AC_SYS_LARGEFILE): Port to Mac OS X 10.5 + by defining _DARWIN_USE_64_BIT_INODE. Imported from gnulib. + +2011-07-22 Paul Eggert + + * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Quote cleanly. + This is imported from gnulib. gnulib also has an HP-UX 11.11 fix, but + let's see if we can do that another way, as it's pretty heavyweight. + +2011-07-22 Eric Blake + + docs: fix minor doc problems + * doc/autoconf.texi (Why Not Imake): Fix grammar. + (autoreconf Invocation): Fix short option for --version. + * THANKS: Update. + Reported by Christophe Jarry and Russ Allbery. + +2011-07-12 Benoit Sigoure (tiny change) + + docs: fix typo in AC_PATH_PROG + * doc/autoconf.texi (Erlang Compiler and Interpreter): + s/AC_PROG_PATH/AC_PATH_PROG/. + * THANKS: Update. + +2011-06-30 Paul Eggert + + * tests/semantics.at (AC_REPLACE_FUNCS): Test for just-fixed bug. + +2011-06-30 Timo Kamph (trivial change) + + * lib/autoconf/functions.m4 (_AC_REPLACE_FUNCS): Fix tr-cpp problem. + See http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00058.html + +2011-06-19 Paul Eggert + + * lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA): Be even smarter. + GCC was too smart for the previous patch. See + . + +2011-06-18 Paul Eggert + + * lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA): Try to outsmart GCC. + Problem with stack-detection code reported by Andy Wingo in + . + This fix is imported from gnulib's c-stack module. + + * doc/autoconf.texi (File Descriptors): Fix texinfo typo. + +2011-06-14 Eric Blake + + doc: mention more about ksh cloexec behavior + * doc/autoconf.texi (File Descriptors): Clarify that only the exec + builtin suffers from cloexec issues. + + doc: update quoting example + * doc/autoconf.texi (Autoconf Language): Add AC_LANG_SOURCE use. + * THANKS: Update. + Reported by Křištof Želechovski. + +2011-05-05 Eric Blake + + doc: document dash bug with positional parameters + * doc/autoconf.texi (Shell Substitutions) <${10}>: Document + a pitfall with $10. + +2011-04-27 Eric Blake + + docs: document NetBSD join bug + * doc/autoconf.texi (Limitations of Usual Tools) : Mention + bug in -a parsing. + Reported by J.T. Conklin. + +2011-04-13 Eric Blake + + maint: reflect recent copyright assignments + * AUTHORS: Update. + +2011-04-05 Eric Blake + + maint: reflect recent copyright assignments + * AUTHORS: Update. + +2011-04-02 Ralf Wildenhues + + New macro AC_FC_PP_DEFINE for the preprocessor define flag. + * lib/autoconf/fortran.m4 (AC_FC_PP_DEFINE): New macro. + * lib/autom4te.in (Automake-preselections): Preselect it. + * doc/autoconf.texi (Fortran Compiler): Document it. + * tests/local.at (_AT_CHECK_ENV): Do not complain about + FCFLAGS_F nor FC_DEFINE. + * NEWS: Update. + + New macro AC_FC_PP_SRCEXT for preprocessed file extensions. + * lib/autoconf/fortran.m4 (AC_FC_PP_SRCEXT): New macro. + * lib/autom4te.in (Automake-preselections): Preselect it. + * doc/autoconf.texi (Fortran Compiler): Document it, rewriting + the documentation for AC_FC_SRCEXT along the way. + * tests/fortran.at (AC_FC_PP_SRCEXT usage): New test. + * tests/mktests.sh: Exclude the macro from default testing. + * NEWS: Update. + + New macro AC_FC_MODULE_OUTPUT_FLAG: module output directory. + * lib/autoconf/fortran.m4 (AC_FC_MODULE_OUTPUT_FLAG): New macro. + * doc/autoconf.texi (Fortran Compiler): Document it. + * tests/local.at (_AT_CHECK_ENV): Do not complain about + FC_MODOUT. + * NEWS: Update. + +2011-04-02 Luc Maisonobe + Julian C. Cummings + Alexander Pletzer + Ralf Wildenhues + + New macro AC_FC_MODULE_FLAG: Fortran 90 module include path. + * lib/autoconf/fortran.m4 (AC_FC_MODULE_FLAG): New macro, + adjusted and rewritten from the AX_F90_MODULE_FLAG macro from + the Autoconf Macro Archive by Luc Maisonobe, Julian C. Cummings, + and Alexander Pletzer. + * doc/autoconf.texi (Fortran Compiler): Document it. + * tests/fortran.at (AC_FC_MODULE_FLAG): New test. + * tests/local.at (AT_CHECK_ENV): Do not complain about FC_MODINC + setting. + * NEWS, THANKS: Update. + +2011-04-02 Luc Maisonobe + Alexander Pletzer + Ralf Wildenhues + + New macro AC_FC_MODULE_EXTENSION: Fortran 90 module extension. + * lib/autoconf/fortran.m4 (AC_FC_MODULE_EXTENSION): New macro, + rewritten from the AX_F90_MODULE_EXTENSION macro from the + Autoconf Macro Archive by Luc Maisonobe and Alexander Pletzer. + * doc/autoconf.texi (Fortran Compiler): Document it. + * tests/local.at (_AT_CHECK_ENV): Do not complain about + FC_MODEXT setting. + * NEWS, THANKS: Update. + +2011-03-26 Jim Meyering + + README-hacking: fix typo + * README-hacking: s/just build/just built/. + +2011-03-08 Colin Watson (tiny change) + Ralf Wildenhues + + * doc/autoconf.texi (Particular Functions): Document AC_FUNC_FORK + cache variables. + * THANKS: Update. + +2011-03-08 Ralf Wildenhues + + docs: BSD and Solaris make trailing space macro issue. + * doc/autoconf.texi (Trailing whitespace in Make Macros): + Document issue with trailing whitespace in macro settings. + +2011-03-05 Ralf Wildenhues + + Fix Cray Fortran flag for AC_FC_IMPLICIT_NONE. + * lib/autoconf/fortran.m4 (_AC_FC_IMPLICIT_NONE): Use -e I + not -d i, for Cray ftn. + * THANKS: Update. + Thanks to Tobias Burnus for feedback and testing. + + docs: document several Fortran and OpenMP cache variables. + * doc/autoconf.texi (Generic Compiler Characteristics) + [AC_OPENMP]: Document associated cache variables. + (Fortran Compiler) [AC_PROG_F77, AC_PROG_FC, AC_PROG_F77_C_O] + [AC_PROG_FC_C_O, AC_F77_LIBRARY_LDFLAGS, AC_FC_LIBRARY_LDFLAGS] + [AC_F77_DUMMY_MAIN, AC_FC_DUMMY_MAIN, AC_F77_MAIN, AC_FC_MAIN] + [AC_F77_WRAPPERS, AC_FC_WRAPPERS, AC_FC_FREEFORM] + [AC_FC_FIXEDFORM, AC_FC_LINE_LENGTH, AC_FC_CHECK_BOUNDS] + [AC_F77_IMPLICIT_NONE, AC_FC_IMPLICIT_NONE]: Document and/or + index the cache variables used by these macros. + +2011-03-05 Ralf Wildenhues + and Eric Blake + + build: exclude M4 with buggy strstr + * m4/m4.m4 (AC_PROG_GNU_M4): When searching PATH, do not accept + an m4 that has either the gnulib strstr bug, or the glibc/gnulib + strstr bug. + +2011-03-05 Ralf Wildenhues + + docs: fix description of AC_F77_IMPLICIT_NONE. + * doc/autoconf.texi (Fortran Compiler) [AC_F77_IMPLICIT_NONE]: + This macro modifies FFLAGS, not FCFLAGS. + + AC_FC_SRCEXT: allow gfortran to compile .f77 files. + * lib/autoconf/fortran.m4 (AC_FC_SRCEXT): Try '-x f77' for .f77 + files, '-x f95' for others, for gfortran. + + New macros AC_{F77,FC}_IMPLICIT_NONE to disable Fortran implicit int. + * lib/autoconf/fortran.m4 (_AC_FC_IMPLICIT_NONE): New internal + macro. + (AC_F77_IMPLICIT_NONE, AC_FC_IMPLICIT_NONE): New macros. + * doc/autoconf.texi (Fortran Compiler): Document them. + * NEWS: Update. + + New macro AC_FC_CHECK_BOUNDS to enable Fortran array bounds checking. + * lib/autoconf/fortran.m4 (AC_FC_CHECK_BOUNDS): New macro. + * doc/autoconf.texi (Fortran Compiler): Document it. + * tests/fortran.at (AC_FC_CHECK_BOUNDS): New test. + * NEWS: Update. + Prompted by report from Eve-Marie Devaliere. + +2011-03-04 Ralf Wildenhues + + Update known compiler switches for Fortran and OpenMP macros. + * lib/autoconf/c.m4 (AC_OPENMP): Update for Lahey on GNU/Linux. + * lib/autoconf/fortran.m4 (_AC_F95_FC): Also try nagfor. + (_AC_PROG_FC_V): Update documentation for Lahey switches. + (AC_FC_FREEFORM, AC_FC_FIXEDFORM): Add flags for Absoft, Lahey + on GNU/Linux, document NAGWare, g95, and f2c switches. + (AC_FC_LINE_LENGTH): Document NAGware switch. Update Absoft, + Lahey, NAGWare, Open Watcom, g95, and f2c switches. + + tests: accept f2c/fort77 as GNU Fortran 77. + * tests/fortran.at (GNU Fortran 77): Try to detect f2c wrapper + fort77 as GNU as well: it defines __GNUC__ too. Fixes testsuite + failure when f77 is fort77. + Report from Giulio Paci. + + docs: macro synopses document default failure cases. + * doc/autoconf.texi (Fortran Compiler, Obsolete Macros): + Document failure case for AC_F77_DUMMY_MAIN, AC_FC_DUMMY_MAIN, + AC_FC_SRCEXT, AC_FC_FREEFORM, AC_FC_FIXEDFORM, + AC_FC_LINE_LENGTH, and AC_TRY_RUN macros. + + Reword Fortran macro documentation. + * doc/autoconf.texi (Fortran Compiler): Improve wording for + AC_FC_FREEFORM, AC_FC_FIXEDFORM, and AC_FC_LINE_LENGTH macros. + +2011-02-27 Ralf Wildenhues + + config.status: do not quote $SHELL when rerunning configure. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Allow + $SHELL to contain more than one word, when rerunning configure, + for debugging purposes like CONFIG_SHELL='/bin/sh -x'. + +2011-02-21 Ian Lance Taylor + + * lib/autoconf/go.m4: New file. + * lib/autoconf/autoconf.m4: Include autoconf/go.m4. + * lib/autoconf/Makefile.am (dist_autoconflib_DATA): Add go.m4. + * lib/freeze.mk (autoconf_m4f_dependencies): Add + $(src_libdir)/autoconf/go.m4. + * doc/autoconf.texi: Rebuild menus. + (Preset Output Variables): Mention Go. Document GOFLAGS. + (Libraries): Mention Go. + (Go Compiler): New subsection. + (Language Choice): Mention Go. + (Generating Sources): Likewise. + (Running the Preprocessor): Likewise. + * tests/go.at: New file. + * tests/suite.at: Include go.at and acgo.at. + * tests/local.at (_AT_CHECK_ENV): Add GOC and GOFLAGS. + * tests/Makefile.am (TESTSUITE_GENERATED_AT): Add + $(srcdir)/acgo.at. + (TESTSUITE_HAND_AT): Add go.at. + (AUTOCONF_FILES): Add $(autoconfdir)/go.m4. + * NEWS: Update. + +2011-02-20 Christian Rössel (tiny change) + Markus Geimer (tiny change) + + Fix OpenMP flag detection for various Fortran compilers. + * lib/autoconf/c.m4 (_AC_LANG_OPENMP(Fortran 77)): Use '!$' + OpenMP-conditional compilation construct, to force compile + failure with missing OpenMP flag. + (AC_OPENMP): Add flags for Cray CCE and NEC SX compilers. + * THANKS: Update. + +2011-02-18 Eric Blake + + docs: document fourth argument of AC_RUN_IFELSE better + * doc/autoconf.texi (Runtime) : Make synopsis show + that the default is configure failure. Rework the text about + proper use of the fourth argument. + + long long: don't abort configure when cross-compiling + * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Provide no-op + cross-compiling fallback; fixing regression from 2011-02-16. + +2011-02-16 Patrick Welche (tiny change) + + docs: fix a typo + * doc/autoconf.texi (Generic Structures): Fix typo. + +2011-02-16 Matt Kraai (tiny change) + + docs: fix some typos + * doc/autoconf.texi (testsuite Scripts): Fix typos. + * THANKS: Update. + +2011-02-16 Paul Eggert + + autoconf: tune long long tests, particularly for c99 + + This change is imported from gnulib. + * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Don't bother compiling + or running anything if c99, or if unsigned long long int does not + work. In either case, we know the answer without further tests. + Do not compile _AC_TYPE_LONG_LONG_SNIPPET twice. Instead, compile + it at most once, and use its results for both long long int and + unsigned long long int. This is more likely to be efficient in + the common case where the program wants to check for both long + long int and unsigned long long int. + (AC_TYPE_UNSIGNED_LONG_LONG_INT): Don't bother compiling if c99, + since the answer is already known. + +2011-02-15 Eric Blake + + doc: fix debug advice typo + * doc/autoconf.texi (Debugging): Put shell option in right place. + Reported by Reuben Thomas. + +2011-02-12 Giulio Paci (tiny change) + Ralf Wildenhues + + Fix detection of link flags for fort77 on GNU/Linux. + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Properly detect + the fort77 (f2c wrapper) compiler verbose linking output flag. + Fixes also AC_F77_LIBRARY_LDFLAGS and AC_F77_DUMMY_MAIN. + * THANKS: Update. + +2011-02-07 Ralf Wildenhues + + * doc/autoconf.texi: Rebuild menus using emacs ^C ^U ^A. + +2011-02-04 Paul Eggert + + autoconf: new macro AC_HEADER_CHECK_STDBOOL + * NEWS: Document this. + * doc/autoconf.texi (Particular Headers): Likewise. + In example, don't assume a 'system.h' exists. + * lib/autoconf/headers.m4 (AC_CHECK_HEADER_STDBOOL): New macro. + Use it with AN_IDENTIFIER, since it's less heavyweight. + Reindent to match gnulib, since that's a bit nicer. + (AC_HEADER_STDBOOL): Reimplement in terms of it. + +2011-01-29 Jim Warhol (tiny change) + + * doc/autoconf.texi (Introduction): Fix typo. + * THANKS: Update. + +2011-01-27 Stefano Lattarini + + docs: another parallel make issue + * doc/autoconf.texi (Parallel Make): Document that some make + implementations, when run in parallel mode, connect stdout and + stderr of child processes to pipes or temporary files, and might + re-route stderr of spawned processes to stout. Also document + that FreeBSD make in parallel mode reuses the same shell for + multiple commands within one recipe (like NetBSD make does). + +2011-01-25 Ralf Wildenhues + Eric Blake + + docs: advise against HP-UX make due to time stamp semantics. + * doc/autoconf.texi (Timestamps and Make): Document HP-UX 11.31 + make issue with targets having the same time stamps as their + prerequisites. + * doc/install.texi (Particular Systems): Warn against using + HP-UX make. + +2011-01-25 Eric Blake + + maint: reflect recent copyright assignments + * AUTHORS: Update. + +2011-01-23 Ralf Wildenhues + + docs: new section about whitespace trimmed from make command-lines. + * doc/autoconf.texi (Command-line Macros and whitespace): New + section, document trimming of whitespace from macros set on the + command line and from the environment. + +2011-01-22 Ralf Wildenhues + + docs: document how to use comment characters in rules. + * doc/autoconf.texi (Comments in Make Rules): Explain how to + produce a `#' in a rule. + (Comments in Make Macros): Add cross reference. + Suggestion from Eric Blake. + + docs: new sections about comments and whitespace in make macros. + * doc/autoconf.texi (Top, Portable Make): Adjust menus. + (Comments in Make Macros, Trailing whitespace in Make Macros): + New sections. + Suggestion by Stefano Lattarini. + + docs: do not use AIX 5.3 cp -R. + * doc/autoconf.texi (Limitations of Usual Tools): Document one + instance of the cp -R bug on AIX 5.3. This seems to have been + fixed in 6.1 and newer releases. + + docs: update entry about unset. + * doc/autoconf.texi (Limitations of Builtins): NetBSD sh unset + also fails upon `unset' of a variable that is not set. Bash 2.01 + could also dump core over `unset MAILPATH'. + Suggestion by Eric Blake. + +2011-01-21 Ralf Wildenhues + + Fix LEXLIB and YYTEXT_POINTER with IRIX 6.5 flex 2.5.4. + * lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): + Overquote nontrivial yyless argument, to compensate for + underquoted macro definition in IRIX 6.5 flex 2.5.4 + leading to compile failure due to incompatible operands. + Fixes Automake silent-lex-generic.test failure. + +2011-01-17 Ralf Wildenhues + + docs: Tru64/OSF sh treats read as special builtin + * doc/autoconf.texi (Limitations of Builtins): read may exit + upon unreadable or non-existent file with Tru64/OSF 5.1 sh. + +2011-01-12 Eric Blake + + docs: fix description of m4_ifval + * doc/autoconf.texi (Conditional constructs) : Use + correct argument order. + * THANKS: Update. + Reported by Mostafa. + +2011-01-10 Ralf Wildenhues + + Avoid reference to $CYGWIN in Fortran macros. + * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Require + AC_CANONICAL_HOST. Replace test for $CYGWIN with $host_s test. + * tests/fortran.at (AC_F77_DUMMY_MAIN usage) + (AC_FC_DUMMY_MAIN usage, AC_F77_MAIN usage, AC_FC_MAIN usage): + Use AT_CONFIGURE_AC and simplify accordingly, so auxiliary + scripts are copied into the test directories. + (AC_F77_FUNC usage, AC_FC_FUNC usage): Likewise. Adjust to + autoheader being used now. + + docs: link to Gnulib configmake documentation. + * doc/autoconf.texi (Defining Directories): Use proper crossref, + now that the Gnulib manual has a configmake section. + Thanks to Karl Berry. + +2011-01-09 Ralf Wildenhues + + docs: link to 'set -e' shell behavior overview. + * doc/autoconf.texi (Limitations of Builtins): Add link to + Sven Mascheck's 'set -e' page. Replace broken Opengroup link. + Suggestion by Eric Blake. + + docs: mention configmake module for defining directories. + * doc/autoconf.texi (Defining Directories): Mention configmake + gnulib module. + Suggestion by Karl Berry and Eric Blake. + +2011-01-04 Eric Blake + + doc: improve install.texi texinfo markup + * doc/install.texi: Don't force @firstparagraphindent on all + clients; instead, add it only when building INSTALL. Compress + copyright. + * Makefile.am (INSTALL): Match gnulib's formatting. + Reported by Karl Berry. + + maint: update copyright year + All files changed to add 2011, via 'make update-copyright'. + + maint: resync upstream files + * GNUmakefile: Regenerated by 'make fetch'. + * build-aux/config.guess: Likewise. + * build-aux/config.sub: Likewise. + * build-aux/gendocs.sh: Likewise. + * build-aux/git-version-gen: Likewise. + * build-aux/texinfo.tex: Likewise. + * doc/make-stds.texi: Likewise. + * lib/Autom4te/Channels.pm: Likewise. + * lib/Autom4te/Configure_ac.pm: Likewise. + * lib/Autom4te/FileUtils.pm: Likewise. + * lib/Autom4te/Struct.pm: Likewise. + * lib/Autom4te/XFile.pm: Likewise. + + maint: document use of copyright ranges + * README: Copy coreutils wording for allowing copyright year + ranges. + * cfg.mk (UPDATE_COPYRIGHT_USE_INTERVALS): Now that GNU Coding + Standards permit it, prefer shorthand copyright. + * .x-update-copyright: Exempt an imported file. + +2011-01-03 Karl Berry + + Avoid using @acronym in install.texi. + * doc/install.texi (Basic Installation, Multiple Architectures) + (Installation Names): Write `GNU' instead of `@acronym{GNU}'. + +2010-12-27 Paul Eggert + + autoconf: Use -D_STDC_C99=, not -xc99=all, with Solaris cc + * lib/autoconf/c.m4 (_AC_PROG_CC_C99): Use -D_STDC_C99= rather than + -xc99=all to convince Solaris Studio cc to compile c99 programs. + +2010-11-26 Paul Eggert + + autotest: fix file descriptor leak + * lib/autotest/general.m4 (_AT_CHECK): Close AS_MESSAGE_LOG_FD + when running the test. Problem reported by Luke Mewburn in + . + +2010-11-20 Paul Eggert + + autoconf: don't assume sys/stat.h and sys/types.h when testing C89 + Problem reported by Patrick Pelissier in + . + * lib/autoconf/c.m4 (_AC_PROG_CC_C89): Don't include sys/types.h + and sys/stat.h. Instead, define a dummy struct stat. C89 doesn't + guarantee sys/types.h and sys/stat.h. + +2010-11-10 Reuben Thomas (tiny change) + + docs: avoid first person, and credit history to David MacKenzie + * doc/autoconf.texi (History): Add credit. + +2010-10-26 Paul Eggert + + docs: Posix now says "((cat))" isn't portable + * doc/autoconf.texi (Parenthesis): Update documentation to reflect + what Posix 1003.1-2008 says about "((". + +2010-10-20 Eric Blake + + docs: document dash bug in <> + * doc/autoconf.texi (File Descriptors): Dash 0.5.5 truncates on + <>; at least this was fixed in dash 0.5.6. + +2010-10-12 Ralf Wildenhues + + tests: avoid AC_CACHE_CHECK test failure with dash. + * tests/base.at (AC_CACHE_CHECK): Normalize configure exit + status in presence of syntax error in sourced site file. + Do not error out if configure is aborted at this point. + Fixes testsuite failure with dash 0.5.5.1. + +2010-10-08 Eric Blake + + AS_LITERAL_IF: Treat raw = as literal again. + * lib/m4sugar/m4sh.m4 (_AS_LITERAL_IF): Treat = like +. + * tests/m4sh.at (AS@&t@_TR_SH and AS@&t@_TR_CPP) + (AS@&t@_LITERAL_IF): Expand tests. + * NEWS: Document the fix. + Reported via Ben Pfaff; originally http://bugs.debian.org/593838 + +2010-09-24 Joshua G. Hale (tiny change) + + docs: fix typo in AC_CONFIG_FILES example code. + * doc/autoconf.texi (Configuration Actions): Fix typo. + * THANKS: Update. + +2010-10-05 Eric Blake + + doc: suggest a few more workarounds + * doc/autoconf.texi (Limitations of Usual Tools) : Mention + that 'redundant' brackets can work around Solaris bug. + (File Descriptors): Mention that {} works as well as () for + silencing file-not-found warnings. + * THANKS: Update. + Suggested by Pádraig Brady. + +2010-09-24 Ralf Wildenhues + + tests: normalize trailing spaces in gcc -E -dD output. + * tests/compile.at (AC_LANG_SOURCE example) + (AC_LANG_PROGRAM example): Remove trailing spaces before + comparing with expected output. Fixes testsuite failure + with GCC 2.95.3 on Haiku. + Report by Scott McCreary. + +2010-09-22 Eric Blake + + Release Version 2.68. + * NEWS: Mention the release. + +2010-09-22 Ralf Wildenhues + + autom4te: add traces for likely future Automake macros + * lib/autom4te.in (Automake-preselections): Trace + AM_MAKEFILE_INCLUDE, AM_NLS, AM_POT_TOOLS, AM_PATH_GUILE, + AM_PROG_MOC, AM_XGETTEXT_OPTION, _AM_MAKEFILE_INCLUDE. + +2010-09-22 Eric Blake + + AC_REPLACE_FUNCS: allow split lines again + * lib/autoconf/functions.m4 (AC_REPLACE_FUNCS): Flatten newlines + and move guts... + (_AC_REPLACE_FUNCS): ...to new helper. + * tests/semantics.at (AC_REPLACE_FUNCS): Enhance test. + Reported by Ralf Wildenhues. + +2010-09-21 Eric Blake + + AC_LIBOBJ: optimize internal use + * lib/autoconf/general.m4 (_AC_LIBOBJ): Move literal check... + (AC_LIBOBJ): ...into callers. + * lib/autoconf/functions.m4 (_AC_REPLACE_FUNC): Likewise, thus + avoiding a second call to AS_LITERAL_IF. + + AC_REPLACE_FUNCS: restore shell loop for non-literal + * lib/autoconf/functions.m4 (AC_REPLACE_FUNCS): Handle + non-literals, which was lost in 2010-02-26 optimization. + * tests/semantics.at (AC_REPLACE_FUNCS): Enhance test. + * NEWS: Document the fix. + * THANKS: Update. + Reported by Wiseman Jun. + + maint: resync upstream files + * build-aux/gendocs.sh: Resync via 'make fetch'. + + tests: XFAIL in the face of a MacOS X bug + * doc/autoconf.texi (Limitations of Usual Tools) : Mention + the issue. + * tests/torture.at (Substitute and define special characters): + Detect if sed cannot process 8-bit bytes in the C locale. + * THANKS: Update. + Reported by Rochan. + +2010-09-20 Eric Blake + + autom4te: don't filter out portions of location traces + * bin/autom4te.in (_m4_warn): Pass warnings through the channels + machinery as a single chunk, to avoid partial filtering. + * lib/m4sugar/m4sugar.m4 (_m4_warn): Document the conventions. + * tests/m4sugar.at (m4@&t@_warn): Enhance test to catch this. + Reported by Bruno Haible. + +2010-09-17 Eric Blake + + build: support autobuild + * cfg.mk (gnulib-update): Add autobuild.m4. + * configure.ac (AB_INIT): Output autobuild header. + * m4/autobuild.m4: New file, from gnulib. + * build-aux/config.guess: Resync from upstream. + * build-aux/config.sub: Likewise. + * build-aux/texinfo.tex: Likewise. + * doc/fdl.texi: Likewise. + * doc/gnu-oids.texi: Likewise. + * doc/make-stds.texi: Likewise. + * doc/standards.texi: Likewise. + * build-aux/gendocs.sh: Likewise. + + config.status: avoid corrupting $ac_t + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): Use a + different name, so as not to clash with pre-2.50 usage of "$ac_t" + as a tab character. + Reported by Sam Steingold. + +2010-09-17 Bruno Haible + + docs: mark several macros obsolete + * doc/autoconf.texi (Particular Functions): Mark AC_FUNC_ERROR_AT_LINE, + AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, AC_FUNC_MKTIME, AC_FUNC_STRTOD + as obsolete and refer to Gnulib. + * NEWS: Mention the change. + + AC_FUNC_STRNLEN: more realistic cross-compilation guess + * lib/autoconf/functions.m4 (AC_FUNC_STRNLEN): Require + AC_CANONICAL_HOST. When cross-compiling, guess it works everywhere + except on AIX. + +2010-09-16 Eric Blake + + m4sh: fix today's AS_BOX regression + * lib/m4sugar/m4sh.m4 (_AS_BOX_LITERAL): Fix underquotation. + Reported by Stefano Lattarini. + + fortran: avoid misparsed FCLIBS from Fortran compiler + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Also skip + 'Configured by:' lines from gfortran. + * NEWS: Mention it. + Reported by Stefano Lattarini. + +2010-09-16 Ralf Wildenhues + + Add autom4te trace for AM_PROG_AR. + * lib/autom4te.in (Automake-preselections): Trace + AM_PROG_AR. + +2010-09-16 Eric Blake + + m4sugar: fix regression in AC_MSG_ERROR expansion + * lib/m4sugar/m4sugar.m4 (m4_defun_init): Avoid macro + concatenation on subsequent expansions + * tests/m4sh.at (AS_WARN and AS_ERROR): New test. + * tests/m4sugar.at (m4@&t@_require: one-shot initialization): + Enhance test. + * NEWS: Document the fix. + * THANKS: Update. + Reported by Adrian Bunk and and Nishio Futoshi. + +2010-09-13 Stefano Lattarini + + tests: simplify grepping of 'automake --version'. + * tests/tools.at (autom4te preselections): Remove minor + redundancies in regular expressions used to grep the output + 'automake --version' for test skipping. + * tests/torture.at (Configuring subdirectories) + (Unusual Automake input files): Likewise. + +2010-09-13 Eric Blake + + autotest: work around zsh bug + * lib/autotest/general.m4 (AT_DATA): Special case an empty data + file, since zsh botches empty here-docs. + * doc/autoconf.texi (Writing Testsuites) : Document that + this allows empty contents. + * tests/autotest.at (AT_DATA): New test. + Reported by Ralf Wildenhues. + + docs: mention gnulib portability docs + * doc/autoconf.texi (Function Portability, Header Portability): + Add external links to gnulib. + +2010-09-13 Ralf Wildenhues + Gary V. Vaughan + + docs: document zsh specialty with empty here-documents. + * doc/autoconf.texi (Here-Documents): zsh 4.3.10 adds a newline + to empty here-docs. + +2010-09-13 Ralf Wildenhues + + docs: document zsh special array $options. + * doc/autoconf.texi (Special Shell Variables): Add entry for + `options'. + + doc: minor updates. + * doc/autoconf.texi (Generic Compiler Characteristics): Use + second argument of @uref consistently, for nicer OpenMP link. + (Polymorphic Variables): Restore font-lock. + (Debugging): Add item for bashdb. + + Document and test AT_CHECK args shell execution environment. + * doc/autoconf.texi (Writing Testsuites): Document that COMMANDS + is run in a subshell, but RUN-IF-FAIL and RUN-IF-PASS are not. + * tests/autotest.at (AT@&t@_CHECK execution environment): New + test. + * NEWS: Update. + + autotest: document and test at_status semantics. + * doc/autoconf.texi (Writing Testsuites): Document $at_status. + * tests/autotest.at (at_status): New test. + * NEWS: Update. + + doc: index entries for non-environment, non-output variables. + * doc/autoconf.texi: Clarify the meaning of the various variable + indices. Merge variable index `vr' into concept index using + syncodeindex. + (Configuration Actions, Generic Programs, Generic Functions) + (Writing Testsuites): Add index entries for documented shell + variables used during in configure and testsuite scripts. + +2010-09-12 Fernando Carrijo (tiny change) + + docs: fix minor typo and 'See See foo' instances + * doc/autoconf.texi (Buffer Overruns and Subscript Errors): Fix + usage of TeX superscript notation to correctly represent number + exponent. + (Shell Functions): s/[Ss]ee @xref/@xref/ + (Limitations of Shell Builtins, Canonicalizing): Likewise. + * THANKS: Update. + +2010-09-13 Eric Blake + + tests: skip broken automake wrapper on MirBSD + * tests/tools.at (autom4te preselections): Skip, rather than fail, + if 'automake --version' succeeds without printing a version when + an environment variable is not set. + * tests/torture.at (Configuring subdirectories) + (Unusual Automake input files): Likewise. + +2010-09-12 Ralf Wildenhues + + doc: minor indexing update. + (Shell Substitutions, Site Defaults): Fix markup for indexed + entried, using @code and @file as appropriate. + (M4 Macro Index): Clarify which of the indexed macros have m4_ + and which have AS_ prefix. + +2010-09-08 Eric Blake + + m4sh: preserve set -vx over re-exec + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Trace through + re-exec, to make it easier to debug script startup issues. + Idea from recent bug-gnulib change to init.sh. + + docs: update alloca recommendations + * doc/autoconf.texi (Particular Functions): Don't redeclare alloca + on FreeBSD. + * THANKS: Update. + Reported by Giorgos Keramidas. + + docs: link to GNU Coding Standards in intro + * doc/autoconf.texi (Introduction): Actually link to the + standards. Make other references consistent. + + docs: mention traditional awk limitation + * doc/autoconf.texi (Limitations of Usual Tools) : Mention + that traditional awk lacks ENVIRON. Add reference to awk manual. + (Particular Programs) : Add reference to awk section. + Reported by Ralf Wildenhues. + +2010-09-07 Eric Blake + + docs: mention bash vs. POSIXLY_CORRECT + * doc/autoconf.texi (Special Shell Variables) : + Document bash behavior. + * THANKS: Update. + Reported by Dustin J. Mitchell, via bug-gnulib list. + + docs: enhance recommendations on test usage + * doc/autoconf.texi (Limitations of Builtins) : + Mention yet another Solaris issue. + Reported by Stefano Lattarini. + +2010-08-30 Eric Blake + + tests: avoid trashing / + * tests/torture.at (AC_CONFIG_COMMANDS with temporary directory): + Use a relative path, rather than risking issues with /. + Reported by Ralf Wildenhues. + + docs: mention Solaris here-docs vs. ${a-"b c"} + * doc/autoconf.texi (Shell Substitutions) <${var:=value}>: + Document problem of "" within here-docs. + Reported by Ralf Wildenhues. + + fortran: always avoid AC_LANG_CONFTEST warning + * lib/autoconf/lang.m4 (AC_LANG_CONFTEST()): Make the default + match the fact that the default AC_LANG_SOURCE does not inline + confdefs.h in the first place. + * lib/autoconf/fortran.m4 (AC_FC_FREEFORM, AC_FC_FIXEDFORM) + (AC_FC_LINE_LENGTH, __AC_FC_NAME_MANGLING): Revert previous use of + AC_LANG_DEFINES_PROVIDED. + Suggested by Ralf Wildenhues. + + config.status: minimize use of $tmp + * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP) + (_AC_OUTPUT_FILES_PREPARE, _AC_OUTPUT_FILE) + (_AC_OUTPUT_HEADERS_PREPARE, _AC_OUTPUT_HEADER): Use $ac_tmp + internally, while preserving $tmp for existing users. + * tests/torture.at (AC_CONFIG_COMMANDS with temporary directory): + New test, that $tmp is available but not essential. + + docs: avoid use of $tmp outside of config.status use + * doc/autoconf.texi (Polymorphic Variables, Shell Substitutions): + Use $var or $t instead. + (Limitations of Usual Tools): Use $dir instead. + (Initialization Macros) : Make good on the NEWS + regarding AS_TMPDIR being documented as consuming $tmp. + Suggested by Ralf Wildenhues. + +2010-08-29 Paul Eggert + + AC_PROG_YACC: fix comment re what "yacc" stands for + * lib/autoconf/programs.m4 (AC_PROG_YACC): YACC stands for + "Yet Another Compiler Compiler", not "Yet Another C Compiler". + Problem reported by Chris Long in + . + +2010-08-27 Ralf Wildenhues + + Avoid long lines in testsuite script. + * lib/autotest/general.m4 (AT_INIT): Remove definition of + AT_groups_all. Initialize at_groups from at_help_all, with + newlines instead of spaces separating test groups numbers. + Adjust all code to newlines. + * NEWS: Update. + * tests/autotest.at (Huge testsuite): New test. + + Try to update config.cache atomically; respect symlinks. + * lib/autoconf/general.m4 (AC_CACHE_SAVE): Use `mv -f' to update + the cache file if it is a regular file and not a symlink. Move + first to temporary name in the target directory if not in the + current directory for atomicity across mount points. + * tests/base.at (AC_CACHE_CHECK): Try symlinked cache file. + * doc/autoconf.texi (Cache Files): Leftover temporary cache + files may be deleted by the user. + * NEWS: Update. + +2010-08-27 Eric Blake + + m4sh: protect LINENO against stray macro + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Double quote entire + sed script, to avoid issue uncovered by automake testsuite where + 'b' was an m4 macro that broke execution on dash. + Reported by Stefano Lattarini. + + m4sh: assume ${a:-b} support + * tests/m4sh.at (Null variable substitution): New test. + * doc/autoconf.texi (Shell Substitutions) <${var:-value}>: Mention + that m4sh guarantees support. + (Limitations of Usual Tools) : Use it. + * lib/m4sugar/m4sh.m4 (AS_LINENO_POP, AS_VAR_IF, AS_TMPDIR): + Exploit use of colon for smaller files. + +2010-08-26 Eric Blake + + docs: document m4_define_default + * doc/autoconf.texi (Conditional constructs) : + Document it, since gnulib wants to use it. + * NEWS: Mention this. + + autoconf: warn if AC_*_IFELSE lacks complete program + * lib/autoconf/lang.m4 (AC_LANG_DEFINES_PROVIDED): New macro. + (AC_LANG_SOURCE): Call it. + (AC_LANG_CONFTEST): Add warning if new macro is not called. + * lib/autoconf/c.m4 (_AC_LANG_OPENMP): Add missing AC_LANG_SOURCE. + * lib/autoconf/fortran.m4 (AC_FC_FREEFORM, AC_FC_FIXEDFORM) + (AC_FC_LINE_LENGTH, __AC_FC_NAME_MANGLING): Intentionally bypass + AC_LANG_SOURCE. + * lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): Likewise. + * tests/compile.at (AC_COMPILE_IFELSE): New test. + * doc/autoconf.texi (Generating Sources) : + Document new warning. + : Document new macro. + : Document use of new macro. + * NEWS: Document the improvement. + Suggested by Bruno Haible. + + autoconf: fix regression in AC_FUNC_SELECT_ARGTYPES + * lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES): Fix + quoting; regression from yesterday leaked '' into default value. + Reported by Ralf Wildenhues. + + docs: mention another issue with variable expansion + In particular, see http://austingroupbugs.net/view.php?id=221 + and http://austingroupbugs.net/view.php?id=255. + * doc/autoconf.texi (Shell Substitutions) <${var+value}>: New + subsection. + <${var=literal}>: Tweak wording. Add mention of an ambiguity + allowed by POSIX. + * tests/torture.at (Substitute and define special characters): + Make test more robust; here, the outer "" is in a here-doc, and + does not violate the quoting rules of thumb just documented. + +2010-08-25 Eric Blake + + m4sh: revert incorrect mix of "${a='b'}" + * bin/autoconf.as: Revert leak of literal '' into assignment. + * tests/tools.at (autom4te preselections): Likewise. + + m4sh: revert regression in AS_TMPDIR + * lib/m4sugar/m4sh.m4 (AS_TMPDIR): The previous patch trying to + rename $tmp to $as_tmp was wrong; config.status relies on it. + + m4sh: reduce size of AS_VAR_TEST_SET + * lib/m4sugar/m4sh.m4 (AS_VAR_TEST_SET): Make more compact. + + tests: improve some shell assumption testing + * tests/m4sh.at (Functions Support, Functions and return Support) + (Negated classes in globbing): Update comments. + (AS@&t@_VAR basics): Test comparison to empty string. + + docs: mention cost of globbing during variable expansion + * doc/autoconf.texi (Shell Substitutions) <${var=literal}>: + Recommend quoting substitutions that might trigger globbing. + (Limitations of Builtins) <:>: Likewise. + * bin/autoconf.as: Follow our own advice. + * lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES): Likewise. + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Likewise. + * lib/autoconf/status.m4 (AC_OUTPUT): Likewise. + * lib/autotest/general.m4 (_AT_FINISH): Likewise. + * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Likewise. + * tests/autotest.at (parallel autotest and signal handling): + Likewise. + * tests/c.at (AC_OPENMP and C, AC_OPENMP and C++): Likewise. + * tests/foreign.at (shtool): Likewise. + * tests/fortran.at: Likewise. + * tests/tools.at (autom4te preselections): Likewise. + * tests/torture.at (VPATH): Likewise. + + m4sh: fix some namespace safety issues + * lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Avoid problems if + as_myself is inherited from environment. + (AS_TMPDIR): Be namespace clean. + +2010-08-24 Ralf Wildenhues + + tests: fix AC_CACHE_CHECK to skip with bad shells. + * tests/base.at (AC_CACHE_CHECK): Skip test with malformed + config.site file if the shell does not report syntax errors + from a sourced file. Fixes test failure on AIX and FreeBSD. + Report from Rainer Tammer. + +2010-08-24 Paul Eggert + + AC_HEADER_STDBOOL: avoid spurious failure with modern xlc + * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Move the "bool e = + &s;" test into the main program, as C99 might plausibly be + interpreted as not requiring support for this construction in + static initializers. Remove the "#if defined __xlc__" stuff, as + the bug is not present in recent xlc implementations, and they + reject the test for other (valid) reasons. People using ancient + xlc versions, if any, are suggested to update to fixed versions. + Reported by Ralf Wildenhues in the thread starting at: + http://lists.gnu.org/archive/html/bug-autoconf/2010-08/msg00103.html + +2010-08-24 Eric Blake + + AC_FUNC_GETLOADAVG: don't define SVR4 on cygwin + * lib/autoconf/functions.m4 (_AC_LIBOBJ_GETLOADAVG): Only define + SVR4 when -lkvm is required. + * THANKS: Update. + Reported by Yaakov Selkowitz. + +2010-08-23 Eric Blake + + AC_HEADER_STDBOOL: avoid spurious clang failure + * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Drop gcc (and by + extension clang) check in favor of a gnulib test. Force failure, + rather than merely testing for a compiler extension. + * THANKS: Update. + Reported by Anders Kaseorg. + +2010-08-22 Ralf Wildenhues + + doc: AIX sed dislikes indented comments. + * doc/autoconf.texi (Limitations of Usual Tools) : Update. + +2010-08-19 Stefano Lattarini + + Fix autoreconf docs w.r.t. AUTOM4TE environment variable. + * doc/autoconf.texi (Using autoreconf to Update configure + Scripts): List `AUTOM4TE' among the environment variables + honored by autoreconf. + * bin/autoreconf.in ($help): Likewise. + +2010-08-17 Eric Blake + + doc: improve AS_VAR_IF details + * doc/autoconf.texi (Polymorphic Variables) : Make it + clear that user must supply quotes as needed. + * THANKS: Update. + Suggested by Randall Cotton. + +2010-08-16 Ralf Wildenhues + + Fix Autotest --errexit to exit after XPASSing tests. + * lib/autotest/general.m4 (AT_INIT) : + Exit after an unexpected passing test if $at_errexit. + * tests/autotest.at (errexit): Also try tests that xpass, skip, + xfail, or fail hard. + +2010-08-14 Eric Blake + + AC_INIT: allow bugreport to contain '?' + * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Relax check. + * tests/base.at (AC_INIT with unusual version strings): Enhance + test. + * doc/autoconf.texi (Initializing configure): Document this. + * NEWS: Likewise. + * THANKS: Update. + Reported by Yavor Doganov and others. + +2010-08-10 Peter Rosin + + Keep testsuite files on unexpected pass. + * lib/autotest/general.m4 (AT_INIT) : + Don't cleanup the group directory when a test unexpectedly passes. + * tests/autotest.at (Cleanup): Check that an unexpected pass leaves + the test group directory intact. + +2010-08-10 Ralf Wildenhues + + Skip AC_FC_SRCEXT([f90]) tests with a Fortran 77 compiler in $FC. + * tests/fortran.at (AC_FC_FREEFORM with AC_FC_SRCEXT) + (AC_FC_FIXEDFORM with AC_FC_SRCEXT): Skip if the compiler cannot + handle files with .f90 extension. + Report by Luke Dalessandro. + + Fix testsuite failures with typical m4-x.y.z program suffix. + * tests/local.at (AT_CHECK_M4): Normalize hyphens and digits + after the `m4' program name. + * THANKS: Update. + Report by Luke Dalessandro. + +2010-08-06 Ralf Wildenhues + + Fix description of AC_CONFIG_TESTDIR to not mention atconfig.in. + * doc/autoconf.texi (Making testsuite Scripts): atconfig is not + created from an input template. + +2010-08-05 Bruno Haible + and Eric Blake + + AC_FUNC_ALLOCA: modernize + * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA): Assume that alloca's + return type is 'void *', not 'char *'. Supply C89 prototype. + Reported by Thomas Klausner. + +2010-08-04 Ralf Wildenhues + + Fix testsuite failure due to bugs in third-party aclocal macros. + * tests/torture.at (Non-literal AC_CONFIG_SUBDIRS): Create a + hand-written aclocal.m4 file, so the -Werror test doesn't fail + over aclocal warnings about errors in third-party macro files. + Simplify test accordingly, calling autoreconf throughout. + Report by Bob Friesenhahn. + + Fix AC_LANG_SOURCE and AC_LANG_PROGRAM tests. + * tests/compile.at (AC_LANG_SOURCE example) + (AC_LANG_PROGRAM example): Fix broken sed script for + extracting the interesting part of the conftest.c file. + Fixes test failure on Haiku. + * THANKS: Update. + Report by Scott McCreary. + +2010-08-03 Eric Blake + + docs: mention bash bug with word splitting + * doc/autoconf.texi (Shell Substitutions): Document bash bug, and + zsh default behavior difference. + Reported by Ralf Wildenhues. + + docs: mention ksh bug with function syntax + * doc/autoconf.texi (Shell Functions): Document ksh93 limitation. + +2010-08-03 Ralf Wildenhues + + Fix typo in Autotest color test, for dash testsuite failure. + * tests/autotest.at (colored test results): Use exit not + Exit. Fixes test failure with dash 0.5.4. + +2010-08-02 Eric Blake + + docs: track recent copyright assignment + * AUTHORS: Add Peter Rosin. + +2010-08-02 Ralf Wildenhues + + Add testsuite exposure for last-minute fix in 2.67. + * tests/autotest.at (parallel args but non-working mkfifo): + New test, to expose the failure v2.66-23-g991183c avoided. + + Ensure unnamed test group categories are separated from previous. + * doc/autoconf.texi (Writing Testsuites) : Update + description. + * lib/autotest/general.m4 (AT_INIT) : Set banner + to single space, not empty line, once printed. For empty + banners, print a single empty line to separate them from a + previous test group category. + * tests/autotest.at (Banners): Insert another test group; adjust + tests accordingly. Extend test to cover semantic change. + * NEWS: Update. + +2010-07-31 Ralf Wildenhues + + Fix typos in perlpod docs. + * lib/Autom4te/ChannelDefs.pm, lib/Autom4te/Channels.pm, + lib/Autom4te/General.pm: Fix typos and spacing in perlpod + documentation and in comments. + +2010-07-29 Eric Blake + + docs: mention ksh file descriptor limitation + * doc/autoconf.texi (File Descriptors): Document issue with fd 10 + and above. + Reported by Ralf Wildenhues. + + docs: mention cd limitation + * doc/autoconf.texi (Limitations of Builtins) : Document + issues with empty argument. + +2010-07-29 Ralf Wildenhues + + Add missing index entries to manual. + * doc/autoconf.texi (Fortran Compiler, Language Choice): Add + index entries for AC_FC_DUMMY_MAIN, AC_LANG; reformat entry for + AC_LANG_ASSERT. + +2010-07-21 Eric Blake + + Release Version 2.67. + * NEWS: Mention the release. + + Prepare for release. + * maint.mk (PREV_VERSION_REGEXP): New macro, missed when + backporting update-NEWS_hash from gnulib. + * cfg.mk (old_NEWS_hash): Correctly generate. + * build-aux/gendocs.sh: Temporarily break sync from upstream, to + avoid including spurious directories in info source tarball. + + Avoid spurious testsuite failures. + * doc/autoconf.texi (Generating Sources): Don't mix gcc '-E' and + '-o -', since the former already implies stdout, while the latter + creates -.exe on cygwin. + * tests/compile.at (AC_LANG_SOURCE example) + (AC_LANG_PROGRAM example): Likewise. Also prevent any config.site + interference. + + Partially revert previous patch. + * lib/autotest/general.m4 (AT_INIT) : Changing + at_jobs here breaks output if -j2 was requested but shell is + insufficient to support parallel testing. + Reported by Ralf Wildenhues. + + Minor testsuite size reduction. + * lib/autotest/general.m4 (AT_INIT) : Ensure + at_jobs is 1. + (AT_SETUP, AT_CLEANUP): Factor initialization code... + (AT_INIT) : ...into new function. + Based in part on suggestion by Ralf Wildenhues. + +2010-07-20 Eric Blake + + Close job control fd before running tests. + * doc/autoconf.texi (File Descriptors): Clarify limitations. + * lib/autotest/general.m4 (AT_CLEANUP): Avoid leaking job control + fifo fd to user tests. + (AT_INIT): Delete comment, now that close is done elsewhere. + Suggested by Ralf Wildenhues. + +2010-07-20 Paul Eggert + and Eric Blake + + Plug race in parallel autotest. + * lib/autotest/general.m4 (AT_INIT) : Track + two fds to fifo in parent, to avoid race where parent can see EOF + before child opens fifo. Avoid any atomicity problems with tokens + larger than one byte. + * NEWS: Document the bug fix. + +2010-07-20 Eric Blake + + Another empty argument through expr workaround. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Detect empty + arguments. Reject empty file argument. + * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): + Check for missing argument. + + Also reject ' and newline from AC_INIT strings. + * lib/autoconf/general.m4 (_AC_INIT_LITERAL): Reject a couple more + problematic characters. + * tests/base.at (AC_INIT with unusual version strings): Enhance + test. + * doc/autoconf.texi (Initializing configure) : Further + clarifications, and clean up wording about use of m4_esyscmd. + * NEWS: Update previous news entry. + Suggested by Paolo Bonzini. + +2010-07-20 Ralf Wildenhues + + Let autoreconf pass warning flags to new-enough aclocal. + * bin/autoreconf.in ($aclocal_supports_warnings) + ($automake_supports_warnings): New globals. + (parse_args): Set and use them. Be sure to invoke `aclocal + --help' and `automake --help' just once each. + * NEWS: Update. + Prompted by report from Bruno Haible. + + Fix parsing of empty variable settings on the command line. + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Work around + expr bug returning 0 instead of the empty string. + * lib/autotest/general.m4 (AT_INIT): Likewise. + + Fix typo in the manual. + * doc/autoconf.texi (AC_ACT_IFELSE vs AC_TRY_ACT): Fix typo. + +2010-07-19 Eric Blake + + Fix up AC_INIT vs. " issues, and document it. + * doc/autoconf.texi (Initializing configure): Improve + documentation on argument restrictions. + * NEWS: Tweak information. + * lib/autoconf/general.m4 (_AC_INIT_GENERAL): New macro, that also + rejects literal ". + (_AC_INIT_PACKAGE): Use it to plug hole in last patch. + * tests/base.at (AC_INIT with unusual version strings): Enhance + test. + +2010-07-19 Eric Blake + and Ralf Wildenhues + + Relax AC_INIT requirements for PACKAGE and VERSION strings again. + * lib/m4sugar/m4sh.m4 (AS_LITERAL_HEREDOC_IF): New macro. + (_AS_LITERAL_HEREDOC_IF, _AS_LITERAL_HEREDOC_IF_YES) + (_AS_LITERAL_HEREDOC_IF_NO): New helper macros. + * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Use + AS_LITERAL_HEREDOC_IF for PACKAGE and VERSION strings. + * tests/base.at (AC_INIT with unusual version strings): New test. + * tests/m4sh.at (AS@&t@_LITERAL_IF): Extend test. + * NEWS: Update. + +2010-07-19 Eric Blake + + Fix testsuite failures from previous patch. + * lib/autoconf/c.m4 (_AC_PROG_PREPROC_WORKS_IFELSE): Also remove + conftest.i when preprocessor tests break out of a loop. + +2010-07-19 Ralf Wildenhues + + Allow inspecting AC_PREPROC_IFELSE output in true branch. + * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY): Redirect + preprocessor output to conftest.i rather than /dev/null. + (_AC_PREPROC_IFELSE): Remove conftest.i in the postprocessing. + * tests/compile.at (Order of user actions and cleanup): Extend + test in the ACTION-IF-TRUE branch. + * doc/autoconf.texi (Running the Preprocessor): Document new + feature. + * NEWS: Update. + + Fix AC_FC_LIBRARY_LDFLAGS detection for BlueGene xlf -qipa. + * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Ignore + '-link', added spuriously when -qipa is used with the XL + Fortran compilers on BlueGene. + + manual: compiler flags -D and -L should not be followed by space + * doc/autoconf.texi (Preset Output Variables): Remove space + between -D and -L flags and their arguments, traditional cpp + implementations like Solaris 10, IRIX 6.5, OSF Tru64 5.1D, + AIX 5.3 do not accept it. + +2010-07-10 Ralf Wildenhues + + Fix comment typo in the manual. + * doc/autoconf.texi (Generic Compiler Characteristics): Refer + to the right test in the example marker comment. + Spotted by Eric Blake. + +2010-07-10 Ralf Wildenhues + + New Fortran macro AC_FC_LINE_LENGTH. + * lib/autoconf/fortran.m4 (AC_FC_LINE_LENGTH): New macro. + * doc/autoconf.texi (Fortran Compiler): Document it. + * tests/fortran.at (AC_FC_LINE_LENGTH): New test. + * NEWS: Update. + + Fix wording about AC_CONFIG_SUBDIRS warning. + * doc/autoconf.texi (Subdirectories): We warn, not error, about + nonexistent config subdirs, but only at configure run time. + +2010-07-10 Eric Blake + and Ralf Wildenhues + + Fix regression of AC_CHECK_SIZEOF on pointer types. + * lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Translate `*' to `p' + when checking literal-ness of the type, for pointer types. + * lib/m4sugar/m4sh.m4 (_AS_TR_SH): Also consider `*' as literal. + (_AS_TR_CPP): Likewise. + * tests/semantics.at (AC_CHECK_ALIGNOF struct): When checking + for numeric answer, be sure to not allow variable references. + (AC_CHECK_SIZEOF struct): Likewise. Also, test the + `AC_CHECK_SIZEOF([int *])' example from the manual. + * doc/autoconf.texi (Generic Compiler Characteristics): Add + example marker. + * NEWS: Update. + Reports by Nishio Futoshi and Roberto Bagnara. + +2010-07-08 Eric Blake + and Ralf Wildenhues + + Fix regression of AC_CONFIG_SUBDIRS with multiple arguments. + * lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Do not assume the + argument is a single word. + * tests/torture.at (Deep Package): Extend test to cover this. + (Non-literal AC_CONFIG_SUBDIRS): New test. + * doc/autoconf.texi (Subdirectories): Add example marker. + * NEWS: Update. + Report by Bruno Haible. + +2010-07-04 Stefano Lattarini + + Fix minor copy&paste leftover in m4sh tests. + * tests/m4sh.at (AS@&t@_TR_SH and AS@&t@_TR_CPP): Remove + useless variables assignements ($var, $vAr, $VAR). + +2010-07-04 Ralf Wildenhues + + Fix testsuite to not trigger Solaris sh for bug. + * tests/torture.at (Torturing config.status) + (Substitute a 2000-byte string) + (Substitute and define special characters) + (Substitute a newline): Quote first argument in for list so + that it does not look like an assignment. + +2010-07-02 Eric Blake + + Post-release administrivia. + * maint.mk (NEWS_hash): Define. + * NEWS: Add header line for next release. + * .prev-version: Record previous version. + * cfg.mk (old_NEWS_hash): Auto-update. + + Release Version 2.66. + * NEWS: Mention the release. + +2010-07-02 Eric Blake + + Pick up some maint.mk improvements from gnulib. + * configure.ac (AM_INIT_AUTOMAKE): Require 1.11, and build xz + archives by default now. + * maint.mk (gzip_rsyncable): Avoid non-portable echo. + (VC-tag): Depend on gpg_key_ID. + (PREV_VERSION): Don't parse error as version. + (announcement): Populate email addresses with defaults. + (emit_upload_commands, web-manual): Reflect changes in scripts. + (update-NEWS-hash, emit-commit-log, release-prep): New macros. + * cfg.mk (announcement_Cc_, announcement_mail_headers_): Override + defaults. + * HACKING: Modernize a bit. + + Resync upstream files. + * GNUmakefile: Run 'make fetch'. + * build-aux/announce-gen: Likewise. + * build-aux/config.guess: Likewise. + * build-aux/config.sub: Likewise. + * build-aux/gendocs.sh: Likewise. + * build-aux/git-version-gen: Likewise. + * build-aux/gnupload: Likewise. + * build-aux/texinfo.tex: Likewise. + * build-aux/vc-list-files: Likewise. + * doc/gendocs_template: Likewise. + * doc/gnu-oids.texi: Likewise. + * doc/make-stds.texi: Likewise. + * doc/standards.texi: Likewise. + * lib/Autom4te/Channels.pm: Likewise. + * lib/Autom4te/Configure_ac.pm: Likewise. + * lib/Autom4te/FileUtils.pm: Likewise. + * lib/Autom4te/XFile.pm: Likewise. + + Make AS_TR_SH and AS_TR_CPP similar. + * lib/m4sugar/m4sh.m4 (_AS_TR_CPP_LITERAL): Avoid underquoting. + (_AS_TR_CPP_INDIR): Handle all polymorphic variables. + * tests/m4sh.at (AS@&t@_TR_SH and AS@&t@_TR_CPP): New test. + * NEWS: Document the fix. + Reported by Bruno Haible. + + Reduce startup cost of autotest. + * lib/autotest/general.m4 (_AT_FINISH) : Rather than + doing a recursive find, limit ourselves to top ChangeLog only. + Reported by Ralf Wildenhues. + +2010-07-02 Ralf Wildenhues + + New macro AC_FC_FIXEDFORM, improved AC_FC_FREEFORM, coverage. + * lib/autoconf/fortran.m4 (_AC_FC_DIALECT_YEAR): Fix typo in + comment. + (AC_FC_FREEFORM): Update list of known options for Sun, HP, + Lahey/Fujitsu Fortran compilers. Use M4 quoting consistently. + (AC_FC_FIXEDFORM): New macro. + * tests/fortran.at (AC_FC_DUMMY_MAIN usage, AC_FC_MAIN usage): + Use AC_FC_FIXEDFORM, to avoid testsuite failure with FC=xlf95. + (AC_FC_FREEFORM with AC_FC_SRCEXT, AC_FC_FIXEDFORM) + (AC_FC_FIXEDFORM with AC_FC_SRCEXT): New tests. + * tests/mktests.sh: No need to exclude AC_FC_FREEFORM, it uses + AC_LANG_PUSH/AC_LANG_POP. + * doc/autoconf.texi (Fortran Compiler): Document it. + * NEWS: Update. + +2010-07-02 Eric Blake + + Optimize AS_BOX. + * lib/m4sugar/m4sh.m4 (AS_BOX): Use less m4 time. + (_AS_BOX_LITERAL): Use fewer forks in the common case. + * doc/autoconf.texi (Common Shell Constructs) : Document + the macro. + * NEWS: Mention it. + + Use new AS_LITERAL_IF argument when appropriate. + * lib/m4sugar/m4sh.m4 (AS_VAR_SET): Reduce m4 overhead. + (AS_VAR_IF, AS_VAR_TEST_SET): Provide shorter variant for simple + references. + Suggested by Bruno Haible. + + Add tests for AS_BOX. + * tests/m4sugar.at (m4@&t@_text_box): New test. + * tests/m4sh.at (AS@&t@_BOX): Likewise. + * lib/m4sugar/m4sugar.m4 (m4_text_box): Support comma. + * doc/autoconf.texi (Text processing Macros) : + Document further limitations. + + Add optional argument to AS_LITERAL_IF. + * lib/m4sugar/m4sh.m4 (_AS_LITERAL_IF): Rewrite to generate macro + name, without using m4_cond. + (_AS_LITERAL_IF_, _AS_LITERAL_IF_YES, _AS_LITERAL_IF_NO): New + helpers. + (AS_LITERAL_IF, AS_LITERAL_WORD_IF, _AS_TR_SH, _AS_TR_CPP) + (_AS_VAR_PUSHDEF): Adjust callers. + * lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Relax restrictions on + invalid bytes, since this allows inline struct layouts. + (_AC_CHECK_ALIGNOF): New helper macro. + * tests/m4sh.at (AS@&t@_LITERAL_IF): Update test. + * doc/autoconf.texi (Polymorphic Variables) : + Update documentation. + + Use AS_LITERAL_WORD_IF as appropriate. + * lib/autoconf/autoheader.m4 (AH_VERBATIM): Use new macro. + * lib/autoconf/general.m4 (AC_REQUIRE_AUX_FILE, AC_CACHE_VAL) + (AS_CACHE_CHECK, AC_DEFINE_TRACE, _AC_LIBOBJ): Likewise. + * lib/autoconf/libs.m4 (AC_CHECK_LIB): Likewise. + * lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Likewise. + * lib/m4sugar/m4sh.m4 (AS_UNSET, AS_VAR_COPY, AS_VAR_GET) + (AS_VAR_IF, AS_VAR_SET, AS_VAR_TEST_SET): Likewise. + + Add AS_LITERAL_WORD_IF. + * lib/m4sugar/m4sh.m4 (_AS_LITERAL_IF): Also reject shell quoting + characters as non-literal, and provide way to reject space. + (AS_LITERAL_WORD_IF): New macro. + * doc/autoconf.texi (Polymorphic Variables) : + Document new macro. Fix example to match reality. + * NEWS: Document change and new macro. + * tests/m4sh.at (AS@&t@_LITERAL_IF): Update test. + + Optimize AC_DEFINE. + * lib/autoconf/general.m4 (_AC_DEFINE_Q): Avoid overhead of + AS_LITERAL_IF. + +2010-07-02 Stefano Lattarini + and Eric Blake + + Describe a Solaris /bin/sh bug w.r.t. for loops. + * doc/autoconf.texi (Limitations of Shell Builtins) : + Document a bug of the 'for' builtin in Solaris /bin/sh, w.r.t. + tokens seeming variable assignment in the list of arguments. + +2010-06-23 Ralf Wildenhues + + Improve VPATH handling in config.status for non-Automake projects. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Be sure not + to remove references to a subdir of srcdir. Fix treatment of + multiple colon-separated VPATH entries. + * tests/torture.at (VPATH): New test. + Report by Keith Marshall. + + Further improve docs about nested double-quotes and backquotes. + * doc/autoconf.texi (Shellology): Remove anchor for pdksh. + Move quoting bug example to ... + (Shell Substitutions): ... here. Document which behavior is + specified by Posix. + + Coverage for Fortran compiler macros. + * tests/fortran.at (AC_OPENMP and Fortran 77) + (AC_OPENMP and Fortran): Simplify, using AT_CHECK_CONFIGURE. + (AC_F77_DUMMY_MAIN usage, AC_FC_DUMMY_MAIN usage) + (AC_F77_MAIN usage, AC_FC_MAIN usage, AC_F77_FUNC usage) + (AC_FC_FUNC usage, AC_FC_SRCEXT usage, AC_FC_FREEFORM): New + tests. + * doc/autoconf.texi (Fortran Compiler): Use GNU coding style + on C code snippets. Add markers for tested examples. + Suggest AC_FC_FREEFORM for source file extensions which the + compiler might not natively support but which are accepted + with help from AC_FC_SRCEXT. Suggest AC_CONFIG_HEADERS for + setups using one of the AC_*MAIN macros. + + Accept any nonzero exit status upon config.status write failure. + * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): + Normalize nonzero status to 1 for writing to /dev/full, for HP-UX + 11.31 cat which exits 2. + + Fix testsuite failure with Tru64 preprocessor. + * tests/compile.at (Order of user actions and cleanup): Add + incomplete comment to provoke failure with Tru64/OSF 5.1 cc + preprocessor. + +2010-06-22 Ralf Wildenhues + and Eric Blake + + Further clarification on sed -e portability. + * doc/autoconf.texi (Limitations of Usual Tools) : Clarify + more about sed -e and Posix limitations. + +2010-06-22 Bruno Haible + + Document how to use literal newlines in makefile rules. + * doc/autoconf.texi (Newlines in Make Rules): New section. + + Document how to write comments in makefile rules. + * doc/autoconf.texi (Comments in Make Rules): Mention a workaround + syntax. + +2010-06-22 Ben Pfaff + + Document how to propagate variables to submakes. + * doc/autoconf.texi: Describe technique used by Automake to + propagate variables to submakes in more detail. + +2010-06-22 Peter Johansson (tiny change) + + Be consistent in doc example. + * doc/autoconf.texi: (Polymorphic Variables) be consistent in code + example and output + +2010-06-22 Ralf Wildenhues + + Add comments for vim syntax highlighting. + * doc/autoconf.texi: Restore font-lock in some examples using + $$, for vim. + + Formatting cleanups for optional arguments. + * doc/autoconf.texi (Configuration Actions, Help Formatting) + (External Software): Use @r{} for brackets denoting optional + arguments, where @ovar is not safe to use. + + Clarify nested double-quotes and backquotes shell issues. + * doc/autoconf.texi (Shellology): New anchor for pdksh. + (Shell Substitutions): Link to it for escaped double-quotes + within double-quoted backquotes; add ksh example for unescaped + inner double-quotes problem. + + Mention Tru64 5.1 fgrep limitation with empty patterns. + * doc/autoconf.texi (Limitations of Usual Tools): Update. + + Overhaul the manual, esp. the Autotest chapter. + * doc/autoconf.texi (Installation Directory Variables): + Replace some uses of @var with @code. + (Special Shell Variables): Fix misordered paragraph about IFS. + (Writing Testsuites): Include paragraph following AT_TESTED in + the macro definition. + (testsuite Invocation): Failed tests are not rerun. + (testsuite Scripts, Autotest Logs, testsuite Invocation) + (Making testsuite Scripts): Minor edits for consistency and + language. + +2010-06-18 Bruno Haible + + Document sed -e limitation. + * doc/autoconf.texi (Limitations of Usual Tools): Mention portability + problem of sed -e option with script fragments. + +2010-06-17 Ralf Wildenhues + + Document, test, and fix AT_ARG_OPTION, AT_ARG_OPTION_ARG. + * lib/autotest/general.m4 (_AT_ARG_OPTION): Fix translation of + hyphens to underscores when turning option names to variables. + Avoid macro name concatenation garbage with trailing `dnl'. + (AT_ARG_OPTION, AT_ARG_OPTION_ARG): Overhaul macro description. + The OPTIONS are space-separated, not comma-separated. The + negative form of AT_ARG_OPTION is prefixed with `--no-'. + * tests/autotest.at (AT@&t@_ARG_OPTION, AT@&t@_ARG_OPTION_ARG): + New tests. + * NEWS: Update. + * doc/autoconf.texi (Writing Testsuites): Document AT_ARG_OPTION + and AT_ARG_OPTION_ARG. + (testsuite Invocation): Call the thingies passed to the + testsuite options, not arguments. Note that the testsuite + author may add further package-specific options. + + Autotest: enable colored test results. + * lib/autotest/general.m4 (HELP_TUNING_BEGIN): New diversion. + (HELP_TUNING, HELP_OTHER, HELP_END): Bump diversion numbers. + (AT_INIT): Accept + --color and --color=never|auto|always. If desired, colorize + test results and testsuite summary on standard output. + [HELP_TUNING]: Divert content instead to ... + [HELP_TUNING_BEGIN]: ... this diversion, m4_wrapped until the + end, when we know whether AT_COLOR_TESTS has been specified. + (AT_COLOR_TESTS): New macro, set the default for color to auto. + * doc/autoconf.texi (Writing Testsuites): Document it. + (testsuite Invocation): Document --color* options. + * tests/local.at: Call AT_COLOR_TESTS for Autoconf's testsuite. + * tests/autotest.at (color test results): New test, mirroring + color.test from Automake. + * NEWS: Update. + +2010-06-15 Ralf Wildenhues + + Avoid texinfo bug with backslashes in macro arguments. + * doc/autoconf.texi (Text processing Macros) + (Common Shell Constructs): Do not use @dvar with backslashes. + +2010-06-14 Eric Blake + + Make CONFIG_SITE handling more robust. + * lib/autoconf/general.m4 (AC_SITE_LOAD): Avoid leading - and path + search, and check for failure to load. + * tests/base.at (AC_CACHE_CHECK): Enhance test. + * doc/autoconf.texi (Site Defaults): Mention that CONFIG_SITE + works best as an absolute path. + * NEWS: Document the semantic change. + +2010-03-13 Bruno Haible + and Ralf Wildenhues + + Allow plus signs in AC_ARG_ENABLE and AC_ARG_WITH. + * doc/autoconf.texi (External Software): Mention that AC_ARG_WITH + accepts packages with a + sign in it. + (Package Options): Likewise for AC_ARG_ENABLE. + * lib/autoconf/general.m4 (_AC_ENABLE_IF): Also replace '+' with '_'. + * tests/base.at (AC_ARG_ENABLE and AC_ARG_WITH): New test. + * NEWS: Update. + +2010-06-14 Ralf Wildenhues + + Autotest: simplify logic to compute test group result. + * lib/autotest/general.m4 (AT_INIT): Compactify result + computation logic. + + New Autotest testsuite option --recheck. + * lib/autotest/general.m4 (AT_INIT): New variable $at_recheck. + Escape hyphen in $at_dir early. Accept command line switch + --recheck. Set $at_suite_log early, based on --directory + switch; with --recheck, include the list of FAILed and XPASSed + tests from old testsuite.log file in $at_groups. Document + --recheck in --help output. + * tests/autotest.at (recheck): New test. + * doc/autoconf.texi (testsuite Invocation): Document --recheck. + * NEWS: Update. + +2010-06-14 Karl Berry (tiny change) + + Clarify comment about old system. + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Prefer GNU/Linux, + and note that bug has long since been fixed. + +2010-06-08 Eric Blake + + Run libtool test with modern libtool. + * tests/foreign.at (Libtool): Request that libtoolize install + auxiliary files. Assume libtool 2.x is modern. + +2010-06-08 Ralf Wildenhues + + Coverage and doc fixes for AC_LANG_SOURCE and AC_LANG_PROGRAM. + * tests/compile.at (AC_LANG_SOURCE, AC_LANG_SOURCE(C++)) + (AC_LANG_SOURCE example, AC_LANG_PROGRAM example): New tests. + * doc/autoconf.texi (Generating Sources): Add markers for tested + examples; update quoting, and update AC_INIT usage to also set + optional URL arguments. Mention that the examples require gcc. + Prompted by report from Brian J. Murrell. + + Make AS_SET_CATFILE polymorphic, and add testsuite coverage. + * lib/m4sugar/m4sh.m4 (AS_SET_CATFILE): Use AS_VAR_SET to set + the variable. + * tests/m4sh.at (AS@&t@_SET_CATFILE): New test. + * doc/autoconf.texi (Common Shell Constructs): Document that + AS_SET_CATFILE is polymorphic in its VAR argument now. + * NEWS: Update. + + Testsuite coverage for AC_COPYRIGHT and AT_COPYRIGHT. + * tests/autotest.at (AT@&t@_COPYRIGHT): New test. + * tests/base.at (AC@&t@_COPYRIGHT): Likewise. + + Testsuite coverage for __file__ and __line__. + * tests/m4sugar.at (__file__ and __line__): New test. + + Testsuite coverage for AC_CACHE_VAL and caching semantics. + * tests/base.at (AC_CACHE_CHECK): Extend test. + (AC_CACHE_LOAD): New test. + * tests/torture.at (Configuring subdirectories): Also test + --config-cache with AC_CONFIG_SUBDIRS. + * doc/autoconf.texi (Caching Results): Annotate code snippets + which are tested in the test suite. + (Cache Files): Documented cache variables may be used on the + configure command line to override individual entries in the + cache file. + + Clarify OpenBSD sh errexit issue with compound commands. + * doc/autoconf.texi (Limitations of Builtins): Only the last + command in a compound list is problematic. + Tested on OpenBSD 4.4. + +2010-06-07 Eric Blake + + Properly quote AC_PREREQ during autoupdate. + * lib/autoconf/general.m4 (AC_PREREQ): Follow consistent quoting + style for AC_PREREQ. + * tests/tools.at (autoupdating AC_PREREQ): Update expected + results. + Reported by NightStrike. + +2010-06-01 Ralf Wildenhues + + Documentation and tests for the AC_CHECK_DECL change. + * lib/autoconf/general.m4 (_AC_CHECK_DECL_BODY): Squash trailing + spaces in as_decl_name. + (_AC_CHECK_DECLS): Likewise for the define. + * tests/semantics.at (AC_CHECK_DECLS): Extend test. + * doc/autoconf.texi (Generic Declarations): Update. + * NEWS: Update. + +2010-06-01 Joern Rennecke (tiny change) + + Generalize AC_CHECK_DECL for C++: allow optional arguments. + * general.m4 (_AC_CHECK_DECL_BODY): Process trailing function + argument types as arguments to use for C++. + (_AC_CHECK_DECLS): Filter out trailing function argument types + when generating the HAVE_DECL_* macro. + +2010-05-25 Stefano Lattarini + Eric Blake + + Don't expose AC_{COMPILE,LINK}_IFELSE internals in documentation. + * doc/autoconf.texi (Runtime) : Suggest to use + `conftest$EXEEXT' rather than `conftest$ac_exeext' to acces the + just-linked program file. + (Runtime) : Suggest to use `conftest.$OBJEXT' + rather than `conftest.$ac_object' to access the just-compiled + object file. Also, refer to the object file as "just-compiled" + rather than "just-linked". + +2010-05-20 Eric Blake + + Mention another line-counting alternative. + * doc/autoconf.texi (Limitations of Usual Tools) : Mention + how to use sed to count lines. + Suggested by Paolo Bonzini. + +2010-05-12 Eric Blake + + Document the grep workaround. + * doc/autoconf.texi (Limitations of Usual Tools) : Document + the bug. + +2010-05-12 Mark Hessling (tiny change) + + Work around QNX4 grep bug. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Count ^ + rather than $ to avoid QNX4 grep bug. + * THANKS: Update. + +2010-05-11 David Reiss (tiny change) + + Improve Erlang documentation. + * doc/autoconf.texi (Erlang Libraries): Document actual default + values. + * THANKS: Update. + +2010-05-11 Eric Blake + + Fix typo in previous patch. + * doc/autoconf.texi (File Descriptors): Add end '. + Reported by Ralf Wildenhues. + + Mention how to silence program probes. + * doc/autoconf.texi (File Descriptors): Document how to silence a + program probe. + +2010-04-26 Ralf Wildenhues + + Error and warning message formatting cleanups. + * doc/autoconf.texi (Autoconf Language, Generic Structures): + Do not capitalize the first word in error messages, do not end + them with a period. + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS, AC_MSG_FAILURE): + Likewise. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Likewise. + * lib/autotest/general.m4 (AT_INIT, at_fn_group_prepare): + Likewise. + * m4/m4.m4 (AC_PROG_GNU_M4): Likewise. + * tests/base.at (AC_TRY_COMMAND): Likewise. + * tests/torture.at (datarootdir workaround): Adjust expected + message. + + Fix placing of ellipses in English text. + * lib/autoconf/general.m4 (_AC_INIT_HELP): Be sure to add a + space before `...' in natural language text. + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL_BODY): + Likewise. + * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Likewise. + * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Likewise. + * tests/suite.at: Likewise. + * tests/torture.at (@%:@define header templates): Likewise. + + Ensure autotest tests have an atconfig file, for testsuite -v. + * tests/autotest.at (AT_CHECK_AT_PREP): Create a default + atconfig file in the directory of the testsuite. + (AT_CHECK_AT_TITLE): Also check that `./micro-suite -v' output + does not contain empty $at_srcdir expansion. + (srcdir propagation): Remove the atconfig file generated by + AT_CHECK_AT_PREP. Check each suite invocation for $at_srcdir + expansion. + + Fix autotest testsuite -v output to print test group title. + * lib/autotest/general.m4 (AT_CLEANUP): Actually print test + title in verbose output. Fixes AUTOCONF-2.57-101-gc102ed8 + regression. + * tests/autotest.at (AT_CHECK_AT_TITLE): Amend macro to check + for test title in -v output. + +2010-04-26 Eric Blake + + Clarify octal escapes with tr. + * doc/autoconf.texi (Limitations of Usual Tools): Carriage return + is portable in octal, but not newline. + +2010-04-22 Joel James Adamson (tiny change) + + Add a paragraph to FAQ on Debugging configure scripts. + * doc/autoconf.texi (Debugging): Mention inspecting config.log. + * THANKS: Update. + +2010-04-21 Mike Frysinger (tiny change) + + Fix typo in doc example. + * doc/autoconf.texi (Subdirectories): Fix typo. + +2010-04-05 Eric Blake + + Fix m4_cr_all for EBCDIC. + * lib/m4sugar/m4sugar.m4 (m4_cr_all): Swap * and $, so that we + don't end up with $* in EBCDIC. + * NEWS: Document the fix. + * THANKS: Update. + Reported by Steve Goetze. + +2010-03-28 Ralf Wildenhues + + Do not use @acronym in the manual. + * doc/autoconf.texi: Remove all usage of @acronym. + Suggested by Karl Berry. + + Do not use @sc in the manual. + * doc/autoconf.texi: Remove all usage of @sc in the manual. + Suggested by Karl Berry. + +2010-03-12 Ralf Wildenhues + + Fix wrong comment in testsuite. + * tests/m4sugar.at (m4@&t@_warn): Remove copy&pasted comment. + + Formatting cleanups in macro comments. + * lib/autoconf/c.m4, lib/autoconf/erlang.m4, + lib/autoconf/fortran.m4, lib/autoconf/functions.m4, + lib/autoconf/general.m4, lib/autoconf/lang.m4, + lib/autoconf/programs.m4, lib/autoconf/specific.m4, + lib/autoconf/status.m4, lib/autoconf/types.m4, + lib/autotest/general.m4, lib/autotest/specific.m4, + lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4, + tests/autotest.at, tests/local.at, tests/m4sh.at, + tests/semantics.at, tests/tools.at, tests/torture.at: Fix macro + comment format. + +2010-03-05 Ralf Wildenhues + + manual: index strings containing colon in non-info outputs. + * doc/autoconf.texi (Quadrigraphs, Shell Substitutions): Produce + index entries for concepts containing a colon in output formats + other than info. + + Update copyright years for files generated by mktests.sh. + * tests/mktests.sh: Update copyright years for generated files. + +2010-03-04 Eric Blake + + Document AC_LANG_CONFTEST semantic change. + * doc/autoconf.texi (Generating Sources) : + Enhance documentation, to show that semantic change in 2.63b was + intentional. + * THANKS: Update. + Reported by Brian J. Murrell, analyzed by Ralf Wildenhues. + +2010-03-04 Peter Johansson (tiny change) + + Autoconf Macro Archive URL has changed. + * doc/autoconf.texi (Introduction, Coding Style, Defining + Directories): The Autoconf Macro Archive is officially `GNU'. + Update URL. + +2010-03-02 Eric Blake + + Fix shell code in AS_TR_SH documentation. + * doc/autoconf.texi (Common Shell Constructs) : Fix + example to expand to valid shell code. + Reported by Ralf Wildenhues. + + Improve documentation on AC_{COMPILE,LINK}_IFELSE. + * doc/autoconf.texi (Running the Compiler): Mention that the + object file is available after a successful compile. + (Running the Linker): Likewise for the linker output. + Suggested by Paolo Bonzini. + + Fix typo in docs. + * doc/autoconf.texi (Conditional constructs) : Fix + typo. + +2010-03-02 Ralf Wildenhues + + Fix AS_ERROR for FreeBSD sh. + * lib/m4sugar/m4sh.m4 (_AS_ERROR_PREPARE): Rewrite as_fn_error + to take additional first argument STATUS instead of transporting + $? across shell function entry, which does not work with FreeBSD + sh. Shift all other arguments by one, adjust. + (AS_ERROR): Pass EXIT-STATUS, defaulting to $?, to as_fn_error. + Report by Václav Haisman. + + Fix `autom4te cache creation' testsuite failure on FreeBSD. + * tests/tools.at (autom4te cache creation): Normalize exit + status of failed redirection to 1, may be 2 with FreeBSD sh. + * THANKS: Update. + Report by Václav Haisman. + + Fix Autotest tracing of shell pipelines for FreeBSD sh. + * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Do not trace + commands that contain [^|]|[^|], a likely shell pipeline. + * tests/local.at (_AT_CHECK_ENV): Turn off tracing for egrep | + grep pipeline. + * doc/autoconf.texi (File Descriptors): Document limitation. + * tests/autotest.at (Trace output): New test. + +2010-03-01 Eric Blake + + Update file flow diagram to mention Automake. + * doc/autoconf.texi (Making configure Scripts): Avoid confusion + with listing Makefile.in twice on one line. Add a diagram showing + how automake fits into the picture. + Reported by santilín. + +2010-02-26 Eric Blake + + Optimize AC_REPLACE_FUNCS. + * lib/autoconf/functions.m4 (_AC_REPLACE_FUNC): New helper macro. + (AC_REPLACE_FUNCS): Use it to reduce forks when checking for + replacements, by using literal rather than shell variable. + + Document how to safely override CFLAGS default. + * doc/autoconf.texi (C Compiler) : Document a way to + change the default CFLAGS. + (C++ Compiler) : Likewise, for CXXFLAGS. + Reported by Monty Taylor; wording suggested by Paolo Bonzini. + + Document that Autoconf relies on IFS. + * doc/autoconf.texi (Special Shell Variables) : Add details + about use of IFS within configure script. + * THANKS: Update. + Reported by Arkadiusz Miskiewicz. + + Recommend latest m4 release. + * README: Bump recommendation to m4 1.4.14 (minimum remains + 1.4.6). + * doc/autoconf.texi (Introduction): Likewise. + * m4/m4.m4 (AC_PROG_GNU_M4): Likewise. + +2010-02-23 Ralf Wildenhues + + Fix testsuite failures due to setting of $U. + * tests/local.at (_AT_CHECK_ENV): Ignore setting of $U. + +2010-02-10 Eric Blake + + Avoid $U if it is not initialized. + * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Ensure $U is + set if automake did not define it. + * THANKS: Update. + Reported by Heiko Schlichting, via Julien Élie. + +2010-01-24 Ralf Wildenhues + + Fix substitution of carriage return on Darwin. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Set + ac_cs_awk_cr to '\\r', so that sed portably expands this to '\r' + rather than a literal carriage return, to fix substitution on + Darwin. Regression introduced in 2.63b. + Report by Peter O'Gorman. + +2010-01-21 Dmitry V. Levin + + Fix test failure when a shell uses $TMPDIR for here-documents. + * tests/tools.at (autotools and whitespace in file names): Create + $TMPDIR before potential use like in other whitespace tests. + +2010-01-20 Paolo Bonzini + + Add recommendation on (not) unsetting IFS. + * doc/autoconf.texi (Special shell variables): Explain why it's + better not to unset IFS. + +2010-01-19 Ralf Wildenhues + + config.status: consistent exit status with nonexistent config file input. + * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Ensure we + exit with status 1 rather than with that of 'false', for + reproducibility. + (AC_OUTPUT): Ensure to exit 1 in case of config.status failure. + * tests/torture.at (Missing templates): Also test code path + for $srcdir != '.'. + Report by Tim Rice. + +2010-01-13 Eric Blake + + Fix previous example. + * doc/autoconf.texi (Here-Documents): Touch up the example to + match output to sample command line. + + Document here-doc pitfall. + * doc/autoconf.texi (Here-Documents): Mention problem with <<- + operator. + Reported by Jim Meyering. + +2010-01-12 Eric Blake + + Typo fix in earlier commit. + * doc/autoconf.texi (Autoconf Language): Fix typo. + +2010-01-12 Ralf Wildenhues + + Allow AC_FUNC_MKTIME to work with C++. + * lib/autoconf/functions.m4 (AC_FUNC_MKTIME): ANSIfy KnR function + definitions. Use `const char*' for character literals; cast them + to `char*' for putenv. + +2010-01-11 Ralf Wildenhues + + Export AUTOM4TE in tests/atlocal.in, for aclocal. + * tests/atlocal.in: Set and export $AUTOM4TE, for aclocal. + Report by Tim Rice. + +2010-01-08 Eric Blake + + Make autotest example act better with automake. + * doc/autoconf.texi (Making testsuite Scripts): Rely on automake + feature for recommended autotest snippet, following our own use. + + Clarify language on handling of opening parenthesis. + * doc/autoconf.texi (Autoconf Language): Give an example of + improper argument passing. + * THANKS: Update. + Reported by Juan Carlos Hurtado. + +2010-01-06 Ralf Wildenhues + + Don't fail autom4te preselection test due to different Automake. + * tests/tools.at (autom4te preselections): If the cache test + fails, extract the Automake version from the toplevel + Makefile.in file of the source tree; skip, rather than fail + the test group if the automake program has a different version. + * THANKS: Update. + Report by Dieter Jurzitza, fix suggested by Eric Blake. + +2010-01-06 Peter Breitenlohner + Ralf Wildenhues + + Fix AC_CONFIG_LINKS to generated files when srcdir is absolute. + * lib/autoconf/status.m4 (_AC_OUTPUT_LINK): Check $ac_source, + not $srcdir, for being relative or absolute. + * tests/torture.at (AC_CONFIG_LINKS): New test. + (AC_CONFIG_LINKS and identical files): Extend test, avoid some + forks. + Report, patch and testcase example by Peter Breitenlohner. + +2010-01-05 Eric Blake + + Improve release automation. + * maint.mk (gnulib_dir, gnulib-version, bootstrap-tools) + (announcement): Copy from latest gnulib maint.mk. + * cfg.mk (announce_gen, gpg_key_ID): Delete. + (bootstrap-tools): Override the default. + + Update upstream files. + * GNUmakefile: Update via 'make fetch'. + * build-aux/announce-gen: Likewise. + * build-aux/config.guess: Likewise. + * build-aux/config.sub: Likewise. + * build-aux/gendocs.sh: Likewise. + * build-aux/gnupload: Likewise. + * build-aux/move-if-change: Likewise. + * build-aux/update-copyright: Likewise. + * build-aux/vc-list-files: Likewise. + * doc/standards.texi: Likewise. + * cfg.mk (update-copyright-env): Enforce wrap column. + + Update copyright year. + All files changed to add 2010, via 'make update-copyright'. + +2009-12-31 Bruno Haible + + Improve documentation on Solaris tr bugs. + * doc/autoconf.texi (Limitations of Usual Tools) : Refine + description of NUL handling by Solaris tr. + +2009-12-31 Eric Blake + + Another tr tweak. + * doc/autoconf.texi (Limitations of Usual Tools) : Clarify + previous commit. + Reported by Ralf Wildenhues. + +2009-12-29 Eric Blake + + Improve documentation on tr portability. + * doc/autoconf.texi (Limitations of Usual Tools) : Refine + description of NUL handling. Document set size issue. + Reported by Bruno Haible. + + Fix comment in AC_CHECK_DECLS. + * lib/autoconf/general.m4 (AC_CHECK_DECL): Document the includes + argument to the shell function. + +2009-12-15 Ralf Wildenhues + + Add testsuite exposure for shtool usage. + * tests/foreign.at (shtool): New test. + Report by Dmitry Grebeniuk. + +2009-12-12 Eric Blake + + Improve wording about m4 quote characters. + * doc/autoconf.texi (Autoconf Language): Autoconf quote characters + come from m4sugar, not raw m4. + (Active Characters): Mention that it is m4sugar which changes + quotes from `' to []. + * THANKS: Update. + Suggested by Josef Vukovic. + +2009-12-12 Ralf Wildenhues + + Revert "Improve AC_CONFIG_AUX_DIRS a bit." to fix shtool usage. + * lib/autoconf/general.m4 (AC_CONFIG_AUX_DIRS): Revert test for + shtool as install script. Regression introduced in 2.64. + * NEWS, THANKS: Update. + Report by Dmitry Grebeniuk. + This reverts commit 93d9386de9c1320afed43f1337ac5ddb2d2dcbb4. + +2009-12-09 Ralf Wildenhues + + Fix NEWS description for AC_FUNC_MMAP entry. + * NEWS: Update. + + Fix 2.65 AC_TYPE_INT*_T macro body text regression. + * lib/autoconf/types.m4 (_AC_TYPE_INT_BODY): Move helper enum + definition to prologue section, to avoid syntax error. + * NEWS, THANKS: Update. + Report by Pierre Ynard. + +2009-12-09 Paolo Bonzini + + Fix `recursion' test failure. + * tests/m4sugar.at (recursion): Use empty diversion, not 0. + +2009-12-05 Stefano Lattarini + Ralf Wildenhues + + Document Solaris/Heirloom sh set -e issue with command substitutions. + * doc/autoconf.texi (Limitations of Builtins): Fix typos `set -d' + in previous example. Document failure to honor && lists with set -e + and a command substitution in the failing command. + Report and initial patch by Stefano Lattarini against Automake. + +2009-12-04 Eric Blake + + Warn if using unnamed diversion. + * lib/m4sugar/m4sugar.m4 (_m4_divert, m4_divert_push): Add + optional parameter, which controls warning. + (m4_divert_pop, m4_cleardivert, m4_divert_require) + (_m4_require_call): Adjust callers. + * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Likewise. + * tests/m4sh.at (AT_DATA_LINENO): Avoid triggering the warning. + * tests/m4sugar.at (AT_CHECK_M4SUGAR_TEXT, m4@&t@_append) + (m4@&t@_text_wrap, recursion): Likewise. + (m4@&t@_warn, m4@&t@_divert_stack): Adjust expected output. + * tests/tools.at (autom4te and whitespace in file names) + (autoconf: the empty token): Avoid triggering the warning. + (autoconf: AC_PRESERVE_HELP_ORDER): New test. + * tests/mktests.sh (ac_exclude_list): Retire prior test. + * NEWS: Document the warning. + * doc/autoconf.texi (Redefined M4 Macros) , + : Make even more explicit that using these directly + is discouraged. + (Diversion support): Further warn against improper diversion + changes. + : Give an example of proper use. + Reported by Mike Frysinger. + +2009-11-30 Ralf Wildenhues + + manual: AC_SEARCH_LIBS also prepends to LIBS. + * doc/autoconf.texi (Libraries): Document that AC_SEARCH_LIBS + prepends to LIBS, just like AC_CHECK_LIB. + +2009-11-27 Paolo Bonzini + + Bump m4.m4 serial number. + * m4/m4: Bump serial number to 10. + +2009-11-27 Harald van Dijk + + Fix m4 detection test on dash. + * m4/m4 (AC_PROG_GNU_M4): Use AS_ECHO. + +2009-11-24 Ralf Wildenhues + + Fix AC_FUNC_MMAP regression with C++ compiler in 2.65. + * lib/autoconf/functions.m4 (AC_FUNC_MMAP): Use const char* + for the constant string. Cast void* to char* for assignment. + * NEWS, THANKS: Update. + Report by Michal Čihař. + + Add pgfortran to list of Fortran 95+ compilers. + * lib/autoconf/fortran.m4 (_AC_F95_FC): Add pgfortran before + pgf95. + Based on report by Jeff Squyres. + +2009-11-22 Bruno Haible + + Fix failure of test 35 when the user has a .autom4te.cfg file. + * tests/tools.at (autom4te cache creation): Skip the test if the + user has a .autom4te.cfg file. + +2009-11-21 Eric Blake + + Release Version 2.65. + * NEWS: Mention the release. + + Prepare for release. + * build-aux/announce-gen: Sync from upstream. + * build-aux/config.guess: Likewise. + * build-aux/config.sub: Likewise. + * cfg.mk (gnu_rel_host, url_dir_list): Move... + * maint.mk: ...here, copying ideas from gnulib. + (major): Rename... + (stable): ...to this, copying gnulib. + * HACKING (release): Document changes in process. + + Avoid spurious newline in traced macros. + * bin/autoreconf.in (tracing): Drop newline before parsing traced + arguments; regression from 2009-11-14. + +2009-11-20 Eric Blake + + Allow absolute names in AT_TESTED. + * lib/autotest/general.m4 (AT_INIT) : Check for + absolute names before path walk. + * THANKS: Update. + Suggested by Allan Clark. + +2009-11-14 Ralf Wildenhues + + Fix AC_CONFIG_SUBDIRS tracing in autoreconf. + * bin/autoreconf.in (autoreconf_current_directory): Collapse + newlines in the autoconf trace output, similar to how automake + invokes autoconf, so that newlines do not matter in the argument + to AC_CONFIG_SUBDIRS. + * tests/torture.at (Deep Package): Expose this issue in the + test. + * THANKS: Update. + Report by Nathan Schulte. + +2009-11-09 Eric Blake + + Fix AC_FUNC_MMAP for cygwin. + * lib/autoconf/functions.m4 (AC_FUNC_MMAP): Make the test more + portable: Actually check for , and only use MAP_FIXED + on an address previously returned from mmap. + * THANKS: Update. + Reported by Corinna Vinschen. + +2009-11-04 Eric Blake + + Redocument AS_DIRNAME, even with its flaws. + * doc/autoconf.texi (Common Shell Constructs) : + Restore documentation, since dirname mentions it. + Reported by Peter Johansson. + + Update upstream files. + * build-aux/announce-gen: Synchronize from upstream. + * build-aux/config.guess: Likewise. + * build-aux/config.sub: Likewise. + * build-aux/gendocs.sh: Likewise. + * build-aux/git-version-gen: Likewise. + * build-aux/texinfo.tex: Likewise. + * build-aux/update-copyright: Likewise. + * doc/standards.texi: Likewise. + * lib/Autom4te/Channels.pm: Likewise. + * lib/Autom4te/Configure_ac.pm: Likewise. + * lib/Autom4te/FileUtils.pm: Likewise. + * lib/Autom4te/Struct.pm: Likewise. + * lib/Autom4te/XFile.pm: Likewise. + +2009-11-04 Ralf Wildenhues + + Coverage for autom4te cache creation issues. + * tests/tools.at (autom4te cache creation): New test. + +2009-11-03 Ralf Wildenhues + + Fix testsuite failures with SHELL=zsh. + * tests/statesave.m4 (AC_STATE_SAVE): Ignore argv and ARGC when + comparing configure variables. + +2009-11-03 Eric Blake + and Ralf Wildenhues + + Update NEWS for recent fixes. + * NEWS: Add some entries. + +2009-10-31 Ralf Wildenhues + + Micro-optimization of config.status substitution. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): No need to + concatenate an empty second string, when we have exactly 148 + characters to substitute. + * tests/torture.at (Substitute a 2000-byte string): Add test + exposure for runs of backslashes near the 148 character limit. + + Fix testsuite failure on AIX 4.3.3. + * lib/autoconf/general.m4 (_AC_RUN_LOG_LIMIT): Remove conftest.err + also if it is empty. + + Fix testsuite failure on IRIX and AIX. + * tests/torture.at (Substitute and define special characters): + Double the backslash before the double-quote in + AC_DEFINE_UNQUOTED, as documented for here-documents. + +2009-10-31 Eric Blake + + Fix cross-manual link to gcc. + * doc/autoconf.texi (Portable C and C++): Provide uref rather than + xref when building for html. + Reported via Karl Berry. + + Update authors. + * AUTHORS: Document recent copyright assignments. + +2009-10-31 Ralf Wildenhues + + Fix AC_OPENMP configure message for non-C compilers. + * lib/autoconf/lang.m4 (AC_LANG_DEFINE): Accept as additional + fourth arg the compiler variable name, defined in _AC_CC($1). + (_AC_CC): New language dispatch macro. + * lib/autoconf/erlang.m4 (AC_LANG(Erlang)): Adjust. + * lib/autoconf/fortran.m4 (AC_LANG(Fortran 77), AC_LANG(Fortran)): + Likewise. + * lib/autoconf/c.m4 (AC_LANG(C), AC_LANG(C++)) + (AC_LANG(Objective C), AC_LANG(Objective C++)): Likewise. + (AC_OPENMP): Use _AC_CC instead of $CC. + + Do not fail OpenMP tests on systems without aclocal. + * tests/c.at (AC_OPENMP and C, AC_OPENMP and C++): Override + `ACLOCAL=true' for autoreconf, the tests don't need aclocal. + * tests/fortran.at (AC_OPENMP and Fortran 77) + (AC_OPENMP and Fortran): Likewise. + +2009-10-31 Bruno Haible + Ralf Wildenhues + + Improve cache variable documentation. + * doc/autoconf.texi (AC_PROG_AWK, AC_PROG_GREP, AC_PROG_EGREP, + AC_PROG_FGREP, AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_LEX, + AC_PROG_YACC, AC_CHECK_PROG, AC_CHECK_PROGS, AC_PATH_PROG, + AC_PATH_PROGS): Don't suggest to use the cache variable, only to + override it, or preferably, a non-cache variable associated with + the test. + (AC_PROG_SED): Likewise. Fix name of cache variable. + (AC_FUNC_GETMNTENT): Fix name cache variable. + (AC_FUNC_LSTAT): Fix typo. + +2009-10-31 Ralf Wildenhues + + Fix AC_OPENMP for Fortran (F77 and FC). + * lib/autoconf/fortran.m4 (AC_LANG_FUNC_LINK_TRY(Fortran): New. + * tests/c.at (AC_C_RESTRICT and C++, AC_OPENMP and C) + (AC_OPENMP and C++): New tests. + * tests/fortran.at (AC_OPENMP and Fortran 77) + (AC_OPENMP and Fortran): New tests. + * THANKS: Update. + Report by Bart Oldeman. + + Perl coverage convenience targets. + * Makefile.am (PERL_COVERAGE_DB, PERL_COVERAGE_FLAGS) + (PERL_COVER): New variables. + (check-coverage, check-coverage-run, check-coverage-report) + (clean-coverage): New phony targets. + (clean-local): Depend on clean-coverage. + +2009-10-28 Eric Blake + + Fix corner cases in AS_LITERAL_IF and AS_TR_SH. + * lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Fix bug with unbalanced + parens. Move guts... + (_AS_LITERAL_IF): into new helper. + (AS_TR_SH, AS_TR_CPP): Fix bugs with expansion of wrong macro. + Move guts... + (_AS_TR_SH, _AS_TR_SH_LITERAL, _AS_TR_SH_INDIR, _AS_TR_CPP) + (_AS_TR_CPP_LITERAL, _AS_TR_CPP_INDIR): ...into new helpers. + (AS_VAR_PUSHDEF): Hoist m4_require, by moving guts... + (_AS_VAR_PUSHDEF): ...into new helper. + * tests/m4sh.at (AS@&t@_LITERAL_IF): Enhance test. + + Minor optimizations to m4sh. + * lib/m4sugar/m4sh.m4 (AS_VAR_IF, AS_IDENTIFIER_IF) + (AS_LITERAL_IF): Parse fewer bytes during expansion, by visiting + if-true and if-false arguments only once. + + Optimize m4_escape for common case. + * lib/m4sugar/m4sugar.m4 (m4_escape): Don't use regex if string is + already sane, by copying from AS_LITERAL_IF. Move guts... + (_m4_escape): ...into new helper. + + Fix m4_text_wrap handling of quoted whitespace. + * lib/m4sugar/m4sugar.m4 (m4_escape): New macro. + (m4_text_wrap): Use it to avoid issues with embedded [ and ]. + * tests/m4sugar.at (m4@&t@_text_wrap): Test it. + * NEWS: Document this. + * doc/autoconf.texi (Text processing Macros) : + Likewise. + Reported by Mike Frysinger. + +2009-10-27 Eric Blake + + Mention another feature of AC_RUN_IFELSE. + * doc/autoconf.texi (Runtime) : Mention that + compiled test program still exists during if-true branch. + * THANKS: Update. + Reported by Stefano Lattarini, suggestion by Ralf Wildenhues. + +2009-10-26 Paolo Bonzini + + Pass Autom4te path down to programs that autoreconf invokes. + * bin/autoreconf.in (autom4te): New variable. Export its value + as $ENV{'AUTOM4TE'}. Suggested by Peter Johansson. + * THANKS: Update. + +2009-10-20 Eric Blake + + Fix AC_TYPE_UINT64_T on Tru64 with gcc 3.4.4. + * lib/autoconf/types.m4 (_AC_TYPE_UNSIGNED_INT_BODY) + (_AC_TYPE_INT_BODY): Avoid undefined behavior of attempting shift + wider than type. + * NEWS: Document this. + Reported by Rainer Orth. + +2009-10-17 Ralf Wildenhues + + Fix a couple of index entries in the manual. + * doc/autoconf.texi (Polymorphic Variables): Fix index entries + for AS_VAR_APPEND, AS_VAR_ARITH. + +2009-10-15 Eric Blake + + Fix typos in INSTALL. + * doc/install.texi (Basic Installation, Installation Names): Fix + typos in last patch. + Reported by Ralf Wildenhues. + + Improve INSTALL wording. + * doc/install.texi (Basic Installation): Clarify installcheck + behavior. + (Installation Names): Mention that --prefix only overrides + directory locations not specified on the command line. Prefer + /alternate/directory over /path/to. Remove a sentence targeted to + the developer, not the user. + * THANKS: Update. + Suggested by Alfred M. Szmidt. + +2009-10-15 Peter Breitenlohner + + Fix typos in documentation. + * doc/autoconf.texi (Cache Variable Index): Fix typo. + (Libraries) : Mention 'none required' result. + +2009-10-09 Bruno Haible + Ralf Wildenhues + + Recommend `sh -n' debugging, and public result variables for macros. + * doc/autoconf.texi (Debugging): Recommend to use "bash -n + configure". Recommend the use of result variables as an + alternative to run-if-true/run-if-false parameters. + +2009-10-05 Bruno Haible + + * doc/autoconf.texi (Particular Functions): Swap sections about + AC_FUNC_MBRTOWC and AC_FUNC_MEMCMP. + +2009-10-01 Paolo Bonzini + + Unconditionally check for junk ./--version after mkdir search loop. + * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Always check for + presence of ./--version. Reported by Eric Blake. + +2009-09-22 Ralf Wildenhues + + Clarify documentation about Solaris sed quantifier restriction. + * doc/autoconf.texi (Limitations of Usual Tools) : '*' does + not work after subexpressions, \{M,N\} only after one-character + expressions. From GCC PR 38923. + +2009-09-21 Eric Blake + + Fit configure output in 80 columns. + * lib/autoconf/functions.m4 + (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Shorten message. + +2009-09-18 Ralf Wildenhues + + Use consistent notation for cache variables. + * doc/autoconf.texi (Generic Programs): Remove `$' before + variable name. + + Documentation of specific and general cache variables. + * doc/autoconf.texi (Default Includes, Alternative Programs) + (Particular Programs, Generic Programs, Files, Libraries) + (Function Portability, Particular Functions, Generic Functions) + (Particular Headers, Generic Headers, Declarations) + (Generic Declarations, Particular Structures, Particular Types) + (Specific Compiler Characteristics) + (Generic Compiler Characteristics, C Compiler, System Services): + Document lots of cache variables. + * NEWS: Update. + Suggested by Bruno Haible. + + New cache variable index in the manual. + * doc/autoconf.texi: Define new index `CA' for cache variables. + (caindex): New macro. + (Cache Variable Index): New appendix node. + (Top, Indices): Adjust menus. + (Cache Variable Names, Site Defaults): Adjust text. + * doc/Makefile.am (CLEANFILES): Add files generated for CA index. + + New FAQ node: Debugging. + * doc/autoconf.texi (Debugging): New node. + (Top, FAQ): Adjust menus. + Report by Bruno Haible. + + Document AM_MAKEFLAGS workaround to the macro override problem. + * doc/autoconf.texi (Macros and Submakes): Automake makefiles + provide AM_MAKEFLAGS to help with overriding macros in submake + invocations. + Prompted by bug report from Bruno Haible. + +2009-09-15 Peter Breitenlohner + + Implement and document Objective C++ support. + * lib/autoconf/c.m4 (AC_LANG(Objective C++), AC_LANG_OBJCXX) + (AC_LANG_PREPROC(Objective C++), AC_PROG_OBJCXXCPP) + (AC_LANG_COMPILER(Objective C++), AC_PROG_OBJCXX) + (_AC_PROG_OBJCXX_G): New macros. + (_AC_ARG_VAR_CPPFLAGS, _AC_ARG_VAR_LDFLAGS) + (_AC_ARG_VAR_LIBS): Adjusted. + * doc/autoconf.texi (Objective C++ Compiler): New node. + (Preset Output Variables): Document OBJCXXFLAGS. + (Language Choice): Document `Objective C++' language. + * NEWS: Updated. + * tests/local.at (AT_CHECK_ENV): Ignore AC_SUBSTed Objective C++ + related variables. + +2009-09-15 Ralf Wildenhues + + Work around DJGPP shell function return bug with command substitutions. + DJGPP bash 2.04 has a bug in that `return $ac_retval' done in a + shell function which also contains a command substitution causes + the shell to barf. For more details and a fix see: + + Possible workaround include putting the `return' in a subshell + or calling another function to set the status. + * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY) + (_AC_COMPILE_IFELSE_BODY, _AC_LINK_IFELSE_BODY) + (_AC_RUN_IFELSE_BODY, _AC_COMPUTE_INT_BODY): Use AS_SET_STATUS + instead of `return'. + * doc/autoconf.texi (Common Shell Constructs, Shell Functions): + Document the issue. + * THANKS: Update. + Report by Rugxulo and Reuben Thomas. + + DJGPP fix: Do not redirect standard input in configure scripts. + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): If $DJGPP is + nonempty, do not dup fd 0 to AS_ORIGINAL_STDIN_FD, do not close + fd 0. + +2009-09-14 Eric Blake + + Quote result of m4_toupper and m4_tolower. + * lib/m4sugar/m4sugar.m4 (m4_tolower, m4_toupper): Quote result. + * lib/autotest/general.m4 (AT_KEYWORDS): Adjust caller. + * tests/m4sugar.at (m4@&t@_toupper and m4@&t@_tolower): New test. + * NEWS: Document this. + * THANKS: Update. + Reported by Sam Steingold. + +2009-09-14 Ralf Wildenhues + + DJGPP fix: remove both conftest and conftest.exe. + The DJGPP compiler may create both `a.out' and `a.exe' without -o, + and both `conftest' and `conftest.exe' with `-o conftest', but not + with `-o conftest.exe'. + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_O): Also remove + `conftest' without $ac_exeext suffix. + + DJGPP fix: do not try to source /dev/null as cache or site file. + * lib/autoconf/general.m4 (AC_SITE_LOAD, AC_CACHE_LOAD): Do not + load the cache or site file if it is `/dev/null', as DJGPP treats + it as a regular file, but the shell then warns about it later. + Fixes several test suite failures on DJGPP. + + testsuite: pass $configure_options to configure invocations. + * tests/local.at (AT_CHECK_CONFIGURE): Add $configure_options + to configure command line. + * tests/autotest.at, tests/base.at, tests/c.at, tests/torture.at: + Likewise for each configure invocation. + * README-hacking: Document configure_options. + + testsuite: improve Erlang tests portability, overridability. + * tests/autotest.at (Erlang Eunit unit tests): Use "no" as + value-if-not-found for Erlang tools. + * tests/erlang.at: Likewise. Also, use AS_EXIT instead of plain + exit. + +2009-09-13 Ralf Wildenhues + + * bin/autoupdate.in: Fix typos in comments. + + Improve autotest testsuite summary message. + * lib/autotest/general.m4 (AT_INIT): Hint at the toplevel log + only if not $at_debug_p. Always hint at the per-test output. + + Four new autoupdate tests, expected failures. + * tests/tools.at (autoupdating macros recursively) + (autoupdating with m4@&t@_pushdef, autoupdating with AC_REQUIRE) + (autoupdating with complex quoting): New tests. + + Fix description of AC_CHECK_LIB regarding other deplibs. + * doc/autoconf.texi (Libraries): Library linking may not fail + even without missing additional libs. + +2009-09-12 Eric Blake + + Track recent copyright assignments. + * AUTHORS: Update. + + Improve documentation on quoting. + * doc/autoconf.texi (Autoconf Language): Clarify quoting example. + * THANKS: Update. + Reported by santilín. + +2009-09-11 Ralf Wildenhues + + New config.status option --config. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Implement + --config. + * doc/autoconf.texi (config.status Invocation): Document it. + * NEWS: Update. + * tests/torture.at (configure invocation): Test it. + Suggested several times, by several people, in the past. + +2009-09-10 Eric Blake + + Document that AS_INIT is automatically used. + * doc/autoconf.texi (Initialization Macros) : Add words + to clarify that only bare-bones scripts need a direct AS_INIT. + Suggested by Reuben Thomas. + + Clarify portability pitfall of test. + * doc/autoconf.texi (Limitations of Builtins) : Give more + reasons why -a and -o are not portable. + Reported by Reuben Thomas. + +2009-09-10 Ralf Wildenhues + + Document sed limitation with escaped metacharacters. + * doc/autoconf.texi (Limitations of Usual Tools) : Use `%' + rather than `/' as delimiter in an example `s' command. + Document inconsistent treatment of escaped metacharacters. + * THANKS: Update. + Report by Dave Korn, with additional input from Paolo Bonzini + and Eric Blake. + + Document temporary directory `$tmp' for use in config.status. + * doc/autoconf.texi (Configuration Actions): Document `$tmp'. + * NEWS: Update. + +2009-09-09 Ralf Wildenhues + + Update License to GPLv3+ including new Autoconf Exception. + * NEWS, README: Update licensing information. + * COPYING.EXCEPTION: New file. + * Makefile.am (EXTRA_DIST): Distribute it. + * cfg.mk (autom4te-update): Remove copyright change warning. + * lib/autoconf/autoconf.m4, lib/autoconf/autoheader.m4, + lib/autoconf/autoscan.m4, lib/autoconf/autotest.m4, + lib/autoconf/autoupdate.m4, lib/autoconf/c.m4, + lib/autoconf/erlang.m4, lib/autoconf/fortran.m4, + lib/autoconf/functions.m4, lib/autoconf/general.m4, + lib/autoconf/headers.m4, lib/autoconf/lang.m4, + lib/autoconf/libs.m4, lib/autoconf/oldnames.m4, + lib/autoconf/programs.m4, lib/autoconf/specific.m4, + lib/autoconf/status.m4, lib/autoconf/types.m4, + lib/autotest/autotest.m4, lib/autotest/general.m4, + lib/autotest/specific.m4, lib/m4sugar/foreach.m4, + lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4: Update exception + statement, bump to GPLv3. + * bin/autoconf.as, bin/autoheader.in, bin/autom4te.in, + bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in, + bin/ifnames.in: Bump to GPLv3+, adjust --version output + to reflect the GPLv3+ and the Autoconf Exception. + * lib/Autom4te/C4che.pm, lib/Autom4te/ChannelDefs.pm, + lib/Autom4te/General.pm, lib/Autom4te/Request.pm, + lib/autom4te.in, lib/autoscan/autoscan.pre, + lib/emacs/autoconf-mode.el, lib/emacs/autotest-mode.el, + lib/freeze.mk, tests/atlocal.in, tests/autoscan.at, + tests/autotest.at, tests/base.at, tests/c.at, + tests/compile.at, tests/erlang.at, tests/foreign.at, + tests/fortran.at, tests/local.at, tests/m4sh.at, + tests/m4sugar.at, tests/mktests.sh, tests/semantics.at, + tests/statesave.m4, tests/suite.at, tests/tools.at, + tests/torture.at, tests/wrapper.as: Bump to GPLv3+. + + Allow to work on systems without Fcntl::flock implementation. + * configure.ac (PERL_FLOCK): New substitution variable with test + whether Fcntl::flock is implemented by the system. + * bin/Makefile.am (edit): Substitute @PERL_FLOCK@. + * bin/autom4te.in: Call XFile::lock only if flock is + implemented. + +2009-09-04 Reuben Thomas (tiny change) + + Mention the Autoconf archive. + * doc/autoconf.texi (Coding Style): Add a link. + +2009-08-30 Bruno Haible + + Document another Solaris tr pitfall. + * doc/autoconf.texi (Limitations of Usual Tools) : Mention + that Solaris /usr/bin/tr does not only have problems with + replacing NUL bytes but discards all NUL bytes from the input. + +2009-09-04 Eric Blake + + Improve wording about what goes before AC_INIT. + * doc/autoconf.texi (Initializing configure): Update wording. + (Versioning) : Remove misleading text, to match + autoscan's behavior. + * THANKS: Update. + Reported by NightStrike, with input from Ralf Wildenhues. + +2009-09-04 Thomas Jahns (tiny change) + + Fix illegal tab character in Fortran source. + * lib/autoconf/fortran.m4 (AC_FC_SRCEXT): Change TAB back to + multiple spaces; regression introduced 2008-10-23. + * NEWS: Mention this. + * THANKS: Update. + +2009-08-22 Romain Lenglet + + Fix AT_CHECK_EUNIT for versions of Erlang/OTP without init:stop/1. + * lib/autotest/specific.m4 (AT_CHECK_EUNIT): Support older + versions of Erlang/OTP with an erlang:stop() function that doesn't + take arguments. + +2009-08-22 Ralf Wildenhues + + Drop unneeded line in Eunit test. + * tests/autotest.at (Erlang Eunit unit tests): Do not copy + install-sh. + + Fix build dependencies for Erlang macro files. + * lib/freeze.mk (autotest_m4f_dependencies): Add + $(src_libdir)/autotest/specific.m4. + * tests/Makefile.am (AUTOCONF_FILES): Add erlang.m4. + +2009-09-19 Paolo Bonzini + + Use a separate program to test whether the compiler works. + * lib/autoconf/erlang.m4 (_AC_LANG_NULL_PROGRAM(Erlang)): New. + * lib/autoconf/lang.m4 (AC_LANG_DEFINE): Copy _AC_LANG_NULL_PROGRAM. + (_AC_LANG_NULL_PROGRAM(), _AC_LANG_NULL_PROGRAM): New. + (_AC_COMPILER_EXEEXT_DEFAULT): Print here "whether the xyz compiler + works", before exiting. + (_AC_COMPILER_EXEEXT_WORKS): Merge into _AC_COMPILER_EXEEXT_CROSS, + remove the "whether the xyz compiler works" message, use + conftest$ac_cv_exeext instead of $ac_file. + (_AC_COMPILER_EXEEXT): Try _AC_COMPILER_EXEEXT_DEFAULT using + the null program, and clean conftest.out only after + _AC_COMPILER_EXEEXT_CROSS. + (AC_NO_EXECUTABLES): Use _AC_LANG_NULL_PROGRAM. + (_AC_COMPILER_OBJEXT): Use _AC_LANG_NULL_PROGRAM. + +2009-08-18 Bruno Haible + + Document Solaris tr range and NUL limitations. + * doc/autoconf.texi (Limitations of Usual Tools): Mention that + Solaris /usr/bin/tr does not support ranges, nor the '\0' octal + escape. + +2009-08-14 Eric Blake + + Simplify version control metadata. + * .cvsignore: Delete. + * bin/.cvsignore: Likewise. + * config/.cvsignore: Likewise. + * doc/.cvsignore: Likewise. + * lib/.cvsignore: Likewise. + * lib/autoconf/.cvsignore: Likewise. + * lib/Autom4te/.cvsignore: Likewise. + * lib/autoscan/.cvsignore: Likewise. + * lib/autotest/.cvsignore: Likewise. + * lib/emacs/.cvsignore: Likewise. + * lib/m4sugar/.cvsignore: Likewise. + * man/.cvsignore: Likewise. + * tests/.cvsignore: Likewise. + * bin/.gitignore: Likewise. + * build-aux/.gitignore: Likewise. + * config/.gitignore: Likewise. + * doc/.gitignore: Likewise. + * lib/.gitignore: Likewise. + * lib/autoconf/.gitignore: Likewise. + * lib/Autom4te/.gitignore: Likewise. + * lib/autoscan/.gitignore: Likewise. + * lib/autotest/.gitignore: Likewise. + * lib/emacs/.gitignore: Likewise. + * lib/m4sugar/.gitignore: Likewise. + * man/.gitignore: Likewise. + * tests/.gitignore: Likewise. + * .gitignore: Consolidate all rules into one file. + + Normalize remaining copyright lines. + * BUGS: Reformat copyright line, using UPDATE_COPYRIGHT_FORCE. + * NEWS: Likewise. + * README-hacking: Likewise. + * TODO: Likewise. + * lib/Autom4te/ChannelDefs.pm: Likewise. + * lib/autoconf/fortran.m4: Likewise. + * lib/autoconf/general.m4: Likewise. + * lib/autoconf/lang.m4: Likewise. + * lib/autotest/general.m4: Likewise. + * maint.mk: Likewise. + * tests/compile.at: Likewise. + + Improve copyright updating. + * build-aux/update-copyright: Resynchronize from upstream. + * maint.mk (update-copyright): Simplify based on gnulib. + (update-copyright-env): New variable. + * cfg.mk (update-copyright-exclude-regexp): Delete. + (update-copyright-env): New override. + * .x-update-copyright: New file. + * lib/Autom4te/Makefile.am: Add copyright. + * lib/Autom4te/Channels.pm: Revert copyright update to upstream + file. + * lib/Autom4te/Configure_ac.pm: Likewise. + * lib/Autom4te/FileUtils.pm: Likewise. + * lib/Autom4te/Struct.pm: Likewise. + * lib/Autom4te/XFile.pm: Likewise. + + Update copyright. + * AUTHORS: Include 2009 in copyright. + * lib/Autom4te/C4che.pm: Likewise. + * lib/Autom4te/Channels.pm: Likewise. + * lib/Autom4te/Configure_ac.pm: Likewise. + * lib/Autom4te/FileUtils.pm: Likewise. + * lib/Autom4te/General.pm: Likewise. + * lib/Autom4te/Request.pm: Likewise. + * lib/Autom4te/Struct.pm: Likewise. + * lib/autoconf/Makefile.am: Likewise. + * lib/autoconf/autoconf.m4: Likewise. + * lib/autoconf/autoscan.m4: Likewise. + * lib/autoconf/autoupdate.m4: Likewise. + * lib/autoconf/functions.m4: Likewise. + * lib/autoconf/libs.m4: Likewise. + * lib/autoconf/oldnames.m4: Likewise. + * lib/autoconf/types.m4: Likewise. + * lib/autoscan/Makefile.am: Likewise. + * lib/autoscan/autoscan.pre: Likewise. + * lib/autotest/Makefile.am: Likewise. + * lib/autotest/autotest.m4: Likewise. + * lib/emacs/autoconf-mode.el: Likewise. + * lib/emacs/autotest-mode.el: Likewise. + * lib/freeze.mk: Likewise. + * lib/m4sugar/foreach.m4: Likewise. + * man/Makefile.am: Likewise. + * tests/atlocal.in: Likewise. + * tests/autoscan.at: Likewise. + * tests/foreign.at: Likewise. + * tests/fortran.at: Likewise. + * tests/mktests.sh: Likewise. + * tests/semantics.at: Likewise. + * tests/suite.at: Likewise. + * tests/wrapper.as: Likewise. + + Prepare to bulk update copyright years. + * build-aux/update-copyright: New file. + * cfg.mk (gnulib-update): Sync it from gnulib. + (update-copyright-exclude-regexp): New variable. + (web-manual): Move... + * maint.mk (web-manual): ...here, to match gnulib. + (update-copyright): New target, copied from gnulib's + maint.mk (it would be nice to sync this file...). + (build_aux): New macro. + (VC_LIST, emit_upload_commands): Use it. + * build-aux/texinfo.tex: Resynchronize from upstream. + * lib/autoconf/general.m4 (_AC_COPYRIGHT_YEARS): Reformat to meet + expected pattern. + * lib/autotest/general.m4 (_AT_COPYRIGHT_YEARS): Likewise. + +2009-08-12 Paolo Bonzini + + Fix testsuite log capturing for tests 183 and 186. + * tests/autotest.at (AT_CHECK_AT_PREP): Prepend AT_dir to + testsuite log file for AT_CAPTURE_FILE. + +2009-08-10 Ralf Wildenhues + + Ensure we do not regress with AC_CHECK_MEMBERS. + * tests/semantics.at (AC_CHECK_MEMBERS): Expose the recent + AC_CHECK_MEMBERS fix. + (AC_CHECK_MEMBER): New test group. + +2009-08-10 Jeff Squyres (tiny change) + + Fix typo in AC_REQUIRE description. + * doc/autoconf.texi (Prerequisite macros): Fix typo. + +2009-08-10 Paolo Bonzini + + Fix description of the macro generated by AC_CHECK_MEMBERS. + * lib/autoconf/types.m4 (_AC_CHECK_MEMBERS): Fix regex + replacement. Reported by Bruno Haible. + +2009-08-07 Romain Lenglet + + * lib/autoconf/erlang.m4 (AC_LANG(Erlang)): Make AC_RUN_IFELSE + fail if the test module doesn't compile. + +2009-08-02 Paolo Bonzini + + Use exit code to detect no occurrences with grep. + * tests/autotest.at (Erlang Eunit unit tests): Fix grep invocation. + +2009-08-01 Romain Lenglet + Paolo Bonzini + + * lib/autotest/specific.m4 (AT_CHECK_EUNIT): New file. + * lib/autotest/Makefile.am (dist_autotestlib_DATA): Add specific.m4. + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Add definitions of + variables used by AT_CHECK_EUNIT macro: ERL, ERLC, ERLCFLAGS. + * tests/autotest.at (Erlang Eunit unit tests): Add test for macro + AT_CHECK_EUNIT. + * doc/autoconf.texi (Writing Testsuites): Document macro + AT_CHECK_EUNIT. + * NEWS: Mention macro AT_CHECK_EUNIT. + +2009-07-30 Paolo Bonzini + Joel E. Denny + + Clarify comparison of echo, printf, and AS_ECHO*. + * doc/autoconf.texi (Limitations of Builtins): In echo's entry, + give a reason why printf is better than echo. In printf's + entry, cross-reference echo's entry. + +2009-07-30 Paolo Bonzini + + Add back AH_CHECK_HEADERS. + * lib/autoconf/general.m4 (AH_CHECK_HEADERS): New. + * NEWS: Create new section. + +2009-07-29 Ralf Wildenhues + + testsuite: avoid bogus hostname match from inner test logs. + * tests/autotest.at (Hard fail): Check more restrictively for + passed tests, so that hostnames recorded in the log file do not + wrongly match. + Report by Ludovic Courtès. + +2009-07-26 Eric Blake + + Release Version 2.64. + * NEWS: Mention the release. + * README: This release is stable. + * HACKING (release): Use dist-xz, not dist-lzma. + + Document some optional features in INSTALL. + * doc/install.texi (Basic Installation): Mention that INSTALL is + generic, and that not all packages implement all features. + Mention 'make distcheck' for maintainers, and 'make installcheck' + for users. Mention the GNU Coding Standards. + (Installation Names): Mention DESTDIR vs. 'make prefix= install' + as ways to alter the configuration, with caveats of each. Move + --program-prefix discussion... + (Optional Features): ...here. Mention --enable-silent-rules and + use of make V=0. + + Basic improvements to INSTALL. + * doc/install.texi (Basic Installation): Use better markup. + (Multiple Architectures): Introduce the term VPATH. + (Installation Names): Mention that --prefix must be absolute. + * doc/autoconf.texi (Preset Output Variables) + (Installation Directory Variables): Consistently refer to GNU + Coding Standards. + + Update some upstream files. + * build-aux/config.guess: Resynchronize from upstream. + * build-aux/config.sub: Likewise. + * build-aux/texinfo.tex: Likewise. + * build-aux/vc-list-files: Likewise. + * doc/standards.texi: Likewise. + +2009-07-25 Eric Blake + + Recognize new m4sugar keywords. + * lib/emacs/autoconf-mode.el (autoconf-current-defun): Recognize + m4_define_default, m4_defun_init, m4_defun_once. + (autoconf-font-lock-keywords): Likewise. + + Require m4 1.4.6, and fix testsuite to support this version. + * m4/m4.m4 (AC_PROG_GNU_M4): Reject m4 1.4.5, now that we use + regexp it can't handle. + * NEWS: Mention minimum version bump. + * README: Likewise. + * README-hacking: Likewise. + * doc/autoconf.texi (Introduction, Why GNU M4): Likewise. + * tests/tools.at (autom4te --trace and whitespace): Update test so + still work with older m4 line numbers. + * tests/m4sugar.at (m4@&t@_require: nested): Likewise. + Reported by Ralf Wildenhues. + +2009-07-25 Bruno Haible + + Clarify autom4te debugging tips. + * doc/autoconf.texi (Debugging via autom4te): Fix example from + previous commit, and add clarification. + +2009-07-25 Eric Blake + + Document some autom4te debugging tips. + * doc/autoconf.texi (Debugging via autom4te): New node. + Suggested by Bruno Haible. + + Fix font-lock. + * configure.ac (ac_cv_unsupported_fs_chars): Make editing easier. + + Let autoheader see through m4 macros in AC_DEFINE. + * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Expand macro before + tracing its name. + * lib/autoconf/autoheader.m4 (AH_VERBATIM, AH_TEMPLATE): Likewise, + for using the macro in a template file. + * tests/tools.at (autoheader and macros): New test. + * NEWS: Mention this. + Reported by Bruno Haible. + + Improve NEWS wording. + * NEWS: Use more accurate statement. + Suggestedy by Ralf Wildenhues. + +2009-07-24 Eric Blake + + Fix AS_EXIT for FreeBSD sh. + * lib/m4sugar/m4sh.m4 (AS_EXIT): Always supply an argument to the + shell function, since $? is not reliable on function entry. + (_AS_EXIT_PREPARE): Simplify to assume argument. + Reported by Ralf Wildenhues. + +2009-07-23 Eric Blake + + Run more tests under Solaris. + * tests/local.at (AT_CHECK_AUTOCONF): Don't skip entire test + group when passing over syntax checks. + +2009-07-23 Romain Lenglet + + Clean up temporary files generated by Erlang macros. + * lib/autoconf/erlang.m4 (AC_ERLANG_CHECK_LIB) + (AC_ERLANG_SUBST_ROOT_DIR, AC_ERLANG_SUBST_LIB_DIR) + (AC_ERLANG_SUBST_ERTS_VER): Delete conftest.out; renamed + erlang_cv_* cache variables into ac_cv_erlang_*. + * lib/autoconf/general.m4 (AC_RUN_IFELSE): Delete conftest.beam + files generated by Erlang compiler. + * tests/local.at (AT_CHECK_ENV): Ignore variables defined by + Erlang macros. + * tests/erlang.at (AT_SETUP_ERLANG): Delete; replace all uses by + AT_CHECK_MACRO. + * tests/Makefile.am (AUTOCONF_FILES): Revert previous addition of + generated Erlang tests; they are all hand-tested. + + Add autotests for Erlang macros. + * tests/erlang.at: Added tests for all macros in erlang.m4. + * tests/Makefile.am (TESTSUITE_HAND_AT, AUTOCONF_FILES): Added + erlang.at. + * tests/suite.at: Likewise. + * tests/compile.at (AC_LANG, AC_LANG_PUSH & AC_LANG_POP): Added + test for extension of Erlang files. + (Multiple languages): Use correct m4 quoting. + * NEWS: Mention this. + +2009-07-22 Eric Blake + + Fix test of autom4te from stdin. + * tests/tools.at (autom4te cache locking): Make stdin request + explicit, so that --force is properly used. + +2009-07-16 Eric Blake + + Don't hide leading space in autom4te --trace output. + * bin/autom4te.in (handle_traces): Don't flatten leading and + trailing space, since tracing spacing bugs can be useful. + * tests/tools.at (autom4te --trace and whitespace): New test. + +2009-07-13 Eric Blake + + Document that $srcdir can be used during configure. + * doc/autoconf.texi (Preset Output Variables): Add a paragraph. + * THANKS: Update. + Reported by Monty Taylor. + +2009-07-13 Eric Blake + + Disable asynchronous job notification for parallel tests. + * lib/autotest/general.m4 (AT_INIT) : Turn off notify + mode, since zsh leaves it on after 'emulate sh'. + * doc/autoconf.texi (Limitations of Builtins) : Document that + job control options are not portable. + + Guarantee that exit status trumps output matching. + * doc/autoconf.texi (Writing Testsuites) : Document this + better. + * tests/autotest.at (Skip, parallel skip): Enhance tests. + + Fix nits in recent patches. + * configure.ac (ac_cv_dir_trailing_space): Avoid $status, for + zsh. + * doc/autoconf.texi (Writing Testsuites) : + Tweak wording. + (Introduction): Recommend m4 1.4.13. + * README: Likewise. + * m4/m4.m4 (AC_PROG_GNU_M4): Likewise. Use long option --gnu + rather than -g. + +2009-07-13 Paolo Bonzini + + Introduce AT_SKIP_IF and AT_FAIL_IF + * NEWS: Mention AT_SKIP_IF and AT_FAIL_IF. + * doc/autoconf.texi (Autotest): Document them. + * lib/autotest/general.m4 (_AT_LINE_ESCAPED, AT_SKIP_IF, + AT_FAIL_IF, _AT_CHECK_EXIT): New. + (AT_CHECK): Use _AT_LINE_ESCAPED. + * tests/autotest.at: Add tests for AT_SKIP_IF and AT_FAIL_IF. + Use AT_SKIP_IF. + * tests/local.at: Use AT_SKIP_IF. + +2009-07-13 Paolo Bonzini + + Use m4 -g when available. + * m4/m4.m4: Unset POSIXLY_CORRECT during first test. Test for -g. + Warn user if he has POSIXLY_CORRECT set but -g is not supported. + * bin/Makefile.am: Substitute @M4_GNU@ into generated files. + * bin/autom4te.in: Pass @M4_GNU@ to m4. + +2009-07-13 Eric Blake + + Fix previous patch. + * lib/autotest/general.m4 (at_fn_check_prepare_notrace): Use + proper m4 quoting. + (_AT_DECIDE_TRACEABLE): Likewise. + +2009-07-13 Paolo Bonzini + + * lib/autotest/general.m4 (at_fn_check_prepare_notrace): Use + $at_trace_echo. Add new REASON argument. + (at_fn_check_prepare_trace): Do not call at_fn_check_prepare_notrace. + Use $at_check_filter_trace. + (at_fn_check_prepare_dynamic): Use at_fn_check_prepare_notrace. + (at_traceon): Initialize to ':'. + (at_traceoff): Remove, use 'set +x' instead throughout. + (at_check_filter_trace, at_trace_echo): New shell variables. + Initialize them if tracing is requested. + (_AT_DECIDE_TRACEABLE): Adjust call to at_fn_check_prepare_notrace. + +2009-07-12 Paolo Bonzini + + Move atlocal feature tests to configure + * configure.ac: Test for unsupported characters in files and + directories here... + * tests/atlocal.in: ... and not here. + +2009-07-09 Eric Blake + + Fix test typo. + * tests/m4sh.at (AS@&t@_INIT_GENERATED): Close fd, rather than + creating file named -. + + Fix testsuite under dash. + * tests/m4sh.at (LINENO stack, AS@&t@_BASENAME, AS@&t@_DIRNAME) + (AS@&t@_ECHO and AS@&t@_ECHO_N, AS@&t@_EXIT, AS@&t@_MKDIR_P) + (AS@&t@_VERSION_COMPARE, as_me, Negated classes in globbing) + (Functions Support, Functions and return Support) + (Nested AS@&t@_REQUIRE_SHELL_FN, Nested AS@&t@_REQUIRE) + (AS@&t@_REQUIRE_SHELL_FN and m4@&t@_require, AS@&t@_HELP_STRING) + (AS@&t@_IF and AS@&t@_CASE, AS@&t@_FOR, AS@&t@_LITERAL_IF) + (AS@&t@_VAR basics, AS@&t@_VAR_APPEND, AS@&t@_VAR_ARITH) + (AS@&t@_INIT cleanup, AS@&t@_INIT_GENERATED, AS@&t@_MESSAGE_FD) + (_AS@&t@_CLEAN_DIR, ECHO_C): Allow testing different CONFIG_SHELL + options during the testsuite run. + Reported by Ralf Wildenhues. + +2009-07-09 Ralf Wildenhues + + Ignore messages on stderr when testing for the zsh issue. + * tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Ignore stderr. + +2009-07-07 Eric Blake + + Skip parallel tests when zsh 'set -m' fails. + * tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Skip test if set -m + is not supported. + Reported by Ralf Wildenhues. + + Make parallel testsuite more portable. + * lib/autotest/general.m4 (AT_INIT) : Avoid <>; + instead open write descriptor in each group and read descriptor in + main driver. + * tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Relax condition. + +2009-07-03 Eric Blake + + Avoid syntax error in ash. + * lib/autotest/general.m4 (AT_INIT) : Avoid syntax + errors on shells that don't recognize <>. + * tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Also skip parallel + tests for this reason. Skip based on the shell to be tested, + not the shell driving the testsuite. + (parallel syntax error): Rearrange similar to previous patch. + (parallel test execution): Defer skip until after serial tests. + +2009-07-02 Eric Blake + + Skip test on shells that can't catch syntax failure. + * tests/autotest.at (Syntax error): Skip test if shell aborts on + syntax error (AIX ksh88) or doesn't detect it (zsh). + * doc/autoconf.texi (Limitations of Builtins) <.>: Mention these + limitations. + Reported by Ralf Wildenhues. + +2009-06-30 Jan Madzik (tiny change) + Ralf Wildenhues + + Avoid AIX 6.1 ksh88 ECHO_C command substitution bug. + * lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE): Ensure more than + one character is output with `\c'; reset echo output state + if buggy ksh was detected, and set ECHO_T instead of ECHO_C. + * doc/autoconf.texi (Limitations of Builtins): Document it. + * tests/m4sh.at (ECHO_C): New test. + * THANKS: Update. + +2009-06-27 William Pursell (tiny change) + + Fix grammaro in documenation. + * doc/autoconf.texi (Guidelines): Fix grammaro. + +2009-06-17 Eric Blake + + Fix AC_CHECK_HEADER infloop for gcc. + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW) + (_AC_CHECK_HEADER_OLD): Give up on AU_DEFUN, and manually warn + about obsoletion, to avoid infinite loop in gcc. + Reported by Ralf Wildenhues. + +2009-06-15 Eric Blake + + Add m4_copy_force, m4_rename_force. + * lib/m4sugar/m4sugar.m4 (m4_copy_force, m4_rename_force): New + macros. + * tests/m4sugar.at (m4@&t@_defn): Test them. + * doc/autoconf.texi (Redefined M4 Macros) : Document + them. + * NEWS: Likewise. + Suggested by Ralf Wildenhues. + + Reinstate _AC_CHECK_HEADER_OLD for gcc. + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW) + (_AC_CHECK_HEADER_OLD): Provide autoupdate versions, since gcc and + others used these undocumented macros. + Reported by Ralf Wildenhues. + +2009-06-12 Ralf Wildenhues + + Fix concurrent autom4te.cache directory creation race. + * bin/autom4te.in: Do not error out if another `autom4te' + instance created the cache directory before we could. + +2009-06-11 Steven G. Johnson + and Eric Blake + + Create a file in test program when detecting cross-compilation. + * lib/autoconf/lang.m4 (_AC_LANG_IO_PROGRAM): New macro, returns + program that creates a file. + (_AC_COMPILER_EXEEXT,_AC_COMPILER_EXEEXT_WORKS): Call new macro + and document why it's needed to robustly detect cross-compiling. + (AC_LANG_DEFINE): Copy implementation across similar languages. + * lib/autoconf/c.m4 (_AC_LANG_IO_PROGRAM(C)): Implement new macro. + * lib/autoconf/fortran.m4 (_AC_LANG_IO_PROGRAM(Fortran 77)): + Likewise. + * lib/autoconf/erlang.m4 (_AC_LANG_IO_PROGRAM(Erlang)): Likewise. + +2009-06-11 Eric Blake + + Simplify AC_LANG(Fortran). + * lib/autoconf/fortran.m4 (AC_LANG(Fortran)): Borrow from Fortran + 77, which requires reordering portions of the file. + (AC_LANG_PROGRAM(Fortran), AC_LANG_CALL(Fortran)): Now defined + automatically. + + Clarify m4_copy semantics. + * doc/autoconf.texi (Redefined M4 Macros) : Update + documentation. + * tests/m4sugar.at (m4@&t@_defn): Enhance test. + +2009-06-06 Eric Blake + + Improve documentation on trap pitfalls. + * doc/autoconf.texi (Limitations of Builtins) : Mention new + Posix 2008 requirement on trap, and dash bug in implementing it. + Mention various shell bugs with traps defined inside subshells. + Mention older bash limitation with single-command exit trap. + : Mention another 'set -e' limitation. + Reported by Jens Schmidt. + +2009-06-06 Jim Meyering + + Improve testsuite --help + * lib/autotest/general.m4: Correct the example in ./testsuite --help. + Improve wording. + +2009-06-06 Eric Blake + + Document fallback behavior of AC_PROG_LEX. + * doc/autoconf.texi (Particular Programs) : Mention + why fallback is :, and that a --version check must be used to + determine whether flex was found. + Reported by Patrick Welche. + +2009-05-28 Jim Meyering + + Fix syntax errors in autoconf.texi. + * doc/autoconf.texi (Erlang Libraries): @-escape curly braces + in example code. + +2009-05-28 Romain Lenglet + + New AC_ERLANG_SUBST_ERTS_VER macro. + * lib/autoconf/erlang.m4: Add macro AC_ERLANG_SUBST_ERTS_VER. + * doc/autoconf.texi (Erlang Libraries): Document + AC_ERLANG_SUBST_ERTS_VER. + * NEWS: Likewise. + * AUTHORS: Update Romain Lenglet's email address. + * THANKS: Update. + Suggested by Ruslan Babayev. + +2009-05-26 Eric Blake + + Sanitize more problematic environment variables. + * doc/autoconf.texi (Environment Variable Index): Add more + entries, particularly for precious variables and known culprit + variables. Needed to avoid overfull vbox. + (Special Shell Variables) : Add + variables known to cause misbehavior. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Unset variables + known to cause problems. + * THANKS: Update. + Based on reports from Ilya Bobir and Joey Mingrone. + +2009-05-21 Ralf Wildenhues + + Document VPATH = $(variable) issue in VPATH chapter. + * doc/autoconf.texi (Variables listed in VPATH): New node. + (Top, VPATH and Make): Adjust menus. + (Build Directories): Refer to it. + Prompted by report from Bruno Haible. + +2009-05-19 Eric Blake + + Update uses of all-permissive license. + * ChangeLog: Relicense under GPL. + * ChangeLog.0: Likewise. + * ChangeLog.1: Likewise. + * ChangeLog.2: Likewise. + * THANKS: Likewise. + * m4/m4.m4: Use latest wording of FSF all-permissive license. + * m4/make-case.m4: Likewise. + * doc/install.texi: Likewise. + * tests/statesave.m4: Relicense to match rest of testsuite; this + file does not need all-permissive license since it is not designed + for reuse by other packages. + * BUGS: Relicense under all-permissive license. + * HACKING: Likewise. + * NEWS: Likewise. + * README: Likewise. + * README-alpha: Likewise. + * README-hacking: Likewise. + * TODO: Likewise. + + Update some upstream files. + * build-aux/config.guess: Resynchronize from upstream. + * build-aux/gnupload: Likewise. + * build-aux/vc-list-files: Likewise. + * build-aux/texinfo.tex: Likewise. + * doc/gendocs_template: Likewise. + + Don't mention undocumented interface in NEWS. + * NEWS: Correct earlier entry about AS_FOR. + +2009-05-17 Ralf Wildenhues + + New manual section `Parallel Make'. + * doc/autoconf.texi (Parallel Make): New node, document NetBSD + `make -jN' quirks. + (Top, Portable Make): Adjust menus. + +2009-05-14 Ralf Wildenhues + + testsuite: skip `Multiple languages' test without C++ compiler. + * tests/compile.at (Multiple languages): Skip test on systems + without a C++ compiler. + Report by Jim Meyering. + +2009-05-13 Eric Blake + + Document zsh bug with empty commands. + * doc/autoconf.texi (Special Shell Variables) : Add mention of + more problems with $?. + +2009-05-11 Patrick Welche (tiny change) + + Also try X11R7 when looking for X11 files, for NetBSD. + * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Also try directories + with X11R7 in the name. + +2009-05-01 Ralf Wildenhues + + Limit stderr logging for C compiler version. + * lib/autoconf/general.m4 (_AC_RUN_LOG_LIMIT, _AC_DO_LIMIT): New + internal macros, equivalent to _AC_RUN_LOG and _AC_DO, but with + an optional additional argument to limit the number of lines of + stderr output logged, defaulting to 10. + * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Use + _AC_DO_LIMIT for capturing compiler version output. Also test + -qversion, for the IBM xlc compiler. + * lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise. + * THANKS: Update. + Report by Christian Rössel and John R. Cary against Libtool. + +2009-04-24 Eric Blake + + Fix quoting of m4 macros in AT_CHECK. + * lib/autotest/general.m4 (AT_CHECK): Expand prior to adding + escapes, to avoid shell syntax errors caused by late macro + expansion. + * NEWS: Document this change. + * tests/autotest.at (Metacharacters in command from M4 expansion): + New test. + + manual: Use consistent spelling of here-document. + * doc/autoconf.texi (Defining Symbols, Programming in M4sh) + (Common Shell Constructs, Macro Names, Writing Testsuites): Fix + spelling. + Reported by Ralf Wildenhues. + + Make AT_CHECK_UNQUOTED more like AC_DEFINE_UNQUOTED. + * lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Keep older, + undocumented semantics, where unbalanced " cannot be used in the + stdout/stderr argument. + (AT_CHECK_UNQUOTED): Treat " in stdout/stderr as a literal, since + the text is used in double-quoted context. + * tests/autotest.at (unquoted output): New test. + * doc/autoconf.texi (Writing Testsuites) : Mention which + shell expansions are handled. + + Rename AT_CHECK_NOESCAPE to AT_CHECK_UNQUOTED. + * lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Deprecate, in favor + of new spelling... + (AT_CHECK_UNQUOTED): ...for consistency with AC_DEFINE_UNQUOTED. + * doc/autoconf.texi (Writing Testsuites) : Document the + rename. + * NEWS: Likewise. + * tests/autotest.at (Binary output, Cleanup): Adjust tests. + * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): + Likewise. + Reported by Ralf Wildenhues. + +2009-04-22 Ralf Wildenhues + + New test to ensure autom4te cache file locking works. + * tests/tools.at (autom4te cache locking): New test. + Report by Eric Blake. + +2009-04-22 Paolo Bonzini + + manual: another grammar improvement. + * doc/autoconf.texi (Fortran Compiler): Avoid dependency on + pronunciation of `FCFLAGS_f90'. + +2009-04-23 Eric Blake + + Change FOO placeholder to use @var{text} instead. + * doc/autoconf.texi (Configuration Actions): Rename AC_CONFIG_FOOS + to AC_CONFIG_@var{ITEMS}. + * doc/autoconf.texi (config.status Invocation): Likewise. + (AC_FOO_IFELSE vs AC_TRY_FOO): Rename node... + (AC_ACT_IFELSE vs AC_TRY_ACT): ...to this. + +2009-04-22 Eric Blake + + Add m4_argn. + * lib/m4sugar/m4sugar.m4 (m4_argn): New macro. + * NEWS: Document it. + * doc/autoconf.texi (Looping constructs) : Likewise. + : Improve documentation. + * tests/m4sugar.at (m4 lists): New test. + +2009-04-22 Ralf Wildenhues + + Improve description of AC_PROG_CC_C89 and AC_PROG_CC_C99. + * doc/autoconf.texi (C Compiler): Document that AC_PROG_CC_C89 + and AC_PROG_CC_C99 prefer extended over strict conformance modes. + Report by Vincent Lefèvre. + +2009-04-21 Ralf Wildenhues + + Revert bogus change in last commit. + * doc/autoconf.texi (Initialization Macros): Revert change. + Spotted by Eric Blake. + + manual: fix trivial grammar errors. + * doc/autoconf.texi (Fortran Compiler, Initialization Macros) + (Limitations of Usual Tools, Pretty Help Strings) + (config.status Invocation): Fix `a' vs. `an' errors. + Report by Eric Blake. + +2009-04-21 Eric Blake + + Shuffle maintainer-specific rules. + * Makefile.am (maintainer-check-tests): Delete. + (autom4te-update): Move... + * cfg.mk (autom4te-update): ...here. + (fetch): Depend on autom4te-update. Split... + (gnulib-update): ...into new rule. Import move-if-change from + gnulib. + * maint.mk (maintainer-distcheck): Absorb former maintainer-check + rule. + * build-aux/move-if-change: New file, undistributed. + * .gitattributes: Handle new upstream file. + * .gitignore: Ignore maintainer cruft. + * HACKING: Update maintainer instructions. + * build-aux/config.guess: Update from upstream. + * build-aux/config.sub: Likewise. + * build-aux/gendocs.sh: Likewise. + * build-aux/texinfo.tex: Likewise. + * doc/gendocs_template: Likewise. + * doc/standards.texi: Likewise. + +2009-04-19 Ralf Wildenhues + + Sync autom4te perl modules from Automake. + * lib/Autom4te/Channels.pm: Sync from Automake. + * lib/Autom4te/FileUtils.pm: Likewise. + * lib/Autom4te/XFile.pm: Likewise. + + Adjust channel definitions for new Automake `ordered' flag. + * lib/Autom4te/ChannelDefs.pm (Autom4te::ChannelDefs): Set + `ordered' flag to zero for channels `fatal', `automake', and + `verb'. This has currently no effect on actual semantics but + avoids a consistency check needed for Automake's usage of the + Channels.pm code. + + manual: clarify m4_if synopsis. + * doc/autoconf.texi (Redefined M4 Macros): Rewrite synopsis of + m4_if in the presence of more than three arguments. + + Improve and clarify `config.status' usage documentation. + * doc/autoconf.texi (config.status Invocation): Fix markup in + synopsis. Use `tag' instead of `file' notation for the + non-option arguments, to be consistent with the documentation + of the AC_CONFIG_* macros. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise, + use `tag' notation for non-option arguments. + Report by John Calcote. + +2009-04-15 Eric Blake + + Test that autotest handles binary output. + * tests/autotest.at (Binary output): New test. + Suggested by Ralf Wildenhues. + + Add stdout-nolog and ignore-nolog to AT_CHECK. + * lib/autotest/general.m4 (AT_DIFF_STDERR(stderr-nolog)) + (AT_DIFF_STDERR(ignore-nolog), AT_DIFF_STDOUT(stdout-nolog)) + (AT_DIFF_STDOUT(ignore-nolog)): New macros. + * tests/autotest.at (Logging): New test. + * doc/autoconf.texi (Writing Testsuites) : Document the + new logging actions. + * NEWS: Likewise. + Reported by Ralf Wildenhues. + + Teach AT_CHECK about hard failures. + * lib/autotest/general.m4 (AT_INIT) + : Handle hard + failures. + * doc/autoconf.texi (Writing Testsuites) : Document + AT_CHECK_NOESCAPE and exit status 99. + * NEWS: Likewise. + * tests/autotest.at (Hard fail, Cleanup): New tests. + +2009-04-14 Eric Blake + + Fix yesterday's regression in AS_IF. + * lib/m4sugar/m4sh.m4 (_AS_IF_ELSE): Don't corrupt $? in else + branch; it is up to the user to avoid syntax errors. + * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Adjust test. + +2009-04-14 Ralf Wildenhues + + Add traces for AM_SILENT_RULES. + * lib/autom4te.in (Automake-preselections): Trace + AM_SILENT_RULES. + +2009-04-13 Eric Blake + + Improve documentation related to expanded-before-required. + * doc/autoconf.texi (Expanded Before Required): Add a case study. + (Running the Compiler) : Remind users that + running a compile test will AC_REQUIRE the compiler check. + (Macro Definitions) : Contrast AC_DEFUN and m4_define. + (C Compiler) : Mention the fact that only first + invocation of this macro checks for $EXEEXT, and that many other + macros use it via AC_REQUIRE. + Reported by Andreas Schwab. + + Mention latest rules about make and set -e. + * doc/autoconf.texi (Failure in Make Rules): Posix is now clear + that make must use set -e. + (Limitations of Builtins) : Clarify more about set -e + behavior. + + Improve documentation about if exit status. + * doc/autoconf.texi (Limitations of Builtins) : Mention that + exit status bugs don't affect modern targets. + Reported by Andreas Schwab. + + Add cross-reference to new macros. + * doc/autoconf.texi (Text processing Macros) + : Reference the new m4_ifblank. + Suggested by Mike Frysinger. + + Make AS_IF, AS_CASE, and AS_FOR more robust to blank arguments. + * lib/m4sugar/m4sh.m4 (_AS_CASE, _AS_CASE_DEFAULT, AS_FOR, _AS_IF) + (_AS_IF_ELSE, AS_IF): Avoid syntax error on blank argument, + including a macro with an empty expansion. + * NEWS: Mention this. + * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE, AS@&t@_FOR): Update + tests. + Reported by Mike Frysinger. + + Add m4_blank and friends. + * lib/m4sugar/m4sugar.m4 (m4_blank, m4_nblank, m4_default_nblank) + (m4_default_nblank_quoted): New macros. + * NEWS: Document them. + * doc/autoconf.texi (Conditional constructs): Likewise. + * tests/m4sugar.at (m4sugar shorthand conditionals): New test. + Suggested by Mike Frysinger. + +2009-04-13 Eric Blake + + Finish upgrade to GFDL 1.3. + * doc/autoconf.texi (copying): Use correct license; comment change + was missed on 2008-11-04. + +2009-04-10 Eric Blake + + Test parallel handling of syntax error. + * tests/autotest.at (parallel syntax error): New test. + Suggested by Ralf Wildenhues. + +2009-04-10 Ralf Wildenhues + + Document awk and config.status line length limitations. + * doc/autoconf.texi (Configuration Actions): The input to + config.status should have reasonable line length. + (Limitations of Usual Tools): Document IRIX, HP-UX awk input + line length limit. + Report by Bruno Haible. + + Skip `Multiple languages' test if CC is a C++ compiler. + * tests/compile.at (Multiple languages): Before starting the + test proper, build and run a configure script that tests the + C compiler only, and skips the test if this is found to be a + C++ compiler. + Report by Eric Blake. + + Note that AC_DEFUN is needed for aclocal. + * doc/autoconf.texi (Coding Style): Public third-party macros + should be AC_DEFUN'ed. + Report by John Calcote. + +2009-04-10 Eric Blake + + Add undocumented _AS_CLEAN_DIR. + * lib/m4sugar/m4sh.m4 (_AS_CLEAN_DIR): New macro; fixes m4 quoting + in previous patch. + * lib/autotest/general.m4 (AT_INIT) : Use new + macro. + * tests/m4sh.at (_AS@&t@_CLEAN_DIR): New test. + Reported by Ralf Wildenhues. + +2009-04-09 Eric Blake + + Avoid problems caused by deleting in-use directory. + * lib/autotest/general.m4 (AT_INIT) : Only + remove the contents of $at_group_dir, not the directory itself. + + Fix regression in empty test. + * lib/autotest/general.m4 (AT_SETUP): Prep AT_ingroup for fallback + use in empty test. Fixes regression introduced 2009-04-06. + (_AT_CHECK): Undo fallback when a test is not empty. + (AT_CLEANUP): Expand AT_ingroup before deleting. + +2009-04-09 Paolo Bonzini + + Make a less conservative cross-compilation guess for AC_FUNC_UTIME_NULL. + * lib/autoconf/functions.m4 (AC_FUNC_UTIME_NULL): Assume + not crosscompiling to an obsolete system. + +2009-04-08 Ralf Wildenhues + + Automake relies on the undocumented `_AC_COMPILER_EXEEXT' macro. + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT): Document that + Automake relies on this macro. + +2009-04-06 Eric Blake + + Reduce testsuite size. + * tests/statesave.m4: New file. + * tests/Makefile.am (EXTRA_DIST): Distribute it. + * tests/local.at (AT_CONFIGURE_AC): Reuse file, rather than + repeating inline definition of AC_STATE_SAVE. + (AT_CHECK_ENV): Factor code... + (_AT_CHECK_ENV): ...into shell function. + * tests/m4sh.at (AT_DATA_LINENO): Avoid churn in testsuite. + + Handle shell comments in AT_CHECK. + * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Handle # in + test correctly. Latent bug in handling shell comment was first + fixed 2008-11-20, but regressed two patches later. + * tests/autotest.at (Shell comment in command): New test. + * NEWS: Document the fix. + + Hard fail any test with syntax errors. + * lib/autotest/general.m4 (AT_INIT) : + Guarantee test failure on syntax error, rather than inheriting + status from previous test. + * tests/autotest.at (Syntax error): New test. + +2009-03-31 Eric Blake + + Beta Release Version 2.63b. + * NEWS: Mention the release. + * README: Clarify that this is a beta release. + * build-aux/texinfo.tex: Synchronize from upstream. + * .x-sc_trailing_blank: Exempt more upstream files. + +2009-03-30 Eric Blake + + Fix testsuite failures under zsh. + * tests/local.at (AT_CHECK_ENV): Exempt $argv and $ARGC, which are + set by zsh -c 'emulate sh'. + Reported by Ralf Wildenhues. + + For now, skip parallel tests under less-tested shells. + * tests/autotest.at (AT_CHECK_AT): Add pre-test argument. + (Tested programs, Startup error messages, AT_CHECK_AT_TITLE) + (Fallacy, Skip, errexit, Long test source lines) + (Debugging a successful test, Debugging script and environment) + (Debugging a failed test, Using atlocal) + (Choosing where testsuite is run): Adjust callers. + (AT_SKIP_PARALLEL_TESTS): New macro, to skip parallel tests except + under zsh, bash, or when TEST_PARALLEL_AUTOTEST is defined. Makes + it easier to avoid testsuite hangs for users with dash or other + less-tested shell. + (parallel test execution, parallel truth, parallel fallacy) + (parallel skip, parallel errexit) + (parallel autotest and signal handling): Use it. + * BUGS: Mention this. + +2009-03-24 Andris Pavenis (tiny change) + + Fix awk substitution of carriage returns on DJGPP. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix typo in + generation of ac_cs_awk_cr. + * THANKS: Update. + +2009-03-24 Aaron W. LaFramboise (tiny change) + + Work around cygwin bash igncr mode. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fall back to + bash carriage returns if ac_cr lost \r from ``. + * THANKS: Update. + Suggested by Eric Blake. + +2009-03-24 Eric Blake + + Fix underquoted example in manual. + * doc/autoconf.texi (Common Shell Constructs) : + Properly m4-quote #. + * THANKS: Update spelling. + Reported by Matěj Týč. + +2009-03-18 Eric Blake + + Manual: mention more expr pitfalls. + * doc/autoconf.texi (Limitations of Usual Tools) : + Mention HP-UX limitation, and $ ambiguity. + * THANKS: Update. + Reported by Jens Schmidt, in http://bugs.debian.org/466990. + +2009-03-17 Jim Meyering + + Manual: fix a typo. + * lib/m4sugar/m4sh.m4: s/are/is/ => "there is no indirection" + +2009-03-17 Eric Blake + + Use test consistently in examples. + * doc/autoconf.texi (Subdirectories, Caching Results) + (Common Shell Constructs, Prerequisite Macros, Coding Style) + (Changed Results, Particular Programs, Defining Symbols): + Protect against arbitrary user strings. + (Multiple Cases): Mention why $fstype does not need protection. + Reported by Reuben Thomas. + + Improve confusing section names. + * doc/autoconf.texi (Specifying Names): Rename node... + (Specifying Target Triplets): ...to this. + (Generic Programs): Adjust references. + * doc/install.texi (System Type): Touch up formatting. + * THANKS: Update. + Reported by Tim Freeman, in http://bugs.debian.org/312873. + + Remove historical inaccuracy. + * doc/autoconf.texi (Portable Shell): Don't perpetuate myth about + #!/bin/sh needing a space. + Reported by Reuben Thomas. + + Recommend AS_HELP_STRING more prominently. + * doc/autoconf.texi (External Software): Reduce mention of + hand-written help strings. + Reported by Reuben Thomas. + +2009-03-16 Eric Blake + + Fix 'make pdf'. + * doc/autoconf.texi (Balancing Parentheses): Fix usage of + @itemize. + Reported by Ralf Wildenhues, fix suggested by Karl Berry. + +2009-03-14 Eric Blake + + Resync upstream files. + * GNUmakefile: Run 'make fetch'. + * build-aux/announce-gen: Likewise. + * build-aux/config.guess: Likewise. + * build-aux/config.sub: Likewise. + * build-aux/gnupload: Likewise. + * build-aux/texinfo.tex: Likewise. + * build-aux/vc-list-files: Likewise. + * doc/gnu-oids.texi: Likewise. + * doc/standards.texi: Likewise. + +2009-03-09 Ralf Wildenhues + + New test for SunStudio `restrict' handling. + * tests/c.at (AC_C_RESTRICT and C++): New test. + Prompted by bug report from Rolf Vandevaart. + +2009-03-08 Ralf Wildenhues + + Manual: testsuite depends on package.m4. + * doc/autoconf.texi (Making testsuite Scripts): In the example + makefile snippet, $(TESTSUITE) depends on $(srcdir)/package.m4. + +2009-03-02 Allan Caffee (tiny change) + + Fix a typo in comment for AS_LITERAL_IF. + * lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Update a comment that fell + out of date when this function was moved/renamed in 59ecd766. + * THANKS: Update. + +2009-03-02 Eric Blake + + Improve wording for AS_ESCAPE. + * doc/autoconf.texi (Common Shell Constructs) : Touch + up documentation. + * lib/m4sugar/m4sh.m4 (_AS_ESCAPE): Fix comment typos. + Reported by Ralf Wildenhues. + +2009-02-24 Eric Blake + + Use pkgdatadir consistently. + * bin/Makefile.am (edit): Substitute pkgdatadir, not datadir. + * lib/Makefile.am (edit): Likewise. + * lib/autom4te.in (Autoconf-without-aclocal-m4, Autotest, M4sh) + (M4sugar): Use @pkgdatadir@, not @datadir@. + * bin/autoheader.in ($datadir): Likewise. + * bin/autom4te.in ($datadir): Likewise. + * bin/autoreconf.in ($datadir): Likewise. + * bin/autoscan.in ($datadir): Likewise. + * bin/autoupdate.in ($datadir): Likewise. + * bin/ifnames.in ($datadir): Likewise. + * doc/autoconf.texi (Installation Directory Variables): Update + example to be consistent; focus on $(bindir) as an autoconf + variable, and mention that $(pkgdatadir) comes from automake. + Reported by Reuben Thomas. + +2009-02-19 Eric Blake + + Use m4_translit more efficiently in AS_ESCAPE. + * lib/m4sugar/m4sh.m4 (_AS_ESCAPE): Alter API to take first byte + of set separately from rest. + (AS_ESCAPE, _AS_QUOTE_MODERN, AS_TR_SH, AS_VAR_GET): Adjust + callers. + * lib/autoconf/autoheader.m4 (AH_VERBATIM): Avoid duplicate + characters in translit request. + * doc/autoconf.texi (Common Shell Constructs) : + Document the macro. + * NEWS: Likewise. + + Mention recently documented macros. + * NEWS: Update list of new documentation. + +2009-02-14 Ralf Wildenhues + + Add index for config.site. + * doc/autoconf.texi (Site Defaults): Add index for config.site. + * THANKS: Update. + Report by Stephen P. Schaefer. + +2009-02-12 Eric Blake + + Fix m4_set speed regression introduced 2008-12-18. + * lib/m4sugar/m4sugar.m4 (_m4_stack_reverse): Alter API to avoid + creating larger argument on each iteration. + (m4_stack_foreach_sep, m4_stack_foreach_sep_lifo) + (_m4_set_contents_2): Adjust all four-argument callers. + +2009-02-05 Eric Blake + + Mention new AC_DEFUN_ONCE clients. + * NEWS: Mention recent semantic changes. + Reported by Ralf Wildenhues. + +2009-02-03 Eric Blake + + Use AC_DEFUN_ONCE for some one-shot AC_PROG macros. + * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Switch to + AC_DEFUN_ONCE, since this is a one-shot macro. + (AC_PROG_INSTALL): Likewise. + +2009-02-03 Eric Blake + + Mention that packagers should not pre-set CFLAGS. + * doc/autoconf.texi (Preset Output Variables) : Copy + advice given by automake on handling variables reserved by GNU + Coding Standards. + Reported by Karl Berry. + + Document lib64 in config.site. + * doc/autoconf.texi (Site Defaults): Fix typo in FHS sample file. + Mention use of lib64. + * THANKS: Update. + Reported by Tom Browder, with help from Peter Breitenlohner. + +2009-01-28 Eric Blake + + Use AC_DEFUN_ONCE for uncontroversial one-shot macros. + * lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Switch to + AC_DEFUN_ONCE, since this is a one-shot macro. + * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Likewise. + * lib/autoconf/general.m4 (AC_CANONICAL_BUILD) + (AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise. + +2009-01-28 Eric Blake + + Reduce blank lines in AC_DEFUN_ONCE macros. + * lib/m4sugar/m4sugar.m4 (m4_defun_once): Avoid redundant blank + line when a defun_once macro is required. + (_m4_defun_once): New helper macro, for less memory use. + * tests/m4sugar.at (m4@&t@_require: nested): Adjust test. + + Silence another false positive expand-before-require. + * lib/m4sugar/m4sugar.m4 (_m4_defun_pro_outer) + (_m4_defun_epi_outer, _m4_require_call, m4_provide): Track name + that caused a diversion change, not just diversion number. + (m4_require): Factor... + (_m4_require_check): ...into new macro, which also checks whether + diversion that performed the expansion has been collected. + * tests/m4sugar.at (m4@&t@_require: nested): Enhance test. + Reported by Ralf Wildenhues. + +2009-01-28 Eric Blake + + Fix AC_C_RESTRICT for Sun Studio 12 C++. + * lib/autoconf/c.m4 (AC_C_RESTRICT): Newer Sun Studio C provides + __restrict__ rather than _Restrict, which still trips up Sun + Studio 12 C++. + * THANKS: Update. + Reported by Rolf Vandevaart. + +2009-01-28 Eric Blake + + Fix years in copyright notices. + * lib/m4sugar/m4sugar.m4 (m4_copyright_condense): New macro, + undocumented for now. + * lib/m4sugar/Makefile.am (version.m4): Add m4_PACKAGE_YEAR, + m4_PACKAGE_URL. + (RELEASE_YEAR): New macro, copied from bin/Makefile.am. + * lib/autoconf/general.m4 (_AC_COPYRIGHT_YEARS): New macro. + (AC_COPYRIGHT): Add undocumented third parameter. + (_AC_INIT_COPYRIGHT): Avoid need to bump copyright years. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Likewise. + (AT_COPYRIGHT): Add undocumented third parameter. + * tests/local.at (AT_COPYRIGHT): Don't add an extra copyright + parameter; the generic copyright given by autotest is sufficient + since we are the package that owns autotest. + +2009-01-27 Eric Blake + + Use URLs in --help output, part 3: testsuite. + * doc/autoconf.texi (Writing Testsuites): Mention autotest + namespace. + (Writing Testsuites) : Mention mandatory macros. + (Making testsuite Scripts): Document AT_PACKAGE_URL. + * tests/Makefile.am (package.m4): Follow our own advice. + * lib/autotest/general.m4 (AT_INIT): Give the user a hint about + package.m4. Enhance --help output. + (_AT_COPYRIGHT_YEARS): New macro, to make copyright bump easier. + + Use URLs in --help output, part 2: configure. + * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Bump copyright + date. + (_AC_INIT_PACKAGE): Support optional URL parameter, mapped to + AC_PACKAGE_URL. + (_AC_INIT_DEFAULTS, _AC_INIT_PREPARE): Substitute it. + (_AC_INIT_HELP): Use it in './configure --help' output. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise, for + './config.status --help'. Bump copyright date. + * doc/autoconf.texi (Initializing configure) : Document + new parameter. + * NEWS: Likewise. + * tests/tools.at (autoheader): Adjust test. + * tests/torture.at (@%:@define header templates) + (Torturing config.status): Likewise. + + Use URLs in --help output, part 1: autoconf executables. + * bin/autoconf.as (usage): Make output consistent with recent + change in gnulib version-etc module. + * bin/autoheader.in ($help): Likewise. + * bin/autom4te.in ($help): Likewise. + * bin/autoreconf.in ($help): Likewise. + * bin/autoscan.in ($help): Likewise. + * bin/autoupdate.in ($help): Likewise. + * bin/ifnames.in ($help): Likewise. + +2009-01-27 Peter Breitenlohner (tiny change) + + Quote traced macros passed from autom4te to M4. + * bin/autom4te (handle_m4): Apply shell_quote to macro names. + * tests/tools.at (autom4te --trace and unusual macro names): New + test. + * THANKS: Update. + +2009-01-26 Eric Blake + + Improve AC_DEFUN_ONCE semantics. + * lib/m4sugar/m4sugar.m4 (m4_defun_once): Rewrite to be no-op, + rather than warning, on second use, and make sure first use never + occurs out of order. + * tests/m4sugar.at (m4@&t@_require: one-shot initialization): + Enhance test. + * tests/base.at (AC_REQUIRE & AC_DEFUN_ONCE: [Require, expand], + (AC_REQUIRE & AC_DEFUN_ONCE: [Expand, require]): Adjust tests. + * NEWS: Document this. + * doc/autoconf.texi (Macro Definitions) : Mention + AC_DEFUN_ONCE. + (Prerequisite Macros) : Likewise. + (Expanded Before Required): Likewise. + (One-Shot Macros) : Document new semantics. + Reported by Bruno Haible, with suggestion by Paolo Bonzini. + +2009-01-24 Eric Blake + + Fix typos in recent patches. + * lib/m4sugar/m4sugar.m4: Improve m4_defun comments. + * doc/autoconf.texi (Expanded Before Required): Fix typos. + Reported by Ralf Wildenhues. + + Revert change to AC_DIR_HEADER. + * lib/autoconf/headers.m4 (AC_DIR_HEADER): Explicitly expanding + AC_HEADER_DIRENT no longer triggers a warning, and helps the user + who decides they don't need the obsolete AC_FUNC_CLOSEDIR_VOID. + Reported by Paolo Bonzini. + +2009-01-22 Eric Blake + + Silence a false positive expand-before-require case. + * lib/m4sugar/m4sugar.m4 (m4_provide): Track the diversion in + which a macro was provided. + (m4_require): Compare diversion numbers, rather than m4_require + nesting, when determining direct requires. + * tests/m4sugar.at (m4@&t@_require: nested): Test it. + Reported by Ralf Wildenhues, affecting Libtool. + +2009-01-21 Eric Blake + + Fix out-of-order expansion with expand-before-require. + * lib/m4sugar/m4sugar.m4 (m4_require): Redundantly expand a + required macro when issuing expand-before-require warning. + * doc/autoconf.texi (Prerequisite Macros): Adjust documentation. + (Expanded Before Required): New node. + * tests/m4sugar.at (m4@&t@_require: nested): Adjust test. + * NEWS: Mention this fix. + Suggested by Bruno Haible. + + Warn if macro is provided before indirectly required. + * lib/m4sugar/m4sugar.m4 (m4_provide): Track the set of all macros + provided since last outermost defun. + (_m4_defun_pro_outer): Empty the set. + (_m4_require_call): Distinguish between direct and indirect + requires, and remove required macros from the set. + (m4_require): Check the set, in order to warn. + * tests/m4sugar.at (m4@&t@_require: nested): Remove xfail, and add + test case for direct requires. + +2009-01-20 Eric Blake + + Clean up some bugs caught by preliminary dependency validation. + * lib/autoconf/headers.m4 (AC_DIR_HEADER): Don't invoke + AC_HEADER_DIRENT, since AC_FUNC_CLOSEDIR_VOID requires it. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL) + (_AS_SHELL_SANITIZE): Fix quoting bugs. + +2009-01-19 Eric Blake + + Improve AC_REQUIRE documentation. + * doc/autoconf.texi (Macro Definitions) : Add @defmac, + and mention interaction with AC_REQUIRE. + (Prerequisite Macros) : Give more detail on user + ordering constraint bug, and how to fix it. + * tests/m4sugar.at (m4@&t@_require: nested): New test. + + Speed up m4_require. + * lib/m4sugar/m4sugar.m4 (_m4_divert_dump): Change semantics to + always be defined, as either empty or a number. + (_m4_defun_pro_outer, _m4_defun_epi_outer): Treat _m4_divert_dump + as a stack, rather than a one-shot macro. + (_m4_require_call): Expect third argument to be pre-expanded. + (m4_divert_require, m4_require): Adjust clients accordingly. + * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Likewise. + +2009-01-17 Eric Blake + + Avoid underfull hbox. + * doc/autoconf.texi (Installation Directory Variables): Reword to + fit on line. + +2009-01-14 Ralf Wildenhues + + Ignore `set -e'-related failure of NetBSD sh. + * tests/m4sh.at (AS@&t@_EXIT): Skip test if (NetBSD) shell + fails to finish EXIT trap after set -e. + +2009-01-06 Eric Blake + + Maintainer cleanups. + * cfg.mk (web-manual): Use new feature of gendocs. + (fetch): Fetch gendocs. + * Makefile.am (EXTRA_DIST): Distribute new file. + * doc/Makefile.am (EXTRA_DIST): Likewise. + * .gitattributes: Ignore whitespace in upstream files. + * HACKING (Other web updates): Update Free Software Directory + instructions. + (Upload): No longer mention xdelta. + * maint.mk (xd-delta): Likewise. + * build-aux/gendocs.sh: New upstream file. + * doc/gendocs_template: Likewise. + * build-aux/announce-gen: Resync from upstream. + * build-aux/config.guess: Likewise. + * build-aux/config.sub: Likewise. + * build-aux/gnupload: Likewise. + * build-aux/texinfo.tex: Likewise. + +2008-12-30 Eric Blake + + Make it easier to track diversion bugs. + * lib/m4sugar/m4sugar.m4 (_m4_divert_raw, _m4_undivert): New + internal macros, which are easier to trace than m4_builtin. + (m4_cleardivert, m4_divert, m4_divert_push, m4_divert_pop) + (m4_undivert): Use them. + (_m4_require_call): Likewise. Use fewer macros. + * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Fix typo. + +2008-12-26 Bruno Haible + + Improve multiarch detection. + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Make detection of options + indicating a universal build more reliable. + +2008-12-28 William Pursell (tiny change) + + Use AS_CASE in documented example. + * doc/autoconf.texi (Using the System Type): Use AS_CASE in + example instead of raw case. + +2008-12-23 Eric Blake + + Make m4_dumpdef more useful with M4 1.6. + * lib/m4sugar/m4sugar.m4 (_m4_dumpdef): New macro. + (m4_init): Install it for new enough m4. + * tests/m4sugar.at (m4@&t@_dumpdef): Enhance test. + * doc/autoconf.texi (Redefined M4 Macros) : Mention + lack of sorting. + +2008-12-24 Bruno Haible + + Improve INSTALL for HP-UX. + * doc/install.texi (Particular Systems): For HP-UX, also recommend + -D_XOPEN_SOURCE=500. Needed for the declaration of mbstate_t on + HP-UX 11.11. + +2008-12-22 Bruno Haible + + Improve INSTALL for Haiku. + * doc/install.texi (Particular Systems): Add a recommendation + which prefix to use on Haiku. + +2008-12-19 Eric Blake + + Fix typo in previous commit. + * doc/autoconf.texi (Set manipulation Macros) : + Fix typo. + + Document some recently added macros. + * lib/m4sugar/m4sugar.m4 (m4_map_args_w): Add optional sep + parameter. + * doc/autoconf.texi (Looping constructs) + : Document + new macros. + (Set manipulation Macros) : Likewise. + * tests/m4sugar.at (m4@&t@_stack, M4 loops): Enhance tests. + * NEWS: Document new macros. + +2008-12-18 Eric Blake + + Fix separator in m4_stack_foreach_sep. + * lib/m4sugar/m4sugar.m4 (_m4_stack_reverse): Separate separator + from prefix. + * tests/m4sugar.at (m4@&t@_stack): Enhance test. + +2008-12-18 Eric Blake + + Mention limitation of M4 1.4.x on builtin tokens. + * doc/autoconf.texi (Redefined M4 Macros) : Document + ramification of M4 1.4.x's inability to pass builtin tokens + through text macros. + (Evaluation Macros) : Likewise. + * tests/m4sugar.at (m4@&t@_defn): Enhance test. + * NEWS: Mention subtle change in m4_dumpdef semantics. + + Document m4_version_prereq. + * doc/autoconf.texi (Number processing Macros) + : Add documentation. + * NEWS: Mention it. + Reported by Bruno Haible. + +2008-12-10 Jim Meyering + + AC_HEADER_ASSERT: don't say assertions are disabled when they're not + * lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Do not make configure + report "checking whether to enable assertions... no", when they are + in fact enabled. This is solely a bug in the output of configure. + In spite of saying "no", NDEBUG was not defined in that case. + Also, as noted by Eric Blake, leave assertions enabled upon + --enable-assert=INVALID. + +2008-12-09 Eric Blake + + Fix m4_location inside m4_wrap with m4 1.4.5. + * lib/m4sugar/m4sugar.m4 (m4_undefine): Redefine m4_location + inside wrapped text if older m4 is detected. + Reported by William Pursell. + +2008-12-08 William Pursell (tiny change) + and Eric Blake + + Fix AC_HEADER_ASSERT w.r.t. --enable-assert. + * lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Honor --enable-assert, + rather than treating it as a synonym for --disable-assert. + * NEWS: Document the fix. + +2008-12-06 William Pursell (tiny change) + + Fix AC_HEADER_ASSERT to honor --enable-assert, rather than + treat --enable-assert and --disable-assert equivalently. + * lib/autoconf/headers.m4 (AC_HEADER_ASSERT): Check value of $enableval. + +2008-12-05 William Pursell (tiny change) + + Fix some typos and grammatical errors in documentation. + * doc/autoconf.texi: Clean up some bad use of English. + +2008-12-03 Eric Blake + + Improve AC_STATE_SAVE. + * tests/local.at (AC_STATE_SAVE): Avoid ls -1, and use one less + process by hoisting the uniqueness check into sed. + * doc/autoconf.texi (Limitations of Usual Tools) : Mention + MacOS bug. + +2008-12-02 Eric Blake + + Avoid MacOS readdir bug in testsuite. + * tests/local.at (AC_STATE_SAVE): Avoid spurious failures due to + duplicated ls entries. + * THANKS: Update. + Reported by Bruce Dugan and others. + +2008-11-29 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_JOB_FIFO_FD): Hide zsh 4.3.4 + error messages about `set -m'. + +2008-11-27 Ralf Wildenhues + + Fix a couple of test failures with dash. + * tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Normalize + exit status of `cd'. + * tests/m4sh.at (AS_MESSAGE_LOG_FD): Remove script before + regeneration, to avoid timing effects. + +2008-11-25 Eric Blake + + Add m4_cleardivert. + * lib/m4sugar/m4sugar.m4 (m4_cleardivert): New macro. + * lib/autotest/general.m4 (AT_INIT): Use it. + * lib/autoconf/general.m4 (_AC_INIT_NOTICE): Likewise. + * tests/m4sugar.at (m4@&t@_divert_stack): Test it. + * doc/autoconf.texi (Diversion support) : Document + it. + * NEWS: Likewise. + Suggested by Paolo Bonzini. + + Add safety check for m4_expand vs. diversions. + * lib/m4sugar/m4sugar.m4 (m4_expand): Make more robust against + diverted text. + * doc/autoconf.texi (Evaluation Macros) : Document new + safety check. + +2008-11-24 Eric Blake + + Fix typo in AS_MESSAGE_LOG_FD patch. + * lib/m4sugar/m4sh.m4 (AS_ERROR): Check correct condition. + +2008-11-23 Ralf Wildenhues + + More reliable signal handling in Autotest. + * lib/autotest/general.m4 (Driver loop): Rewrite signal handler. + Start parallel jobs in their own process group, enabling job + control in the shell if possible, for better signal handling. + Deal with INT, TERM, and HUP in the testsuite driver. In the + parallel driver, propagate TSTP to jobs either as TSTP or as + STOP (to avoid fork bombs with ksh). + Inside the job processes, add PIPE handler to write back the + job token, so the master process does not hang. + Disable the parallel driver if job control is not provided or if + trap does not understand signal names. + * tests/autotest.at (parallel autotest and signals): New test, + exercises INT, TERM, and PIPE, serial and parallel, with and + without `make' in the loop. + Kudos to Richard Stevens for writing APUE. + +2008-11-22 Eric Blake + + Fix testsuite failure on Solaris. + * tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Normalize + failure status to 1. + +2008-11-21 Eric Blake + + Clean up AS_MESSAGE_LOG_FD usage. + * lib/m4sugar/m4sh.m4 (AS_MESSAGE_FD, AS_MESSAGE_LOG_FD) + (AS_ORIGINAL_STDIN_FD): Provide default M4sh values. + (_AS_ECHO_LOG, AS_MESSAGE, _AS_ERROR_PREPARE, AS_ERROR): Simplify + usage. + (AS_INIT_GENERATED): Don't shuffle an unchanged AS_MESSAGE_FD. + * tests/m4sh.at (AS@&t@_INIT_GENERATED): Update test. + (AS@&t@_MESSAGE_FD): New test. + * doc/autoconf.texi (Initialization Macros) : + Give more details about fd manipulation. + (File Descriptor Macros): Describe M4sh defaults for the fds. + +2008-11-21 Eric Blake + + Use shell function for AS_ERROR. + * lib/m4sugar/m4sh.m4 (_AS_ERROR_PREPARE): New macro, defining a + new shell function. + (AS_ERROR): Use it. + (_AS_LINENO_PREPARE): Break circular dependency. + (AS_PREPARE, _AS_PREPARE): Initialize for child scripts. + +2008-11-21 Eric Blake + + Fix typos in recent testsuite improvements. + * lib/autotest/general.m4 (AT_INIT) : + Fix typo. + * NEWS: Clarify the potential impact to users. + * tests/autotest.at (AT_DATA_AUTOTEST): New macro, patterned after + AT_DATA_M4SUGAR. + (AT_CHECK_AT_PREP, AT_CHECK_AT_TITLE): Use it. + (unusual file names): Test that the recent echo fix does not + regress. Fix quoting bug that made the test a no-op. + Reported by Paolo Bonzini and Ralf Wildenhues. + +2008-11-21 Eric Blake + + Use modern m4sh constructs in autoconf. + * bin/autoconf.as (exit_missing_arg, getopt): Use AS_ERROR, rather + than AS_EXIT. + + Change the semantics of AS_EXIT without argument. + * lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE): When defaulting, use $? + even if it is 0. + (AS_ERROR): Guarantee non-zero status. + * bin/autoconf.as (exit_missing_arg, getopt): Revert prior change; + we want non-zero status. + * tests/m4sh.at (AS@&t@_EXIT): Update test accordingly. + * doc/autoconf.texi (Common Shell Constructs) : Update + the documentation. + : Don't overly restrict implementation. + (Printing Messages) : Describe better default. + Suggestions by Paolo Bonzini and Ralf Wildenhues. + +2008-11-21 Eric Blake + + Add @anchors within Builtins and Usual Tools lists. + * doc/autoconf.texi (Limitations of Builtins) + (Limitatations of Usual Tools): Add anchors for tools called out + by name. Adjust callers to narrow in on tool of interest. + + Move case statement style discussion to m4 quoting section. + * doc/autoconf.texi (Limitations of Builtins): Move comparison of + quoting styles... + (Balancing Parentheses): ...to this new node. + Suggested by Ralf Wildenhues. + +2008-11-20 Eric Blake + + Factor more common code out of AT_CHECK into shell function. + * lib/autotest/general.m4 (_AT_CHECK): Avoid echo bug if AT_LINE + starts with -. Move preparations... + (AT_INIT) + : + ...into these new shell functions. + : Inline into only caller. + (_AT_DECIDE_TRACEABLE): Use them to condense testsuite size. + +2008-11-20 Eric Blake + + Handle version numbers as decimal, even if they start with 0. + * lib/m4sugar/m4sugar.m4 (_m4_version_unletter): Avoid + interpreting leading zeros as octal. + +2008-11-20 Eric Blake + + Speed up AT_CHECK. + * lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand + third and fourth arguments once. + (_AT_CHECK): Don't re-expand expected output. Rearrange code for + fewer scans of arguments. + (AT_CHECK): Update caller. + (AT_INIT) : Drop parameter. + * tests/m4sugar.at (m4@&t@_split): Protect test with + quadrigraphs. + + Fix XFAIL related to AT_CHECK. + * lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand + first argument once. + (_AT_CHECK): Don't re-expand commands. + * tests/autotest.at (Multiline command from M4 expansion): Remove + XFAIL. + * tests/tools.at (autoupdating AU_ALIAS): Quote unbalanced paren. + * NEWS: Document the fallout. + +2008-11-20 Eric Blake + + Reduce forks in AC_DEFINE. + * lib/autoconf/general.m4 (_AC_DEFINE_Q_PRINT): New macro. + (_AC_DEFINE_Q): Use it to avoid forks for all AC_DEFINE and most + AC_DEFINE_UNQUOTED. + * lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Properly quote #. + * tests/torture.at (Substitute and define special characters): + (Define to a 2000-byte string): Enhance tests to cover + AC_DEFINE_UNQUOTED. + (@%:@define header templates): Enhance test to cover #. + +2008-11-20 Eric Blake + + Improve m4_expand robustness, part 2. + * lib/m4sugar/m4sugar.m4 (m4_expand): Support unterminated + comments, by wrapping old implementation... + (_m4_expand): ...as this, and renaming old core... + (_m4_expand_): ...to this. + (m4_text_box): Use lighter-weight _m4_expand. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_EXPAND) + (_AS_DETECT_BETTER_SHELL, AS_FUNCTION_DESCRIBE): Likewise. + * lib/autotest/general.m4 (AT_KEYWORDS): Likewise. + * tests/m4sugar.at (m4@&t@_expand): Enhance test. + * tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Likewise. + * doc/autoconf.texi (Evaluation Macros) : Mention new + functionality. + + Improve m4_expand robustness, part 1. + * lib/m4sugar/m4sugar.m4 (_m4_expand): Tolerate unquoted + unbalanced `)'. + * tests/m4sugar.at (m4@&t@_expand): New test. + +2008-11-20 Eric Blake + + Add m4_chomp, m4_esyscmd_s. + * lib/m4sugar/m4sugar.m4 (m4_esyscmd_e, m4_chomp, m4_chomp_all): + New macros. + * doc/autoconf.texi (Redefined M4 Macros) : Document + them. + (Text processing Macros) : Likewise. + * NEWS: Likewise. + * tests/m4sugar.at (m4@&t@_esyscmd_s): New test. + + Remove _m4_index. + * lib/m4sugar/m4sugar.m4 (_m4_index): Delete; it is more efficient + to make callers guarantee a match. + (m4_init): Adjust caller. + * lib/autoconf/status.m4 (_AC_CONFIG_COMPUTE_DEST): Likewise. + * lib/autoconf/general.m4 (_AC_DEFINE_Q): Likewise. + + Describe different hacks for balancing ')' in case statements. + * doc/autoconf.texi (Limitations of Builtins) : Add an + exposition on various quoting styles. + +2008-11-20 Eric Blake + + Speed up _AS_QUOTE. + * lib/m4sugar/m4sh.m4 (_AS_QUOTE_IFELSE): Inline into... + (_AS_QUOTE): ...here, delete unused second parameter, and factor + choice into... + (_AS_QUOTE_MODERN, _AS_QUOTE_OLD): ...new helpers. + +2008-11-20 Alfred G. de Wijn (tiny change) + + For consistency, make temporary variable match language name. + * lib/autoconf/fortran.m4 (_AC_PROG_FC_G, _AC_PROG_FC_V_OUTPUT): + Match the save/test variables' names to the FFLAGS/FCFLAGS being + saved. + * THANKS: Update. + +2008-11-19 Eric Blake + + Improve testsuite generation. + * tests/local.at (AT_DATA_M4SUGAR, AT_DATA_M4SH) + (AT_DATA_AUTOCONF): Escape all quadrigraphs, not just @&t@. Use + fewer macros. + +2008-11-18 Eric Blake + + Use fn for shell functions, func for autoconf CHECK_FUNCS. + * lib/autoconf/functions.m4 (AC_CHECK_FUNC): Abbreviate shell + function names. + * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE) + (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE) + (AC_CHECK_DECL, AC_COMPUTE_INT): Likewise. + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL) + (_AC_CHECK_HEADER_COMPILE, _AC_CHECK_HEADER_PREPROC): Likewise. + * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, _AC_TYPE_INT) + (_AC_TYPE_UNSIGNED_INT, AC_CHECK_MEMBER): Likewise. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK, _AS_EXIT_PREPARE) + (AS_EXIT, AS_SET_STATUS, _AS_UNSET_PREPARE, _AS_MKDIR_P) + (_AS_MKDIR_P_PREPARE, _AS_VAR_APPEND_PREPARE, AS_VAR_APPEND) + (_AS_VAR_ARITH_PREPARE, AS_VAR_ARITH): Likewise. + * doc/autoconf.texi (Shell Functions): Likewise. + +2008-11-18 Eric Blake + + Alter default value of AS_EXIT. + * lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE): Let as_func_exit + parameter be optional. + (AS_EXIT): Use it to make better default. + (_AS_DETECT_BETTER_SHELL): Use new default. + * bin/autoconf.as (exit_missing_arg, getopt): Likewise. + * lib/autoconf/status.m4 (AC_OUTPUT): Likewise. + * tests/m4sh.at (AS@&t@_EXIT): Update test. + * doc/autoconf.texi (Common Shell Constructs) : Mention + new default behavior. + (Limitations of Builtins) : Adjust to use new default. + * NEWS: Mention the semantic change. + Suggested by Ralf Wildenhues. + + Update example to match actual Tru64 behavior. + * doc/autoconf.texi (Limitations of Builtins) : Correct + the example. + Reported by Ralf Wildenhues. + + Add AS_SET_STATUS, make AS_EXIT more efficient. + * lib/m4sugar/m4sh.m4 (_AS_EXIT_PREPARE, AS_SET_STATUS): New + macros. + (AS_EXIT): Rewrite to avoid forks. + (_AS_SHELL_SANITIZE): Avoid AS_EXIT prior to shell functions. + (AS_PREPARE, _AS_PREPARE): Add new preparation. + * doc/autoconf.texi (Common Shell Constructs) : + Document. + * NEWS: Mention new macro. + * tests/m4sh.at (AS@&t@_EXIT): New test. + (BASENAME_TEST): Sort. + + Document Tru64 bug with 'set -e'. + * doc/autoconf.texi (Limitations of Builtins) : Mention a + bug in mixing 'set -e' with 'trap .. 0'. + Reported by Ralf Wildenhues. + + Document a Solaris /bin/sh bug with 'set -e'. + * doc/autoconf.texi (Shell Functions): Mention the bug. + +2008-11-17 Eric Blake + + Detect empty list in AS_FOR. + * lib/m4sugar/m4sh.m4 (AS_FOR): Handle iteration over $@ + properly. + * tests/m4sh.at (AS@&t@_FOR): Enhance test to catch it. + Reported by Paolo Bonzini. + +2008-11-16 Ralf Wildenhues + + Use a different workaround for an automake quirk. + * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove. + (distclean_generic): New helper variable, to fool automake. + ($(distclean_generic)): Depend on clean-local, to prevent + the race in the two rules with accessing and removing + $(TESTSUITE). + Report by Eric Blake. + + * lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE): Simplify, avoid + unbalanced parentheses from last change. + Spotted by Eric Blake, fix suggested by Paolo Bonzini. + + Fix exit status of expr version of as_func_arith. + * lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE): Count an exit + status of 1 of expr also as success, to avoid failure if the + computation result is zero. Fixes test failures with IRIX sh, + where the expr variant of as_func_arith is used. + + Do not use read-only variable $status. + * tests/compile.at (AC_RUN_IFELSE): Use $estatus instead of + $status, for zsh. + +2008-11-15 Eric Blake + + Use the new AS_FOR function. + * lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Use new + abstraction for cleaner code. + * lib/autoconf/headers.m4 (AC_CHECK_HEADERS): Likewise. + + Add AS_FOR, undocumented for now. + * lib/m4sugar/m4sh.m4 (AS_FOR): New macro. + * tests/m4sh.at (AS@&t@_FOR): New test. + Suggested by Paolo Bonzini. + +2008-11-13 Eric Blake + + Optimize single-argument loop. + * lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Avoid forks when + loop only has one argument. + * lib/autoconf/headers.m4 (AC_CHECK_HEADERS): Likewise. + +2008-11-13 Eric Blake + + Fix AS_ESCAPE usage bugs. + * lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_PREPARE) + (_AS_VAR_ARITH_PREPARE): Expand macros prior to adding shell + escapes. + (AS_TR_SH, AS_VAR_GET): Use _AS_ESCAPE for speed. + * doc/autoconf.texi (Polymorphic Variables) : Document + caveat due to conditional AS_ESCAPE. + * tests/m4sh.at (AS@&t@_VAR basics): Enhance test. + +2008-11-12 Eric Blake + + Whitespace reduction in configure. + * lib/autoconf/autoheader.m4 (AH_VERBATIM): Avoid empty lines. + * lib/autoconf/general.m4 (_AC_INIT_PREPARE, AC_CHECK_FILES): + Likewise. + (_AC_DEFINE_Q): Restore empty line, since some clients in the wild + depend on it. + +2008-11-12 Eric Blake + + Make M4sh, not autoconf, guarantee sane $SHELL. + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Move setting of + SHELL... + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): ...to here. + * doc/autoconf.texi (Initialization Macros): Document the effect + on SHELL. + * tests/m4sh.at (AS@&t@_INIT_GENERATED): New test. + Reported by Ralf Wildenhues. + +2008-11-12 Ralf Wildenhues + + Wrap keywords in `testsuite --list' output. + * lib/autotest/general.m4 (AT_INIT): Rewrite --list awk script, + avoid lint warnings from gawk, wrap keyword lists to stay below + 80 characters per line if possible. + * tests/autotest.at (Keyword wrapping): New test. + + * tests/local.at (AT_COPYRIGHT): Bump copyright years. + + * doc/autoconf.texi (Conditional constructs, Macro Names): Fix + typos. + +2008-11-10 Eric Blake + + Work around <=m4-1.4.9 bug in m4_format. + * lib/m4sugar/m4sugar.m4 (_m4_index): New internal macro. + (m4_init): Only use it in older m4. + * lib/autoconf/general.m4 (_AC_DEFINE_Q): Use it to avoid + m4_format bug in older m4. + * lib/autoconf/status.m4 (_AC_CONFIG_COMPUTE_DEST): Likewise. + Reported by Bob Proulx. + +2008-11-10 Eric Blake + + Match upstream standards.texi. + * doc/standards.texi: Resync from upstream. + * doc/fdl-1.3.texi: Rename... + * doc/fdl.texi: ...to this. + * doc/Makefile.am (autoconf_TEXINFOS, standards_TEXINFOS): Update + users. + * doc/autoconf.texi (GNU Free Documentation License): Likewise. + * cfg.mk (fetch): Likewise. + + Yet more FDL 1.3 fallout. + * NEWS: Mention manual license change. + +2008-11-10 Eric Blake + + Avoid some regex uses. + * lib/autoconf/general.m4 (_AC_DEFINE_Q): Use m4_format rather + than m4_bpatsubst to grab string prefix. + * lib/autoconf/status.m4 (_AC_CONFIG_REGISTER) + (_AC_CONFIG_REGISTER_DEST, AC_CONFIG_SUBDIRS): Likewise. + (_AC_FILE_DEPENDENCY_TRACE_COLON): Use m4_translit instead of + m4_bpatsubst to change bytes. + (_AC_CONFIG_DEPENDENCY_DEFAULT): Use m4_index rather than + m4_bmatch to find byte. + (_AC_CONFIG_COMPUTE_DEST): New helper macro. + + Use more efficient macros in AC_CONFIG_SUBDIRS. + * lib/autoconf/status.m4 (_AC_CONFIG_FOOS, AC_CONFIG_SUBDIRS): Use + m4_map_args_w. + (_AC_OUTPUT_FILE): Use m4_map_args_sep and m4_map_args. + (_AC_OUTPUT_FILE_ADJUST_DIR): New helper macro. + + Use more efficient macros in AC_CHECK_FILES and AC_CHECK_DECLS. + * lib/autoconf/general.m4 (AC_CHECK_FILES): Use m4_map_args_w, + and avoid typo. + (AC_CHECK_DECLS, AC_CHECK_DECLS_ONCE): Use m4_map_args_sep. + (_AC_CHECK_FILES, _AC_CHECK_DECLS, _AC_CHECK_DECL_ONCE): New + helper macros. + (AC_LIBSOURCES): Use m4_map_args. + + Use more efficient macros in AC_CHECK_TYPES. + * lib/autoconf/types.m4 (AC_CHECK_TYPES, AC_CHECK_MEMBERS): Use + m4_map_args_sep. + (_AC_CHECK_TYPES, _AC_CHECK_MEMBERS): New helper macros. + + Use more efficient macros in AC_CHECK_HEADERS. + * lib/autoconf/headers.m4 (AH_CHECK_HEADERS) + (AH_CHECK_HEADERS_DIRENT): Rename... + (_AH_CHECK_HEADER, _AH_CHECK_HEADER_DIRENT): ...and take only one + argument, rather than a list. + (AC_CHECK_HEADERS, AC_CHECK_HEADERS_ONCE): + Adjust callers to use m4_map_args_w. + (AC_HEADER_DIRENT): Adjust caller to use m4_map_args. + (_AC_CHECK_HEADER_ONCE): New helper macro. + + Use more efficient macros in AC_CHECK_FUNCS. + * lib/autoconf/functions.m4 (_AH_CHECK_FUNCS): Rename... + (_AH_CHECK_FUNC): ...and take only one argument, rather than a + list. + (AC_CHECK_FUNCS, AC_CHECK_FUNCS_ONCE): Adjust callers to use + m4_map_args_w. + (_AC_CHECK_FUNC_ONCE): New helper macro. + (AC_REPLACE_FUNCS): Use m4_map_args_w. + + Use more efficient macro in AT_INIT. + * lib/autotest/general.m4 (AT_INIT): Use m4_map_args. + +2008-11-10 Eric Blake + + More FDL 1.3 fallout. + * cfg.mk (fetch): Add gnu-oids.texi, drop fdl.texi. + * doc/Makefile.am (standards_TEXINFOS): Reflect upstream + dependency changes. + * doc/fdl.texi: Delete. + * doc/gnu-oids.texi: New upstream file. + * doc/standards.texi: Resync from upstream. + * doc/make-stds.texi: Likewise. + * build-aux/announce-gen: Likewise. + * build-aux/texinfo.tex: Likewise. + +2008-11-10 Clinton Roy (tiny change) + + Pass autoreconf -I to aclocal -I + * bin/autoreconf.in (parse_args): Pass --include to aclocal. + * doc/autoconf.texi (autoreconf Invocation): Updates for above. + * NEWS: Document it. + * THANKS: Update. + +2008-11-10 Eric Blake + + Try 'print -r --' as a non-forking variant of 'printf %s\\n'. + * lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Cater to Solaris ksh. + * doc/autoconf.texi (Limitations of Builtins) : Document + the print workaround. + Idea by Paolo Bonzini. + +2008-11-10 Eric Blake + + Provide a section on all tools allowed in GNU Coding Standards. + * doc/autoconf.texi (Limitations of Builtins) : Sort. + : Add section. + (Limitations of Usual Tools) : Make table entry consistent. + Add sections. + +2008-11-09 Paolo Bonzini + + Balance parentheses in _AC_CACHE_DUMP. + * lib/autoconf/general.m4 (_AC_CACHE_DUMP): Balance parentheses + without introducing \). + +2008-11-07 Eric Blake + + Further doc updates for AC_CHECK_HEADER change. + * doc/autoconf.texi (Generic Headers) : Mention + new default, and make it more obvious that using [-] is generally + broken. + +2008-11-07 Eric Blake + + * ChangeLog: Enforce UTF-8 encoding. + +2008-11-06 Eric Blake + + Skip preprocessor check in AC_CHECK_HEADERS_ONCE. + * lib/autoconf/headers.m4 (_AC_HEADERS_EXPANSION): Provide fourth + argument to speed up check. + +2008-11-06 Eric Blake + + Speed up AC_CHECK_TYPE. + * lib/autoconf/types.m4 (AC_CHECK_TYPE): Factor out $@, and avoid + regex when enough arguments are present. + +2008-11-06 Paolo Bonzini + + Remove three forks per _AC_RUN_LOG_STDERR in the common case. + * lib/autoconf/general.m4 (_AC_RUN_LOG_STDERR): Avoid grep/rm/cat + sequence when the program's stderr was empty, while providing a + conftest.err file even in that case. + (_AC_CACHE_DUMP): Fix mismatched parenthesis. + +2008-11-06 Paolo Bonzini + + Change `present but cannot be compiled' behavior to use compiler result. + * NEWS: Document it. + * doc/autoconf.texi (Present But Cannot Be Compiled): Document it. + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Implement it + and adjust warning. + * tests/semantics.at (AC_CHECK_HEADERS): Test new semantics. + +2008-11-05 Eric Blake + + Add m4_map_args_w. + * lib/m4sugar/m4sugar.m4 (m4_map_args_w): New macro, undocumented + for now. + (_m4_split): Allow user control over separator. + (m4_split): Adjust caller. + (m4_foreach_w, m4_append_uniq_w, _m4_text_wrap): Rewrite to use + m4_map_args_w. + * tests/m4sugar.at (m4@&t@_append): Augment test keywords. + (M4 loops): Test new interface. + + Use m4_set_map_sep in more places. + * lib/m4sugar/m4sugar.m4 (m4_set_difference, m4_set_intersection) + (m4_set_union): Use m4_set_map_sep rather than m4_set_foreach. + * doc/autoconf.texi (Set manipulation Macros) : + Enhance documentation. + : Mention faster alternative. + (Looping constructs) : Likewise. + + Unify m4_set_foreach and m4_set_map. + * lib/m4sugar/m4sugar.m4 (m4_set_map_sep): New macro, undocumented + for now. + (m4_set_contents, m4_set_foreach, m4_set_list, m4_set_listc) + (m4_set_map): Adjust callers. + + Use _m4_foreach in more places. + * lib/m4sugar/foreach.m4 (m4_dquote_elt, m4_join, m4_joinall) + (_m4_minmax, m4_set_add_all): Use _m4_foreach instead of + m4_foreach. + * lib/m4sugar/m4sugar.m4 (_m4_joinall): Use m4_map_args_sep + instead of m4_foreach or m4_map_args. + + Unify _m4_foreach and _m4_map. + * lib/m4sugar/m4sugar.m4 (_m4_map): Delete, merged with... + (_m4_foreach): ...this. + (m4_foreach, m4_map, m4_mapall, m4_map_sep, _m4_mapall_sep) + (m4_map_args, m4_map_args_sep): Adjust callers. + * lib/m4sugar/foreach.m4 (_m4_map): Rename... + (_m4_foreach): ...to this, overwriting old definition. + +2008-11-04 Eric Blake + + Add m4_map_args_sep, undocumented for now. + * lib/m4sugar/m4sugar.m4 (m4_map_args_sep): New macro. + (_m4_map): Change API to cover more of m4_map*. + * lib/m4sugar/foreach.m4 (_m4_map): Adjust to new API. + (m4_map_args): Delete. + * tests/m4sugar.at (m4@&t@_map_args and m4@&t@_curry): Enhance + test. + + Improve m4_for performance. + * lib/m4sugar/m4sugar.m4 (_m4_for): Alter API to make it easier to + avoid m4_define by some clients. + (m4_for): Adjust caller. + * lib/m4sugar/foreach.m4 (_m4_foreach, m4_case, m4_bmatch) + (_m4_cond, _m4_bpatsubsts, _m4_shiftn, m4_do, m4_reverse) + (_m4_map, m4_map_args, m4_map_args_pair, _m4_list_pad) + (_m4_list_cmp): Likewise. + +2008-11-04 Eric Blake + + Adjust expected output. + * tests/torture.at (Missing templates): Reflect added quoting. + Detected by Bob Proulx's buildbot. + + Reject arguments with leading =. + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Detect case of + missing variable name, with fewer forks. Quote invalid arguments + in message, in case they include spaces. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS) + (_AC_OUTPUT_MAIN_LOOP): Quote invalid arguments. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * tests/base.at (configure arguments): Test this. + Reported by Jeff Squyres. + +2008-11-04 Eric Blake + + Upgrade to FDL 1.3. + * cfg.mk (fetch): Add fdl-1.3.texi. + * .gitattributes: Likewise. + * doc/autoconf.texi (GNU Free Documentation License): Point to new + upstream version. + * doc/Makefile.am (autoconf_TEXINFOS): Likewise. + (standards_TEXINFOS): Mention current dependence on older license. + * doc/fdl-1.3.texi: New upstream file. + * GNUmakefile: Resync from upstream. + * build-aux/announce-gen: Likewise. + * build-aux/texinfo.tex: Likewise. + +2008-11-03 Ralf Wildenhues + + Point at AM_SUBST_NOTMAKE. + * doc/autoconf.texi (Setting Output Variables): Add cross + reference to new Automake macro AM_SUBST_NOTMAKE. + +2008-11-03 Paolo Bonzini + + Eliminate a fork per invocation of AC_LANG_CONFTEST. + * lib/autoconf/c.m4 (AC_LANG_CONFTEST(C)): Define instead of + AC_LANG_SOURCE(C). + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Add a comment at the + top of confdefs.h, which also works around cpp deficiencies. + * lib/autoconf/lang.m4 (AC_LANG_DEFINE): Define AC_LANG_CONFTEST(xyz) + (AC_LANG_CONFTEST): Dispatch based on _AC_LANG. + (AC_LANG_CONFTEST()): New. + +2008-11-03 Paolo Bonzini + + Reorganize definition of languages. + * lib/autoconf/c.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Objective C), + _AC_LANG_ABBREV(C), _AC_LANG_ABBREV(C++), _AC_LANG_ABBREV(Objective C), + _AC_LANG_PREFIX(C), _AC_LANG_PREFIX(C++), _AC_LANG_PREFIX(Objective C)): + Replace definitions with usage of AC_LANG_DEFINE. + (Sections 2b, 2c): Delete. + (Sections 1b, 1c): Move after section 2a. + * lib/autoconf/erlang.m4 (AC_LANG(Erlang), _AC_LANG_ABBREV(Erlang), + _AC_LANG_PREFIX(Erlang), AC_LANG_SOURCE(Erlang)): Replace definitions + with usage of AC_LANG_DEFINE. + (AC_LANG_ERLANG): Define using AU_DEFUN. + * lib/autoconf/fortran.m4 (AC_LANG(Fortran), AC_LANG(Fortran 77), + _AC_LANG_ABBREV(Fortran), _AC_LANG_ABBREV(Fortran 77), + _AC_LANG_PREFIX(Fortran), _AC_LANG_PREFIX(Fortran 77), + _AC_LANG_SOURCE(Fortran), AC_LANG_SOURCE(Fortran 77)): Replace + definitions with usage of AC_LANG_DEFINE. + * lib/autoconf/lang.m4 (AC_LANG_DEFINE, AC_LANG_SOURCE()): New. + +2008-11-03 Paolo Bonzini + + Use preprocessor in cpp tests. + * tests/c.at (CPP tests): Use AC_CHECK_HEADERS(..., [-]). + +2008-10-31 Paolo Bonzini + + Rename _AC_CHECK_HEADER_OLD and _AC_CHECK_HEADER_NEW. + * lib/autoconf/headers.m4 (AC_CHECK_HEADER): Adjust naming. + (_AC_CHECK_HEADER_PREPROC_BODY): New name of _AC_CHECK_HEADER_OLD_BODY. + (_AC_CHECK_HEADER_COMPILE_BODY): New name of _AC_CHECK_HEADER_NEW_BODY. + (_AC_CHECK_HEADER_PREPROC): New name of _AC_CHECK_HEADER_OLD. + (_AC_CHECK_HEADER_COMPILE): New name of _AC_CHECK_HEADER_NEW. + * tests/semantics.at (AC_CHECK_HEADERS_OLD, AC_CHECK_HEADER_NEW): + Give better name. + +2008-10-31 Eric Blake + + Support multiple undiverts and dumpdefs at once. + * lib/m4sugar/m4sugar.m4 (m4_dumpdefs, m4_undivert): Allow extra + arguments. + * doc/autoconf.texi (Redefined M4 Macros) , + : Document argument list change. + * tests/m4sugar.at (m4@&t@_divert_stack, m4@&t@_dumpdef): Test + them. + + Simplify diversion stack handling. + * lib/m4sugar/m4sugar.m4 (m4_divert_stack): Use fewer macros, and + avoid extra newlines. + (m4_divert_stack_push): Compute location here, rather than caller. + (m4_divert_push): Update caller. + (m4_divert): Likewise, and also adjust current diversion name. + (m4_divert_pop): Simplify rule that diversion stack must never go + empty. + (_m4_require_call): Bypass diversion stack when collecting + required macro text. + (m4_init): Set current diversion without requiring m4_init. + * lib/m4sugar/m4sh.m4 (AS_INIT): Avoid too many pops. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Schedule wrapped + text to run prior to m4sugar cleanup. + * doc/autoconf.texi (Text processing Macros) : Mention + optional argument. + (Conditional constructs) : Mention use of dnl. + * NEWS: Undo blurb about m4_divert. + * tests/m4sugar.at (m4@&t@_divert_stack): New test. + + Simplify expansion stack handling. + * lib/m4sugar/m4sugar.m4 (m4_expansion_stack): Use fewer macros; + always output 'top level'. + (_m4_expansion_stack_entry): New macro, to format the string only + when needed. + (m4_expansion_stack_push): Only push a macro name. + (m4_warn, _m4_defun_pro): Update callers. + (m4_expansion_stack_pop, m4_expansion_stack_dump): Delete. + (_m4_defun_epi, m4_fatal): Inline the calls. + * tests/m4sugar.at (m4@&t@_expansion_stack): New test. + +2008-10-30 Eric Blake + + Better documentation of AC_CHECK_HEADER's fourth argument. + * doc/autoconf.texi (Generic Headers) : Mention + how to suppress compiler or preprocessor header check. + Reported by Jeff Squyres. + +2008-10-30 Eric Blake + + Fix LINENO testsuite failure. + * tests/m4sh.at (AT_DATA_LINENO): Use AS_LINENO_PREPARE, not + undocumented _AS_PREPARE, and move unset earlier in script. + + Update LINENO documentation. + * doc/autoconf.texi (Initialization Macros) : + (Special Shell Variables) : Mention that LINENO support in + child scripts may be broken. Modernize example. + +2008-10-30 Paolo Bonzini + + Do not check for $LINENO in generated scripts. + * lib/m4sugar/m4sh.m4 (_AS_PREPARE): Do not call _AS_LINENO_PREPARE, + and explain why. + +2008-10-30 Eric Blake + + Don't check for non-POSIX extensions in suggested tests. + * lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_WORKS): Remove suggestion; + we still use += if available, but should not reject shells (like + dash) that don't provide it. + (_AS_DETECT_SUGGESTED): Document a policy for m4sh. + Reported by Paolo Bonzini. + +2008-10-30 Paolo Bonzini + + Pass CONFIG_SHELL down to generated scripts, and re-export SHELL. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): If proceeding + with a given CONFIG_SHELL, move it to SHELL. + (AS_INIT_GENERATED): Re-export SHELL. + +2008-10-30 Eric Blake + + Work around Solaris /bin/sh case bug. + * lib/m4sugar/m4sh.m4 (_AS_CASE, _AS_CASE_DEFAULT): Always provide + a non-empty command list. + (AS_CASE): Always guarantee that a case will match. + * doc/autoconf.texi (Limitations of Builtins) : Document the + Solaris bug, and mention AS_CASE. + +2008-10-30 Paolo Bonzini + + Require _AS_CR_PREPARE where appropriate. + * lib/m4sugar/m4sh.m4 (_AS_PREPARE): Call _AS_CR_PREPARE. + (AS_PREPARE): Require _AS_CR_PREPARE. + + Avoid walking the entire PATH when looking for a better shell. + * lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Test shell characteristics + as the PATH is walked. + + Add third argument to _AS_PATH_WALK + * lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Do not call _AS_CR_PREPARE. + (_AS_PATH_WALK): Add third optional argument. + + Trim down the length of the shell function test. + * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK): Condense. + +2008-10-29 Eric Blake + + Fix LINENO detection to work around bash and pdksh limitations. + * lib/m4sugar/m4sh.m4 (_AS_LINENO_WORKS): Enhance the test, so + that we can choose which of two tests to trust. + (_AS_RUN): Set flag when alternate shell is running. + (_AS_DETECT_EXPAND): New macro. + (_AS_DETECT_BETTER_SHELL): Use it to massage LINENO tests. + +2008-10-29 Eric Blake + + Mention proper fix for zsh users. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Recommend zsh + version known to work. + Suggested by Paolo Bonzini. + + Document current beta-quality status. + * configure.ac: Reflect fact that change to git-version-gen + produces -, but not always a letter, on non-release builds. + * BUGS: Mention known issues. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Ask for help in + debugging platforms with deficient shells. + +2008-10-29 Eric Blake + + Alter signature of AS_INIT_GENERATED. + * lib/m4sugar/m4sh.m4 (AS_INIT_GENERATED): Add parameters, and + manage here-doc and chmod in place. This also allows future + changes for optimizing the child via diversion/m4_wrap magic. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Update + caller. + * doc/autoconf.texi (Initialization Macros) : + Update the documentation. + +2008-10-29 Eric Blake + + Use _m4_stack_reverse in m4_set. + * lib/m4sugar/m4sugar.m4 (_m4_set_contents_1) + (_m4_set_contents_2): Rewrite to share _m4_stack_reverse + implementation. + (m4_set_contents, m4_set_foreach, m4_set_list, m4_set_listc) + (m4_set_map): Adjust callers to new API. + + Add m4_stack_foreach_sep. + * lib/m4sugar/m4sugar.m4 (m4_stack_foreach_sep) + (m4_stack_foreach_sep_lifo): New macros. + (_m4_stack_reverse): Adjust prototype, to support it. + (m4_copy): Use fewer macros. + * tests/m4sugar.at (m4@&t@_stack_foreach): Rename... + (m4@&t@_stack): ...and add m4_stack_foreach_sep tests. + +2008-10-29 Bruno Haible + + Mention Sun WorkShop 6.2 OpenMP bug. + * doc/autoconf.texi (AC_OPENMP): Document portability pitfall. + +2008-10-29 Paolo Bonzini + + Rewrite handling of diversion and expansion stack. + * NEWS: Document stricter requirement on m4_init. + * lib/m4sugar/m4sugar.m4 (m4_divert_stack): New, replacing + _m4_divert_n_stack. + (_m4_divert_stack_push): New. + (m4_divert): Use _m4_divert_stack_push and replace m4_define with + m4_popdef. + (m4_divert_push): Use _m4_divert_stack_push. + (m4_divert_pop): Use m4_divert_stack instead of _m4_divert_n_stack, + pop _m4_divert_stack instead of m4_divert_stack. + (m4_expansion_stack): New. Update comment above it. + (m4_expansion_stack_push, m4_expansion_stack_pop): Work on + _m4_expansion_stack instead of m4_expansion_stack. + (m4_expansion_stack_dump): Check presence of _m4_expansion_stack + instead of m4_expansion_stack. Use m4_expansion_stack's expansion + instead of the definition, and compensate for the trailing newline + in the expansion. + (m4_warn, _m4_defun_pro, _m4_defun_epi): Check presence of + _m4_expansion_stack instead of m4_expansion_stack. + (m4_newline): Expand first argument after the newline. + (m4_init): Use m4_divert_stack instead of _m4_divert_n_stack, + * tests/m4sugar.at (m4_append, m4_text_wrap): Invoke m4_init. + * tests/tools.at (whitespace in file names, the empty token): Likewise. + +2008-10-28 Eric Blake + + Reduce forks while searching for better shell. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED) + (_AS_DETECT_SUGGESTED): No need to provide extra subshell; _AS_RUN + already does the job. + (_AS_DETECT_BETTER_SHELL): Simplify AS_EXIT when not run in a trap + 0 context. + + Undo needless efforts to protect $2 in $2_t. + * lib/autoconf/types.m4 (_AC_TYPE_INT_BODY) + (_AC_TYPE_UNSIGNED_INT_BODY): Reduce extra quoting. + +2008-10-28 Ralf Wildenhues + + Fix parallel test execution output lossage. + * lib/autotest/general.m4 (_AT_CHECK): Truncate files to hold + standard output and standard error before the test, use append + mode for writing. + * THANKS: Update. + Caught by Bob Proulx' build daemons, analysis and suggested fix + by Stéphane Chazelas. + +2008-10-28 Eric Blake + + Use m4_map_args in more places. + * lib/m4sugar/m4sugar.m4 (m4_defn, m4_dumpdef, m4_popdef) + (m4_undefine, m4_combine): Use m4_map_args, rather than + m4_foreach. + +2008-10-28 Eric Blake + + Override m4 1.4.x dumpdef, as it breaks autom4te. + * lib/m4sugar/m4sugar.m4 (m4_dumpdef): New implementation. + (m4_copy): Formatting touchup. + * doc/autoconf.texi (Redefined M4 Macros) : Mention + semantic differences as well as m4_dumpdefs. + * NEWS: Likewise. + * tests/m4sugar.at (m4@&t@_dumpdef): New test. + +2008-10-28 Eric Blake + + Allow m4sugar to be used without autom4te, such as in bison. + * lib/m4sugar/m4sugar.m4 (m4_text_wrap, m4_qlen): Document that + alternate escape sequences can be used. + (m4_text_box): Likewise. Don't output quadrigraphs. + (m4_qdelta): Delete unused macro. + +2008-10-28 Paolo Bonzini + + Add m4_stack_foreach and m4_stack_foreach_lifo. + * lib/m4sugar/m4sugar.m4 (_m4_stack_reverse): New from _m4_copy. + (m4_stack_foreach, m4_stack_foreach_lifo): New. + (m4_copy): Use m4_stack_foreach and m4_curry. + (_m4_dumpdefs_down, _m4_dumpdefs_up): Remove. + (m4_dumpdefs): Rewrite using m4_stack_foreach_lifo. + * tests/m4sugar.at (m4_stack_foreach): New test. + +2008-10-28 Paolo Bonzini + + use a shell function for AC_TYPE_INTx_T + * lib/autoconf/types.m4 (_AC_TYPE_INT_BODY, _AC_TYPE_UNSIGNED_INT_BODY): + New. + (_AC_TYPE_INT, _AC_TYPE_UNSIGNED_INT): Define and use a shell function. + +2008-10-28 Paolo Bonzini + + * lib/autoconf/general.m4 (AC_CHECK_DECL): Fix AS_ESCAPE usage. + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL, + _AC_CHECK_HEADER_NEW): Likewise. + * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, AC_CHECK_MEMBER): Likewise. + +2008-10-28 Paolo Bonzini + + * lib/autoconf/types.m4 (_AC_CHECK_MEMBER_BODY): New. + (AC_CHECK_MEMBER): Define and use a shell function. + +2008-10-27 Eric Blake + + Prefer m4_fatal over AC_FATAL. + * lib/autoconf/types.m4 (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF) + (AC_CHECK_MEMBER): Use non-obsolete macro name. + * lib/autoconf/fortran.m4 (_AC_LIST_MEMBER_IF): Likewise. + * lib/autoconf/general.m4 (AC_REQUIRE_AUX_FILE, AC_SUBST): + Likewise. + * lib/autoconf/lang.m4 (_AC_LANG_DISPATCH): Likewise. + * lib/autoconf/status.m4 (_AC_CONFIG_DEPENDENCY_DEFAULT) + (_AC_CONFIG_UNIQUE, _AC_CONFIG_REGISTER_DEST): Likewise. + +2008-10-27 Eric Blake + + Avoid raw carriage return in scripts. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Generate CR + via tr, rather than with literal byte. + * THANKS: Update. + Reported by Steven R. Loomis; patch suggested by Thomas Dickey. + +2008-10-27 Eric Blake + + Use AS_VAR_ARITH. + * lib/autotest/general.m4 (at_func_arith): Delete; replace all + clients with AS_VAR_ARITH instead. + * lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE): Use new + macro. + * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Likewise. + * tests/torture.at (Torturing config.status): Likewise. + * tests/tools.at (autom4te --force): Likewise. + + Add AS_VAR_ARITH. + * lib/m4sugar/m4sh.m4 (_AS_VAR_ARITH_PREPARE, _AS_VAR_ARITH_WORKS) + (AS_VAR_ARITH): New macros. + (_AS_PREPARE, AS_PREPARE): Emit preparation. + * tests/m4sh.at (AS@&t@_VAR_ARITH): New test. + * doc/autoconf.texi (Polymorphic Variables) : + Document new macro. + (Limitations of Usual Tools) : Mention portability problem + if first argument starts with -. + (Shell Substitutions) <$((expression))>: Mention it. + * NEWS: Likewise. + +2008-10-27 Eric Blake + + Use read, rather than `cat`, for safe one-line files. + * lib/autotest/general.m4 (AT_CLEANUP): Avoid a fork, since it is + known that the file has only one line and no \. + * lib/autoconf/general.m4 (_AC_COMPUTE_INT_RUN): Likewise. + +2008-10-27 Paolo Bonzini + + * lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE, + _AC_COMPUTE_INT_RUN): Add IF-SUCCESS argument. + (_AC_COMPUTE_INT_BODY): New. + (AC_COMPUTE_INT): Define and use a shell function. + +2008-10-27 Paolo Bonzini + + * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW_BODY): Extract + test body here. Move head comment of _AC_CHECK_TYPE_NEW here. + (_AC_CHECK_TYPE_NEW): Define a shell function and call it. + +2008-10-27 Paolo Bonzini + + * lib/autoconf/general.m4 (_AC_CHECK_DECL_BODY): New. + (AC_CHECK_DECL): Use a shell function. + +2008-10-27 Paolo Bonzini + + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_OLD, + _AC_CHECK_HEADER_NEW): Use a shell function. + +2008-10-25 Eric Blake + + Track recent copyright assignments. + * AUTHORS: Update. + +2008-10-25 Paolo Bonzini + and Eric Blake + + Use a shell function for _AC_CHECK_HEADER_MONGREL. + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL_BODY): New + macro. + (_AC_CHECK_HEADER_MONGREL): Use a shell function. + +2008-10-25 Eric Blake + + Simplify _AS_PREPARE handling of functions. + * lib/m4sugar/m4sh.m4 (AS_REQUIRE_SHELL_FN): Factor... + (_AS_REQUIRE_SHELL_FN): ...into new helper macro. + (_AS_PREPARE): Temporarily redefine AS_REQUIRE_SHELL_FN to make + this task easier. + (_AS_LINENO_PREPARE): Make more efficient. + (_AS_MKDIR_P_PREPARE): Simplify use in _AS_PREPARE. + (_AS_UNSET_PREPARE): Avoid blank newline. + (AS_INIT): Emit as_func_unset alongside other functions. + +2008-10-25 Eric Blake + + Document AS_EXIT. + * doc/autoconf.texi (Common Shell Constructs) : Document + this macro. + (Limitations of Builtins): Mention AS_EXIT. + * NEWS: Mention it. + + Use AS_EXIT in autoconf.as. + * bin/autoconf.as: Consistently use AS_EXIT. + +2008-10-24 Eric Blake + + Fix m4 underquoting in AC_PROG_INSTALL. + * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Produce accurate + character ranges. + + Speed up AC_CHECK_HEADER. + * lib/autoconf/headers.m4 (AC_CHECK_HEADER): Factor out $@. + +2008-10-24 Paolo Bonzini + and Eric Blake + + Use a shell function for AC_CHECK_FUNC. + * lib/autoconf/functions.m4 (_AC_CHECK_FUNC_BODY): New macro. + (AC_CHECK_FUNC): Use a shell function. + * lib/autoconf/c.m4 (AC_LANG_SOURCE(C)): Reduce number of forks. + +2008-10-24 Eric Blake + + Work around fact that gnulib-tool doesn't use m4_copy. + * lib/autoconf/general.m4 (AC_LIBOBJ, AC_LIBSOURCES): Defun, not + define, so that an initial location is present, to account for + fact that gnulib-tool pushes another AC_DEFUN'd macro on top. + + Make m4_defun_init more robust. + * lib/m4sugar/m4sugar.m4 (m4_defun_init): Handle indirect macro + names, and correct number of arguments. + (m4_copy): Also set up location of the copy. + (m4_defun): When copied, use current macro name, not original. + * tests/m4sugar.at (m4@&t@_require: one-shot initialization): + Update test. + + Optimize clients of AS_REQUIRE. + * lib/m4sugar/m4sugar.m4 (m4_defun): Add undocumented third + argument. + (m4_defun_init): New undocumented macro. + * lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG, AS_MESSAGE, AS_BASENAME) + (_AS_DIRNAME_EXPR, AS_DIRNAME, AS_ECHO, AS_ECHO_N, AS_TEST_X) + (AS_LN_S, AS_MKDIR_P, _AS_PATH_WALK, AS_VERSION_COMPARE) + (AS_TR_SH, AS_TR_CPP, AS_VAR_APPEND, AS_VAR_PUSHDEF): Use it to + simplify these macros once the one-shot initialization is + complete. + * tests/m4sugar.at (m4@&t@_require: one-shot initialization): New + test. + + Improve m4_copy. + * lib/m4sugar/m4sugar.m4 (m4_copy): Add second implementation for + public use. + (_m4_copy): New macro, which preserves pushdef stacks. + (_m4_defun_pro_outer): Bypass it, for speed. + (m4_init): Bypass new implementation, since it breaks on m4_defn. + * bin/autoupdate.in (handle_autoconf_macros): Likewise. + * lib/autoconf/general.m4 (AC_PREREQ): Undefine before redefining, + now that m4_copy checks this. + * doc/autoconf.texi (Redefined M4 Macros) : Document + this, as well as m4_rename. + * lib/autoconf/autoconf.m4 (m4_copy): Temporarily redefine when + renaming builtins, since it breaks on m4_ifdef. + * NEWS: Likewise. + * tests/m4sugar.at (m4@&t@_defn): Enhance test. + +2008-10-24 Eric Blake + + AC_FUNC_GETGROUPS: Revert regression. + * lib/autoconf/functions.m4 (AC_FUNC_GETGROUPS): Only set + ac_cv_func_getgroups_works=no when it is not available. + +2008-10-23 Eric Blake + + Whitespace cleanup. + * lib/autoconf/fortran.m4: Consistently use tabs. + +2008-10-23 Chikama Masaki (tiny change) + + For gfortran on sh, ignore -little. + * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Add -little to + list of ignored arguments. + * THANKS: Update. + +2008-10-23 Paolo Bonzini + + Eliminate empty lines after AC_*_IFELSE. + * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, + _AC_LINK_IFELSE, _AC_RUN_IFELSE): Add a dnl at end. + +2008-10-23 Paolo Bonzini + + Avoid a fork in _AC_RUN_LOG and _AC_RUN_LOG_STDERR + * lib/autoconf/general.m4 (_AC_RUN_LOG, _AC_RUN_LOG_STDERR): + Return a boolean status code based on $ac_status. + +2008-10-23 Paolo Bonzini + + Ensure actions can look at conftest* files. + * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY, + _AC_COMPILE_IFELSE_BODY, _AC_LINK_IFELSE_BODY, _AC_RUN_IFELSE_BODY): + Move rm commands, except IPA files and Apple debug symbols... + (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, _AC_LINK_IFELSE, + _AC_RUN_IFELSE): ...in here. + * tests/compile.at: Add regression test. + +2008-10-23 Eric Blake + + Remove excess dnl from m4sh. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL, _AS_PREPARE) + (_AS_SHELL_FN_WORK, _AS_SHELL_SANITIZE, AS_IF, _AS_ECHO_LOG) + (AS_MESSAGE, AS_ERROR, AS_BASENAME, _AS_BASENAME_PREPARE) + (_AS_DIRNAME_EXPR, AS_DIRNAME, _AS_DIRNAME_PREPARE, AS_ECHO) + (AS_ECHO_N, AS_TEST_X, AS_EXECUTABLE_P, _AS_ME_PREPARE) + (_AS_LINENO_PREPARE, AS_LN_S, AS_MKDIR_P, _AS_PATH_WALK) + (AS_SET_CATFILE, AS_HELP_STRING, AS_TMPDIR, AS_VERSION_COMPARE) + (_AS_TR_SH_PREPARE, AS_TR_SH, _AS_TR_CPP_PREPARE, AS_TR_CPP) + (_AS_TR_PREPARE, AS_VAR_APPEND, AS_VAR_PUSHDEF) + (AS_INIT_GENERATED): Use fewer dnl in m4sh macro bodies. + +2008-10-23 Paolo Bonzini + and Eric Blake + + Use a shell function for _AC_RUN_IFELSE. + * lib/autoconf/general.m4 (_AC_RUN_IFELSE_BODY): New macro. + (_AC_RUN_IFELSE): Use a shell function. + (_AC_RUN_LOG): Avoid subshell for logging. + +2008-10-23 Eric Blake + + Formatting tweak: balance () with m4sh case statements. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL) + (_AS_SHELL_SANITIZE, _AS_ECHO_N_PREPARE, _AS_ECHO_PREPARE) + (AS_SET_CATFILE, _AS_TEST_PREPARE): Add strategic shell comments. + (_AS_CASE, _AS_CASE_DEFAULT, AS_CASE): Rearrange newlines, to + allow output of strategic shell comments. + (AS_VERSION_COMPARE): Use AS_CASE. + * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Enhance test. + +2008-10-22 Jim Meyering + + AC_FUNC_GETGROUPS: always define $ac_cv_func_getgroups_works + * lib/autoconf/functions.m4 (AC_FUNC_GETGROUPS): Always define + the shell variable, $ac_cv_func_getgroups_works. Otherwise, if + it is set to "yes" in the environment and configure is run on + a system like mingw that lacks the getgroups function, it would + mistakenly define HAVE_GETGROUPS. Reported by Simon Josefsson in + . + +2008-10-22 Paolo Bonzini + and Eric Blake + + Use a shell function for _AC_LINK_IFELSE. + * lib/autoconf/general.m4 (_AC_LINK_IFELSE_BODY): New macro. + (_AC_LINK_IFELSE): Use a shell function. + +2008-10-22 Eric Blake + + Fix autoconf logging commands. + * lib/autoconf/general.m4 (AC_MSG_RESULT_UNQUOTED, _AC_EVAL) + (_AC_EVAL_STDERR, AC_RUN_LOG): Respect as_lineno. + (_AC_DO_ECHO): Likewise, and use fewer dnl. + (_AC_RUN_LOG_STDERR): Avoid subshell for logging. + +2008-10-22 Eric Blake + + Fix testsuite failure. + * tests/mktests.sh (ac_exclude_list): Don't generate test for + AC_REQUIRE_SHELL_FN. + +2008-10-21 Eric Blake + + Improve wording related to automake and autotest. + * doc/autoconf.texi (Making testsuite Scripts): Clarify wording in + relation to automake. Mention dependency on package.m4. + Consolidate examples. Define AUTOM4TE. + * THANKS: Update. + Reported by William Pursell. + +2008-10-21 Eric Blake + + Allow AS_VAR_SET_IF in shell lists. + * lib/m4sugar/m4sh.m4 (AS_VAR_SET_IF): Allow continuation of + line. + * lib/autoconf/general.m4 (AC_CACHE_VAL): Supply newline no longer + provided by AS_VAR_SET_IF. + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Adjust + clients. + * lib/autoconf/libs.m4 (AC_SEARCH_LIBS): Likewise. + * tests/m4sh.at (AS@&t@_VAR basics): Enhance test. + + Allow AS_VAR_IF in shell lists. + * lib/m4sugar/m4sh.m4 (AS_VAR_IF): Allow continuation of line. + * lib/autoconf/functions.m4 (AC_CHECK_FUNC): Adjust clients. + * lib/autoconf/general.m4 (AC_CHECK_FILE, AC_CHECK_DECL): + Likewise. + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL) + (_AC_CHECK_HEADER_NEW, _AC_CHECK_HEADER_OLD) + (_AC_CHECK_HEADER_DIRENT): Likewise. + * lib/autoconf/libs.m4 (AC_CHECK_LIB): Likewise. + * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, AC_CHECK_MEMBER): + Likewise. + * tests/m4sh.at (AS@&t@_VAR basics): Enhance test. + + Allow AS_CASE in shell lists. + * lib/m4sugar/m4sh.m4 (AS_CASE): Always execute test, in case of + side effects. Allow continuation of script on same line as esac. + * lib/autoconf/c.m4 (AC_PROG_CC_STDC): Adjust client. + * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Enhance test. + * NEWS: Document the subtle change. + + Allow AS_IF in shell lists. + * lib/m4sugar/m4sh.m4 (AS_IF): Always execute test, in case of + side effects. Allow continuation of script on same line as fi. + (_AS_DETECT_BETTER_SHELL): Adjust clients. + (AS_VAR_IF, AS_VAR_SET_IF): For now, supply newline no longer + given by AS_IF. + * lib/autoconf/c.m4 (_AC_PROG_PREPROC_WORKS_IFELSE): Likewise. + * lib/autoconf/general.m4 (_AC_ENABLE_IF): Likewise. + (AC_EGREP_CPP, _AC_RUN_IFELSE): Adjust client. + * lib/autoconf/libs.m4 (AC_SEARCH_LIBS): Likewise. + * doc/autoconf.texi (Common Shell Constructs) : Fix typo. + (Polymorphic Variables): Move mention of dnl to the only two + AS_VAR functions that need it. + +2008-10-21 Paolo Bonzini + and Eric Blake + + Use a shell function for _AC_COMPILE_IFELSE. + * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE_BODY): New macro. + (_AC_COMPILE_IFELSE): Use a shell function. + +2008-10-21 Eric Blake + + Use AS_VAR_APPEND. + * lib/autoconf/functions.m4 (AC_CHECK_FUNCS_ONCE): Use new macro. + * lib/autoconf/general.m4 (_AC_INIT_PREPARE) + (_AC_LIBOBJS_NORMALIZE): Likewise. + * lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): Likewise. + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS) + (_AC_OUTPUT_CONFIG_STATUS, _AC_OUTPUT_MAIN_LOOP): Likewise. + * lib/autotest/general.m4 (AT_INIT): Likewise. + + Add AS_VAR_APPEND. + * lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_PREPARE) + (_AS_VAR_APPEND_WORKS, AS_VAR_APPEND): New macros. + (AS_PREPARE, _AS_PREPARE): Emit preparation. + * tests/m4sh.at (AS@&t@_VAR_APPEND): New test. + * doc/autoconf.texi (Polymorphic Variables) : + Document new macro. + : Mention ramification of `""` rules. + * NEWS: Mention new macro. + +2008-10-21 Paolo Bonzini + and Eric Blake + + Use a shell function for _AC_PREPROC_IFELSE. + * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY): New macro. + (_AC_PREPROC_IFELSE): Use a shell function. + * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Factor for faster execution. + (AS_REQUIRE_SHELL_FN): Bypass AS_REQUIRE if function has already + been provided. + +2008-10-21 Eric Blake + + Add banners to generated files. + * lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Use m4_text_box for + existing banner. + (AS_INIT): Add new banners at strategic points. + * lib/autoconf/general.m4 (AC_INIT): Alter banner location, and + make consistent with other banners. + * lib/autotest/general.m4 (AT_INIT): Make banners consistent. + +2008-10-20 Paolo Bonzini + + Add AC_REQUIRE_SHELL_FN and the SHELL_FN diversion. + * lib/autoconf/general.m4 (AC_REQUIRE_SHELL_FN): New. + (m4_divert(SHELL_FN)): New. + +2008-10-20 Eric Blake + + Avoid unportable use of echo in testsuite. + * tests/m4sh.at (AS@&t@_VAR basics): Use AS_ECHO, since string + contains backslash. + +2008-10-18 Paolo Bonzini + + Make sure that nested AS_REQUIRE do not lose the desired diversion. + * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Expand _m4_divert_desired before + passing it to m4_divert_require, so that its content is not used + anymore. + * tests/m4sh.at (Nested AS_REQUIRE): New testcase. + +2008-10-18 Eric Blake + + Document bugs in { } handling. + * doc/autoconf.texi (Limitations of Builtins): Mention bug on + empty list. + + Fix some testsuite failures introduced two days ago. + * tests/m4sh.at (Nested AS@&t@_REQUIRE_SHELL_FN) + (AS@&t@_REQUIRE_SHELL_FN and m4@&t@_require): Adjust to changed + API. + Reported by Ralf Wildenhues. + +2008-10-18 Ralf Wildenhues + + Show how to extract single substitutions from config.status. + * doc/autoconf.texi (config.status Invocation): Show example + using `--file=-'. + +2008-10-17 Eric Blake + + Add m4_curry. + * lib/m4sugar/m4sugar.m4 (m4_curry, _m4_curry): New macros. + * tests/m4sugar.at (m4@&t@_map_args): Rename... + (m4@&t@_map_args and m4@&t@_curry): ...and add currying tests. + * doc/autoconf.texi (Looping constructs) : Document + currying as a way to add parameters. + (Evaluation Macros) : Document the new macro. + * NEWS: Likewise. + + Improve suggested test filtering. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_SUGGESTED_PRUNE): New macro, + extracted from... + (_AS_DETECT_BETTER_SHELL): ...here, to use faster API. No need to + check for an empty required set. + + Add m4_set_map. + * lib/m4sugar/m4sugar.m4 (m4_set_foreach): New macro. + * tests/m4sugar.at (m4@&t@_set): Enhance test. + * doc/autoconf.texi (Set manipulation Macros) : + Document it. + * NEWS: Likewise. + + Document m4_map_args. + * lib/m4sugar/m4sugar.m4 (m4_transform, m4_transform_pair): + Rename... + (m4_map_args, m4_map_args_pair): ...to these names, and document. + (m4_version_unletter): Use the interface. + * lib/m4sugar/foreach.m4 (m4_map_args, m4_map_args_pair) + (_m4_map_args_, _m4_map_args_pair_, _m4_map_args_pair_end): + Perform same renames. + * lib/m4sugar/m4sh.m4 (AS_CASE, AS_IF): Adjust callers. + * tests/m4sugar.at (m4@&t@_map_args): New test. + (recursion): Adjust caller. + * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Likewise. + * doc/autoconf.texi (Looping constructs) : Document + this interface. + * NEWS: Mention the new macros. + +2008-10-17 Eric Blake + + Reduce vertical whitespace in configure. + * lib/autoconf/general.m4 (AC_INIT): Silence newline output during + m4 side effect initializations. + * lib/m4sugar/m4sh.m4 (AS_PREPARE): Likewise. + +2008-10-17 Eric Blake + + Document AS_VAR interfaces. + * doc/autoconf.texi (Programming in M4sh): M4sh is now prime-time. + (Polymorphic Variables): New node. + * NEWS: Update accordingly. + + Test AS_VAR interfaces. + * tests/m4sh.at (AS@&t@_VAR): New test. + * lib/m4sugar/m4sh.m4 (AS_VAR_PUSHDEF): Force expansion of + _AS_TR_SH_PREPARE at top level, rather than argument collection. + (AS_TR_SH): Support command substitution. + + Add AS_VAR_COPY. + * lib/m4sugar/m4sh.m4 (AS_VAR_COPY): New macro. + (AS_VAR_IF): Use it, instead of the broken AS_VAR_GET. + * lib/autoconf/general.m4 (AC_CACHE_CHECK): Likewise. + * lib/autoconf/libs.m4 (AC_SEARCH_LIBS): Likewise. + * lib/autotest/general.m4 (_AT_FINISH): Likewise. + + Sort AS_VAR_* interfaces. + * lib/m4sugar/m4sh.m4 (AS_VAR_GET): Reduce output to one line. + (AS_VAR_TEST_SET, AS_VAR_SET, AS_VAR_SET_IF, AS_VAR_POPDEF): Sort, + no code changes. + +2008-10-16 Eric Blake + + Allow comments before functions emitted by m4sh. + * lib/m4sugar/m4sh.m4 (AS_REQUIRE_SHELL_FN): Add comment + argument. Supply closing comment, to ease readability. + (_AS_MKDIR_P_PREPARE): Adjust caller. + (_AS_UNSET_PREPARE): Add comment. + + Add AS_FUNCTION_DESCRIBE. + * lib/m4sugar/m4sh.m4 (AS_FUNCTION_DESCRIBE): New macro. + * lib/autotest/general.m4 (AT_INIT): Use it. + +2008-10-16 Eric Blake + + Speed up m4_qlen with caching. + * lib/m4sugar/m4sugar.m4 (_m4_qlen): Renamed from old m4_qlen. + (m4_qlen): Cache results for speed. + +2008-10-16 Paolo Bonzini + + Add a testcase using more then one language. + * tests/compile.at (Multiple languages): New test. + +2008-10-16 Paolo Bonzini + + Fix Libtool's config.lt test. + * lib/m4sugar/m4sh.m4 (_AS_PREPARE): Disable AS_REQUIRE while + expanding it. + +2008-10-15 Eric Blake + + Break circular require chain in _AS_LINENO_PREPARE. + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Ensure that logging is + disabled when reporting LINENO failure, since logging requires + LINENO. + * doc/autoconf.texi (Initialization Macros): Recommend m4_pushdef, + not m4_rename, since the latter is undocumented. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Avoid + m4_rename, as it does not yet handle pushdef stacks. + Reported by Ralf Wildenhues. + +2008-10-15 Eric Blake + + Cleanups to previous patches. + * doc/autoconf.texi (Portable Shell): Minor edits. + (Limitations of Builtins): Touch up wording. + * lib/m4sugar/m4sh.m4 (AS_LINENO_PUSH): Nuke trailing whitespace. + (_AS_SHELL_SANITIZE): Wrap comments less than 80 columns. + +2008-10-15 Paolo Bonzini + + Updates to shell portability documentation. + * doc/autoconf.texi: Updates all references to "Portable Shell" and + "Limitations of Builtins" to use three-argument commands. + (Programming in M4sh): Document AS_ECHO, AS_ECHO_N, AS_UNSET. + (Portable Shell): Move here discussion about "Where is the POSIX + shell?" Mention that M4sh provides a SVR2 shell and takes care + of unsetting variables if necessary. Talk about M4sh and not only + Autoconf-generated scripts. + (Special Shell Variables): Talk about M4sh and not only + Autoconf-generated scripts. Don't talk about things that Autoconf + does not do. Mention problems of $LINENO with shell functions. + (Limitations of Builtins). Mention AS_ECHO and AS_ECHO_N. Move + discussion of eval bugs before discussion on proper use of eval. + Mention AS_IF. Reword why not to use "shift N". Mention "foo=; + unset foo" trick. Include M4sh code that unsets MAIL for Bash 2.01. + * NEWS: Update list of documented M4sh macros. + +2008-10-15 Paolo Bonzini + + Assume a (possibly buggy) `unset' is present after a + `better shell' was found. + * lib/autoconf/general.m4 (_AC_CACHE_DUMP): Use AS_UNSET. + * lib/autoconf/programs.m4 (AC_PROG_SED): Use AS_UNSET. + * lib/m4sugar/m4sh.m4 (_AS_UNSET_PREPARE): Provide $as_unset as an + alias for AS_UNSET, for backwards compatibility. + (_AS_DETECT_BETTER_SHELL): Set BASH_ENV and ENV to /dev/null in case + the shell does not support unset. + (_AS_SHELL_SANITIZE): Work around Bash 2.01 bugs. Unset BASH_ENV. + (AS_INIT, _AS_PREPARE, AS_PREPARE): Call it. + (AS_UNSET): Assume it is there but it might fail if the variable is + not set. Use it throughout instead of $as_unset. + +2008-10-15 Paolo Bonzini + + Turn AS_SHELL_SANITIZE into a for-Libtool-only wrapper. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED, _AS_DETECT_SUGGESTED): Remove + m4_require of _AS_DETECT_BETTER_SHELL. + (_AS_CLEANUP): Add it here. + (_AS_DETECT_BETTER_SHELL): Just expand the test instead of appending it + to _AS_CLEANUP. + (_AS_SHELL_SANITIZE): New name of the old AS_SHELL_SANITIZE macro. + (AS_SHELL_SANITIZE): New macro hacking around Libtool misuse. + (AS_PREPARE): Use _AS_SHELL_SANITIZE. + (AS_INIT): Add m4_provide of itself. + +2008-10-15 Paolo Bonzini + + Use "test x$foo = xyes" to avoid upsetting Libtool's sh.test. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL, _AS_SHELL_FN_WORK): Use + "test x$foo = xyes". + +2008-10-15 Paolo Bonzini + + Trim down the size of the better-shell test. + * lib/m4sugar/m4sh.at (_AT_DETECT_BETTER_SHELL): Store the common + snippets into shell variables. + (_AS_RUN): Rewrite. + +2008-10-15 Paolo Bonzini + + Support a stack of LINENO values for AS_MESSAGE. + * lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG): If defined, use $as_lineno as + the line number emitted to the log file. + (AS_LINENO_PUSH, AS_LINENO_POP): New. + * tests/m4sh.at (LINENO Stack): New test. + +2008-10-14 Eric Blake + + Correct previous patch. + * doc/autoconf.texi (Shell Functions): Bash obeys Posix, after + all. + + Document shell function environment pitfall. + * doc/autoconf.texi (Shell Functions): Document bugs in bash, + Solaris /bin/sh. + +2008-10-14 Paolo Bonzini + + Use m4_require to implement AS_REQUIRE. + * lib/m4sugar/m4sugar.m4 (_m4_require_call): Accept a third argument. + (m4_require): Pass it. + (m4_divert_require): New. + * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Rewrite using m4_divert_require. + Remove comment about differences with m4_require. + * tests/m4sh.at (AS_REQUIRE_SHELL_FN and m4_require): Update to test + the expected behavior. + (Nested AS_REQUIRE_SHELL_FN): New test. + +2008-10-13 Paolo Bonzini + + Test AS_LINENO_PREPARE. + * tests/m4sh.at: Use documented AS_LINENO_PREPARE. + +2008-10-13 Paolo Bonzini + + Test AS_ME_PREPARE. + * tests/m4sh.at (as_me): New test. + +2008-10-13 Paolo Bonzini + + Add and document AS_INIT_GENERATED. + * lib/m4sugar/m4sh.m4 (AS_INIT_GENERATED): New. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Use it. + * doc/autoconf.texi (Initialization macros): Document it. + +2008-10-13 Eric Blake + + Use consistent shell function style. + * lib/m4sugar/m4sh.m4 (_AS_PREPARE, AS_REQUIRE_SHELL_FN) + (_AS_SHELL_FN_WORK): Imitate GNU Coding Standards for C + functions. + +2008-10-13 Paolo Bonzini + + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Place names of + contributors under m4 rather than shell comments. + +2008-10-10 Paolo Bonzini + + * lib/m4sugar/m4sh.m4 (AS_ME_PREPARE, AS_LINENO_PREPARE): New. + * doc/autoconf.texi (Initialization macros): Document them. + (Portable Shell): Refer to AS_LINENO_PREPARE. + * NEWS: Mention them. + + * bin/autoconf.as: Invoke AS_ME_PREPARE. + * lib/autotest/general.m4: Likewise. + +2008-10-10 Paolo Bonzini + + * doc/autoconf.texi (Programming in M4sh): Make its own chapter. + +2008-10-10 Eric Blake + + Fix _AS_MKDIR_P usage. + * lib/m4sugar/m4sh.m4 (_AS_MKDIR_P): Correct documentation to + match implementation. + (_AS_PREPARE, _AS_MKDIR_P_PREPARE): Adjust callers. + * doc/autoconf.texi (Programming in M4sh) : Tweak + wording to better match behavior. + +2008-10-10 Paolo Bonzini + + * doc/autoconf.texi: Be less wary of shell functions. + * NEWS: Document the increased use of shell functions. + +2008-10-10 Paolo Bonzini + + * m4sugar/m4sh.m4 (_AS_MKDIR_P): New, from AS_MKDIR_P. Adjust + meaning of as_mkdir_p to be `false' or a full `mkdir -p' command. + (AS_MKDIR_P): Just dispatch to as_func_mkdir_p. + (_AS_PREPARE): Define shell functions. + (_AS_MKDIR_P_PREPARE): Set as_mkdir_p according to the above change. + Define shell functions. + +2008-10-09 Eric Blake + + Only prepare $as_me if it will be used. + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Avoid unconditional + preparation. + (_AS_ECHO_LOG): Depend on $LINENO preparation. + (AS_MESSAGE): Depend on $as_me preparation. + (AS_TMPDIR): Use AS_ERROR, rather than a hand-rolled copy. + +2008-10-09 Paolo Bonzini + + * m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Delay setting as_me + until the M4SH-INIT diversion using _AS_ME_PREPARE. + (_AS_PREPARE): Invoke _AS_EXPR_PREPARE before _AS_BASENAME_PREPARE + and _AS_DIRNAME_PREPARE, and _AS_BASENAME_PREPARE and _AS_ME_PREPARE + before _AS_LINENO_PREPARE. + (AS_PREPARE): Include all the AS_REQUIREs manually. + (_AS_ME_PREPARE): New. + (_AS_LINENO_PREPARE): Use m4_defun. + +2008-10-09 Paolo Bonzini + + * m4sugar/m4sh.m4 (_AS_BASENAME_EXPR, _AS_DIRNAME_EXPR): Do not + require _AS_EXPR_PREPARE. + (_AS_BASENAME_PREPARE, _AS_DIRNAME_PREPARE): Do it here. + (_AS_PREPARE): Add _AS_BASENAME_PREPARE. + +2008-10-08 Eric Blake + + Resync from gnulib. + * cfg.mk (cvs_executable_files, cvs_files): Rewrite... + (fetch): ...into new target. + (executable-update): Delete, now that it is unused. + * maint.mk (update, local_updates, cvs_files, gnulib_repo) + (wget-update, cvs-update): Likewise. + * HACKING (Update the foreign files): Document new procedure. + * GNUmakefile: Resync from upstream, via new 'make fetch'. + * build-aux/config.guess: Likewise. + +2008-10-08 Paolo Bonzini + + * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_SPY): Remove. + (AS_INIT): Do not call it. + +2008-10-08 Paolo Bonzini + + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Expand + _AS_UNSET_PREPARE in M4SH-SANITIZE. + +2008-10-08 Eric Blake + + Avoid repeating required shell tests in suggested set. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED, _AS_DETECT_SUGGESTED): + Use m4_set, rather than m4_expand_once/m4_append. + (_AS_DETECT_SUGGESTED): Adjust to new storage layout, and filter + required tests out of suggested tests. + Reported by Paolo Bonzini. + +2008-10-08 Paolo Bonzini + + Add m4sh keyword to all m4sh.at tests. + * tests/m4sh.at: Add m4sh keyword to all tests. Fix comment + pastos. + +2008-10-08 Ralf Wildenhues + + Document AS_VERSION_COMPARE. + * doc/autoconf.texi (Programming in M4sh): Document + AS_VERSION_COMPARE. + * NEWS: Update. + + Do not write to testsuite log fd before initialization. + * lib/autotest/general.m4 (AS_MESSAGE_LOG_FD, AT_JOB_FIFO_FD): + Define fds only when initializing the log fd so early error + messages do not try to write to it. + * tests/autotest.at (Startup error messages): New test. + * NEWS: Document this 2.63 regression. + +2008-10-07 Eric Blake + + Ensure _AS_CLEANUP is defined. + * lib/m4sugar/m4sh.m4 (_AS_CLEANUP): Give initial definition. + * tests/m4sh.at (AS@&t@_INIT cleanup): Expose the need for this. + + Improve m4sh maintainability. + * lib/m4sugar/m4sh.m4: Sort macros for sanitizing the shell; no + code change. + + Fix m4 quoting in previous patch. + * lib/m4sugar/m4sh.m4 (AS_REQUIRE_SHELL_FN): Determine diversion + name prior to invoking AS_REQUIRE. + Reported by Ralf Wildenhues. + +2008-09-18 Paolo Bonzini + and Eric Blake + + Add a separate diversion for shell functions. + * lib/m4sugar/m4sh.m4 (M4SH-INIT-FN): New diversion. + (AS_REQUIRE): Accept diversion parameter. + (AS_REQUIRE_SHELL_FN): Use it. + +2008-10-06 Eric Blake + + Add m4_default_quoted. + * lib/m4sugar/m4sugar.m4 (m4_default_quoted): New macro. + (m4_for, m4_expand_once, m4_text_wrap, m4_text_box): Use it. + * doc/autoconf.texi (Conditional constructs): Document it. + * NEWS: Likewise. + + Fix build with case-insensitive make, again. + * Makefile.am (pkgdata_DATA): Protect by MAKE_CASE_SENSITIVE. + Reported via Keith Marshall, originally by newthinker in + . + +2008-10-06 Bruno Haible + + Warn about /usr/ucb on Solaris. + * doc/install.texi (Particular Systems): Recommend putting + /usr/ucb late in PATH, if at all. + +2008-10-03 Ralf Wildenhues + + Fix more testsuite hang corner cases. + * lib/autotest/general.m4: Use the serial code path if no test + is to be run. + * tests/autotest.at (parallel test execution): Test -j and -jN + with `-k notmatched'. + +2008-10-02 Ralf Wildenhues + + Fix hang with `testsuite -k notmatched'. + * lib/autotest/general.m4: Do not reset $at_jobs if it is equal + to one. Fixes hang with `-k notmatched'. + +2008-10-02 Eric Blake + + Document more binary file portability traps. + * doc/autoconf.texi (Limitations of Usual Tools) : Remind + reader that NUL and sed don't always mix. + : Mention Solaris /usr/ucb/tr bug with \0. + +2008-10-02 Ralf Wildenhues + + Implement parallel Autotest test execution: testsuite --jobs. + * lib/autotest/general.m4 (AT_JOB_FIFO_FD): New macro. + (AT_INIT): : New variable. + Accept -j, -jN, --jobs[=N], document them in --help output. + Implement parallel driver loop using a FIFO, enabled with --jobs + and if mkfifo works; otherwise, fall back to sequential loop. + (AT_SETUP): Store, do not output summary progress line if + parallel. + * tests/autotest.at (parallel test execution, parallel truth) + (parallel fallacy, parallel skip): New tests. + * doc/autoconf.texi (testsuite Invocation): Document -j, --jobs, + the mkfifo requirement, and that --errexit may cause concurrent + jobs to finish. + * NEWS: Update. + +2008-09-20 Eric Blake + + Fix sample isinf definition. + * doc/autoconf.texi (Function Portability) : Filter out NaN + first. + * THANKS: Update. + Reported by David Cournapeau. + +2008-09-16 Eric Blake + + Fix Erlang regression, introduced 2006-11-17. + * lib/autoconf/erlang.m4 (AC_LANG(Erlang)): Avoid M4 comment + caused by underquoting. + * NEWS: Mention this fix. + * THANKS: Update. + Reported by BJ Terry. + +2008-09-13 Ralf Wildenhues + + * lib/autoconf/general.m4 (AC_CONFIG_AUX_DIRS): Improve a bit. + + Mention Solaris sh ':' redirection bug. + * doc/autoconf.texi (File Descriptors): Redirecting ':' + in a loop causes bogus optimization with Solaris sh. + +2008-09-10 Eric Blake + + Avoid testsuite bug when autom4te cache is disabled by user. + * tests/tools.at (autoconf: forbidden tokens, basic): Enable + cache, even if user normally disabled it. + Reported by Bruno Haible. + + Avoid testsuite bug in presence of verbose config.site. + * tests/base.at (Input/Output): Nullify config.site during test. + Reported by Bob Friesenhahn. + +2008-09-09 Eric Blake + + Release Version 2.63. + * NEWS: Mention the release. + + Formatting tweaks to the manual. + * doc/autoconf.texi (Introduction, Systemology) + (File System Conventions, Portable C and C++) + (Floating Point Portability): Allow URLs to split as needed. + (Indices): Add entries, to work around texinfo bug on indices that + start too close to a page break. + (Particular Functions): Mention ftello. + (Introduction, Language Choice): Use @enddots at sentence end. + + Resync from gnulib. + * cfg.mk (cvs_executable_files, cvs_files): Update list of files, + although for now, they are still manually sync'd. + * build-aux/gnupload: Update. + * build-aux/config.sub: Likewise. + * GNUmakefile: Likewise. + +2008-09-06 Eric Blake + + Mention that Automake already supports VPATH. + * doc/autoconf.texi (Build Directories): Details in this section + only apply to users avoiding automake. + * THANKS: Update. + Reported by Matej Tyc. + + Relax tone when warning about cross-compiler names. + * lib/autoconf/programs.m4 (_AC_TOOL_WARN): Support cross-compiles + with poorly named tools; the issue has been reported too many + times in the last four years to pull support. + * doc/autoconf.texi (Specifying Names, Generic Programs): Update + documentation accordingly. + * THANKS: Update. + Reported by Josef Tran and others, wording suggested by Ralf + Wildenhues. + +2008-09-01 Eric Blake + + Improve AC_C_BIGENDIAN. + * doc/autoconf.texi (C Compiler) : Mention that + universal builds require a config header. + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Enhance comments. Check + AH_HEADER at the last possible moment, so that users can use + AC_CONFIG_HEADER after this macro. + Reported by Stepan Kasal. + + Fix manual date information. + * doc/autoconf.tex: UPDATED refers to the day the manual was + built, not the release date of Autoconf. + Based on a bison patch by Akim Demaille. + +2008-08-27 Eric Blake + + Fix off-by-one bug in _m4_shiftn. + * lib/m4sugar/foreach.m4 (_m4_shiftn): Handle case when shifting + all arguments. + * tests/m4sugar.at (M4 loops): Test it. + Reported by Akim Demaille. + +2008-08-26 Eric Blake + + Improve INSTALL formatting. + * doc/install.texi [!autoconf]: Ensure first paragraphs are + indented like all others in a plain text rendering. + * Makefile.am ($(srcdir)/INSTALL): Ensure plaintext formatting. + Reported by Bruno Haible. + +2008-08-26 Stepan Kasal + + Check for case sensitive make. + * m4/make-check.m4 (AC_PROG_MAKE_CASE_SENSITIVE): New macro,... + * configure.ac: ... called here. + * Makefile.am ($(abs_srcdir)/INSTALL, INSTALL): Return to... + ($(srcdir)/INSTALL): ...this, but enclose the rule in + "if MAKE_CASE_SENSITIVE". + +2008-08-26 Eric Blake + + Update invocation documentation. + * doc/autoconf.texi (autoscan Invocation): Mention --debug. + (autoreconf Invocation): Mention -v. + (autom4te Invocation): Tie --freeze to -F, not -f. + (autoupdate Invocation): Mention --prepend-include. + * doc/install.texi (configure Invocation): Mention --help=short, + --help=recursive, -n/--no-create, --prefix. Avoid TABs. + * bin/autoscan.in ($help): Omit space before `...'. + * bin/ifnames.in ($help): Likewise. + * bin/autoconf.as (Usage): Likewise. + * bin/autoreconf.in ($help): Likewise. + * bin/autoheader.in ($help): Likewise. + * bin/autom4te.in ($help): Likewise. + * bin/autoupdate.in ($help): Likewise. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Use + `[OPTION]...', rather than `[OPTIONS]'. Mention --silent. Indent + --file correctly. + + Don't let frozen __m4_version__ break downgrade to m4 1.4.x. + * bin/autom4te.in: Adjust comments, now that we rely on 1.4.5+. + (files_to_options): Avoid inheriting __m4_version__ from frozen + file if current M4 does not support it. + +2008-08-25 Eric Blake + + Adjust to recent m4 1.6 change to support m4_debugmode(d). + * lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Move + freeze-time decision of using faster 1.6 implementation... + (m4_init): ...to a runtime decision, and add use of new debugmode + flag. + +2008-08-22 Peter O'Gorman + + Limit AC_C_BIGENDIAN univeral checks to Mac OS X. + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Limit the check to + __APPLE_CC__ with possible -arch flags. + * NEWS: Document it. + +2008-08-22 Ralf Wildenhues + + * NEWS: Fix typo. + +2008-08-22 Eric Blake + + * TODO: Add an item for additional m4sugar looping constructs. + Suggested by Ralf Wildenhues. + + Add reminder to keep dual implementations in sync. + * lib/m4sugar/m4sugar.m4: Add comments. + * lib/m4sugar/foreach.m4: Likewise. + Suggested by Ralf Wildenhues. + +2008-08-22 Peter Eisentraut (tiny change) + + Format warning and error messages to match GCS. + * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK) + (_AC_INIT_PARSE_ARGS, _AC_CACHE_DUMP): Start warning and error + messages with a lowercase letter, end them without punctuation. + * lib/autoconf/lang.m4 (AC_NO_EXECUTABLES): Likewise. + * lib/autoconf/libs.m4 (AC_PATH_X): Likewise. + * lib/autoconf/status.m4 (AC_OUTPUT, _AC_OUTPUT_MAIN_LOOP): + Likewise. + * tests/fortran.at (GNU Fortran): Likewise. + * tests/torture.at (Deep Package): Likewise. + +2008-08-21 Eric Blake + + Avoid extra side effects in m4sugar list expansion. + * lib/m4sugar/m4sugar.m4 (m4_mapall_sep, m4_list_cmp): Wrap + around... + (_m4_mapall_sep, _m4_list_cmp_raw): ...new helpers, to avoid + duplicate side effects. + (m4_version_compare): Adjust caller. + * lib/m4sugar/foreach.m4 (m4_list_cmp): Rename... + (_m4_list_cmp_raw): ...to match m4sugar. + * doc/autoconf.texi (Looping constructs): Document the behavior of + side effects. + * tests/m4sugar.at (M4 loops, m4@&t@_map, m4@&t@_version_compare): + Ensure only one side effect. + (recursion): Fix test typo. + Reported by Ralf Wildenhues. + +2008-08-21 Ralf Wildenhues + + * TODO: Add item for compiler default flags. + Suggested by Bruno Haible. + + * tests/m4sh.at (AS_IF and AS_CASE): Set the expansion limit + back to 1000. + +2008-08-21 Eric Blake + + Formatting improvements. + * doc/autoconf.texi: Use @file and @command, rather than @code, + where appropriate. + + Document another make bug. + * doc/autoconf.texi (The Make Macro SHELL): Mention bug in BSD + make, GNU make <= 3.80. + + Tweak wording about SHELL in Makefile. + * doc/autoconf.texi (The Make Macro SHELL): Stronger wording on + the importance of proper SHELL settings. + Reported by Bruno Haible, in + http://lists.gnu.org/archive/html/bug-libtool/2008-04/msg00029.html. + +2008-08-20 Ralf Wildenhues + + Avoid timestamp races for updated input. + * tests/m4sh.at (AS_IF and AS_CASE): Use `autom4te --force' for + second script. + * tests/tools.at (autotools and whitespace in file names): Add + --force for repeated invocations. + +2008-08-20 Bruno Haible + + Add section to INSTALL about particular systems. + * doc/install.texi (Particular systems): New node. + * doc/autoconf.texi: Adjust menus. + +2008-08-19 Bruno Haible + and Peter O'Gorman + + Mention universal binaries in INSTALL. + * doc/install.texi (Compiling For Multiple Architectures): Explain + how to create universal binaries on MacOS X. + +2008-08-19 Jim Meyering + Eric Blake + Ralf Wildenhues + + Avoid shell parse errors after interrupt due to empty ``. + * doc/autoconf.texi (Shell Substitutions): Document the issue. + * lib/m4sugar/m4sh.m4 (AS_VAR_IF): New function. + * lib/autoconf/functions.m4 (AC_CHECK_FUNC): Use it in place of + "test AS_VAR_GET([...]) = yes" + * lib/autoconf/general.m4 (AC_CHECK_FILE, AC_CHECK_DECL): Likewise. + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Likewise. + (_AC_CHECK_HEADER_NEW, _AC_CHECK_HEADER_OLD): Likewise. + (_AC_CHECK_HEADER_DIRENT): Likewise. + * lib/autoconf/libs.m4 (AC_CHECK_LIB): Likewise. + * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, AC_CHECK_MEMBER): Likewise. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Use + temporary variable to work around the issue. + * tests/foreign.at (Libtool): Quote result of command + substitution. + +2008-08-18 Eric Blake + + Test m4_transform without tickling shell bugs. + * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Relax test to + something more manageable. + * tests/m4sugar.at (recursion): Move stress test of + m4_transform_pair here. + Reported by Ralf Wildenhues. + + Let 'git diff' give better context for doc updates. + * .gitattributes (*.texi*): Add new entry. + * README-hacking: Mention how to use it. + Inspired by a coreutils patch by Jim Meyering. + +2008-08-15 Eric Blake + + Fix m4_map regression from 2007-10-16. + * lib/m4sugar/m4sugar.m4 (_m4_apply): New macro. + (m4_map): Ignore empty sublists. For a list consisting of only an + empty sublist, this restores 2.61 behavior of being a no-op. + (m4_map_sep): Likewise, and expand separator. + (m4_mapall, m4_mapall_sep): New macros, to regain 2.62 behavior. + (_m4_map): Rewrite, to be common base for all four variants. + * lib/m4sugar/foreach.m4 (_m4_map): Adjust to new prototype. + * tests/m4sugar.at (m4@&t@_map): Add tests. + * doc/autoconf.texi (Looping constructs) : Document new + macros, and mention ramifications of expanded separator. + * NEWS: Mention the change. + +2008-08-14 Eric Blake + + Implement m4_transform_pair, to speed up AS_IF. + * lib/m4sugar/m4sugar.m4 (m4_transform, m4_transform_pair): New + macros, undocumented for now. + * lib/m4sugar/foreach.m4 (m4_transform, m4_transform_pair): Also + the m4 1.4.x counterparts. + * lib/m4sugar/m4sh.m4 (AS_IF, AS_CASE): Use it. + * tests/m4sh.at (AS@&t@_IF and AS@&t@_CASE): Test it. + +2008-08-14 Ralf Wildenhues + + * lib/autoconf/programs.m4 (AC_PATH_TARGET_TOOL) + (AC_CHECK_TARGET_TOOL, AC_CHECK_TARGET_TOOLS): Require, do not + warn about previous AC_CANONICAL_TARGET. + (AC_CHECK_TARGET_TOOL): Add missing `$' making the macro + unusable in the non-cross-compiling case. + * NEWS, THANKS: Update. + Report by Dave Erickson. + +2008-08-12 Eric Blake + + Optimize m4_bmatch. + * lib/m4sugar/foreach.m4 (m4_bmatch): Provide linear + implementation for m4 1.4.x. + * tests/m4sugar.at (m4@&t@_bmatch): New test. + (recursion): Test the linear nature. + * NEWS: Document the fix. + + Fix m4_cond corner case. + * lib/m4sugar/foreach.m4 (_m4_cond): Ensure alternate + implementation allows concatenation with subsequent text. + * tests/m4sugar.at (m4@&t@_cond): Enhance test. + + Add test for m4_cond. + * tests/m4sugar.at (m4@&t@_cond): New test. + Reported by Ralf Wildenhues. + +2008-08-06 Eric Blake + + Fix autoheader 2.62 regression on AC_DEFINE([__EXTENSIONS__]). + * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Use a + unique key for the AH_VERBATIM. + * tests/c.at (AC_USE_SYSTEM_EXTENSIONS): New test. + * NEWS: Mention the fix. + Reported by Andreas Schwab, analyzed by Stepan Kasal. + + Add linear m4_cond for m4 1.4.x. + * lib/m4sugar/m4sugar.m4 (m4_cond): Split into... + (_m4_cond): ...this, for fewer macros per iteration. + * lib/m4sugar/foreach.m4 (_m4_cond): New implementation. + * tests/m4sugar.at (recursion): Test it. + * NEWS: Document the linear guarantee. + + Speed up diversion handling. + * lib/m4sugar/m4sugar.m4 (m4_divert, m4_divert_push) + (m4_divert_pop, m4_divert_text): Avoid dnl for fewer macro + expansions. + + AC_C_CHAR_UNSIGNED is not strictly necessary. + * doc/autoconf.texi (C Compiler) : Mention a + portable alternative to this macro. + * THANKS: Update. + Reported by Hallvard B Furuseth. + + Update some files from upstream. + * GNUmakefile: Update. + * build-aux/announce-gen: Likewise. + * build-aux/config.guess: Likewise. + * build-aux/config.sub: Likewise. + * build-aux/git-version-gen: Likewise. + * build-aux/texinfo.tex: Likewise. + * build-aux/vc-list-files: Likewise. + * doc/make-stds.texi: Likewise. + * doc/standards.texi: Likewise. + +2008-08-04 Ralf Wildenhues + + Fix AC_CONFIG_FILES([$var]) 2.62 regression. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Flatten + whitespace in $ac_config_files and $ac_config_headers. + * tests/torture.at (Parameterized AC_CONFIG_FILES): New test. + Report by Andreas Schwab and Per Øyvind Karlsen. + * THANKS: Update. + +2008-07-30 Eric Blake + + Fix bugs in previous version of m4_bpatsubsts. + * lib/m4sugar/foreach.m4 (_m4_bpatsubsts): Don't expand $1, and + allow concatenation with subsequent text. + * tests/m4sugar.at (m4@&t@_bpatsubsts): Enhance test. + +2008-07-29 Eric Blake + + Add linear m4_bpatsubsts for m4 1.4.x. + * lib/m4sugar/m4sugar.m4 (m4_bpatsubsts): Match documentation + about anchors, even for only one substitution. + * lib/m4sugar/foreach.m4 (_m4_bpatsubsts): New implementation. + * doc/autoconf.texi (Conditional constructs) : + Clarify behavior with regard to quoting. + * tests/m4sugar.at (recursion): Test scaling of m4_bpatsubsts. + (m4@&t@_bpatsubsts): New test. + * NEWS: Document the linear guarantee. + + Tweak m4_do semantics. + * lib/m4sugar/m4sugar.m4 (m4_do): Don't concat final argument with + subsequent text. + * lib/m4sugar/foreach.m4 (m4_do): Don't concat intermediate + arguments, and avoid infinite loop. + * doc/autoconf.texi (Evaluation Macros) : Document the + behavior. + * tests/m4sugar.at (m4@&t@_do): New test. + + Optimize m4_for. + * lib/m4sugar/m4sugar.m4 (m4_for): Use fewer macros. + (_m4_for): Take additional parameter, for fewer m4_indir calls. + * lib/m4sugar/foreach.m4 (_m4_foreach, _m4_shiftn, m4_do) + (m4_reverse, _m4_list_pad, _m4_list_cmp): Adjust all callers. + * doc/autoconf.texi (Looping constructs) : Document subtle + semantic change caused by the optimization. + * tests/m4sugar.at (M4 loops): Test the new semantics. + + One more m4_list_cmp tweak. + * lib/m4sugar/m4sugar.m4 (_m4_list_cmp_1): Don't defer shift. + * lib/m4sugar/foreach.m4 (m4_list_cmp): Fix comment. + * tests/m4sugar.at (recursion): Test both directions of list + disparity. + + Add m4_reverse, and improve m4_list_cmp. + * lib/m4sugar/m4sugar.m4 (m4_reverse): New macro. + (m4_list_cmp): Rewrite to give linear behavior with M4 1.6 on an + m4_reverse'd list. + * lib/m4sugar/foreach.m4 (m4_reverse): Add the M4 1.4.x + counterpart. + * tests/m4sugar.at (recursion): Test it. + * doc/autoconf.texi (Evaluation Macros) : Document + it. + (Text processing Macros) : Cross-reference to m4_set. + * NEWS: Mention new macro. + +2008-07-28 Eric Blake + + Avoid _m4_shiftn for m4 1.6 speedup. + * lib/m4sugar/m4sugar.m4 (m4_foreach, _m4_foreach, m4_map) + (_m4_map, m4_map_sep): Rewrite recursion to use one less m4_if. + * lib/m4sugar/foreach.m4 (_m4_map): Accomodate changed signature. + + Implement O(n) unique element set creation. + * lib/m4sugar/m4sugar.m4 (m4_set_add, m4_set_add_all) + (m4_set_contains, m4_set_contents, m4_set_delete) + (m4_set_difference, m4_set_dump, m4_set_empty, m4_set_foreach) + (m4_set_intersection, m4_set_list, m4_set_listc, m4_set_remove) + (m4_set_size, m4_set_union): New macros. + * lib/m4sugar/foreach.m4 (m4_set_add_all): Add O(n) fallback for + m4 1.4.x. + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS, AC_SUBST): Use + new m4_set API for the set most likely to be large. + * doc/autoconf.texi (Set manipulation Macros): New node. + * NEWS: Mention new macros. + * tests/m4sugar.at (m4@&t@_set): New test. + +2008-07-25 Eric Blake + + Avoid infinite aclocal loop. + * lib/m4sugar/m4sugar.m4 (m4_init): Bypass m4_include tracing, so + that aclocal doesn't insist on finding m4sugar/foreach.m4. + + Provide O(n) replacement macros for M4 1.4.x. + * lib/m4sugar/foreach.m4: New file. + (m4_foreach, m4_case, _m4_shiftn, m4_do, m4_dquote_elt, _m4_map) + (m4_join, m4_joinall, m4_list_cmp, _m4_minmax): Replace m4sugar + macros based on $@ recursion [fast on M4 1.6, but quadratic on M4 + 1.4.x] with versions based on m4_for/m4_foreach [slow on 1.6, but + linear on 1.4.x]. + * lib/m4sugar/m4sugar.m4 (m4_init): Dynamically load new file if + older M4 is assumed. + (m4_map_sep): Optimize. + (m4_max, m4_min): Refactor, by adding... + (_m4_max, _m4_min, _m4_minmax): ...more efficient helpers. + (m4_defn, m4_popdef, m4_undefine): Use foreach recursion. + * lib/m4sugar/Makefile.am (dist_m4sugarlib_DATA): Distribute new + file. + * tests/m4sugar.at (M4 loops): Add a stress test that takes + forever if m4_foreach and friends are quadratic. + * NEWS: Mention this. + +2008-07-21 Eric Blake + + Ignore undefined macros, necessary with m4 1.6. + * bin/autoupdate.in (_au___undefine): New macro,... + (_au__undefine): ...wrapped by ifdef to silence m4 warnings. + Reported by Ralf Wildenhues. + + Resync with gnulib. + * GNUmakefile: Grab from upstream, to fix issue where 'make + install' would allow installation of stale version string. + +2008-07-19 Eric Blake + + Support multiple arguments to m4_defn, m4_popdef, and m4_undefine. + * lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Loop + through all variables, per POSIX and newer m4. + (_m4_text_wrap): Exploit the looping capabilities. + * tests/m4sugar.at (m4@&t@_defn): Test this. + * NEWS: Document it. + * doc/autoconf.texi (Redefined M4 Macros) + : Likewise. + + Reduce overhead of m4_builtin([defn]). + * lib/m4sugar/m4sugar.m4 (_m4_defn, _m4_popdef, _m4_undefine): New + internal macros, which are slightly more efficient than + m4_builtin([defn]) and company. + (m4_defn, m4_popdef, m4_undefine, m4_warn, m4_ifset) + (_m4_dumpdefs_up, _m4_dumpdefs_down, _m4_wrap, m4_for) + (_m4_divert_n_stack, m4_divert_pop, m4_expansion_stack_push) + (m4_expansion_stack_dump, _m4_defun_pro, _m4_defun_epi) + (_m4_defun_epi_outer, _m4_require_call, m4_combine, m4_append) + (_m4_append_uniq, m4_append_uniq_w, _m4_text_wrap, m4_text_box) + (m4_version_prereq): Use them. + + Use warnings from m4 when available. + * lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Don't + define slower wrapper if m4 will warn on our behalf; key off of + __m4_version__, added alongside the new warnings in m4 1.6. + * tests/m4sugar.at (m4@&t@_defn): New test. + +2008-07-18 Eric Blake + + Add m4_joinall. + * lib/m4sugar/m4sugar.m4 (m4_joinall, _m4_joinall): New macros. + * tests/m4sugar.at (m4@&t@_join): Test them. + * doc/autoconf.texi (Text processing Macros) : Document + m4_joinall. + * NEWS: Likewise. + +2008-07-17 Stepan Kasal + and Eric Blake + + Improve documentation of config.h.in template rules. + * doc/autoconf.texi (Header Templates): Mention rules on comments + and whitespace, and that the user cannot rely on #undef to survive + through config.status. + +2008-07-16 Eric Blake + + Revert m4_prepend; it is less efficient, and unused by bison. + * lib/m4sugar/m4sugar.m4 (m4_prepend, m4_prepend_uniq) + (m4_prepend_uniq_w): Delete addition from 2008-07-11. + (_m4_grow_uniq_1): Rename back... + (_m4_append_uniq): ...to this. + * NEWS: Revert NEWS blurb. + * doc/autoconf.texi (Text processing Macros) : Delete. + * tests/m4sugar.at (m4@&t@_prepend): Delete. + +2008-07-15 Eric Blake + + Avoid failure if version.m4 is omitted but m4_PACKAGE_* unused. + * lib/m4sugar/m4sugar.m4 (m4_version_compare): Provide alternate + definition for non-Autoconf clients of m4sugar. + +2008-07-14 Eric Blake + + Tighten bound of potential speed of m4_append. + * doc/autoconf.texi (Text processing Macros) + : If m4 is fixed, m4_append can be linear rather than + O(n log n). + * lib/m4sugar/m4sugar.m4 (m4_append, m4_append_uniq): Fix comments. + Analysis by Bruno Haible. + +2008-07-11 Eric Blake + + Inherit improvements from bison's fork of m4sugar. + * lib/m4sugar/m4sugar.m4 (m4_PACKAGE_VERSION): Ignore failure to + find version.texi, since bison does not provide it. + (m4_prepend): Add new macro, from bison. + (m4_prepend_uniq, m4_prepend_uniq_w): Add new macros, for + completeness. + (_m4_append_uniq): Rename... + (_m4_grow_uniq_1): ...to this to share implementation, and + optimize initial assignment. + (m4_append_uniq_w): Adjust caller. + * NEWS: Document new macros. + * doc/autoconf.texi (Text processing Macros) : Mention + speed consideration. + : Document the new prepend variants. + * tests/m4sugar.at (m4@&t@_prepend): New test. + + Work around M4 1.6 warning on undefined macros. + * lib/m4sugar/m4sugar.m4 (changeword, symbols): Don't rename if + not already available as builtins. + +2008-07-06 Ralf Wildenhues + + * doc/autoconf.texi (@dvar): Remove trailing newline. + (@ovar): Likewise. Fix macro documentation. + +2008-07-02 Stepan Kasal + + Add quotes to the header of autoscan-generated source. + * bin/autoscan.in: Add quotes to AC_PREREQ and AC_INIT. + +2008-06-28 Andreas Schwab + + * doc/autoconf.texi (autoscan Invocation): Fix spacing. + (autoconf Invocation): Likewise. + (autoreconf Invocation): Likewise. + (autoheader Invocation): Likewise. + (autom4te Invocation): Likewise. + +2008-06-19 Eric Blake + + Add comment explaining recent patch. + * lib/autotest/general.m4 (AT_INIT) : Explain choice + of * vs. ? globbing. + +2008-06-19 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_LINK): Do not warn when not + linking a file to itself. + Report by Bruno Haible. + +2008-06-19 Eric Blake + + Resync with gnulib. + * GNUmakefile: Grab from upstream, to fix VPATH 'make dist' bug. + Reported by Stepan Kasal. + +2008-06-18 Ralf Wildenhues + + Reorganize autotest files, factorize for parallel execution. + * lib/autotest/general.m4 (AS_MESSAGE_LOG_FD): Move definition + earlier in the file. + (AT_INIT): Create line number cache in + $at_suite_dir/at-source-lines. + : New directory at-groups below $at_suite_dir. + Add comment explaining the new directory structure. + (at_func_group_prepare, at_func_group_postprocess): New shell + functions to factorize per-test group work. Keep the actual + test execution outside of a shell function in order to avoid + zsh 4.x exit status bugs. + + : Turn these into per-group files + below $at_helper_dir. Also store test results there in files + named pass, fail, xpass, xfail, skip. Let the parent collect + results from $at_helper_dir. Adjust summary statistics + computation and result output. + +2008-06-17 Ralf Wildenhues + + Fix '#undef variable /* comment */' transform in config headers. + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): For + undefined preprocessor macros that are followed by a comment + in the header template, do not create nested comments in the + output. + * tests/torture.at (@%:@define header templates): Extend test. + * NEWS: Update. + Report by Karsten Hopp . + +2008-06-09 Eric Blake + + Mark AC_TYPE_SIGNAL as obsolete. + * lib/autoconf/types.m4 (AC_TYPE_SIGNAL): Switch to AU_DEFUN. + * doc/autoconf.texi (Function Portability): Update documentation. + (Particular Types): Move AC_TYPE_SIGNAL... + (Obsolete Macros): ...here, and mention why. + * NEWS: Mention the change. + + Allow lib64 as a default X library location. + * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Add lib64. + * NEWS: Mention the change. + * THANKS: Update. + Reported by Brad Walker. + +2008-06-05 Eric Blake + + Fix regression in AT_KEYWORDS([Macro]), from 2007-10-18. + * lib/autotest/general.m4 (AT_KEYWORDS): Expand argument prior to + converting it to lower case. + * tests/autotest.at (Keywords and ranges): Test this. + * NEWS: Document the fix. + * THANKS: Update. + Reported via Karsten Hopp, by Jochen Schmitt in + https://bugzilla.redhat.com/show_bug.cgi?id=449973 + +2008-06-03 Eric Blake + + Fix 'make dist' regression from 2008-05-08. + * Makefile.am (INSTALL): Add rule, to accomodate 'make dist' after + GNUmakefile's _autoconf rule removes INSTALL. + +2008-05-27 Eric Blake + + Document Solaris /bin/sh redirection pitfall. + * doc/autoconf.texi (File Descriptors): Mention redirection bug. + +2008-05-14 Eric Blake + + Improve documentation of ! issues. + * doc/autoconf.texi (Limitations of Builtins) : Touch up. + Reported by Noah Misch. + + Document some FreeBSD shell bugs. + * doc/autoconf.texi (Limitations of Builtins) : Mention ! issue + in compound pipe commands. + : Mention difference of exporting an undefined variable. + (Shell Functions): Mention loss of $? in entry to shell functions. + Extracted from the git mailing list. + +2008-05-13 Stepan Kasal + + Work around MSYS and Cygwin bugs when dealing with trailing space. + * tests/atlocal.in (func_sanitize_dir_name): Let atlocal succeed, + even when platform bugs are tickled. + Reported by Keith Marshall and Eric Blake. + +2008-05-12 Ralf Wildenhues + + Let AC_MSG_FAILURE report pwd. + * lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE): + Output $ac_pwd along with fatal failure. + * tests/torture.at (Deep Package): Extend test. + Reported numerous times against GCC, and probably other packages. + +2008-05-12 Eric Blake + + Enforce --help and --version compliance. + * configure.ac (AM_INIT_AUTOMAKE): Add std-options option. + +2008-05-08 Keith Marshall (tiny change) + + Avoid case-insensitive `make install' vs. `INSTALL' conflict. + * Makefile.am ($(srcdir)/INSTALL): Replace all references... + ($(abs_srcdir)/INSTALL): ...with this. + +2008-05-06 Eric Blake + + Fix typo. + * doc/autoconf.texi (Shell Substitutions): Drop at_ prefix. + + Avoid overfull \hbox. + * doc/autoconf.texi (Versioning): Reword to fit line size. + + Document $(( )) pitfalls. + * doc/autoconf.texi (Shell Substitutions): Mention octal + vs. decimal. Mention autotest's at_func_arith. + + Improve behavior of './testsuite 01'. + * lib/autotest/general.m4 (AT_INIT) : + Alter usage to eval its arguments, in order to normalize away + leading zero. All callers updated. + * tests/autotest.at (Keywords and ranges): Test range + normalization with leading 0. + +2008-04-26 Eric Blake + + Mention Solaris /usr/ucb/tr pitfall. + * doc/autoconf.texi (Limitations of Usual Tools) : Add section. + Reported by Bruno Haible and Jim Meyering. + +2008-04-24 Eric Blake + + Mention m4sugar's internal quote strings. + * doc/autoconf.texi (Quadrigraphs): Mention alternate quote used + in m4sugar, and how to still output it literally. + * tests/m4sugar.at (m4@&t@_split): And test it. + Reported by Joel E. Denny. + +2008-04-23 Eric Blake + + Allow unbalanced () in m4_expand. + * lib/m4sugar/m4sugar.m4 (m4_expand, _m4_expand): Use more complex + quotes. + (m4_noquote, _m4_split): Use consistent complex quote. + * tests/autotest.at (Left paren, Right paren): Test this. + (Parentheses): Ensure new quadrigraphs still work. + (AT_CHECK_AT_TITLE_CHAR): All title char tests exercise m4_expand. + * NEWS: Mention the fix. + * doc/autoconf.texi (Quadrigraphs): Revert mention of macros that + require quadrigraphs for (). + (Evaluation Macros) : Relax the restriction against + unbalanced (). + (Pretty Help Strings) : Likewise. + (Writing Testsuites) : Likewise. + Reported by Joel E. Denny, fix suggested by Noah Misch. + +2008-04-22 Eric Blake + + Support unbalanced () in AT_SETUP by adding two new quadrigraphs. + * bin/autom4te.in (handle_output): Substitute @{:@ and @:}@. + (handle_traces): Likewise. + * lib/m4sugar/m4sugar.m4 (m4_qlen): Account for new quadrigraphs. + * tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Add new tests. + * doc/autoconf.texi (Quadrigraphs): Document them. + (Evaluation Macros) : Enhance documentation. + (Text processing Macros) : Document cases where + quadrigraphs can help for problemetic unbalanced parentheses. + (Pretty Help Strings) : Likewise. + (Writing Testsuites) : Likewise. + (Limitations of Builtins) : Consolidate text on unbalanced + parentheses, and add an example of creative comments. + * NEWS: Document the addition. + Reported by Joel E. Denny. + +2008-04-16 Eric Blake + + Document pdksh exec behavior. + * doc/autoconf.texi (Limitations of Builtins) : New + subsection. + Discovered by Jim Meyering. + +2008-04-14 Ralf Wildenhues + + * tests/autotest.at (AT_CHECK_AT): Allow to pass additional + arguments to the inner suite. + (errexit, input from stdin): New tests. + +2008-04-13 Ralf Wildenhues + + * NEWS: Post-release update. + +2008-04-10 Eric Blake + + AC_AUTOCONF_VERSION might contain arbitrary macro names. + * doc/autoconf.texi (Versioning): Mention problem with expansion. + * tests/tools.at (autoconf: AC_AUTOCONF_VERSION): Adjust test. + +2008-04-09 Slava Sysoltsev (tiny change) + + Flush buffered output before exit. + * bin/autom4te.in (handle_output): Explicitly close file. + * THANKS: Update. + See http://lists.gnu.org/archive/html/autoconf/2008-04/msg00026.html. + +2008-04-08 Eric Blake + + Generate web docs for 2.62. + * doc/autoconf.texi (Evaluation Macros): Fix typo. + (Notices): Use recommended means to escape RCS keyword. + * cfg.mk (gnulib_dir): New macro. + (web-manual): New target. + +2008-04-05 Eric Blake + + Release Version 2.62. + * NEWS: Mention the release. + +2008-04-04 Stepan Kasal + and Eric Blake + + Return back to GPLv2+, until the text of the exceptions is + finalized, reverting the change from 2007-07-03 and the first + part of the change from 2007-07-20. + * COPYING: Revert to GPLv2. + * COPYINGv3: New file, since some auxiliary build tools, used for + building autoconf and not installed, are GPLv3. + * Makefile.am (EXTRA_DIST): Distribute COPYINGv3. + * NEWS: Remove mention of GPLv3. + * README: Clarify situation regarding GPLv3. + +2008-04-05 Eric Blake + + Prepare for release. + * maint.mk (announcement): Avoid deleted option. + * cfg.mk (release_archive_dir): Use default. + * build-aux/gnupload: New file, from automake/gnulib. + * Makefile.am (EXTRA_DIST): Distribute it. + * .x-sc_two_space_separator_in_usage: New file, to exempt gnupload + from syntax check. + +2008-04-05 Jim Meyering + and Ralf Wildenhues + + Work around CR EOL markers on OS/2 (www.ecomstation.com Ecs v2 rc4) + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): When CR + is the EOL marker, skip a step that would remove and translate + carriage return bytes. + * THANKS: Update. + Reported by Elbert Pol. + +2008-04-05 Eric Blake + + Avoid some autoreconf -Wall warnings. + * configure.ac: Use proper quoting, to be a good example. + (PACKAGE_NAME): Remove setting covered by autoconf. + (AM_INIT_AUTOMAKE): Bump automake requirement, for html rules. + * doc/Makefile.am (TEXI2DVI): Remove settings covered by + automake. + (html, autoconf_1.html, standards_1.html): Likewise. + (TEXI2HTML, TEXI2HTML_FLAGS): Remove unused macros. + * Makefile.am (html): Likewise. + * doc/autoconf.texi (Quoting and Parameters): Add missing section + name. + * tests/Makefile.am (AUTOMAKE_OPTIONS): Intentionally ignore + warning about our override, until Automake is fixed. + * README-hacking: Document minimum requirements for bootstrap. + +2008-04-03 Eric Blake + + Fix version number generation in man pages. + * Makefile.am (EXTRA_DIST): Distribute .version. + (.version): New rule. + * man/Makefile.am (common_dep): Depend on .version, not + configure.ac. + (.x.1): Use package name for version string. + * GNUmakefile [!_have-Makefile]: Sync from upstream, again. + * build-aux/git-version-gen: Sync from upstream. + + More maintainer tweaks: pass 'make maintainer-distcheck'. + * GNUmakefile (_is-dist-target): Sync from upstream. + * build-aux/vc-list-files: Sync from upstream, yet again. + * tests/atlocal.in (unsupported_fs_chars): Always remove tdir. + * tests/Makefile.am (EXTRA_DIST): Don't distribute the built + package.m4. + * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Bump year. + + Fix VPATH 'make syntax-check'. + * maint.mk (VC_LIST, VC_LIST_EXCEPT, sc_changelog) + (sc_prohibit_jm_in_m4, makefile-check): Support VPATH. + (author_mark_check): Avoid error message. + * build-aux/vc-list-files: Sync from upstream again. + * build-aux/texinfo.tex: Likewise. + + Sync files from upstream, and pass 'make syntax-check'. + * config/announce-gen: Move... + * build-aux/announce-gen: ...here, and sync from gnulib. + * Makefile.am (EXTRA_DIST): Adjust accordingly. + * cfg.mk (announce_gen): Likewise. + (prev_version_file): Delete, relying on default in maint.mk. + (gpg_key_ID): New macro. + (url_dir_list): Rewrite to match coreutils. + * config/prev-version.txt: Move... + * .prev-version: ...here, and adjust to 2.61. + * build-aux/vc-list-files: Sync from coreutils. + * maint.mk: Resynchronize with coreutils, where possible. + (ME): Remove $(srcdir) from definition. + (CVS): Delete. + (GIT, VC, VC-tag): New macros. + (CVS_LIST, CVS_LIST_EXCEPT): Rename... + (VC_LIST, VC_LIST_EXCEPT): ...to this. + (cvs-tag-check): Delete. + (cvs-diff-check): Rename... + (vc-diff-check): ...to this. + (sc_file_system): Allow FHS acronym. + * doc/autoconf.texi (Particular Functions): Recommend + unconditional . + * build-aux/config.guess: Sync from upstream (manually). + * build-aux/config.sub: Likewise. + * build-aux/texinfo.tex: Likewise. + * doc/make-stds.texi: Likewise. + * doc/standards.texi: Likewise. + * .gitattributes: Ignore whitespace problems in upstream files. + +2008-04-03 Ralf Wildenhues + + * doc/autoconf.texi (Limitations of Usual Tools): Mention awk %u + bug on HP-UX/IA. + Report by Peter O'Gorman. + +2008-04-02 Eric Blake + + Recommend the just-released M4 1.4.11. + * NEWS: Update recommendation. + * README: Likewise. + * doc/autoconf.texi (Introduction): Likewise. + * m4/m4.m4 (AC_PROG_GNU_M4): Likewise. + +2008-04-01 Eric Blake + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Bump + copyright year. + +2008-03-28 Peter O'Gorman + + Find X11 on Mac OS X too. + * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT,_AC_PATH_X_XMKMF): + Check for libX11 with extensions dylib la and dll too. + * THANKS: Update. + Reported by Martin Costabel. + +2008-03-28 Eric Blake + + Update TODO based on completed tasks. + * TODO (AC_PROG_INSTALL takes multiple files): Done. + (AC_GNU_SOURCE deprecation): Done, see AC_USE_SYSTEM_EXTENSIONS. + (AC_COMPILE_IFELSE documentation): Done. + (Tracing builtins): Done, now that we require M4 1.4.5. + (AC_PROG_CC_POSIX suggestion, providing header files) + (AC_TYPE_SIGNAL): Not needed; gnulib's approach is better. + (cache consistency): Done with precious variables. + +2008-03-26 Eric Blake + + Document --trace=macro:format in --help output. + * bin/autom4te.in (help): Mention optional trace format. + * bin/autoconf.as (usage): Likewise. + + * doc/autoconf.texi (Limitations of Usual Tools) : Fix + typos in last patch. + Reported by Ralf Wildenhues. + +2008-03-26 Jim Meyering + + Fix texinfo syntax error. + * doc/autoconf.texi (Limitations of Usual Tools): s/@kbd {/@kbd{/ + +2008-03-26 Ralf Wildenhues + + Warn, not fail on whitespace-only precious variable differences. + * lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE): Output + precious variable differences less ambiguous with `ugly-quotes'. + If their settings differ only in whitespace, do not fail, but + reuse the old value. + * tests/torture.at (AT_CHECK_AC_ARG_VAR): Extend macro to allow + an optional status and expected-warning argument. Fix m4 + quotation for initial value. + (AC_ARG_VAR): Also test for whitespace-only differences, and + that the old value is retained in this case. + * doc/autoconf.texi (Setting Output Variables): Document this. + * NEWS: Update. + Report and initial patch by Paolo Bonzini. + +2008-03-26 Eric Blake + + Document busybox sed bug. + * doc/autoconf.texi (Limitations of Usual Tools) : Mention + restrictions when using back-references. + Reported by Vincent Lefevre: + . + + Document Automake interaction with AC_CONFIG_MACRO_DIR. + * doc/autoconf.texi (Input): Mention ACLOCAL_AMFLAGS for automake + users. + * THANKS: Update. + Reported by Chris Pickett. + +2008-03-25 Ralf Wildenhues + + * tests/autotest.at (Using atlocal): Quote instances of `pwd`. + + * tests/local.at (AT_CHECK_M4): Factorize warning output + normalization. + Suggested by Eric Blake. + +2008-03-24 Ralf Wildenhues + + Fix .exe-related test failure on MinGW. + * tests/local.at (AT_CHECK_M4): Normalize `/bin/m4.exe' correctly + for comparing warning output. + + Fix Fortran testsuite failures with gfortran 4.3. + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): When scanning + verbose compiler output, skip lines that set variables; gfortran + 4.3 sets LIBRARY_PATH, COMPILER_PATH, COLLECT_GCC_OPTIONS. + * THANKS: Update. + Report by Vincent Lefèvre. + +2008-03-21 Eric Blake + + * GNUmakefile: Resynchronize with gnulib. + + Document more uses of $cross_compiling. + * doc/autoconf.texi (Runtime): Document that a temporary override + is permissible. + * THANKS: Update. + Reported by Ineiev, example by Ralf Wildenhues. + + Don't swallow $1 in textual local variables. + * lib/m4sugar/m4sugar.m4 (m4_combine): Don't use overquoting and + expansion of text arguments, as that swallows $1. + (m4_text_wrap): Likewise, by splitting out... + (_m4_text_wrap): ...new helper macro. Also, allow arbitrary + expression for width. + * tests/m4sugar.at (m4@&t@_text_wrap): Test this. + (m4@&t@_combine): Likewise. + +2008-03-21 Ralf Wildenhues + + Avoid leftover files on Leopard. + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT): Remove a.out.dSYM + directory created on darwin. + (AC_NO_EXECUTABLES): Likewise; also remove objects which may be + left over from a broken link. + * tests/c.at (AC_NO_EXECUTABLES (working linker)) + (AC_NO_EXECUTABLES (broken linker)): New tests. + Report by Gary V. Vaughan. + + * lib/autom4te.in (Automake-preselections): Trace + _AM_COND_IF, _AM_COND_ELSE, _AM_COND_ENDIF. + +2008-03-20 Eric Blake + + Kill more CVS references. + * README-cvs: Delete. See README-hacking instead. + * README-hacking: Update wording, based on older file. + * BUGS: Remove CVS mention. + +2008-03-20 Ralf Wildenhues + + * tests/tools.at (autotools and whitespace in file names): Skip + if aclocal is not present. + +2008-03-20 Eric Blake + + Sync GNUmakefile with gnulib. + * GNUmakefile (Makefile.cfg): Rename... + (cfg.mk): ...to this, and make optional. + (GNUmakefile.cfg): Delete, redundant with cfg.mk. + (Makefile.maint): Rename... + (maint.mk): ...to this. + (all) [!_have-Makefile]: Rename... + (abort-due-to-no-makefile): ...to this, and invoke via + .DEFAULT_GOAL to pick up all targets. + * Makefile.cfg: Rename... + * cfg.mk: ...to this. + * Makefile.maint: Rename... + * maint.mk ...to this. + (ME): Reflect name change. + (makefile-check, m4-check, author_mark_check, msg): Use $(ME) + rather than hard-coded name. + * GNUmakefile.cfg: Delete; move rules into cfg.mk. + * Makefile.am (EXTRA_DIST): Reflect file name changes. + * .x-sc_prohibit_atoi_atof: Likewise. + * lib/freeze.mk: Likewise. + +2008-03-19 Stepan Kasal + + * doc/autoconf.texi (Introduction): Improve the paraphrase of + Henry Spencer's quotation. + +2008-03-19 Eric Blake + + AC_CONFIG_HEADERS replaced AC_CONFIG_HEADER. + * bin/autoscan.in (output): Avoid obsolete spelling. + * tests/local.at (AC_STATE_SAVE): Update usage. + * THANKS: Update. + Reported by John Calcote. + + Emphasize that ease of configure triumphs over ease of autoconf. + * doc/autoconf.texi (Introduction): Expand on primary + vs. secondary goal of autoconf. + * THANKS: Update. + Inspired by Paul Smith. + +2008-03-17 Ralf Wildenhues + + * lib/Autom4te/FileUtils.pm (handle_exec_errors): New argument + $hint, show if the executing program does not exist. + (xsystem_hint): New function, like xsystem but allows to pass + a hint. + * bin/autoreconf.in: Use xsystem_hint for spawning autopoint and + libtoolize. + Report by Bruce Korb. + +2008-03-14 Stepan Kasal + + * lib/Autom4te/ChannelDefs.pm, tests/fortran.at, + tests/mktests.sh, tests/wrapper.as: Fix typos. + +2008-03-12 Eric Blake + + Fix yesterday's regression in m4_wrap([$1]). + * lib/m4sugar/m4sugar.m4 (_m4_wrap): Don't directly invoke wrapped + text, since it may contain text that looks like parameters. + * tests/m4sh.at (AS@&t@_INIT cleanup): Enhance test. + +2008-03-11 Eric Blake + + Improve error messages for common testsuite bugs. + * lib/autotest/general.m4 (_AT_DEFINE_INIT, _AT_DEFINE_SETUP): New + macros for defining order-enforced macros. + (AT_INIT, AT_SETUP, AT_CLEANUP, AT_BANNER, AT_XFAIL_IF) + (AT_CAPTURE_FILE, AT_DATA, AT_CHECK, AT_CHECK_NOESCAPE): Add error + messages when order violations are detected. + * tests/autotest.at (AT_CHECK_AT_SYNTAX): New helper macro. + (AT_SETUP without AT_INIT, AT_BANNER without AT_INIT) + (AT_CLEANUP without AT_INIT, Missing AT_CLEANUP) + (AT_CHECK without AT_SETUP, AT_DATA without AT_SETUP) + (AT_XFAIL_IF without AT_DATA, AT_KEYWORDS without AT_SETUP, + (AT_CLEANUP without AT_SETUP, AT_BANNER inside AT_SETUP) + (AT_SETUP inside AT_SETUP, Multiple AT_INIT) + (Banner-only test suite): New tests. + Reported by Christopher Hulbert. + + Tweak m4_wrap to force FIFO or LIFO semantics. + * lib/m4sugar/m4sugar.m4 (m4_wrap): Override M4 implementation. + (m4_wrap_lifo, _m4_wrap): New macros. + * lib/m4sugar/m4sh.m4 (AS_INIT): Combine all cleanup into known + order, prior to m4sugar's. + (_AS_DETECT_BETTER_SHELL): Use cleanup parameter, rather than + m4_wrap. + * lib/autotest/general.m4 (AT_INIT): Combine all cleanup into + known order, prior to m4sh's. + * doc/autoconf.texi (Diagnostic Macros) : Document + argument. + (Redefined M4 Macros) : Rewrite documentation to match + new behavior. + * tests/m4sh.at (AS_INIT cleanup): New test. + * NEWS: Document the change. + +2008-03-10 Eric Blake + + Encode nested autotest data. + * tests/autotest.at (AT_CHECK_AT_PREP): Avoid raw AT_ in output. + (unusual file names): Likewise. + (m4_pattern_allow): Remove loophole, to make it easier to catch + poorly written tests. + + Factor some autotest tests. + * tests/autotest.at (AT_CHECK_AT_PREP): New macro, to factor out + common initialization. + (AT_CHECK_AT, Banners, Keywords and ranges, srcdir propagation) + (whitespace in absolute testdir, unusual file names): Use it. + +2008-03-06 Eric Blake + + Minor documentation fix. + * doc/autoconf.texi (Evaluation Macros): Fix typo. + +2008-03-04 Eric Blake + + Make AT_CHECK act like a simple command. + * lib/autotest/general.m4 (_AT_CHECK): Wrap commands in {;}. + * tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Test it. + +2008-03-04 Ralf Wildenhues + + On MinGW, substitution of CR and 0xFF fails. + * tests/torture.at (Substitute and define special characters): + MinGW awk cannot handle 0xFF, and on MinGW, the test does the + wrong thing for CR. + +2008-03-04 Eric Blake + + Pull in recent maintainer improvements from coreutils. + * GNUmakefile (_is-dist-target): 'make distclean' should not + trigger autoreconf. + (_dummy): Change directories before removing autom4te.cache. + (check dist distcheck install) [!_have-Makefile]: Provide nicer + diagnostics. + * configure.ac (AC_CONFIG_LINKS): Copy GNUmakefile into VPATH + builds, after initial bootstrap. + * Makefile.am (distclean-local): Work around current automake bug. + * Makefile.maint (ME): Allow VPATH usage. + + Use git-merge-changelog when available. + * .gitattributes: New file. + * README-hacking: Document use of git-merge-changelog. + + Work around cygwin bug. + * tests/atlocal.in (unsupported_fs_chars): Avoid cygwin bug where + "touch 't\'" creates regular file 't'. + + Ignore tests that require read-only directories under root. + * tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Skip + no-write portion if user has root-like privileges. + +2008-03-04 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_INIT): Fix detection of '-C -'. + +2008-03-03 Ralf Wildenhues + + autoreconf -m now honors $MAKE. + * bin/autoreconf.in ($run_make): Renamed from ... + ($make): ... this. Use now as command to run `make', + overridden by $MAKE. Document this in --help output. + * doc/autoconf.texi (autoreconf Invocation): Document + all environment variables honored by autoreconf. + * NEWS: Update. + Report by Paul Eggert. + +2008-03-03 Eric Blake + + Documentation improvements. + * doc/autoconf.texi (Looping constructs): s/recurses/repeats/. + (Evaluation Macros): Drop `1' suffix from metasyntax variable name + that preceeds @dots. Improve wording. + (Text processing Macros): Drop `1' suffix from metasyntax variable + name that preceeds @dots. + (Number processing Macros): Drop `1' suffix from metasyntax + variable name that preceeds @dots. Improve wording. + * lib/m4sugar/m4sugar.m4 (m4_cmp): Comment wording fix. + Suggested by Ralf Wildenhues. + +2008-03-02 Jim Meyering + + Don't infloop upon "make dist". + * GNUmakefile: Merge from coreutils. + * Makefile.am (dist-hook): Inject .tarball-version into tarball, + not .version. + * configure.ac (AC_INIT): Use .tarball-version, not .version. + * build-aux/git-version-gen: Update from gnulib. + +2008-03-02 Ralf Wildenhues + + * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): + Before using /dev/full, check that it is a writable character + special device. + Report by Benoit Sigoure and Eric Blake. + + Actually test that @configure_input@ is expanded correctly. + * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): + Actually check generated file contents for the name of the + generated file, using AC_PROG_FGREP and $FGREP. + +2008-03-01 Benoit Sigoure + + Be nice with file systems that don't handle unusual characters. + * tests/atlocal.in (func_sanitize_file_name) + (func_sanitize_dir_name): New shell functions. + * tests/tools.at (autom4te and whitespace in file names) + (autotools and whitespace in file names): Use them. + * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): + Cover more potentially problemtic file names. Use the new + functions. + + Properly handle funny file names for headers in config.status. + The test suite did not cover this bug because the code was not + quoting properly the arguments of `rm -f' (which "fails" silently) + as well as the arguments of `diff' (whose output was redirected to + /dev/null so we couldn't see its error message). + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Properly quote the + file names passed to `rm' and `diff'. + * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): + Add a regression test. + +2008-03-01 Benoit Sigoure + and Ralf Wildenhues + + Properly expand @configure_input@ in config.status. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE, _AC_OUTPUT_MAIN_LOOP): + Escape the backslashes and ampersands in $configure_input before + using it in the sed replacement string to expand @configure_input@. + Report by Eric Blake and Patrick Welche. + +2008-03-01 Ralf Wildenhues + + Ignore errors from ./run on w32. + * tests/autotest.at (whitespace in absolute testdir): + Ignore stderr for `./run' which fails to remove the + busy test directory on w32. + +2008-02-22 Eric Blake + + Improve documentation for writing autotest suites. + * doc/autoconf.texi (Writing Testsuites) : Mention that + checks must live inside a test group. + Reported by Christopher Hulbert. + +2008-02-21 Eric Blake + + Sync git-version-gen from upstream. + * build-aux/git-version-gen: Pull from gnulib. + * configure.ac (AC_INIT): Adjust to new calling convention. + +2008-02-12 Eric Blake + + Avoid trailing space in config.h with AC_DEFINE([var], []). + * lib/autoconf/general.m4 (_AC_DEFINE_Q): Explicitly mark empty + defines with a comment. + +2008-02-08 Eric Blake + + Fix texinfo typos in previous patch. + * doc/autoconf.texi (Site Defaults): s/[{}]/@&/g. + Reported by Ralf Wildenhues. + + Describe a config.site that can be used for FHS compliance. + * doc/autoconf.texi (Site Defaults): Fix typo. Add new example + for FHS. + * THANKS: Update. + Reported by Jules Colding and Ralf Wildenhues. + +2008-02-02 Eric Blake + + * doc/autoconf.texi (Limitations of Usual Tools) : Fix typo. + +2008-02-02 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_INIT): Fix --clean to work + again, broken since introduction of `-C dir'. + * tests/autotest.at (Choosing where testsuite is run): Test it. + +2008-01-30 Paul Eggert + + * doc/autoconf.texi: Update Back-Cover text to reflect new GNU wording. + +2008-01-29 Eric Blake + + Fix more autotest regressions. + * lib/autotest/general.m4 (AT_LINE): Fix regression from + 2007-10-04 when file name is `dnl'. + (AT_INIT) : Move command-line assignments... + : ...to this new diversion, to fix regression from + yesterday in libtool's testsuite. + (_AT_ARG_OPTION): Detect write failure. + * doc/autoconf.texi (Diversion support): Document PREPARE_TESTS to + make libtool's use kosher. Document m4_init. + (Programming in M4sh): Document AS_INIT. + (Writing Testsuites): Document limitation of AT_DATA file name. + * tests/autotest.at (unusual file names): New test. + (Banners, Keywords and ranges): Use correct shell. + + More corner cases in testsuite VAR=VALUE handling. + * lib/autotest/general.m4 (AT_INIT) : Also detect leading digits in assignments. + * tests/autotest.at (Using atlocal): Enhance test to catch last + bug. + + * doc/autoconf.texi (Limitations of Builtins) <.>: Mention bash + bug. + +2008-01-28 Eric Blake + + Fix regression in handling VAR=VALUE arguments to testsuite. + * lib/autotest/general.m4 (AT_INIT) : Detect + leading = as invalid. Defer use of command-line variable + assignments... + : ...here, after atconfig has been sourced. Fix + regression in sourcing files. + * tests/autotest.at (Using atlocal): New test to catch this. + (Debugging a successful test, Choosing where testsuite is run): + Use correct shell. + Reported by Ralf Wildenhues. + + Document grep peculiarity. + * doc/autoconf.texi (Limitations of Usual Tools) : Document + BSD behavior on binary input. + + Minor testsuite improvements. + * lib/autotest/general.m4 (AT_INIT) : Use fewer + forks when sanitizing PATH. Always output machine information, + not just when atconfig was located. + + Add 'testsuite -C dir'. + * lib/autotest/general.m4 (_AT_ARG_OPTION): Move missing argument + detection... + (AT_INIT) : ...here, since -k always takes + argument. + : Delay computation of variables based on $at_dir... + : ...to here, since -C can change $at_dir. + : Re-invoke via absolute name, since -C may be in effect. + : Parse new option. + : Document it. + * tests/autotest.at (Choosing where testsuite is run): New test + for this feature. + (Keywords and ranges): Add test for missing -k argument. + * NEWS: Document this. + * doc/autoconf.texi (testsuite Invocation): Likewise. + +2008-01-24 Ralf Wildenhues + + * build-aux/config.guess, build-aux/config.sub, + build-aux/texinfo.tex: Sync from gnulib. + * doc/fdl.texi, doc/make-stds.texi, doc/standards.texi: + Likewise. + +2008-01-23 Ralf Wildenhues + + * doc/autoconf.texi (Particular Programs): Do not mention the + Autoconf version in which the AC_PROG_INSTALL change was done. + Suggested by Paul Eggert. + +2008-01-22 Ralf Wildenhues + + Fix --help=recursive with multiple AC_CONFIG_SUBDIRS. + * lib/autoconf/general.m4 (_AC_INIT_HELP): If, for recursive help + mode, we change to the source directory, also set $ac_pwd so we + do not go back to the build tree for the next config subdir. + * tests/torture.at (Deep Package): Extend test to contain two + config subdirs on the top level. + + Fix parallel `maintainer-check'. + * Makefile.am (maintainer-check-tests): Depend on `all'. + Use `$(MAKE) $(AM_MAKEFLAGS)' instead of plain `make'. + * tests/Makefile.am (maintainer-check-c++, maintainer-check-posix): + Likewise. + (maintainer-check): Serialize the testsuite runs. + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE2): Accept `+' + in feature string for --enable/--with. Convert to underscore + for variable name. + + * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Require that + `install -c file1 file2 dir' works. + * doc/autoconf.texi (Particular Programs): Document this. + * NEWS: Update. + +2008-01-21 Eric Blake + + Improve documentation about default include directives. + * doc/autoconf.texi (Generic Headers, Generic Declarations) + (Generic Structures, Generic Types) + (Generic Compiler Characteristics): Add links to + AC_INCLUDES_DEFAULT. + Reported by Reuben Thomas. + +2008-01-15 Eric Blake + + * lib/m4sugar/m4sugar.m4 (m4_qlen): Use fewer macros. + +2008-01-08 Ralf Wildenhues + + * tests/Makefile.am (noinst_SCRIPTS): Renamed from + check_SCRIPTS. Building the wrappers for `all' allows help2man + to use them for the manpages. + Report by Benoit Sigoure. + + * bin/autoreconf.in: Discard stderr for $autoconf/$aclocal --help. + +2007-12-16 Ralf Wildenhues + + Fix some write failure cases in Autotest. + * lib/autotest/general.m4 (AT_INIT): Do not exit successfully + upon write failures for --help, --version, --list. + Guard against write failures for intermediate created scripts. + : Do not make the debugging + script executable if it is not complete. + +2007-12-12 Eric Blake + + Fix thinko in earlier patch - m4_join isn't defined yet. + * lib/m4sugar/m4sugar.m4 (m4_expansion_stack_push, _m4_defun_pro) + (_m4_defun_pro_outer, _m4_defun_epi, _m4_defun_epi_outer) + (m4_require): Use m4_do, not m4_join. + + Fix some whitespace tests on cygwin. + * tests/tools.at (autom4te and whitespace in file names): Restore + font-lock. Create $TMPDIR before it might be used. + + Fix spurious testsuite failure with M4 1.4.11. + * tests/local.at (AT_CHECK_M4): Cater to new m4 error message. + + Optimize AC_REQUIRE. + * lib/m4sugar/m4sugar.m4 (m4_expansion_stack_push, _m4_defun_pro) + (_m4_defun_pro_outer, _m4_defun_epi, _m4_defun_epi_outer) + (m4_require): Avoid extra macro calls. + +2007-12-08 Ralf Wildenhues + + * tests/torture.at (srcdir): Fix quoting. + + Do not pass top_srcdir to configure scripts in testsuite. + * tests/autotest.at (srcdir propagation): Copy install-sh to + source tree. + (my only test): Drop setting of `top_srcdir'. + * tests/base.at (Input/Output): Likewise. + * tests/local.at (AT_CONFIGURE_AC): Copy install-sh, + config.guess, and config.sub to test source tree. + Drop AC_CONFIG_AUX_DIR setting. + (AT_CHECK_CONFIGURE): Drop setting of `top_srcdir'. + * tests/torture.at (Substitute a 2000-byte string): Drop + AC_CONFIG_AUX_DIR setting, copy install-sh to test source tree. + (Substitute a newline, datarootdir workaround): Likewise. + (Define a newline): Adjust for linenumber changes in configure.ac. + * tests/foreign.at (Libtool): Adjust comment to reflect changes. + + * tests/semantics.at (AC_PATH_PROGS_FEATURE_CHECK): Skip test + if `pwd` contains whitespace. + + Quote $abs_top_srcdir in tests. + * tests/local.at (AT_CHECK_PERL_SYNTAX): Likewise. + * tests/tools.at (Syntax of the shell scripts): Likewise. + + * tests/m4sh.at (LINENO): Quote $0. + + Fix testsuite program wrapper for whitespace in `pwd`. + The problem here is that the usual mantra is that command + variables can contain arguments, thus we cannot just escape + $AUTOCONF, $AUTOM4TE etc. The compromise is to put the + $top_builddir/tests directory early in $PATH, so that the + wrappers are found by their plain name. + * tests/wrapper.as: Put $testdir early in $PATH. + (AUTOCONF, AUTOHEADER, AUTOM4TE): Set to plain command names. + + Proper config.status --file/--header and $srcdir escaping. + * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Quote special + characters in $ac_file_inputs. + (_AC_OUTPUT_FILE, _AC_OUTPUT_HEADER): eval $ac_file_inputs + accordingly. + * tests/torture.at (datarootdir workaround): Adjust. + (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Extend test. + + Fix Autotest for whitespace in `pwd`. + * lib/autotest/general.m4 (AT_INIT) + : + Quote $at_group_dir. + * tests/autotest.at (whitespace in absolute testdir): New test. + + * lib/autom4te.in: Quote @datadir@. + + Proper file name escaping in Autoconf programs and Perl modules. + This includes escaping of characters special to the shell + as well as special to Perl, e.g., leading `<' or `>'. + For example, when $file starts with `>', `open ">$file"' + wrongly tries to append to a different file. + * bin/autoconf.as: Fix quoting for autom4te options. + * lib/Autom4te/General.pm (shell_quote): New function, taken + from coreutils, written by Jim Meyering. + (mktmpdir): Use it. + * bin/autom4te.in (files_to_options, handle_m4): Use shell_quote + and open_quote. + * bin/autoreconf.in (parse_args): Likewise. + * bin/autoscan.in (main): Likewise. + * bin/autoupdate.in (main): Likewise. + * bin/autoheader.in: Likewise, fixing old insufficient escaping. + * bin/ifnames.in: Likewise, XFile usage fixes. + * tests/tools.at (autom4te and whitespace in file names): Extend + test. Test twice, with special characters allowed on w32, and the + rest. Test leading and trailing whitespace, for `open_quote'. + (autotools and whitespace in file names): New, analogous test. + Reported by Paul Eggert and Benoit Sigoure, additional suggestions + by Russ Allbery and Eric Blake. + + Sync from Automake. + * lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm, + lib/Autom4te/Struct.pm, lib/Autom4te/XFile.pm: Likewise. + * lib/Autom4te/FileUtils.pm (open_quote): New function. + (update_file, contents): Use it. + + * Makefile.am (autom4te-update): Rewrite for git. + +2007-12-04 Ralf Wildenhues + + * doc/autoconf.texi (autom4te Invocation, Autom4te Cache): Fix typos. + + Fix copyright years. + * Makefile.am, doc/install.texi, lib/autoconf/fortran.m4, + lib/autoconf/lang.m4, lib/freeze.mk: Likewise. + +2007-12-04 Eric Blake + + Manually resync with gnulib, since 'make cvs-update' no longer works. + * build-aux/config.guess: New upstream version. + * build-aux/config.sub: Likewise. + + When using older automake, don't downgrade build-aux/texinfo.tex. + * configure.ac (AM_INIT_AUTOMAKE): Add no-texinfo.tex option. + * doc/Makefile.am (TEXINFO_TEX): Add. + +2007-11-27 Paul Eggert + + Fix AC_C_BIGENDIAN bug caused by new awk method of substitution. + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Don't comment out the + #undef as this runs afoul of our new way of creating config.h. + Problem reported by Jim Meyering in + . + +2007-11-26 Ralf Wildenhues + + Fix autom4te for unusual characters in input file names. + * bin/autom4te.in (files_to_options): Quote active characters + for the shell. + * tests/tools.at (autom4te and white space in file names): + New test. + + * doc/autoconf.texi (Limitations of Usual Tools) : + Document that Tru64 awk always splits $0. + +2007-11-24 Stepan Kasal + + * lib/autotest/general.m4 (AT_INIT): Do not extract the + `#AT_STOP_...' line at the end of each test. + +2007-11-23 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_INIT): For awk line number + extraction script, ensure `$at_group' has a defined value + even for the empty set, and properly quote its usage inside + the awk script. + +2007-11-22 Ralf Wildenhues + + * doc/autoconf.texi (Shell Functions): New chapter. Document + IRIX sh $0 issue in functions, move content from ... + (Portable Shell): ... here. + (Shell Script Compiler): Note that shell functions are not + totally unportable any more. + +2007-11-22 Stepan Kasal + and Ralf Wildenhues + + * lib/autotest/general.m4 (AT_INIT): Exit awk script after + extracting the line numbers of the last needed test. + +2007-11-20 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_INIT) : + Fix quoting. + +2007-11-19 Ralf Wildenhues + + Fix IRIX testsuite debugging failures: $0 in functions. + * lib/autotest/general.m4 (AT_INIT) : + Do not use $0 inside a function, as IRIX sh will set that to the + function name rather than the script invocation name. + +2007-11-19 Paolo Bonzini + and Ralf Wildenhues + + * lib/autotest/general.m4 (at_func_test): Use cached line numbers + to extract test scripts. + (AT_INIT): Extract and cache test script line numbers. + +2007-11-19 Ralf Wildenhues + + * lib/autotest/general.m4: Revert 2007-11-15 patch and + subsequent fixups; the awk -> here-document conversion trashes + performance too much with AIX sh. + +2007-11-18 Ralf Wildenhues + + * tests/local.at: Do not test m4, perl with AT_TESTED. + + Diagnose and guard against write errors dealing with config.status. + The general idea is this: all write failures from `configure' + writing `config.status' are indicated by $ac_write_error, which + is only checked at the end. This is safe because config.status + code is not executed before the file is complete. Other write + failures, be they inside config.status, or in sub shell/awk + scripts spawned from configure or config.status, typically need + earlier checking, as their results are used right afterwards. + * lib/autoconf/status.m4 (AC_OUTPUT): Initialize `ac_write_fail' + before writing config.status, check afterwards. + (_AC_OUTPUT_FILES_PREPARE, _AC_OUTPUT_FILE) + (_AC_OUTPUT_HEADERS_PREPARE,_AC_OUTPUT_CONFIG_STATUS): + Set `ac_write_error' for write failures to config.status. Barf + upon write failures to temporary files. + Adjust note about closing and reopening the here-document. + (_AC_OUTPUT_HEADER, _AC_OUTPUT_LINK, _AC_OUTPUT_COMMAND) + (_AC_OUTPUT_MAIN_LOOP): Likewise, adjust note about closing and + reopening the here-document. + * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): + Ensure `ac_write_error' does not escape into config.status. + Also, add a couple of code paths not yet exercised in the test + suite: a config file with input from stdin, and a config header + output to stdout. + Suggestion for catching write errors by Bruno Haible. + +2007-11-17 Ralf Wildenhues + + Avoid error with Tru64 awk and testsuite lines with many words. + * lib/autotest/general.m4 (AT_INIT): In the awk script that + reads the testsuite, set the field separator to an unusual value, + in order to not run over the limit of 199 fields. Tru64 4.0D awk + even splits the input if $i, i>0, was never accessed in the script. + + Revert 2007-10-17 change. + * TODO: Multiline args in config files and headers mean something + different and are not fixed, see + + Report by Stepan Kasal. + + * doc/autoconf.texi (Generic Programs): Fix typo. + +2007-11-16 Stepan Kasal + + AC_*_TOOL does not canonicalize the prefix + * doc/autoconf.texi (Generic Programs): Do not say that + the *_TOOL macros canonicalize, they simply use the `host_alias'. + +2007-11-16 Ralf Wildenhues + + Diagnose write errors in config.status instantiations. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE) + (_AC_OUTPUT_HEADER, _AC_OUTPUT_MAIN_LOOP): Bail out + on write errors. + * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): + Extend test to also check for some write error failures, using... + : ...this new macro. + Report by Bruno Haible. + + Indentation fixups. + * lib/autotest/general.m4 (AT_INIT) : Fix + indentation. + (_AT_CHECK): Use less indentation, to save space. + +2007-11-15 Ralf Wildenhues + + Add witness macro for @top_build_prefix@ substitution. + * lib/autoconf/status.m4 (_AC_HAVE_TOP_BUILD_PREFIX): New macro. + (_AC_OUTPUT_FILE): Mention it here. + +2007-11-15 Paolo Bonzini + and Ralf Wildenhues + + * lib/autotest/general.m4 (at_func_test): Remove. + (AT_INIT): Pre-extract test groups into separate files. + (AT_CLEANUP): Source pre-extracted file instead of calling at_func_test. + Remove at-test-source files together with the $at_group_dir. + * tests/autotest.at (Long test source lines): New test. + +2007-11-15 Ralf Wildenhues + + Shell functions and variables may share a namespace. + * doc/autoconf.texi (Portable Shell): Mention Solaris sh + limitation. + +2007-11-14 Paul Eggert + + * lib/autoconf/types.m4 (_AC_TYPE_LONG_LONG_SNIPPET): Make comment match + gnulib. + +2007-11-14 Ralf Wildenhues + + * lib/autoconf/status.m4: Fix a couple of comment typos. + + * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Use $as_me, not $me. + +2007-11-13 Jim Meyering + + Clean up the rule to create "expr". + * tests/Makefile.am (expr): Don't redirect directly to target. + Redirect just once, not for each echo statement. + Use $@, not literal "expr". + +2007-11-13 Paul Eggert + + Don't worry about preprocessor when testing long long. + See: http://lists.gnu.org/archive/html/bug-gnulib/2007-11/msg00075.html + * doc/autoconf.texi (Preprocessor Arithmetic): New section. + (AC_TYPE_LONG_LONG_INT, AC_TYPE_UNSIGNED_LONG_LONG_INT): + These no longer check for preprocessor flaws. + * lib/autoconf/types.m4 (_AC_TYPE_LONG_LONG_SNIPPET): + Do not check for preprocessor flaws. + +2007-11-13 Jim Meyering + + Adapt dependencies, now that a version change doesn't modify configure.ac + * GNUmakefile: Remove "make clean" kludge. + * lib/m4sugar/Makefile.am (version.m4): Depend on Makefile, not + configure.ac. + Don't redirect directly to target. + Use $@, not literal "version.m4". + +2007-11-12 Ralf Wildenhues + + * doc/autoconf.texi (Making testsuite Scripts): Document + ":;{" shorthand as in previous patch. + +2007-11-12 Paul Eggert + + * doc/autoconf.texi (Limitations of Builtins): Document problem + with { ... } a bit more clearly. Suggest ":;{" as a shorthand + for the workaround. + * lib/m4sugar/Makefile.am (version.m4): Detect 'echo' failure. + Use ":;{" shorthand. + * tests/Makefile.am ($(srcdir)/package.m4): Likewise. + +2007-11-12 Jim Meyering + + Add more non-srcdir build support. + * GNUmakefile (dummy): Split a long line. + Add -v option to autoreconf invocation. + + Remove the autoreconf-provided INSTALL, so that we regenerate it. + * GNUmakefile (dummy): Remove INSTALL. + + Remove racy commands to build scripts in bin/ and tests/. + * man/Makefile.am (.x.1): Now that scripts in bin/ and tests/ + are guaranteed to be built, remove the rules that tried to build + them. Before, with a parallel build, these rules could lead to + two processes writing tests/wrapper.in concurrently. + + Build in man/ only *after* building in bin/ and tests/. + * Makefile.am (SUBDIRS): The man-page-creation process runs $(MAKE) + in both bin/ and tests/. + + Accommodate non-srcdir build-from-checkout. + * build-aux/git-version-gen: Require an additional parameter: $srcdir. + Use git's --git-dir=$srcdir/.git option. + Add quotes, in case tarball_version_file contains shell meta-characters. + * GNUmakefile (_curr-ver): Pass $(srcdir) to git-version-gen. + * configure.ac: Pass "." to git-version-gen. + + Avoid spurious test failures due to version skew. + * GNUmakefile (dummy): Run $(MAKE) clean after autoreconf -i. + +2007-11-12 Ralf Wildenhues + + Avoid warnings about conftest.dSYM directories on Mac OS X Leopard. + * lib/autoconf/general.m4 (_AC_LINK_IFELSE, _AC_RUN_IFELSE): + Remove conftest.dSYM directory. + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT) + (_AC_LANG_PROGRAM_C_, _AC_FC_MAIN, __AC_FC_NAME_MANGLING): + Remove `conftest.*' recursively. + * lib/autoconf/lang.m4 (AC_LINK_IFELSE): Likewise. + * lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): + Likewise. + (_AC_COMPILER_OBJEXT_REJECT): Reject *.dSYM. + * THANKS: Update. + Report and analysis by Jeff Squyres and Peter O'Gorman. + +2007-11-12 Benoit Sigoure + + Fix typos in variable names. + * tests/semantics.at (test for AC_CHECK_LIB): s/at_m/ac_m/. + +2007-11-11 Benoit Sigoure + + Document that $((expression)) is not portable. + * doc/autoconf.texi (Shell Substitutions): Here. + +2007-11-10 Ralf Wildenhues + + Ignore configure --help* errors due to LINENO-impaired shells. + * tests/torture.at (Configuring subdirectories, Deep Package): + In the --help* tests in read-only trees, make `.' temporarily + writable again for the `stderr' file, and ignore errors due to + the attempt to write configure.lineno. + Report by Patrick Welche. + +2007-11-10 Jim Meyering + + Generate package.m4 in build-dir, not srcdir. + * tests/Makefile.am (package.m4): Adjust target. + Don't redirect directly to $@. + (CLEANFILES): Add package.m4. + ($(TESTSUITE)): Depend on just-built package.m4, not the one + in $(srcdir). + When running $(AUTOTEST), search "." before searching $(srcdir). + + Avoid a race condition that would make parallel "distclean" fail. + * tests/Makefile.am (distclean-generic): Replace the default, + automake-provided rule with an identical one, but with an additional + dependency on distclean-local. Simply adding the dependency would + cause automake not to emit the rule at all. + * BUGS: Building with -jN works, now. + + Distribute git-version-gen. + * Makefile.am (EXTRA_DIST): Add build-aux/git-version-gen, + since GNUmakefile is distributed, and requires it for dist* rules. + + Remove two more generated files from version control. + * INSTALL: Remove generated file. + * lib/autoscan/autoscan.list: Remove generated file. + +2007-11-09 Paul Eggert + + * GNUmakefile (PATH): Remove stray apostrophes; they become + part of PATH, which isn't wanted here. + +2007-11-09 Ralf Wildenhues + + New config files output variable `top_build_prefix'. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Substitute + `top_build_prefix'. + * doc/autoconf.texi (Preset Output Variables): Document it. + * NEWS: Update. + Report by Bob Friesenhahn. + + Avoid expr for arithmetic evaluation if the shell accepts $((...)). + * lib/autotest/general.m4 (AT_INIT) : New + function, to parametrize arithmetic with expr vs. the shell. + Use it where possible. + Suggestion by Benoit Sigoure. + +2007-11-03 Benoit Sigoure + + Adjust the documentation of autotest WRT atlocal. + * doc/autoconf.texi (Making testsuite Scripts): It is not necessary, + when using Automake, to write a rule to produce atlocal, since it's + an AC_CONFIG_FILES. Mention that atlocal.in needs to be + distributed, not atconfig.in. + +2007-11-04 Eric Blake + + Update list information. + * README: Mention new autoconf-commit list. + * doc/autoconf.texi (Introduction): Mention autoconf-commit list. + +2007-11-04 Ralf Wildenhues + + * lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF): Fix comment typo. + + * lib/m4sugar/Makefile.am (version.m4): Another bash bug workaround. + + * build-aux/.gitignore: Ignore mkinstalldirs. + + * doc/autoconf.texi (autoreconf Invocation): Fix an underfull line. + +2007-11-03 Jim Meyering + + s/-/./ in snapshot version string: 2.61a-256-8b556 -> 2.61a.256-8b556 + * build-aux/git-version-gen: This syncs from coreutils. + + Adjust the build procedure so "make check" works reliably. + * README-hacking: Include an extra step between "make" and + "make check" to ensure that the latter passes. + + Use just-built tools, when possible. + * GNUmakefile (PATH): Set and export here, ... + (dummy): ... rather than here. + +2007-11-03 Ralf Wildenhues + and Andreas Schwab + + * tests/Makefile.am ($(srcdir)/package.m4): Work around bash + exit status bug. + +2007-11-03 Ralf Wildenhues + + * configure.ac (AC_PREREQ): Require version 2.60, for + AC_PROG_SED, AC_PROG_GREP. + +2007-11-02 Benoit Sigoure + and Jim Meyering + and Andreas Schwab + and Eric Blake + + Document a bug in GNU Bash with compound commands and redirections. + * doc/autoconf.texi (Limitations of Builtins): Mention that GNU + Bash doesn't properly set $? when `{ ... } >/bad' fails, and give + workaround. + +2007-11-03 Eric Blake + + Support m4 1.4.5 in testsuite. + * tests/torture.at (Define a newline): Exclude line numbers in + error message. + Reported by Ralf Wildenhues. + +2007-11-03 Jim Meyering + + Remove automake-provided files from version control. + * build-aux/elisp-comp: Remove file. + * build-aux/install-sh: Remove file. + * build-aux/missing: Remove file. + * build-aux/mdate-sh: Remove file. + * build-aux/.gitignore: New file. + Suggestion from Ralf Wildenhues. + +2007-11-03 Eric Blake + + Adjust version comparison to account for git snapshot numbers. + * lib/m4sugar/m4sugar.m4 (_m4_version_unletter): Also treat - as a + component separator. + * doc/autoconf.texi (Number processing Macros) + : Document this change. + * tests/m4sugar.at (m4@&t@_version_compare): Test it. + +2007-10-30 Bruno Haible + + * lib/autoconf/types.m4 (_AC_TYPE_LONG_LONG_SNIPPET): New macro, + extracted from AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT. + (AC_TYPE_LONG_LONG_INT, AC_TYPE_UNSIGNED_LONG_LONG_INT): Use it. + Fixes problem with Sun C 5.[0-8] in 32-bit mode, reported in + + Suggested by Paul Eggert. + +2007-10-28 Jim Meyering + + * README-hacking: Autoconf, Automake, and Perl are required to build. + List Gzip and Tar separately. Suggested by Ralf Wildenhues. + +2007-10-28 Jim Meyering + + README-hacking: Recommend running autoreconf -vi. + * GNUmakefile (dummy): Use autoreconf -i, with appropriate PATH, + so that we use just-built tools when they're available. + Suggestions from Ralf Wildenhues. + +2007-10-28 Jim Meyering + + Make inter-release --version output more useful. + + Now, each unofficial build has a version "number" like 2.61a-19-58dd, + which indicates that it is built using the 19th change set + (in _some_ repository) following the "v2.61a" tag, and that 58dd + is a prefix of the commit SHA1. + * build-aux/git-version-gen: New file. + * configure.ac: Run it to set the version. + (AM_INIT_AUTOMAKE): Don't check NEWS here. + * Makefile.am (dist-hook): Arrange so that .version appears only + in distribution tarballs, never in a checked-out repository. + * .gitignore: Add .version here, too. Just in case. + * tests/Makefile.am ($(srcdir)/package.m4): Depend on Makefile, + not configure.ac, now that the version number changes automatically. + + Ensure that $(VERSION) is up to date for dist-related targets. + * GNUmakefile: Arrange to rerun autoconf, if the version reported by + git-version-gen doesn't match $(VERSION), but only for dist targets. + +2007-10-27 Ralf Wildenhues + + Fix `Deep Package' failure with a configure script early in PATH + * tests/torture.at (Deep Package): Add `.' early in PATH. + Report by Jim Meyering. + +2007-10-27 Jim Meyering + + Remove all generated files from version control. + * aclocal.m4: Remove. + * configure: Remove. + * Makefile.in: Remove, along with all other Makefile.in in subdirs. + * .gitignore: Add aclocal.m4, configure and Makefile.in. Sort. + * README-hacking: New file: how to build from just-checked-out sources. + +2007-10-23 Eric Blake + + Improve corner case of m4_expand. + * lib/m4sugar/m4sugar.m4 (m4_expand, _m4_expand): Rewrite more + efficiently. + * tests/m4sh.at (AS@&t@_HELP_STRING): Test overquoted comma. + * doc/autoconf.texi (Evaluation Macros) : Update + documentation. + +2007-10-23 Paul Eggert + + * doc/make-stds.texi: Update from gnulib. + +2007-10-22 Paul Eggert + and Eric Blake + + * lib/autoconf/c.m4 (AC_C_RESTRICT): Work around Sun C++ compatibility + problem reported by Bruno Haible in + . + +2007-10-22 Eric Blake + + * doc/autoconf.texi (Particular Types): Mention bug in HP-UX 11.00 + preprocessor. + +2007-10-22 Paul Eggert + + Don't check for bug in HP-UX 11.00 cpp. + * lib/autoconf/types.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): + Use -1ull rather than -1u, since that causes problems with gnulib; see + . + +2007-10-22 Ralf Wildenhues + + * tests/autotest.at (Backquote command substitution) + (Multiline backquote command substitution) + (Parenthetical command substitution) + (Multiline parenthetical command substitution): Fix typos in + test names. + +2007-10-21 Eric Blake + + * configure: Regenerate. + +2007-10-21 Ralf Wildenhues + + Fix config status generation with Tru64 ksh. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix + escaping of backslash in here-documents. + + Fix `Deep Package' test failure on FreeBSD. + * tests/torture.at (Deep Package): Do not add `.' to $PATH + unnecessarily. Do not try running `/bin/sh configure' with a + configure script to be found in $PATH, if the shell does not do + this resolution. Fixes test failure on FreeBSD. + + Fix config header generation with AIX awk. + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS_PREPARE): In awk + script, use helper array D_is_set, as `" 0"' does not evaluate + to true for AIX awk. + +2007-10-21 Eric Blake + + * tests/autotest.at (Banners): Reinstate test, with typo + corrected. + +2007-10-20 Ralf Wildenhues + + * lib/autotest/general.m4 (Defaults): Validate input ranges ... + : ... using this new function. + * tests/autotest.at (Keywords and ranges): Test invalid ranges. + Test --list with ranges and keywords. + (Banners): Remove one now-failing test. + +2007-10-20 Eric Blake + + Fix testsuite --list subset. + * lib/autotest/general.m4 (AT_INIT) : Swap newlines + back to spaces, before listing subset of tests. + Reported by Ralf Wildenhues. + +2007-10-19 Eric Blake + + s/parenthesis/parentheses/ where appropriate. + * doc/autoconf.texi: Fix typos. + * lib/m4sugar/m4sugar.m4: Likewise. + Reported by Ralf Wildenhues. + + Document m4_expand limitation. + * lib/m4sugar/m4sugar.m4 (m4_expand): Mention problem with + unbalanced parse. + * doc/autoconf.texi (Pretty Help Strings, Evaluation Macros) + (Writing Testsuites): Mention limitations inherited from + m4_expand. + + Improve AT_BANNER handling. + * lib/autotest/general.m4 (BANNERS): New named diversion. + (TESTS_END): Diversion no longer used. + (AT_INIT) : Factor all banners into a + shell function, which prints only as needed, using an associative + array of banner text from a special diversion. + : No longer need awk to find banners. + : Banners are no longer processed by main driver loop, so + we no longer need case statement. + (AT_BANNER): Rewrite to populate new diversion. + (AT_SETUP): Each test invokes its own banner. No output is needed + to the TESTS diversion. + * doc/autoconf.texi (Writing Testsuites): Document slight + semantics change. + * tests/autotest.at (AT_BANNERS): Enhance test. + * NEWS: Document AT_BANNER. + + Document and test AT_BANNER. + * doc/autoconf.texi (Writing Testsuites): Document AT_BANNER. + * tests/autotest.at (AT_CHECK_EGREP): Share between tests. + (AT_CHECK_BANNERS): New test. + + Doc touchups. + * doc/autoconf.texi (Text processing Macros) + : Clarify and fix typos. + +2007-10-18 Eric Blake + + Ignore `make dist' changelogs in testsuite.log. + * lib/autotest/general.m4 (AT_INIT) : Prune + directories matching AT_PACKAGE_TARNAME-*. + + Fix AT_TESTED, AT_KEYWORDS. + * lib/m4sugar/m4sugar.m4 (m4_append_uniq): Warn if separator + occurs in string, as duplicates may be added. + (_m4_append_uniq): New helper macro. + (m4_append_uniq_w): New macro. + * lib/autotest/general.m4 (AT_TESTED, AT_KEYWORDS): Fix + duplication bug by using new macro. + (AT_INIT) : Restore newline separators. Invoke tested + programs with stdin redirected, so programs that don't + understand --version won't try to behave interactively. + * tests/autotest.at (Tested programs): Catch this bug. + * tests/m4sugar.at (m4@&t@_append): Test new macro. + * tests/local.at (AT_TESTED): Add m4, perl. + * doc/autoconf.texi (Text processing Macros): Document + m4_append_uniq_w, and update text on m4_append. + * NEWS: Document the addition. + +2007-10-17 Eric Blake + + Function cleanup. + * lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT): Convert + from m4 macro... + (AT_INIT) : ...to shell + function. + (AT_INIT): Defer function declarations until after --help, + --version. Format functions consistently, trying to fit in 80 + columns. + (TEST_FUNCTIONS): Based on recent changes, rename... + (TEST_GROUPS): ...to this. + + Reject FreeBSD m4. + * m4/m4.m4 (AC_PROG_GNU_M4): Also check for frozen file support. + * configure: Regenerate. + Reported by Bob Friesenhahn. + + Test recent additions. + * tests/m4sugar.at (m4@&t@_map, m4@&t@_combine) + (m4@&t_max and m4@&t_min): New tests. + * doc/autoconf.texi (Evaluation Macros) : Enhance + description. + +2007-10-17 Ralf Wildenhues + + * TODO: multiline args in config files and headers work now. + + Autotest: do not use shell functions for individual tests. + * lib/autotest/general.m4 (AT_INIT) : Merely + extract the source test source, do not invoke it. + (AT_SETUP, AT_CLEANUP): Source test code outside shell function. + * tests/autotest.at (Fallacy): Actually let the inner suite fail, + expect exit status of 1. + * tests/autotest.at (Skip): New test, for bogus zsh exit status. + + * lib/autotest/general.m4 (at_func_test): Fix test extraction + script. + +2007-10-17 Eric Blake + + Fix m4_combine for empty suffix list. + * lib/m4sugar/m4sugar.m4 (m4_combine): Check for suffix list. + * doc/autoconf.texi (Text processing Macros): Document this. + + Add m4_combine, based on Libtool's lt_combine. + * lib/m4sugar/m4sugar.m4 (m4_combine): New macro. + * doc/autoconf.texi (Text processing Macros): Document it. + * NEWS: Likewise. + +2007-10-16 Ralf Wildenhues + + Fix `configure --help=recursive' in unconfigured/read-only trees. + * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Avoid errors when `.' + is not writable, use 'cp -p' in this case, in the hope that it + will not actually be needed. Still try removing files, in case + of other write errors. + * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): For ac_confdir, + use $as_myself, not $0. + (_AC_INIT_HELP): For --help=recursive, if the subdir does not + exist, try again in the the source tree. This change assumes + that the subpackage configure script is capable of running + --help=recursive in the source tree. + * tests/torture.at (Configuring subdirectories, Deep Package): + Adjust tests to expose both issues, also try invocation as + `sh configure ...' and plain `configure ...' with PATH adjusted. + * NEWS, THANKS: Update. + Report by Hans Ulrich Niedermann. + +2007-10-16 Paul Eggert + + Check for 64-bit int errors in HP-UX 10.20 preprocessor. + Problem reported by H.Merijn Brand in + . + * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): + (AC_TYPE_UNSIGNED_LONG_LONG_INT): + Check that preprocessor handles 64-bit ints, too. + +2007-10-16 Eric Blake + + m4_map is a looping construct. + * lib/m4sugar/m4sugar.m4 (m4_map, _m4_map, m4_map_sep): Move. + + Fix m4_map, and add some more utility macros. + * lib/m4sugar/m4sugar.m4 (m4_apply, m4_count, m4_dquote_elt) + (m4_echo, m4_make_list): New documented macros. + (_m4_quote, _m4_shift2): New helper macros. + (m4_map): Change semantics to allow calling macro without + arguments. + (m4_map_sep): Likewise. Also change semantics to quote separator, + to match m4_join and m4_append. + (m4_version_unletter): Fix use of m4_map. + * doc/autoconf.texi (Evaluation Macros): Document m4_apply, + m4_count, m4_dquote_elt, m4_echo, m4_make_list. + (Text processing Macros): Mention m4_dquote as a faster + alternative to joining with commas. + (Looping constructs): Document m4_map, m4_map_sep. + * NEWS: Mention new macros. + + A few more m4sugar improvements, to benefit libtool. + * lib/m4sugar/m4sugar.m4 (m4_bpatsubsts, _m4_shiftn): Reduce size + of expansion by avoiding extra uses of $@. + (m4_shiftn): Avoid extra dnl, and forbid shifting by 0. + (_m4_cdr): New helper macro. + (_m4_map, m4_map_sep): Use it to reduce size of expansion. + (_m4_shift3): New helper macro. + (_m4_foreach): Swap argument order, and use new macro to reduce + size of expansion. + * doc/autoconf.texi (Looping constructs) : Mention that + count must be positive. + + * doc/autoconf.texi (Evaluation Macros) : Fix typo. + Reported by Ralf Wildenhues. + +2007-10-15 Ralf Wildenhues + + * doc/autoconf.texi (Portable Shell): Improve description of zsh + 4.x function subshell bug with exit and trap. + +2007-10-15 Eric Blake + + Enhance AS_HELP_STRING. + * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Don't expand arguments, + and reduce number of expansions. + * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Rework to use m4_expand, + and to take indent and wrap column numbers. + * tests/m4sh.at (AS@&t@_HELP_STRING): Update the test. + * doc/autoconf.texi (Pretty Help Strings): Document details about + arguments. + (Text processing Macros): Minor tweaks. + * NEWS: Document this change. + + Fix 2007-10-03 regression with AT_SETUP([a, b]). + * lib/m4sugar/m4sugar.m4 (m4_expand): New macro. + (m4_text_box): Use it. + * lib/autotest/general.m4 (AT_SETUP): Use it. + * lib/m4sugar/m4sh.m4 (_AS_RUN): Use it. + * tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Test this. + * NEWS: Revert caveat about semantics change on comma. + * doc/autoconf.texi (Evaluation Macros): Document m4_expand. + +2007-10-13 Eric Blake + + Change m4_join to match libtool's ltsugar semantics. + * lib/m4sugar/m4sugar.m4 (m4_join): Just define this, not defun. + Ignore empty arguments, using... + (_m4_join): ...this new helper. + * tests/m4sugar.at (m4@&t@_join): New test. + * doc/autoconf.texi (Text processing Macros): Document new + semantics of m4_join. + + Make AC_PREREQ faster and more robust. + * lib/m4sugar/m4sugar.m4 (m4_ignore, m4_unquote): New macros. + (m4_version_prereq): Inline constant expansions. + (m4_list_cmp): Reduce number of expansions, by avoiding m4_case. + Rewrite in terms of [] list, not () list. + (_m4_list_cmp, _m4_version_unletter): New helper macros. + (m4_version_unletter): Write wrapper around new implementation to + preserve old semantics. + (m4_version_compare): Pass correct type of list, and avoid + overhead of flattening expressions too early. + (m4_do): Move to be near other quoting macros. + (m4_max, m4_min): Always result in decimal output. + * doc/autoconf.texi (Looping constructs): Add m4_car, m4_cdr. + Move m4_do... + (Evaluation Macros): ...here. Add m4_ignore, m4_unquote. + (Text processing Macros): Move m4_version_compare... + (Number processing Macros): ...to this new node; document m4_cmp, + m4_list_cmp, m4_sign, m4_max, m4_min. + * tests/m4sugar.at (m4@&t@_version_compare): Enhance test, to pick + up on bugs fixed by this patch. + * NEWS: Document new macros. + +2007-10-12 Eric Blake + + * doc/autoconf.texi (Text processing Macros): Fix bad merge. + (Reporting Messages): Fix underfull hbox. + + Some more m4sugar documentation. + * lib/m4sugar/m4sugar.m4: Clean up macro order. + * doc/autoconf.texi (Programming in M4): Lighten the warning on + using m4sugar; it is stabilizing and useful. + (Redefined M4 Macros): Touch up wording on M4 builtins; sort. Add + m4_divert, m4_undivert, __file__, __line__, __oline__. + (Diagnostics): New node, documenting m4_assert, m4_errprintn, + m4_fatal, m4_location, m4_warn. + (Diversion support): New node, documenting m4_divert_push, + m4_divert_pop, m4_divert_text, m4_divert_once. + (Text processing Macros): Sort. Add m4_flatten, m4_join, + m4_newline, m4_strip, m4_text_box, m4_text_wrap. + (Reporting Messages): Mark AC_DIAGNOSE, AC_WARNING, and AC_FATAL + as obsolescent. + (Printing Messages): Change cross-reference. + + Document interaction of recent m4_append change with Libtool HEAD. + * lib/m4sugar/m4sugar.m4 (m4_append): Document semantics change. + (m4_append_uniq): Add new parameters, based on lt_append_uniq. + * tests/m4sugar.at (m4@&t@_append): New test. + * NEWS: Document semantics change. + * doc/autoconf.texi (Text processing Macros): Likewise. + + s/AC_VERSION/AC_AUTOCONF_VERSION/. + * doc/autoconf.texi (Versioning): Change the name. + * NEWS: Likewise. + * lib/autoconf/general.m4 (AC_AUTOCONF_VERSION): Likewise. + * tests/tools.at (autoconf: AC_AUTOCONF_VERSION): Likewise. + Suggested by Ralf Wildenhues. + + Namespace cleanup. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE) + (_AC_OUTPUT_HEADERS_PREPARE): Convert here-doc delimiters into + autoconf namespace. + * doc/autoconf.texi (Programming in M4sugar, Forbidden Patterns) + (Programming in M4sh, Macro Names): Beef up description of + namespaces reserved for autoconf. + * configure: Regenerate. + +2007-10-12 Eric Blake + and Paolo Bonzini + + Speed up execution of subset of testsuite. + * lib/autotest/general.m4 (TEST_FUNCTIONS): New diversion. + (AT_INIT) : New shell function. + (AT_INIT) : New variable, set to absolute $as_myself. + (AT_INIT) New variable, names file that holds + current test function definition. + (AT_SETUP): Start the shell function at_func_test_#, into the + TEST_FUNCTIONS diversion. + (AT_CLEANUP): End the shell function. Simplify the TESTS + diversion to invoke the function. + +2007-10-11 Ralf Wildenhues + + * .gitignore: Ignore tags and TAGS files. + +2007-10-11 Eric Blake + + Config header generation followup. + * lib/autoconf/general.m4 (_AC_DEFINE_Q): Check for raw newlines, + which won't work with the preprocessor nor with the awk + implementation. + * tests/torture.at (Define a newline): Test raw newline detection, + removing the XFAIL. + * doc/autoconf.texi (Defining Symbols): Document recent change to + allow backslash-newline. + * THANKS: Update. + +2007-10-11 Ralf Wildenhues + + * lib/autotest/general.m4: Put function braces in separate line. + +2007-10-10 Eric Blake + + Avoid some overhead from m4_defn and m4_popdef. + * lib/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine): Only + pass on first argument, since we are documented that way. + (m4_for, m4_append_uniq, m4_text_wrap): Optimize out defined-ness + check where it is safe to do so. + (m4_append): Likewise, and quote the separator. + (m4_text_box): Likewise, and avoid regex, also be robust to + expansion and quadrigraphs. + + Another AC_DEFINE speedup. + * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Move parameter + elision... + (_AC_DEFINE_Q): ...here, and only do it once. + * lib/autoconf/functions.m4 (AC_CHECK_FUNCS): Avoid overquoting. + * lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Fix m4_defn overquoting + introduced 2007-10-05. + + Whitespace cleanup. + * lib/autoconf/general.m4: Use consistent indentation. + * configure: Regenerate. + + * NEWS: Announce recent round of speed optimizations. + +2007-10-10 Ralf Wildenhues + + * NEWS: Announce shell function usage in Autotest. + +2007-10-10 Eric Blake + and Paul Eggert + + Reduce number of forks at startup. + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Speed up NLS + sanitization. + * configure: Regenerate. + +2007-10-10 Ralf Wildenhues + and Paul Eggert + + Use awk for config header generation. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix comments. + (_AC_OUTPUT_HEADERS_PREPARE): New macro. Rewrite of the config + header machinery for use with awk and placement outside the main + config.status instantiation loop. Retain multi-line defines + through backslash-newline combinations, do not split the script + any more. + (_AC_OUTPUT_HEADER): Simplify accordingly, use $AWK. + (_AC_OUTPUT_MAIN_LOOP): Call _AC_OUTPUT_HEADERS_PREPARE if + needed. + (AC_OUTPUT_MAKE_DEFS): Remove backslash-newline combinations + from define values. + * NEWS: Update. + * tests/torture.at (#define header templates): Extend test by + several more cases: white space before and after `#', macros + with parameters in config.hin and as defines, multi-line macro + values. + (Torturing config.status): Use a define value twice the length + in order to exercise the awk literal string limit. + (Substitute and define special characters): Also try special + delimiter, to exercise the special-case code. + Suggestion by Eric Lemings. + +2007-10-10 Ralf Wildenhues + + * tests/local.at (AT_COPYRIGHT): Bump copyright years. + +2007-10-09 Eric Blake + + Improve header of bin/autoconf. + * lib/m4sugar/m4sh.m4 (AS_INIT): Add a 'generated from' notice. + * lib/autoconf/general.m4 (_AC_INIT_NOTICE): Override new notice + from M4sh. + * bin/autoconf.as: Put copyright up front in generated file. + + * bin/autoconf.as (exit_missing_arg): Font-lock tweak. + +2007-10-09 Ralf Wildenhues + + * doc/install.texi (Basic Installation): Document `uninstall'. + * INSTALL: Regenerate. + Suggestion by Roberto Bagnara. + +2007-10-08 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): V7 awk had 'index'. + + Adjust doc. to match latest gnulib. + * build-aux/texinfo.tex: Sync from gnulib. + * doc/standards.texi: Likewise. + * doc/autoconf.texi (Copying This Manual): Rename to "GNU Free + Documentation License" and remove the subsection. This simplifies + the manual a bit and is more like what other GNU projects do + nowadays. + +2007-10-08 Eric Blake + + Use recent changes. + * configure: Regenerate. + + Fix regression in m4_text_wrap from 2007-10-05. + * lib/m4sugar/m4sugar.m4 (m4_max, m4_min): New macros. + (m4_sign): Sort. + (m4_text_wrap): Fix off-by-one error in rewrite from m4_for to + m4_format. + * lib/autotest/general.m4 (AT_SETUP): Avoid negative width. + * tests/autotest.at (Long test title, Longer test title): Test + this fix, beyond what AS_HELP_STRING already tests. + + Avoid m4 warnings on bad m4_format usage. + * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Use %*s, in case width + evaulates to 0. + * lib/autotest/general.m4 (AT_SETUP): Likewise; also ensure that + enough arguments are provided. + +2007-10-06 Paolo Bonzini + + * doc/autoconf.texi (Shell portability): Document shell function + portability. + +2007-10-06 Paolo Bonzini + + * lib/autotest/general.m4 (AT_INIT): Add at_func_diff_devnull, + at_func_check_skip, at_func_check_status, at_func_filter_trace, + at_func_log_failure shell functions. Use test -s to avoid + useless diff invocations. + (at_func_check_newline): Renamed from at_check_newline. + (AT_SETUP): Define AT_captured_files to empty. + (AT_DIFF_STDERR(*), AT_DIFF_STDOUT(*)): New, extracted from _AT_CHECK. + (_AT_CHECK): Replace m4_case with m4_ifdef/m4_indir. Use all + the shell functions. + +2007-10-05 Paul Eggert + + Don't assume "." is writeable, for commands like "autoconf --version". + * lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): Use a + different heuristic instead, one that doesn't rely on creating + files. + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Handle "///" + correctly. + +2007-10-05 Jim Meyering + + Avoid makeinfo warnings. + * doc/autoconf.texi (Redefined M4 Macros): Add a `,' after @xref. + (Looping constructs): Add ` ' after @defmac'd name, m4_do. + +2007-10-05 Eric Blake + + Resolve Python issue 1676135 regarding configure directory args. + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Strip trailing + slashes from directory arguments. + * tests/base.at (configure directories): New test. + * doc/autoconf.texi (Installation Directory Variables): Document + the change. + * NEWS: Likewise. + * THANKS: Update. + Reported by Björn Lindqvist. + + Provide better short-circuiting operation. + * lib/m4sugar/m4sugar.m4 (m4_cond, m4_newline): New macros. + (m4_text_wrap): Use it. Also avoid useless m4_for. + * lib/m4sugar/m4sh.m4 (_AS_QUOTE_IFELSE, AS_LITERAL_IF): Use + new macro. + (_AS_IDENTIFIER_IF): Likewise, and fix bug when $1 is [,]. + * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Use new macros + to avoid regexps. + * doc/autoconf.texi (Redefined M4 Macros): Expand m4_if + documentation. Sort m4_mkstemp, m4_undefine. Move m4_ifndef... + (Conditional constructs): ...here, to new section. Also document + m4_cond, m4_ifval, m4_n, m4_ifvaln, m4_ifset, m4_case, m4_bmatch, + m4_bpatsubsts, and m4_default. + (Looping constructs): Document m4_shiftn, m4_shift2, m4_shift3, + m4_do. + +2007-10-04 Eric Blake + + Fix recent testsuite failures. + * lib/autotest/general.m4 (AT_INIT, AT_SETUP): Double-quote text + that must not be re-expanded after AS_ESCAPE. + * lib/m4sugar/m4sh.m4 (_AS_IDENTIFIER_IF): Don't expand $1 when + checking if it is an identifier. + + Whitespace cleanup. + * lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT): Avoid + leading whitespace, as it caused space-tab in testsuite. + (AT_INIT): Avoid trailing newlines in testsuite. + + One more round of m4_foreach_w speedups. + * lib/m4sugar/m4sugar.m4 (m4_flatten): Only use regex if newline + is present. + (_m4_split): Avoid useless expansions inside definition. Move + argument defaulting... + (m4_split): ...here. Change alternate quote to something less + likely to appear in $1. Also, special case space as regexp... + (m4_foreach_w): ...to avoid regexp on single-term list. + (m4_default, m4_defn, m4_popdef, m4_undefine, _m4_foreach): Avoid + useless expansions inside definition. + * tests/m4sugar.at (m4@&t@_split): Add tests. + +2007-10-04 Paolo Bonzini + + * general.m4 (AT_INIT): Add at_check_newline function. + (_AT_DECIDE_TRACEABLE): Include at_traceon test, use shell function. + (_AT_CHECK): Don't use at_trace_this. + +2007-10-04 Paolo Bonzini + + Fix previous commit. + * lib/autotest/general.m4 (AT_LINE): Fix regex. + +2007-10-04 Eric Blake + + Speed up building testsuites. + * lib/autotest/general.m4 (AT_LINE): Only use regex when file + changed since last time. Use simpler regex. + +2007-10-03 Eric Blake + + Optimize checking for identifiers. + * lib/m4sugar/m4sh.m4 (AS_IDENTIFIER_IF, _AS_IDENTIFIER_IF): New + macros, more efficient than regex on m4_re_word. + * lib/autoconf/general.m4 (AC_SUBST, AC_DEFINE_TRACE_LITERAL): + Rewrite in terms of new macro. As a side-effect, AC_DEFINE can + now use @&t@. + * configure: Regenerate. + + Remove some XFAILs, and make AT_SETUP output line up. + * lib/autotest/general.m4 (AT_SETUP): Only expand description + once; thereafter, use its expansion, properly quoted. + * tests/autotest.at (AT_CHECK_AT_TITLE): Also check macro + expansion with arguments, and check for aligned output. + (AT_CHECK_AT_TITLE_CHAR): Remove XFAILs for tests that now pass. + Add a test for macros with parameters. + * NEWS: Document the semantics change. + * tests/base.at: Fix test titles containing commas. + * tests/compile.at: Likewise. + * tests/tools.at: Likewise. + * tests/torture.at: Likewise. + + Another round of regex avoidance. + * lib/m4sugar/m4sugar.m4 (m4_cr_alnum, m4_cr_all) + (_m4_define_cr_not, m4_cr_not_letters, m4_cr_not_LETTERS) + (m4_cr_not_Letters, m4_cr_not_digits, m4_cr_not_alnum) + (m4_cr_not_symbols1, m4_cr_not_symbols2): New macros, implementing + character ranges useful in m4_translit. + (m4_toupper, m4_tolower): Optimize the constant portion of + definition. + * lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Also reject @S|@ because it + creates $, and reject [] thanks to AS_TR_SH rewrite. + (AS_TR_SH, AS_TR_CPP): Use just translit, not bpatsubst. + (AS_ESCAPE): Factor... + (_AS_ESCAPE): ...into new macro, with second argument required. + Avoid regex in common case. + (_AS_QUOTE): Use new macro. + + Whitespace cleanup. + * lib/autoconf/types.m4: Avoid space-tab. + * lib/m4sugar/m4sh.m4: Use tab consistently. + +2007-10-03 Paul Eggert + + * lib/m4sugar/m4sugar.m4 (m4_shift2, m4_shift3): New macros. + (m4_shiftn): Remove no-longer-needed optimization. Perhaps we + should remove m4_shiftn entirely? + (m4_case, b4_bmatch, m4_map_sep, m4_bpatsubsts, m4_join): + Prefer m4_shift2 and m4_shift3 to m4_shiftn. + * lib/autoconf/lang.m4 (_AC_LANG_DISPATCH): Likewise. + * lib/m4sugar/m4sh.m4 (AS_CASE, AS_IF): Likewise. + * tests/autotest.at (AT_CHECK_AT_TEST): Likewise. + +2007-10-03 Eric Blake + + Comment touchups. + * lib/m4sugar/m4sugar.m4: Grammar fixes in comments. + +2007-10-02 Eric Blake + + Optimize appending text. + * lib/m4sugar/m4sugar.m4 (m4_append_uniq): Use index, not regular + expressions. + + Optimize recursion. + * lib/m4sugar/m4sugar.m4 (m4_shiftn): This macro is called in a + lot of hot spots; optimize it for 2 and 3 shifts. + + Optimize AC_PREREQ and other m4sugar numerics. + * lib/m4sugar/m4sugar.m4 (m4_sign): Write with m4_eval. + (m4_cmp): Compare arbitrary expressions, without overflow. + (m4_version_unletter): Also recognize capital letters. + (m4_version_compare): Avoid regex when splitting version number + string. + +2007-10-01 Eric Blake + + Once again, reject IRIX m4. + * m4/m4.m4 (AC_PROG_GNU_M4): Use indir builtin to root out non-GNU + implementations that ignore --trace. + * configure: Regenerate. + Reported by Ralf Wildenhues. + + Fix regression in AC_DEFINE([macro(with_arg)]). + * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Don't chop off close + quotes with a careless m4_substr. + +2007-09-30 Eric Blake + + Allow nameless iteration. + * lib/m4sugar/m4sugar.m4 (m4_for, _m4_for): Access variable + indirectly. + * tests/m4sugar.at (myvar): Test this. + +2007-09-29 Eric Blake + + Speed optimization: avoid m4 regex when other algorithms work. + * lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Rewrite without regex. + (_AS_QUOTE_IFELSE): Likewise. + * lib/m4sugar/m4sugar.m4 (m4_strip): Reduce from 3 to 2 regex. + (m4_bpatsubsts): Split... + (_m4_bpatsubsts): ...so that recursion can avoid patsubst on empty + regex. + (_m4_divert()): Define, to avoid m4 warning on `m4_divert'. + (m4_qlen): Optimize on short strings, to avoid regex. + (m4_sign): Avoid regex, and fix bug with `01' and `-0'. + * lib/autoconf/general.m4 (AC_CACHE_VAL): Rewrite without regex. + (AC_DEFINE_TRACE): Likewise. + +2007-09-28 Eric Blake + + Oops - my earlier 'optimization' caused a regression. + * tests/local.at (AT_CHECK_M4): Fix typo. + +2007-09-27 Eric Blake + and Ralf Wildenhues + + Catch even more common AC_CACHE_VAL mistakes. + * lib/autoconf/general.m4 (AC_CACHE_VAL): Warn if cache variable + lacks '_cv_', or if AC_SUBST appears in body. + * tests/base.at (AC_CACHE_CHECK): Test this change. + +2007-09-27 Stepan Kasal + and Eric Blake + + Autotest no longer caters to Ultrix redirection limitation. + * doc/autoconf.texi (Writing testsuite.at): Remove the + limitation that the first parameter of AT_CHECK cannot + contain redirection. + (File Descriptors): Mention that Ultrix limitation is no longer a + show-stopper in modern code. + * tests/local.at (AT_CHECK_M4): Fix for cases when the fourth + parameter is `stderr' or `experr'. Optimize if it was `ignore'. + * lib/autotest/general.m4 (AT_CHECK): Update comment. + +2007-09-27 Eric Blake + + Squelch changeword in m4sugar. + * lib/m4sugar/m4sugar.m4 (changeword): Disable this experimental + feature of m4 1.4.x. + + Configure whitespace touchups. + * lib/autoconf/general.m4 (_AC_INIT_HELP): Fix alignment of + installation directories, and avoid TAB, in configure --help + output. + * configure.ac: Avoid extra trailing newline. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Avoid space-tab. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Avoid TAB in + config.status --help output. + * configure: Regenerate. + + Fix underquotation in AS_HELP_STRING. + * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Don't underquote lhs + argument. + * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Don't underquote + first-prefix argument. + * tests/m4sh.at (AS@&t@_HELP_STRING): Test this fix. + * NEWS: Document AS_HELP_STRING fix. + + Autotest formatting touchups. + * lib/autotest/general.m4 (HELP_TUNING): Avoid TAB in terminal + output. + (PATH): Simplify computation of new PATH. + +2007-09-26 Eric Blake + + Fix testsuite breakage in last patch. + * tests/autotest.at (AT_CHECK_AT_TITLE): Properly quote the + font-lock fix. + * tests/torture.at (@%:@define header templates): Rename, so that + output lines up correctly. + + More font-lock happiness. + * tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Clean up font + confusion. + +2007-09-25 Eric Blake + + Typo fixes. + * lib/autoconf/general.m4 (AC_SUBST): Fix typo in comment. + * lib/m4sugar/m4sh.m4 (AS_VAR_PUSHDEF): Likewise. + + Improve documentation of M4 parameter expansion. + * doc/autoconf.texi (Quoting and Parameters): New section. + (Quotation and Nested Macros): Improve wording. + + Improve C99 detection. + * lib/autoconf/c.m4 (_AC_PROG_CC_C99): Add support for HP cc, and + avoid deprecation warning with icc. + * THANKS: Update. + Reported by Ted Bullock. + +2007-09-24 Jim Meyering + + Whenever possible, use the vertical bar as sed delimiter. + * lib/autoconf/functions.m4 (GETLOADAVG_LIBS) [AC_FUNC_GETLOADAVG]: + Use "|", not "!". + * lib/autoconf/status.m4 (_AC_SRCDIRS) [ac_top_builddir_sub]: + [ac_dir_suffix]: Use "|", not "," as sed delimiter. + * tests/mktests.sh (as_me): Likewise. + * lib/freeze.mk (check-forbidden-patterns): Likewise. + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Likewise. + * configure: Regenerate. + * doc/autoconf.texi (Shell Substitutions): Use "|", not "," in examples. + * lib/autotest/general.m4 (AT_INIT): Use "|", not "&" as sed delimiter + in the : -> $PATH_SEPARATOR transformation of $AUTOTEST_PATH. + This is fine, as long as $PATH_SEPARATOR doesn't contain "|". + +2007-09-22 Jim Meyering + + Add a comment. + * lib/autoconf/headers.m4 (HAVE_STDBOOL_H): Document the + 2004-05-31 change also with a comment in the code. + +2007-09-20 Eric Blake + + More contribution housekeeping. + * THANKS: Sort. + * AUTHORS: Sort, reflect recent assignment from Helge Deller. + + Ignore additional files, when copying cross-repository. + * .gitignore: Ignore CVS directories, emacs edits. + * .cvsignore: Ignore .git directory, emacs edits. + +2007-09-15 Eric Blake + + Provide AC_VERSION, not m4_AUTOCONF_VERSION. + * doc/autoconf.texi (Text processing Macros): Remove mention of + m4_AUTOCONF_VERSION, and leave m4_PACKAGE_VERSION undocumented + once again. + (Notices): Move AC_PREREQ... + (Versioning): ...to this new section, alongside the new AC_VERSION + alias for the undocumented m4_PACKAGE_VERSION. + * lib/m4sugar/m4sugar.m4 (m4_AUTOCONF_VERSION): Revert change. + * lib/autoconf/general.m4 (AC_VERSION): New macro. + * NEWS: Update to match this rename. + * tests/m4sugar.at (m4@&t@_version_compare): Remove tests of + m4_PACKAGE_VERSION. + * tests/tools.at (autoconf: AC_VERSION): New test. + Suggested by Paolo Bonzini and Benoit Sigoure. + +2007-09-14 Eric Blake + + Prepare for conversion to git. + * doc/.cvsignore: Avoid multiple listings on one line. + * bin/.cvsignore: Likewise. + * .gitignore, bin/.gitignore, config/.gitignore, doc/.gitignore, + lib/.gitignore, lib/Autom4te/.gitignore, lib/autoconf/.gitignore, + lib/autoscan/.gitignore, lib/autotest/.gitignore, + lib/emacs/.gitignore, lib/m4sugar/.gitignore, man/.gitignore, + tests/.gitignore: New files, identical to .cvsignore counterpart. + +2007-09-13 Eric Blake + + Editing eye-candy. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Restore + font-lock balance. + * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Likewise. + * lib/autoconf/general.m4 (_AC_DO_ECHO): Likewise. + * configure: Regenerate. + + Clean up 'make dist' of previous patch. + * tests/Makefile.am (EXTRA_DIST): Distribute mktests.stamp. + (CLEANFILES): Don't clean the stamp, since we distribute the + generated files pre-built. + (MAINTAINERCLEANFILES): Clean it here instead. + * tests/Makefile.in: Regenerate. + + Avoid parallel 'make check' issue. + * tests/Makefile.am (mktests.stamp): New witness. + (TESTSUITE_GENERATED_AT): Use it. + (CLEANFILES): Clean the witness. + * tests/.cvsignore (mktests.stamp): Ignore the witness. + + Document another awk pitfall. + * doc/autoconf.texi (Limitations of Usual Tools) : Document + limitation of field variables in END. + Reported by Gary V. Vaughan. + + * AUTHORS: Add missing entries. + +2007-09-12 Eric Blake + + Publish m4_ifndef, m4_version_compare, m4_AUTOCONF_VERSION. + * doc/autoconf.texi (Text processing Macros): Document + m4_version_compare, m4_AUTOCONF_VERSION, m4_PACKAGE_VERSION. + (Redefined M4 Macros): Document m4_ifndef. + * lib/m4sugar/m4sugar.m4 (m4_AUTOCONF_VERSION): New macro; we + can't obsolete m4_PACKAGE_VERSION at this time since Autoconf 1.10 + used it while it was undocumented. + * NEWS: Document this change. + * lib/m4sugar/Makefile.am (version.m4): Update copyright dates. + * lib/m4sugar/Makefile.in: Regenerate. + * tests/m4sugar.at (m4@&t@_version_compare): New test. + Reported by Bruno Haible. + + * doc/autoconf.texi (Generic Compiler Characteristics): Add + missing index entries. + +2007-09-11 Eric Blake + + Centralize all system extensions checks. + * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Inline code + from AC_AIX, AC_GNU_SOURCE, AC_MINIX. Add Interix support. + (AC_AIX, AC_GNU_SOURCE, AC_MINIX): Obsolete, and point to + AC_USE_SYSTEM_EXTENSIONS. + (AC_ISC_POSIX): Obsolete, and point to AC_SEARCH_LIBS. + (AC_XENIX_DIR, AC_IRIX_SUN): Promote proper quoting in AU_DEFUN. + * doc/autoconf.texi (Posix Variants): Reword this section, + emphasizing that AC_USE_SYSTEM_EXTENSIONS is the preferred method, + rather than a series of system-specific checks. + (Obsolete Macros): Add AC_AIX, AC_GNU_SOURCE, AC_ISC_POSIX, + AC_MINIX. + * NEWS: Document this change. + * THANKS: Update. + Reported by Martin Koeppe. + +2007-09-08 Eric Blake + + Clean up obsolete macros references. + * doc/autoconf.texi: Add anchors to support better + cross-referencing. + (Particular Structures): Move obsolete macros descriptions... + (External Software): Likewise. + (Package Options): Likewise. + (Obsolete Macros): ...to here. Add cross-references to + documentation on replacements. + * NEWS: Mention that these macros have been obsolete for a while + now: AC_STRUCT_ST_BLKSIZE AC_STRUCT_ST_RDEV AC_WITH AC_ENABLE. + + Improve M4 path searching during configure. + * lib/autoconf/programs.m4 (AC_PATH_PROGS_FEATURE_CHECK): New + macro. + (_AC_PATH_PROG_FEATURE_CHECK): Rename... + (_AC_PATH_PROGS_FEATURE_CHECK): ...to this, add defaulted action + parameter, and kill side effects. + (_AC_PROG_GREP, AC_PROG_SED): Adjust callers. + (_AC_FEATURE_CHECK_LENGTH): Kill extra whitespace. + * m4/m4.m4 (AC_PROG_GNU_M4): Don't stop searching until working m4 + is found. + (AC_PATH_PROGS_FEATURE_CHECK): Add backwards compatibility hack to + allow bootstrapping with autoconf 2.61. + * configure.ac (M4): AC_PROG_GNU_M4 now exits on failure. + * configure: Regenerate. + * doc/autoconf.texi (Generic Programs): Document new macro. + * tests/mktests.sh (au_exclude_script): Exclude auto-testing new + macro. + * tests/semantics.at (AC_PATH_PROGS_FEATURE_CHECK): New test. + * NEWS: Document the change. + * THANKS: Update. + Reported by Hans Aberg. + + * doc/autoconf.texi (Generic Programs): Fix typo. + +2007-09-06 Eric Blake + + * doc/autoconf.texi (Generic Programs): Use $PATH_SEPARATOR, not + :, and make it clear that optional @var{path} defaults to $PATH. + (Erlang Compiler and Interpreter): Likewise. + + Texinfo cleanup. + * doc/autoconf.texi: Avoid lines > 80 columns when possible. + Reword some paragraphs to avoid overfull, underfull hbox + warnings. Add index entries to avoid overfull vbox warnings. + +2007-09-05 Eric Blake + + * NEWS: Adjust wording for AC_CONFIG_LINKS. + Reported by Ralf Wildenhues. + +2007-09-03 Eric Blake + + * NEWS: Document fixes that have been applied since 2.61a. + + Housekeeping. + * THANKS: Update, and convert to UTF-8 encoding. + * AUTHORS: Likewise. + +2007-08-23 Ralf Wildenhues + + * lib/autoconf/general.m4 (AC_SITE_LOAD): Guard against file + names beginning with `-' again. + +2007-08-22 Stepan Kasal + Ralf Wildenhues + + * doc/autoconf.texi (Defining Directories): Mention + AM_CPPFLAGS, as the way to modify CPPFLAGS when using Automake. + +2007-08-21 Ralf Wildenhues + + * lib/autoconf/general.m4 (AC_SITE_LOAD): Do not overwrite "$@" + here, this macro is expanded by AC_INIT. Fixes 2.60 regression. + * tests/base.at (configure arguments): New test. + * THANKS: Update. + Report by Olaf Lenz. + + * lib/autoconf/general.m4 (_AC_ENABLE_IF): Expand macro + arguments in comment. + Report by Vincent Torri . + +2007-08-20 Benoit Sigoure + + * doc/autoconf.texi (File System Conventions): Index the proper + way of detecting absolute file names. + +2007-08-20 Ralf Wildenhues + + * build-aux/config.guess, build-aux/config.sub, + build-aux/elisp-comp, build-aux/install-sh, build-aux/mdate-sh, + build-aux/missing, build-aux/texinfo.tex, doc/fdl.texi, + doc/make-stds.texi, doc/standards.texi: Sync from gnulib. + * doc/autoconf.texi (GNU Free Documentation License): Adjust for + sectioning change in fdl.texi. + + * bin/autoconf.as: Update --version output to match current GCS. + * bin/autoheader.in: Likewise. + * bin/autom4te.in: Likewise. + * bin/autoreconf.in: Likewise. + * bin/autoscan.in: Likewise. + * bin/autoupdate.in: Likewise. + * bin/ifnames.in: Likewise. + +2007-08-18 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_LINK): Do not try to link a + file to itself if source and build trees coincide. + * tests/torture.at (AC_CONFIG_LINKS and identical files): New + test. + Report by Sebastian Freundt . + +2007-07-20 Paul Eggert + + Reword the copyright notices to match what's suggested in GPLv3. + In ChangeLog files, use more-permissive notice rather than GPL, as + per usual GNU standards these days. + +2007-07-13 Paul Eggert + + * doc/autoconf.texi (autoreconf Invocation): Document ACLOCAL_AMFLAGS + limitation reported by Leo Moisio in + . + +2007-07-03 Paul Eggert + + * COPYING: Update to GPLv3. All uses changed. + +2007-06-26 Ralf Wildenhues + and Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): sed -e '' + fails on AIX 5.3. + +2007-06-17 Noah Misch + + * lib/autotest/general.m4 (AT_INIT): Handle absolute `srcdir'. + * tests/autotest.at (srcdir propagation): Test absolute `srcdir' and + `srcdir' as subdirectory of `builddir'. + +2007-06-13 Noah Misch + + * lib/autotest/general.m4 (AT_INIT): Compute $srcdir correctly. + * tests/autotest.at (srcdir propagation): New test. + * THANKS: Update. + Reported by Mike Frysinger. + +2007-06-13 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): Set FPATH too. + Problem reported by Fred Kreek in + . + * doc/autoconf.texi (Special Shell Variables): Warn about FPATH. + (Macro Names, Defining Directories): Don't mention PATH as a name + for a fully qualified file name, as this usage violates the GNU + coding standards and we shouldn't recommend it. + + * lib/autotest/general.m4 (AT_INIT): Don't set PATH to the empty + string and then assume shell builtins like "test" will work. + +2007-06-12 Noah Misch + + * lib/autoconf/general.m4 (AC_SUBST): Raise a fatal error if VARIABLE is + not a valid shell variable name. + * tests/mktests.sh (ac_exclude_list): Add AC_ARG_VAR. + * tests/torture.at (AC_SUBST: variable name validation): New test. + Reported by Andreas Schwab. + +2007-06-04 Noah Misch + + * doc/autoconf.texi (AC_F77_MAIN): Give a specific usage example that + works with both C and C++. + +2007-06-03 Noah Misch , + Bruno Haible + + * lib/autoconf/c.m4 (AC_OPENMP): Use a simple loop instead of compiler + brand tests. + +2007-05-31 Paul Eggert + + * doc/autoconf.texi (Particular Types): Give example of use for + AC_TYPE_INT8_T etc. + +2007-05-29 Stepan Kasal + + * lib/autoconf/types.m4 (_AC_TYPE_UNSIGNED_INT): Fix a typo. + +2007-05-28 Paul Eggert + + * doc/autoconf.texi (Particular Types): AC_TYPE_INT8_T does not + define HAVE_INT8_T, and likewise for similar macros. + Problem reported by Patrick Welche in + . + +2007-05-25 Noah Misch + + * bin/Makefile.am ($(top_builddir)/bin/autom4te): New dependency. + +2007-05-21 Paul Eggert + + * lib/autoconf/c.m4 (AC_OPENMP): Don't echo --enable-openmp + choice, since that's what we do with --enable-largefile etc. + Redo indenting and assignments to simplify things a bit, and make + the parens work with Emacs. + + * doc/autoconf.texi (Generic Compiler Characteristics): Fix typo + in my previous change: AC_C_OPENMP -> AC_OPENMP. Reported by Bruno + Haible. + +2007-05-21 Noah Misch + + * lib/autoconf/c.m4 (AC_OPENMP): Simplify use of AC_ARG_ENABLE. + * tests/local.at (AT_CHECK_ENV): Exempt OPENMP_CFLAGS. + +2007-05-21 Bruno Haible + + * NEWS: Rename AC_C_OPENMP to AC_OPENMP. + * lib/autoconf/c.m4 (AC_OPENMP): Renamed from AC_C_OPENMP. + * doc/autoconf.texi (Generic Compiler Characteristics): Move + renamed AC_OPENMP documentation here, from "C compiler". + Mention C++ and Fortran. + +2007-05-21 Paul Eggert + + * doc/autoconf.texi (C Compiler): Tweak OpenMP documentation a bit. + +2007-05-21 Bruno Haible + + * NEWS: Mention AC_C_OPENMP. + * lib/autoconf/c.m4 (AC_C_OPENMP): New macro. + * doc/autoconf.texi (C Compiler): Document AC_C_OPENMP. + Based in part on Steven G. Johnson's investigations for the AX_OPENMP + macro in the Autoconf macro archive. + +2007-05-17 Ralf Wildenhues + + * bin/autom4te.in: Fix typos. + +2007-05-16 Noah Misch + + * bin/autoconf.as: Handle `-' just like other input files. + * bin/autom4te.in (parse_args): Pass `-' through. + (handle_output): Skip the forbidden token search if we read from stdin. + (up_to_date): Always treat stdin as out of date. + * tests/tools.at (autoconf: input from stdin): New test. + (autoconf: forbidden tokens, basic): Check a second `autoconf' run. + +2007-05-16 Stepan Kasal + + * tests/foreign.at tests/semantics.at, tests/tools.at: Remove + parameters for AT_CLEANUP. + * tests/local.at (AT_CHECK_AU_MACRO): Likewise. + +2007-05-14 Paul Eggert + + * NEWS: Document that AC_C_RESTRICT checks 'restrict' last. + * doc/autoconf.texi (C Compiler): Likewise. + +2007-05-14 Noah Misch + + * lib/autoconf/c.m4 (AC_C_RESTRICT): Check `restrict' last. + +2007-05-09 Stepan Kasal + + * doc/autoconf.texi: Direntry for "autoconf Invocation" + renamed to "autoconf-invocation" + + * doc/autoconf.texi (Caching Results): The CACHE-ID variable + in the examples should not use the internal "ac_" prefix. + +2007-05-05 Noah Misch + + * lib/autotest/general.m4 (_AT_NORMALIZE_TEST_GROUP_NUMBER): Use `eval'. + * doc/autoconf.texi ($@, case): Document Zsh limitations. + +2007-05-03 Stepan Kasal + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Put a.out first. + Reorganize the comments before and in the macro. + +2007-05-02 Stepan Kasal + + * lib/autoconf/lang.m4, lib/autoconf/c.m4, + lib/autoconf/fortran.m4, lib/autoconf/erlang.m4: Cleanup of + section titles and other comments; no code change. + +2007-05-01 Kevin Ryde + + * doc/autoconf.texi (Particular Programs): Typo + @acindex{AC_PROG_MKDIR_P} shouldn't have "AC" in that call. + +2007-04-30 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_SPY): Don't imply that + 'configure' will fail if the shell lacks proper support for shell + functions. Suggested by RMS. + +2007-04-29 Paul Eggert + + * doc/autoconf.texi (Limitations of Builtins): Correct the warning + about Solaris /bin/printf '%010000x' 123. Problem reported by + Bruno Haible. + +2007-04-28 Paul Eggert + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Don't look + for a.* when searching for executables, as this prevents users + from having files like a.c. Problem reported by Ralf Wildenhues in: + http://lists.gnu.org/archive/html/autoconf-patches/2007-04/msg00029.html + This fixes a problem introduced on 2000-12-19. + +2007-04-26 Paul Eggert + + * doc/autoconf.texi (Limitations of Builtins): Warn about Solaris + /bin/printf '%010000x' 123. Problem reported by Arto C. Nirkko + via Bruno Haible. + +2007-04-12 Paul Eggert + + * NEWS: Document recent changes to AC_CHECK_ALIGNOF, AC_CHECK_SIZEOF, + AC_CHECK_TYPE, AC_CHECK_TYPES. + * doc/autoconf.texi (Generic types): C types must be type-names + (the C terminology), not type-ids (the C++ term). C++ types + must not be anonymous. + * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW): Remove special case + for C++; this drops support for anonymous struct and union types, + which were problematic anyway. + * tests/semantics.at (AC_CHECK_HEADERS_NEW): Adjust test to work even + for C++. + +2007-04-12 Jim Meyering + + * doc/autoconf.texi (Libraries): Typo fix: insert missing "in". + +2007-04-12 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_LINK): Fix AC_CONFIG_LINKS + to prefer a link source from the build tree, if it exists. + Report by Pallav Gupta . + +2007-04-11 Paul Eggert + + * doc/autoconf.texi (Generic Types): Document the restrictions + on types imposed by AC_CHECK_TYPE, AC_CHECK_TYPES. + (Generic Compiler Characteristics): AC_CHECK_SIZEOF now works + with objects too. Document the restrictions on its use. + Document the restrictions on AC_CHECK_ALIGNOF's type argument. + * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW): + For C, just try sizeof (TYPE) and sizeof ((TYPE)); if the former + works but the latter doesn't, then it's a valid type. + This lets people use function types and so forth. + For C++ there doesn't seem to be a simple solution, so leave it alone. + (AC_CHECK_SIZEOF): Allow argument to be a variable. + (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF): Don't bother to invoke + AC_CHECK_TYPE; that wasn't documented or necessary. + +2007-04-11 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_LINK_IFELSE): Skip AS_TEST_X + when cross-compiling. + +2007-04-11 Stepan Kasal + + * doc/autoconf.texi (External Software): Fix a typo in the + previous change. + +2007-04-11 Ralf Wildenhues + + * doc/autoconf.texi (External Software, Package Options): + Fix ambiguous wording. Report by Reuben Thomas . + +2007-04-06 Paul Eggert + + * doc/autoconf.texi (Particular Types): AC_C_LONG_DOUBLE is now + obsolescent. Suggested by Bruno Haible. + * NEWS: Document this. + +2007-03-29 Paul Eggert + + * doc/autoconf.texi (Here-Documents, Limitations of Builtins): + (Limitations of Usual Tools): Don't say "older" if Solaris 10 by + default still has the problem. Problem reported by Bruce Korb. + +2007-03-28 Stepan Kasal + and Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix a + comment in the generated config.status. + +2007-03-27 Stepan Kasal + + * lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Update comment. + +2007-03-26 Paul Eggert + + * doc/autoconf.texi (Shellology): Rework treatment of the 'test' + command and case statements to make it a bit clearer and describe + more pitfalls. + +2007-03-23 Paul Eggert + + * doc/autoconf.texi (C Compiler): Mention that AC_PROG_CC_C99 also + checks for unsigned long long int. + +2007-03-19 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): Warn about other + nonstandard grep R.E. escape sequences. + +2007-03-17 Jim Meyering + + * doc/autoconf.texi: Adjust grammar around use of "heuristics". + (Limitations of Usual Tools): Also list \< and \>, and mention that + HP-UX's grep, like the one from Solaris, does not support that syntax. + +2007-03-09 Stepan Kasal + + * doc/autoconf.texi (Specifying Names): `--host' does not + change the build type. + +2007-03-05 Paul Eggert + + * doc/autoconf.texi (C Compiler): Warn that AC_C_BIGENDIAN + suggests AC_CONFIG_HEADERS. + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Warn if not using + AC_CONFIG_HEADERS. Problem reported by + Peter O'Gorman. + +2007-02-28 Paul Eggert + + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Fix typo "__LITLE_ENDIAN__". + Problem reported by Paolo Bonzini in: + http://lists.gnu.org/archive/html/autoconf-patches/2007-02/msg00024.html + * tests/semantics.at (AC_C_BIGENDIAN): Don't reject hosts that have + universal binaries. Problem reported by Elias Pipping. + +2007-02-27 Paul Eggert + + * NEWS: AC_C_BIGENDIAN now supports universal binaries a la Mac OS X. + * doc/autoconf.texi (C Compiler): Document this. There is a new + extra argument ACTION-IF-UNIVERSAL. + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Implement this. + Add support for Solaris-style _LITTLE_ENDIAN and _BIG_ENDIAN. + Reindent for sanity's sake. + +2007-02-24 Eric Blake + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Update + copyright. + * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Likewise. + * lib/autotest/general.m4 (AT_INIT): Likewise. + (_AT_DECIDE_TRACEABLE): Fix syntax highlighting. + +2007-02-13 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_INIT): With --clean, return exit + status of rm so we know when it failed. + If cleaning of test dir failed before running the test, warn. + Output the line separator in verbose mode before the warning + to make clear the warning belongs to the following test. + +2007-02-08 Paul Eggert + + * doc/autoconf.texi (Parentheses): Mention problem with (( in + shells. + +2007-02-07 Ralf Wildenhues + and Paul Eggert + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix quoting + errors introduced in last change. + +2007-02-07 Paul Eggert + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Prefer \r to + an actual carriage return. Use "ac_cr" to contain the actual + carriage return. + * doc/autoconf.texi (Limitations of Usual Tools): Document problem + with traditional Awk and begin. + * tests/torture.at (Limitations of Builtins): Document the problem + with Bash 2.03 printf. + (Substitute and define special characters): + Remove trailing white space. Work around a bug in Solaris 8 /bin/bash. + +2007-02-06 Ralf Menzel (tiny change) + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Redirect + input from /dev/null in awk test, so even Solaris /usr/bin/awk + will not wait for input with a script containing only a BEGIN + rule. + +2007-02-03 Paul Eggert + + * doc/autoconf.texi (Introduction, Why GNU M4): Clarify M4 version + requirements. + * README: Likewise. + +2007-02-02 Eric Blake + + * NEWS: Update copyright. + + * m4/m4.m4 (AC_PROG_GNU_M4): Reject M4 1.4 through 1.4.4 as + broken. + * configure.ac: Update error message. + * NEWS: Note that M4 1.4.5 or later is now a hard dependency. + Reported by Gary Vaughan and Jim Meyering, and problem analyzed + by Stepan Kasal: + http://lists.gnu.org/archive/html/bug-autoconf/2006-11/msg00025.html + +2007-01-31 Eric Blake + + * THANKS (people): Update. + +2007-01-28 Paul Eggert + + * doc/autoconf.texi (Shellology): pdksh 5.2.14 is still the + latest version. + (Shell Substitutions): Note problems with @{var:=value} etc. + Add a new section for problems with @{#var} etc. Problem noted + by Ralf Wildenhues. See: + http://lists.gnu.org/archive/html/libtool-patches/2005-01/msg00157.html + +2007-01-23 Ralf Wildenhues + + * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Also + AC_SUBST([MKDIR_P]), so that Automake < 1.10 will pick up its + trace, if a package uses AC_PROG_MKDIR_P explicitly. The actual + substitution will still be done by the special code. + Report by Jim Meyering. + + * doc/autoconf.texi (File System Conventions): Mention that + $PATH_SEPARATOR is for the build system only. + Report by Keith Marshall. + +2007-01-19 Ralf Wildenhues + + * doc/autoconf.texi (Setting Output Variables): Mention that + all non-NUL characters are ok in substituted values. + * lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): Fix comment typo. + (_AC_OUTPUT_FILES_PREPARE): Test and use backslash escaping of + carriage return for $AWK, needed for BSD awk. + * tests/torture.at (Substitute and define special characters): + Test all 8 bit non-NUL characters. + Report against Automake by Patrick Welche. + +2007-01-15 Stepan Kasal + + * doc/autoconf.texi: Direntry for "autoconf Invocation" renamed. + +2007-01-11 Ralf Wildenhues + + * lib/autoconf/programs.m4 (AC_PROG_SED): When closing a pipe + early on the reader side, drop stderr of the input to avoid + `broken pipe' error output; this may happen even with shell + builtin `echo' of some bash versions. Reports by Ian Macdonald + and Sam Sexton . + +2007-01-10 Ralf Wildenhues + + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Use newlines to + separate items of `ac_user_opts', to avoid long lines. + (_AC_INIT_PARSE_ENABLE2, _AC_ENABLE_IF_ACTION): Adjust. + +2007-01-08 Ralf Wildenhues + + * doc/autoconf.texi: Fix some typos. + +2007-01-05 Paul Eggert + + Fix some wording problems noted by Paolo Bonzini in: + http://lists.gnu.org/archive/html/autoconf-patches/2007-01/msg00077.html + * doc/autoconf.texi (Signed Overflow Examples): Give more + discussion about the allow_superuser_privileges example, + and change it a bit to make things clearer. + (Optimization and Wraparound): Clarify whether the compiler + will generate an infinite loop for the example derived from + Autoconf's mktime test. + (Signed Overflow Advice): Say that -ftrapv is meant for debugging. + Also, clarify unsigned multiplication overflow. + +2007-01-04 Eric Blake + + * bin/Makefile.am (RELEASE_YEAR): New macro. + (edit): Use it to supply correct copyright year to scripts. + * bin/autoconf.as (version): Use it. + * bin/autoheader.in ($version): Likewise. + * bin/autom4te.in ($version): Likewise. + * bin/autoreconf.in ($version): Likewise. + * bin/autoscan.in ($version): Likewise. + * bin/autoupdate.in ($version): Likewise. + * bin/ifnames.in ($version): Likewise. + +2007-01-02 Paul Eggert + + * doc/autoconf.texi (Integer Overflow): Revised based on today's + feedback. The most important changes document what happens when + you convert an out-of-range value to a signed integer type, and + say that (sum < a) != (b < 0) reliably detects overflow when sum = + a + b. + + * doc/autoconf.texi (Integer Overflow): Greatly expand and + rewrite, taking notions from the recent discussion on the gcc and + autoconf mailing lists; please see + http://lists.gnu.org/archive/html/autoconf-patches/2006-12/msg00091.html + and follow the many links. + (Integer Overflow Basics, Signed Overflow Examples): + (Optimization and Wraparound, Signed Overflow Advice): + (Signed Integer Division): New sections. + +2006-12-28 Steven G. Johnson + + * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Don't include + preprocessor macro arguments in traced name. + * doc/autoconf.texi (Defining symbols): Document longstanding + support for AC_DEFINE-ing macros with arguments, and document + behavior when the same variable has multiple AC_DEFINEs. + * lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Revert to the + old implementation which AC_DEFINEs the FC_FUNC and FC_FUNC_ + macros directly, giving much shorter and simpler code. + +2006-12-28 Malcolm Purvis (trivial change) + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Insert a + space before "$ac_configure_args" to prevent a 'config.status + --recheck' failure if ac_configure_args doesn't contain a leading + space. This works around a problem with the XEmacs configure.ac, + which uses the (undocumented) ac_configure_args variable + inconsistently with Autoconf. + +2006-12-22 Paul Eggert + + * lib/autoconf/functions.m4 (AC_FUNC_MKTIME): + Include , and use its INT_MAX to rewrite the + j loop so that it does not overflow 'int'. Problem reported by + Ralf Wildenhues in + . + Play it safe by shifting left by 1 rather than multiplying by 2, + as GCC is less likely to optimize this away when the value + is signed (when it assumes overflow leads to undefined behavior). + Also, don't assume time_t uses two's complement. + +2006-12-20 Ralf Wildenhues + + * tests/torture.at (Substitute a 2000-byte string): Avoid using + a 10kB long (multi-line) string literal, OpenServer 5.0.7 ksh + dumps core on it. Report by Tim Rice. + +2006-12-18 Steven G. Johnson + + * lib/autoconf/general.m4 (AC_ARG_ENABLE): Print help about + --disable-option-checking to --help output even when + AC_PRESERVE_HELP_ORDER is not used. + (_AC_INIT_PARSE_ENABLE2): Print warnings using actual --enable or + --with argument, rather than argument with [-.] replaced by + underscores. + * NEWS: Fix typo in previous change; the news was in the + wrong section. + +2006-12-18 Paul Eggert + + * NEWS: Warnings are now generated by default for unknown + --enable-* and --with-* options. + * doc/autoconf.texi (Option Checking): Renamed from + (Configure Option Checking). Tighten up the wording a bit. + (External Software, Package Options): Cross-reference to Option + Checking, and use this to shorten our section. + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Prefer test -n + "$x" to test "x$foo" != x. + * lib/autoconf/status.m4 (AC_OUTPUT): Likewise. + Don't warn if $enable_option_checking is "no". + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Initialize + ac_unrecognized_opts to the empty string. + Don't echo the unrecognized opts, as this might mishandle + backslashes or leading -. + (AC_PRESERVE_HELP_ORDER): Put the --disable-option-checking + usage next to the other --disable-FEATURE options in the + help string. + +2006-12-18 Steven G. Johnson + + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS): + (_AC_INIT_PARSE_ENABLE2, _AC_INIT_HELP, _AC_ENABLE_IF): + Print warning for unrecognized --with and --enable options + (AC_DISABLE_OPTION_CHECKING): New macro to disable warnings. + * lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS, _AC_OUTPUT_SUBDIRS): + Disable option checking when subdirs are configured. + (AC_OUTPUT): If warnings are enabled, print warning about + unrecognized --with and --enable options at the end of + the configure output (as well as at the beginning). + * doc/autoconf.texi (Option Checking): New node. + Document new option warning functionality. + +2006-12-16 Eric Blake + + * configure.ac (AC_INIT): Bump version, since 2.61a is released. + * NEWS: Start news for current version. + +2006-12-15 Paul Eggert + + * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): + Define HAVE_GETMNTENT to 1, not to the empty string. + Problem originally reported by Jochen Friedrich in + . + + This change prompted by a problem report by Andrey Simonenko in + . + * doc/autoconf.texi (Defining Symbols): AC_DEFINE works for + object-like macros only, in the traditional portable character + set. + * lib/autoconf/general.m4 (AC_DEFINE_TRACE_LITERAL): + Warn about attempts to define things that are not identifiers. + * lib/autoconf/fortran.m4 (_AC_FC_WRAPPERS): Rewrite to avoid + awful hack that AC_DEFINEd macro names containing parentheses. + +2006-12-12 Paul Eggert + + * doc/autoconf.texi: Undo some of the 2006-12-10 change. It was + too drastic, even if Texinfo in theory requires it for info mode. + + (config.status Invocation): Renamed back from Recreating a + Configuration). + (Obsolete config.status Use): Renamed back from Obsolete Recreation. + (Autoconf 2.13): Renamed back from 20th-century Autoconf 2. + +2006-12-11 Paul Eggert + + * NEWS: Version 2.61a. + +2006-12-11 Paul Eggert + and Ralf Wildenhues + + * NEWS: Document changes with echo and printf, and the lack + of limits on the total size of multi-line values of substituted + variables, and the AC_FUNC_FSEEKO fix. + +2006-12-10 Paul Eggert + + * doc/autoconf.texi (Writing Autoconf Input): Renamed from + Writing configure.ac. + (Autoconf Input Layout): Renamed from configure.ac Layout. + (Recreating a Configuration): Renamed from config.status Invocation. + (Obsolete Recreation): Renamed from Obsolete config.status Use. + (acconfig Header): Renamed from acconfig.h. + (20th-century Autoconf 2): Renamed from Autoconf 2.13. + (Writing Testsuites): Renamed from Writing testsuite.at. + (Autom4te Cache): Renamed from autom4te.cache. + + * BUGS: Remove mention of VPATH problem, since it's now documented + not to be a bug in the Autoconf build procedure itself, but rather + a problem with the proprietary `make' programs. + + * doc/autoconf.texi (Build Directories): Add a cross reference + to VPATH and Make. + + * build-aux/config.guess, build-aux/config.sub, build-aux/texinfo.tex: + * doc/standards.texi: Sync from gnulib. + + * man/autoconf.1, man/autoheader.1, man/autom4te.1, man/autoreconf.1: + * man/autoscan.1, man/autoupdate.1, man/config.guess.1: + * man/config.sub.1, man/ifnames.1: Remove from CVS, since they're + generated automatically. + +2006-12-06 Paul Eggert + + * lib/autoconf/c.m4 (_AC_PROG_CC_C89): Also try -xc99=all, for Sun + C 5.8 on Solaris 10. Using -xc99=all rather than -xc99 bypasses + the buggy -xc99 option of Forte Developer 7 C on Solaris 9. + +2006-12-07 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Drop the + `CEOF$ac_eof' special marker, the awk script cannot contain a + line matching `^CEOF', so this is not needed any more. + * tests/torture.at (Substitute a newline): Expose the `%!_!# ' + special marker in the test. + +2006-12-06 Stepan Kasal + + * tests/tools.at (autom4te preselections): Use `find -newer'; + remove one of the sleeps. + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE): Make it + more readable, using ... + (_AC_INIT_PARSE_ENABLE2): ... this new helper macro. + + * doc/autoconf.texi (autoheader Invocation): Do not double- + quote the parameter of `AH_BOTTOM' in the example. + +2006-12-05 Stepan Kasal + + * doc/autoconf.texi (Configuration Headers): Remove the + example with multiple input files. + (autoheader Invocation): Encourage `AH_BOTTOM', discouraging + multiple input files. + +2006-12-05 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): When + creating the awk substitution script, handle one input line at a + time, so that the maximum length of a substituted (multi-line) + value is not limited by the size of the sed pattern space. + The trade-off is a slightly repetitive sed script. + * doc/autoconf.texi (Limitations of Usual Tools): Branch labels + can only have up to 7 characters, due to Solaris 10 /bin/sed. + * tests/torture.at (Substitute a 2000-byte string): Increase the + test with several long lines, they should not be caught by sed + limits any more. + + * tests/tools.at (autom4te preselections): New test, to flag + entries missing from autom4te.cfg. + Report by David Byron . + + * tests/torture.at (Substitute a 2000-byte string): Actually use + AC_PROG_AWK, so the last change works as intended. + (Substitute and define special characters): Likewise. + (Substitute a newline): Likewise. + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Use `$AWK' + instead of `awk' consistently. + (_AC_OUTPUT_CONFIG_STATUS): Initialize $AWK. + * tests/torture.at (Torturing config.status): Test both the + result of AC_PROG_AWK and plain awk. + (Substitute a 2000-byte string): Likewise. + (Substitute and define special characters): Likewise. + (Substitute a newline): Likewise. + +2006-12-04 Paul Eggert + + * lib/autoconf/functions.m4 (AC_FUNC_FSEEKO): Check that fseeko + can be assigned to a function pointer. Problem reported by + Peter Palfrader in . Based on + part of a patch by Ralf Wildenhues in that same bug report. + +2006-12-01 Paul Eggert + + * tests/mktests.sh (ac_exclude_list): Exclude AC_FUNC_SETVBUF_REVERSED. + * tests/semantics.at (AC_FUNC_SETVBUF_REVERSED): New test. + +2006-12-01 Eric Blake + + * lib/autoconf/c.m4 (AC_LANG_INT_SAVE): Avoid newline, to aid in + cross-compiling from cygwin to mingw. + Reported by Bob Rossi. This resurrects the 2000-11-30 patch to + aclang.m4, which was mistakenly removed in the 2001-09-17 patch + to lib/autoconf/c.m4. + +2006-12-01 Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Use a longer test + string for more reliable failure. Wrap the entire test that + causes the broken Solaris printf to dump core, in a subshell, + so the segmentation fault message is reliably suppressed. + Fix shell expansion errors by using /usr/ucb/echo always; + avoid an error on systems without it by another subshell. + Avoid m4 expansion of `$1'. Set the zeroth argument of the + subshell-$as_echo to `as_echo', for better error message. + +2006-11-28 Ralf Wildenhues + + * lib/autoconf/general.m4 (_AC_CACHE_DUMP): If `BASH_ARGV' or + `BASH_SOURCE' contain a newline, set them to empty, as they may + not be unset. + +2006-11-27 Paul Eggert + + Turn AC_FUNC_SETVBUF_REVERSED into a noop. It's been obsolete for + years and is too hard to maintain now. The last straw was + reported by Jerker Baeck in + . + * NEWS: AC_FUNC_SETVBUF_REVERSED is now obsolete. + * doc/autoconf.texi (Particular Functions): Move + AC_FUNC_SETVBUF_REVERSED from here... + (Obsolete Macros): ... to here. Say that it does nothing now. + * lib/autoconf/functions.m4 (AC_FUNC_SETVBUF_REVERSED): + Turn into (almost) a no-op. + + * lib/autoconf/c.m4 (AC_PROG_GCC_TRADITIONAL, AC_C_CONST): + (AC_C_VOLATILE): + Do not recommend via AN_FUNCTION, AN_IDENTIFIER, or AN_HEADER. + These macros are obsolescent and new applications shouldn't need them. + * lib/autoconf/functions.m4 (AC_FUNC_CLOSEDIR_VOID, AC_REPLACE_FNMATCH): + (AC_FUNC_GETLOADAVG, AC_FUNC_GETPGRP, AC_FUNC_MEMCMP): + (AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP, AC_FUNC_STAT, AC_FUNC_LSTAT): + (AC_FUNC_STRFTIME, AC_FUNC_SETVBUF_REVERSED, AC_FUNC_UTIME_NULL): + (AC_FUNC_VPRINTF): Likewise. + * lib/autoconf/headers.m4 (AC_HEADER_DIRENT, AC_HEADER_STAT): + (AC_HEADER_STDC, AC_HEADER_SYS_WAIT, AC_HEADER_TIME): Likewise. + * lib/autoconf/types.m4 (AC_STRUCT_TM): Likewise. + + * doc/autoconf.texi (Setting Output Variables): Mention that + @VAR1@VAR2 has unspecified behavior. Problem reported by + Ralf Wildenhues. + * NEWS: Mention this. + + * Makefile.am: Put only a single '#' into the copyright notice, + so that it's also present in the output file. Standardize wording + in makefile copyright notices to match GNU coding standards. + * bin/Makefile.am: Likewise. + * doc/Makefile.am: Likewise. + * lib/Makefile.am: Likewise. + * lib/freeze.mk: Likewise. + * lib/autoconf/Makefile.am: Likewise. + * lib/autoscan/Makefile.am: Likewise. + * lib/autotest/Makefile.am: Likewise. + * lib/m4sugar/Makefile.am: Likewise. + * man/Makefile.am: Likewise. + * tests/Makefile.am: Likewise. + * lib/emacs/Makefile.am: Remove copyright notice; it's just a + one-line file. + +2006-11-27 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Fix error + in the sed script that mangles the awk script: delete up to the + first exclamation mark only. + * tests/torture.at (Substitute and define special characters): + Test '!' too. + +2006-11-26 Ralf Wildenhues + + Rewrite config files generation: avoid quadratic growth in + the number of substituted variables by using awk instead of sed + for the bulk of the substitutions. + * NEWS: Mention this. + * doc/autoconf.texi (Setting Output Variables): `|#_!!_#|' is also + forbidden in the output (and thus input) file. + * lib/autoconf/status.m4 (_AC_AWK_LITERAL_LIMIT): New macro. + (_AC_OUTPUT_FILES_PREPARE): Instead of several sed scripts, + generate just one large awk script for substitutions, + eliminating much of the earlier complexity, while adding some + new complexity. Only expand the substitution templates at + configure time, for smaller configure script size. If + _AC_SUBST_FILES are used, test 'awk' for working getline support + at config.status time. If absent, interpolate through the + shell. The awk script was written with much help + from Paolo Bonzini and Paul Eggert. + (_AC_SED_CMD_NUM, _AC_SED_DELIM_NUM, _AC_SED_FRAG): Removed. + (_AC_SED_FRAG_NUM): Likewise. + (_AC_SUBST_CMDS): Renamed from... + (_AC_SED_CMDS): ...this. + (_AC_OUTPUT_FILE): Use _AC_SUBST_CMDS. + * tests/torture.at (Substitute a 2000-byte string): Also + substitute a line with 1000 words, and a variable with several + long lines. + (Substitute and define special characters): Test awk special + characters, and put substitution input strings `@foo@' in the + output, to test that no recursion happens; test several other + combinations from Paolo Bonzini. + +2006-11-25 Paul Eggert + + * lib/autotest/general.m4 (AT_INIT): Undo recent changes + that replaced echo with AS_ECHO where this wasn't necessary. + Problem reportd by Ralf Wildenhues. + * lib/m4sugar/m4sh.m4 (_AS_ECHO_PREPARE): Port to Solaris 7, + where "/usr/bin/printf '%s\n' S" dumps core if S is long. + This is Sun bug 4206210. Problem reportd by Ralf Wildenhues. + +2006-11-24 Ralf Wildenhues + + * lib/freeze.mk (GREP): Removed, no need to initialize this. + +2006-11-21 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): Don't claim + that traditional Awk lacks 3-arg "split". It has it. + Mention that FS must be a single character, and a few other + 99-byte limits of traditional Awk. + Mention that if (i in a) doesn't work with traditional Awk. + +2006-11-18 Paul Eggert + + * tests/autotest.at (BSx641-newline in command): + (BS-BS-newline in command, BSx640-newline in command): + (Newline-CODE-BS-newline in command): + (Single-quote-BS-newline in command): + (Single-quote-newline-BS-newline in command): + Use printf '%s\n' instead of echo, for portability to hosts + where echo interprets backslashes. This will break on hosts + that lack printf, but for now let's assume all such hosts + are dead (if not, we should get reports of test failures). + +2006-11-17 Paul Eggert + + 'echo' has some portability problems, when given a first argument + with a leading '-', or when given any argument containing '\'. + Avoid using 'echo' in these cases. + * bin/Makefile.am $(bin_SCRIPTS): Rewrite to avoid 'echo' entirely. + * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Likewise. + * lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * bin/autoconf.as: Use AS_ECHO rather than plain echo, when the + argument might be unportable. + * lib/autoconf/c.m4 (AC_PROG_CC_C_O): Likewise. + * lib/autoconf/erlang.m4 (AC_LANG(Erlang)): Likewise. + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): + (_AC_FC_LIBRARY_LDFLAGS): Likewise. + * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Likewise. + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE, _AC_INIT_PREPARE): + (_AC_ARG_VAR_VALIDATE, AC_ARG_PROGRAM, _AC_MSG_LOG_CONFTEST): + (AC_RUN_LOG, _AC_RUN_IFELSE, _AC_LIBOBJS_NORMALIZE): Likewise. + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Likewise. + * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Likewise. + * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): + (AC_PROG_MAKE_SET): Likewise. + * lib/autoconf/status.m4 (_AC_SRCDIRS, _AC_OUTPUT_HEADER): + (_AC_OUTPUT_SUBDIRS, _AC_OUTPUT_CONFIG_STATUS): Likewise. + * lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT, AT_INIT): + (AT_CLEANUP, _AT_DECIDE_TRACEABLE, _AT_CHECK): Likewise. + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE, _AS_ECHO_UNQUOTED): + (_AS_BASENAME_SED, _AS_DIRNAME_SED, AS_MKDIR_P, AS_TMPDIR, AS_UNAME): + (AS_TR_SH, AS_TR_CPP, AS_VAR_GET): Likewise. + * bin/autoconf.as: Redo verbose flag implementation, as the old + scheme wouldn't work with AS_ECHO. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * lib/autoconf/general.m4 (AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED): + Don't use ECHO_T, since ECHO_N is now reliable. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * lib/autoconf/general.m4 (AC_ARG_PROGRAM): Use sed "$script" + rather than using a here-document to put the script into a file. + (_AC_DO_ECHO): Hoist the eval out of the echo, so that we can + use AS_ECHO. + * lib/m4sugar/m4sh.m4 (AS_VAR_GET): Likewise. + * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Use + AS_ECHO_N rather than ECHO_N and ECHO_C. This doesn't fix any + bug, but we might as well stop using ECHO_N and ECHO_C internally. + * lib/autotest/general.m4 (AT_SETUP): Likewise. + * lib/m4sugar/m4sh.m4 (_AS_ECHO_N): Likewise. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): + (_AC_OUTPUT_MAIN_LOOP): Rework echo so that it has just one + operand, as AS_ECHO requires. Avoid double file name expansion. + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Invoke _AS_ECHO_PREPARE. + Don't set as_nl, since _AS_ECHO_PREPARE does that now. + (_AS_PREPARE): Comment that _AS_ECHO_N_PREPARE is just for user code. + (AS_ECHO, AS_ECHO_N, _AS_ECHO_PREPARE): New macros. + * tests/c.at (AC_PROG_CPP without warnings, AC_PROG_CPP via CC): + Double-quote strings that would otherwise contain M4 comments. + * tests/m4sh.at (AS_ECHO and AS_ECHO_N): New test. + + * configure.ac (AC_INIT): Bump to 2.61a. + * NEWS: Likewise. + +2006-11-17 Paul Eggert + + Version 2.61. + + * configure.ac (AC_INIT): Bump to 2.61. + * NEWS: Likewise. + + * tests/autotest.at (Macro with backslash in a test title): + Comment out for now, as this tests neither fails nor passes + reliably. Problem reported by Ralf Wildenhues. + +2006-11-16 Paul Eggert + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ENABLE): Fix some typos + in previous change, which caused test failures. + +2006-11-16 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Factor out + code for --enable, --disable, --with, and --without to... + (_AC_INIT_PARSE_ENABLE): ... a new macro. + * doc/autoconf.texi (Package Options): + * NEWS: Document that AC_ARG_ENABLE allows dots, too. + +2006-11-16 Paul Eggert + + Import these changes from config via gnulib: + + 2006-11-15 Ben Elliston + + From Josselin Mouette : + * build-aux/config.guess (SX-8:SUPER-UX:*:*): New. + + 2006-11-08 Ben Elliston + + * build-aux/config.guess (authenticamd:Interix*:[3456]*): Another AMD64. + + 2006-11-07 Steve Woodford + Ben Elliston + + * build-aux/config.guess (*:NetBSD:*:*): Handle sh5el arch. + * build-aux/config.sub (sh5el): New basic_machine. + + + Import this change from coreutils: + + 2006-02-13 Jim Meyering + + * GNUmakefile (all): Emit diagnostics to stderr, not stdout. + + + Import this change from gnustandards via gnulib: + + 2006-11-15 Karl Berry + + * standards.texi: core -> memory, throughout. + (CPU Portability): show correct example of calling write + on a char value; thanks to Paul Eggert for the code. + Both of these suggestions from Eugene Y. Vasserman. + + + Import these changes from texinfo via gnulib: + + 2006-11-08 Karl Berry + + * build-aux/texinfo.tex (\dopdfimage): look for png, jpg/jpeg/JPG, and + as well as pdf images, since they are supported in pdftex with + no further ado. + + 2006-11-05 Karl Berry + + * doc/texinfo.tex (Image Syntax): don't mention GIF any more. + +2006-11-13 Paul Eggert + + * NEWS: Document the AC_ARG_WITH change. + +2006-11-13 Bruno Haible + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): For --with, --without + options, transliterate also dots to underscores. + (_AC_ENABLE_IF): Transliterate also dots to underscores. + * doc/autoconf.texi (External Software): Document that AC_ARG_WITH's + first argument may also contain dots. + +2006-11-09 Paul Eggert + + * tests/mktests.sh (ac_exclude_list): Exclude AC_PROG_CXX_C_O, for + benefit of platforms like Solaris+GCC where it is common to have a + non-working g++ installation. + +2006-11-08 Ralf Wildenhues + and Joel E. Denny + and Paul Eggert + + * tests/autotest.at (AT_CHECK_AT_TITLE): Fix shell quoting bugs + and non-portable sed scripts, and use $CONFIG_SHELL when invoking + ./micro-suite. + +2006-11-08 Paul Eggert + + * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Set + ac_cv_type_long_long_int to 'yes' instead of 'cross-compiling'. + Imported from a similar patch to gnulib by Bruno Haible. + +2006-11-08 Paul Eggert + + * NEWS: New macros AC_C_FLEXIBLE_ARRAY_MEMBER, AC_C_VARARRAYS. + * doc/autoconf.texi (C Compiler): Document them. + * lib/autoconf/c.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER, AC_C_VARARRAYS): + New macros, taken from gnulib. + +2006-11-07 Paul Eggert + + * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in + Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by + Matthew Woehlke. + +2006-10-28 Ralf Wildenhues + + * tests/torture.at (Configuring subdirectories): Do not skip + Automake 1.10 nor future Automake 11.1 (sic). + +2006-10-26 Joel E. Denny + and Stepan Kasal + + Handle special characters in test case titles correctly. + * lib/autotest/general.m4 (AT_INIT): M4-quote and AS_ESCAPE AT_help_all + properly. + (AT_SETUP): M4-quote and AS_ESCAPE the title properly everywhere. + * tests/autotest.at (AT_CHECK_AT_TITLE): Add EXPANDED-TITLE-TO-TEST + argument. Extend to check titles printed by ./micro-suite and + ./micro-suite -l and the title in micro-suite.log. + (Backquote in a test title, + Single-quote in a test title, + Double-quote in a test title): Don't expect failure anymore. + (Backslash in a test title): Put a non-whitespace character after the + backslash so that Bourne shells might actually see it as an escape + sequence. + (Brackets in a test title, + Pound in a test title, + Comma in a test title, + Quoted Macro in a test title, + Macro in a test title, + Macro with single-quote in a test title): New tests. + (Macro with backquote in a test title, + Macro with double-quote in a test title, + Macro with backslash in a test title): New tests expected to fail. + * tests/torture.at (#define header templates): M4-quote this title in + AT_SETUP call so that no M4 code is commented inadvertently somewhere. + The visible effect was a stray [] in the testsuite output. + +2006-10-27 Ralf Wildenhues + + * doc/autoconf.texi (Limitations of Builtins): Do not invoke + `trap ... 0' inside a function, for AIX sh. + +2006-10-26 Paul Eggert + + * tests/base.at (AC_COMPUTE_INT): Test **0** rather than 1 / 0, + since powerpc-apple-darwin8-gcc-4.0.1 (Apple Computer, Inc. build + 5363) simply issues a warning when dividing by zero at compile + time. Problem reported by Elias Pipping. + +2006-10-26 Eric Blake + + * THANKS: Update. + * doc/autoconf.texi (Evaluation Macros): Improve the example to + show effect on macros that expand with commas. + Reported by Joel E. Denny. + + * tests/m4sugar.at (m4_warn, m4_require: circular dependencies): + Also work with M4 1.4.8. + +2006-10-25 Paul Eggert + + * doc/autoconf.texi (Slashes): Document Tru64 4.0 bug reported by + Jim Meyering. + +2006-10-25 Stepan Kasal + + * tests/tools.at (autom4te --force): New test, verifies that + `--force' always rewrites the output file. + +2006-10-24 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): Document that rm + needs operands on NetBSD 2.0.2. Problem reported by Bruno Haible. + +2006-10-24 Stepan Kasal + + * tools/trace.at (autoconf --trace: user macros): Test `$%'. + +2006-10-24 Paul Eggert + + * lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): + If FUNCTION-BODY is nonempty, use AC_LINK_IFELSE rather than + AC_COMPILE_IFELSE, to work around problem with OSF/1 4.0F fseeko + reported by Nelson H. F. Beebe for Coreutils 6.4. + + * tests/tools.at (autoconf --trace: user macros): Remove test + for tracing multiline macros, since m4 1.4.7a uses a different + way to number lines. Problem reported by Ralf Wildenhues. + +2006-10-24 Stepan Kasal + + * bin/autom4te.in (handle_m4): Do not redirect stdin to + /dev/null since the heuristics for interactive behaviour was + fixed in CVS m4. + + * bin/autom4te.in: With --force, always refresh the output + file. Problem reported by Greg Schafer . + + * bin/autoconf.as: Fix the verbose message at the end. + +2006-10-23 Paul Eggert + + * configure.ac (AC_INIT): Bump to 2.60c. + * NEWS: Likewise. + +2006-10-22 Paul Eggert + + * NEWS: Version 2.60b. + + Import this change from Texinfo: + 2006-10-15 Karl Berry + * build-aux/texinfo.tex: automake 1.10 + + * NEWS: Remove AC_CACHE_CHECK_INT. + * doc/autoconf.texi (Caching Results): Likewise. + * lib/autoconf/general.m4 (_AC_CACHE_CHECK_INT): Renamed from + AC_CACHE_CHECK_INT, since it's no longer public. + * lib/autoconf/types.m4: All uses of AC_CACHE_CHECK_INT changed. + * tests/base.at (AC_COMPUTE_INT): Test this, not AC_CACHE_CHECK_INT. + +2006-10-20 Ralf Wildenhues + + * doc/autoconf.texi (Limitations of Usual Tools): Fix two typos. + +2006-10-19 Eric Blake + + * lib/m4sugar/m4sugar.m4 (m4_mkstemp): New macro. + (m4_maketemp): Avoid warnings with M4 1.9a. + * lib/emacs/autoconf-mode.el (autoconf-font-lock-keywords): Color + m4_mkstemp. + * doc/autoconf.texi (Redefined M4 Macros): Document m4_mkstemp. + * NEWS: Likewise. + +2006-10-16 Eric Blake + + * doc/autoconf.texi (Setting Output Variables): Fix typo. + + * bin/autoconf.as (version): Reword to match GNU Coding + Standards. + * bin/autoheader.in (version): Likewise. + * bin/autom4te.in (version): Likewise. + * bin/autoreconf.in (version): Likewise. + * bin/autoscan.in (version): Likewise. + * bin/autoupdate.in (version): Likewise. + * bin/ifnames.in (version): Likewise. + +2006-10-14 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Expand $1 before + looking for special shell characters. + * lib/autoconf/functions.m4 (AC_CHECK_FUNC): Do not expand the + macro defined by AS_VAR_PUSHDEF before passing it as a + parameter. + * lib/autoconf/general.m4 (AC_CHECK_FILE, AC_CHECK_DECL): + * lib/autoconf/libs.m4 (AC_SEARCH_LIBS, AC_CHECK_LIB): + * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW, AC_CHECK_MEMBER): + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): + (_AC_CHECK_HEADER_NEW, _AC_CHECK_HEADER_OLD, _AC_CHECK_HEADER_DIRENT): + Likewise. + * lib/autotest/general.m4 (AT_INIT): Quote parameters of + AS_VAR_* properly. + * tests/m4sh.at (AS_LITERAL_IF): New test. + +2006-10-14 Paul Eggert + + (Imported from Automake.) + * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m, + which incorrectly sets the mode of an existing destination + directory. In some cases the unpatched install-sh could do the + equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD + system. We hope this is rare in practice, but it's clearly worth + fixing. Problem reported by Alex Unleashed in + . + Also, don't bother to check for -m bugs unless we're using -m; + suggested by Stepan Kasal. + +2006-10-14 Paul Eggert + + Import this change from Automake: + + 2006-08-23 Alexandre Duret-Lutz + * lib/Autom4te/ChannelDefs.pm (usage): Mention that -Wportability + is enabled by default with gnu and gnits strictness. + Report from Bruno Haible. + + 2006-03-10 Alexandre Duret-Lutz + * lib/Autom4te/ChannelDefs.pm: Make -Wportability the default in + gnu and gnits modes. + + Import this change from Config: + + 2006-09-20 Ben Elliston + * build-aux/config.sub (score, score-*): New. + + Import this change from Gnulib: + + 2006-09-16 Karl Berry + * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec, + to avoid sectioning errors. + + Import these changes from Texinfo: + + 2006-10-04 Karl Berry + * build-aux/texinfo.tex (\singlequotechar): rename to \codequoteright. + (\quoteexpand): rename to \rquoteexpand. + (\codequoteleft): new def, to look for @set codequotebacktick. + (\lquoteexpand, \quoteexpand): new defs. + (\lquoteChar, \rquoteChar, \dashChar, \underChar: new \chardef's. + (\code): must use new \...Char values, since now ` is active. + + 2006-08-26 Karl Berry + * build-aux/texinfo.tex (\textdegree): New command. + + 2006-08-12 Karl Berry + * build-aux/texinfo.tex (error \box0): smaller font. + +2006-10-14 Ralf Wildenhues + + * doc/autoconf.texi (Autoheader Macros): Fix syntax error. + +2006-10-13 Stepan Kasal + + * doc/autoconf.texi (Autoheader Macros): Warn that the text + added to the template can get mangled. + +2006-10-13 Ralf Wildenhues + + * lib/autoconf/functions.m4 (AC_FUNC_OBSTACK): In the test, + include the default headers, and redefine obstack_chunk_alloc + and obstack_chunk_free. Fixes false failure with glibc. + +2006-10-12 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Set as_executable_p, + for backward compatibility with Libtool 1.5.22. Problem reported + by Ralf Wildenhues. + +2006-10-12 Ralf Wildenhues + + * lib/autoconf/c.m4 (AC_PROG_GCC_TRADITIONAL): Require + AC_PROG_CC. + Report by IOhannes m zmoelnig . + +2006-10-11 Paul Eggert + + * NEWS: AC_USE_SYSTEM_EXTENSIONS now defines _TANDEM_SOURCE for + the NonStop platform. + * doc/autoconf.texi (Posix Variants): Likewise. + * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Likewise. + + * lib/m4sugar/m4sh.m4 (AS_TEST_X): New macro. + (AS_EXECUTABLE_P): Use as_test_x rather than as_executable_p. + (_AS_TEST_PREPARE): Set as_test_x rather than as_executable_p. + Use a better substitute, by inspecting the output of "ls" + rather than just using ":". + * lib/autoconf/general.m4 (_AC_LINK_IFELSE): Use AS_TEST_X + rather than AS_EXECUTABLE_P, since we needn't worry about + non-regular files here. + + * NEWS: Autoconf-generated shell scripts no longer export BIN_SH, + due to configuration hassles with this. See Tonya Underwood's report + . + * doc/autoconf.texi (Special Shell Variables): Likewise. + +2006-10-11 Paul Eggert + Stepan Kasal + + * lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Don't set BIN_SH. + (_AS_DETECT_BETTER_SHELL): Don't look in /usr/bin/posix. + +2006-10-11 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Move the + initialization which is not inherited through the environment + (_AS_BOURNE_COMPATIBLE): ... to this new macro. + (_AS_RUN): Call _AS_BOURNE_COMPATIBLE, not AS_BOURNE_COMPATIBLE. + +2006-10-09 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): Describe + problems with mkdir -p -m. + +2006-10-06 Paul Eggert + + * lib/autoconf/c.m4 (_AC_PROG_PREPROC_WORKS_IFELSE): Remove + comment about ac_cpp_err; it was incorrect, and anyway + ac_cpp_err is being removed below. + * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE): Don't + set ac_cpp_err to 'yesyes' if preproc_warn_flag and werror_flag + are both 'yes'. In fact, don't bother setting ac_cpp_err at all; + nobody uses it. + (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Don't log our funky tests + with werror_flag and conftest.err and so forth. This is more + compatible with how _AC_PROG_PREPROC_WORKS_IFELSE behaves, + and anyway the user shouldn't normally want to see this gorp logged. + Problem reported by Ralf Wildenhues. + * lib/autoconf/lang.m4 (AC_LANG_WERROR): werror_flag's default is + empty, not 'no', since the rest of the code uses 'test -z'. + +2006-10-04 Paul Eggert + + * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE): + Use a single call to AC_DO_TOKENS rather than multiple, for + efficiency. + (_AC_LINK_IFELSE): Test that resulting file is executable. + Problem reported by mwoehlke in + . + + * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Use "test -x /" rather + than creating a file to use with test -x; this is much faster. + +2006-10-02 Bruno Haible + + * lib/autom4te.in (Automake-preselections): Add + AM_GNU_GETTEXT_INTL_SUBDIR, for automake 1.10. + +2006-09-27 Stepan Kasal + + * doc/autoconf.texi (Writing testsuite.at): Fix a typo: for + standard error, `experr' should be used, not `expout'. + +2006-09-26 Paul Eggert + + * lib/autoconf/functions.m4 (AC_FUNC_FSEEKO): Don't compile the + fseeko testing program twice; just use the earlier result. + * lib/autoconf/specific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): + Set cache var to 'unknown' (not 'no') if leaving the macro unset + still doesn't let the program compile. + (AC_SYS_LARGEFILE): Test for _LARGE_FILES only if earlier tests + failed. + + * lib/autoconf/functions.m4: Fix problems reported by Ralf Wildenhues. + (AC_FUNC_ERROR_AT_LINE): Don't bother to check for error.h. Just + include it, without including anything else. + (AC_FUNC_FSEEKO): Avoid gcc -Wall warnings about constant + expressions. + (AC_FUNC_STRNLEN): Require AC_USE_SYSTEM_EXTENSIONS. + +2006-09-26 Ralf Wildenhues + + * lib/autoconf/functions.m4 (AC_FUNC_ERROR_AT_LINE): Check for + `error.h', and include it, for a `error_at_line' prototype. + Use a nonempty format string in the link test. + * lib/autoconf/functions.m4 (AC_FUNC_WAIT3): Include , + for a declaration of wait3. + +2006-09-26 Paul Eggert + + * NEWS: AC_CHECK_DECL now also works with aggregate objects. + * doc/autoconf.texi (Generic Declarations): Clarify that AC_CHECK_DECL + can apply to constants too, and that it checks for macro defns. + * lib/autoconf/general.m4 (AC_CHECK_DECL): Assume C89 or better, + and simply cast the identifier to void. This handles structure + values. Problem reported by Ralf Wildenhues. + * tests/semantics.at (AC_CHECK_DECLS): Also check enums. + +2006-09-26 Ralf Wildenhues + + * tests/semantics.at (AC_CHECK_DECLS): Also check macros, + structure, and function symbols. + +2006-09-26 Ralf Wildenhues + + * tests/semantics.at (AC_CHECK_MEMBERS): Also test with a struct + member. + +2006-09-25 Paul Eggert + + * NEWS: Recommend M4 1.4.7 instead of 1.4.6. + * README: Likewise. + * doc/autoconf.texi (Introduction, Why GNU M4): Likewise. + +2006-09-25 Paul Eggert + and Ralf Wildenhues + + * lib/autoconf/functions.m4 (AC_FUNC_OBSTACK): Avoid `gcc -Wall' + warnings (uninitialized value). + (AC_FUNC_UTIME_NULL): Likewise, test for and include if + present. + * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Likewise, add + parentheses. + (AC_STRUCT_TM): Likewise, avoid unused variables. + +2006-09-20 Ralf Wildenhues + + * lib/autoconf/c.m4 (_AC_ARG_VAR_LDFLAGS): Update comment. + (_AC_ARG_VAR_LIBS): New macro: let LIBS be precious. + (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Call _AC_ARG_VAR_LIBS. + * lib/autoconf/fortran.m4 (AC_PROG_F77, AC_PROG_FC): Likewise. + Report by Olly Betts. + +2006-09-19 Eric Blake + + * m4/m4.m4: Change copyright. + * configure: Regenerate. + * Makefile.in: Likewise. + * bin/Makefile.in: Likewise. + * doc/Makefile.in: Likewise. + * lib/Makefile.in: Likewise. + * lib/Autom4te/Makefile.in: Likewise. + * lib/autoconf/Makefile.in: Likewise. + * lib/autoscan/Makefile.in: Likewise. + * lib/autotest/Makefile.in: Likewise. + * lib/emacs/Makefile.in: Likewise. + * lib/m4sugar/Makefile.in: Likewise. + * man/Makefile.in: Likewise. + * tests/Makefile.in: Likewise. + + * m4/m4.m4 (AC_PROG_GNU_M4): Check for m4 --debugfile support. + * bin/Makefile.am (edit): Substitute M4_DEBUGFILE. + * bin/autom4te.in (handle_m4): Favor --debugfile over misnamed + --error-output, to avoid warnings with M4 2.0. + +2006-09-19 Stepan Kasal + + * lib/autoconf/libs.m4 (AH_CHECK_LIB): Fix quoting, to be + consistent with _AH_CHECK_FUNCS and _AH_CHECK_HEADERS. + * lib/autoconf/headers.m4 (AH_CHECK_HEADERS_DIRENT): Likewise. + +2006-09-15 Stepan Kasal + + * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Eliminate the + expansion of AC_CHECK_FUNCS. + +2006-09-14 Stepan Kasal + + * lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR): Remove a + mistaken comment: the path has to be relative; do not use + the path at runtime. + +2006-09-13 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Quote the + argument to `--prefix' for sub-configure scripts. + Pass `--silent' to sub-configure scripts. + * tests/torture.at (Configuring subdirectories): Add tests + for both changes. + * doc/autoconf.texi (Setting Output Variables): Fix example to + not show `--silent' being passed to a `configure' re-run. + +2006-09-12 Paul Eggert + + * doc/autoconf.texi (Input): Clarify role of AC_CONFIG_MACRO_DIR. + * lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR): Do not check + for the existence of the directory at configure-time. That's + too late, anyway. Problem reported by Stefan Seefeld. + + * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Avoid bug in UnixWare + 7.1.4 /usr/bin/posix/sh described by Tim Rice in + . + +2006-09-11 Stepan Kasal + + * tests/local.at (AT_CHECK_M4): Fix this so that the testsuite + works with GNU M4 1.4.3 again; make the normalized form + match the current m4 message; fix the description. + * test/tools.at (autom4te cache): Adapt to the change. + +2006-09-08 Paul Eggert + + * lib/autoconf/functions.m4 (AC_FUNC_MKTIME): Add year_2050_test + to catch glibc bug 2821 + . + + Merge from gnulib as follows: Use AC_CHECK_HEADERS_ONCE instead of + AC_CHECK_HEADERS, and likewise for AC_CHECK_FUNCS_ONCE and + AC_CHECK_FUNCS. Don't check for stdlib.h, since we now + assume C89. + +2006-09-08 Stepan Kasal + + * lib/autom4te.in (Autoconf-without-aclocal-m4): Move the + preselections ... + (Autoconf): ... here. + (Autoscan-preselections): Delete. + +2006-09-07 Stepan Kasal + + * lib/autom4te.in (Automake-preselections): Preselect + AM_ENABLE_MULTILIB. + +2006-09-05 Paul Eggert + + * doc/autoconf.texi (Preset Output Variables): srcdir and + top_srcdir are not necessarily relative. Problem reported + by Dries Kimpe. + +2006-09-05 Ralf Wildenhues + + * lib/autoconf/fortran.m4 (_AC_PROG_FC): Prefer xlf90/xlf95 over + f90/f95 because the latter drivers of AIX Fortran 9.1 do not + accept files with extension `.f'. For consistency, also prefer + xlf over f77. + * doc/autoconf.texi (Fortran Compiler): Remove mention of bug + from last patch. + +2006-09-05 Romain Lenglet + + * lib/autoconf/erlang.m4 (AC_ERLANG_CHECK_LIB): Added substitution + of ERLANG_LIB_VER_* variables. + * doc/autoconf.texi (Erlang Libraries): Document ERLANG_LIB_VER_* + variables. + +2006-09-03 Paul Eggert + and Ralf Wildenhues + + * doc/autoconf.texi (Limitations of Builtins): Document 'unset' + bugs of Bash 2.01 and 2.05a. + (Fortran Compiler): Document that AC_PROG_CC should be called + before AC_PROG_FC, due to a bug in Autoconf. + +2006-09-01 Paul Eggert + + * NEWS: New macro AC_CACHE_CHECK_INT. It replaces the + old AC_COMPUTE_INT, which now behaves like _AC_COMPUTE_INT + except the first two arguments are reversed. + * doc/autoconf.texi (Caching Results): New macro AC_CACHE_CHECK_INT. + (Generic Compiler Characteristics): AC_COMPUTE_INT no longer + caches nor outputs a diagnostic. Suggested by Bruno Haible. + * lib/autoconf/general.m4 (AC_CACHE_CHECK_INT): New macro, + equivalent to the old AC_COMPUTE_INT. + (AC_COMPUTE_INT): No longer caches or reports. New signature. + All uses changed to AC_CACHE_CHECK_INT. + * tests/base.at (AC_CACHE_CHECK_INT): New test. + * tests/mktests.sh (ac_exclude_list): Add AC_CACHE_CHECK_INT. + +2006-08-31 Paul Eggert + + * NEWS: AC_FUNC_FNMATCH, AC_FUNC_FNMATCH_GNU, AC_FUNC_GETLOADVG, + and AC_REPLACE_FNMATCH are now obsolescent in Autoconf. New + programs should use their Gnulib counterparts. + * doc/autoconf.texi (Particular Functions): Likewise. + (Macro Names, testsuite Invocation): Replace uses of these + obsolete macros with uses of non-obsolete macros. + +2006-08-29 Eric Blake + + * configure.ac (AC_INIT): Bump to 2.60b. + * NEWS: Update. + +2006-08-28 Eric Blake + + * lib/autoconf/headers.m4 (AC_HEADER_STAT): Fix logic that was + mistakenly swapped on 2006-08-15. + +2006-08-25 Paul Eggert + + * NEWS: Version 2.60a. + +2006-08-25 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_LINK_IFELSE): Remove the IPA/IPO + file created by the PGI compiler. + +2006-08-25 Noah Misch + + * lib/Autom4te/General.pm (END): Use `File::Path::rmtree' to + simplify the code. + +2006-08-25 Paul Eggert + + Fix Lex library problem reported to us by Julio Garvia. + * doc/autoconf.texi (Particular Programs): YYTEXT_POINTER is + for the default, which the user can override. + * lib/autoconf/programs.m4 (AC_PROG_LEX): Let _AC_PROG_LEX_YYTEXT_DECL + deal with LEXLIB. + (_AC_PROG_LEX_YYTEXT_DECL): Handle caching correctly; the old code + didn't work if some values were cached but not others. Test for + broken lex libraries like native ia64-hp-hpux11.22; see + , and + work around the problem by preferring an empty LEXLIB to -lfl or + -ll. Let the user set LEXLIB='' to indicate no library needed. + + * NEWS: Recommend M4 1.4.6 instead of 1.4.5. + * README: Likewise. + * doc/autoconf.texi (Introduction, Why GNU M4): Likewise. + +2006-08-24 Paul Eggert + + Rework to use more-modern build style. + Many files are renamed; all uses of their names were changed. + * .x-sc_trailing_blank: Renamed from .x-sc_trailing_space. + * .x-sc_useless_cpp_parens: New file. + * build-aux/config.guess: Renamed from config/config.guess. Update. + * build-aux/config.sub: Renamed from config/config.sub. Update. + * build-aux/elisp-comp: Renamed from config/elisp-comp. + * build-aux/install-sh: Renamed from config/install-sh. Update. + * build-aux/mdate-sh: Renamed from config/mdate-sh. + * build-aux/missing: Renamed from config/missing. + * build-aux/texinfo.tex: Renamed from config/texinfo.tex. Update. + * build-aux/vc-list-files: Renamed from config/vc-list-files. + * config/Makefile.am: Removed. + * config/mkinstalldirs: Removed. + * config/move-if-change: Removed. + * m4/m4.m4: Renamed from config/m4.m4. Add (C) to copyright notice. + * Makefile.am (SUBDIRS): Remove config. + (ACLOCAL_AMFLAGS): Include from m4, not config. + (EXTRA_DIST): Add config/announce-gen, config/prev-version.txt. + (WGET, WGETFLAGS): New macros, since Makefile.maint no longer does this. + (autom4te-update): Rewrite with a loop. Get from gnulib, not automake. + Fail if there's an error. + * Makefile.cfg (move_if_change): Remove. + (wget_files): Remove. + (cvs_executable_files): New macro. + (cvs_files): Use it. Remove mkinstalldirs. Add fdl.texi. + (executable-update): Use $(cvs_executable_files). + (local-checks-to-skip): Remove. + * Makefile.maint: Merge from coreutils, plus add our own changes + (gzip_rsyncable): New macro. + (GZIP_ENV): Use it. + (CVS_LIST): Use build-aux/vc-list-files. + (VERSION_REGEXP): New macro. + (local-checks-available): Add patch-check, $(syntax-check-rules), + check-AUTHORS. + (syntax-check-rules): Compute dynamically. + (sc_cast_of_x_alloc_return_value): Work even if no source files. + (sc_cast_of_alloca_return_value): Likewise. + (sc_prohibit_atoi_atof): Simplify regexp. + (sc_no_if_have_config_h, sc_require_config_h): + (sc_prohibit_assert_without_use, + (sc_obsolete_symbols): Check for O_NDELAY. + (sc_texi_notab): Remove. + (sc-changelog): Don't make an exception for '----' lines. + (.re-list): Remove, so we don't have a junk file behind. + (sc_system_h_headers): Remove the need for .re-list. + (sc_the_the): New rule. + (sc_tight_scope): Simplify. + (sc_trailing_blank): Renamed from sc_trailing_space. + (longopt_re): New macro. + (sc_two_space_separator_in_usage): New rule. + (sc_unmarked_diagnostics): Look at all files under CVS. + (sc_useless_cpp_parens, patch-check, check-AUTHORS): New rules. + (news-date-check, changelog-check): Version is OK. + (po-check): Look for lib files even if not in CVS. + (copyright-check): Use $() not ``. + (maintainer-distcheck): Do not depend on changelog-check. + (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz). + Also check for -Wpointer-arith. + (WGET, WGETFLAGS, tgz-md5, tgz-sha1, bz2-md5, bz2-sha1): + (xdelta-md5, xdelta-sha1, tgz-size, bz2-size, xd-size, rel-check): + Remove. + (announcement): Add --gpg-key-id arg. + (cvs-sv): Remove. + (move_if_change): Just use mv. + (local_updates: Remove wget-update, po-update. + (po_repo, do-po-update, po-update, wget_files, get-targets): Remove. + (config.guess-url_prefix, config.sub-url_prefix): Remove. + (ansi2knr.c-url_prefix, texinfo.tex-url_prefix): + (standards.texi-url_prefix, make-stds.texi-url_prefix, target, url): + ($(get-targets)): Remove. + (cvs_files): Remove missing, mkinstalldirs, ansi2knr.c. + (gnulib_repo): Renamed from automake_repo. Get from gnulib now. + (cvs-update): Get from gnulib. + (emut_upload_commands): gnupload is in build-aux now. + (alpha beta major): Add changelog-check. Check version. + * configure.ac (AC_CONFIG_AUX_DIR): Renamed from config to build-aux. + (AC_CONFIG_FILES): Remove. + * bin/autoconf.as: Add spaces to avoid distcheck warning. + * config/announce-gen: Sync from coreutils. + * doc/make-stds.texi: Sync from gnulib. + * doc/standards.texi: Likewise. + * man/Makefile.am: Adjust for config -> build-aux renaming. + * tests/Makefile.am: Prefer $(FOO) to @FOO@. + * tests/local.at: Adjust from config -> build-aux renaming. + * tests/tools.at: Likewise. + * tests/torture.at: Likewise. + + * NEWS: The C99 check now tests for vararg macros and 64-bit + preprocessor ints. + * doc/autoconf.texi (C Compiler): Document // comments, va_copy. + * lib/autoconf/c.m4 (_AC_PROG_CC_C99): Test varargs macros and + 64-bit preprocessor ints. Check for static initialization of + long long. Remove unnecessary casts. + +2006-08-24 Ralf Wildenhues + + * doc/autoconf.texi (Particular Programs): Mention that + @INSTALL@ and @MKDIR_P@ may vary for different output files. + Reported by Alexandre Duret-Lutz. + +2006-08-24 Paul Eggert + + * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Also ignore + -lgcc?* and -lSystem, for Darwin/MacOS X. Problem reported by + Bill Northcott in + . + +2006-08-22 Paul Eggert + + * lib/autoconf/c.m4 (AC_C_CONST): Don't used shadowed vars, to + pacify insanely picky compilers. Problem reported by Eric Blake. + + * doc/autoconf.texi (Posix Variants): INTERACTIVE Unix is no + longer supported by Sun. + +2006-08-15 Paul Eggert + + * NEWS: Autoconf now uses constructs like "#ifdef HAVE_STDLIB_H" + rather than "#if HAVE_STDLIB_H", so that it now works with "gcc + -Wundef -Werror". Problem reported by David Fang in + . + * doc/autoconf.texi (Header Templates, Default Includes): + (Particular Functions, Generic Functions, Header Portability): + (Particular Headers, Generic Headers, Generic Declarations, Guidelines): + (Obsolete Macros, AC_FOO_IFELSE vs AC_TRY_FOO): + (Present But Cannot Be Compiled, Preprocessor Symbol Index): + Prefer #ifdef to #if. + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Prefer #ifdef to #if. + * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA, _AC_FUNC_MALLOC_IF): + (AC_FUNC_MKTIME, AC_FUNC_MMAP, _AC_FUNC_REALLOC_IF): + (AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETVBUF_REVERSED, _AC_FUNC_VFORK): + Likewise. + * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): + (AC_HEADER_RESOLV, AC_HEADER_STAT): Likewise. + * lib/autoconf/specific.m4 (AC_DECL_SYS_SYGLIST): + (AC_SYS_RESTARTABLE_SYSCALLS): Likewise. + * lib/autoconf/headers.m4 (AC_HEADER_STAT): Don't assume that + S_ISDIR etc. are valid for use in #if; POSIX doesn't guarantee + this. + +2006-08-14 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): Document sed + problems with arg script text that doesn't end in newline, and + with '-e a...'. Problems reported by Ralf Wildenhues. + +2006-08-12 Alexandre Julliard (tiny change) + + * lib/autoconf/libs.m4 (AC_PATH_X_DIRECT): Replace another + check for libXt by a check for libX11. + +2006-08-10 Ralf Wildenhues + + * doc/autoconf.texi (config.status Invocation): Adjust according + to last change. + +2006-08-08 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): `config.status + --help' should mention that `--version' outputs configuration + settings. Report by Bruno Haible. + +2006-08-06 Paul Eggert + + Fix test suite failures reported by Pierre in + . + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Don't claim + the compiler created a file "b.out" when it didn't create anything + at all. + * lib/autoconf/specific.m4 (AC_SYS_INTERPRETER): + Discard stderr too, when invoking the test script. + +2006-08-05 Alexandre Julliard (tiny change) + + * lib/autoconf/libs.m4 (AC_PATH_XTRA): Fixed a typo + in the restoring of the werror flag. + +2006-07-24 Paul Eggert + + * doc/autoconf.texi (Volatile Objects): Be even a little + less skeptical about "volatile", after discussion with + Bruno Haible on bug-gnulib. + (Limitations of Usual Tools): Warn about sed stripping + leading white space from text. From Bruno Haible. + +2006-07-20 Paul Eggert + + * lib/autoconf/libs.m4 (AC_PATH_XTRA): Don't use -R if the + compiler complains about it, even if things works after the + complaint. Problem reported by Peter O'Gorman. + + * doc/autoconf.texi (Preset Output Variables): Document CFLAGS, + CPPFLAGS, and LDFLAGS better. Problem reported by Bruno Haible. + Similarly for CXXFLAGS, OBJCFLAGS, ERLCFLAGS. + +2006-07-17 Paul Eggert + + * lib/autoconf/libs.m4 (AC_PATH_XTRA): Do the check for space + after -R regardless of host. Patrick Welche reports that this + fixes things on NetBSD 3.99. + + * NEWS: Recommend M4 1.4.5. + * README: Likewise. + * doc/autoconf.texi (Introduction, Why GNU M4): Likewise. + * tests/tools.at (autom4te cache): Update wording of diagnostic + to match M4 1.4.5. + +2006-07-07 Paul Eggert + + * doc/autoconf.texi (C Compiler): Add a ref to Volatile Objects + under AC_C_VOLATILE. + (Volatile Objects): Be a little less skeptical about what + "volatile" means. Derived from thoughts by Ben Pfaff in + . + +2006-07-07 Ralf Wildenhues + + * doc/autoconf.texi: Fix some typos. + +2006-07-07 Paul Eggert + + * tests/torture.at (Configuring subdirectories): Set CONFIG_SITE + more globally, since the 2006-06-30 patch didn't suffice. Problem + reported by Keith Marshall. Also, don't bother with builddir2, + since it shouldn't be needed any more. + +2006-07-07 Paolo Bonzini + + * doc/autoconf.texi (Generic compiler characteristics): + Document AC_COMPUTE_INT. Fix wrong statements on Default + Includes for AC_CHECK_SIZEOF and AC_CHECK_ALIGNOF. + + * lib/autoconf/general.m4 (AC_COMPUTE_INT): New. + (_AC_COMPUTE_INT): Add obsoletion warnings. + * lib/autoconf/types.m4 (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF): Use + AC_COMPUTE_INT. + + * NEWS: Document change. + +2006-07-05 Paul Eggert + + * doc/autoconf.texi (Volatile Objects): New section. + + * NEWS: Document previous change. + +2006-07-02 Paul Eggert + + * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): + Require that long long int be at least 64 bits wide. C99 requires + this and enough programs depend on it so we should check for it. + Bruno Haible reports in + + that long long int is 32 bits wide with some nonstandard compilers. + (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise. + +2006-06-30 Paul Eggert + + * tests/torture.at (Configuring subdirectories): Set CONFIG_SITE + to a nonexistent file, so that we don't have to worry about + a local site configuration that doesn't use /usr/local. + Problem reported by Keith Marshall in + . + +2006-06-28 Paul Eggert + + * doc/autoconf.texi: Be more consistent about using @acronym with + "HP" and "HP-UX". Remove mention of OSF; the old version wasn't + quite right (it talked about "OSF/Tru64", even though the + operating systems were called OSF/1, Digital UNIX, and Tru64 UNIX, + and it even mentioned "OSF 4"!) and at this point there's little + reason to talk about OSF any more, since it died in 1994. + (Specific Compiler Characteristics): Simplify example of + negative-size array. + (File Descriptors): Reorder to make the text flow better. + Remove joke about "appreciate the various levels"; I didn't get it. + Add remark about HP-UX sh -x bug with stderr noted by Bob Proulx in + . + (File Descriptors, Limitations of Usual Tools): + Tone down the advice against renaming or removing open files. + (Limitations of Usual Tools): Add a new section, on 'rm'. + +2006-06-26 Stepan Kasal + + * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Use -lX11, not + -lXt in LIBS, idea from Karsten Hopp; this was due since + this change: + + 2005-09-18 Paul Eggert + * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Look for X11/Xlib.h + and XrmInitialize rather than X11/Intrinsic.h and XtMalloc + (which belong to Xt, not X itself). See Debian bug 327655. + +2006-06-23 Ralf Wildenhues + + * configure.ac (AC_INIT): Bump to 2.60a. + * NEWS: Update. + +2006-06-23 Ralf Wildenhues + + Version 2.60. + + * configure.ac, NEWS: Update. + +2006-06-23 Ralf Wildenhues + + * config/texinfo.tex: Sync from upstream. + + * bin/autom4te.in (handle_traces): Transform the `@S|@' + quadrigraph correctly in traces. + + * NEWS, lib/Autom4te/C4che.pm, lib/autoconf/functions.m4: + Fix typos. + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Expand tests for + datarootdir-related errors only if AC_DATAROOTDIR_CHECKED is + not defined. + * doc/autoconf.texi (Changed Directory Variables): New node, + to document the whole `datarootdir' business a bit better. + * NEWS: Update. + * tests/torture.at (datarootdir workaround): Extend test. + Prompted by report by Alexandre Julliard. + +2006-06-22 Paul Eggert + + * lib/autoconf/c.m4 (_AC_PROG_CC_C89): Check for C89 incompatibility + when using default mode of IBM C 6 for AIX. Problem and two-line + fix reported by Larry Jones. + +2006-06-22 Alexandre Julliard + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Avoid warning + about literal '${datarootdir}' if a definition is found in the + output file. + +2006-06-20 Paul Eggert + + * NEWS: Use "M4" rather than "m4" when appropriate. + Problem reported by Eric Blake. + * doc/autoconf.texi: Likewise. + Use @acronym around BSD, GCC, and GNU when appropriate. + (Why GNU M4): Renamed from "Why GNU m4". + (Redefined M4 Macros): Mention that Posix + m4wrap takes only 1 argument, but GNU M4 1.4.x takes more. + (Buffer Overruns): Mention size_t and ptrdiff_t as alternatives + to int. + +2006-06-20 Ralf Wildenhues + + * bin/autom4te.in (handle_output): Do not forbid the empty + pattern. + * tests/tools.at (autoconf: the empty token): New test. + +2006-06-20 Stepan Kasal + + * lib/m4sugar/m4sugar.m4 (m4_init): Merge the two m4_wrap + calls, so that we do not care whether they are LIFO or FIFO; + in the m4_wrap, do not check which diversion is the topmost + one, just check that the stack is balanced at the end. + * lib/m4sugar/m4sh.m4 (AS_INIT): We are going to change the + base diversion forever--pop the previous diversion before + opening the new one; consequently, remove the m4_wrap call. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * tests/m4sugar.at: Do not use + m4_wrap([m4_diversion_pop([..])]), for educational purposes. + +2006-06-19 Paul Eggert + and Ralf Wildenhues + + * NEWS: Document that m4wrap/m4_wrap might not be LIFO. + * doc/autoconf.texi (Redefined M4 Macros): Likewise. + Rework example of m4wrap token-pasting trouble so that it doesn't + care whether it's LIFO or FIFO. + Fix some "contrary to"s that are awkward in English. + +2006-06-19 Ralf Wildenhues + + * lib/autoconf/types.m4 (_AC_TYPE_INT): Set `$ac_cv_c_int$1_t' + to `yes' instead of `int$1_t' if the type is found, for more + consistent configure output (where $1 is the number of bits). + (_AC_TYPE_UINT): Likewise for `uint$1_t'. + Suggested by Bruno Haible. + + * lib/autoconf/types.m4 (_AC_TYPE_UNSIGNED_INT): Solaris 2.5.1 + needs _UINT8_T and _UINT64_T defines as well, to avoid clashes + with system headers. Report by Bruno Haible. + +2006-06-17 Ralf Wildenhues + + * config/config.guess, config/config.sub: Sync from upstream. + + * bin/Makefile.am (autoconf.in): Use `--melt' for autom4te, + in order to avoid picking up an older installed frozen m4sh.m4f. + Besides an outdated shell startup, this could have been created + by an earlier M4 version with incompatible frozen file format. + +2006-06-16 Paul Eggert + + * README: Recommend m4 1.4.4 instead of 1.4.3.. + * doc/autoconf.texi: Likewise. + (Special Chars in Names): Say that $(.FOO) is portable, as + suggested by Stepan Kasal. + (Installation Directory Variables, Build Directories): + (Automatic Remaking, Subdirectories, Fortran Compiler): + (Making testsuite Scripts, Defining Directories): + Quote variable usages better. + (Making testsuite Scripts): Add clean-local rule to makefile + snippet, by Eric Blake. + (Installation Directory Variables): Fix table item font. + Reword slightly to clarify. Generalize advice about + not using special characters to include all file-related + vars, not just VPATH. + (Special Chars in Variables): Warn about special characters in + $(srcdir) too. + (Assignments): Clarify default-value example as suggested by + Ralf Wildenhues in + . + (Special Shell Variables): Note leading ./ or ../, as suggested + by Eric Blake. + (Limitations of Builtins): Under cd, warn about CDPATH. + (The Make Macro MAKEFLAGS): Untabify. Problem reported by + Ralf Wildenhues. + +2006-06-15 Ralf Wildenhues + + * doc/autoconf.texi (Configuration Actions): Remove duplicate + `@var', for texi2html. + (Systemology): Some more word wrapping, for DVI output. + (autom4te Invocation): The short option for `--melt' is `-M', + not `-m'. + +2006-06-15 Paul Eggert + + * doc/autoconf.texi: More formatting and English tweaks, + many suggested by Ralf Wildenhues. + Reword to avoid "@code{...}'s" and the like, since it's ugly + with Emacs info mode. discontents -> woes. + Put a few "will"s back. time stamp -> timestamp. + side-effect -> side effect. + +2006-06-14 Paul Eggert + + * doc/autoconf.texi (Initializing configure, Shell Substitutions): + Warn about $@ not persisting. Problem reported by Julien Danjou in + . + (Special Chars in Names): Renamed from Leading _ in Macro Names. + Mention other special chars, too. + +2006-06-14 Eric Blake + + * doc/autoconf.texi (The Make Macro MAKEFLAGS): New node. + +2006-06-13 Paul Eggert + + * doc/autoconf.texi: Some systematic minor improvements, as + follows. Use "makefile" when talking about makefiles + generally (which might be named "makefile" or "Makefile" or even + "foo.mk"), "Makefile" when talking about a specific makefile + called "Makefile". This unclutters the text from weird quotes + (e.g., "`Makefile's" in info mode). Similarly, use "@var{foo} + values" rather than "@var{foo}s" and similar constructs containing + "}s". Use "Make rules" rather than "Makefile rules". Minor + English-language improvements. Change the prefix "sub-" to "sub" + and "re-" to "re". + Put blank lines around examples more consistently. + Avoid "rather" and "very" as intensifiers. + Avoid "will" as an auxiliary. + (Limitations of Make): Split this node into.... + (Portable Make, $< in Ordinary Make Rules, Failure in Make Rules): + (Leading _ in Macro Names, Backslash-Newline-Newline): + (Backslash-Newline Comments, Long Lines in Makefiles): + (Macros and Submakes, The Make Macro SHELL, Comments in Make Rules): + (obj/ and Make, make -k Status, VPATH and Make): + (VPATH and Double-colon, $< in Explicit Rules): + (Automatic Rule Rewriting, OSF/Tru64 Directory Magic): + (Make Target Lookup, Single Suffix Rules, Timestamps and Make): + New nodes, resulting from splitup of Limitations of Make. + All cross-references changed. Raise the top node from + a section to a chapter, and all subnodes accordingly. + Redo the introductory wording to match the new organization. + (Installation Directory Variables): Use an example that is + closer to what Autoconf actually does. Mention that VPATH's + value should not contain metacharacters or white space. + (Fortran Compiler): Fix a VPATH bug in an example. + (Leading _ in Macro Names): Mention that this problem is no longer + of practical concern. + (VPATH and Make): Reword the advice to make it clearer + that Autoconf and Automake support VPATH in non-GNU make, but + many packages have bugs in this area. + ($< in Explicit Rules): Refer to Build Directories rather + than using a (non-VPATH-safe) example. + (Automatic Rule Rewriting): Mention the sort of disaster that + can ensue with Solaris-style rule rewriting with VPATH. + +2006-06-13 Ralf Wildenhues + + * doc/install.texi (Compilers and Options): Weaken the + suggestion to use GNU make for VPATH builds. + + * lib/autom4te.in (Automake-preselections): Add AM_PROG_CXX_C_O, + AM_PROG_F77_C_O, AM_PROG_FC_C_O, AC_FC_SRCEXT, AC_FC_FREEFORM. + + * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Fix M4 quotation + in regular expression. + +2006-06-08 Ralf Wildenhues + + * doc/autoconf.texi (Installation Directory Variables): + Drop extra @samp from `@table @samp' item. + (Limitations of Usual Tools): Comment fix. + Do not nest @samp just to point to other table items. + (Writing testsuite.at) : The second argument to + `@dvar' is already @samp'ed. + (Making testsuite Scripts) : Likewise, + do not use @var in the second argument. + +2006-06-07 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Look for + $as_shell.exe too. Problem reported by Andreas Buening in + . + +2006-06-07 Ralf Wildenhues + + * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA): Work around + `unused variable' compiler warning, for `-Wall -Werror'. + Reported by Jaap Haitsma in + . + +2006-06-06 Paul Eggert + + * lib/autoconf/c.m4 (AC_PROG_CC_C_O): Remove core file, in + case the compiler dumps core. Problem reported for + OpenServer 5.0.7 by Tim Rice in + . + * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE): + Likewise. + +2006-06-06 Tim Rice . + + * lib/freeze.mk: Quiet check-forbidden-patterns so the string + "ERROR" only shows up in "make check" output if there is an + error. + +2006-06-06 Eric Blake + + * tests/tools.at (automatically allowed tokens): Fix typo. + +2006-06-05 Paul Eggert + + * NEWS: Don't blame non-GNU VPATH compatibility issues on Automake. + + * doc/autoconf.texi (Integer Overflow): Mention that INT_MIN % -1 + typically overflows on x86 CPUs, even though the C standard + requires otherwise. + +2006-06-05 Ralf Wildenhues + + * configure.ac (AC_INIT): Bump to 2.59e. + * NEWS: Update. + +2006-06-05 Ralf Wildenhues + + Version 2.59d. + + * config/texinfo.tex: Sync from upstream. + + * bin/autoreconf.in: Trace `LT_CONFIG_LTDL_DIR'; if it has been + seen, invoke libtoolize with `--ltdl' argument. + * lib/autom4te.in (Autoreconf-preselections): Adjust. + * NEWS: Update. + Suggested by Eric Blake. + +2006-06-05 Paul Eggert + + * NEWS: Whoops! AC_FUNC_STRNLEN isn't obsolescent. Problem + reported by Ralf Wildenhues. + * doc/autoconf.texi (AC_FUNC_STRNLEN): Likewise. + +2006-06-05 Ralf Wildenhues + + * THANKS: Update. + +2006-06-05 Paul Eggert + + * doc/autoconf.texi: Modernize some of the references to Solaris. + +2006-06-05 Stepan Kasal + + * lib/m4sugar/m4sugar.m4 (m4_require): Modify the error + message issued by AC_REQUIRE. + * tests/m4sugar.at: Check m4_require's error message. + * tests/base.at: Check AC_REQUIRE's error message. + * tests/local.at (AT_CHECK_M4): New macro, almost identical + to... + (AT_CHECK_AUTOM4TE): ... which is now a thin wrapper around + AT_CHECK_M4. + (AT_CHECK_AUTOCONF): Use AT_CHECK_M4; no longer support + `expout' as the last parameter. + * tests/tools.at: Adapt to the above change. + +2006-06-04 Stepan Kasal + + * doc/autoconf.texi (Limitations of Usual Tools): Correct + information about race-free implementations of mkdir. + +2006-06-04 Eric Blake + + * bin/autoreconf.in (help): Document M4 environment variable. + * bin/autoconf.as (Usage): Likewise. + * bin/autom4te.in (help): Likewise. + * doc/autoconf.texi (autom4te Invocation): Likewise. + +2006-06-04 Paul Eggert + + * NEWS: GNU make now recommended for VPATH builds. + Mention that some macros are now documented to be obsolescent. + * doc/autoconf.texi: + Prefer "current" to "modern" to describe + currently-used (albeit perhaps old-fashioned) hosts. + Mention which ancient features no longer need to be worried about. + setgid -> set-group-ID + setuid -> set-user-ID (these are the Posix terms) + Fix some misuses of "only". + (AC_C_BACKSLASH_A, AC_C_CONST, AC_C_PROTOTYPES): + (AC_C_STRINGIZE, AC_C_VOLATILE, AC_FUNC_CLOSEDIR_VOID): + (AC_FUNC_GETPGRP, AC_FUNC_LSTAT, AC_FUNC_MEMCMP): + (AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP): + (AC_FUNC_SETVBUF_REVERSED, AC_FUNC_STAT, AC_FUNC_STRFTIME): + (AC_FUNC_STRNLEN, AC_FUNC_UTIME_NULL, AC_FUNC_VPRINTF): + (AC_HEADER_DIRENT, AC_HEADER_STAT, AC_HEADER_STDC): + (AC_HEADER_SYS_WAIT, AC_HEADER_TIME, AC_ISC_POSIX): + (AC_PROG_GCC_TRADITIONAL, AC_STRUCT_TM): + Mention that these macros are obsolescent. + (Installation Directory Variables): shall -> should + (File Descriptors): Mention that 0, 1, 2 might get reopened. + Mention that it's now safe to use 3 and 4. + (Limitations of Usual Tools): cp -r is now specified by Posix. + Omit longwinded and obsolescent discussion of cp -f. + Modernize discussion of expr, ls. + (Limitations of Make): Modernize discussion of VPATH builds. + Mention $? as a workaround in some cases. + * doc/install.texi (Basic Installation): + Mention "./configure; make; make install" first. Be more + specific about why this file is generic. Remove unnecessary + parens. Remove misleading "only". Remove obsolete advice + about csh. Don't say "configure" takes awhile; say it + might take a while. Suggest CFLAGS=-g rather than CFLAGS=-O2, + and CC=c99 rather than CC=c89, as these are blessed by current + Posix. Recommend GNU make if doing a VPATH build. + +2006-06-03 Paul Eggert + + * doc/autoconf.texi: Use a consistent style "$ @kbd{...}" for + examples involving shell prompts. + +2006-06-02 Stepan Kasal + and Paul Eggert + + * doc/autoconf.texi (Here-Documents): Add details about the + pre-ksh93g bug. Reword slightly to make it clearer. Consistently + use "here-documents" instead of "here documents". + +2006-06-01 Ralf Wildenhues + + * config/texinfo.tex, doc/standards.texi: Sync from upstream. + +2006-06-01 Paul Eggert + + * doc/autoconf.texi (File System Conventions): Warn about ":" + anywhere in directory names. + +2006-05-31 Paul Eggert + + * lib/autoconf/general.m4 (_AC_DO_ECHO): Be even more conservative + about quoting the case statement, just in case. + * doc/autoconf.texi (Here-Documents): Mention that the ksh bug + was fixed in ksh93g; reported by Ralf Wildenhues. + +2006-05-31 Stepan Kasal + + * doc/autoconf.texi (System Services): Do not document + overriding EXEEXT via ac_cv_exeext=ext. + (Particular Programs) : + Document that ${MKDIR_P} understands --. + * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Improve the + comment. + +2006-05-31 Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (_AS_DIRNAME_PREPARE): Guard against test + argument with leading hyphen. Problem reported by Paul Eggert. + +2006-05-30 Paul Eggert + + * lib/autoconf/general.m4 (_AC_DO_ECHO): Be more conservative + about quoting ac_try: quote all of it, if any of it seems suspicious. + This means we don't have to worry about ${ or sed any more. + Also, double-quote the case statement, to work around misuses via + underquoting as reported by Ralf Wildenhues in + . + (_AC_EVAL_STDERR): Revert, since evidently some packages rely on this + undocumented and dangerous macro. + Problem reported by Ralf Wildenhues in + . + +2006-05-31 Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (_AS_DIRNAME_PREPARE): Check whether + `dirname -- /' returns `/', for SunOS dirname scripts that escaped. + Report by Sam Sirlin . + +2006-05-30 Paul Eggert + + * lib/autoconf/general.m4: Revert AC_TRY_EVAL and AC_TRY_COMMAND, + since evidently some packages rely on the old, broken behavior. + Problem reported by Ralf Wildenhues in + . + (AC_TRY_EVAL, AC_TRY_COMMAND, _AC_EVAL): Go back to the + pre-2006-05-26 definitions, but leave in the comments that + these macros are dangerous and should not be used. + (_AC_DO_ECHO): Renamed from _AC_EVAL_ECHO. All callers changed. + (_AC_DO): Renamed from _AC_EVAL. All callers changed. + (_AC_DO_STDERR): Renamed from _AC_EVAL_STDERR. All callers changed. + (_AC_DO_VAR): Renamed from AC_TRY_EVAL. + (_AC_DO_TOKENS): Renamed from AC_TRY_COMMAND. + +2006-05-29 Paul Eggert + + * lib/autoconf/status.m4 (AC_OUTPUT_MAKE_DEFS): Rewrite to avoid + the use of 'tr', since this is our only use of 'tr'. + +2006-05-29 Ralf Wildenhues + and Paul Eggert + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): + Don't assume 'grep' works on long lines, since AIX grep doesn't. + +2005-05-28 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Do not use `grep' on + the output file in the `${datarootdir}' test. + +2005-05-28 Stepan Kasal + and Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): If we have not seen + mention of `datarootdir' in the input file(s), but literal + `${datarootdir}' in the output file, and we haven't warned yet, + then warn as well: the user may have (erroneously) used + `AC_SUBST([mydatadir], [$datadir/my])' instead of the correct + `AC_SUBST([mydatadir], ['${datadir}/my'])'. + * tests/torture.at (datarootdir workaround): Extend this test. + * NEWS: Update. + +2006-05-27 Ralf Wildenhues + and Paul Eggert + + * doc/autoconf.texi (autoheader Invocation): The first argument to + `AC_DEFINE_UNQUOTED' need not be a literal. Mention the + alternatives and clear up the language a bit. + +2006-05-27 Paul Eggert + + * NEWS: Reword notice for AC_TRY_COMMAND, AC_TRY_EVAL, + ac_config_guess, ac_config_sub, ac_configure. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): + Fix typo that prevented an unnecessary space from being removed. + Problems reported by Ralf Wildenhues in: + http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00143.html + +2006-05-26 Paul Eggert + + * doc/autoconf.texi (Particular Programs, Limitations of Usual Tools): + Use better wording to talk about AC_PROG_MKDIR_P's thread-safety. + Don't use the term "thread-safe" to talk about mkdir race + conditions, since the problem is more a process than a thread + issue. Problem reported by Stepan Kasal in: + http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00088.html + * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Use code that mimics + the test for 'install' more closely. Look at MKDIR_P first. + Look in the PATH, and at /opt/sfw/bin. + Look for a 'gmkdir' program as well (Solaris 10 /opt/sfw/bin/gmkdir). + Don't bother to try mkdir -p, since we already check mkdir --version; + just look at the version number. (There's no easy way to check + for race-free implementations.) + * tests/tools.at (autoconf: subdirectories): Adjust to above + changes, since MKDIR_P now might end in "/mkdir -p". + + * doc/autoconf.texi (autoheader Invocation): Mention that the + first arg of AC_DEFINE_UNQUOTED must be a literal. + Problem reported by Ben Pfaff in + . + + * NEWS: Mention that AC_TRY_COMMAND and AC_TRY_EVAL may be removed. + * doc/autoconf.texi (Special Chars in Variables): New section. + (Preset Output Variables): Warn about special chars in CPPFLAGS. + (Installation Directory Variables): Quote $(datadir) better. + (Limitations of Builtins): Describe some of eval's trickiness. + + * lib/autoconf/c.m4 (AC_PROG_CC_C_O): Simplify quoting. + * lib/autoconf/fortram.m4 (_AC_PROG_FC_V_OUTPUT): Likewise. + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Put leading space + in front of every arg, not just trailing args. Quote apostrophes. + (_AC_EVAL_ECHO): New macro. + (_AC_EVAL, AC_EVAL_STDERR): Use it. Quote arg of eval. + (AC_TRY_EVAL, AC_TRY_COMMAND): Mention that these macros might get + removed. + (_AC_LINK_IFELSE): Use proper rule for shell continuation lines, + exposed by quoting of eval argument. Put the command on line line + so it logs better. + * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Use eval more safely. + (_AC_PATH_X, AC_PATH_X): Quote more safely. + * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Use eval more safely. + * lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Don't use eval. + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Minor style change. + Handle special chars in prefix, ac_srcdir, ac_aux_dir. + Use eval more safely. + (_AC_OUTPUT_CONFIG_STATUS): Adjust to above changes. + * lib/m4sugar/m4sh.m4 (AS_VAR_GET): Note that this API needs + to be replaced. + * tests/base.at (AC_TRY_COMMAND): Use proper rule for shell continuation + lines, exposed by quoting of eval argument. + +2006-05-26 Stepan Kasal + and Ralf Wildenhues + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Drop the + initialization of `ac_cv_exeext', do not override it if it was + already set, unless it was set to `no', for compatibility with + Autoconf-2.13, and comment this. + Do not export `ac_cv_exeext', Libtool hasn't needed this for years. + (_AC_COMPILER_EXEEXT_DEFAULT): Likewise, do not export it. + (_AC_COMPILER_EXEEXT_WORKS, _AC_COMPILER_EXEEXT_CROSS): Typos. + * doc/autoconf.texi (Compilers and Preprocessors) : + Document that this test may be overridden by setting + `ac_cv_exeext'. + +2006-05-26 Ralf Wildenhues + + Revert these two patches: + + 2006-04-06 Eric Blake + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_O): Inside cache + check, s/ac_exeext/ac_cv_exeext/. Fixes regression introduced + 2006-04-01. + + 2006-04-01 Stepan Kasal + Clean up _AC_COMPILER_EXEEXT* macros. + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Don't try to + detect exeext, it will be done by _AC_COMPILER_EXEEXT_O; just set + ac_file to the name of the default output file and call + _AC_COMPILER_EXEEXT_WORKS. Move the definition of ac_files and the + initial `rm' of the candidate files... + (_AC_COMPILER_EXEEXT): ... here and simplify them. Moreover, use + the same list in subsequent `rm' calls, and for the temporary + redefinition of ac_clean_files; call _AC_COMPILER_OBJEXT at the end, + and don't call the other _AC_COMPILER_EXEEXT_* macros directly, use... + (_AC_COMPILER_EXEEXT_TESTS): ... this new macro. + (_AC_COMPILER_EXEEXT_O): Don't export ac_cv_exeext, it's not needed (or + no longer needed) by libtool. Make it a cache check. + (_AC_COMPILER_EXEEXT_CROSS): Remove the comment, it was obviously + copied here by mistake. + (AC_NO_EXECUTABLES): Redefine _AC_COMPILER_EXEEXT_TESTS, not + _AC_COMPILER_EXEEXT. + * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Do not call + _AC_COMPILER_OBJEXT directly. + * lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise. + +2006-05-25 Ralf Wildenhues + + * doc/autoconf.texi (Limitations of Usual Tools) < sed (`t')>: + Fix description of how the buggy `sed' works. + +2006-05-25 Noah Misch + + Sync from Automake: + + * lib/Autom4te/XFile.pm (lock): Allow EOPNOTSUPP, besides + ENOLCK. Only mention `make -j' when applicable. Only raise + fatal errors when `make -j' is involved. Improve error message. + +2006-05-25 Ralf Wildenhues + + * doc/autoconf.texi (Here-Documents): We now know more about + the variable expansion in here documents bug. + Thanks to Tim Rice and Stepan Kasal. + + * doc/autoconf.texi (Making testsuite Scripts): Add an example + how to use TESTSUITEFLAGS. Suggested by Eric Blake. + +2006-05-24 Ralf Wildenhues + + * tests/autotest.at (Multiline command from M4 expansion): + No failure to be expected if the shell quotes newlines in + commands in the `set -x' output. Report by Tim Rice. + * THANKS: Update. + +2006-05-23 Paul Eggert + + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Don't use shell + expansion in the here-documents used by config.status, as that + runs afoul of the Korn shell version M-12/28/93d bug described in + the Autoconf manual, and this in turn causes a Coreutils 5.95 build to + fail as described by Tim Rice and diagnosed by Ralf Wildenhues in + . + +2006-05-23 Jim Meyering + + * lib/autoconf/functions.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): + Fix typo introduced with 2006-04-02 change. It reversed the sense + of the test. + +2006-05-23 Paul Eggert + + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Simplify ac_dA and + ac_dB slightly, to save bytes in the script. + Max out at 50 lines, rather than 96; this is more likely + (though not guaranteed) to avoid obscure 'sed' failures. + +2006-05-23 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_INIT): UnixWare `tr' may interpret + `tr -d -' as bad option argument. Work around this by deleting + an unrelated character. + Report by Tim Rice . + +2006-05-22 Paul Eggert , + Ralf Wildenhues , + Stepan Kasal + + * doc/autoconf.texi (Particular Programs): Do not promise that + we always prefer the GNU version of the program, and that we + search according to PATH; both rules can have exceptions. + Update description of AC_PROG_GREP, AC_PROG_EGREP, AC_PROG_FGREP, + AC_PROG_SED. Move descriptions of limitations + to the Limitations of Usual Tools section. + (Limitations of Usual Tools) : Mention script length + limitations with Solaris /usr/ucb/sed. + : Fix wording for empty alternative. Mention that -c and + -l should not be combined, and that -E and -F should not be + combined. + +2006-05-21 Paul Eggert + and Ralf Wildenhues + + * lib/autoconf/programs.m4 (AC_PROG_SED): Catch script length + limits in Solaris 8 /usr/ucb/sed by testing a long script. + +2006-05-22 Stepan Kasal + + * doc/autoconf.texi (Defining Symbols): Literal parameter of + AC_DEFINE is now passed to m4_pattern_allow. + * NEWS: Mention that; likewise for AC_SUBST. + * lib/autoconf/general.m4 (AC_DEFINE_TRACE_LITERAL): Pass + the parameter to m4_pattern_allow. + * tests/tools.at: Add a check for that. + +2006-05-22 Stepan Kasal + + * lib/autoconf/status.m4: Fix typos. + +2006-05-21 Ralf Wildenhues + + * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Remove + only the files that this macro generates. + +2006-05-21 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools) : For + the HP-UX sed limitation of 99 commands, labels do not count. + * lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): Mention that + in the comment. + (_AC_OUTPUT_HEADER): Revert the change from 2006-05-19. + +2006-05-21 Paul Eggert + + * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): + Import the following fix from coreutils: + + 2006-01-13 Jim Meyering + + Invoke AC_CHECK_FUNCS(getmntent) unconditionally so that tests of + $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need + not double-quote uses of that variable, to accommodate the rare + case in which getmntent is available in none of the libraries + checked. This happens at least on FreeBSD 5.0. + +2006-05-20 Paul Eggert + + * lib/autoconf/general.m4 (AC_CONFIG_AUX_DIRS): Bring back + ac_config_guess, ac_config_sub, and ac_configure, since evidently + some other programs unwisely rely on these undocumented vars. + But put in warning comments about them. + Problem reported by Ralf Wildenhues in + . + * NEWS: Document that these variables are intended to go away. + +2006-05-20 Ralf Wildenhues + + * lib/autoconf/c.m4 (AC_PROG_CXX_C_O): Require AC_PROG_CXX, + and set the language to C++ (analogous to the equivalent Fortran + tests). + + * lib/autoconf/c.m4 (AC_PROG_CXX_C_O): New macro. + * doc/autoconf.texi (C++ Compiler): Document it. + * lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O): Adjust comment. + * NEWS: Update. + +2006-05-19 Paul Eggert + + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Fix off-by-one bug + that caused config.status to generate 100-command sed scripts; the + portable limit is 99. + +2006-05-19 Ralf Wildenhues + + * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): Name temporary + variable `ac_d' instead of `d' to avoid infringing namespace. + Report by Ralf Menzel. + +2006-05-18 Paul Eggert + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Don't prepend + $ac_top_build_prefix to $MKDIR_P if it's just 'mkdir -p'. + * tests/tools.at (autoconf: subdirectories): New test, taken from + the corresponding problem report by Ralf Wildenhues in: + http://lists.gnu.org/archive/html/autoconf-patches/2006-05/msg00053.html + + * lib/autoconf/functions.m4 (AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU): + Quote some uses of shell variables if they might suffer unexpected + globbing. This doesn't fix all instances of quoting problems that + I found, just the easy ones that look safe. + * lib/autoconf/general.m4 (_AC_INIT_SRCDIR, _AC_INIT_HELP): + (AC_CONFIG_AUX_DIR, AC_CONFIG_AUX_DIR_DEFAULT, AC_CONFIG_AUX_DIRS): + (AC_CANONICAL_BUILD, AC_CANONICAL_HOST, AC_CANONICAL_TARGET): + (AC_CACHE_LOAD, AC_CACHE_SAVE): Likewise. + * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF, _AC_PATH_X_DIRECT): Likewise. + * lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Likewise. + * lib/autoconf/status.m4 (_AC_OUTPUT_LINK, _AC_OUTPUT_SUBDIRS): + Likewise. + * lib/autotest/general.m4 (_AC_INIT_PARSE_ARGS): Likewise. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Likewise. + +2006-05-18 Ralf Wildenhues + + * bin/autoreconf.in ($help): Reword according to the manual. + Suggested by Olly Betts. + +2006-05-17 Olly Betts (tiny change) + and Ralf Wildenhues + + * bin/autoreconf.in: Pass the directory argument to + `require_configure_ac'. Fix comment. + * tests/torture.at (Configuring subdirectories): Expose this. + Reported by Olly Betts. + +2006-05-17 Ralf Wildenhues + + * lib/Automake/Configure_ac.pm, lib/Automake/Channels.pm, + lib/Automake/FileUtils.pm, lib/Automake/Struct.pm: Sync from + Automake as follows: + + * lib/Autom4te/Configure_ac.pm (find_configure_ac): Use + `$configure_in' instead of `configure.in', to preserve + directory component. + +2006-05-17 Ralf Wildenhues + + * config/config.guess, config/config.sub, config/texinfo.tex, + doc/make-stds.texi, doc/standards.texi: Sync from upstream. + +2006-05-14 Paul Eggert + + * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Fix overly-picky + test for C99 conformance; (bool) 0.5 is an integer constant + expression, but (bool) -0.5 is not. Problem reported by Fedor + Sergeev in . + +2006-05-13 Paul Eggert + + * doc/autoconf.texi (Particular Programs): AC_PROG_MKDIR_P now + sets MKDIR_P, not mkdir_p, to avoid collisions with Automake. + Warn about obsolete install-sh files. Remove stray sentence + fragment and fix cross reference. + * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Don't insist on + install -d; this undoes the 2006-05-10 change. + (MKDIR_P): Mark with AN_MAKEVAR. + (AC_PROG_MKDIR_P): Fall back on $ac_install_sh, not $INSTALL, so + that we don't require $INSTALL to be thread-safe. Move comments + out of generated code. Require AC_CONFIG_AUX_DIR_DEFAULT instead + of AC_PROG_INSTALL. Output a message saying that we're checking + mkdir -p. Set MKDIR_P rather than mkdir_p. Do special magic for + MKDIR_P instead of AC_SUBST. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE, _AC_OUTPUT_CONFIG_STATUS): + Special magic for MKDIR_P, too. + * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Remove comment that defeated + a dnl. + * tests/local.at (AT_CHECK_ENV): mkdir_p -> MKDIR_P. + +2006-05-11 Paul Eggert + + Sync from Automake, as follows: + + 2006-05-11 Ralf Wildenhues + * config/install-sh: Initialize IFS, so field splitting isn't + turned off later. + * config/mkinstalldirs: Likewise. + * config/missing: Remove superfluous quotes. Replace all uses of + `[' by `test', for consistency, and for.. + * config/missing (sed_minuso, sed_output): New variables. + (autom4te, help2man, makeinfo): Use them. Unifies detection of + `-o FILE', `--output FILE', `--output=FILE', stricter regex. + Fixes `missing' to detect `--output' for help2man. Fixes + PR automake/483. Report by Dennis J. Linse. + (autom4te): Document in `missing --help'. + +2006-05-10 Paul Eggert + + * NEWS: New macro AC_PROG_MKDIR_P. AS_MKDIR_P is now more robust. + * config/install-sh: Don't use 'path' to talk about file names, + as per GNU coding standards. Close a race condition reported by Ralf + Wildenhues and Stepan Kasal. There is still a race condition + on hosts that predate Posix 1003.1-1992, but we can't help this. + Don't mishandle weird characters like space on pre-Posix hosts. + Invoke mkdir at most once per dir arg on pre-Posix hosts. + * doc/autoconf.texi (Programming in M4sh): Cross-reference to + AC_PROG_MKDIR_P from AS_MKDIR_P. + (Limitations of Usual Tools): Cross-reference to AC_PROG_MKDIR_P + from mkdir. Mention that Autoconf 2.60 install-sh is safe but + earlier editions are not (including Automake 1.8.3). + Do not suggest mkinstalldirs for thread-safety. + * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Insist on an 'install' + that understands -d, so that AC_PROG_MKDIR_P can fall back on $INSTALL. + * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Make it more robust in the + presence of special characters and race conditions. + * tests/local.at (AT_CHECK_ENV): Add mkdir_p to the list of variables + in Autoconf's name space. + +2006-05-10 Bruno Haible + and Paul Eggert + + * lib/autoconf/programs.m4 (AC_PROG_MKDIR_P): New macro, taken + from Automake with minor changes. + * doc/autoconf.texi (Particular Programs): Document AC_PROG_MKDIR_P. + +2006-05-10 Paul Eggert + + * config/install-sh: Update to Automake CVS version, as follows: + 2006-04-25 Stepan Kasal + * lib/install-sh: Simplify the expr implementation of dirname. + 2006-04-24 Paul Eggert + * lib/install-sh: Handle --, and diagnose unknown options. + +2006-05-09 Ralf Wildenhues + + * tests/Makefile.am (AUTOTEST): Use `$(MY_AUTOM4TE)' instead of + `./autom4te' to create `./testsuite', since the `all' target + will ensure its presence, but `installcheck' should not create + the uninstalled wrappers. + + * tests/torture.at (Unusual Automake input files): Skip if we + detect automake < 1.8. + +2006-05-07 Ralf Wildenhues + + * lib/autoconf/c.m4 (AC_PROG_CC_STDC): If ac_cv_prog_cc_stdc + is set to `no', then that overrides and sets ac_cv_prog_cc_c89 + and ac_cv_prog_cc_c99 to `no', for backward compatibility. + * NEWS: Update. + +2006-05-06 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Take care not to + munge (multiple) white space and other oddities. + * tests/torture.at (AT_CHECK_AC_ARG_VAR): Make sure to M4-escape + single quotes in variable assignment. + (AC_ARG_VAR, configure invocation): Adjust tests to expose this + and similar failures by adding multiple spaces, tabs, and other + special characters. + Report and different test suggested by Francesco Romani + and Andrew Church . + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): When we escape + single quotes, we only need to search for single quotes; this + both simplifies the search pattern, and makes us less + susceptible to `echo' variations for arguments not containing + single quotes. + (_AC_ARG_VAR_VALIDATE): Likewise. + +2006-05-04 Ralf Wildenhues + + * doc/autoconf.texi (Special Shell Variables) : Document + `$*' and IFS concatenation issue with traditional shells and + bash-2.04. Report by Seanster@Seanster.com. + +2006-05-03 Bruno Haible + + * doc/autoconf.texi (Limitations of Usual Tools): Identify more + precisely which Mac OS X versions have the od problem. + +2006-05-02 Paul Eggert + + * doc/autoconf.texi: Use @option systematically. + +2006-05-02 Paul Eggert + and Bruno Haible + + * doc/autoconf.texi (Limitations of Usual Tools): Add a paragraph + about 'od'. + (Integer Overflow): Mention the special case of integer division + overflow. + +2006-05-02 Ralf Wildenhues + + * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Cater for + traditional shells like the Solaris one that do not use the + first IFS character for assembling `$*'. + Prompted by a related report from autoconf_bug@nro.ca. + +2006-05-01 Paul Eggert + and Ralf Wildenhues + + * doc/autoconf.texi (Limitations of Builtins, Limitations of Make): + Mention more problems with the -e option. + +2006-04-30 Ralf Wildenhues + + * NEWS: Typo. + * doc/autoconf.texi (Systemology): Mention the Heirloom Project. + + * doc/autoconf.texi (Introduction, Pointers): Use `@/' liberally + in URLs to improve DVI formatted output (requires texinfo 4.6). + (System Services, Systemology, Shellology): Likewise. + (Limitations of Usual Tools): Rewrite Mac OS X example for nicer + output. + + * doc/autoconf.texi (Fortran Compiler): Do not use `@ovar' in + continuous text. + (Runtime): Fix macro argument names to match description: + `action-if-found' -> `action-if-true' and similarly. + (Obsolete Macros): Likewise. + * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE): Likewise. + (AC_COMPILE_IFELSE, AC_TRY_COMPILE, _AC_LINK_IFELSE) + (AC_LINK_IFELSE, AC_TRY_LINK, AC_COMPILE_CHECK): Likewise. + +2006-04-29 Ralf Wildenhues + + * doc/autoconf.texi (Limitations of Make): Clean up markup. + + * ChangeLog: Typo. + * doc/autoconf.texi (Portable Shell): Allow wrapped URLs, for + DVI output. + +2006-04-28 Ralf Wildenhues + + * doc/autoconf.texi (Limitations of Builtins): Document FreeBSD + /bin/sh set unsorted output. + * lib/autoconf/general.m4 (_AC_CACHE_DUMP): Adjust. + * tests/local.at: Likewise. + +2006-04-26 Paul Eggert + + * doc/autoconf.texi (Portable C and C++, Varieties of Unportability): + (Integer Overflow, Null Pointers, Buffer Overruns): + (Floating Point Portability, Exiting Portably): New sections. + (Writing Test Programs): Fix some langauge. Recommend exiting + with status 1, not merely nonzero. Clarify exit declaration. + (Run Time): Move C exit status stuff to new Exiting Portably section. + (Systemology): Mention Posix and levenez. Update v7 reference. + (Portable Shell): Mention the Posix shell. + +2006-04-25 Stepan Kasal + + * bin/autoconf.as (me): Replace by as_me. + +2006-04-25 Paul Eggert + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Don't use AS_ERROR, + since as_me isn't set yet. + +2006-04-23 Paul Eggert + + Prepare for deprecation of AS_BASENAME and AS_DIRNAME, and fix + a few minor bugs in this area. + + * doc/autoconf.texi (Programming in M4sh): Comment out the + documentation of AS_BASENAME, for now. + (Shell Substitutions): Do not use AS_DIRNAME in an example. + (Limitations of Builtins) : Do not refer to + AS_BASENAME. + * bin/autoconf.as (me): Don't use AS_BASENAME. + (dir): Remove the unused variable. + * lib/m4sugar/m4sh.m4 (_AS_DETECT_REQUIRED): Renamed from + AS_DETECT_REQUIRED. All uses changed. + (_AS_DETECT_SUGGESTED): Renamed from AS_DETECT_SUGGESTED. + All uses changed. + (_AS_DETECT_BETTER_SHELL): Put ;; at the end of a case. + (AS_BASENAME): Use "basename --" to protect against leading "-". + (_AS_BASENAME_EXPR): Renamed from AS_BASENAME_EXPR. All uses changed. + (_AS_BASENAME_SED): Renamed from AS_BASENAME_SED. All uses changed. + (_AS_BASENAME_PREPARE): Reject implementations that cannot handle "--". + (_AS_DIRNAME_PREPARE): Likewise. + (_AS_DIRNAME_EXPR): Renamed from AS_DIRNAME_EXPR. All uses changed. + (_AS_DIRNAME_SED): Renamed from AS_DIRNAME_SED. All uses changed. + (AS_DIRNAME): Use "dirname --". + +2006-04-23 Paul Eggert + + * doc/autoconf.texi (Runtime): Renamed from "Run Time". All uses + of "run time" and "run-time" changed to "runtime", for consistency. + * lib/autoconf/fortran.m4: Likewise (in comment). + * lib/autoconf/functions.m4: Likewise. + * lib/autoconf/general.m4: Likewise. + * lib/autoconf/headers.m4: Likewise. + + * doc/autoconf.texi (Run Time): Document the exit status situation + with more accuracy and detail. + +2006-04-23 Ralf Wildenhues + + * doc/autoconf.texi (Introduction): The GNU Autoconf Macro + Archive is not officially `GNU' any more. Update URL. + (Defining Directories): Likewise + * lib/autoconf/c.m4 (AC_C_RESTRICT): Update URL. + +2006-04-19 Ralf Wildenhues + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Remove the leading + newline from the `trap' code to finish `config.log'; the NetBSD + /bin/sh resets the exit status after an empty command, as + documented in doc/autoconf.texi. + Reported by Dalibor Topic . + +2006-04-19 Paul Eggert + + * doc/autoconf.texi (C Compiler): Clarify AC_C_TYPEOF. + Suggested by Bruno Haible. + +2006-04-18 Paul Eggert + + * configure.ac (ac_cv_sh_n_works): Don't try to test for it, since + some shells (e.g., Solaris 8 /bin/sh) implement it verrrry slowly. + Instead, just list the shells that we know work. + * tests/local.at (AT_CHECK_SHELL_SYNTAX): Remove 2nd arg. All uses + changed. Be more cautious about the _cv_ variable. + * tests/tools.at (Syntax of the shell scripts): Check the + _cv_ variable once, at first, to avoid an internal autoconf error + when sh -n does not work. + +2006-04-17 Ralf Wildenhues + + * lib/Autom4te/FileUtils.pm: Sync from Automake. + +2006-04-16 Paul Eggert + + * lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Don't + use ">&-" since we're only 99.999% sure that this is portable, + and since the MinGW bug is fixed in a different way. + * lib/autotest/general.m4 (AT_INIT): Likewise. + +2006-04-16 Stepan Kasal + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Handle --recheck + before opening config.log, to avoid hitting a bug on MinGW. + +2006-04-14 Paul Eggert + + * lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Close + AS_MESSAGE_LOG_FD before reopening it onto the log file. + This works around a MinGW bug reported by Eric Paire. + Make sure that all writes to the log file append to it, + rather than possibly losing data. + * lib/autotest/general.m4 (AT_INIT): Likewise. + +2006-04-14 Stepan Kasal + + * lib/Autom4te/FileUtils.pm (find_file): Fix a typo in the + description. + +2006-04-13 Ralf Wildenhues + + * NEWS: Update. + + * configure.ac (AC_INIT): Bump to 2.59d. + +2006-04-12 Ralf Wildenhues + + Version 2.59c. + + * Makefile.maint (news-date-check): Do not require a leading `*' + before the release date in NEWS. + +2006-04-12 Stepan Kasal + and Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILE): If the templates for + the instantiated file do not contain the string 'datarootdir' + but contain @datadir@, @docdir@, @infodir@, @localedir@, or + @mandir@, replace the reference '${datarootdir}' by the value. + * tests/torture.at (datarootdir workaround): New test. + * NEWS: Advertise this temporary fixup. + Based on a patch by Bruno Haible, reported and analyzed by + Paul Eggert and Noah Misch. + +2006-04-12 Eric Blake + + * tests/autotest.at (Debugging a failed test): Fix comment. + +2006-04-12 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): Simplify the summary of + all the changes since 2006-04-07. + +2006-04-11 Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): If `ln -s file1 file2' + succeeded, but `ln -s file dir' failed, take care to remove the + leftover target before the next test, to prevent its spurious + failure; also make sure `ln file dir' works before selecting it. + Thanks to Keith Marshall for pointing this out. + * THANKS: Update. + + * lib/autotest/general.m4 (AT_INIT): Store quoted variable + assignments in `at_debug_args', so that we put them correctly + in the `run' script. + * tests/autotest.at (Debugging a failed test): Unmark XFAIL. + Reported by Eric Blake. + +2006-04-11 Eric Blake + + * tests/autotest.at (AT_CHECK_AT): Add new argument, to allow + top-level tests after micro-suite has been run. Used in... + (Debugging a successful test, Debugging script and environment), + (Debugging a failed test): ...these new tests. The first of these + is fixed by... + * lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT): New + macro, split out from... + (AT_INIT): ...here, so that using -d also generates a run script. + Document that -d inhibits top-level logging. + * doc/autoconf.texi (testsuite Invocation): Document that -d only + inhibits top-level logging; debug scripts are created. + + * lib/autotest/general.m4 (_AT_CHECK): Avoid syntax error on empty + check. + * tests/autotest.at (Empty test, Empty check): New test to check it. + + * lib/autoconf/c.m4 (AC_C_CONST, AC_C_VOLATILE): Avoid warnings + from gcc. + +2006-04-10 Stepan Kasal + + * tests/mktests.sh: Use "trap '' 0", not "trap 0". Do not touch + the files if a problem appears. Make the empty *.at files + read-only, too. Proposed by Ralf Wildenhues. + +2006-04-10 Ralf Wildenhues + + * config/Makefile.am: Add comment to force updated Makefile.in. + + * lib/freeze.mk: Fix typo in comment. Unlike the last, white + space only patch to this file, this patch causes the Makefile.in + files that include freeze.mk to be updated, and thus have a + newer time stamp again, which in turn makes a pristine CVS + checkout have correct time stamps. + + * Makefile.maint (cvs-sv): New macro, to be used.. + (config.guess-url_prefix, config.sub-url_prefix) + (texinfo.tex-url_prefix, standards.texi-url_prefix): ..here; + point to CVS text checkout of Gnulib files. + (copyright-check): Bump current year. + (announcement): Do not hard-wire `./announce-gen'. + (cvs-update): Propagate failures of `cvs' and `move-if-change' + correctly. + * Makefile.cfg (executable-update): Use `chmod a+x' instead of + `chmod +x'. + (wget_files): Update config.guess, config.sub, texinfo.tex by + `wget-update', now that their URLs work again. + +2006-04-10 Paul Eggert + + * doc/autoconf.texi (Particular Types): Don't use AC_CHECK_TYPE. + Problem noted by Paul D. Smith. + +2006-04-10 Ralf Wildenhues + + * doc/autoconf.texi: Remove unused words from word list. + * .x-sc_prohibit_atoi_atof, .x-sc_space_tab, .x-sc_sun_os_names, + .x-sc_trailing_space: New files. + + * doc/standards.texi: Sync from gnulib. + + * NEWS, doc/autoconf.texi (AC_LIBOBJ vs LIBOBJS): Mark + `LIBOBJDIR' as experimental. + + * lib/m4sugar/m4sh.m4 (_AS_LN_S_PREPARE): MSYS `ln -s' fails + with a target directory; it's internally implemented as `cp' + anyway, but since Autoconf advertises the possibility to use + a target directory when LN_S is `ln -s', we need to find out. + Reported by Rolf Ebert against MSYS, + analyzed by Keith Marshall . + + * THANKS: Update. + +2006-04-10 Paul Eggert + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Just output + confdefs.h as-is. In general, if it has backslash-newline or the + like, then it doesn't work either to sort or to remove empty + lines. + +2006-04-09 Stepan Kasal + + * tests/Makefile.am (AUTOCONF_FILES): Fix typo in the comment. + +2006-04-09 Alexandre Duret-Lutz + + * lib/autom4te.in (Automake-preselections): Preselect + _AM_SUBST_NOTMAKE. + +2006-04-08 Paul Eggert + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Use '\'' for an + apostrophe within a single-quoted string, as this is the usual + tradition and is easier to read than '"'"'. Don't rely on the + shell treating "$/" like '$/'. Use a more-consistent indenting + style for the trap. + +2006-04-09 Eric Blake + + * tests/autotest.at (Backquote command substitution), + (Multiline backquote command substitution): Remove mistaken + AT_NO_CMDSUBST from the 2006-03-14 patch, which was meant to be + applied... + (Parenthetical command substitution, Multiline parenthetical + command substitution): here. + +2006-04-08 Paul Eggert + + Import macros from gnulib (often changing their name). + + * NEWS: AC_C_TYPE_LONG_DOUBLE is now obsolete. + New macros AC_CHECK_DECLS_ONCE, AC_CHECK_FUNCS_ONCE, + AC_CHECK_HEADERS_ONCE, AC_FUNC_STRTOLD, AC_HEADER_ASSERT, + AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE, + AC_TYPE_LONG_DOUBLE, AC_TYPE_LONG_DOUBLE_WIDER, AC_TYPE_INT8_T, + AC_TYPE_INT16_T, AC_TYPE_INT32_T, AC_TYPE_INT64_T, + AC_TYPE_INTMAX_T, AC_TYPE_INTPTR_T, AC_TYPE_LONG_LONG_INT, + AC_TYPE_UINT8_T, AC_TYPE_UINT16_T, AC_TYPE_UINT32_T, + AC_TYPE_UINT64_T, AC_TYPE_UINTMAX_T, AC_TYPE_UINTPTR_T, + AC_TYPE_UNSIGNED_LONG_LONG_INT, AC_USE_SYSTEM_EXTENSIONS. + The manual mentions Gnulib more prominently. + * doc/autoconf.texi (Gnulib): New node. + (Pointers): Add Gnulib URL. + (Particular Functions): Alphabetize. Add AC_FUNC_STRTOLD. + (Generic Functions): Add AC_CHECK_FUNCS_ONCE. Refer to new + Gnulib section. + (Particular Headers): Add AC_HEADER_ASSERT. For stdbool.h, + suggest a #define rather than a typedef for _Bool, and mention + Gnulib rather than trying to substitute stdbool code. + (Generic Headers): Add AC_CHECK_HEADERS_ONCE. + (Generic Declarations): Add AC_CHECK_DECLS_ONCE. + (Particular Structures): Add AC_STRUCT_DIRENT_D_INO, + AC_STRUCT_DIRENT_D_TYPE. + (Particular Types): Mention stdint.h and inttypes.h as standard + headers too. + Add AC_TYPE_INT8_T, AC_TYPE_INT16_T, AC_TYPE_INT32_T, AC_TYPE_INT64_T, + AC_TYPE_INTMAX_T, AC_TYPE_INTPTR_T, AC_TYPE_LONG_DOUBLE, + AC_TYPE_LONG_DOUBLE_WIDER, AC_TYPE_LONG_LONG_INT, AC_TYPE_UINT8_T, + AC_TYPE_UINT16_T, AC_TYPE_UINT32_T, AC_TYPE_UINT64_T, + AC_TYPE_UINTMAX_T, AC_TYPE_UINTPTR_T, AC_TYPE_UNSIGNED_LONG_LONG_INT. + (C Compiler): Move AC_C_LONG_DOUBLE to ... + (Obsolete Macros): here. Under AC_LONG_DOUBLE, mention + AC_TYPE_LONG_DOUBLE or AC_TYPE_LONG_DOUBLE_WIDER instead. + (Posix Variants): Add AC_USE_SYSTEM_EXTENSIONS. + (Coding Style). Don't mention m4_expand_once. + * lib/autoconf/c.m4 (AC_C_LONG_DOUBLE): Implement via + AC_TYPE_LONG_DOUBLE_WIDER. Now obsolete. + * lib/autoconf/functions.m4 (_AH_CHECK_FUNCS): New macro. + (AC_CHECK_FUNCS): Use it. + (AC_CHECK_FUNCS_ONCE, AC_FUNC_STRTOLD): New macros. + (AC_FUNC_WAIT3): "the Open Group standards" -> "POSIX". + * lib/autoconf/general.m4 (AC_CHECK_DECLS_ONCE): New macro. + * lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): New macro. + (AC_HEADER_ASSERT): New macro. + (AC_HEADER_STDBOOL): Don't assume "#error" works. + Catch a bug in IBM AIX xlc compiler version 6.0.0.0. + Catch a bug in an HP-UX C compiler. + * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): New macro. + * lib/autoconf/types.m4 (AC_TYPE_INTMAX_T. AC_TYPE_UINTMAX_T): + (AC_TYPE_INTPTR_T, AC_TYPE_UINTPTR_T. AC_TYPE_LONG_DOUBLE): + (AC_TYPE_LONG_DOUBLE_WIDER, AC_C_LONG_DOUBLE, AC_TYPE_LONG_LONG_INT): + (AC_TYPE_UNSIGNED_LONG_LONG_INT, _AC_TYPE_INT, _AC_TYPE_UNSIGNED_INT): + (_AC_STRUCT_DIRENT, AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE): + New macros. + + * tests/mktests.sh (ac_exclude_list, au_exclude_list): Do not + use /^foo|bar$/, it does not mean /^(foo|bar)$/. + +2006-04-08 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Fix the wording + of the warning introduced by the 2001-08-28 change. + +2006-04-08 Stepan Kasal , + Ralf Wildenhues + + * lib/autoconf/general.m4 (AC_CACHE_SAVE): All `ac_cv_env_foo' + variables shall be overriden by the cache. + * tests/torture.at (AC_ARG_VAR): Test also with a first value + that contains braces. + +2006-04-07 Stepan Kasal + + Revert the patch from 2006-04-01 and only improve + _AS_DETECT_BETTER_SHELL: + + * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Do not optimize; do not + skip nonexistent directories. + (_AS_DETECT_BETTER_SHELL): The optimization is moved here--try + only shell candidates which exist. + (AS_UNAME): No need to give three parameters to _AS_PATH_WALK. + * lib/autotest/general.m4 (AT_INIT): No need to give three + parameters to _AS_PATH_WALK. + +2006-04-07 Stepan Kasal , + Ralf Wildenhues + + * bin/autoupdate.in (handle_autoconf_patches): Change the way we + distinguish m4sugar macros. + * tests/tools.at (autoupdating with aclocal and m4_include): + New test. Bug reported by Gary V. Vaughan , + test case by Noah Misch . + +2006-04-07 Stepan Kasal + + Revert my change from 2006-03-17, in other words: + * lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Insert BIN_SH=xpg4 + and DUALCASE=1. + (AS_SHELL_SANITIZE): Remove DUALCASE=1. + * doc/autoconf.texi (Special Shell Variables) : Say that + it is set. + +2006-04-07 Eric Blake + + * doc/autoconf.texi (Programming in M4sh): Document that + AS_MKDIR_P exits the script on failure. + * lib/autotest/general.m4: Remove redundant AS_ERROR. + +2006-04-07 Ralf Wildenhues + + * config/elisp-comp, config/install-sh, config/mdate-sh, + config/missing, config/mkinstalldirs: Sync from Automake. + + * lib/Autom4te/FileUtils.pm, lib/Autom4te/Struct.pm: Sync + from Automake. + + * doc/make-stds.texi: Sync from gnulib. + +2006-04-06 Eric Blake + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_O): Inside cache + check, s/ac_exeext/ac_cv_exeext/. Fixes regression introduced + 2006-04-01. + +2006-04-06 Stepan Kasal , + Eric Blake , + Paul Eggert , + Ralf Wildenhues + + * lib/autoconf/general.m4 (_AC_CACHE_DUMP): Fix the detection of + whether `set' quotes correctly: redirect stderr of the tested + `set', and use a subshell, for Ultrix; use `sed' instead of + `grep' for zsh `set' which may write binary output; match only + at the beginning of a line, to avoid false positives. + In order to avoid false positives by unrelated variables with + multiline content, put the dump algorithm in a subshell and + unset all variables containing newlines (except some which are + special to the shell). Warn about cache variables that are + unset. + +2006-04-06 Ralf Wildenhues + + * config/config.guess, config/config.sub, config/texinfo.tex: + Sync from upstream. + + * tests/mktests.sh: Reword comments. + + * tests/mktests.sh: Only skip internal macros starting with + `_AC_' or `__AC_'. Noted by Stepan Kasal. + Update exclusion lists for the test suite to this end: + (AC_ARG_VAR): Do test this now. + (AC_SEARCH_LIBS, AC_REPLACE_FUNCS): Need an argument. + (AC_LINKER_OPTION): Remove (renamed to _AC_LINKER_OPTION). + (AC_LIST_MEMBER_OF): Likewise (renamed to _AC_LIST_MEMBER_IF). + (AC_LINK_FILES): Obsoleted since (and thus AU_DEFUN'ed). + + * doc/autoconf.texi (Shell Substitutions): Mention the MSYS + shell issue with double-quoted command substitutions of native + commands. + Reported to MSYS by Mark Cave-Ayland, to Autoconf by Keith + Marshall. + + * Makefile.maint (sc_cast_of_argument_to_free): Do not fail when + no file matches the glob, discard the warning, set `nullglob'. + (syntax-check): Likewise. + (sc_cast_of_x_alloc_return_value): Likewise. + (sc_cast_of_alloca_return_value, sc_error_exit_success) + (sc_prohibit_jm_in_m4, .re-list, sc_unmarked_diagnostics) + (m4-check): Likewise. + (sc_system_h_headers): Do not print rule on execution. + (sc_tight_scope): Do not fail for non-existing `src' directory. + (sc_changelog): Skip the Copyright footer. + * lib/autoconf/lang.m4: Remove trailing space. + + * lib/autoconf/status.m4: More replacements to + where this makes sense. + +2006-04-06 Stepan Kasal + + * tests/Makefile.am (maintainer-check-posix): + s/POSIXLY_CORRECTLY/POSIXLY_CORRECT/ + + * lib/autoconf/status.m4 (_AC_CONFIG_FOOS): Append TAGS to + ac_config_s again, sometimes normalized, sometimes not. + (AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_LINKS): + (AC_CONFIG_COMMANDS): Do not do so here. + (_AC_CONFIG_REGISTER_DEST): Double quote the tags in macros _AC_LIST_TAGS + and_AC_LIST_TAG_COMMANDS; fixes another regression introduced by the + 2005-07-25 rewrite. Noticed by Noah Misch. + + * lib/autoconf/general.m4 (AC_PRESERVE_HELP_ORDER): Do not define + _AC_PRESERVE_HELP_ORDER, ... + (AC_ARG_ENABLE, AC_ARG_WITH): ... use AC_PROVIDE_IFELSE insetad. + + * lib/autoconf/general.m4 (AC_ARG_VAR): Do not use m4_divert_once + inside m4_expand_once; it is redundant. + + * lib/autoconf/general.m4 (_AC_INIT_HELP): Remove the broken support + for --help from Cygnus `configure.' + +2006-04-06 Paul Eggert + + * doc/autoconf.texi (C Compiler): Warn about #error. Follows up + on a patch proposed by Ralf Wildenhues. + +2006-04-05 Paul Eggert + + * lib/autoconf/status.m4: Replace '' with + where this makes sense. + +2006-04-05 Howard Chu (trivial change) + Noah Misch + + * lib/autoconf/general.m4 (AC_PRESERVE_HELP_ORDER): New macro. + (AC_ARG_ENABLE, AC_ARG_WITH): Adjust. + * doc/autoconf.texi (Help Formatting): New node. + * NEWS: Announce AC_PRESERVE_HELP_ORDER. + +2006-04-05 Ralf Wildenhues + + * TODO, config/Makefile.am, lib/freeze.mk, lib/autoconf/c.m4, + lib/autoconf/specific.m4, lib/autoconf/status.m4, + lib/autoconf/types.m4, lib/autotest/general.m4, + tests/mktests.sh, tests/torture.at: White space cleanup: + remove some SPACE before TAB, or add quoting ('' or @&t@). + + * NEWS, TODO, bin/autoreconf.in: `filesystem' -> `file system'. + + * doc/autoconf.texi (Shell Substitutions): Document `^' vs. `|'. + +2006-04-05 Eric Blake + + * lib/autotest/general.m4 (AT_INIT): Prep AT_*_all, so that an + empty test suite works. + * tests/autotest.at (Empty test suite): Remove xfail. + +2006-04-05 Noah Misch + + * lib/autoconf/status.m4 (_AC_CONFIG_FOOS): Do not append normalized + TAGS to ac_config_s. + (AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_LINKS): Do so here. + (AC_CONFIG_COMMANDS): Append NAME to ac_config_commands without + normalizing it, consistent it with previous releases. + * tests/torture.at (Macro calls in AC_CONFIG_COMMANDS tags): New test. + +2006-04-05 Paul Eggert + + * lib/m4sugar/m4sh.m4 (AS_BASENAME_EXPR, AS_DIRNAME_EXPR): + Use simplified args that Eric Blake originally suggested. + +2006-04-04 Paul Eggert + + * tests/mktests.sh: Don't use 'cat'; just read the files directly. + Prefer 'sort -u' to 'sort | uniq'. Filter data before sorting it. + Use 'comm' rather than N instances of grep; this also fixes a bug + whereby substrings were incorrectly matched, causing us to not + generate tests for AC_F77_NAME_MANGLING and AC_FUNC_LSTAT. + (exclude_list): Exclude empty macros. + (ac_exclude_list): Exclude AC_INCLUDES_DEFAULT. + + Use awk rather than grep -E or egrep, to avoid + portability problems with regular expressions containing newlines. + (exclude_list, ac_exclude_list, au_exclude_list, ac_exclude_script): + Switch from grep to awk syntax. + (ac_exclude_script): Renamed from ac_exclude_egrep. + (au_exclude_script): Renamed from au_exclude_egrep. + +2006-04-04 Noah Misch + + * lib/autoconf/general.m4 (_AC_INIT_HELP): Only `configure.in' evidences + a subdirectory subject to Cygnus `configure'. + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Likewise. + + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Omit the bug + report request when we have no AC_PACKAGE_BUGREPORT. + +2006-04-03 Ralf Wildenhues + + * THANKS: Update. + + * tests/mktests.sh: Update copyright year in the header of the + generated files. + + * lib/autoconf/c.m4 (AC_C_INLINE): Do not skip cleanup code. + (AC_C_RESTRICT): Likewise. Furthermore, add a function with a + typedef'ed restricted pointer, to catch a compiler bug on + HP-UX 11.x, and fix warnings so it passes with -Werror. + (_AC_PROG_CC_C99): Likewise. + Reported by Albert Chin . + * tests/mktests.sh: Do not skip AC_C_INLINE, AC_C_RESTRICT. + +2006-04-03 Noah Misch + + * bin/autoscan.in (subdirs): New global. + (scan_file): Prune directories with configure{,.{ac,in,gnu}}. + (output): Emit AC_CONFIG_SUBDIRS as needed. + * tests/autoscan.at (autoscan): Remove XFAIL. + +2006-04-03 Noah Misch + + * lib/autoconf/general.m4 (AC_CACHE_SAVE): Use AC_MSG_NOTICE. + +2006-04-03 Eric Blake + + * THANKS: Add myself. + +2006-04-03 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_INIT): Add `at_testdir' to pointer + to log, point to testsuite output tree. + +2006-04-02 Paul Eggert + + * NEWS: AC_PROG_CC and AC_PROG_CXX no longer declare 'exit'. + * doc/autoconf.texi (Function Portability): Mention that C++ + has trouble with 'exit'. + (Guidelines): Test programs shouldn't use 'exit'. + * lib/autoconf/c.m4 (_AC_PROG_CXX_EXIT_DECLARATION): + Remove; all uses removed. + (AC_LANG_INT_SAVE(C), AC_C_BIGENDIAN): + Return from 'main' instead of calling 'exit'. + * lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_CLOSEDIR_VOID): + (_AC_FUNC_FNMATCH_IF, AC_FUNC_GETGROUPS): + (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, _AC_FUNC_MALLOC_IF): + (AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_MMAP, _AC_FUNC_REALLOC_IF): + (AC_FUNC_SETPGRP, _AC_FUNC_STAT, AC_FUNC_STRTOD, AC_FUNC_STRERROR_R): + (AC_FUNC_STRNLEN, AC_FUNC_SETVBUF_REVERSED, AC_FUNC_UTIME_NULL): + (_AC_FUNC_FORK, _AC_FUNC_VFORK, AC_FUNC_WAIT3): Likewise. + * lib/autoconf/headers.m4 (AC_HEADER_STDC): Likewise. + * lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise. + * lib/autoconf/types.m4 (AC_TYPE_GETGROUPS): Likewise. + * tests/compile.at: Likewise. + +2006-04-02 Pavel Roskin + + * doc/autoconf.texi (AC_PATH_X): Update per 2005-08-26 change. + +2006-04-01 Stepan Kasal + + Clean up _AC_COMPILER_EXEEXT* macros. + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Don't try to + detect exeext, it will be done by _AC_COMPILER_EXEEXT_O; just set + ac_file to the name of the default output file and call + _AC_COMPILER_EXEEXT_WORKS. Move the definition of ac_files and the + initial `rm' of the candidate files... + (_AC_COMPILER_EXEEXT): ... here and simplify them. Moreover, use + the same list in subsequent `rm' calls, and for the temporary + redefinition of ac_clean_files; call _AC_COMPILER_OBJEXT at the end, + and don't call the other _AC_COMPILER_EXEEXT_* macros directly, use... + (_AC_COMPILER_EXEEXT_TESTS): ... this new macro. + (_AC_COMPILER_EXEEXT_O): Don't export ac_cv_exeext, it's not needed (or + no longer needed) by libtool. Make it a cache check. + (_AC_COMPILER_EXEEXT_CROSS): Remove the comment, it was obviously + copied here by mistake. + (AC_NO_EXECUTABLES): Redefine _AC_COMPILER_EXEEXT_TESTS, not + _AC_COMPILER_EXEEXT. + * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Do not call + _AC_COMPILER_OBJEXT directly. + * lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise. + +2006-04-01 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (_AS_DIRNAME_PREPARE): New macro. + (AS_DIRNAME): Use it. + (_AS_PREPARE): Add _AS_DIRNAME_PREPARE. + + * tests/*.at: Remove the generated ones. + +2006-04-01 Stepan Kasal + + * lib/autotest/general.m4 (AT_INIT): Don't optimize the first PATH walk. + +2006-04-01 Eric Blake + + * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Optimize nonexistent + directories, unless optional third argument supplied. + (AS_UNAME): Don't optimize PATH walk. + + * lib/Autom4te/Struct.pm, lib/autoconf/c.m4: s/non-existent/nonexistent/ + +2006-04-01 Eric Blake + and Stepan Kasal + + * lib/m4sugar/m4sh.m4: Sort sections as implied by the comments, + and fix some typos. + +2006-04-01 Noah Misch + + * lib/autoconf/general.m4 (_AC_INIT_VERSION): Emit script name and + Autoconf version number despite a zero- or one-argument AC_INIT. + + * bin/autoreconf.in (parse_args): Multiple -v send --verbose to + subordinate tools. + * lib/Autom4te/General.pm (getopt): Make -v and -d incremental. + * doc/autoconf.texi (autoreconf Invocation): Document it. + + * doc/autoconf.texi: Use `Cygwin', `MinGW', and `license' consistently. + Append LocalWords so ispell-buffer passes cleanly. Spelling fixes. + +2006-04-01 Eric Blake + + * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Allow use in shell lists. + * lib/autotest/general.m4: Be tolerant of existing directory when + rm failed to remove it. + +2006-04-01 Ralf Wildenhues + + * bin/autoupdate.in: Redefine m4_location so that warnings print + the correct lines of the input file by subtracting.. + (_au__first_line): ..this new definition. + + * lib/autoconf/general.m4 (AC_COMPILE_CHECK): Prefer + AC_MSG_CHECKING over obsolete AC_CHECKING in autoupdated code. + Remove stray newline in output. + (AC_FOREACH): AU_DEFUN this as literal for autoupdate, and also + AC_DEFUN this for autoconf, including the obsoletion diagnose. + Fixes autoupdating of code where the replacement output contains + m4sugar macros. + * lib/autoconf/lang.m4 (AC_LANG_SAVE): Likewise. + * tests/mktests.sh (ac_exclude_list): Add AC_FOREACH. + (au_exclude_list): Add AC_LANG_SAVE. + * tests/tools.at: Several new tests for all of this. + * doc/autoconf.texi (Obsoleting Macros): Give a hint about the + hairy details. + The AC_LANG_SAVE issue was reported against Libtool by + Dalibor Topic , and against Autoconf 2.57 by + Kristian Kvilekval . + +2006-04-01 Stepan Kasal + + * bin/autoupdate.in: Handle m4 builtins and m4sugar macros together-- + switch all of them on and of when necessary. Fixes the bug when + m4sugar macros (e.g., m4_define) were expanded after the first + automatic update (e.g., after AC_PREREQ or AC_INIT). + +2006-03-31 Paul Eggert + + * doc/autoconf.texi (Programming in M4sh): Sharpen the descriptions + of AS_BASENAME and AS_DIRNAME. Reported by Stepan Kasal. + + * lib/m4sugar/m4sh.m4 (AS_BASENAME_EXPR): Handle ///, ////, etc. + correctly. Problem reported by Eric Blake. + (_AS_EXPR_PREPARE): Detect Tru64 expr bug. Problem reported by + Ralf Wildenhues. + +2006-03-30 Paul Eggert + + * doc/autoconf.texi (Programming in M4sh, Limitations of Usual Tools): + Tighten up the basename/dirname wording. + +2006-03-30 Ralf Wildenhues + + * Makefile.maint (sc_texi_notab): New check: do not use TABs + in texinfo files outside of verbatim environments. + (syntax-check-rules): Update. + * doc/autoconf.texi (Configuration Headers): Conform to it. + +2006-03-30 Chris Pickett (tiny change) + + * doc/autoconf.texi (autoreconf Invocation): Mention that -I for + aclocal cannot be given on the command line. + +2006-03-29 Paul Eggert + + * doc/autoconf.texi (Programming in M4sh): Mention AS_BASENAME. + Give an example for AS_DIRNAME instead of referring to Posix.. + (File System Conventions): Put discussion of // versus / here, and + modernize it a bit. + (Limitations of Usual Tools): Add basename. Remove verbiage + after dirname, since it got moved to the above sections. + All this was inspired by a patch proposed earlier by Eric Blake. + +2006-03-27 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Quote + `$0' to protect against spaces. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Likewise, for + `$0', $as_me. + +2006-03-26 Ralf Wildenhues + + * bin/autoscan.in: The value of find_configure_ac should be + checked for existence, so we don't barf over a nonexisting + configure.ac. Reported by Laurence Darby . + +2006-03-22 Ralf Wildenhues + + * bin/autoupdate.in: Fix some typos. + +2006-03-21 Stepan Kasal + + * doc/autoconf.texi (Installation Directory Variables): Fix typo. + + * lib/autoscan/autoscan.list: Refreshed. + +2006-03-20 Ralf Wildenhues + + * tests/local.at (AT_CHECK_ENV): Ignore AC_SUBSTed Objective C + and Erlang related variables. + + * lib/autoconf/c.m4 (AC_LANG(Objective C), AC_LANG_OBJC) + (_AC_LANG_ABBREV(Objective C), _AC_LANG_PREFIX(Objective C)) + (AC_LANG_SOURCE(Objective C), AC_LANG_PROGRAM(Objective C)) + (AC_LANG_CALL(Objective C), AC_LANG_FUNC_LINK_TRY(Objective C)) + (AC_LANG_BOOL_COMPILE_TRY(Objective C)) + (AC_LANG_INT_SAVE(Objective C), AC_LANG_PREPROC(Objective C)) + (AC_PROG_OBJCPP, AC_LANG_COMPILER(Objective C), AC_PROG_OBJC) + (_AC_PROG_OBJC_G): New macros. + (_AC_ARG_VAR_CPPFLAGS): Adjusted. + * doc/autoconf.texi (Objective C Compiler): New node. + (Preset Output Variables): Document OBJCFLAGS. + (Language Choice): Document `Objective C' language. + (Fortran Compiler): Fix typo. + * NEWS: Updated. + Inspired by a patch from David M. Lloyd . + +2006-03-20 Stepan Kasal + + * doc/autoconf.texi (Default Includes): Fix typo + s/AC_HEADERS_STDC/AC_HEADER_STDC/ + (Limitations of Usual Tools): s/unwriteable/unwritable/ + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT): + Fix typos in the comments. + +2006-03-17 Stepan Kasal + + * lib/autoconf/programs.m4 (AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): + Factor out the warning to... + (_AC_TOOL_WARN): ... this new macro; use `cross_compiling'. + * tests/local.at (AT_CHECK_MACRO_CROSS): Avoid this warning. + * tests/semantics.at (AC_C_BIGENDIAN): Likewise. + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Do not special + case `ac_delim' when writing the sed script. + + * lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Removed BIN_SH=xpg4, + moved DUALCASE=1 ... + (AS_SHELL_SANITIZE): ... here. + * doc/autoconf.texi (Special Shell Variables) : Do not say + that it is set. + + * lib/autoconf/programs.m4 (AC_CHECK_PROG): Quote the parameter of + AC_SUBST. + (_AC_PATH_PROG): Store the result to VARIABLE. + (AC_PATH_PROG): No need to set VARIABLE again. + + * tests/local.at (AT_CHECK_MACRO_CROSS): New macro, creates two tests: + the first one is usual AT_CHECK_MACRO test, the second one checks + that the same works when cross-compiling. + * tests/semantics.at (AC_CHECK_ALIGNOF, AC_CHECK_ALIGNOF struct): + (AC_CHECK_SIZEOF, AC_CHECK_SIZEOF struct): Use it. + +2006-03-17 Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Prepend + the directory `/usr/bin/posix' in the shell search, to prefer + the Posix shell not only in subsequent spawns as with `$BIN_SH' + on Tru64. + + * doc/autoconf.texi (contents): To fix texi2html output, hide + `@setcontentsaftertitlepage' for HTML. + (Writing Autoconf Macros): Likewise, insert space after `@c'. + (Leviticus, Numbers, Deuteronomy): Likewise, change `@,c' to + `@,{c}'. + +2006-03-16 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (_AS_PREPARE): Move the IFS setup and CDPATH + sanitizing... + (AS_SHELL_SANITIZE): ...here; mention _AS_PATH_WALK needs IFS set. + * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Add an explanation + why IFS is restored so late; thank you, Ralf, for reminding us. + +2006-03-15 Stepan Kasal + + * doc/autoconf.texi (Pretty Help Strings): No need to use cached + variables in the examples. + +2006-03-14 Romain Lenglet + + * doc/autoconf.texi (several sections): Cleaned up documentation for + macros in erlang.m4. + +2006-03-14 Ralf Wildenhues + + * tests/autotest.at (AT_NO_CMDSUBST): New macro to determine + failure condition for `$(cmd)' style command substitutions. + (Parenthetical command substitution, Multiline parenthetical + command substitution): Use it. + + * doc/autoconf.texi (Special Shell Variables): Missing word. + Reported by Keith Marshall . + + * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Do not forget to reset + IFS even in case of empty `$PATH'. + +2006-03-12 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_INIT) : Optimize + `expr' away if there is nothing to do. + < --keywords >: Simplify and robustify argument handling. + Revert erroneous comment from 2005-08-23. Extend to allow + keyword negation with `!'. + Update help message. Remove broken code to prevent running + tests multiple times. + * doc/autoconf.texi (testsuite Invocation) < --keywords >: + Update and fix the documentation accordingly. + * tests/autotest.at (Keywords): Renamed to.. + (Keywords and ranges): .. this. Extended to make sure negated + keywords, keywords taken from AT_SETUP arguments, and numeric + test ranges work, and that matching is case-insensitive. + +2006-03-11 Ralf Wildenhues + + * lib/autoconf/types.m4 (_AC_CHECK_TYPE_NEW): Use a typedef to + allow to pass unnamed structs even in C++. + (AC_CHECK_SIZEOF): Likewise. + Also fix quoting error in `AC_MSG_FAILURE' arguments. + * tests/semantics.at (AC_CHECK_ALIGNOF struct, AC_CHECK_SIZEOF + struct): New tests for unnamed structs, each both native and + cross-compiling. + + * lib/autoconf/c.m4 (AC_C_TYPEOF): Use typedef to avoid defining + a structure inside a cast, for C++ conformance. + * lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Likewise. + Also fix quoting error in `AC_MSG_FAILURE' arguments. + + * lib/autoconf/c.m4 (AC_PROG_CC_STDC): If we cannot enable C99 + nor C89 mode, set `$ac_cv_prog_cc_stdc' to `no' instead of + trying to execute the command `no'. + + * lib/autoconf/lang.m4 (AC_LANG_CONFTEST): AC_DEFUN this, not + m4_define, so that the requirements of `AC_INCLUDES_DEFAULT' are + expanded outside. + + * doc/autoconf.texi (autoconf Invocation): Fix typos in trace + example. Do not emphasize `$%', it is hardly new and special. + Reported by Edouard Bechetoille . + + * doc/autoconf.texi (Limitations of Usual Tools): Document + OpenBSD and traditional `grep' failure to handle multiple + patterns separated by newlines. + +2006-03-10 Romain Lenglet + + * doc/autoconf.texi (several sections): Add documentation for macros + in erlang.m4. + +2006-03-10 Eric Blake + + * doc/autoconf.texi (Obsolete Macros): Fix wording of + AC_TRY_LINK_FUNC. + +2006-03-10 Paul Eggert + + * doc/autoconf.texi: Use @acronym more consistently for acronyms + like BSD, GPL, LGPL. Fix minor English typos. + (AC_STDC_HEADERS, AC_PROG_GCC_TRADITIONAL): + Mention that these macros are becoming obsolete. + (AC_STDC_HEADERS, AC_PROG_CC, AC_C_CONST, AC_C_VOLATILE): + Use more modern terminology for which standard is what. + (AC_PROG_CC): Mention gcc first, and remove obsolete references to egcs + and to ansi2knr. + (AC_PROG_CXX): Likewise. + (AC_C_PROTOTYPES, Test Functions, AC_LIBOBJ vs LIBOBJS): + Remove obsolete discussion about how to port to K&R. + (Guidelines for Test Programs): Suggest AC_HEADER_STDBOOL rather than + the obsolescent AC_HEADER_STDC. + (AC_FOO_IFELSE vs AC_TRY_FOO): Don't use #error; test programs + can't rely on it. + +2006-03-08 Ralf Wildenhues + + * tests/c.at (AC_PROG_CPP without warnings, AC_PROG_CPP via CC): + Remove stdin redirection from /dev/null to allow pipe to work. + +2006-03-08 Paul Eggert + + * tests/c.at (AC_PROG_CPP without warnings, AC_PROG_CPP via CC): + Require that /lib/cpp include stdio.h correctly. Solaris 10's + doesn't. Problem reported by D'Arcy A MacIsaac and diagnosed by + Ralf Wildenhues. + +2006-03-06 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_SED_CMD_LIMIT): The limit for + HP-UX sed is 99 commands, not 100. + (_AC_OUTPUT_FILES_PREPARE): Do not count the `}' of an + _AC_SUBST_FILES fragment. Separate `{' and `r' commands by + newline for portability. + * tests/torture.at (Torturing config.status): Also test 100 + AC_SUBST_FILE invocations. Fix test to actually verify the + AC_CONFIG_FILES output. + * doc/autoconf.texi (Limitations of Usual Tools): Document HP-UX + command, label, and read-file `r' limits. Unify HP-UX spelling. + + * tests/Makefile.am (edit, $(wrappers)): Do not use `$<' in + non-suffix rule. + ($(TESTSUITE_GENERATED_AT)): Use `$(srcdir)` for the benefit of + non-GNU make. + (autoconfdir, $(AUTOCONF_FILES)): Likewise. + * tests/mktests.sh: Small shell portability fixes. + +2006-03-05 Ralf Wildenhues + + * doc/autoconf.texi (Caching Results): Fix the examples to use a + recommended quoting style and discard unwanted output. + +2006-03-05 Paul Eggert + + * lib/autotest/general.m4 (_AT_NORMALIZE_TEST_GROUP_NUMBER): New macro. + (AT_INIT): Use it, to remove arbitrary limit of 999,999 test + cases, and to work around Tru64 expr bug. + +2006-03-05 Ralf Wildenhues + + * doc/autoconf.texi (Limitations of Usual Tools): Mention Tru64 + expr bug that turns the result of a regex match into a number if + possible. + +2006-03-04 Ralf Wildenhues + + * lib/autoconf/types.m4 (AC_CHECK_ALIGNOF): Work around + HPUX compiler bug, similarly to AC_CHECK_SIZEOF, as documented + in section `Specific Compiler Characteristics'. + +2006-03-04 Eric Blake + + * lib/autoconf/functions.m4 (AC_FUNC_STRERROR_R): Avoid unused + variable warning. + +2006-03-01 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Force correct + order of variable initialization, so even the Solaris 2.6 shell + can create a config header correctly. Fixes lots of test suite + failures. + +2006-02-22 Ralf Wildenhues + + * doc/autoconf.texi (Text processing Macros): New node to + document the m4sugar macros m4_re_escape, m4_tolower, + m4_toupper, m4_split, m4_normalize, m4_append, m4_append_uniq. + +2006-02-22 Paul Eggert + + * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Fix typo: + XrmInitialize (0) -> XrmInitialize (). + Reported by Toshio Kuratomi. + +2006-02-21 Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (AS_IF): Extend to allow more than one + test, as in `if tests; then cmd1; elif ...; else ...; fi'. + * doc/autoconf.texi (Programming in M4sh): Adjusted. + * tests/m4sh.at (AS_IF and AS_CASE): Test this. Also make sure + both macros are defun'ed so that required macros are evaluated + outside. + + * doc/autoconf.texi (Prerequisite Macros): State more precisely + where a required macro will be expanded. + (Coding Style): Another reason not to use `m4_define'. + +2006-02-21 Eric Blake + + * lib/autoconf/general.m4 (_AC_LIBOBJ): Minor optimization. + +2006-02-20 Ralf Wildenhues + + * doc/autoconf.texi (Looping constructs): New node, to + document m4_for, m4_foreach, m4_foreach_w, and mention + obsolete AC_FOREACH. + (Obsolete Macros): Document AC_FOREACH. + * lib/m4sugar/m4sugar.m4 (_m4_for): Fix declaration comment. + (m4_for): Fix to never loop (almost) endlessly, work correctly + with arithmetic expressions in arguments, a step of zero or + non-integer multiple of the interval, and avoid integer + overflow. + * tests/m4sugar.at: New test for m4_for, m4_foreach, and + m4_foreach_w. + +2006-02-20 Romain Lenglet + + Add basic support for Erlang, both for configuring Erlang/OTP + tools, and Erlang as a conf test language. + * lib/autoconf/erlang.m4: New file. + * lib/autoconf/autoconf.m4: Add erlang.m4. + * lib/autoconf/Makefile.am (dist_autoconflib_DATA): Likewise. + * lib/freeze.mk (autoconf_m4f_dependencies): Likewise. + * NEWS: Add short description of new macros. + * THANKS: Add Romain Lenglet. + +2006-02-20 Ralf Wildenhues + + * doc/autoconf.texi (Shellology) : Document that pdksh as + native /bin/sh may not set KSH_VERSION (seen on OpenBSD). + +2006-02-15 Eric Blake + + * lib/autoconf/general.m4 (AC_CHECK_DECL): Avoid unused variable + warning. + +2006-02-15 Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (AS_CASE): New macro. + (_AS_CASE): Private helper macro. + * tests/m4sh.at: Basic tests for AS_IF and AS_CASE. + * doc/autoconf.texi (Programming in M4sh): Document AS_CASE. + Fix syntax of AS_IF description + (Prerequisite Macros): Mention AS_IF and AS_CASE as workarounds + for the AC_REQUIRE mess. + * NEWS: Mention AS_CASE, AS_BOURNE_COMPATIBLE, and + AS_SHELL_SANITIZE. + +2006-02-14 Paul Eggert + + * doc/autoconf.texi: Minor style cleanup. + Be consistent about spaces after commas. + Insert [] where empty args look a bit funny. + Fix some "i.e." and "e.g." usages. + Try to avoid "X/Y" usages. + Don't be pedantic about "ISO C99"; just say C99. + Prefer GNU style for spaces in front of parens. + (Function Portability): Comment about C89 versus C99 + signed integer division. + (Particular Headers): Use current gnulib style for dirent + includes. + +2006-02-14 Stepan Kasal + and Ralf Wildenhues + + * bin/autoupdate.in (handle_autoconf_macros): Fix updating of + macros without parameters. + * lib/autoconf/autoupdate.m4 (AU_ALIAS): Likewise. + * doc/autoconf.texi (Obsoleting Macros): Document AU_ALIAS. + * tests/tools.at (autoupdating AU_ALIAS): New test for AU_ALIAS + `$#' bug. + (autoupdate): Updated to match AU_ALIAS fix. + +2006-02-13 Ralf Wildenhues + and Paul Eggert + + * doc/autoconf.texi (Programming in M4sh): Document + AS_BOURNE_COMPATIBLE and AS_SHELL_SANITIZE. + +2006-02-13 Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Renamed to.. + (AS_BOURNE_COMPATIBLE): ..this. + (_AS_RUN, AS_SHELL_SANITIZE): Adjusted all callers. + +2006-02-12 Paul Eggert + + * doc/install.texi (Defining Variables): Tighten up the + CONFIG_SHELL wording. + +2006-02-12 Paul Eggert + and Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Look at the output + of (set -o) rather than testing whether (set -o posix) succeeds, + to work around a bug in the AIX 5.3 shell. Problem originally + reportd by Howard Chu for libtool. + +2006-02-10 J.T. Conklin + + * doc/autoconf.texi (Running the Compiler, Running the Linker): + Changes the macro arguments in summaries to match the + descriptions. + +2006-02-04 Stepan Kasal + + * doc/install.texi (Defining Variables): Classify the `CONFIG_SHELL' + hint as ``a workaround for a bug.'' + +2006-01-31 Ralf Wildenhues + + * bin/autoreconf.in: New option `--no-recursive'. + Improve wording for subpackages a bit. + * doc/autoconf.texi (autoreconf Invocation): Updated. + * NEWS: Updated. + + * doc/install.texi (Defining Variables): Put `CONFIG_SHELL' + in environment of `configure', not the command line. + Reported by Howard Chu . + +2006-01-25 Paul Eggert + + * doc/autoconf.texi (Limitations of Builtins): Document the + problem with "trap -". + +2006-01-23 Steven G. Johnson + + * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS, _AC_FC_DUMMY_MAIN): + (_AC_FC_MAIN, __AC_FC_NAME_MANGLING): Use _AC_LANG in check + messages to differentiate Fortran and Fortran 77 tests. + (AC_FC_SRCEXT, AC_FC_FREEFORM): Use AC_LANG_PUSH/POP instead of + AC_LANG_ASSERT, to allow use in mixed-language projects. + +2006-01-23 Paul Eggert + + * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)): Prefer "defined + FOO" to "defined (FOO)". + * lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA): Likewise. + * lib/autoconf/headers.m4 (AC_HEADER_STAT): Likewise. + * lib/autoconf/specific.m4 (AC_XENIX_DIR): Likewise. + * tests/tools.at (ifnames): Likewise. + +2006-01-21 Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Do not pass `-q' to mktemp. + * lib/Autom4te/General.pm (mktmpdir): Likewise. + (END): Improve error message a bit. + Reported by Bruce Korb . + +2006-01-12 Ralf Wildenhues + + * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Ignore + `-LIST:' and `-LNO:', for PathScale 2.3 compilers. + +2006-01-11 Stepan Kasal + + * doc/autoconf.texi (Header Portability): On Solaris 8, sys/ptem.h + requires sys/stream.h. Reported by Oliver Kiddle. + +2006-01-11 Ralf Wildenhues + Stepan Kasal + + * lib/autotest/general.m4 (AT_INIT): When ensuring writability + before the removals of test dirs, use `find' to avoid modification + of symlinked directories. + +2006-01-11 Steven G. Johnson + + * lib/autoconf/fortran.m4 (AC_F77_DUMMY_MAIN, AC_FC_DUMMY_MAIN): + Don't ignore the macro arguments. + +2006-01-11 David Thompson + + * lib/autoconf/c.m4 (_AC_PROG_CXX_EXIT_DECLARATION): Add `exit' + declaration that works for MSVC. + +2006-01-11 Ralf Wildenhues + + * lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT_REJECT): + Add `*.map' and `.inf' for Green Hills compiler. + Reported by Stefan Seefeld . + + * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Handle quadrigraphs + correctly: pad with spaces after FIRST_PREFIX if necessary, + and compute string lenghts with `m4_qlen' instead of `m4_len'. + * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Comments updated. + * tests/m4sh.at (AS_HELP_STRING): Test extended. + * NEWS: Updated. + Reported by numerous people, numerous times. + +2006-01-05 Paul Eggert + + * bin/autoconf.as, bin/autoheader.in, bin/autom4te.in + * bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in: + * lib/autoconf/general.m4, lib/autoconf/status.m4: + * lib/autotest/general.m4, tests/local.at: + Update copyright year to 2006. + + * Makefile.maint (sc_root_tests): Use the recommended style s/a/b/ for + sed substitutions. + * doc/autoconf.texi (Installation Directory Variables): Use s|a|b| + for file names, again. Reported by Noah Misch. + (Coding Style): Explain that s|a|b| is preferred for file names. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): Prefer s/a/b/. + (AC_OUTPUT_MAKE_DEFS): Likewise. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Likewise. + * tests/local.at (AT_CHECK_AUTOM4TE): Likewise. + + Fix Posix-conformance bugs re use of { command in sed scripts, + and improve the sed-related documentation a bit. + * doc/autoconf.texi (Installation Directory Variables): Use + our own style advice re 's,a,b,' versus 's|a|b|'. Use "Sed" + rather than "sed" when talking about Sed in general. + (Particular Programs): Likewise. + (Coding Style): y is like s with respect to / and ,. + (Limitations of Usual Tools): Document the weird restrictions + that Posix has about { }. Use better quoting. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE, _AC_OUTPUT_HEADER): + Rewrite to conform to Posix rules about { } in sed scripts. + * lib/m4sugar/m4sh.m4 (AS_DIRNAME_SED, AS_BASENAME_SED): Likewise. + * tests/foreign.at (Libtool): Likewise. + * tests/semantics.at (AC_CHECK_PROG & AC_CHECK_PROGS): + Use our own style advice re 's,a,b,' versus 's|a|b|'. + +2006-01-05 Ralf Wildenhues + + * lib/autoconf/status.m4: Fix typo. + + * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Ignore + singly- or doubly-quoted arguments to `-cmdline', `-ignore', + `-def', for the benefit of Portland `pgf90 -Mipa'. + Reported by Christopher Hulbert . + +2006-01-04 Paul Eggert + + * doc/autoconf.texi: Update copyright (and other) dates to 2006. + * doc/autoconf.texi (Shellology): Mac OS X 10.2 changed the default + shell from zsh to bash. + +2005-12-31 Stepan Kasal + + * lib/autoconf/programs.m4 (_AC_PROG_GREP): Use $PATH_SEPARATOR; + ":" caused problems on OS/2-EMX. Suggested by Andrew Belov. + +2005-12-29 Paul Eggert + + * doc/autoconf.texi (Shell Substitutions): Warn about unbalanced + parentheses in $(...). Problem reported by Eric Blake. + +2005-12-12 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): + Mention which characters can be escaped with \ in portable regular + expressions used in grep, sed, expr. Mention the leading ^ problem + with expr. Clean up some confusing wording. Mention which + grep options are portable. + +2005-12-09 Stepan Kasal + + * tests/local.at (AT_CHECK_AUTOM4TE): Fix typo in the comment. + +2005-12-02 Paul Eggert + + * doc/autoconf.texi (Limitations of Builtins): Fix typos in previous + patch, noted by Ralf Wildenhues. + +2005-12-02 Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Try `set -o + posix' unconditionally, for pdksh in `native sh' emulation. + +2005-12-01 Paul Eggert + + * doc/autoconf.texi (Shellology): Document eval $? problem + with ash. + (Limitations of Builtins): Likewise. + +2005-11-10 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Pass + CONFIG_SHELL in the environment of the configure rerun. + * doc/autoconf.texi (Here-Documents, config.status Invocation): + Suggest passing CONFIG_SHELL absolute, and in the environment + rather than as option. + +2005-11-09 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): + Fix quoting of output line (triggered for many AC_SUBST_FILEs). + Fix macro quoting. Fix output for n * 98 substituted variables. + +2005-11-08 Ralf Wildenhues + + * lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Initialize + `tmp' to avoid file removal race. + +2005-11-07 Ralf Wildenhues + + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Initialize + ac_clean_files and LIBOBJS. + +2005-11-06 Ralf Wildenhues + + * lib/autoconf/programs.m4 (AC_CHECK_PROG, AC_PATH_PROG): + Factor functionality to.. + (_AC_CHECK_PROG, _AC_PATH_PROG): these new macros, but only + `AC_SUBST($1)' in the public version. + (AC_CHECK_TOOL, AC_PATH_TOOL, AC_PATH_TARGET_TOOL) + (AC_CHECK_TARGET_TOOL): Use internal versions for ac_ct_* and + ac_pt_* variables. + +2005-11-01 Stepan Kasal + + * lib/autoconf/c.m4 (AC_PROG_CC_C_O): Remove the comment about 8+3 + filesystems. + +2005-11-01 Ralf Wildenhues + + * NEWS: Move AH_HEADER mention to right place. + +2005-10-27 Stepan Kasal + + * lib/autoconf/c.m4 (AC_PROG_CC_C_O): "conftst2" -> "conftest2" + * lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O): Likewise. + +2005-10-25 Stepan Kasal + + * lib/autoconf/c.m4 (AC_PROG_CC_C_O): rm -f conftst2.*, not only + conftst2.$ac_objext. + * lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O): Likewise. + +2005-10-24 Stepan Kasal + + * lib/autoconf/c.m4 (AC_PROG_CC_C_O): Use conftst2.o instead of + conftest.o, to see whether the compiler really obeys; rm the object + file before and after the test and register it with ac_clean_files. + * lib/autoconf/fortran.m4 (_AC_PROG_FC_C_O): Likewise. + +2005-10-21 Stepan Kasal + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE): When determining, + the delimiter CEOF$ac_eof: fix quoting of CEOF[0-9]* and modify the + code so that the most common case requires less forks. + +2005-10-20 Stepan Kasal + + * doc/autoconf.texi (Shell Substitutions}: Document that ${10} is + not portable; thanks to Paul Eggert and Alexandre. + + * NEWS: Fix an old typo. + +2005-10-20 Jim Meyering + + * doc/autoconf.texi: Typo: s/feature/features/ in ``the features of + the latter'', in two places. + +2005-10-19 Paul Eggert + + * doc/autoconf.texi (Generating Sources): AC_LANG_PROGRAMS -> + AC_LANG_PROGRAM, fixing a typo. Don't give details about + the inner workings of AC_LANG_FUNC_LINK_TRY. + * lib/autoconf/c.m4 (AC_LANG_CALL(C)): Reformat to match + AC_LANG_FUNC_LINK_TRY. This involves returning the value returned + by the function rather than ignoring it. + (AC_LANG_FUNC_LINK_TRY(C)): Call the function rather than simply + comparing its address. Intel's interprocedural optimization was + outsmarting the old heuristic. Problem reported by + Mikulas Patocka. + +2005-10-19 Stepan Kasal + + * lib/autoconf/general.m4 (AC_SUBST): Remove an obsolete comment. + +2005-10-05 Paul Eggert + + * lib/m4sugar/m4sugar.m4 (_m4_map): New macro. + (m4_map, m4_map_sep): Use it. Handle the empty list correctly. + +2005-10-04 Stepan Kasal + + * lib/autotest/general.m4 (AT_INIT): Really make the subtree writable + before removing it (chmod -R u+rwx); there are three instances of this. + +2005-10-02 Ralf Wildenhues + Stepan Kasal + + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Balance parentheses. + * lib/autotest/general.m4 (AT_INIT): If the test dir already exists, + make its content writable before removing it. Remove an errorneous + comment from the end, where the logs of the failed tests are copied + to the main log file. + +2005-09-27 Stepan Kasal + + * tests/semantics.at (AC_C_BIGENDIAN): Pass --force to autoheader, + in case the computer is too quick. Double quote the configure.ac + snippets. + + * tests/local.at (AT_CHECK_AUTOCONF): Always pass --force to prevent + problems if the testsuite were running too fast. + +2005-09-18 Paul Eggert + + * lib/autoconf/libs.m4 (_AC_PATH_X_DIRECT): Look for X11/Xlib.h + and XrmInitialize rather than X11/Intrinsic.h and XtMalloc + (which belong to Xt, not X itself). See Debian bug 327655. + * NEWS: Mention this. + +2005-09-07 Stepan Kasal + + * lib/autoconf/c.m4 (AC_LANG_SOURCE(C)): Remove an incorrect comment. + +2005-09-06 Paul Eggert + + * config/move-if-change: Don't output "$2 is unchanged"; + suggested by Ben Elliston. Handle weird characters correctly. + +2005-09-06 Stepan Kasal + + * lib/autoconf/libs.m4 (AC_SEARCH_LIBS): Merge the two AC_LINK_IFELSE + calls, so that the final expansion of this macro is shorter. + Create the conftest.$ac_ext outside the `for' loop, to speed the run. + Do not use `break' in the argument to AC_LINK_IFELSE, it would skip + the cleanup there. Use AS_VAR_* macros, to be more general. + * tests/semantics.at (AC_SEARCH_LIBS): Check for the cleanup. + + * lib/autoconf/general.m4: Use AS_IF where appropriate. + + * lib/m4sugar/m4sh.m4 (AS_IF): Use m4_default. + +2005-09-01 Stepan Kasal + + * doc/autoconf.texi (Configuration Headers): Add an index entry + for AH_HEADER. + +2005-08-26 Pavel Roskin + + * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Use shell variable + XMKMF to locate xmkmf. Make XMKMF precious. Export CC when + running xmkmf. + +2005-08-26 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_VERSION_COMPARE_PREPARE): + The previous patch didn't work, so try a better one. + +2005-08-26 Stepan Kasal + + * doc/autoconf.texi (Programming in M4sh) : Fix m4 quoting + in the example. Reported by Bruno Haible. + : Likewise. Also modify the example to be more convincing: + "if $undefined_var;" succeeds with my shell. + + * lib/autoconf/general.m4 (AC_CANONICAL_BUILD, AC_CANONICAL_HOST, + AC_CANONICAL_TARGET): Define by AC_DEFUN, no need to use AC_DEFUN_ONCE; + but change the m4_divert_text to m4_divert_once. + +2005-08-25 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_VERSION_COMPARE_PREPARE): + Work around bug in Solaris /usr/xpg4/bin/awk. + The bug is present in at least Solaris 8 through 10. + +2005-08-24 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Simplify; rejecting + some evil values and relying on the fact that $* concatenates the + parameters by the first character from IFS. + +2005-08-23 Ralf Wildenhues , + Stepan Kasal + + * lib/autoconf/status.m4 (_AC_CONFIG_REGISTER_DEST): When the + first header appears, define AH_HEADER. + * doc/autoconf.texi (Configuration Headers): Document AH_HEADER. + Update limitations about when to call AC_CONFIG_HEADERS. + (Configuration Commands): Document that AC_CONFIG_COMMANDS_PRE + parameter can call AC_SUBST, AC_DEFINE, or AC_CONFIG_FOOS; explain + that AC_CONFIG_COMMANDS_PRE and AC_CONFIG_COMMANDS_POST are not + ``Configuration Actions''; fix their index entries. + + * lib/autotest/general.m4 (AT_INIT): Process multiple keywords + options correctly. Process N-M as M-N if M is smaller than N. + Process ranges correctly so that N-N will run only N. + Sort and uniquify the tests that will be run. If there is more + than one test, reinsert the banners for the tests. + * tests/autotest.at (Keywords): Unmark XFAIL. + +2005-08-23 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_DEFINE_Q): Strip the parameter list + before passing the macro name to AH_TEMPLATE. + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): config.status + now opens log after option processing; in particular, --version + and --help do not touch config.log. + + * Makefile.maint: Revert the change from 2005-08-12. + +2005-08-22 Stepan Kasal + + * lib/autoconf/general.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Factor out + common code to... + (_AC_ENABLE_IF, _AC_ENABLE_IF_ACTION): ... these new macros. + +2005-08-21 Ralf Wildenhues + + * doc/autoconf.texi (Using Autotest, testsuite Scripts) + (Autotest Logs, Writing testsuite.at, testsuite Invocation): + Language cleanup. + + * doc/autoconf.texi (Defining Symbols, Changed Results): + Prepend to LIBS, not append, in examples. + +2005-08-16 Stepan Kasal + + When building in place, set srcdir="."; suggested by Tim Van Holder. + + * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): Do this; to recognize + build in place, we need ac_pwd, and thus have to AC_REQUIRE ... + (_AC_INIT_DIRCHECK): ... this macro and AC_DEFUN both of them. + * lib/autoconf/status.m4 (_AC_SRCDIRS): Fix a comment: srcdir="." + does not mean "no --srcdir option". + +2005-08-15 Ralf Wildenhues + + * tests/autoscan.at (autoscan): New file. + * tests/suite.at: Use it. + * tests/Makefile.am (TESTSUITE_HAND_AT): Add it. + Reported against Libtool by Gideon Go . + + * tests/autotest.at (Keywords): Test keywords combinations. + +2005-08-12 Stepan Kasal + + * Makefile.maint (GZIP_ENV): When checking the help text of gzip, + add "2>&1"; gzip 1.2.4 prints help on stderr. + +2005-07-27 Stepan Kasal + + * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): The symbol at_reason + was pushdef'ed twice while popped only once. Push it only once. + (_AT_CHECK): Cosmetic changes to the "case $at_status" command. + +2005-07-26 Stepan Kasal + + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): The message is now + prefixed by mere "===", not "configure: === ". + +2005-07-25 Paul Eggert + + * Makefile.maint: Update from Bison. + + * lib/m4sugar/m4sugar.m4 (m4_strip): Comment fix---change tab to + "" in comment, so that the point is understandable. + +2005-07-25 Stepan Kasal + + Rewrite substantial part of lib/autoconf/status.m4. + The main change is that CONFIG_FILES, CONFIG_HEADERS, CONFIG_LINKS, + and CONFIG_COMMANDS are not processed in four separate loops. + Instead, there is one main loop. This allows that the common code + is expanded only once, thus config.status (and configure) is smaller. + + The registration mechanism in AC_CONFIG_FILES and cousins also + changed; the AC_LIST_FILES and cousins macros are no longer used. + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, + _AC_OUTPUT_LINKS, _AC_OUTPUT_COMMANDS): Renamed to ... + (_AC_OUTPUT_FILE, _AC_OUTPUT_HEADER, _AC_OUTPUT_LINK, + _AC_OUTPUT_COMMAND): ..., respectively. These macros no longer + contain the initialization, nor the for loop, nor the associated + commands; all these go to ... + (_AC_OUTPUT_MAIN_LOOP): ... this new macro, called from + _AC_OUTPUT_CONFIG_STATUS. + (_AC_CONFIG_SPLIT, _AC_CONFIG_SPLIT_SOURCE_DEST, _AC_CONFIG_SPLIT_FILE_IN): + Nuked; the code was merged into _AC_OUTPUT_MAIN_LOOP. + (_AC_OUTPUT_FILE): The creation of the sed script ... + (AC_OUTPUT): ... and the setup of ac_vpsub goes to ... + (_AC_OUTPUT_FILES_PREPARE): ... a new macro, also called from + _AC_OUTPUT_MAIN_LOOP. + (_AC_CONFIG_FILES, _AC_CONFIG_HEADERS, _AC_CONFIG_LINKS, + _AC_CONFIG_COMMANDS): Use ... + (_AC_CONFIG_FOOS): ... this new macro, which uses these ... + (_AC_CONFIG_REGISTER, _AC_CONFIG_REGISTER_DEST): ... new macros. + (_AC_CONFIG_FILE, _AC_CONFIG_HEADER, _AC_CONFIG_LINK, + _AC_CONFIG_COMMAND, _AC_CONFIG_DEPENDENCIES): No longer needed. + (_AC_CONFIG_DEPENDENCY): Update, it uses these ... + (_AC_CONFIG_DEPENDENCY_DEFAULT, _AC_FILE_DEPENDENCY_TRACE_COLON): + ... new macros. + (_AC_CONFIG_UNIQUE): Update. + (AC_LIST_FILES, AC_LIST_HEADERS, AC_LIST_LINKS, AC_LIST_COMMANDS): + Replaced by this ... + (_AC_LIST_TAGS): ... new common macro. + (AC_LIST_FILE_COMMANDS, AC_LIST_HEADER_COMMANDS, AC_LIST_LINK_COMMANDS, + AC_LIST_COMMAND_COMMANDS): Replaced by this ... + (_AC_LIST_TAG_COMMANDS): ... new common macro. + (_AC_CONFIG_COMMANDS_INIT): Moved top to the `registration' section; + this didn't belong to the `config commands' section. + (_AC_OUTPUT_COMMANDS_INIT): Don't initialize, m4_ifdef is our friend. + (AC_CONFIG_COMMANDS_PRE, AC_OUTPUT_COMMANDS_PRE, + AC_CONFIG_COMMANDS_POST): Moved to a new section, these didn't belong + to the `config commands' section either. + (AC_CONFIG_SUBDIRS): Don't touch diversion DEFAULTS. + (_AC_LIST_SUBDIRS): Don't initialize, m4_ifdef is our friend. + + ... and many changes to the comments nearby. + + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): At the end of the day, + set ac_subdirs_all='_AC_LIST_SUBDIRS'. + * tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): + AC_CONFIG_COMMANDS(command:input,...) is no longer allowed. + (#define header templates): The comment at the top of the generated + header now includes the name(s) of the source file(s). + + Several unrelated small changes: + + * lib/autoconf/general.m4 (AC_CACHE_VAL): Be didactic, quote the first + parameter to AC_DIAGNOSE. + * lib/autoconf/status.m4 (AC_CONFIG_SUBDIRS): Likewise. + (_AC_LINK_FILES_CNT): Don't AU_DEFUN this; it causes confusing messages + with autoupdate; use m4_define_default inside AU_DEFUNed AC_LINK_FILES. + (AC_OUTPUT): In the compatibility code, use m4_ifvaln, to be consistent + with AU::AC_OUTPUT. + (AU::AC_OUTPUT): Don't double-quote $2 and $3, the compatibility code + in AC_OUTPUT doesn't double-quote it either. + * tests/tools.at (autoupdate): AU::AC_OUTPUT no longer double-quotes the + parameters. + +2005-07-10 Stepan Kasal + + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Document which + versions of Portland Group compiler produce single- and double-quoted + -cmdline argument. Reported by Steven G. Johnson + and Ole Holm Nielsen . + +2005-07-07 Paul Eggert + + * tests/local.at (AT_CONFIG_CMP): Ignore lines like "LIBS=''" too. + This is a corrected version of yesterday's patch. + +2005-07-07 Stepan Kasal + + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Report the full + path, too; insert a "===" to emphasize the line. + + * lib/autoconf/general.m4 (AC_CANONICAL_BUILD): Rename + ac_cv_build_alias to ac_build_alias. + (AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Simplify. + + On 2005-02-24, an unintentional AC_SUBST([CC]) was introduced; this + change eliminates it. Problem reported by Alexandre Duret-Lutz. + * lib/autoconf/general.m4 (_AC_ARG_VAR_PRECIOUS): Move the AC_SUBST ... + (AC_ARG_VAR): ... here. + (_AC_INIT_PREPARE): Call AC_SUBST for build_alias, host_alias and + target_alias. + + Keep a list of all precious variables and process them with one simple + for loop, instead of expanding all commands, or, OTOH, complicated + processing of output of "set". + * lib/autoconf/general.m4 (_AC_ARG_VAR_PRECIOUS): Accumulate the + variable names in new macro... + (_AC_PRECIOUS_VARS): ... which will be assigned to ac_precious_vars. + (_AC_ARG_VAR_STORE): New macro which writes to diversion PARSE_ARGS + a loop to assign all ac_env_* and ac_cv_env_* variables. + (_AC_ARG_VAR_VALIDATE): Use shell variable ac_precious_vars, divert + to INIT_PREPARE. + (_AC_INIT_DEFAULTS): At the end, if _AC_PRECIOUS_VARS is set, assign + its value to shell variable ac_precious_vars and call + _AC_ARG_VAR_STORE and _AC_ARG_VAR_VALIDATE. + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Don't call + _AC_ARG_VAR_VALIDATE. + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Move AC_LANG_PUSH(C) + and the AC_SUBSTs ... + (AC_INIT): ... here. + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Changed the title of + the ac_subst_files section in config.log. + + * tests/local.at (AT_CONFIG_CMP): Revert Paul's previous change. + +2005-07-06 Paul Eggert + + * NEWS: New macro AC_C_TYPEOF. + * doc/autoconf.texi (C Compiler): Document AC_C_TYPEOF. + * lib/autoconf/c.m4 (AC_C_TYPEOF): New macro. + * tests/c.at (C keywords): Test AC_C_TYPEOF. + + Fix problems reported by Nicolas Joly. + * tests/base.at (Input/Output): Ignore 'loading site script' chatter. + * tests/local.at (AT_CONFIG_CMP): Ignore lines like "LIBS=''" too. + They are generated by the Tru64 v5.1B shell. + +2005-07-05 Stepan Kasal + + Fix my changes from 2005-07-01; reported by Noah Misch. + * lib/autoconf/status.m4 (_AC_CONFIG_DEPENDENCIES): Fix the + description, the macro now accepts only a single tag. + (_AC_CONFIG_UNIQUE): Likewise; s/AC_File/[$1]/ + + Fix cases when the varsions of Autoconf and Autotest don't match. + Reported by Noah Misch. + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Set also + at_top_builddir, for compatibility with older autotest. + * lib/autotest/general.m4 (AT_INIT): If at_top_build_prefix + is not set, use at_top_builddir, for compatibility with older + versions of autoconf. + +2005-07-04 Paul Eggert + + * bin/autom4te.in ($m4): Catch usages like --nesting-limit=2048. + Problem reported by Patrick Welche. + +2005-07-03 Paul Eggert + + * lib/autoconf/general.m4 (AC_ARG_PROGRAM): Use &, not |, in + sed substitution command, so that we allow | in program prefixes + and program suffixes. (& is a problem anyway; we're not fixing + that here.) + * lib/autoconf/status.m4 (AC_CONFIG_FILES): Likewise, for + configure_input, top_builddir, srcdir, etc. + * lib/autotest/general.m4 (AT_INIT): Likewise, for + PATH_SEPARATOR in AUTOTEST_PATH. + +2005-07-02 Alexandre Duret-Lutz + + * lib/autoconf/general.m4 (AC_SITE_LOAD): Rewrite the + for loop over config.site files using `set', to allow + directory names containing IFS characters. + +2005-07-01 Paul Eggert + + * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK): Remove the tests for + directories with weird names. Apparently some people like living + on the edge. However, improve the test that "pwd" actually does + report a name for the working directory. + * NEWS: Remove the claim that we test for funny chars in dir names. + +2005-07-01 Stepan Kasal + + * lib/autoconf/general.m4 (AC_FOREACH): Make obsolete; it's + replaced ... + * lib/m4sugar/m4sugar.m4 (m4_foreach_w): ... by this new macro. + * lib/autoconf/status.m4 (_AC_CONFIG_DEPENDENCIES, _AC_CONFIG_UNIQUE): + Now accept a single tag, not whitespace separated list. + (AC_CONFIG_SUBDIRS): Call _AC_CONFIG_UNIQUE in a m4_foreach_w loop. + +2005-06-30 Stepan Kasal + + * doc/autoconf.texi (Configuration Headers): Change the explanation + about #include . + (Generic Functions): Mention the Gnulib project. + (Limitations of Usual Tools) : Another minor rephrasing. + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Use a here + document to output the default config_* lists to config.status. + Don't recognize option --file, if the functionality is not there. + Likewise for --header; moreover, recognize --he and --h as shortcuts + for --help in that case. + + * lib/autoconf/status.m4: Fix the order of the "sections", so that it + matches the order of execution. No code changed. + +2005-06-30 Ralf Wildenhues + + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Fix also for + single-quoted -cmdline argument in Portland Group compiler. + Reported against LAM by Ole Holm Nielsen . + +2005-06-30 Alexandre Duret-Lutz + + * lib/autom4te.in (Automake-preselections): Preselect AC_SUBST_TRACE. + +2005-06-29 Stepan Kasal + + * doc/autoconf.texi (File Descriptors): ksh doesn't pass open file + descriptors to child processes; reported by Norman Gray. + +2005-06-29 Stepan Kasal + + * lib/autoconf/general.m4 (AC_ARG_VAR): Move next to _AC_ARG_PRECIOUS. + + * lib/autoconf/general.m4 (AC_SUBST_TRACE): New macro, to be traced + instead of AC_SUBST; proposed by Alexandre Duret-Lutz. + (AC_SUBST): Call it. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Call AC_SUBST_TRACE for + the directory specific variables; but don't call it for configure_input. + +2005-06-28 Derek Price + + * doc/autoconf.texi (Limitations of Usual Tools) : Reword recent + addition. + +2005-06-23 Paul Eggert + + * NEWS: Don't worry about spaces in bindir etc. Only srcdir and working + directory have inherent problems with special characters like spaces, + due to limitations in Make syntax. Problem reported by Alexandre + Duret-Lutz. + * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK): Implement the above. + Also, fix Tru64 porting problem with shell patterns, + reported by Ralf Wildenhues. + +2005-06-23 Ralf Wildenhues + + * doc/autoconf.texi (Subdirectories): Fix markup typos. + +2005-06-23 Paul Eggert + + * tests/local.at (AT_CHECK_ENV): Simplify regexp slightly. + + Fix some more shell quoting problems. Prompted by a bug report + from Justace Clutter. + * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK): Put name of invalid + variable into diagnostic. Make the diagnostic an error, not a warning, + because we really don't support spaces and suchlike in dir names. + (_AC_INIT_SRCDIR): Allow special characters in $ac_unique_file. + Don't worry about backslashes in srcdir; it can't happen now. + (_AC_INIT_PARSE_ARGS): Allow weird characters in ac_optarg. + Simplify ac_optarg handling. + (_AC_ARG_VAR_VALIDATE): Remove unnecessary and inconsistent quotes. + +2005-06-22 Stepan Kasal + + Fix AT_CONFIG_CMP for Solaris hosts; idea from Ralf Menzel. + * configure.ac: Call AC_PROG_EGREP and AC_PROG_SED. + * tests/atlocal.in: Propagate $EGREP and $SED. + * tests/local.at (AT_CHECK_ENV): Use $EGREP, not $GREP -E. + (AT_CONFIG_CMP): Use sed instead of grep plumbing. + + * doc/autoconf.texi (Limitations of Usual Tools) : Mention + that '\|' is not allowed in BREs; recommend using newline separated + list of patterns instead of multiple -e options. + + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Remove an old comment. + + * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Use AC_SUBST/2. + +2005-06-22 Ralf Wildenhues + + * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Fix typo. + +2005-06-21 Stepan Kasal + + * doc/autoconf.texi (Limitations of Usual Tools) : Document that + b, t, r, w commands require single space, while : cannot have any. + (Special Shell Variables): Fix sed code this in the example. + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): Likewise; and fix a typo. + * lib/autotest/general.m4 (AT_ARG_OPTION): Fix typo in the description. + + * lib/m4sugar/m4sugar.m4 (m4_split): If the parameter is empty, + expand to the empty list. Don't use two pairs of m4_changequote, + it's not necessary. + +2005-06-20 Derek Price + + * lib/m4/programs.m4 (AC_PROG_YACC): Declare YACC & YFLAGS precious. + +2005-06-17 Paul Eggert + + * lib/m4sugar/m4sh.m4 (as_awk_strverscmp): Port to Solaris /bin/awk. + * doc/autoconf.texi: + Don't mention Solaris versions so much, if a + problem is common to all extant versions of Solaris. Say "SunOS + 4" instead of "SunOS" for SunOS 4. + (awk): Mention more of the limitations of traditional Awk. + (cat): Don't talk about cat -v. + +2005-06-16 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_VERSION_COMPARE_PREPARE): New macro. + (AS_VERSION_COMPARE): New macro. The API is taken from CVS, + but the implementation is entirely different and is designed + to be compatible with glibc strverscmp. + * tests/m4sh.at (AS_VERSION_COMPARE): New test. + + * doc/autoconf.texi (Limitations of Usual Tools): Mention expr bug + on Mac OS X 10.4 reported by Peter O'Gorman in: + http://lists.gnu.org/archive/html/autoconf-patches/2005-06/msg00041.html + * lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): + Use shell builtins rather than 'expr', to work around expr bug. + +2005-06-10 Paul Eggert + + * doc/autoconf.texi: "filesystem" -> "file system". + "behaviour" -> "behavior". + Warn about \(...\)* in Solaris sed (written by Ralf Menzel). + * lib/autoconf/general.m4: Omit blank after ":" sed command, + as per POSIX. + * lib/m4sugar/m4sh.m4: Likewise. + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): Work around problem + with Solaris sed. Fix by Ralf Menzel and Stepan Kasal. + + * man/Makefile.am (MOSTLYCLEANFILES): Add $(srcdir)/*.t. + (.x.1): Ignore the time stamp in the .TH line when deciding whether + to update the man page. That way, we don't have to check in new + man pages every month. + + * lib/m4sugar/m4sh.m4 (AS_VAR_TEST_SET): Work even if $1 contains + quotes and backslashes. Patch from Derek Price. + +2005-06-10 Derek Price + + * doc/autoconf.texi (Programming in M4sh): Document AS_TR_CPP & + AS_TR_SH. + +2005-06-08 Paul Eggert + + * lib/autotest/general.m4 (AT_INIT): Don't accept Solaris 9's diff + -u, since it outputs chatter if the input files are the same. + Problem reported by Ralf Menzel. + +2005-06-08 Derek Price + + * lib/m4sugar/m4sugar.m4: Undefine include & sinclude rather than + renaming them since they are about to be redefined anyhow. + +2005-06-08 Derek Price + + * doc/autoconf.texi (Redefined M4 Macros): Add index entries for most + redefined M4 macros to this node. Document m4_include & m4_sinclude. + Move m4_undefine to alphabetical order. + +2005-06-07 Paul Eggert + + * README: Recommend GNU M4 1.4.3 or later. + * doc/autoconf.texi (Introduction): Likewise. + Reword to avoid some formatting glitches. + Use "#!/bin/sh", not "#! /bin/sh"; the space isn't needed these days. + Clarify explanation of HP compiler bug. + Redo example output tp match current CVS snapshot. + Use @example.org in email addresses when the examples + might get inadvertently cut-and-pasted into user code. + Remove example of autom4te usage that doesn't seem to work now. + Use modern AC_INIT (except when the example is meant to be + shown with Autoconf 2.13). + Update ksh info for Solaris 9 and later. + KB -> kB. + Modernize description of Automake versions a bit. + Don't claim a future version of Autoconf is near. + * doc/install.texi: Reword to avoid some formatting glitches. + +2005-06-07 Ralf Wildenhues + + * doc/autoconf.texi: Add [] to examples, so that the manual + follows its own advice about quoting better. + Reword to avoid some formatting glitches. + * doc/installt.exi: Reword to avoid some formatting glitches. + + * doc/autoconf.texi (Limitations of Builtins) : Mention + Tru64 ksh pattern matching bug. Reported against Libtool by + Albert Chin and + Nicolas Joly . + +2005-06-06 Stepan Kasal + + m4_cdr of one-member list was [[]] (one-member list containing an + empty string) instead of [] (an empty list. Callers were skewed to + match this misbehaviour. As a consequence of this: + - m4_foreach([x], [], [foo]) expanded to `foo', while + - the expansion of m4_foreach([x], [[]], [foo]) was empty. + This bug has been fixed: + + * lib/m4sugar/m4sugar.m4 (m4_cdr): If only one argument is given, + expand to an empty string; print error msg if called without + an argument list. + (m4_foreach, m4_map, m4_map_sep): Don't expect the previous + misbehaviour; handle [] and [[]] correctly. + +2005-06-06 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Nuke ac_max_here_lines. + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): Simplify the sed + scripts created and the loop applying them, use _AC_SED_CMD_LIMIT. + +2005-06-06 Ralf Menzel (trivial change) + + * doc/autoconf.texi (Limitations of Usual Tools): Solaris' awk cannot + swallow records with more than 99 fields. + * lib/autotest/general.m4 (AT_INIT): Use the awk builtin `split' to + parse the long line. + +2005-06-04 Stepan Kasal + + * doc/autoconf.texi (Limitations of Usual Tools): AIX awk cannot + swallow literals longer than 399. Reported by Ralf Wildenhues. + * lib/autotest/general.m4 (AT_INIT): Pass $at_groups though stdin, + to workaround this limitation. + +2005-06-03 Steven G. Johnson + + * lib/autoconf/fortran.m4 (_AC_PROG_FC): Find g95 in addition + to gfortran, and make these the first two compiler names + checked (following the general autoconf preference for gcc). + +2005-06-03 Stepan Kasal + + * tests/Makefile.am (check_SCRIPTS): Set to $(wrappers). + (DISTCLEANFILES): Remove $(check_SCRIPTS). + (testsuite): Make sure autotest.m4f is up-to-date before using it. + +2005-06-02 Paul Eggert + + * lib/autotest/general.m4 (AT_INIT): Don't create a regular + expression of unbounded size when processing the --list + option. This runs afoul of a limit of 399 bytes per regular + expression on AIX. Problem reported by Ralf Wildenhues. + +2005-06-01 Paul Eggert + + * NEWS: Note yesterday's changes to AC_SUBST and AC_SUBST_FILE. + * doc/autoconf.texi (Particular Headers): Reword example + for multiline stdbool replacement. + (Setting Output Variables): Reword text a bit. Don't + give all the details about |#_!!_#|. + Reword description of line replacement. + +2005-05-31 Dan Manthey + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Output variables may + now contain newlines, and substituted files must be referenced on + a line alone; the sed scripts to substitute them are now very + different. + (_AC_SED_CMD_LIMIT): Added; single place to store limit on how many + commands can be put in a sed script portably. + * doc/autoconf.texi (Setting Output Variables): Document above + changes. (Particular Header Checks) : Give exaple + use of multiline substitution. + * tests/torture.at: No longer expect substitution of newline to fail. + +2005-05-27 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK): Fix diagnostics. + From Ralf Menzel (trivial change). + +2005-05-25 Paul Eggert + + * tests/local.at: Don't attempt to check for negated character + classes in shell scripts. The test was too brittle. + +2005-05-25 Stepan Kasal + + * bin/autoconf.as: Don't use "shift 2"; it's not portable enough. + * doc/autoconf.texi (Limitations of Builtins): Document this + limitation. + +2005-05-24 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG): New macro to factor out + common code; used in many places in the tree. + (AS_ESCAPE): Make the pattern a bit simpler; use \& insetad of \1. + (_AS_ECHO_UNQUOTED): Move the macro lower; no code change. + + * lib/m4sugar/m4sugar.m4 (m4_ifset): Use m4_ifval. + + * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): Merge the two error + messages when ac_unique_file is not found. + (AC_CONFIG_MACRO_DIR): Simplify the `if' at the end. + (AC_MSG_CHECKING, AC_MSG_RESULT): Put braces around the two echo + commands, for consistency with AC_MSG_ERROR and such. + + * bin/autoconf.as: Make more use of "shift 2" in option processing. + + * bin/Makefile.am: Merge the two rules for creating scripts. + +2005-05-23 Stepan Kasal + + * lib/autoconf/general.m4 (AC_MSG_RESULT_UNQUOTED): Make + obsolete; it was never documented. + (AC_CACHE_CHECK): Use AC_MSG_RESULT instead. + +2005-05-20 Stepan Kasal + + * NEWS: @top_builddir@ is now a dirname, ac_top_builddir will follow. + * lib/autoconf/status.m4 (_AC_SRCDIRS): Rename ... + (ac_top_builddir): ... this ... + (ac_top_build_prefix): ... to this; the old name is also kept, for + backward compatibility. + (ac_top_builddir_sub): New variable, without the trailing slash, + always nonempty. + (_AC_OUTPUT_FILES): s/@top_builddir@/$ac_top_builddir_sub/ + * doc/autoconf.texi (Configuration Actions): Rename + ac_top_builddir to ac_top_build_prefix. + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Rename + at_top_builddir to at_top_build_prefix. + * lib/autotest/general.m4 (AT_INIT): Likewise. + +2005-05-20 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Simplify the init + of confdefs.h . + +2005-05-17 Stepan Kasal + + * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Don't m4_quote the second + argument to m4_foreach. I guess it was necessary in the past, + but I think it's a no-op now. + +2005-05-17 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_INIT_HELP): Merge two consecutive + ``cat <<_ACEOF'' commands to one. + (_AC_CANONICAL_SPLIT): Use expr, not ``echo|sed.'' + * lib/autoconf/status.m4: On various places, use expr instead of + ``echo|sed.'' + (_AC_CONFIG_SPLIT, _AC_CONFIG_SPLIT_SOURCE_DEST): + (_AC_CONFIG_SPLIT_FILE_IN): New macros, to factor out common code. + * lib/autotest/general.m4 (AT_INIT): Use expr to get the numbers from + a range. + * tests/local.at (AT_CHECK_SHELL_SYNTAX): Use awk to search for + the wrong patterns between ``case'' and ``esac.'' The previous + code had false positives. + +2005-05-14 Alexandre Duret-Lutz + + * lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA): Prepend ${LIBOBJDIR}, + as on 2005-05-02. + * doc/autoconf.texi (Particular Functions) : + Mention LIBOBJDIR. + +2005-05-13 Paul Eggert + + * AUTHORS, BUGS, COPYING, ChangeLog, ChangeLog.0, ChangeLog.1, + ChangeLog.2, GNUmakefile, Makefile.am, Makefile.cfg, + Makefile.maint, NEWS, README, README-alpha, TODO, configure.ac, + bin/Makefile.am, bin/autoconf.as, bin/autoheader.in, + bin/autom4te.in, bin/autoreconf.in, bin/autoscan.in, + bin/autoupdate.in, bin/ifnames.in, config/Makefile.am, + config/config.guess, config/config.sub, config/elisp-comp, + config/m4.m4, config/mdate-sh, config/missing, config/texinfo.tex, + doc/Makefile.am, doc/fdl.texi, lib/Makefile.am, lib/autom4te.in, + lib/freeze.mk, lib/Autom4te/C4che.pm, lib/Autom4te/ChannelDefs.pm, + lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm, + lib/Autom4te/FileUtils.pm, lib/Autom4te/General.pm, + lib/Autom4te/Request.pm, lib/Autom4te/Struct.pm, + lib/Autom4te/XFile.pm, lib/autoconf/Makefile.am, + lib/autoconf/autoconf.m4, lib/autoconf/autoheader.m4, + lib/autoconf/autoscan.m4, lib/autoconf/autotest.m4, + lib/autoconf/autoupdate.m4, lib/autoconf/c.m4, + lib/autoconf/fortran.m4, lib/autoconf/functions.m4, + lib/autoconf/general.m4, lib/autoconf/headers.m4, + lib/autoconf/lang.m4, lib/autoconf/libs.m4, + lib/autoconf/oldnames.m4, lib/autoconf/programs.m4, + lib/autoconf/specific.m4, lib/autoconf/status.m4, + lib/autoconf/types.m4, lib/autoscan/Makefile.am, + lib/autoscan/autoscan.list, lib/autoscan/autoscan.pre, + lib/autotest/Makefile.am, lib/autotest/autotest.m4, + lib/autotest/general.m4, lib/emacs/Makefile.am, + lib/emacs/autoconf-mode.el, lib/emacs/autotest-mode.el, + lib/m4sugar/Makefile.am, lib/m4sugar/m4sh.m4, + lib/m4sugar/m4sugar.m4, man/Makefile.am, tests/Makefile.am, + tests/atlocal.in, tests/autotest.at, tests/base.at, tests/c.at, + tests/compile.at, tests/foreign.at, tests/fortran.at, + tests/local.at, tests/m4sh.at, tests/m4sugar.at, tests/mktests.sh, + tests/semantics.at, tests/suite.at, tests/tools.at, + tests/torture.at, tests/wrapper.as: + Update FSF postal mail address. + +2005-05-13 Stepan Kasal + + * lib/autoconf/general.m4 (AC_CONFIG_LIBOBJ_DIR): Remove the broken + check. + * lib/m4sugar/m4sugar.m4 (m4_bmatch): Halt with error if we don't get + enough arguments, similarly as in m4_bpatsubsts. + +2005-05-12 Stepan Kasal + + * lib/autoconf/status.m4 (_AC_SRCDIRS): Simplify the computation + of absolute paths. + +2005-05-11 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Make the check + for absolute directory names in one loop. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Handle + abbreviations of --version and --debug. + +2005-05-10 Paul Eggert + + * doc/autoconf.texi (Autoconf Language): Be more precise about + quoting rules. Problems noted by Stepan Kasal. + Also, throughout this document, be more careful about white space. + "blank", "white space", and "space" all have different meanings + and we should be careful to say what we mean. + +2005-05-05 Paul Eggert + + Fix C++ related problems reported by Werner Lemberg. + * doc/autoconf.texi (C++ Compiler): Mention .cpp extension. + * lib/autoconf/c.m4 (AC_LANG(C++)): Set ac_ext to .cpp, not .cc. + * lib/autoconf/types.m4 (AC_TYPE_SIGNAL): Simplify test, to + avoid problems with C++ and throw. + * tests/compile.at: .cpp, not .cc. + + * tests/semantics.at: Prepend LIBOBJDIR, as per 2005-05-02 change. + +2005-05-05 Ralf Wildenhues + + * doc/autoconf.texi (Generic Functions): Typos. + +2005-05-02 Gary V. Vaughan + + * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Prepend each + object named in LIBOBJS and LTLIBOBJS with the ${LIBOBJDIR}, as + set by latest automake. + +2005-05-01 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): "expr '' \| ''" + outputs 0 on GNU/Linux these days. + +2005-04-29 Paul Eggert + + * doc/autoconf.texi (Autoconf Language): Add more description + about quoting heuristics. + (Limitations of Builtins): Describe "set -" problems. + +2005-04-29 Ralf Wildenhues + + * lib/autotest/general.m4 (AT_KEYWORDS): Separate by space, + not newline. + + * doc/autoconf.texi (External Software): Replace AC_DEFINE_UNQUOTED + by AC_DEFINE; it was a mistake. + From bug reported against libtool by Dalibor Topic . + +2005-04-25 Stepan Kasal + + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): A tiny optimization. + +2005-04-22 Stepan Kasal + + * doc/autoconf.texi (External Software): Quadrigraphs are not + processed correctly in AS_HELP_STRING; avoid this in the examples. + * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): Add a FIXME about quadrigraphs. + * lib/m4sugar/m4sugar.m4 (m4_text_wrap): Likewise; and rephrase the + comment and reduce m4_default([foo], []) to [foo]. + (m4_strip): Update the explanation. + +2005-04-19 Paul Eggert + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE, _AC_RUN_IFELSE): + Remove core.conftest.* too; it's generated by Tru64 5.1. + Problem reported by Jennis Pruett. + * lib/autoconf/functions.m4 + (AC_FUNC_SETVBUF_REVERSED, AC_FUNC_UTIME_NULL): + Don't bother to remove core files; AC_RUN_IFELSE should do that + for you. + +2005-04-19 Stepan Kasal + + * lib/m4sugar/m4sugar.m4 (m4_bpatsubsts): Add the b- to comment, too. + +2005-04-19 Alexandre Duret-Lutz + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Handle --docdir. + Report from Horst Wente. + +2005-04-15 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_ARG_VAR_VALIDATE): Fixed a typo in + the comment. + +2005-04-14 Gregorio Guidi + + * doc/autoconf.texi (External Software, Package Options): Add + examples showing how to implement --with-* and --enable-* options. + +2005-04-13 Paul Eggert + + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Look for configure.ac + as well as configure.in. Problem reported by Gregorio Guidi. + +2005-04-10 Paul Eggert + + * doc/autoconf.texi (Particular Functions): Use gnulib's current + pattern for alloca snippet. + +2005-04-04 Stepan Kasal + + * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Fix a typo. + +2005-04-01 Stepan Kasal + + * doc/autoconf.texi (Generic Programs): Fix a typo. + +2005-04-01 Paul Eggert + + * lib/autotest/general.m4 (AT_INIT): Don't assume that "date +%s" + fails if %s isn't supported. Problem reported by Ralf Wildenhues. + +2005-03-22 Ralf Wildenhues + + * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): + Merge `-z option' as well for the benefit of Solaris link flags. Pass + whole-archive (-zallextract, -zdefaultextract) options in the hope of + unique libraries, for the Sun Fortran 95 8.0 compiler. Bug reported + against Libtool by Yury Puhalsky . + +2005-03-22 Paul Eggert + + * NEWS: The configure command now warns you if you attempt to use + a directory whose name contains a special character like space, + newline, or "\". + * doc/autoconf.texi (Installation Directory Variables): Allow + "," in file names. Do not use \@; it's not a portable regexp. + * bin/Makefile.am (edit): Likewise. + * lib/Makefile.am (edit): Likewise. + * tests/Makefile.am (edit): Likewise. + * tests/semantics.at: Likewise. + * tests/torture.at: Likewise. + * lib/autoconf/general.m4 (AC_ARG_PROGRAM): Likewise. + * lib/autoconf/status.m4 (_AC_SRCDIRS): Likewise. + * doc/autoconf.texi (File System Conventions): Warn about + unportable file names. + * lib/autoconf/general.m4 (_AC_INIT_DIRCHECK): New macro. + (AC_INIT): Use it. + (_AC_INIT_SRCDIR): Use ac_pwd rather than invoking pwd. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Propagate + ac_pwd, and quote srcdir. + * lib/autotest/general.m4 (AT_INIT): Quote file name args. + + * doc/autoconf.texi: Fix some systematic formatting problems. + ".)" needs a following @: if not at the end of a sentence, and + similarly for "!)". "etc." should be preceded by a comma. + "n-th" -> "@var{n}th". pdksh is still buggy, so update its date. + +2005-03-22 Bruno Haible + + * doc/autoconf.texi (Input): Mention that AC_CONFIG_AUX_DIR's + argument is often called 'build-aux'. + +2005-03-07 Stepan Kasal + + * doc/autoconf.texi (Quotation Rule Of Thumb): Mention that the + macro AC_TRY_LINK is obsolete. + (Installation Directory Variables): Change `AC_OUTPUT_FILES' to + `AC_CONFIG_FILES'. + +2005-02-24 Stepan Kasal + + * lib/autoconf/c.m4 (AC_PROG_CC): Be more careful to skip + `/usr/ucb/cc'; use `cl.exe' to distinguish the MS compiler + from a Common Lisp's `cl'. + (AC_PROG_CXX): Behave according to the documentation: don't + search for $ac_tool_prefix$CCC and $CCC, just set CXX=$CCC; + make the variable CCC precious; use `cl.exe', not `cl'. + +2005-02-23 Paul Eggert + Alexandre Duret-Lutz + + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Redirect stdin from + /dev/null, as "configure" shouldn't read stdin, and this insulates + us from problems (e.g., when testing for "cl"). Also, do this + redirection before invoking "hostname" or "uname", and keep the + original input stream available via... + (AS_ORIGINAL_STDIN_FD): ... this new macro. + (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Don't + bother with " + + * lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE): Don't set ECHO_C to + newline if neither \c nor -n work, as that would output two + newlines. Prefer -n to \c. Reported by Stepan Kasal. + +2005-02-12 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (AS_IF): Define by m4_defun, not m4_define. + This causes that any required macros inside will get before the if. + * doc/autoconf.texi (autom4te.cache): A typo. + +2005-02-12 Paul Eggert + + Undo previous change, except keep the change to + lib/autoconf/programs.m4 that replaced grep with shell + pattern-matching. This is because net-snmp configure reads stdin. + Reported by Noah Misch. + +2005-02-11 Paul Eggert + + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Redirect stdin + from /dev/null, as "configure" shouldn't read stdin, and this + insulates us from problems (e.g., when testing for "cl"). + Suggested by Alexandre Duret-Lutz. Also, do this redirection + before invoking "hostname" or "uname". + (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, + _AC_LINK_IFELSE): Undo previous change, as it's no longer needed. + * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX): Don't bother with + " + + * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, + _AC_LINK_IFELSE): Redirect stdin to /dev/null, in an attempt to + avoid thinking that Allegro Common Lisp's "cl" command is a C++ + compiler. + +2005-02-09 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): Document that + grep -q isn't portable. Improve grep -s explanation. + Problem reported by Dan Manthey. + +2005-02-08 Paul Eggert + + * doc/autoconf.texi (Special Shell Variables): Clarify + PATH_SEPARATOR wording; fix typo in IFS. Reported by Gary V. Vaughan. + +2005-02-07 Paul Eggert + + * doc/autoconf.texi: Use @acronym for DJGPP. + Fix some @code's that should have been @env's, and vice versa. + Sort environment variable names. + Mention that shells no longer inherit IFS. + Don't recommend PATH_SEPARATOR=';' so strongly. + Mention that $RANDOM might expand to the empty string. + "symlink" and "soft link" -> "symbolic link". + Improve mktemp description (reported by Bruno Haible). + +2005-02-05 Paul Eggert + + * tests/foreign.at (Libtool): Don't overquote AT_SETUP arg. + * tests/m4sh.at (AS_DIRNAME, AS_BASENAME, AS_MKDIR_P, AS_HELP_STRING): + Likewise. + * tests/semantics.at (AC_C_BIGENDIAN, AC_PATH_PROG & AC_PATH_PROGS): + Likewise. + +2005-02-04 Paul Eggert + + * NEWS: Mention AT_COPYRIGHT. + + * tests/local.at (AT_CMP): Use diff directly on input files rather + than copying them. + + * lib/autoconf/programs.m4 (AC_PROG_SED): Don't look in + /usr/xpg4/bin since that sed dumps core (at least on Solaris 8). + +2005-02-04 Noah Misch + and Paul Eggert + + * tests/autotest.at (Empty test suite): New test. + * tests/torture.at (Substitute and define special characters) + (Substitute a 2000-byte string, Define to a 2000-byte string) + (Substitute a newline, Define a newline): New tests. + +2005-02-04 Noah Misch + + * lib/m4sugar/m4sugar.m4 (m4_re_string, m4_re_word): Revert 2002-03-04. + * tests/local.at (AT_CHECK_M4SUGAR): Add `m4sugar' to keywords. + (AT_CHECK_ENV): Ignore LTLIBOBJS, FC variables, EGREP, FGREP, and SED. + * tests/m4sugar.at (AT_CHECK_M4SUGAR_TEXT, AT_CHECK_M4RE): New macros. + (Standard regular expressions): New test. + (m4_warn, m4_require: circular dependencies, m4_text_wrap): Strip + excess test name quoting. + * tests/semantics.at (AC_CHECK_HEADERS_OLD, AC_CHECK_HEADERS_NEW): Pass + CPPFLAGS to `configure' instead of setting it in `configure'. + + * lib/m4sugar/m4sh.m4 (AS_UNAME): Try only /usr/bin/hostinfo, not + any `hostinfo' in $PATH, since hostinfo.exe is a popular file name + on some platforms. + + * lib/autoconf/fortran.m4 (AC_LANG(Fortran), AC_FC_SRCEXT): + s/FC_SRCEXT/ac_fc_srcext/; s/FCFLAGS_SRCEXT/ac_fcflags_srcext/. + + * tests/local.at (AT_CMP): New macro. + (AT_DATA_AUTOCONF): Do not call AC_PROG_GREP. + (AC_SAVE_STATE): Move environment grep... + (AT_CHECK_ENV): to here. Filter out `'$''. Use AT_CMP. + (AT_CONFIG_CMP): New macro. + (AT_CHECK_MACRO): Run `configure' twice with cache and compare results. + * tests/c.at (Extensions): Do not exit early. + * tests/atlocal.in: Inherit $GREP. + + * lib/autoconf/c.m4 (_AC_C_STD_TRY): New macro. + (_AC_PROG_CC_C89, _AC_PROG_CC_C99): Use it. + + * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Update for 2005. + (AC_COPYRIGHT): Factor header comment portion out and move into... + * lib/m4sugar/m4sh.m4 (AS_COPYRIGHT): This. + * lib/autotest/general.at (AT_COPYRIGHT): New macro. + (AT_INIT): Add Autotest copyright notice. Display copyright notices in + --version output. + * tests/local.at: Add Autoconf test suite copyright notice. + * doc/autoconf.texi (Writing testsuite.at): Document AT_COPYRIGHT. + +2005-02-04 Bruno Haible + and Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): New mkstemp entry. + +2005-02-03 Paul Eggert + + * lib/m4sugar/m4sugar.m4 (m4_re_escape): Escape ?, ^, \, $ too; + this fixes a bug tickled by the AT_CAPTURE_FILE change noted below. + + Try not to generated lines of unlimited length, as POSIX places a + 2047-byte limit on line length of portable text files. + * lib/autoconf/general.m4 (AC_SUBST, AC_SUBST_FILE): + Use newline as a separator, not space. + * lib/autotest/general.m4 (AT_TESTED, AT_KEYWORDS): Likewise. + (AT_CAPTURE_FILE): Use space-backslash-newline as a separator, not + space. + +2005-02-03 Ralf Wildenhues + + * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK): Move func_* to + as_func_*. Add test to check whether positional parameters + are restored after function return. + +2005-02-02 Paul Eggert + + * doc/autoconf.texi (Special Shell Variables): Mention _, + BIN_SH, DUALCASE. Say that variables other than "status" are safe + if they contain a lower-case letter. The DUALCASE problem was + reported by Ralf Wildenhues. + + * bin/autoconf.as: Don't exit with status 0 after write failure + with --help or --version. + * lib/autoconf/general.m4 (_AC_INIT_HELP, _AC_INIT_VERSION): Likewise. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise. + +2005-02-02 Ralf Wildenhues + + * doc/autoconf.texi (Limitations of Usual Tools): + Unicos 9 sed limitations. + * lib/autoconf/fortran.m4 (_AC_PROG_FC): Try cf77 before fort77 + to get the option-enhanced interface on older Crays. Try ftn for + Fortran 95 (newer Crays). + +2005-02-01 Paul Eggert + + * man/Makefile.am (.x.1): Go back to the simple solution, but take + care to echo the commands, so the user knows what's going on. + Modified from a suggestion by Stepan Kasal. + + * doc/autoconf.texi (autoreconf Invocation): Mention autopoint, + with a cross reference. Derived from a suggestion by Bruce Korb. + +2005-01-31 Paul Eggert + + * doc/autoconf.texi (config.status Invocation): Warn about + discrepancy between CONFIG_SHELL and shell used to invoke 'configure'. + * doc/install.texi (Defining Variables): Likewise. + Based on a proposed patch by Ralf Wildenhues. + + * man/Makefile.am (.x.1): Make sure the required generated files + are up to date. Problem and original solution proposed by Stepan Kasal. + $(dist_man_MANS:.1=-bin-prereq), $(dist_man_MANS:.1=-tests-prereq), + implicit-man-prerequisites): New rules, used by the above. + + * doc/make-stds.texi, doc/standards.texi: Sync from gnulib. + * config/config.guess, config/config.sub, config/install-sh: Likewise. + * config/missing, config/texinfo.tex: Likewise. + +2005-01-29 Stepan Kasal + + Simplify the implementation of m4_require (a.k.a. AC_REQUIRE). + Update the long comment explaining it. + + m4_require no longer writes an ``is required by'' line to the + execution stack. It contains only one bit of non-redundant + information: that the macro was required, not called. And even + this bit is useless in most situations: have you ever met a macro + which both calls and requires the same macro? + + * lib/m4sugar/m4sugar.m4 (_m4_defun_pro): Don't push a diversion... + (_m4_defun_pro_outer): ... only via this macro, for the outermost + macro. + (_m4_defun_epi, _m4_defun_epi_outer): Complementarily. + (m4_expansion_stack_pop): Remove the misplaced comment. + (m4_require): Don't put the ``is required by'' line to the + execution stack; slightly improve the out-of-a-defun error message. + (_m4_divert_grow): New macro, counter for the temporary diversions. + (_m4_require_call): Use it. + * tests/m4sugar.at (m4_require): Expect output without the + ``is required by'' messages. + +2005-01-28 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): Recommend X + rather than x for expr. + + * lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT): Avoid subshells when + this is safe. + * lib/autoconf/programs.m4 (AC_PROG_EGREP, AC_PROG_FGREP): Likewise. + * lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Likewise. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * lib/m4sugar/m4sh.m4 (_AS_LINENO_WORKS): Likewise. + * tests/mktests.sh: Likewise. + +2005-01-27 Akim Demaille + + Have autoheader honor --force. + + * doc/make-stds.texi, doc/standards.texi: Update from masters. + * lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm + * lib/Autom4te/FileUtils.pm, lib/Autom4te/XFile.pm: Update + from masters, so that FileUtils.pm's update_file provide --force + support. + * bin/autoheader.in: Pass $force to update_file so that + config.h.in is always recreated when --force. + +2005-01-24 Stepan Kasal + + * doc/autoconf.texi (Introduction): Update Peter Simons' address. + +2005-01-21 Paul Eggert + + * doc/autoconf.texi (Limitations of Builtins): Clarify that + "if test ! -d foo; ..." is portable. Suggested by Stepan Kasal. + +2005-01-20 Paul Eggert + + * doc/autoconf.texi (Shell Substitutions): Fix typo in case statement. + Warn about newline stripping in `` and $(). Update Solaris + version to 9. + (Limitations of Builtins): Use expr "X...", not expr "x...", as + X insulates us from future changes to Posix. + (Limitations of Usual Tools): For AS_DIRNAME, warn about newline + stripping. + +2005-01-19 Stepan Kasal + + * doc/autoconf.texi (Defining Symbols): Delete the false comment that + you cannot use AC_DEFINE to define macros containing `[' or `]'. + +2005-01-13 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): Document bug + in Solaris 8 join. Problem reported by Tomohiro Suzuki on + bug-tar mailing list. + +2005-01-05 Stepan Kasal + + * lib/m4sugar/m4sugar.m4 (m4_copy): Fix the explanation. + +2005-01-05 Paul Eggert + + * lib/autoconf/c.m4 (AC_LANG_INT_SAVE(C)): Declare longval and + ulongval to be static, to avoid unwanted GCC warning. Problem + reported by Michael Jennings via Daniel Reed; see + . + +2005-01-05 Alexandre Duret-Lutz + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Define datarootdir, + docdir, htmldir, dvidir, pdfdir, psdir, and localdir. Update + datadir, infodir, and mandir. Adjust argument parsing code. + (_AC_INIT_HELP): Update help text. + * doc/autoconf.texi (Installation Directory Variables): Document + new variables. + +2005-01-04 Noah Misch + + * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): If the Make program does + not seem to work, assume it does set $(MAKE). + * doc/autoconf.texi (AC_PROG_MAKE_SET): Update. + +2005-01-03 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Add a comment about nesting. + +2005-01-03 Stepan Kasal + + A cleanup of the diversion support in m4sugar. + + * lib/m4sugar/m4sugar.m4 (_m4_divert): A typo in description. + (_m4_divert_n_stack): New macro; the expansion is + m4_divert_stack, if m4_divert_stack is defined, and void + otherwise. + (m4_divert, m4_divert_push, m4_divert_pop, m4_init): Use it. + (m4_divert_push, m4_divert_pop, _m4_defun_epi): Don't expand the word + stored in _m4_divert_diversion or _m4_divert_dump. + (m4_divert_pop): When the parameter is given, compare the symbolic + name with the last diversion pushed on the stack. Previously, the + current diversion was compared with the numeric value of the + diversion given as the parameter. + (m4_require): If the macro hasn't been expanded yet, call ... + (_m4_require_call): this new macro. + +2005-01-03 Ralf Wildenhues + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE, _AC_ARG_VAR_VALIDATE): + Workarounds for documented `case' limitations. + +2005-01-03 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): Warn about + sed 'command1;command2'. Problem reported by Ralf Wildenhues. + +2005-01-02 Paul Eggert + + * bin/autoconf.as, bin/autoheader.in, bin/autom4te.in, + bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in, + bin/ifnames.in, tests/mktests.sh: Update copyright date to 2005. + + Patch from Roger Leigh (with some minor changes) as follows: + * NEWS: New macros AC_PROG_CC_C89, AC_PROG_CC_C99. + Resurrect AC_PROG_CC_STDC. + * doc/autoconf.texi (C Compiler): Add AC_PROG_CC_STDC, + AC_PROG_CC_C89, AC_PROG_CC_C99. + (Obsolete Macros): Remove AC_PROG_CC_STDC; it's no longer obsolete. + * lib/autoconf/c.m4 (_AC_PROG_CC_C89, _AC_PROG_CC_C99, AC_PROG_CC_C89, + AC_PROG_CC_C99): New macros. + (AC_PROG_CC_STDC): Use them. + (_AC_PROG_CC_STDC): Remove. + (AC_C_PROTOTYPES): Use ac_cv_prog_cc_c89, not ac_cv_prog_cc_stdc. + * THANKS: Add Roger Leigh. + +2004-12-30 Noah Misch + + * bin/autoreconf.in (autoreconf_current_directory): AM_INIT_AUTOMAKE + signals that the package uses Automake; a `Makefile.am' is typical but + not essential. Reported by Magnus Therning. + * tests/torture.at (autoreconf.): New banner. + (autoreconf and non-AC configure): Rename to `Non-Autoconf + AC_CONFIG_SUBDIRS'. + (autoreconf an empty directory): Rename to `Empty directory'. + (Unusual Automake input files): New test. + +2004-12-30 Noah Misch + + * lib/autotest/general.m4 (AT_CAPTURE_FILE): New macro. + (AT_SETUP): Clear AT_capture_files. + (_AT_CHECK): On failure, log each of AT_capture_files. Fix comment. + (AT_KEYWORDS): Fix comment typo. + * tests/autotest.at (AT_CHECK_AT): Use AT_CAPTURE_FILE. + * tests/local.at (AT_CHECK_CONFIGURE): Use AT_CAPTURE_FILE. + * doc/autoconf.texi (Writing testsuite.at): Document AT_CAPTURE_FILE. + +2004-12-29 Albert Chin-A-Young + + * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): + If the variable to set is already set, set ac_cv_path_$1 + to the preset value so caller can assume ac_cv_path_$1 + is available. (trivial change) + +2004-12-27 Noah Misch + + * BUGS (Minor Problems): Warn about makefile limitations. + * Makefile.am: Find and update `INSTALL' in $(srcdir). + * man/Makefile.am: Find and update manual pages in $(srcdir). + +2004-12-24 Eric Blake + + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Test candidate + shells in subshell, to avoid noise from ash. (trivial change) + +2004-12-22 Ralf Wildenhues + + * doc/autoconf.texi (Limitations of Builtins) : Mention + problems with SunOS ksh and backslash escaping, Bourne shells and + closing brackets (both within character classes). Bug reported + against Libtool by Alexander Kurz . + : New entry. Mention non-availability of -r. + +2004-12-21 Akim Demaille + + * lib/autotest/general.m4 (AT_LINE): Don't add srcdir here, to + avoid cluttering displayed messages. Rather, prepend srcdir where + AT_LINE is used for log files. + +2004-12-21 Stepan Kasal + + * lib/autoconf/status.m4: Quote ``$tmp'' in many places. + * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Fix the comment, as traps are + no longer part of the macro, quote the occurrence of ``$tmp''. + * doc/autoconf.texi (Forbidden Patterns): Typo. + +2004-12-21 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Make sure the "ok" etc. are + separated from the test title by forcing a white space. + +2004-12-21 Akim Demaille + + Enable Emacs navigation within testsuite.log files. + + * lib/autotest/general.m4 (AT_CLEANUP): Add an hint for Emacs to + use the compilation mode. + (AT_LINE): Point to the srcdir. + +2004-12-19 Noah Misch + + * tests/Makefile.am (installcheck-local): Use $(bindir). + (check-local, installcheck-local): Pass TESTSUITEFLAGS. + * doc/autoconf.texi (Making testsuite Scripts): Recommend the same + Makefile.am scheme Autoconf now uses. + +2004-12-18 Noah Misch + + * lib/m4sugar/m4sugar.m4 (m4_qlen, m4_qdelta): New macros. + * lib/autotest/general.m4 (AT_SETUP): Use m4_qdelta. + +2004-12-18 Noah Misch + + * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): New macro. + (_AT_CHECK): Use it. + * lib/m4sugar/m4sh.m4 (AS_ESCAPE_FOR_EXPAND): Remove. + (AS_ESCAPE): Fix comment. + * tests/autotest.at: Adjust section banner comments. + (AT_CHECK_AT): Accept STATUS and STDERR. + (AT_CHECK_AT_TEST): Likewise. + (Invalid brace-enclosed parameter expansion) + (Multiline command from M4 expansion) + (Double-M4-quoted command): New tests. + +2004-12-17 Paul Eggert + + * doc/autoconf.texi: Update GNU FDL version from 1.1 to 1.2. + +2004-12-17 Akim Demaille + + * lib/autoconf/general.m4 (AC_SUBST, AC_SUBST_FILES): Pass $1 to + m4_pattern_allow. + Suggested by Alexandre Duret-Lutz. + * doc/autoconf.texi (Setting Output Variables): Catch up. + +2004-12-17 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Fix comment. + +2004-12-17 Stepan Kasal + + * lib/autoconf/general.m4 (_AC_LIBOBJ): We can use AC_SUBST/2, + remove the comment which said we cannot. + +2004-12-17 Stepan Kasal + + Add a specialized check for resolv.h. Thanks to Gerrit P. Haase, + Reini Urban and Paul Eggert for reporting the dependencies. + + * lib/autoconf/headers.m4 (AC_HEADER_RESOLV): New macro. + * doc/autoconf.texi (AC_HEADER_RESOLV): Document it. + (AC_HEADER_STAT): @cvindex{STAT_MACROS_BROKEN}, not @acindex. + +2004-12-17 Stepan Kasal + + * bin/autoscan.in: Open autoscan.log only after ``parse_args''; + so that eg. ``autoscan --help'' doesn't truncate it. + +2004-12-15 Nicolas Joly + + * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Remove + generated conftest files. + +2004-12-13 Noah Misch + + * lib/autotest/general.m4 (_AT_CHECK) [--trace]: Do not enable shell + tracing on commands with possibly-escaped newlines. + * doc/autoconf.texi (Writing testsuite.at): Delete documentation of the + discontinued behavior and its implications. + * tests/autotest.at (BS-newline in command, ^BS-newline in command) + (BSx641-newline in command, BS-BS-newline in command) + (BSx640-newline in command, Newline-CODE-BS-newline in command) + (Single-quote-BS-newline in command) + (Single-quote-newline-BS-newline in command): New tests. + +2004-12-13 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (AS_EXECUTABLE_P): Use test -f && test -x + on platforms where it works. + (_AS_TEST_PREPARE): Test for ``test -x''. + (_AS_BROKEN_TEST_PREPARE): Nuke. + +2004-12-13 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Move the trap commands ... + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): ... here; + give only 4-letter prefix to AS_TMPDIR, comment fixed. + * lib/autoconf/programs.m4 (_AC_PATH_PROG_FEATURE_CHECK): Don't + create the temporary directory. + (_AC_FEATURE_CHECK_LENGTH): Work in current directory. + +2004-12-12 Kelley Cook + + * bin/autoheader.in: Exit if no AC_CONFIG_HEADERS was found. + (trivial change) + +2004-12-12 Alexandre Duret-Lutz + + * doc/autoconf.texi (Limitations of Usual Tools) : Typo. + +2004-12-11 Noah Misch + + * lib/autotest/general.m4 (_AT_CHECK) [--trace]: Rework a shell pattern + to avoid using a negated character class. Reported by Nicolas Joly. + * tests/local.at (AT_CHECK_SHELL_SYNTAX): Check for similar constructs. + +2004-12-10 Paul Eggert + + * man/Makefile.am (autoconf.1, autoheader.1, autom4te.1, autoreconf.1, + autoscan.1, autoupdate.1, ifnames.1, config.guess.1, config.sub.1): + Don't depend on .x file explicitly, since "make" does that for us. + Suggested by Stepan Kasal. + + * bin/Makefile.am (MOSTLYCLEANFILES): Renamed from CLEANFILES. + Add *.tmp. + (autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate, + ifnames): Factor common code. And they said it couldn't be done! + +2004-12-09 Paul Eggert + + * bin/.cvsignore: Add autoconf.in. + * tests/.cvsignore: Add wrapper.in. + * lib/autotest/general.m4: Escape '$' in case pattern. + +2004-12-09 Noah Misch + + * man/Makefile.am (autoconf.1): Regenerate when `autoconf.as' changes. + + * lib/autotest/general.m4 [--trace] (AT_INIT): Do not `set -v'. + + * tests/autotest.at: New file. + * tests/suite.at: Include it. + * tests/Makefile.am: Distribute it. + + * lib/autotest/general.m4 [--trace] (_AT_CHECK): Do not enable + shell tracing on a command that could contain multiple lines. + * doc/autoconf.text: Document that fact and its implications. + * lib/m4sugar/m4sh.m4 (AS_ESCAPE_FOR_EXPAND): New macro. + * tests/autotest.at (Multiline backquote command substitution, + Multiline parameter expansion, Literal multiline command, + Multiline parenthetical command substitution): Remove XFAIL. + +2004-12-09 Paul Eggert + + * doc/autoconf.texi (Libraries): Clarify problems with AC_CHECK_LIB + and suggest AC_SEARCH_LIBS. Suggested by Noah Misch and Stepan Kasal. + +2004-12-08 Noah Misch + + * configure.ac (test suite): Cease to generate wrapper scripts. + * configure: Regenerate. + * lib/freeze.mk (MY_AUTOM4TE): Wrap the uninstalled autom4te directly. + (m4f_dependencies): Adjust accordingly. + * tests/Makefile.am (Wrappers): Generate wrapper scripts. + (wrapper.in): Generate it in the build directory. + (MAINTAINERCLEANFILES): Delete wrapper.in. + (CLEANFILES): Add wrapper.in. + * tests/wrapper.as: Move AS_INIT to very top, preserving copyright in + the output. Replace each $as_me with a @wrap_program@. + * tests/wrapper.in: Delete it; we always build it. + + * bin/Makefile.am (autoconf.in): Generate it in the build directory. + (EXTRA_DIST): Remove autoconf.in. + (CLEANFILES): Add autoconf.in. + (autoconf): Find autoconf.in in the build directory. + * bin/autoconf.in: Delete it; we always build it. + +2004-12-08 Noah Misch + + * lib/autotest/general.m4 (AT_INIT): Replace a `tr' with a `sed'. Join + PATH members so as to not prepend an empty element. Move a comment. + * Makefile.am (SUBDIRS): Build in `tests' last. + * tests/Makefile.am (installcheck-local): Add check-local dependencies. + +2004-12-08 Paul Eggert + + * lib/mdate-sh: Don't use "set - x`$ls_command /`", as zsh mishandles + the spaces inside $ls_command. Problem reported by Loulou Pouchet in + . + Don't use "set - x"; plain "set x" is enough, and simplifies debugging. + +2004-12-07 Stepan Kasal + + * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Fix typo in previous + patch: extra "-l"s. + +2004-12-06 Paul Eggert + + * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Check libc before + looking elsewhere for getmntent. Problem reported by Mark D. Baushke. + * doc/autoconf.texi (Particular Functions): Mention new behavior. + +2004-12-03 Stepan Kasal + + * lib/autoconf/general.m4 (AC_DEFINE, AC_DEFINE_UNQUOTED): Factor + out the common code to ... + (_AC_DEFINE_Q): ... a new macro; simplify the condition about the + value of the #define--default to 1, iff the macro was called + with exactly one parameter. + +2004-12-02 Paul Eggert + + * lib/autoconf/functions.m4 (AC_FUNC_MEMCMP): Use + "char c = '\200';" rather than "char c = 0x80;" as the + latter doesn't conform to the strict C standard due to + overflow on signed char hosts. + + * lib/autoconf/c.m4 (_AC_PROG_CC_STDC): Prefer -qlanglvl=extc89 + to -qlanglvl=ansi. We don't want to disable extensions. + +2004-11-29 Paul Eggert + + * doc/autoconf.texi (Particular Programs): @code{$PATH} -> @env{PATH}. + (Using Autotest, testsuite Scripts, Writing testsuite.at): + Reword slightly to avoid some English-language problems noted + by Ralf Wildenhues in: + http://lists.gnu.org/archive/html/autoconf-patches/2004-11/msg00027.html + +2004-11-29 Stepan Kasal + + * NEWS: Add ^L above each release. + +2004-11-28 Paul Eggert + + Fix documentation problems reported by Russ Boylan in + , + along with some nearby cruft. + * doc/autoconf.texi (Libtool): Libtool can be used without + Automake (not without Autoconf). + (Introduction): Mention lists.gnu.org. + * BUGS: Don't mention bugs.gnu.org. + Remove mention of ancient libtool compatibility problem. + * NEWS: Mention that bugs.gnu.org is kaput. + * README: Likewise. Mention where mailing list archives can be found. + +2004-11-28 Stepan Kasal + + * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): A typo in the comment. + +2004-11-26 Paul Eggert + + * doc/autoconf.texi (Pretty Help Strings): Go back to + single-quoting assignments to cache variables. + +2004-11-23 Stepan Kasal + + * doc/autoconf.texi (Pretty Help Strings): Fix quoting issues + with the examples; fix the bug in MY_ARG_WITH example reported + by Alexandre Duret-Lutz. + * lib/autoconf/general.m4 (AC_ARG_ENABLE, AC_ARG_ENABLE): Enable + expansion of $1 in the comment emitted to configure. + +2004-11-23 Paul Eggert + + * doc/autoconf.texi (Pretty Help Strings): Fix typo + in my editing of the previous patch. Problem reported + by Alexandre Duret-Lutz. + +2004-11-22 Stepan Kasal + + * doc/autoconf.texi (Autoconf Language): Explain that + ``descriptions'' may not be double quotes. + (Quotation Rule Of Thumb): Likewise. + (Pretty Help Strings): Likewise; remove the wrong comment; + simplify the examples and improve their quoting. + +2004-11-13 Stepan Kasal + + * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Don't check + the $1_found variable, don't test whether the file is executable; + Both things are checked ... + (_AC_PATH_PROG_FEATURE_CHECK): ... here; AS_EXECUTABLE_P replaces + the former ``test -f''. + * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Fix a typo. + +2004-11-10 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): Avoid cp -r; + use cp -R instead. + +2004-11-10 Derek R. Price + + * doc/autoconf.texi (Limitations of Usual Tools): Note `cp -r' + limitations. Reorder paragraphs for clarity. + +2004-10-11 Paul Eggert + + * doc/autoconf.texi: Standardize spelling of "Posix" (as opposed + to "POSIX" or "@acronym{POSIX}"), and similarly for "DOS + variants", "Unix", and some related minor wording fixups. + + (Shellology, Special Shell Variables): Document that the Zsh + problem with NULLCMD was fixed in zsh 3.1.6-dev-18. Thanks + to Alexandre Duret-Lutz for this info. + +2004-10-10 Alexandre Duret-Lutz + + * doc/autoconf.texi (One-Shot Macros): New node. + +2004-09-28 Paul Eggert + + * doc/autoconf.texi (Function Portability): Fix misdescription + of putenv. Problem reported by Michael Wardle. + +2004-09-22 Paul Eggert + + * doc/autoconf.texi (auindex): New macro. + (AU_DEFUN): Use it to fix the bug when the index contained AC_AU_DEFUN. + Problem reported by Stepan Kasal. + +2004-09-05 Paul Eggert + + Fix problems reported by Andreas Buening in: + http://lists.gnu.org/archive/html/autoconf-patches/2004-04/msg00004.html + * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Set SHELL=/bin/sh + in test makefile. + * lib/autotest/general.m4 (AT_INIT): Don't assume /dev/null is + readable; it's not true in OS/2-emx. + +2004-09-04 Paul Eggert + + * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): If xmkmf returns + "/usr/include", clear ac_x_includes instead of leaving it as "no" + (trivial change). Problem and patch reported by Andrew Church in: + http://lists.gnu.org/archive/html/bug-autoconf/2004-04/msg00016.html + +2004-09-03 Paul Eggert + + * doc/autoconf.texi: Give AC_DEFINE and AC_DEFINE_UNQUOTED + three args in examples. Problem reported by Frederik Fouvry in: + http://lists.gnu.org/archive/html/bug-autoconf/2004-09/msg00017.html + Also, fix some minor spacing and punctuation bugs. + +2004-09-02 Akim Demaille + + * doc/autoconf.texi (Limitations of Builtins): Swap "cd" and + "case" to restore ordering. + Reported by Stepan Kasal. + +2004-08-26 Akim Demaille + + * doc/autoconf.texi: Minor typos and stylos. + +2004-08-20 Paul Eggert + + * configure.ac (AC_INIT): Bump to 2.59c. + +2004-08-20 Paul Eggert + + Version 2.59b. + + * README: Add advice about m4 1.4.2. + + * Makefile.cfg (wget_files): Remove config.guess, config.sub, + texinfo.tex for now (done by hand now). + * Makefile.maint (wget_files, cvs_files): + Remove ansi2knr.c; nobody uses it. + (ansi2knr.c-url_prefix): Remove. + (cvs-update): Fix test for failure. I don't know why it ever + worked... + + * doc/autoconf.texi: Update URLs, some of which went stale. + Use @uref rather than @href. + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Have configure + handle "--" as per POSIX. Suggested by Paul Pogonyshev. + + * config/config.guess, config/config.sub, config/elisp-comp, + config/install-sh, config/mkinstalldirs, config/texinfo.tex, + doc/fdl.texi, doc/standards.texi: Sync with master copy. + + * NEWS, TODO, configure.ac, bin/autoscan.in, + bin/autoupdate.in, bin/ifnames.in, doc/autoconf.texi, + doc/install.texi, lib/Autom4te/Configure_ac.pm, + lib/Autom4te/FileUtils.pm, lib/autoconf/general.m4, + lib/autoconf/programs.m4, lib/autoconf/status.m4, + lib/autotest/general.m4, lib/m4sugar/m4sh.m4, + lib/m4sugar/m4sugar.m4, tests/local.at, tests/m4sh.at, + tests/tools.at, tests/torture.at: + Use "file name" rather than "filename" or "path", + to be consistent with the terminology of the GNU coding standards. + +2004-08-19 Paul Eggert + + * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C), + AC_C_LONG_DOUBLE): Undo 2004-06-04 change, as it didn't work with + HP-UX 11.23 cc/aCC or Tru64 4.0 cc. Problem reported by Noah Misch in + . + + More fixes to support spaces in the name of the build directory. + This isn't a complete fix but it's an improvement. + + * bin/autoconf.as (autom4te_options): New var. + Use it instead of appending to AUTOM4TE, so that we can allow + spaces in the build directory's absolute name. + * bin/autoheader.in ($autoconf): Allow spaces in file names. + * lib/autotest/general.m4 (AT_INIT, AT_CLEANUP, _AT_CHECK, + AT_CHECK_NOESCAPE): Likewise. + * tests/wrapper.as (testdir, AUTOM4TE_CFG, autom4te_perllibdir, + main program): Likewise. + +2004-08-18 Paul Eggert + + * lib/autoconf/general.m4 (_AC_INIT_HELP): Quote $ac_popdir uses. + From Ralf Corsepius in: + http://lists.gnu.org/archive/html/autoconf-patches/2004-08/msg00014.html + +2004-08-12 Paul Eggert + + * doc/autoconf.texi (Function Portability): Document isinf and + and isnan. From a suggestion by Kevin Ryde. + + * lib/Autom4te/General.pm (END): Return correct exit status even + if unlink succeeds and sets $?. Needed with Solaris 8's perl 5.00503. + +2004-08-09 Paul Eggert + + * tests/torture.at (Deep Package): Use configure.in, not configure.ac, + for compatibility with Automake 1.4. Reported by J C Fitzgerald in + . + +2004-08-04 Alexandre Duret-Lutz + + * lib/autoconf/general.m4 (AC_REQUIRE_AUX_FILE): New empty macro. + (AC_CANONICAL_BUILD): Call it to require config.sub and config.guess. + * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Likewise for install-sh. + * doc/autoconf.texi (Input): Document AC_REQUIRE_AUX_FILE. + * lib/autom4te.in (Automake-preselections): Preselect + AC_REQUIRE_AUX_FILE. Automake 1.10 will trace it. + +2004-08-02 Alexandre Duret-Lutz + + * lib/autom4te.in (Automake-preselections): Preselect + AC_CANONICAL_BUILD and AC_CANONICAL_TARGET. Automake 1.9.1 will + trace them. + +2004-07-29 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Set BIN_SH, for + Tru64. + * doc/autoconf.texi (Shellology): Mention BIN_SH. + Document problem with "`""`" in pdksh POSIX mode. + +2004-07-27 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): Use "set -o posix" + with pdksh, too. Problem reported by Patrick Welche via + Gary V. Vaughan. + * doc/autoconf.texi (Shellology): Note that set -o posix is + useful for pkdsh, too. + +2004-06-24 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Require + _AS_UNSET_PREPARE, so that we can use $as_unset directly. + Don't fail if ENV or BASH_ENV is readonly. + (AS_SHELL_SANITIZE): Don't fail if ENV, MAIL, MAILPATH, LC_ALL, + etc. are read only. Problem reported by Ludovic Courtes. + +2004-06-23 Noah Misch + + * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): If the shell is + zsh, disable GLOB_SUBST to avoid backslash handling problems. + (trivial change) + +2004-06-04 Paul Eggert + + * doc/autoconf.texi (File System Conventions): Warn about + names like "aux". Problem reported by Eric Blake. + + * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY (C)): Use division + by zero instead of array size, so that we can use any arithmetic + constant expression (instead of requiring an integer constant + expression). This allows us to test expressions like DBL_MAX < + LDBL_MAX, which didn't conform to the C standard using the old + method. + (AC_C_LONG_DOUBLE): Put back in the tests for LDBL_MAX and LDBL_EPSILON, + now that we can do floating-point tests at compile time. + +2004-06-02 Paul Eggert + + * lib/autoconf/c.m4 (AC_C_LONG_DOUBLE): Don't check LDBL_MAX + and LDBL_EPSILON, as the resulting expression isn't an + integer constant expression and violates the C standard. + Problem reported by Nelson H. F. Beebe. Also, check + for "L" suffix, and check that long double doesn't have + worse range or precision than double, that mixed-mode + arithmetic doesn't generate a diagnostic, that double + constants fit in long double. + +2004-06-03 Kevin Ryde + + * doc/autoconf.texi (Function Portability): Add notes on free(NULL), + malloc(0) and realloc(NULL,size). + + * doc/autoconf.texi (Shell Substitutions): Spelling error reported by + Bob Proulx. + +2004-05-31 Paul Eggert + + * lib/autoconf/headers.m4 (HAVE_STDBOOL_H): Detect _Bool bug + in HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. Problem reported + by Jim Meyering. + +2004-05-26 Paul Eggert + + * doc/autoconf.texi (Limitations of Builtins): Mention that ! COMMAND + can be rewritten using if-then-else. Suggested by Bruno Haible. + +2004-05-25 Paul Eggert + + * doc/autoconf.texi (testsuite Scripts): Fix typo. + Problem reported by Stepan Kasal. + +2004-05-24 Paul Eggert + + * tests/Makefile.am (autoconfdir): Fix to match comment (trivial + change). Patch reported by Ralf Wildenhues in + . + + * lib/autoconf/functions.m4 (AC_FUNC_MBRTOWC): Don't assume that a + function F exists if the compiler and linker let you compile an + expression like (F != 0). Recent versions of GCC optimize away + the reference to F in that case, since every function address must + be nonzero, so the link succeeds even if F does not exist. + Problem reported by Manu in + . + + * doc/autoconf.texi (Systemology): Standardize on the spelling of + "Unix". Many uses changed. + (Limitations of Builtins): Explain better why the ! command isn't + portable. + +2004-05-22 Alexandre Duret-Lutz + + * lib/autom4te.in (Automake-preselections): Preselect + LT_SUPPORTED_TAG in lieu of AC_LIBTOOL_TAGS. + +2004-05-19 Kevin Ryde + + * doc/autoconf.texi (Function Portability): Add strerror_r, cross + referencing AC_FUNC_STRERROR_R. + + * doc/autoconf.texi (Particular Functions): In AC_FUNC_CLOSEDIR_VOID, + note pessimistic assumption when cross compiling. + +2004-05-16 Paul Eggert + + * doc/autoconf.texi (Limitations of Make): Note that BSD make + (until 2004) invoked subcommands with sh -e, contra POSIX. + Reported by Kevin Ryde. + +2004-05-10 Eric Sunshine + + * programs.m4 (_AC_PROG_GREP): Fixed bug where PATH argument handed to + _AC_PATH_PROG_FEATURE_CHECK contained leading whitespace (i.e. + " $PATH:/usr/xpg4/bin"). This resulted in bogus tests, such as + `test -f " /usr/bin/grep"', which _always_ failed. + (AC_PROG_SED): Ditto bogus PATH fix. + * autoconf.texi (AC_PROG_GREP): Properly document that this macro + requires that grep correctly supports _multiple_ `-e' options, rather + than stating only that grep should accept `-e'. + +2004-05-03 Paul Eggert + + Port to C99, which requires that 'exit' be declared. + + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Use AC_INCLUDES_DEFAULT + to ensure that stdlib.h is included. + * lib/autoconf/functions.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_SETPGRP, + AC_FUNC_STRTOD, AC_FUNC_SETVBUF_REVERSED, AC_FUNC_FORK, _AC_FUNC_FORK, + _AC_FUNC_VFORK, AC_FUNC_WAIT3): Likewise. + * lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise. + * lib/autoconf/types.m4 (AC_TYPE_GETGROUPS): Likewise. + * lib/autoconf/headers.m4 (AC_HEADER_STDC): Include + when using 'exit' in a test; C99 requires that 'exit' be declared. + +2004-05-02 Paul Eggert + + * doc/autoconf.texi (Particular Programs): AC_PROG_GREP + now prefers 'grep' implementations that accept -e. + (Limitations of Usual Tools): Describe problems of traditional + egrep and fgrep with long input lines, and of traditional grep + with -e. + * lib/autoconf/programs.m4 (AC_PROG_GREP): Check for -e, too. + (_AC_PROG_GREP): Assume 3rd arg is properly quoted for the shell. + All callers changed. Append /usr/xpg4/bin to the PATH, for + Solaris. + (_AC_FEATURE_CHECK_LENGTH): Discard stderr, so we don't bother + the user with complaints about multiple -e options. + * tests/local.at (AC_STATE_SAVE): Use $GREP, not grep. + Define it with AC_PROG_GREP. + * configure.ac (AC_PROG_GREP): Add. + * lib/freeze.mk (GREP): New macro. + +2004-05-02 Eric Sunshine + + * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Consult $SHELL as + a possible candidate only after all others fail, rather than + consulting it first. This improves backward compatibility by + better reflecting the way shell selection occurred in previous + versions of Autoconf, and should help to avoid triggering latent + problems in other packages, such as the one in Automake where zsh + is not handled robustly: + http://mail.gnu.org/archive/html/automake/2004-04/msg00095.html + Although it is not Autoconf's responsibility to work around + problems in Automake, it nevertheless makes sense to avoid + introducing unnecessary incompatibilites. + +2004-04-22 Albert Chin-A-Young , + Gary V. Vaughan + + * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Don't guess + how deeply nested we are when a suitable tool is found, set the + ac_path_TOOL_found flag. + (_AC_PATH_PROG_FEATURE_CHECK): Encapsulate knowledge of how deeply + nested we are in this macro. Break out of all 3 nested loops if + ac_path_TOOL_found is set. + +2004-04-21 Gary V. Vaughan + + * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Break out + of the _AS_PATH_WALK loop too if GNU flavor is found. + +2004-04-21 Alexandre Duret-Lutz + + * doc/autoconf.texi (Limitations of Make): Update documentation + for `$<'. New entry `Long lines', based on a report from Simon + Josefsson. Augment the documentation for SHELL = @SHELL@ with a + paragraph about DJGPP, based on a mail from Richard Dawe. + +2004-04-20 Paul Eggert + + * tests/c.at (C keywords): Don't assume that GCC supports + "restrict" and "inline", as sufficiently-old GCC versions do not + (also, GCC configured to be in pedantic C89 mode does not). + Problem reported by Sumit Pandya in: + http://mail.gnu.org/archive/html/autoconf/2004-04/msg00092.html + + * lib/autoconf/c.m4 (_AC_PROG_CC_G, _AC_PROG_CXX_G): Don't + consider -g to work if it generates warnings when plain compiles + don't. Problem reported by Braden McDaniel in: + http://mail.gnu.org/archive/html/autoconf-patches/2003-07/msg00014.html + + * doc/autoconf.texi (Slashes): New section, to document a problem + reported by Jim Meyering in: + http://mail.gnu.org/archive/html/bug-coreutils/2004-02/msg00060.html + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Remove potential + linker output files before linking, to work around IRIX 6 linker bug. + Problem reported by Rainer Orth in: + http://mail.gnu.org/archive/html/autoconf-patches/2004-02/msg00007.html + +2004-04-20 Gary V. Vaughan + + * lib/autoconf/programs.m4 (_AC_FEATURE_CHECK_LENGTH): Make the + best tool so far counter rely on the tool path variable name to + avoid checks for one tool being affected by the results of running + the length check on a previous tool. + + * lib/autoconf/programs.m4 (_AC_PROG_GREP): Take an additional + match expression argument, as different greps have different + regular expression flavours. + (AC_PROG_FGREP): Pass 'FGREP'. fgrep treats all match chars as + literals. + (AC_PROG_EGREP): Pass 'EGREP$'. + (AC_PROG_GREP): Pass 'GREP$'. + +2004-04-20 Albert Chin-A-Young + + * lib/autoconf/programs.m4 (AC_PROG_GREP): Cache variable + is `ac_cv_path_GREP', not `oc_cv_path_GREP'. + +2004-03-29 Paul Eggert + + * doc/autoconf.texi (Particular Headers, Particular Types, Generic + Types, Specific Compiler Characteristics, System Services, + Obsolete Macros): Use 'long int', 'short int', 'unsigned int' + etc. consistently instead of 'long', 'short', 'unsigned' etc. + * lib/autoconf/c.m4 (AC_LANG_INT_SAVE(C), AC_C_BIGENDIAN): Likewise. + * lib/autoconf/functions.m4 (AC_FUNC_MMAP, AC_FUNC_SELECT_ARGTYPES): + Likewise. + * lib/autoconf/headers.m4 (AC_HEADER_SYS_WAIT): Likewise. + * lib/autoconf/types.m4 (AC_TYPE_GETGROUPS, AC_TYPE_SIZE_T, + AC_TYPE_OFF_T): Likewise. + * tests/semantics.at (AC_CHECK_TYPES: backward compatibility): + Likewise. + + * tests/foreign.at (Libtool): Create an empty aclocal.m4, to + pacify libtool 1.5.2. Fix quoting problems in sed command. + +2004-03-28 Paul Eggert + + * doc/autoconf.texi (Particular Structures): AC_STRUCT_TIMEZONE + now defines HAVE_DECL_TZNAME if it is declared, when + HAVE_STRUCT_TM_TM_ZONE is not defined. + * lib/autoconf/types.m4 (AC_STRUCT_TIMEZONE): Implement this. + Do not assume atoi. Rely on HAVE_DECL_TZNAME when testing + for HAVE_TZNAME. + +2004-03-28 Steven G. Johnson + + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Corrected + superfluous backslashing of quotes (") in sed expressions; + thanks to Paul Eggert. + +2004-03-26 Steven G. Johnson + + * lib/autoconf/fortran.m4 (_AC_PROG_FC): new name of Intel + Fortran compiler is ifort, also added pghpf; thanks to Nelson + H. F. Beebe for the bug report. + +2004-03-26 Steven G. Johnson + + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): fix for + quoted -cmdline argument in Portland Group compiler (bug + reported by Jeffrey J. Barteet). + +2004-03-25 Kevin Ryde + + * doc/autoconf.texi (Specifying Names): Move cross_compiling ovindex to + (Run Time): ... here, where it's now mentioned. + +2004-03-19 Alexandre Duret-Lutz + + * doc/autoconf.texi (autom4te Invocation): Language Autoconf + inherits from language Autoconf-without-aclocal-m4. + (Customizing autom4te): Adjust example; the cache must now be + disabled for language Autoconf-without-aclocal-m4. + +2004-03-16 Paolo Bonzini + Nathanael Nerode + + * lib/autoconf/programs.m4 (AC_PATH_TOOL, AC_CHECK_TOOL, + AC_CHECK_TOOLS): Warn if a cross-tool is found without + a prefix. + (AC_PATH_TARGET_TOOL, AC_CHECK_TARGET_TOOL, + AC_CHECK_TARGET_TOOLS): New macros. + * doc/autoconf.texi (Generic Programs): Document + (AC_PATH_TARGET_TOOL, AC_CHECK_TARGET_TOOL, + AC_CHECK_TARGET_TOOLS, and warn for future changes + in the behavior of AC_PATH_TOOL, AC_CHECK_TOOL and + AC_CHECK_TOOLS. + (Specifying Names): Document the reason for these future + behavioral changes. + * tests/mktests.sh: Do not generate tests for the + new macros. + * NEWS: Document these changes. + + * doc/autoconf.texi: Avoid macros with unbraced arguments, + they make TeX hang up. + +2004-03-15 Paul Eggert + + * NEWS: New macro AC_CHECK_ALIGNOF. + * doc/autoconf.texi (Generic Compiler Characteristics): Document it. + * lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Use long int rather than + int; avoid "a `$1'" since this isn't grammatical if $1 begins with a + vowel. + (AC_CHECK_ALIGNOF): New macro. + * tests/mktests.sh (ac_exclude_list): Exclude AC_CHECK_ALIGNOF. + * tests/semantics.at (AC_CHECK_ALIGNOF): Add tests similar to + those for sizeof. + +2004-03-03 Paul Eggert + + * bin/Makefile.am (edit): Don't use $< in a context where + POSIX doesn't require support for it. Use $@.in instead. + Problem reported by Anthony N. Frasso in + . + * bin/autoscan.in, bin/autoupdate.in: Add @configure_input@ comment. + +2004-02-23 Gary V. Vaughan + + * bin/autoreconf.in (autoreconf_current_directory): Recognize LT_INIT + from the next generation of Libtool. + * lib/autom4te.in (Autoreconf-preselections): Ditto. + +2004-02-20 Alexandre Duret-Lutz + + * doc/autoconf.texi (Limitations of Usual Tools) : `mkdir -p' + is not always thread-safe. Report from Nathanael Nerode. + +2004-02-18 Paul Eggert + + Fix a dependencies problem, stemming from a Autoconf 2.59 build + problem on QNX reported by Stephen Rasku in + . + + * bin/Makefile.am ($(srcdir)/autoconf.in): Depend on + $(m4sh_m4f_dependencies); this removes a FIXME. + * tests/Makefile.am ($(srcdir)/wrapper.in): Likewise. + (MAINTAINERCLEANFILES): Split into pieces, + one per related section. Add $(srcdir)/wrapper.in. + +2004-02-09 Paul Eggert + + * doc/autoconf.texi (Setting Output Variables): Emphasize that + AC_SUBST provides no portable way to escape literal newlines. + + * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Ignore all + flags of the form -lcrt*.o, not just -lcrt[01].o and -lcrtbegin.o. + Darwin uses -lcrt2.o and there's little point to cataloging all + the system variants. Partial fix reported by Andreas Waechter in: + http://mail.gnu.org/archive/html/autoconf-patches/2004-02/msg00006.html + for bug reported by Nelson H. F. Beebe in: + http://mail.gnu.org/archive/html/bug-autoconf/2003-12/msg00090.html + +2004-02-04 Paolo Bonzini + + * doc/autoconf.texi (AU_DEFUN): Fix English, + suggested by Paul Eggert. + * lib/autoconf/autoupdate.m4: Correct reference to + acobsolete.m4, suggested by Alexandre Duret-Lutz. + +2004-02-02 Paolo Bonzini + + * bin/autoupdate.in: Define __file__ so that warnings + refer to the correct file. + * doc/autoconf.texi (AU_DEFUN): Describe more correctly + the behavior of the third argument. + * lib/autoconf/autoupdate.m4 (AU_DEFUN): Describe more + correctly the behavior of the third argument. Document + what the three macros that AU_DEFUN defines do. Fix + warning message when the third argument includes $0 + (reported by Alexandre Duret-Lutz). + +2004-01-30 Paolo Bonzini + Eric Sunshine + Paul Eggert + + * lib/m4sugar/m4sh.m4 (M4SH-SANITIZE): New diversion. + (AS_INIT): Output shell initialization there. Removed optional + parameter. Expand _AS_SHELL_FN_SPY. + (AS_INIT_WITH_SHELL_FN): Removed. + (_AS_SHELL_FN_SPY): New macro. + (AS_DETECT_REQUIRED, AS_DETECT_SUGGESTED): New + macros. + (AS_SHELL_SANITIZE): Remove loop to find better shell + and documentation for the parameter. + (_AS_DETECT_BETTER_SHELL): Move it here. + (_AS_SHELL_FN_WORK): Remove shell invocation, reformat. + (_AS_RUN): Move it here, support testing with eval. + (AS_REQUIRE_SHELL_FN): Require shell functions when + it is used. + (_AS_LINENO_WORKS): Put around braces, we do not + trigger the bash bug anymore. + * lib/autotest/general.m4: Document M4SH-SANITIZE, do not + use AS_INIT_WITH_SHELL_FN. + * bin/autoconf.in, tests/wrapper.in: Regenerated. + +2004-01-30 Paolo Bonzini + + * bin/autoupdate.in: Trace AU_DEFINE instead of AU_DEFUN. + * doc/autoconf.texi: Don't say that the third parameter + is broken. + * lib/autoconf/autoupdate.m4 (AU_DEFINE): New dummy macro. + (AU_DEFUN): Honor the third parameter, create autoupdate + macros with AU_DEFINE. + * lib/autoconf/headers.m4 (AC_USG, AC_MEMORY_H, + AC_DIR_HEADER): Use AU_DEFUN's third parameter. + * lib/autoconf/lang.m4 (AC_LANG_SAVE): Likewise. + * lib/autoconf/programs.m4 (AC_RSH): Likewise. + * lib/autoconf/specific.m4 (AC_HAVE_POUNDBANG, + AC_ARG_ARRAY, AC_CYGWIN, AC_EMXOS2, AC_MINGW32, + AC_XENIX_DIR): Likewise. + * lib/autoconf/types.m4 (AC_INT_16_BITS, AC_LONG_64_BITS, + AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV): Likewise. + * lib/autoconf/status.m4: Remove FIXME. + * tests/local.at (AT_CHECK_AU_MACRO): Ignore stderr, check + that the macro is not present anymore in the updated + configure.ac. + * tests/tools.at (autoupdate AC_LINK_FILES): Ignore stderr + of autoupdate. + +2004-01-28 Paul Eggert + + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Add 2004 to + copyright years. + * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Add 1992 thorugh + 2003 (except 1997) to the list of copyright years. This undoes + the 2003-05-22 change, which removed the older years from the list. + * lib/autoconf/status.m4 (AC_OUTPUT): Update copyright date to 2004. + +2004-01-27 Gary V. Vaughan + Albert Chin-A-Young + + * lib/autoconf/programs.m4 (AC_PROG_GREP): New macro to test for a + grep or ggrep program in PATH that accepts as long lines as + possible. + * lib/autoconf/programs.m4 (_AC_PROG_GREP): Factor out the core of + AC_PROG_GREP. + (AC_PROG_EGREP, AC_PROG_FGREP): Use it to find best available + egrep and fgrep respectively if $GREP -E/-F don't work. + (_AC_PATH_PROG_FEATURE_CHECK): Factor out the common core of + _AC_PROG_GREP, and AC_PROG_SED. + (_AC_FEATURE_CHECK_LENGTH): New helper macro for finding the + longest input length accepted by a command. + (AC_PROG_SED): Use it. + * doc/autoconf.texi (Particular Programs): Document the changes. + * NEWS: Updated. + +2004-01-27 Paul Eggert + + * bin/autoconf.as ($version): Update copyright from 2003 to 2004. + * bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in, + bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in: Likewise. + * lib/autoconf/general.m4 (_AC_INIT_COPYRIGHT): Likewise. + + * Makefile.in, aclocal.m4, configure, bin/Makefile.in, + bin/autoconf.in, config/Makefile.in, config/config.guess, + config/config.sub, config/install-sh, config/mdate-sh, + config/mkinstalldirs, config/texinfo.tex, doc/Makefile.in, + lib/Makefile.in, lib/Autom4te/Makefile.in, + lib/autoconf/Makefile.in, lib/autoscan/Makefile.in, + lib/autotest/Makefile.in, lib/emacs/Makefile.in, + lib/m4sugar/Makefile.in, man/Makefile.in, man/autoconf.1, + man/autoheader.1, man/autom4te.1, man/autoreconf.1, + man/autoscan.1, man/autoupdate.1, man/config.guess.1, + man/config.sub.1, man/ifnames.1, tests/Makefile.in, + tests/acc.at, tests/acfortran.at, tests/acfunctions.at, + tests/acgeneral.at, tests/acheaders.at, tests/aclang.at, + tests/aclibs.at, tests/acspecific.at, tests/acstatus.at, + tests/actypes.at: Regenerate and/or sync with original + sources. + +2004-01-26 Paul Eggert + + * doc/autoconf.texi (Default Includes): Include even if + HAVE_INTTYPES_H is defined. This is needed on Tru64 5.1b with + Compac C V6.5-207 (dtk), which defines uintmax_t in but + not . Problem reported by Tim Mooney in + . + * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): + Likewise. + + * lib/autoconf/programs.m4 (AC_PROG_SED): Use diff, not sed; + otherwise "make check" fails because it forbids cmp (I guess + because cmp treats files as binary on DOS-like systems). + + * tests/mktests.sh: Update copyright date to 2004, since some tests + have changed in 2004. + +2004-01-23 Gary V. Vaughan + + * lib/autoconf/programs.m4 (AC_PROG_SED): New macro to test for a + non-truncating sed or gsed program in PATH. + * tests/acprograms.at: Add it. + * doc/autoconf.texi (Particular Programs): Document it. + * NEWS: Updated. + +2004-01-15 Paul Eggert + + * lib/autoconf/c.m4 (_AC_PROG_CC_STDC): Try -std, not -std1, since + -std1 disables some useful extensions on Tru64. Problem reported + by N. Lichtmaier in + . + +2004-01-14 Paul Eggert + + * doc/autoconf.texi (Programming in M4sh): Document that + AS_MKDIR_P succeeds if the destination is a symbolic link + to an existing directory. + (Limitations of Usual Tools): Note that mkdir -p might not + succeed on symlinks to directories. + +2004-01-13 Paul Hilfinger + + * lib/autoconf/autoupdate.m4 (AU_DEFUN): Grammar fix in comment. + * bin/autoheader.in: Grammar fix in message. + * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): + Test for dir before calling mkdir -p. (trivial changes) + +2004-01-13 Eric Blake + + * doc/autoconf.texi (Obsolete Macros): In AC_TRY_COMPILE and + AC_TRY_LINK, s/AC_LANG_SOURCE/AC_LANG_PROGRAM/. (trivial change) + +2004-01-10 Jim Meyering + + * doc/autoconf.texi (Running the Preprocessor): Correct grammar. + +2004-01-09 Paul Eggert + + * lib/autoconf/general.m4: Fix bug: AC_CHECK_SIZEOF evokes a warning + with `autoconf -Wall,error'. Bug reported by Eric Blake in: + http://mail.gnu.org/archive/html/autoconf-patches/2004-01/msg00000.html + (_AC_COMPUTE_INT_COMPILE): Invoke _AC_COMPILE_IFELSE, not + AC_COMPILE_IFELSE, since we now assume our caller invokes + AC_LANG_COMPILER_REQUIRE, for symmetry with _AC_COMPUTE_INT_RUN. + (_AC_COMPUTE_INT_RUN): Likewise, for _AC_RUN_IFELSE instead + of AC_RUN_IFELSE; this avoids the warning mentioned above. + (_AC_COMPUTE_INT): Invoke AC_LANG_COMPILER_REQUIRE. + +2004-01-07 Paul Eggert + + * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): Avoid \$ inside + `"'...'"`, as it's confusing (and I suspect it may not work on + some platforms). The code was incorrect anyway, as it assumed + that \$ evaluated to itself in that context. Reported by + Alexandre Duret-Lutz. + +2004-01-07 Alexandre Duret-Lutz + + * lib/autom4te.in (Automake-preselections): Preselect AC_LIBTOOL_TAGS + and _LT_AC_TAGCONFIG. + +2004-01-06 Paul Eggert + + * doc/autoconf.texi (One Macro Call): Fix an incorrect + example, and add more examples. Reported by Eric Sunshine. + +2004-01-05 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): + Remove warning against "rm -fr" introduced yesterday; it + was a false alarm. + + * bin/Makefile.am (autoconf, autoheader, autom4te, autoreconf, + autoscan, autoupdate, ifnames): Don't use chmod -w. + * lib/Makefile.am (autom4te.cfg): Likewise. + * doc/autoconf.texi (Limitations of Usual Tools): Warn against + "chmod -w". + +2004-01-04 Paul Eggert + Paolo Bonzini + + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Speed up sed scripts + by doing lineno substitution only on lines containing "$LINENO". + +2004-01-04 Paul Eggert + + * lib/autoconf/general.m4 (AC_ARG_PROGRAM): + Use "rm -f" to remove conftest.sed, not plain "rm". + Bug reported by David Relson in + . + + * Makefile.am (autom4te-update): + Replace "rm -rf" and "rm -fr" with "rm -f -r", as POSIX requires. + * Makefile.maint (my-distcheck, do-po-update): Likewise. + * doc/autoconf.texi (Guidelines): Likewise. + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Likewise. + * lib/autoconf/libs.m4 (_AC_PATH_X_XMKMF): Likewise. + * lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Likewise. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Likewise. + * tests/Makefile.am (clean-local): Likewise. + * tests/tortue.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS, + srcdir): Likewise. + * doc/autoconf.texi (Limitations of Usual Tools): + Warn against "rm -fr". + +2004-01-03 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools): Mention that cc + -c -o might not work. From a suggestion by Kevin Ryde. + (C Compiler, Generating Sources, Limitations + of Usual Tools, Limitations of Make, Making testsuite Scripts): + Don't put '-o' after non-options, as POSIX doesn't allow this. + Mention that cc's name might be gcc or c89 or whatever. + +2004-01-04 Kevin Ryde + + * doc/autoconf.texi: Add various further index entries. + +2003-12-29 Paul Eggert + + * bin/autoreconf.in (autoreconf_current_directory): + Fix typo: mkdir without umask arg. + +2003-12-27 Alexandre Duret-Lutz + + * doc/autoconf.texi (Limitations of Make) : + Documents OSF1/Tru64 make behavior. Replace `VPATH = ../src' by + `VPATH = ../pkg/src' in examples to make the OSF1/Tru64 make + explanation clearer. + +2003-12-24 Andreas Schwab + + * doc/autoconf.texi (Default Includes): Fix misspelling of + AC_INCLUDES_DEFAULT. + +2003-12-03 Paolo Bonzini + + * configure.ac: Test if sh -n works. + * configure: Regenerate. + * tests/atlocal.in: Store the result here. + * tests/local.at (AT_CHECK_SHELL_SYNTAX): Extracted from + tools.at, looking in atlocal's ac_cv_sh_n_works instead + of explicitly testing. + (AT_CHECK_PERL_SYNTAX): Moved from tools.at. + (AT_CHECK_AUTOCONF): Test for the configure script syntax. + * tests/tools.at (Syntax of the shell scripts): Simplify + using AT_CHECK_SHELL_SYNTAX. + (Syntax of the Perl scripts): Remove definition of + AT_CHECK_PERL_SYNTAX. + +2003-12-03 Paolo Bonzini + + * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK): Redirect + stderr to /dev/null. + * bin/autoconf.in: Regenerate. + * bin/wrapper.in: Regenerate. + +2003-11-26 Paolo Bonzini + + * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): + Extracted from AS_SHELL_SANITIZE. + (_AS_SHELL_FN_WORK, AS_INIT_WITH_SHELL_FN): New + macros. + (AS_SHELL_SANITIZE): Move reinvocation code from + _AS_LINENO_WORKS, use it to find out if shell + functions work. + (_AS_LINENO_WORKS): Don't find another shell if $LINENO + does not work. + (AS_INIT): Pass parameter down to AS_SHELL_SANITIZE. + (AS_REQUIRE_SHELL_FN): Test that AS_INIT_WITH_SHELL_FN + was called. + * lib/autotest/general.m4: Use AS_INIT_WITH_SHELL_FN. + * bin/autoconf.in: Regenerate. + * tests/wrapper.in: Regenerate. + * tests/tools.at: Test the syntax of tests/autoconf + and tests/testsuite. + +2003-11-24 Akim Demaille + + * config/announce-gen (&print_locations, &print_signatures) + (&sizes): New. + Use them. + No longer rely on Gnus to inline the list of signatures: compute + them on the fly. + +2003-11-24 Akim Demaille + + * doc/autoconf.texi (Particular Programs): AC_PROG_LEX can + override some files. + (Input): AC_CONFIG_AUX_DIR(aux) is a bad idea on DOS. + From Debian Autoconf 2.58. + +2003-11-24 Akim Demaille + + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Quote $ac_popdir + uses. + From Debian Autoconf 2.58. + +2003-11-24 Paolo Bonzini + + * TODO: Remove already done things. Update the part about finding + tools for the target. + +2003-11-24 Paolo Bonzini + + * lib/autoconf/headers.m4 (AC_USG, AC_MEMORY_H, AC_DIR_HEADER): + Make wording more consistent. + * lib/autoconf/specific.m4 (AC_CYGWIN, AC_EMXOS2, AC_MINGW32): + Explain the transition better. + * lib/autoconf/types.m4 (AC_INT_16_BITS, AC_LONG_64_BITS): Explain + the transition better. + +2003-11-24 Paolo Bonzini + + * doc/autoconf.texi (Obsoleting Macros): Don't document the third + parameter of AU_DEFUN. + * lib/autoconf/autoupdate.m4 (AU_DEFINE): Remove. + (AU_DEFUN): Remove the third parameter, it was not used. + Use AC_DEFUN directly, not AU_DEFINE. + * lib/autoconf/status.m4 (AC_LINK_FILES): Move the message into + the expanded body, consistently with other macros such as AC_USG. + +2003-11-17 Paul Eggert + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Put at least 14 bytes + into the initial confdefs.h, to work around a bug in NextStep 3.3 + patch 3 reported by Eric Sunshine. + +2003-11-15 Kevin Ryde + + * doc/autoconf.texi (Using System Type): Revise, showing $host rather + than $target since the latter is not usual, add guidelines on when to + use or not use the system type. + +2003-11-12 Derek Price + + * doc/autoconf.texi (Limitations of Usual Tools): Fix what looks like a + typo misrepaired by an auto-spellcheck. + +2003-11-12 Akim Demaille + + * bin/autoreconf.in (&parse_args): Don't call automake with + --force-missing unless it actually supports it. + From Debian #219336. + +2003-11-12 Akim Demaille + + * configure.ac: Bump to 2.59a. + Require 2.59. + +2003-11-06 Akim Demaille + + Version 2.59. + +2003-11-05 Alexandre Duret-Lutz + + * lib/autoconf/status.m4 (_AC_SRCPATHS): Fix use of AS_SET_CATFILE + so that ac_abs_builddir, ac_abs_top_builddir, ac_abs_srcdir, + and ac_abs_top_srcdir are absolute paths. + * lib/m4sugar/m4sh.m4 (AS_SET_CATFILE): Remove misleading comment. + +2003-11-05 Akim Demaille + + * configure.ac: Bump to 2.58a. + +2003-11-05 Kevin Ryde + + * doc/autoconf.texi (Using Autotest): Avoid @strong{Note: ...}, since + it provokes a warning from makeinfo about looking like a cross + reference in info output. + + * doc/autoconf.texi (Function Portability): Add notes on signal + handler return type, as per AC_TYPE_SIGNAL. + +2003-11-04 Akim Demaille + + Version 2.58. + * doc/standards.texi: Update from master. + + * tests/mktests.sh (ac_exclude_list): Add AC_FC_FREEFORM. + +2003-11-04 Akim Demaille + + AC_CONFIG_FILE([d1/foo:d2/foo]) triggers error messages when + computing the absolute path to d1 in the source hierarchy: it may + not exist at all. So don't cd into it. + From Alexandre Duret-Lutz. + http://mail.gnu.org/archive/html/bug-autoconf/2003-10/msg00205.html + + * lib/m4sugar/m4sh.m4 (AS_SET_CATFILE): New. + From Paul Eggert, but named after Perl's IO::Spec->catfile. + * doc/autoconf.texi (Programming in M4sh): Document. + * lib/autoconf/status.m4 (_AC_SRCPATHS): Use it. + +2003-11-03 Pavel Roskin + + * doc/autoconf.texi (Generic Structure Checks): Describe + action-if-found and action-if-not-found in AC_CHECK_MEMBERS. + +2003-10-31 Akim Demaille + + * tests/fortran.at (GNU Fortran 77): Don't run FC macros. + (GNU Fortran): New. + * doc/autoconf.texi (Language Choice): Document. + * lib/autoconf/fortran.m4 (AC_FC_SRCEXT, AC_FC_FREEFORM): Assert + the current language is Fortran. + +2003-10-31 Akim Demaille + + * bin/autom4te.in (&freeze): Use a less likely warning separator + than `\n\n', so that `\n\n\n' is valid in warnings. + Reported by Steve Huston. + +2003-10-28 Akim Demaille + + * Makefile.cfg (local_updates, executable-update): Tweak to be + robust to parallel makes. + Suggested by Alexandre Duret-Lutz. + +2003-10-27 Akim Demaille + + * Makefile.cfg (executable-update): New. + (local_updates): Call it. + +2003-10-27 Akim Demaille + + * lib/autoconf/general.m4 (_AC_RUN_IFELSE, _AC_INIT_PREPARE): + Don't remove core.* as it may remove valid user files. + * lib/autoconf/functions.m4 (AC_FUNC_SETVBUF_REVERSED) + (AC_FUNC_UTIME_NULL): Likewise. + +2003-10-23 Akim Demaille + + Version 2.57g. + * config/config.guess, config/config.sub: Upgrade from masters. + +2003-10-23 Akim Demaille + + * lib/autoconf/fortran.m4 (AC_FC_SRCEXT): Functions using + AC_COMPILE_IFELSE that use break skip the clean up. So do it by + hand... + +2003-10-23 Akim Demaille + + * lib/autoconf/general.m4 (_AC_LINK_IFELSE, _AC_COMPILE_IFELSE): + Don't forget to remove conftest.err. + +2003-10-23 Akim Demaille + + * lib/autoconf/general.m4 (_AC_LIBOBJ): Don't insert twice the + same object file in $LIBOBJS. + Reported by Alexandre Duret-Lutz & Derek Robert Price. + * doc/autoconf.texi (Generic Functions): Adjust. + +2003-10-20 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_TR_SH_PREPARE, _AS_TR_CPP_PREPARE): + Use 'eval', so that the resulting configure scripts work even if + the current directory has a weird file name like 'y%s+%pp%;s%@%_%g'. + +2003-10-20 Daniel Jacobowitz + + * lib/autoconf/lang.m4 (AC_LANG_WERROR): New macro. + * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_PREPROC_IFELSE) + (_AC_LINK_IFELSE): Check the werror flag. + * doc/autoconf.texi (Generic Compiler Characteristics): Document + AC_LANG_WERROR. + * NEWS: Mention it. + +2003-10-20 Daniel Jacobowitz + + * lib/autoconf/lang.m4 (AC_NO_EXECUTABLES): Override + _AC_COMPILER_EXEEXT to attempt a link. If linking fails, + override AC_LINK_IFELSE. + +2003-10-15 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_UNSET_PREPARE): Work around a bug in + pdksh 5.2.14. Bug reported by Ralf Corsepius. + * doc/autoconf.texi (Shellology): Mention the Korn shell and pdksh. + Mention /usr/dt/bin/dtksh on Solaris. + (Shell Substitutions): Warn about $((...)). + (Parentheses): New section. + +2003-10-15 Kevin Ryde + + * doc/autoconf.texi (Function Portability): Add @prindex for exit. + Add putenv and unsetenv. Add sysconf _SC_PAGE_SIZE. + +2003-10-13 Nathanael Nerode + + * lib/autoconf/functions.m4 (AC_FUNC_FORK): Trivial fix for vfork + cross test. + +2003-10-11 Steven G. Johnson + + * lib/autoconf/fortran.m4 (_AC_PROG_FC): Use the new official + name for the GNU Fortran 95+ compiler, 'gfortran', not 'g95'. + +2003-10-10 Andreas Schwab + + * bin/autoheader.in: Avoid empty first line in --version and + --help output. + * bin/ifnames.in: Likewise. + +2003-10-09 Paul Eggert + + * lib/Autom4te/XFile.pm: Don't assume -j is solo. + Issue a more-informative diagnostic. + Problems reported by Eric Sunshine. + +2003-10-08 Steven G. Johnson + + * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Omit quoted + -mGLOB_options_string stuff for Intel ifc, which can cause + _AC_FC_LIBRARY_LDFLAGS to fail. Use (faster) case for + pattern-matching instead of grep. + +2003-10-08 Steven G. Johnson + + * doc/autoconf.texi: Document new FC Fortran macros. + +2003-10-08 Gary V. Vaughan + + * lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR): Stub out a macro + that future autopoint/aclocal/automake/autoreconf will be able + to trace to find where to install local m4 macros. + * doc/autoconf.texi (Input): Document it. + * NEWS: Updated. + +2003-10-06 Gary V. Vaughan + + * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Add + -lcrtbegin.o to list of ignored flags and fix underquoting of + -lcrt[01].o. + +2003-10-04 Steven G. Johnson + + * lib/autoconf/fortran.m4 (_AC_PROG_FC_G): Use language-specific + cache variable instead of $G77 to decide whether to include -O2, + since $G77 is specific to Fortran 77. + +2003-10-03 Steven G. Johnson + + * lib/autoconf/fortran.m4 (AC_FC_FREEFORM): Support Absoft "-f + free" flag. Re-order flags tested into rough order of popularity. + +2003-10-03 Steven G. Johnson + + * lib/autoconf/fortran.m4 (AC_PROG_FC): Reverse the order of the + arguments so that it can be used with syntax identical to + AC_PROG_F77, and so that we can more easily decide to + remove/deprecate the DIALECT optional argument in the future if it + proves troublesome. + (AC_FC_FREEFORM): Exit 77 upon failure to fix test suite for + non-freeform-supporting compilers. Document freeform flags. + +2003-10-03 Akim Demaille + + * configure.ac: Look for emacs, not macs. + Reported by Eric Sunshine. + +2003-10-03 Akim Demaille + + * lib/autom4te.in (Autoreconf-preselections): Trace AC_CONFIG_AUX_DIR. + * bin/autoreconf.in (autoreconf_current_directory): Create the + AUX_DIR if needed, for sake of automake --add-missing etc. + Suggested by Alexandre Duret-Lutz. + +2003-10-03 Akim Demaille + + * configure.ac: Quotation and formatting changes. + (EMACS): Don't set it if it is not recent enough to support + autoconf-mode.el. + From Eric Sunshine. + +2003-10-02 Akim Demaille + + * bin/ifnames.in (&scan_file): Skip C++ comments. + From Jeremy Yallop. + +2003-10-01 Pavel Roskin + + * doc/autoconf.texi (Particular Structure Checks): + Fix misspelling of HAVE_STRUCT_STAT_ST_BLOCKS. + +2003-10-01 Akim Demaille + + Version 2.57f. + +2003-09-30 Paul Eggert + + * lib/Autom4te/XFile.pm: Use Errno. + (lock): Ignore ENOLCK errors. Problem reported Andreas Schwab in + . + +2003-09-30 Akim Demaille + + * config/announce-gen (&print_news_deltas): Extracted from... + (&print_changelog_deltas): here. + (&news_file): Rename as... + (@news_file): this. + +2003-09-30 Nicolas Joly + + * lib/autoconf/fortran.m4 (_AC_PROG_FC): Remove files which might + have been created when invoking the compiler. + * tests/fortran.at (GNU Fortran 77): Quote $G77. + +2003-09-29 Akim Demaille + + Version 2.57e. + + * config/mkinstalldirs: Upgrade. + +2003-09-28 Paul Eggert + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Set DUALCASE=1, for MKS sh. + Problem reported by Lars J. Aas in + . + (_AS_MKDIR_P_PREPARE): Change "rm -fr ./-p" to the more-conservative + "test -d ./-p && rmdir ./-p". Suggested by Andreas Schwab in: + http://mail.gnu.org/archive/html/autoconf-patches/2003-09/msg00039.html + +2003-09-26 Akim Demaille + + * lib/autoconf/status.m4 (_AC_OUTPUT_COMMANDS): Make sure the + directory for AC_CONFIG_COMMANDS' first argument exists. + This makes valid the invocation of _AC_SRCPATH that follows. + Reported by Eric Sunshine. + * doc/autoconf.texi (Configuration Commands): Adjust. + +2003-09-26 Akim Demaille + + * bin/autoscan.in (Autom4te::FileUtils): Use it for find_file. + Reported by Ralf Corsepius. + +2003-09-26 Akim Demaille + + * lib/autoconf/general.m4 (AC_HELP_STRING): Don't overquote the + arguments. + Actually, use AU_ALIAS. + From Bruno Haible. + +2003-09-26 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_MKDIR_P_PREPARE): If mkdir -p . fails, + rm -fr ./-p to remove junk left behind on NextStep and OpenStep. + Problem reported by Eric Sunshine in: + http://mail.gnu.org/archive/html/autoconf-patches/2002-12/msg00014.html + +2003-09-26 Akim Demaille + + The test suite are sometimes assigning timings incorrectly. + Reported by Henk Krus. + Diagnosed by Nicolas Joly. + + * lib/autotest/general.m4 (AT_CLEANUP): Rename AT_help as + AT_help_all. + Instead of making AT_help a sequence of assignments to grow + $at_help_all, just make AT_help_all be the growing contents of + $at_help_all, and make a single assignment in... + (AT_INIT): here. + (at_times_skip): Flip the meaning and rename as... + (at_times_p): this. + (AT_INIT): When summarizing the test that ran, remove + $at_times_file after use, and check it is present before trying to + use it. + +2003-09-25 Akim Demaille + + Version 2.57d. + + * bin/Makefile.am (edit): Handle '@configure_input@'. + (autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate) + (ifnames): chmod -w. + * tests/wrapper.as (AUTOCONF, AUTOM4TE, ): Point to tests/ + executables, not bin/ executables! Otherwise all the magic needed + to find non installed files is turned off. This caused a failure + of test 40 and 41 that ran aclocal 1.8 which in turn ran autom4te + as found in its environment (sent by tests/autoreconf): pointing + to bin/autom4te that could not find its files. + * tests/mktests.sh: Force the replacement of generated files, for + the sake of "mv" program that are interactive when overwriting a + -w file. + * config/install-sh: Upgrade from CVS Automake. + +2003-09-23 Paul Eggert + + * doc/autoconf.texi (Limitations of Builtins): Document test -h + versus test -L issues. + +2003-09-23 Daniel Jacobowitz and + Paul Eggert + + Trivial change to support GCC's configuration procedure. + * lib/autoconf/c.m4 (AC_PROG_CPP_WERROR): New macro. + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Don't warn + about inconsistency if the preprocessor is set to give errors for + any warning. + * doc/autoconf.texi (C Compiler Characteristics): Document this. + +2003-09-13 Alexandre Duret-Lutz + + * Makefile.am (autom4te-update, autom4te_files): Fetch Struct.pm + and XFile.pm from Automake. + * lib/Autom4te/XFile.pm: Update from Automake. + +2003-09-12 Akim Demaille + + Version 2.57c. + +2003-09-12 Akim Demaille + + * config/config.guess, config/config.sub, config/missing, + * lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm: Update + from masters. + +2003-09-12 Akim Demaille + + * doc/autoconf.texi (Header Portability): Promote linux/types.h, + not asm/types.h. + +2003-09-11 Akim Demaille + + * doc/autoconf.texi (Header Portability): linux/random.h. + From Peter Hendrickson. + +2003-09-10 Akim Demaille + + * tests/mktests.sh (au_exclude_egrep): Make it harder to be + willing to edit the output files. + +2003-09-10 Akim Demaille + + * tests/fortran.at (GNU Fortran 77): Also exercise AC_FC_SRCEXT + and AC_FC_FREEFORM. + * tests/mktests.sh: Skip AC_FC_SRCEXT. + * lib/autoconf/fortran.m4 (AC_FC_SRCEXT, AC_FC_FREEFORM): Likewise. + +2003-09-09 Akim Demaille + + * lib/Autom4te/FileUtils.pm (&update_file): s/cannot not/cannot/g. + Reported by Gary Vaughan. + * bin/autom4te.in (handle_m4): Likewise. + +2003-09-09 Akim Demaille + + * lib/Autom4te/FileUtils.pm (&update_file): Be sure not to leave + trailing files. + +2003-09-07 Paul Eggert + + * lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): + Improve the accuracy of the wording about obsolescence. + From a suggestion by Ian Lance Taylor in + . + +2003-09-05 Paul Eggert + + * lib/autoconf/fortran.m4 (AC_FC_FREEFORM): Try -ffree-form too, + for the benefit of g77 3.2. Fix suggested by Steven G. Johnson. + +2003-09-04 Akim Demaille + + * tests/mktests.sh (ac_exclude_list): Fix the filtering of + AC_FUNC_WAIT3. + +2003-09-04 Akim Demaille + + * bin/autom4te.in: Use &fatal where more appropriate than &error. + (freeze): When exiting, use $exit_code. + * lib/autoconf/fortran.m4: Comment changes. + +2003-09-04 Akim Demaille + + * tests/mktests.sh (ac_exclude_list): Add AC_FC_FUNC. + +2003-09-02 Steven G. Johnson + + Add support for newer Fortran dialects. The F77 interface is + unchanged, and continues to support Fortran 77. New FC macros + correspond to all the old F77 macros, with output variables FC, + FCFLAGS, and FCLIBS. AC_PROG_FC defaults to picking the newest + available dialect, but older dialects can be specified. There are + new macros AC_FC_SRCEXT to set the source extension, and + AC_FC_FREEFORM to accept free-form source files. + + * lib/autoconf/c.m4 (_AC_LANG_PREFIX(C), _AC_LANG_PREFIX(C++)): + New macros. + (AC_LANG_PROGRAM(C)): Invoke _AC_LANG_PROGRAM_C_FC_HOOKS if defined. + * lib/autoconf/fortran.m4 (AC_LANG(Fortran), _AC_FORTRAN_ASSERT, + _AC_LANG_ABBREV(Fortran), _AC_LANG_PREFIX(Fortran 77), + _AC_LANG_PREFIX(Fortran), _AC_FC, AC_LANG_SOURCE(Fortran), + AC_LANG_PROGRAM(Fortran), AC_LANG_CALL(Fortran), + AC_LANG_PREPROC(Fortran), AC_LANG_COMPILER(Fortran), + _AC_FC_DIALECT_YEAR, _AC_F95_FC, _AC_F90_FC, _AC_F77_FC, + _AC_PROG_FC, AC_PROG_FC, _AC_PROG_FC_G, _AC_PROG_FC_C_O, + AC_PROG_FC_C_O, _AC_PROG_FC_V_OUTPUT, _AC_PROG_FC_V, + _AC_FC_LIBRARY_LDFLAGS, AC_FC_LIBRARY_LDFLAGS, _AC_FC_DUMMY_MAIN, + AC_FC_DUMMY_MAIN, _AC_FC_MAIN, AC_FC_MAIN, __AC_FC_NAME_MANGLING, + _AC_FC_WRAPPERS, AC_FC_WRAPPERS, _AC_FC_FUNC, AC_FC_FUNC, + AC_FC_SRCEXT, AC_FC_FREEFORM): + New macros. + (AC_PROG_F77, AC_PROG_F77_C_O, AC_F77_LIBRARY_LDFLAGS, + AC_F77_DUMMY_MAIN, AC_F77_MAIN, _AC_F77_NAME_MANGLING, + AC_F77_NAME_MANGLING, AC_F77_WRAPPERS, AC_F77_FUNC): + Rewrite in terms of the above. + (_AC_PROG_F77_G, _AC_PROG_F77_V_OUTPUT, _AC_PROG_F77_V): Remove. + * lib/autoconf/lang.m4 (_AC_LANG_PREFIX): New macro. + * tests/acfortran.at: Test AC_FC_FREEFORM, AC_FC_FUNC, + AC_FC_MAIN, AC_FC_SRCEXT, AC_FC_WRAPPERS, AC_PROG_FC_C_O. + +2003-09-02 Paul Eggert + + * doc/autoconf.texi (Limitations of Usual Tools, Limitations of Make): + Document problems with timestamp resolution that 'make', 'cp -p', and + 'touch -r' have. + +2003-08-27 Akim Demaille + + * tests/m4sugar.at (cross_warning): Make sure to enable the + output, so that we can track spurious m4sugar output. + * tests/local.at: Require 2.57. + (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): Don't m4_default the arguments that + are defaulted by AT_CHECK anyway. + Use AT_CHECK_AUTOM4TE. + * lib/m4sugar/m4sugar.m4: There should be no output at all: add a + missing dnl. + +2003-08-27 Akim Demaille + + * bin/autoheader.in: Issue the "Using auxiliary..." message only + when -Wobsolete is set. + Set it on by default. + Suggested by Klee Dienes. + +2003-08-27 Akim Demaille + + * doc/autoconf.texi (AC_FUNC_FSEEKO, AC_SYS_LARGEFILE): More + documentation. + From Guido Draheim. + +2003-08-26 Akim Demaille + + * doc/autoconf.texi (Output): Make clear that one can run code + after AC_OUTPUT. + +2003-08-25 Akim Demaille + + * config/announce-gen, GNUmakefile, Makefile.maint: Update from + CVS Bison. + +2003-08-25 Alexandre Duret-Lutz + + * bin/autoreconf.in (parse_args): Do not pass --no-force to + Automake versions prior to 1.8. + +2003-08-25 Akim Demaille + + * doc/autoconf.texi (Header Portability): netinet/if_ether.h. + From Ville Karaila. + +2003-08-24 Akim Demaille + + * configure.ac: Bump to 2.57c. + +2003-08-22 Akim Demaille + + Version 2.57b. + + * Makefile.cfg (local-checks-to-skip): New. + * Makefile.maint (local-check): Rename as... + (local-checks-available): this. + (local-check): New. + + * Makefile.am (EXTRA_DIST): Add Makefile.cfg. + * configure.ac: Require Automake 1.7.6. + +2003-08-22 Akim Demaille + + Output stack traces in warnings. + + * lib/m4sugar/m4sugar.m4 (_m4_warn): New. + Replace the former... + (m4_warn): Pass the call stack to _m4_warn. + * bin/autom4te.in: Adjust to output the call stack. + * tests/m4sugar.at (m4@&t@_warn): Adjust. + +2003-08-22 Akim Demaille + + * lib/Autom4te/Request.pm, lib/Autom4te/C4che.pm: New. + * bin/autom4te.in: Adjust. + +2003-08-21 Akim Demaille + + * lib/Autom4te/General.pm (&file_name_is_absolute): Remove. + (&verbose): Remove. + (&getopt): Adjust the note and verb channels, depending upon + --verbose. + * bin/autoheader.in, bin/autom4te.in, bin/autoscan.in, + * bin/autoupdate.in: Adjust. + Use &verb, not &verbose. + +2003-08-21 Akim Demaille + + * bin/autoheader.in (&parse_args): Use &parse_warnings and + &parse_WARNINGS. + ($help): Use Autom4te::ChannelDefs::usage. + * bin/autoscan.in: Use Autom4te::ChannelDefs. + * lib/Autom4te/General.pm: Don't export error: you don't own it. + +2003-08-21 Akim Demaille + + First stab at preserving warnings between calls to autom4te, + including when the cache is used. + + There are still several issues: (i) there are too many runs of m4 + (one for include, one for warnings, and some more), (ii) warnings + spreading on several lines are not handled gracefully, (iii) the + code meant to have the call stack display for errors does not work + (its handling should move from m4 to autom4te). + + * bin/autom4te.in Autom4te::Channels, Autom4te::ChannelDefs): + Use them. + (@preselect): Add m4_warn. + ($exit_status): Remove, use $exit_code. + ($help): Use Autom4te::ChannelDefs::usage. + (&handle_m4): No longer define the m4_warnings. + At each run, extract and report the warnings. + Always cache the result, including if the exit status is on + failure, since if nothing changes, we should result in the same + failure, hence we can use the cache. + * lib/m4sugar/m4sugar.m4 (m4_warning_ifelse, _m4_warning_ifelse) + (_m4_warning_error_ifelse, __m4_warning_error_ifelse, _m4_warn): + Remove. + (m4_warn): Redefine as a do-nothing: it is its invocation that + matters, as warnings are now reported via traces. + * lib/autoconf/general.m4 (AC_DIAGNOSE): Don't make it a copy of + the contents of m4_warn: make it _call_ m4_warn, so that tracing + the latter reveals calls to the former. + + Adjust the tests. + + * tests/m4sugar.at (m4@&t@_warn): Use existing warning categories. + +2003-08-21 Akim Demaille + + * bin/autoreconf.pm (Autom4te::Channels, Autom4te::ChannelDefs): + Use them. + +2003-08-21 Akim Demaille + + * lib/Autom4te/FileUtils.pm (&find_file): Walk the @include in + forward order. + * lib/Autom4te/ChannelDefs.pm: Doc typos. + (&parse_warnings): Accept a list of warning requests. + (&usage): Return a string, not a side effect. + (cross): New warning category. + +2003-08-21 Akim Demaille + + * lib/Autom4te/Configure_ac.pm (&find_configure_ac) + (&require_configure_ac): Accept an optional directory argument. + ($configure_ac): Remove. + * lib/Autom4te/General.pm (&find_configure_ac, &canonfile) + (&catfile): Remove. + * bin/autoheader.in, bin/autoreconf.in, bin/autoupdate.in, + * bin/autoscan.in: Adjust. + +2003-08-20 Akim Demaille + + * bin/autoheader.in: Remove duplicate 'use Autom4te::FileUtils'. + Reported by Alexandre Duret-Lutz. + +2003-08-20 Akim Demaille + + * bin/autoupdate.in, bin/autoheader.in, bin/autoreconf.in, + * bin/autom4te: Adjust. + In particular, be Autoconf tools are really silent when properly + working, bind the verbosity of the 'note' channel to $verbose. + * lib/Autom4te/General.pm (&find_file, &mtime, &update_file) + (&xsystem, &contents): Remove, since they are exported by... + * lib/Autom4te/FileUtils.pm: this. + More perldoc. + * lib/Autom4te/General.pm (&up_to_date_p): Move to... + * lib/Autom4te/FileUtils.pm: here. + +2003-08-20 Akim Demaille + + * lib/Autom4te/Channels.pm, lib/Autom4te/ChannelDefs.pm + * lib/Autom4te/Configure_ac.pm, lib/Autom4te/FileUtils.pm: New, + from CVS Automake. + +2003-08-20 Akim Demaille + + * Makefile.am (automake_cvsweb, automake_cvsargs, autom4te_files) + (autom4te-update): New. + * Makefile.cfg (update): Bind autom4te-update. + +2003-08-19 Derek Price + + * lib/autotest/general.m4: Comment various HELP_* diversions. + (PARSE_ARGS_BEGIN): New section for option parsing related + initialization. + (AT_ARG_OPTION,AT_ARG_OPTION_ARG,_AT_ARG_OPTION): New macros to define + package specific options and associated help. + +2003-08-19 Akim Demaille + + * config/announce-gen, Makefile.cfg: New. + * Makefile.am: Adjust. + * GNUmakefile, Makefile.maint: Update from CVS Coreutils. + +2003-08-19 Alexandre Duret-Lutz + + * lib/autom4te.in (Automake-preselections): Preselect + AC_CONFIG_LIBOBJ_DIR, AC_CONFIG_LINKS, m4_include, + and m4_sinclude. + +2003-08-19 Alexandre Duret-Lutz + + * lib/autom4te.in (Autoconf): Move all args except aclocal.m4? into ... + (Autoconf-without-aclocal-m4): ... this new language. + * doc/autoconf.texi (autom4te Invocation): Mention + Autoconf-without-aclocal-m4. + +2003-08-18 Derek Price + + * doc/autoconf.texi (Writing testsuite.at): Document RUN-IF-FAIL & + RUN-IF-PASS optional arguments. + +2003-08-18 Derek Price + + * doc/autoconf.texi (Programming in M4sh): Add doc for AS_IF. + +2003-08-16 Derek Price + + * doc/autoconf.texi (Writing testsuite.at): Document defaults for + STDOUT & STDERR arguments. + +2003-08-14 Derek Price + + * lib/autotestgeneral.m4 (AT_INIT): Reformat test summary line to print + DESCRIPTION rather than FILE and LINE. Shorten result to fit in new, + shorter column three. Add DESCRIPTION to log file content. + +2003-08-13 Derek Price + + * lib/autotest/general.m4 (AT_INIT): Correct typo in final status + output. + +2003-08-12 Derek Price + + * lib/autotest/general.m4 (AT_CHECK): Use new _AT_CHECK API. + (AT_CHECK_NOESCAPE): Move core functionality to... + (_AT_CHECK): ...this new macro. + +2003-08-07 Derek Price + + * lib/autotest/general.m4 (AT_CHECK): Move core functionality... + (AT_CHECK_NOESCAPE): ...to this new macro. + +2003-07-31 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_UNSET_PREPARE): Work around a bug + in Bash 2.01. Problem reported by Brian Gough in + . + +2003-07-25 John W. Eaton + + * lib/autoconf/fortran.m4 (AC_F77_LIBRARY_LDFLAGS): Also ignore + -lcrt1.o, for OS X. (trivial change) + +2003-07-07 Paul Eggert + + * lib/autoconf/c.m4 (AC_C_INLINE): Wrap the '#define inline ...' + inside '#ifndef __cplusplus'. Problem reported by + Bob Friesenhahn. + +2003-07-06 Bill Clarke + + * lib/autoconf/functions.m4 (AC_FUNC_MMAP): Cast pointer to + 'long', not 'int', for benefit of Sun's recent C++ compilers + (trivial change). See: + http://mail.gnu.org/archive/html/autoconf-patches/2003-07/msg00007.html + (This really should be 'intptr_t', not 'long', but that would + take more work.) + +2003-06-25 Akim Demaille + + * lib/Makefile.am (autom4te.cfg): Make it read only. + Depend on Makefile since it contains substitutions. + From Paolo Bonzini. + * lib/autom4te.in (args): Add local.at? for Autotest args. + This change was made on autom4te.cfg which is generated. + Reported by Raja R. Harinath. + +2003-06-25 Akim Demaille + + * doc/autoconf.texi (Header Portability): sys/mount.h. + From Gareth McCaughan. + +2003-06-23 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Report a single config.log, + not all of them. This fixes 1. the fact that when testing + Autoconf there are many many config.log, 2. the incorrect use of + top_srcdir to find config.log. + Don't mix the detailed output of failed test with the summary of + failures. Rather, append detailed log afterwards. + +2003-06-23 Akim Demaille + + * tests/local.at (AT_CHECK_CONFIGURE): Adjust to the verbose being + always run: output config.log on $at_group_log. + +2003-06-23 Akim Demaille + + * tests/torture.at (#define header templates): Don't use quotes in + C++ comments as it puzzles Emacs' sh font-lock-mode. + +2003-06-23 Akim Demaille + + * tests/mktests.sh (au_exclude_egrep): Fix output copyright notice. + * lib/autom4te.cfg (args): Add local.at? for Autotest args. + * tests/atspecific.m4: Rename as... + * tests/local.at: This. + * tests/suite.at: Move the globals into... + * tests/local.at: here. + * tests/Makefile.am: Adjust. + * doc/autoconf.texi (testsuite Scripts): Adjust. + +2003-06-21 Kevin Ryde + + * lib/autoconf/c.m4 (_AC_PROG_CC_STDC): Extend test program to get an + error from OSF 4.0 Compaq cc in its default almost-ANSI mode, thereby + ensuring we add -std1 for full-ANSI. + + * doc/autoconf.texi (hdrindex): New macro. + Add index entries for portability of various standard header files. + +2003-06-20 Akim Demaille + + * configure.ac: Bump to 2.57b. + +2003-06-20 Akim Demaille + + Version 2.57a. + +2003-06-20 Akim Demaille + + * bin/autom4te.in: Don't rely on $HOME being defined. + Reported by Marc Espie as PR/233. + +2003-06-20 Akim Demaille + + * lib/autotest/general.m4: Use at_times_file only if used. + From Nicolas Joly. + +2003-06-20 Akim Demaille + + * config/config.guess, config/config.sub, config/elisp-comp, + * config/install-sh, config/mkinstalldirs, doc/standards.texi: + Update from masters. + +2003-06-11 Paolo Bonzini + + * doc/autoconf.texi (Writing testsuite.at): Document AT_XFAIL_IF + * lib/autotest/general.m4 (AT_XFAIL_IF): New macro. + (TEST_SCRIPT): New diversion. + (AT_SETUP): Divert output to TEST_SCRIPT and move some code... + (AT_CLEANUP): ...to here. Undivert TEST_SCRIPT. + (AT_INIT): Support for expected failures. + +2003-06-02 Akim Demaille + + * bin/autom4te.in, bin/autoscan.in, bin/autoheader.in: White space + changes. + * lib/Autom4te/General.pm (&backname): Remove, no longer used by + Autoconf nor Automake. + (&contents): New, from Automake. + PODify. + +2003-05-28 Paul Eggert + + * NEWS, doc/autoconf.texi (Particular Functions), + lib/autoconf/functions.m4 (AC_FUNC_MKTIME): Check that mktime + is the inverse of localtime. + +2003-05-25 Alexandre Duret-Lutz + + * lib/Autom4te/General.pm (END): Print diagnostics to STDERR. + (handle_exec_errors): New function. Work around $! being + altered by WEXITSTATUS. + (xqx, xsystem): Use handle_exec_errors. + +2003-05-23 Alexandre Duret-Lutz + + * lib/Autom4te/General.pm (END): Rewrite exit code processing. + Do not call `_exit()', simply modify `$?'. + (xsystem): Reset $! before running system, and check it afterward. + * tests/tools.at (autoupdating AC_PREREQ): Expect exit status + 63 for version mismatches. + +2003-05-23 Akim Demaille + + * lib/autoconf/status.m4: Prefer "TAB-SP" to "SP-TAB", because of + Emacs' dangerous whitespace.el behavior (smashing "useless" spaces in + the middle of a line). + * lib/m4sugar/m4sugar.m4: Likewise. + Remove useless spaces in comments. + +2003-05-23 Akim Demaille + + * lib/m4sugar/m4sugar.m4 (m4_version_prereq): Failure causes an + exit 63, so that we (or Automake's "missing") can tell the + difference with a plain failure. + * doc/autoconf.texi (Notices): Adjust. + +2003-05-23 Akim Demaille + + * Makefile.am, bin/Makefile.am, config/Makefile.am, + * doc/Makefile.am, lib/autoconf/Makefile.am, tests/Makefile.am: + White spaces cleanup. + +2003-05-22 Jim Meyering + Paul Eggert + + * lib/autoconf/c.m4 (_AC_PROG_CXX_EXIT_DECLARATION): + Remove `#include ' from the list; we should never + make confdefs.h include or , because the + resulting namespace pollution would cause other tests to fail. + Configure scripts run with some older versions of g++ and HP's + aCC would fail due to such an #include. Problems reported by + Matthew Mueller in and by + Keith Bostic in + . + In the test, use the test declaration before including , + as that's closer to how it'll be used. + +2003-05-23 Akim Demaille + + * doc/autoconf.texi (Header Portability): ucred.h. + From Ian Redfern. + +2003-05-22 Paolo Bonzini + + Overhaul Autotest's logging: generate separate log files + in testsuite.dir/NNN/testsuite.log, and append them to + testsuite.log instead of re-running the test verbosely. + + * lib/autotest/general.m4 (AT_INIT): Use a single redirected + file descriptor, write 0 to at_status_file instead of setting + at_status=0, initialize some new variables (at_status_file, + at_group_log, at_suite_log, at_tee_pipe). Remove the cruft + to rerun the tests, instead append the at_group_log to the + at_suite_log when a test fails. + (AT_SETUP): pipe the test case's output into at_tee_pipe, + with the AS_MESSAGE_LOG_FD redirected to stdout. + (AT_CLEANUP): save the output status in $at_status_file + and restore it, redirect the AS_MESSAGE_LOG_FD back to + its original place. + (AT_CHECK): since tests are run with a redirected stdout, + and used to be re-run in verbose mode, turn some $at_verbose + into echo, and don't redirect the output of testing stdout + and stderr. + + * lib/autotest/autoconf.texi (testsuite Scripts): Update + the name of the debugging directory and information about + its contents. + +2003-05-22 Paolo Bonzini + + * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Actually use the 2nd + parameter. + +2003-05-22 Akim Demaille + + * lib/autoconf/autotest.m4, lib/autoconf/autoupdate.m4 + * lib/autoconf/fortran.m4 lib/autoconf/general.m4 + * lib/autoconf/headers.m4 lib/autoconf/oldnames.m4 + * lib/autoconf/status.m4: Fix and adjust copyright notices. + +2003-05-22 Akim Demaille + + * aclocal.m4, bin/autoconf.as, lib/autoconf/autoconf.m4, + * lib/autoconf/autoheader.m4, lib/autoconf/autoupdate.m4, + * lib/autoconf/c.m4, lib/autoconf/fortran.m4, + * lib/autoconf/general.m4, lib/autoconf/headers.m4, + * lib/autoconf/lang.m4, lib/autoconf/libs.m4, + * lib/autoconf/programs.m4, lib/autoconf/specific.m4, + * lib/autoconf/status.m4, lib/autoconf/types.m4, + * lib/autotest/general.m4, lib/m4sugar/m4sugar.m4, + * tests/atspecific.m4, tests/base.at, tests/compile.at, + * tests/foreign.at, tests/m4sh.at, tests/semantics.at, + * tests/tools.at, tests/torture.at: + Whitespace clean up. + Suggested by Jim Meyering. + +2003-05-22 Akim Demaille + + * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Restore smashed + ' \t' as '\t ' so that Emacs' whitespace.el keep it. + Reported by Jim Meyering. + +2003-05-22 Akim Demaille + + * doc/autoconf.texi: Replace AC_HELP_STRING AS_HELP_STRING. + Add AC_HELP_STRING to the obsolete macros section. + Typos. + Use '@.' for sentences that ended in a capital letter. + From Art Haas. + +2003-05-22 Akim Demaille + + * config/config.guess, config/config.sub, config/elisp-comp, + * config/install-sh, config/mdate-sh, config/mkinstalldirs, + * config/texinfo.tex, doc/standards.texi: Update from masters. + +2003-05-21 Paolo Bonzini + + * lib/m4sugar/m4sh.m4 (AS_VAR_SET): Escape the RHS before passing + it to eval. + +2003-05-21 Akim Demaille + + * bin/autoupdate.in ($m4): Fix quotation. + Reported by Martin Mokrejs. + +2003-05-19 Paul Eggert + + * ChangeLog, ChangeLog.2, THANKS, lib/m4sugar/m4sugar.m4: + Remove non-ASCII characters. + +2003-05-18 Paolo Bonzini + + * tests/semantics.at (AC_SEARCH_LIBS): New test. + * tests/semantics.at (AC_CHECK_HEADERS_OLD, + AC_CHECK_HEADERS_NEW): New tests. + +2003-05-17 Akim Demaille + + * lib/autoconf/functions.m4: Use the default includes so that + memcmp be declared before being tested. + Reported by Sander Niemeijer. + (AC_FUNC_ERROR_AT_LINE, AC_FUNC_GETGROUPS, AC_FUNC_STRNLEN): Likewise. + * doc/autoconf.texi (Default Includes): Document + AC_INCLUDES_DEFAULT. + +2003-05-17 Akim Demaille + + * lib/autoconf/specific.m4: Include signal.h and unistd.h. + * doc/autoconf.texi (Obsolete Macros): Adjust. + Reported by Werner LEMBERG and Debian Bug 190886. + +2003-05-16 Akim Demaille + + * lib/m4sugar/m4sh.m4 (_AS_UNSET_PREPARE): s/FOO/as_foo/ to avoid + user name space clashes. + Reported by Bruno Haible. + +2003-05-16 Akim Demaille + + * bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in, + * bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in (BEGIN): Make + them uniform, and more robust to Perl special characters. + Reported by Martin Mokrejs. + +2003-05-14 Akim Demaille + + * tests/foreign.at (Libtool): Skip all Libtools pre 1.4. + +2003-05-14 Akim Demaille + + * doc/autoconf.texi (Header Portability): X11/extensions/scrnsaver.h, + linux/irda.h. + +2003-05-12 Akim Demaille + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Improve the + message. + From Matthias Andree. + +2003-05-07 Alexandre Duret-Lutz + + * lib/Autom4te/XFile.pm (lock, truncate): Do not pass @_ to flock + and truncate. + +2003-05-06 Akim Demaille + + Don't try to be smart with aclocal 1.8+ because (i) aclocal no + longer updates aclocal.m4 if useless, (ii) if a file m4_included + by aclocal.m4 is changed it might require the importing of another + m4 extension file, i.e., aclocal must be run. + + * bin/autoreconf.in (&run_aclocal, $aclocal_supports_force): New. + (&parse_args): Use --force with aclocal if required and supported. + (&autoreconf_current_directory): Use &run_aclocal. + +2003-05-06 Akim Demaille + + Lock autom4te's cache. + + * lib/Autom4te/XFile.pm ($me, &name, &lock, &truncate, &seek): New. + * bin/autom4te.in (&Request::save, &Request::load): Use an IO::File + argument instead of a file name, so that the request file remains + open during the whole autom4te run. + ($icache_file): New. + (&freeze): Lock the $icache_file. + +2003-04-29 Derek Price + + * lib/autotest/general.m4 (AT_KEYWORDS): Don't use a comma as the + seperator with m4_append_uniq(). It doesn't work. + (AT_CLEANUP): Add `;' to end of at_help_all. + (AT_INIT): Allow --keywords to be specified more than once. When + grepping $at_help_all for keywords, use the field and keyword + seperators to ensure a complete keyword match. Alter at_prev handling + to support the new --keywords behavior. + +2003-04-27 Karl Berry + + * doc/autoconf.texi: Make the dir entries in the autoconf manual + align better with others. I also made some of the individual + entries on one line, for brevity and to make it easier for me to + sort my dir-example file in the Texinfo distribution :). + +2003-04-12 Jim Meyering + + * NEWS: Mention the new macro. + * lib/autoconf/c.m4 (AC_C_RESTRICT): New macro. + * doc/autoconf.texi (C Compiler): Describe AC_C_RESTRICT. + * tests/c.at: Test AC_C_RESTRICT. + * tests/mktests.sh (ac_exclude_list): Add exclusion for AC_C_RESTRICT. + +2003-04-08 Akim Demaille + + * bin/ifnames.in: Skip C++ comments. + From Jeremy Yallop. + +2003-04-08 Akim Demaille + + * GNUmakefile (SHELL): Don't assume sh is in /bin/. + From Ilya Zakharevich. + +2003-04-08 Akim Demaille + + * doc/autoconf.texi (Particular Headers): Some about sys/socket.h, + net/if.h, stdlib.h. + +2003-04-01 Derek Price + + * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Correct syntax error + from Akim's checkin of 2003-03-29. + +2003-04-01 Derek Price + + * tests/torture.at (Configuring subdirectories): Add missing + close-quote for Akim's change from 2003-03-28. + +2003-04-01 Akim Demaille + + * doc/autoconf.texi (ac, at, ms): Rename these indexes as... + (AC, AT, MS): these. + (shortindexflag, @acindex, @ahindex, @asindex, @atindex, @msindex): + New. + Use them. + * doc/Makefile.am (CLEANFILES): Adjust. + (TEXI2DVI): Make it --batch. + +2003-03-31 Derek Price + + * lib/autotest/general.m4: Revert the checkin from 2003-03-27 + which removed the main loop. + Thanks to Akim Demaille. + +2003-03-29 Akim Demaille + + * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Skip OS/2's install, + that starts a GUI. + From Ilya Zakharevich. + +2003-03-29 Akim Demaille + + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): The + documentation to read is Autoconf's. + Suggested by Paul Eggert. + +2003-03-28 Akim Demaille + + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Suggest + reading the section "Present But Cannot Be Compiled" when the + header causes problems. + +2003-03-28 Akim Demaille + + * tests/torture.at (Configuring subdirectories): Require aclocal + 1.4, otherwise the test fails, as it does support configure.ac. + This fixes the "test 40 failed" bug reports. + +2003-03-28 Akim Demaille + + * doc/autoconf.texi (C Compiler): `#line' portability. + From Paul Eggert and Nelson H. F. Beebe. + +2003-03-27 Derek Price + + * lib/autotest/general.m4: Eliminate main loop and reorganize test + layout in order to allow scripting around test groups. + +2003-03-27 Derek Price + + * lib/autotest/general.m4 (PARSE_ARGS,PARSE_ARGS_END,HELP,HELP_MODES, + HELP_TUNING,HELP_OTHER,HELP_END,PREPARE_TESTS,TESTS_END): Define and + use new diversions in preparation for accepting new arguments and + allowing scripting around tests. + (OPTIONS,TAIL): Remove these diversions to make way for the ones above. + +2003-03-26 Derek Price + + * lib/autoconf/general.m4 (AC_ARG_VAR): Use AS_HELP_STRING instead of + obsolete AC_HELP_STRING. + (AC_HELP_STRING): AU_DEFUN to... + * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): ...here. + * tests/m4sh.at (AS_HELP_STRING): New test. + + * tests/acgeneral.at: Regenerated. + +2003-03-26 Derek Price + + * lib/autotest/general.m4: s/DEFAULT/DEFAULTS/ since it makes more + sense. Verbosify the diversion definitions comment. + +2003-03-26 Derek Price + + * lib/autotest/general.m4 (AT_INIT): Remove redundant call to + AS_PREPARE. + +2003-03-21 Eric Siegerman + + * doc/autoconf.texi (Present But Cannot Be Compiled): + Grammar fixes and minor rewording. (trivial change) + +2003-03-06 Paul Eggert + + Work around a problem noted by Nelson H. F. Beebe with coreutils + 4.5.9: Sun c89 (Sun WorkShop 6 update 2 C 5.3 Patch 111679-08 + 2002/05/09) rejects '#line 32768 "configure"' because the line + number overflows. + * lib/autoconf/c.m4 (AC_LANG_SOURCE(C)): Do not generate + #line directives. + * lib/autoconf/lang.m4 (AC_LANG_SOURCE): Fix comment to match this. + * doc/autoconf.texi (Generating Sources): Document this. + +2003-03-01 Richard Dawe + + * tests/atspecific.m4 (AT_CHECK_AUTOM4TE): Normalize + file name for the m4 program, when it has an "exe" file extension. + DJGPP's error messages include the error code in brackets - + remove the error code during normalization. + +2003-02-28 Akim Demaille + + * doc/autoconf.texi (Present But Cannot Be Compiled): New. + +2003-02-28 Alexandre Duret-Lutz + + * doc/autoconf.texi (Limitations of Make): Remove the section + about `$<' in inference rules, it was a bogus interpretation of + an old Automake change. Discuss NetBSD, FreeBSD, OpenBSD, and + Tru64 make in the "target lookup" section. + (Automake): Automake 1.5+ no longer requires special tools to be + present on the developer's host. + +2003-02-26 Richard Dawe + + * bin/autoheader.in (BEGIN): For DJGPP SHELL may not be set + to a shell that can handle redirection or quoting correctly. + Override SHELL with the shell detected by configure. + Use of $^O suggested by Tim van Holder. + * bin/autom4te.in (BEGIN): Likewise. + * bin/autoreconf.in (BEGIN): Likewise. + * bin/autoscan.in (BEGIN): Likewise. + * bin/autoupdate.in (BEGIN): Likewise. + * bin/ifnames.in (BEGIN): Likewise. + + * bin/ifnames.in: Add final newline to help and version messages. + + * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Translate colons, + to cope with DOS-style absolute paths, when constructing + ${ac_make}. + + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS, _AC_OUTPUT_FILES): + When constructing paths with IFS=:, quote the path. If we're + constructing a DOS-style absolute path, we don't want to split it + on the colon. + + * tests/atspecific.m4 (AT_CHECK_CONFIGURE): Fix typo + in description. + +2003-02-25 Pavel Roskin + + * bin/autoheader.in: Add missing newline when printing + suggestion how change AC_DEFINE call. + +2003-02-24 Paul Eggert + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Fix typo in + 2002-09-01 patch by replacing "test -n" with "test -z". + This fixes a bug found by Jeff Painter and reported by Tom Epperly in + . + + * doc/autoconf.texi (Shell Substitutions): test -n -> test -z, + to fix a mismatch between example and discussion. + +2003-02-24 Kevin Ryde + + * doc/autoconf.texi (Limitations of Builtins): Add notes on printf + format starting with "-". + +2003-02-20 Alexandre Duret-Lutz + + * doc/autoconf.texi (Limitations of Make): `foo=bar make -e' + is not portable inside Makefile. + +2003-02-20 Akim Demaille + + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): When + compiler says yeah, but preproc says nope, compiler is right. + Conversely, prompt the reader to send a bug report to the + maintainers of the package, not of Autoconf. + +2003-02-20 Klee Dienes + + * bin/autoreconf.in (autoreconf_current_directory): Properly + handle an empty aclocal.m4. + +2003-02-20 Akim Demaille + + * lib/autoconf/general.m4 (AC_PREFIX_PROGRAM): Quote + $ac_prefix_program. + From Larry Jones. + +2002-12-23 Paul Eggert + + * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)): Define $1 to an + innocuous variant befor including or . This + works around a bug reported by Albert Chin: HP-UX 11i + (and earlier versions) have a that declares + gettimeofday and many other functions. + +2002-12-03 Paul Eggert + + Version 2.57. + + * NEWS, configure.ac: Update version. + + * doc/fdl.texi: Upgrade to FDL version 1.2. + + * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)): Use the function f + nontrivially in main's body, so that f's external declaration is + not optimized away in AIX. This should fix the bug reported by + Martin Frydl in + . + + * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C), + _AC_PROG_PREPROC_WORKS_IFELSE): Use if __STDC__ is + defined, to support freestanding compilers. This should fix the + bug reported by Momchil Velkov in + . + + * doc/autoconf.texi (Obsolete Macros): Fix typos (insert empty + arg, AC_DEFINE -> AC_DEFINE_UNQUOTED) in documentation for + obsolete AC_CHECK_TYPE. The missing empty arg was reported + by Simon Josefsson in + . + + * Makefile.maint (www-gnu): New macro. + (standards.texi-url_prefix, make-stds.texi-url_prefix): Use it, as + the location has moved. + +2002-12-02 Martin Frydl + + * bin/autom4te.in (at_flatten): rewritten to avoid M4 problem when + \(.*\) match is too long and there is something more to be checked. + + +2002-11-15 Akim Demaille + + Version 2.56. + + * config/install-sh: chmod +x. + From Paul Eggert. + * config/move-if-change: Indenting changes. + * Makefile.am (AUTOMAKE_OPTIONS): Move to... + * configure.ac (AM_INIT_AUTOMAKE): here. + Require 1.7.1. + +2002-11-14 Akim Demaille + + Version 2.55. + + * config/config.guess, config/config.sub, config/install-sh: + Update from masters. + +2002-11-14 Akim Demaille + + * Makefile.maint: Sync with Bison, i.e.: + (po-check): Scan .l and .y files instead of the + .c and the .h files that they generate. This fixes the bug + reported by Tim Van Holder in: + + Look for N_ as well as for _. Try to avoid matching #define for + N_ and _. + From Paul Eggert. + +2002-11-14 Akim Demaille + + * doc/autoconf.texi (C Compiler): Compiling several files at once. + From Paul Eggert and Albert Chin-A-Young. + +2002-11-14 Akim Demaille + + * doc/autoconf.texi (C Compiler): Solitary backslashes. + From Paul Eggert and Albert Chin-A-Young. + +2002-11-14 Kevin Ryde + + * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)): Initialize f=$1 rather + than assigning in main, to avoid HP cc +O3 optimizing it away. + +2002-11-12 Peter Eisentraut + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Add -q + option. Process --recheck after parsing all options. Pass -q + option to configure on --recheck. + (AC_OUTPUT): Pass -q from configure to config.status. + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Strip -q from + arguments to record. + * doc/autoconf.texi (config.status Invocation): Document + config.status -q option. + +2002-11-07 Alexandre Duret-Lutz + + * bin/autoscan.in (scan_file): Scan Makefile.am too. Ignore + Makefile.in if Makefile.am exists. + (output): Strip `.am' from Makefiles. Don't + output AC_CONFIG_FILES if no Makefiles were found. + +2002-11-07 Akim Demaille + + * Makefile.am (cvs_files): Add elisp-comp, mdate-sh. + (local_updates): New. + * Makefile.maint: Update, from CVS Bison. + (local_updates): New. + +2002-11-06 Akim Demaille + + * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY): Wrap the `f' + declaration in extern "C" too. + Reported by Roberto Bagnara. + +2002-11-06 Akim Demaille + + * tests/torture.at (Configuring subdirectories): Don't use grep + -w. + * doc/autoconf.texi (Limitations of Usual Tools): Grep -w. + Reported by Ezra Peisach. + +2002-11-05 Akim Demaille + + * lib/autoconf/autoheader.m4 (_AH_TEMPLATE_OLD, _AH_VERBATIM_OLD): + Remove. + We _have_ to stop using the old compatibility scheme that tried to + avoid useless backslashes because Libtool 1.4.3 contains a + AC_DEFINE([error_t], [int], + [Define to a type to use for \`error_t' if it is not + otherwise available.]) + We _have_ to quote the single quote and backslashes with \. The + old compatibility scheme saw that ` was backslashed, and therefore + did not quote the single quote. Hence before this patch, Autoconf + was not compatible with Libtool. + +2002-11-04 Paul Eggert + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Set the following variables, + too: LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_MONETARY, + LC_NAME, LC_PAPER, LC_TELEPHONE. + * doc/autoconf.texi (Special Shell Variables): Mention those vars. + +2002-11-04 Akim Demaille + + Version 2.54c. + + * Makefile.maint (update, cvs-update, po-update, do-po-update): + New. + * config/texinfo.tex: Update. + +2002-11-03 Akim Demaille + + * bin/autoreconf.in (&autoreconf_current_directory): New, extracted + from... + (&autoreconf): here. + ($help, $make, &parse_args, &autoreconf_current_directory): + Support -m/--make. + * doc/autoconf.texi (autoreconf Invocation): Adjust. + +2002-10-31 Bruno Haible + + * lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF): Change message. + Change name of cache variable to ac_cv_func_malloc_0_nonnull. + (AC_FUNC_MALLOC): Change description of HAVE_MALLOC macro. + (_AC_FUNC_REALLOC_IF): Change message. Change name of cache variable + to ac_cv_func_realloc_0_nonnull. + (AC_FUNC_REALLOC): Change description of HAVE_REALLOC macro. + +2002-10-31 Akim Demaille + + The test suite was no longer checking for trailing envvars and files. + + * tests/atspecific.m4 (AC_STATE_SAVE): Don't use quadrigraphs here. + (AT_CHECK_ENV): Make sure the `state-ls.before file exists. + +2002-10-31 Akim Demaille + + * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Use and display + `$(MAKE)' instead of '${MAKE}' to emphasize that we refer to the + Make variable, not a shell variable. + Suggested by Bruno Haible. + +2002-10-31 Akim Demaille + + * bin/autom4te.in (load_configuration): Reject #args out of any + language. + +2002-10-31 Akim Demaille + + * lib/autoconf/general.m4 (_AC_MSG_LOG_CONFTEST): New. + (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, _AC_LINK_IFELSE) + (_AC_RUN_IFELSE): Use it. + * lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT): + (_AC_COMPILER_EXEEXT_DEFAULT): Likewise. + * lib/autoconf/c.m4 (AC_LANG_SOURCE): Don't include confdefs.h, + inline it. + +2002-10-30 Akim Demaille + + * bin/autom4te.in (&parse_args, $help): Support --no-cache. + * doc/autoconf.texi (autom4te Invocation): Adjust. + Suggested by Tim van Holder. + +2002-10-29 Paul Eggert + + * doc/autoconf.texi (Particular Functions): AC_FUNC_MALLOC and + AC_FUNC_REALLOC check for compatibility with glibc, not POSIX. + Problem reported by Bruno Haible. + +2002-10-29 Akim Demaille + + * doc/autoconf.texi (Header Templates): Put also in words what the + pictures says to assist free style readers. + (Customizing autom4te): s/--cache=/--cache /. + +2002-10-29 Akim Demaille + + * lib/autoconf/functions.m4 (_AC_FUNC_VFORK): Include stdlib.h and + sys/wait.h. + sparc_address_test returns void. + Use it with an argument, as prototyped. + From Bruno Haible. + +2002-10-29 Akim Demaille + + * doc/autoconf.texi (Subdirectories): Cygnus dirs have + configure.in, not configure.ac. + Reported by Bruno Haible. + +2002-10-29 Akim Demaille + + * tests/torture.at (Deep Package): New test. + (Configuring subdirectories): Don't use a testSubDir as Autotest + now does it itself. + +2002-10-29 Akim Demaille + + * bin/autoreconf.in (&parse_args, $help): Support --warnings. + * doc/autoconf.texi (Invoking autom4te): Rename as... + (autom4te Invocation): this, for consistency with the other nodes. + +2002-10-29 Akim Demaille + + * lib/autom4te.in (Autoconf): s/automate/autom4te/. + Reported by Ralf Corsepius. + +2002-10-29 Akim Demaille + + * lib/m4sugar/m4sh.m4 (_AS_QUOTE): The warning about quoted + characters is a back as an `obsolete' warning now. + Reported by Ralf Corsepius. + +2002-10-28 Akim Demaille + + * configure.ac: Bump to 2.54c. + +2002-10-28 Akim Demaille + + Version 2.54b. + + * tests/foreign.at (Libtool): Adjust to broken libtoolize. + +2002-10-28 Akim Demaille + + * tests/atspecific.m4 (AT_CHECK_AUTOM4TE): Be robust to different + m4 executable names, and different GNU M4 version. + Reported by Ezra Peisach and Paul Jarc. + +2002-10-27 Akim Demaille + + * lib/autoconf/functions.m4 (_AC_FUNC_VFORK): Really use + AC_RUN_IFELSE. + +2002-10-27 Akim Demaille + + * doc/autoconf.texi: More AC_MSG_FAILURE promotion. + * lib/autoconf/fortran.m4 (_AC_F77_NAME_MANGLING): + Die when a simple Fortran program cannot be compiled. + * lib/autoconf/lang.m4 (AC_LANG_CALL, AC_LANG_FUNC_LINK_TRY): + Issue a warning if no function is given. + +2002-10-27 Akim Demaille + + * doc/autoconf.texi (Run Time): Document AC_RUN_IFELSE. + Move the documentation of AC_TRY_RUN to... + (Obsolete Macros): here. + Adjust all the old samples still using AC_TRY_RUN to AC_RUN_IFELSE. + (autoconf Invocation): Remove the duplicates with `invoking + autom4te'. + * lib/autoconf/headers.m4 (AC_HEADER_STDC): Don't use AC_TRY_RUN. + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Likewise. + +2002-10-27 Akim Demaille + + * doc/autoconf.texi (Generating Sources): Document AC_LANG_CALL + and AC_LANG_FUNC_LINK_TRY. + (Examining Libraries): Rename as... + (Running the Linker): this. + Document AC_LINK_IFELSE. + Move the documentation of AC_TRY_LINK and AC_TRY_LINK_FUNC to... + (Obsolete Macros): here. + * lib/autoconf/fortran.m4 (_AC_F77_NAME_MANGLING): Don't use + AC_TRY_LINK_FUNC nor AC_TRY_LINK. + * lib/autoconf/libs.m4 (AC_CHECK_LIB, AC_PATH_XTRA): Likewise. + * lib/autoconf/headers.m4 (AC_USG): Likewise. + +2002-10-27 Akim Demaille + + * lib/autoconf/headers.m4 (AC_HEADER_STDC): Don't use AC_TRY_CPP. + + More `check config.log' messages. + + * lib/autoconf/general.m4 (AC_MSG_FAILURE): New. + * doc/autoconf.texi (Printing Messages): Document it. + * lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Use it when + appropriate. + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT) + (_AC_COMPILER_EXEEXT_WORKS, _AC_COMPILER_EXEEXT_O) + (_AC_COMPILER_OBJEXT): Likewise. + * lib/autoconf/general.m4 (AC_RUN_IFELSE): Likewise. + * lib/autoconf/fortran.m4 (_AC_LANG_PROGRAM_C_F77_HOOKS): + Likewise. + * lib/autoconf/c.m4 (AC_PROG_CPP, AC_PROG_CC, AC_PROG_CXXCPP): + Likewise. + + Deprecate macros with unusual interfaces. + + * lib/autoconf/general.m4 (AC_TRY_CPP, AC_TRY_LINK) + (AC_TRY_COMPILE, AC_TRY_RUN): AU_DEFUN'ed. + + Document the new ones, and proper style. + + * doc/autoconf.texi (Generating Sources): New. + Document AC_LANG_CONFTEST, AC_LANG_SOURCE, AC_LANG_PROGRAM. + (Examining Declarations): Rename as... + (Running the Preprocessor): this. + Document AC_PREPROC_IFELSE. + (Examining Syntax): Rename as... + (Running the Compiler): this. + (AC_FOO_IFELSE vs AC_TRY_FOO): New section. + (Obsolete Macros): Move the definition of AC_TRY_CPP and + AC_TRY_COMPILE here. + +2002-10-27 Akim Demaille + + Move sections around. + + * doc/autoconf.texi (Customizing autom4te): Remove a lost + sentence. + Reported by Burno Haible. + (Language Choice): Now the first section of... + (Writing Tests): this section. + Make the introduction less C-centric. + (Guidelines, Test Functions): Move to... + (Writing Test Programs): this new section. + (Test Programs): Merge into... + (Run Time): this. + +2002-10-27 Akim Demaille + + * lib/freeze.mk ($(AUTOM4TE_CFG)): Add a missing dependency on + autom4te.in that resulted in the need for two `make' runs. + +2002-10-27 Akim Demaille + + * configure.ac: Bump to 2.54b. + +2002-10-25 Akim Demaille + + Version 2.54a. + + * Makefile.maint: Update from the Coreutils. + (AMTAR): Remove, obsolete. + (automake_repo): Update to redhat.com. + (cvs_file): New. + Adjust to the fact that ansi2knr is now hosted by Automake. + * Makefile.am (cvs_files): Add install-sh and mkinstalldirs. + * config/config.guess, config/mkinstalldirs, config/texinfo.tex: + Update from masters. + * lib/autoscan/Makefile.am (EXTRA_DIST, nodist_autoscanlib_DATA): + autoscan.pre is not to be installed, and autoscan.list is not to + be shipped. + (CLEANFILES): Add autoscan.list. + (autoscan.list): Disable the cache. + * bin/Makefile.am: Include freeze.mk. + +2002-10-25 Akim Demaille + + * bin/autom4te.in (&load_configuration): Take the file as + argument. + (&parse_args): Handle -C, --cache. + ($help): Adjust. + (MAIN): Load ~/.autom4te.cfg and ./.autom4te.cfg. + * lib/autom4te.in (Autoconf): Pass --cache=autom4te.cache. + * doc/autoconf.texi (Invoking autom4te): Document --cache. + Now a subsection of... + (Using autom4te): This new section. + (Customizing autom4te): New. + (autom4te.cache): Adjust. + +2002-10-25 Akim Demaille + + * doc/autoconf.texi (Generic Headers): More information on how to + use AC_CHECK_HEADERS. + +2002-10-25 Akim Demaille + + * bin/autoconf.as, bin/autoconf.in, bin/autoupdate.in ($help): + Space changes. + +2002-10-25 Akim Demaille + + * bin/autoscan.in (output): Output AC_PREREQ. + (%needed_macros): Add AC_PREREQ so that configure.ac without one + be reported. + +2002-10-23 Akim Demaille + + * doc/autoconf.texi (Particular Headers): In AC_HEADER_STDBOOL, + document _Bool. + +2002-10-23 Akim Demaille + + * bin/autom4te.in (handle_traces): Handle @&t@ in traces. + Reported by Peter Eisentraut. + +2002-10-23 Akim Demaille + + * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Also look for the + type _Bool. + Fix a typo. + * doc/autoconf.texi (Particular Headers): Adjust according to Paul + Eggert's recommandations. + +2002-10-22 Akim Demaille + + * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): New, based on CVS + Bison, by Paul Eggert. + * doc/autoconf.texi (Particular Headers): Document it. + +2002-10-22 Aaron M. Ucko + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Avoid duplicates in + `$ac_configure_args'. + +2002-10-22 Akim Demaille + + * doc/autoconf.texi: Use AC_CONFIG_HEADERS in examples. + (AC_ST_BLKSIZE, AC_ST_RDEV): Directly point to AC_CHECK_MEMBERS. + From Art Haas. + +2002-10-22 Akim Demaille + + Restore the 2002-10-11 Akim Demaille patch: + + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL) + (AC_CHECK_HEADER, _AC_CHECK_HEADER_NEW,_AC_CHECK_HEADER_OLD): Restore. + (_AC_CHECK_HEADER_NEW): Rename as... + (AC_CHECK_HEADER): this. + +2002-10-22 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools): Remove incorrect + words about HP-UX cmp: it was actually a user-written cmp. + +2002-10-22 Akim Demaille + + * tests/foreign.at (Libtool): Don't check autoconf's stderr: there + are a few warnings. + * lib/autoconf/autoheader.m4 (AH_VERBATIM, _AH_VERBATIM_OLD): + Quote for Perl '' strings, not "". + * bin/autoheader.in: Invoke autoconf to get '' strings, not "" + strings. + +2002-10-22 Akim Demaille + + * lib/m4sugar/m4sh.m4 (_AS_QUOTE): The warning about quoted + characters is a syntax warning now. + (_AS_QUOTE): Accept $2 as list of characters to quote. + * lib/autoconf/autoheader.m4 (AH_VERBATIM, _AH_VERBATIM_OLD): + Quote for Perl, not sh. + * bin/autoheader.in: When $debug, report the file which is + `do'ne. + * tests/tools.at (autom4te, autoheader): Exercise @bar, not merely + `@', to tickle Perl's lists. + Reported by Carlos Velasco. + +2002-10-18 Akim Demaille + + * bin/autom4te.in (handle_m4): Pass --fatal-warning to m4, so that + missing included files _are_ errors. + Thanks to Alexandre Duret-Lutz. + * tests/tools.at (autom4te cache): Adjust. + * tests/atspecific.m4 (AT_CHECK_AUTOM4TE): New. + (AT_CHECK_M4SUGAR): Use it. + * tests/m4sugar.at (m4_warn, m4_require: circular dependencies): + Adjust. + * tests/tools.at (autom4te): Now it does exit 1. + +2002-10-17 Akim Demaille + + * lib/autoconf/general.m4 (AC_CACHE_SAVE): Don't use cmp. + Fixes the `AC_ARG_VAR' test failures. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Don't use cmp. + * lib/freeze.mk (check-forbidden-patterns): New. + * lib/autoconf/Makefile.am, lib/autotest/Makefile.am + * lib/m4sugar/Makefile.am (check-local): Use it to catch `cmp'. + * doc/autoconf.texi (Limitations of Usual Tools): HP-UX' cmp and + /dev/null. + Reported months ago by H. Merijn Brand. + +2002-10-17 Akim Demaille + + * tests/tools.at (autoheader): Put randoms `@' to stress Perl. + +2002-10-16 Paul Eggert + + * Makefile.maint (wget_files): Remove ansi2knr.c. + (ansi2knr.c-url_prefix): Remove. + +2002-10-16 Akim Demaille + + Because of caching, some files that no longer exist and are no + longer required can still cause errors. + Reported by Alexandre Duret-Lutz. + + * bin/autom4te.in (&parse_args): Do not prepend `--reload-state' + to frozen files in @ARGV, as @ARGV must remain being a list of + files. Rather, at M4 call sites, use this... + (&files_to_options): New function. + (&freeze): Use &error. + (&up_to_date): If a file that was included according to the cache + is no longer there, then the output is out dated. + (&main): Don't even check whether a file is up to date is anyway + --force is given. + * tests/tools.at (autom4te cache): New. + +2002-10-16 Akim Demaille + + * bin/autoconf.as: Kill dead options. + * bin/autoupdate.in (&parse_args): Kill old options. + * bin/autoreconf.in (&parse_args): Remove dead options. + Factor some code. + (&autoreconf): Report the directories we enter *and leave*, so + that error messages can be easily located, and use GNU Make + format, so that Emacs' compile mode understands us. + * lib/Autom4te/General.pm (&update_file): Use `verbose' to report + if some file was changed instead of `print'. + * bin/autoheader.in: Suggest AC_DEFINE with 3 args when needed. + (&parse_args): Remove the dead options. + * tests/atspecific.m4 (AT_CHECK_AUTOHEADER): Adjust to the new + autoheader's quiet mode. + (AT_CHECK_AUTOUPDATE): Likewise. + * tests/tools.at (autoupdate): Adjust. + * tests/semantics.at (AC_C_BIGENDIAN): Likewise. + +2002-10-11 Akim Demaille + + No longer use CPP to check for the existing of headers: use CC to + check for compilability. + + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL) + (AC_CHECK_HEADER, _AC_CHECK_HEADER_OLD): Remove. + (_AC_CHECK_HEADER_NEW): Rename as... + (AC_CHECK_HEADER): this. + + * lib/autotest/general.m4 (AT_INIT): Include the failed test + numbers in the Subject suggestion. + +2002-10-11 Akim Demaille + + * lib/autoconf/specific.m4 (AC_DECL_SYS_SIGLIST): Obsolete. + Suggest using AC_CHECK_DECLS instead. + +2002-10-11 Akim Demaille + + * tests/torture.at (AC_ARG_VAR): Have configure report the value + of `precious'. + +2002-10-11 Akim Demaille + + * lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): Use $$ in the + file name to enable parallel executions. + From Sam Varshavchik. + +2002-10-08 Akim Demaille + + * bin/autoreconf.in (&autoreconf): Run autopoint before the first + aclocal invocation, as Gettext macros might not be visible to + aclocal. + Instead of blindly running autopoint, scan configure.ac (not the + traces) for AM_GNU_GETTEXT_VERSION uses, as autopoint does. + Reported by Paul D. Smith. + +2002-10-08 Paul Eggert + + Work around problems found when POSIXLY_CORRECT=1 is set. + None of this seems to have anything to do with POSIX, really, + but it's how Perl getopt works. + * bin/autom4te.in (parse_args): Configure GetOpt with + "permute", too. + * doc/autoconf.texi (Invoking autom4te): + --warning -> --warnings. + * lib/autom4te.in: --warning -> --warnings. + +2002-09-28 Akim Demaille + + * doc/autoconf.texi (autom4te.cache): New section. + +2002-09-28 Akim Demaille + + * lib/autom4te.in (Autoscan-preselections, Autoreconf-preselections) + (Automake-preselections): Update. + * bin/autoreconf.in, bin/autoheader.in: Comment changes. + +2002-09-28 Akim Demaille + + * lib/autoscan/autoscan.pre: Move all the remaining rules to... + * lib/autoconf/c.m4, lib/autoconf/functions.m4, + * lib/autoconf/headers.m4, lib/autoconf/libs.m4, + * lib/autoconf/specific.m4, lib/autoconf/types.m4: here. + +2002-09-28 Akim Demaille + + * tests/torture.at (Configuring subdirectories): Be robust to + users who use config.site to require for a cache: in this case, + the two last configure runs, using two different sets of + arguments, trigger a legitimate error. + +2002-09-28 Akim Demaille + + * tests/m4sh.at (Functions Support, Functions and return Support): + New. + +2002-09-28 Akim Demaille + + * bin/Makefile.am (ETAGS_SH, ETAGS_PERL): Update: ifnames and + autoheader are Perl programs. + (autoconf, autoheader, autoreconf, autoupdate, ifnames, autoscan) + (autom4te): Specify that the sources are in the $srcdir. + * doc/autoconf.texi (Installation Directory Variables): Adjust. + +2002-09-28 Akim Demaille + + * lib/autoscan/autoscan.pre (st_blksize, st_blocks, st_rdev) + (tm_zone): Move their rules to... + * lib/autoconf/types.m4: here, using AN_ macros. + * lib/autoscan/autoscan.pre (AWK, BISON, INSTALL, LEX, LN, MAKE) + (RANLIB, YACC, awk, bison, byacc, flex, gawk, install, lex, ln) + (make, mawk, nawk, ranlib, yacc): Similarly, move to... + * lib/autoconf/programs.m4: here. + * lib/freeze.mk (ETAGS_FOR_M4, ETAGS_FOR_M4SUGAR) + (ETAGS_FOR_AUTOCONF): New. + Use it. + +2002-09-28 Akim Demaille + + * lib/autoconf/autoscan.m4: New file. + * lib/autoconf/autoconf.m4: Include it. + * lib/autoconf/functions.m4: Use AN_FUNCTION for all the functions + that were listed in the original autoscan.list. + * lib/autoconf/headers.m4: Similarly with headers. + * lib/freeze.mk (autoconf_m4f_dependencies): Add autoscan.m4. + (.m4.m4f): Don't pass --prepend-include, since that's done by + tests/autom4te itself. + * lib/autoscan/Makefile.am: Include freeze.mk. + (autoscan.list): New target --this file is no longer a source. + (autoscan.pre): New file. + +2002-09-28 Akim Demaille + + * bin/autoscan.in (@kinds): Make them singular. + Adjust all uses. + (&init_tables): When --debug, report the list of rules to ease + tracking changes in autoscan.list. + * lib/autoscan/autoscan.list (function): Strip comments, sort. + +2002-09-28 Akim Demaille + + * lib/autoscan/functions, lib/autoscan/headers, + * lib/autoscan/identifiers, lib/autoscan/makevars, + * lib/autoscan/programs: Merge into... + * lib/autoscan/autoscan.list: this. + * bin/autoscan.in (&init_tables): Adjust. + +2002-09-28 Akim Demaille + + * lib/autoscan/functions, lib/autoscan/headers, + * lib/autoscan/identifiers, lib/autoscan/makevars, + * lib/autoscan/programs: Make the `kind' explicit, i.e., each + `functions' line is now prefixed with `function:'. + * bin/autoscan.in (&init_tables): Adjust. + +2002-09-28 Akim Demaille + + From now on, autoscan files must always map a macro name to a + word: there is no `default' macro for autoscan. + + * bin/autoscan.in (&init_tables): Reject entries with no macro at + all. + * lib/autoscan/functions, lib/autoscan/headers: Make the macro + explicit. + +2002-09-28 Akim Demaille + + * bin/autoscan.in (%c_keywords): Remove. + (&used): Keep only track of the words we might be interested in. + (&output_kind): It is no longer needed to look for non active + checks. + +2002-09-27 Akim Demaille + + * lib/autoconf/functions.m4 (AC_FUNC_MBRTOWC): New, stolen from + jm_FUNC_MBRTOWC, by Paul Eggert, from the Coreutils 4.5.1. + * lib/autoscan/functions: Adjust. + * doc/autoconf.texi (Particular Functions): Adjust. + +2002-09-27 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools): Some about mv + from /tmp. + Thanks to Bill Moseley and Paul Eggert. + * lib/m4sugar/m4sh.m4 (AS_TMPDIR): $2 is the directory into which + the tmpdir must be created. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Have the tmp + dir be in the build tree, instead of $TMPDIR. + +2002-09-27 Akim Demaille + + * bin/autoscan.in: Improve the comments. + (&parse_args): Drop obsolete undocumented options. + (&output_kind): Output warnings. + * lib/autoscan/functions: (dcgettext): Now trigger AM_GNU_GETTEXT. + (getwd): Trigger a warning. + +2002-09-26 Akim Demaille + + * bin/autoreconf.in: Clarify that -s is meaningless without -i. + Reported by Ralf Corsepius. + * doc/autoconf.texi (autoreconf Invocation): Likewise. + +2002-09-26 Akim Demaille + + Single suffix rules and seperated dependencies are not portable. + + * doc/autoconf.texi (Installation Directory Variables): Update. + (Limitations of Make): Some about `Single Suffix Rules and + Separated Dependencies'. + * bin/Makefile.am (autoconf, autoheader, autoreconf, autoupdate) + (ifnames, autoscan, autom4te): Un-factor into several rules. + +2002-09-25 Paul Eggert + + * BUGS (Interoperability bugs): New section. Mention libtool + 1.4.2, configure.ac, and AC_CONFIG_AUX_DIR interoperability bug. + +2002-09-24 Paul Eggert + + Fix a portability bug reported by Alexandre Duret-Lutz: Solaris 8 + make handles suffix-rules differently from GNU make. + + * bin/Makefile.am (SUFFIXES, .in): Remove. + (autoconf autoheader autoreconf autoupdate ifnames autoscan autom4te): + Move the body of the old .in rule here. + +2002-09-16 Akim Demaille + + i960 compilers create `b.out' files by default. + Reported by Ralf Corsepius. + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT): Remove b.out files. + (_AC_COMPILER_EXEEXT_DEFAULT): Adjust to b.out. + +2002-09-13 Paul Eggert + + * doc/autoconf.texi (Particular Headers): Remove obsolete + reference to `struct timezone' in the description of + AC_HEADER_TIME. + +2002-09-13 Akim Demaille + + Version 2.54. + + * config/config.sub, config/config.guess: Update. + * Makefile.maint: Update from bits of the Coreutils 4.5.1. + * Makefile.am: Adjust. + +2002-09-13 Akim Demaille + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Suggest + reading config.log when the compiler is rejected. + Suggested by Guido Draheim. + +2002-09-13 Akim Demaille + + * bin/autoreconf.in: Don't use Cwd::chdir, since in its internals + (chdir_init) might hang when stat'ing mounted directories. + Reported by Vance Shipley. + +2002-09-12 Akim Demaille + + * bin/autoscan.in (&parse_args): Pass a reference to the lists, not + the lists. + +2002-09-12 Akim Demaille + + * doc/autoconf.texi (Defining Symbols): Present two different + prototypes for AC_DEFINE and AC_DEFINE_UNQUOTED to emphasize the + difference between 1 argument calls, and 2-3 argument calls. + +2002-09-12 Peter Eisentraut + + * doc/autoconf.texi: Review grammar and punctuation. + +2002-09-11 Paul Eggert + + * doc/autoconf.texi: Fix minor formatting, spelling, and + grammatical typos. + (Defining Symbols): Explain that AC_DEFINE(var) defaults to 1, but + AC_DEFINE(var,,description) does not; and the AC_DEFINE(var) case + is obsolescent. + +2002-09-11 Akim Demaille + + * doc/autoconf.texi (Questions): Rename as... + (FAQ): this. + (Defining Directories): New. + +2002-09-09 Akim Demaille + + * doc/autoconf.texi (Making testsuite Scripts): Update. + Suggested by Nishio Futoshi. + +2002-09-09 Koji Arai + + * doc/autoconf.texi (Making testsuite Scripts): Use `@@' where a + plain `@' is wanted. + +2002-09-09 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Keep the + `duplicates', since the algorithm was too naive and could keep + `--prefix=1 --prefix=2 --prefix=1' as `--prefix=1 --prefix=2', and + keep `--prefix foo --prefix bar' as `--prefix foo bar'. + Reported by Ralf Corsepius. + * tests/torture.at (Configuring subdirectories): Exercise these + cases. + +2002-09-09 Akim Demaille + + * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Use $srcdir when + looking for a replacement file. + * lib/autoconf/general.m4 (AC_CHECK_DECLS): Check that the + directory is relative. + * doc/autoconf.texi (Generic Functions): Clarify the replacement + directory definition. + Reported by Andreas Schwab and Jim Meyering. + +2002-09-06 Akim Demaille + + * doc/autoconf.texi (Setting Output Variables): Clarify what + precious variables are. + Suggested by Pontus Skoeld. + +2002-09-05 Akim Demaille + + * bin/Makefile.am (autoconf, autoheader, autoreconf, autoupdate) + (ifnames, autoscan, autom4te): Since we don't only depend on + configure.ac variables (such as VERSION etc.), but also on prefix + and so forth, depend on Makefile, not configure.ac. + Reported by Alexandre Duret-Lutz. + * doc/autoconf.texi (Installation Directory Variables): Adjust. + +2002-09-05 Kevin Ryde + + * doc/autoconf.texi (Limitations of Make): HP-UX trailing backslashes + doesn't seem to be confined to ia64, just say "some versions". + +2002-09-04 Akim Demaille + + * Makefile.am, doc/Makefile.am: Remove pdf targets, handled by + Automake 1.6c. + * Makefile.am (maintainer-clean-local): Remove. + (MAINTAINERCLEANFILES): Remove COPYING. + +2002-09-03 Paul Eggert + + * doc/autoconf.texi (Configuration Commands): Remove obsolete + example for AC_CONFIG_COMMANDS_PRE. Problem reported by Marcus + Brinkmann. + +2002-09-03 Akim Demaille + + * configure.ac: Bump to 2.53d. + * Makefile.am (AUTOMAKE_OPTIONS): Require 1.6c, i.e., CVS Automake + as of today, on Automake's team suggestion. + +2002-09-03 Akim Demaille + + Version 2.53c. + +2002-09-02 Akim Demaille + + * bin/autom4te.in (parse_args): Don't honor AUTOM4TE_PATH and + SITE_MACRO_DIR. + * configure.ac: Disable SITE_MACRO_DIR. + +2002-09-02 Jim Meyering + + * doc/autoconf.texi (AC_SYS_POSIX_TERMIOS): Reflect renaming: s/am/ac/, + i.e., change am_cv_sys_posix_termios to ac_cv_sys_posix_termios. + Also, tweak grammar: s/make sure to/be sure to/. + +2002-09-02 Paul Eggert + + * doc/autoconf.texi (Limitations of Builtins): Explain why logical + directory names are generally preferable to physical names. + +2002-09-02 Akim Demaille + + * lib/Autom4te/General.pm (&update_file): s/die/error/. + Reported by Raja R. Harinath. + * bin/autoheader.in, bin/autoreconf.in, bin/autoscan.in, + * bin/autoupdate.in: Use error instead of die. + +2002-09-01 Paul Eggert + + * tests/mktests.sh (ac_exclude_egrep, au_exclude_egrep): Use + ordinary shell concatenation rather than echo+tr+sed command that + runs afoul of a long-line-related sed bug in Solaris 8. + + * bin/autoheader.in (parse_args): --warning -> --warnings. + + * bin/autoconf.as: Work even if "ls" outputs "FOO not found" to + stdout, as traditional "ls" does. + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT, + _AC_COMPILER_EXEEXT_O): Likewise. + * doc/autoconf.texi (Limitations of Usual Tools): Add "ls". + + * bin/autoconf.as: Add --prepend-include option. This patch was + applied to bin/autoconf.in in the 2002-07-17 patch by Mark D. Roth, + but bin/autoconf.in is generated automatically from bin/autoconf.as. + + * bin/autoconf.in, configure: Regenerate. + + * doc/autoconf.texi (Special Shell Variables): Mention + ENV, MAIL, MAILPATH, PS1, PS2, PS4. Index PWD. + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Unset ENV, MAIL, + MAILPATH and set PS1, PS2, PS4 to default values, to work + around bug in pre-3.0 UWIN ksh reported by Bruce Lilly. + For LC_ALL etc, first try to set to "C" as POSIX requires and as + the Autoconf documentation specifies; fall back to "unset" only if + this fails. Use a shell for-loop for this rather than an m4 loop, + to shorten the output script. + +2002-08-30 Paul Eggert + + * doc/autoconf.texi (Special Shell Variables): Mention POSIX + 1003.1-2001's requirements for CDPATH. Give a simpler workaround + for the CDPATH problem. Document PWD. + (Limitations of Builtins): Document the problem that "cd $foo" and + "ls $foo" may refer to different directories in shells conforming + to POSIX 1003.1-2001. Use PS1 rather than CDPATH for "unset" + example, since the old example is now out of date. + + * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): Reject FOO if "cd + FOO" and "ls FOO" talk about different directories; this catches + problems when POSIX 1003.1-2001 "cd" fails due to symlink + spaghetti. + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Use AS_UNSET instead + of rolling our own unset. + (_AS_PREPARE): $as_unset CDPATH instead of AS_UNSETting it, since + in practice we needn't worry about CDPATH if unset doesn't work. + + * Makefile.in, aclocal.m4, bin/Makefile.in, + config/Makefile.in, doc/Makefile.in, lib/Makefile.in, + lib/Autom4te/Makefile.in, lib/autoconf/Makefile.in, + lib/autoscan/Makefile.in, lib/autotest/Makefile.in, + lib/emacs/Makefile.in, lib/m4sugar/Makefile.in, man/Makefile.in, + tests/Makefile.in: Regenerate with Automake 1.6.3. + + * config/config.guess, config/config.sub, config/mkinstalldirs: + Update. + + * configure: Regenerate with self. + +2002-08-30 Kevin Ryde + + * doc/autoconf.texi (Limitations of Usual Tools): Notes on "cc" + default output. + +2002-08-29 Rainer Orth + + * bin/autom4te.in (Request::load): Correctly test for "do" read + failure. + +2002-08-29 Akim Demaille + + * lib/Autom4te/General.pm (&xqx): New. + (&xsystem): Use WIFEXITED and WEXITSTATUS instead of decoding $? by + hand, which is not portable. + (&error): New. + * bin/autom4te.in: Use them. + Use &error instead of die. + * tests/m4sugar.at (m4_warn, m4_require: circular dependencies): + Adjust. + +2002-08-17 Paul Eggert + + * lib/autoconf/fortran.m4 (AC_PROG_F77): Remove fc from the + default list of compilers to try, since it was long ago superseded + by the ksh fc builtin. Suggested by Steven G. Johnson. + +2002-07-31 Alexandre Duret-Lutz + + * doc/autoconf.texi (Invoking autom4te): End the option table, + fixing a bug introduced by the previous patch. + (Limitations of Make): Add a 'target lookup' subentry in the + 'VPATH' entry. Rewrite all `make' occurences as `@command{make}'. + +2002-07-29 Mark D. Roth + + * bin/autom4te.in: Remove --include-envvar and --site-macro-subdir + options and use $AUTOM4TE_PATH. + * doc/autoconf.texi: Remove documentation of autom4te + --include-envvar and --site-macro-subdir options and document + use of $AUTOM4TE_PATH. + * lib/autom4te.in: Remove --include-envvar and --site-macro-subdir + arguments from each language section. + +2002-07-29 Paul Eggert + + * doc/install.texi: Include copyright symbol in copyright notice. + + * Makefile.am (MAKEINFO): Remove; it's a user-specified macro. + Replace with: + (AM_MAKEINFOFLAGS): New macro. + * doc/Makefile.am (MAKEINFO, AM_MAKEINFOFLAGS): Likewise. + * Makefile.am (INSTALL): Use the new macros. + Use -o rather than --output, since "missing" does not grok --output. + +2002-07-25 Alexandre Duret-Lutz + + * doc/autoconf.texi (Limitations of Make): Escaped newlines in + comments do not always work. Never trust the exit status of + `make -k'. + +2002-07-24 Kevin Ryde + + * doc/autoconf.texi (Limitations of Make, Making testsuite Scripts): + Untabify, since tabs are not enjoyed by texi2dvi and makeinfo. + +2002-07-23 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): + Use PATH="/nonexistent;.", not PATH=".;.", as FreeBSD ksh2002 + apparently treats PATH="nonexistent" as if it contained ".". + Bug reported by Stefan `Sec' Zehl. + +2002-07-22 Alexandre Duret-Lutz + + * doc/autoconf.texi (Limitations of Make): Mention the special + handling of the obj/ directory by BSD make. + +2002-07-20 Kevin Ryde + + * doc/autoconf.texi (Limitations of Make): Add HP-UX IA-64 trailing + backslashes. + +2002-07-19 Akim Demaille + + * doc/autoconf.texi (Function Portability): `exit'. + (Programming in M4sh): Ethymology of M4sh. + +2002-07-19 Akim Demaille + + * doc/autoconf.texi (AC_LIBOBJ vs LIBOBJS): More about $U. + +2002-07-18 Akim Demaille + + Version 2.53b. + +2002-07-18 Akim Demaille + + * config/config.guess, config/config.sub: Update. + +2002-07-18 Akim Demaille + + Handle LIBOBJS and LTLIBOBJS once for all, including Libtool's and + Automake's parts. + + * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): New. + * lib/autoconf/status.m4 (AC_OUTPUT_COMMANDS_PRE): Call it. + * tests/semantics.at (AC_REPLACE_FUNCS): Adjust. + +2002-07-18 Akim Demaille , + Alexandre Duret-Lutz + + * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): Install + _AC_AM_CONFIG_HEADER_HOOK for Automake 1.7. + +2002-07-17 Russ Allbery + + * doc/autoconf.texi (Initializing configure): Clarify the + description of the tarname default. + +2002-07-17 Andreas Buening + + * lib/autoconf/functions.m4 (AC_FUNC_FORK): Don't set + ac_cv_func_fork_works before running _AC_FUNC_FORK, do it if the + latter was not run. + +2002-07-17 Akim Demaille + + * lib/Autom4te/General.pm (find_file): Browse the directories in + the order they are given. + +2002-07-17 Akim Demaille + + * tests/wrapsh.as, tests/wrappl.as: Merge into... + * tests/wrapper.as: this. + * tests/Makefile.am, configure.ac: Adjust. + +2002-07-17 Mark D. Roth + + * configure.ac: Add --enable-site-macro-dir option. + * bin/Makefile.am: Expand @SITE_MACRO_DIR@. + * bin/autom4te.in: Add --prepend-include, --include-envvar, and + --site-macro-subdir options. + * bin/autoconf.in: Add --prepend-include option. + * bin/autoheader.in: Add --prepend-include option. + * bin/autoreconf.in: Add --prepend-include option. + * bin/autoscan.in: Add --prepend-include option. + * bin/autoupdate.in: Add --prepend-include option. + * doc/autoconf.texi: Document use of $AC_MACRO_PATH and site + macro directory, remove note that include path directories are + used in reverse order, and document --prepend-include option. + * lib/autom4te.in: Use --prepend-include instead of --include. + * tests/wrapsh.in: Use --prepend-include instead of --include. + +2002-07-17 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): `_' is allowed in + tarnames. + * doc/autoconf.texi (Initializing configure): Adjust. + +2002-07-17 Akim Demaille + + * lib/autoconf/functions.m4 (AC_FUNC_REALLOC, _AC_FUNC_REALLOC) + (_AC_FUNC_MALLOC): New. + (AC_FUNC_MALLOC): Use the latter. + Define HAVE_MALLOC to 0 if broken. + * doc/autoconf.texi (Particular Functions): Adjust. + +2002-07-16 Akim Demaille + + * lib/autoconf/c.m4 (AC_C_BACKSLASH_A): New. + * doc/autoconf.texi (C Compiler): Adjust. + +2002-07-09 Akim Demaille + + * doc/autoconf.texi: Properly set the ``header'' part. + +2002-07-09 Akim Demaille + + * doc/autoconf.texi (Systemology): Some about Darwin. + +2002-07-09 Alexandre Duret-Lutz + + * lib/autoconf/specific.m4 (AC_CYGWIN, AC_EMXOS2, AC_MINGW32): + Don't use AC_REQUIRE in AU_DEFUN. + +2002-07-09 Art Haas + + * doc/autoconf.texi: Use @enddots{} or @dots{} where appropriate. + +2002-07-02 Alexandre Duret-Lutz + + * bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in, + bin/autoupdate.in, bin/ifnames.in, lib/Autom4te/General.pm, + lib/Autom4te/Struct.pm, lib/Autom4te/XFile.pm: Add local variables + so that Emacs setups GNU style for perl-mode and cperl-mode. + +2002-06-27 Paul Eggert + + * config/install-sh: Quote $src. Prefer || to test's -o option, + as per "Limitations of Builtins". + * tests/atspecific.m4 (AT_CHECK_ENV): Likewise, for && vs test -a. + * tests/semantics.at (AC_C_BIGENDIAN): Likewise. + + * tests/mktests.sh: Use grep instead of fgrep, as per + "Limitations of Builtins". + +2002-06-15 Paul Eggert + + * tests/wrapsh.as (AUTOCONF, AUTOHEADER, AUTOM4TE, AUTOM4TE_CFG, + autom4te_perllibdir): Set to top build dir or src dir as appropriate, + so that we consistently test the just-built programs. + * tests/wrappl.as: Likewise. + +2002-06-12 Paul Eggert + + * bin/autoconf.as (AUTOM4TE): Default to a fully qualified path + name, so that symlinks to 'autoconf' work properly. Bug reported + by Bruno Haible. + * bin/autoheader.in (AUTOM4TE): Likewise. + * bin/autoreconf.in (autoconf, autoheader): Likewise. + * bin/autoscan.in (autom4te): Likewise. + * bin/autoupdate.in (autom4te): Likewise. + + * lib/autoconf/functions.m4 (_AC_LIBOBJ_FNMATCH): Also check for + btowc, to fix a portability bug with diffutils-2.8.2/lib/fnmatch.c + on Solaris 2.5.1. + +2002-06-11 Andreas Schwab + + * doc/autoconf.texi: Add more dir entries. + +2002-06-10 Alexandre Duret-Lutz + + * bin/autom4te.in ($cache): Don't define using `$me', the name + of the cache should not depend on the name under which autom4te + was installed. + +2002-06-07 Akim Demaille + + * tests/tools.at (autoconf: forbidden tokens, basic) + (autoconf: forbidden tokens, exceptions): Adjust to the change of + words in autom4te.in. + +2002-06-07 Peter Eisentraut + + * lib/autoconf/c.m4 (AC_LANG_PROGRAM(C)): Use + _AC_LANG_PROGRAM_C_F77_HOOKS. + +2002-06-07 Akim Demaille + + * lib/autoconf/functions.m4 (AC_REPLACE_FUNC_FNMATCH): Typo, + rename as... + (AC_REPLACE_FNMATCH): this. + * tests/mktests.sh (exclude_list): Exclude AC_REPLACE_FNMATCH, + AC_FUNC_FNMATCH_GNU. + +2002-06-07 Akim Demaille + + * doc/autoconf.texi (Systemology): Point to Tru64 docs, and the + Rosetta Stone for Unix. + +2002-06-07 Akim Demaille + + * bin/autom4te.in (warn_forbidden): When rejecting a token, + suggest m4_pattern_allow. + Suggested by Adam J. Richter. + +2002-06-07 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Initialize + ac_config_libobj_dir. + (AC_CONFIG_LIBOBJ_DIR): New. + * lib/autoconf/functions.m4 (_AC_FUNC_FNMATCH): Split into... + (_AC_FUNC_FNMATCH_IF, _AC_LIBOBJ_FNMATCH): these. + Use ac_config_libobj_dir to find the replacement files. + (AC_FUNC_FNMATCH, AC_FUNC_FNMATCH_GNU): Split into... + (AC_FUNC_FNMATCH, AC_FUNC_FNMATCH_GNU, AC_REPLACE_FNMATCH) + (AC_REPLACE_FNMATCH_GNU): these. + (AC_FUNC_GETLOADAVG): Use ac_config_libobj_dir. + * doc/autoconf.texi (Particular Functions, Generic Functions): Adjust. + * tests/mktests.sh (ac_exclude_list): Don't check + AC_FUNC_GETLOADAVG as it requires getloadavg.c which is not shipped. + +2002-06-06 Paul Eggert + + * lib/autoconf/status.m4 (_AC_OUTPUT_LINKS): Fall back on cp + if ln doesn't work. + * NEWS: Likewise. + * doc/autoconf.texi (Configuration Links): Likewise. + (Limitations of Usual Tools): Prefer $(LN_S) to ln -s || ln. + +2002-06-05 Paul Eggert + + * config/config.guess, config/config.sub, config/texinfo.tex: + Update from masters. + +2002-05-29 Paul Eggert + + * bin/autom4te.in ($m4): Do not assume that egrep and fgrep exist. + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Likewise. + * lib/autoconf/general.m4 (_AC_RUN_LOG_STDERR, AC_EGREP_CPP): + Likewise. + * lib/autoconf/Makefile.am (check-local): Likewise. + * lib/autoconf/status.m4 (AC_CONFIG_HEADER): Likewise. + * lib/autoconf/types.m4 (commentary only): Likewise. + * lib/autotest/general.m4 (AT_INIT, AT_CHECK): Likewise. + * lib/autotest/Makefile.am (check-local): Likewise. + * lib/m4sugar/Makefile.am (check-local): Likewise. + * tests/atspecific.m4 (AT_CONFIGURE_AC, AT_CHECK_DEFINES): Likewise. + * tests/mktests.sh (egrep): New var; use it instead of plain egrep. + + * lib/autoconf/programs.m4 (AC_PROG_EGREP, AC_PROG_FGREP): New macros. + * doc/autoconf.texi (Particular Programs): Document them. + (Limitations of Usual Tools): Warn that egrep and fgrep may not exist. + * NEWS: Likewise. + +2002-05-27 Paul Eggert + + * lib/autoconf/types.m4 (AC_TYPE_MBSTATE_T): New macro. + * NEWS, doc/autoconf.texi (Particular Types): Document it. + * lib/autoconf/functions.m4 (_AC_FUNC_FNMATCH): Require it + instead of AC_MBSTATE_T, which never existed. + +2002-05-23 Akim Demaille + + * doc/autoconf.texi (Hosts and Cross-Compilation): Specify the + version of Autoconf that is discussed. + +2002-05-22 Paul Eggert + + * lib/autoconf/fortran.m4 (AC_PROG_F77): Remove cf77 and cft77 + from the default list of compilers to try. Suggested by + Kate Hedstrom. + * NEWS: Document the above. + * doc/autoconf.texi (Fortran 77 Compiler): Don't suggest cf77. + +2002-05-17 Paul Eggert + + * lib/autoconf/types.m4 (AC_CHECK_MEMBER): Work correctly even if + the member is itself an aggregate. Bug reported by Sergey Poznyakoff. + This improves on an earlier suggestion by H. Peter Anvin. + +2002-05-16 Paul Eggert + + AC_FUNC_FNMATCH now tests only for POSIX compatibility. + AC_FUNC_FNMATCH_GNU also tests for GNU extensions. + Both macros now accept an optional source-dir arg. + New macro AC_GNU_SOURCE to define _GNU_SOURCE. + + * NEWS: Document this. + * doc/autoconf.texi (Particular Functions, UNIX Variants): Likewise. + + * lib/autoconf/functions.m4 (_AC_FUNC_FNMATCH): New macro. + (AC_FUNC_FNMATCH): Use it. Test only for POSIX conformance, + not for GNU extensions; this undoes part of the 2000-11-03 change, + reverting to 2.13-compatible behavior. + Add new optional argument DIR. + (AC_FUNC_FNMATCH_GNU): New macro. + + * lib/autoconf/specific.m4 (AC_GNU_SOURCE): New macro. + +2002-05-08 Paul Eggert + + * lib/autoconf/headers.m4 (AC_HEADER_TIOCGWINSZ): + Don't require AC_SYS_POSIX_TERMIOS. The test is unnecessary, + and it causes a 'test' syntax error if it fails. + Bug reported by Stephen Gildea. + + * lib/autoconf/functions.m4 (AC_FUNC_SETVBUF_REVERSED): + If prototypes are supported, use them to check this at compile-time, + instead of trying to check it at run-time. If we must do a run-time + check, assume that setvbuf is standard when cross-compiling, as + nonstandard setvbuf occurs only on ancient and unlikely hosts. + Bug reported by Paul D. Smith. + + * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Add optional + argument specifying location of getloadavg.c. This removes a + FIXME. This idea was taken from Jim Meyering's implementation in + textutils. + * doc/autoconf.texi (Particular Functions): Document this. + Also, mention HAVE_NLIST_H rather than NLIST_STRUCT, since + that's what the code does; this fixes a bug reported by + Paul D. Smith. + +2002-05-03 Akim Demaille + + * bin/autoreconf.in (autoreconf): Rewrite to use Gettext's + autopoint instead of gettextize. + ($uses_alocal): Rename as... + ($uses_aclocal): this. + * doc/autoconf.texi (autoreconf Invocation): Adjust. + Suggested by Bruno Haible. + +2002-05-03 Akim Demaille + + * lib/m4sugar/m4sugar.m4 (m4_map_sep): New. + +2002-04-29 Paul Eggert + + * bin/autoreconf.in (autoreconf): Don't age aclocal.m4's input + files to be 1 second older; just set them to be the same time. + Also, sleep 1 second after the first aclocal, to work around + problems with sub-second time stamps on the input files. + +2002-04-29 Thien-Thi Nguyen + + * doc/autoconf.texi: Mention "set -e -x" lossage + under node "Limitations of Builtins". + +2002-04-29 Akim Demaille + + * doc/install.texi: Better wording for setting variables when + running configure. + From Christian Cornelssen. + +2002-04-29 Akim Demaille + + * tests/m4sh.at (LINENO): If testsuite itself is rewritten because + of lack of $LINENO support, then the test will compare the $LINENO + in testsuite vs. the lineno in the test file. This is wrong, of + course. + Be sure to protect it. + Reported by Patrick Welche. + +2002-04-25 Akim Demaille + + * doc/autoconf.texi (Obsolete Macros): Typo. + Reported by Vladimir Volovich. + +2002-04-25 Akim Demaille + + * bin/autoreconf.in (autoreconf): Don't let aclocal.m4 be older + than some of the input files, hence, on the second run of aclocal, + if some of its input are younger, make them older. + Suggested by Paul Eggert. + +2002-04-25 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools): sed and `!'. + Thanks to Paul Eggert. + +2002-04-25 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Let ac_subst_files + and ac_subst_vars be sh variables containing the list of + AC_SUBST_FILES'ed and AC_SUBST'ed identifiers. Output them in the + DEFAULT diversion. + (_AC_INIT_PREPARE): Use them to log them. + (_AC_SUBST, _AC_SUBST_SED_PROGRAM): Remove. + (AC_SUBST, AC_SUBST_FILE): Instead of buliding the + _AC_SUBST_SED_PROGRAM, store the list of output files/variables in + _AC_SUBST_FILES and _AC_SUBST_VARS. + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Adjust. + +2002-04-24 Akim Demaille + + * bin/autoreconf.in (autoreconf): Run automake after autoconf and + autoheader, so that automake does not complain about a missing + config.h.in that was to be created. + +2002-04-23 Akim Demaille + + * bin/autoheader.in (parse_args): --warning takes an argument. + Fixes PR/220. + +2002-04-22 Peter Eisentraut + + * lib/autoconf/general.m4 (_AC_RUN_IFELSE): Remove gmon.out + and bb.out when cleaning up. + +2002-04-22 Akim Demaille + + Version 2.53a. + +2002-04-22 Akim Demaille + + * tests/m4sh.at (LINENO): Fix the Zsh skip pattern. + +2002-04-22 Akim Demaille + + * doc/autoconf.texi (Pretty Help Strings): Remove a spurious + comma. + Reported by Gregory Giannoni. + +2002-04-22 Akim Demaille + + * tests/m4sh.at (LINENO): Skip the test if LINENO cannot be unset. + Fixes false failures on Darwin. + +2002-04-21 Paul Eggert + + * TODO, bin/autoupdate.in, doc/autoconf.texi, + lib/autoconf/general.m4, lib/autoconf/libs.m4, + lib/autoconf/status.m4, lib/m4sugar/m4sugar.m4, tests/m4sh.at, + tests/tools.at: Minor spelling and grammar fixes. + +2002-04-20 Paul Eggert + + * doc/autoconf.texi (Shell Substitutions): Fix typos in yesterday's + ZSH_VERSION fixes. Bug reported by Raja R Harinath. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * tests/atgeneral.m4 (AT_INIT): Likewise. + +2002-04-19 Paul Eggert + + * NEWS, TODO, bin/autom4te.in, bin/autoreconf.in, bin/autoupdate.in, + doc/autoconf.texi, lib/freeze.mk, lib/Autom4te/Struct.pm, + lib/autoconf/autoheader.m4, lib/autoconf/c.m4, + lib/autoconf/functions.m4, lib/autoconf/general.m4, + lib/autoconf/lang.m4, lib/autoconf/libs.m4, lib/autoscan/identifiers, + lib/autotest/general.m4, lib/m4sugar/m4sh.m4, tests/atgeneral.m4, + tests/atspecific.m4, tests/semantics.at, tests/torture.at: + Minor spelling and grammar fixes. + + * doc/autoconf.texi: Follow the outline suggested in the GNU + Sample Texts sections of the Texinfo 4.2 manual. Most + importantly, this makes sure that the copyright notices appear in + all output formats. You probably need Texinfo 4.2 to generate + the manual now. + + Fix some bugs when using "$@" when there might be zero positional + arguments in cases where this matters. + + * bin/autoconf.as: Rewrite so that the problem does not come up. + * lib/autoconf/programs.m4 (AC_CHECK_PROG): Likewise. + * lib/autoconf/status.m4 (AC_OUTPUT): Likewise. + * lib/autotest/general.m4 (AT_INIT): Likewise. + + * bin/autoheader.in: Use 'case' statement to work around problem. + * bin/auto4mte.in: Likewise. + * bin/autoreconf.in: Likewise. + * bin/autoscan.in: Likewise. + * bin/autoupdate.in: Likewise. + * bin/ifnames.in: Likewise. + + * doc/autoconf.texi (Shell Substitutions): Document the problem. + + * lib/autotest/general.m4 (AT_INIT): + Use Zsh alias to work around problem. + * tests/atgeneral.m4 (AT_INIT): Likewise. + + * tests/c.at: We can't have zero arguments, so remove workaround + that is not portable to Zsh. + +2002-04-19 Alexandre Duret-Lutz + + * bin/autoupdate.in (handle_autoconf_macros): Honor AU_DEFUNs + from aclocal.m4 too. + +2002-04-12 Akim Demaille + + * tests/wrappl.as: New, M4sh precursor of wrappl.in. + +2002-04-10 Akim Demaille + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Install the Zsh + workaround for ${1+"$@"}. + * doc/autoconf.texi (Shell Substitutions): Explain it. + From Oliver Kiddle and Peter Stephenson. + + Have M4sh perform minimal shell sanitizing. + + * lib/m4sugar/m4sh.at (AS_SHELL_SANITIZE): Split the `_AS_PREPARE_*' + part into... + (_AS_PREPARE): this new macro. + (AS_PREPARE): New. + (AS_INIT): Invoke AS_SHELL_SANITIZE. + * tests/m4sh.at (AT_DATA_LINENO): Use _AS_PREPARE. + + Adjust Autoconf and Autotest. + + * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Don't invoke + AS_SHELL_SANITIZE, AS_INIT did it, but invoke AS_PREPARE. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): + Invoke _AS_PREPARE (not AS_PREPARE) in addition to + AS_SHELL_SANITIZE. + + Use this M4sh to generate Autoconf's shell scripts. + + * tests/wrapsh.as: New, precursor of wrapsh.in. + * tests/Makefile.am: Include lib/freeze.mk to get the dependencies + on Autotest and M4sh. + ($(TESTSUITE)): Use $(autotest_m4f_dependencies). + (wrapsh.in): New target. + * bin/autoconf.as: New, precursor of autoconf.in. + (autoconf.in): New target. + +2002-04-09 Alexandre Duret-Lutz + + * doc/autoconf.texi (Limitations of Make): Mention the issue + with indented comments in rules. + +2002-04-09 Andreas Schwab + + * lib/autoconf/status.m4 (_AC_SRCPATHS): Handle empty + ac_top_builddir when setting ac_abs_top_builddir. + +2002-04-06 Kevin Ryde + + * doc/autoconf.texi (Systemology): Add link to Unix V7 online docs. + (Portable Shell): Cross reference to Systemology. + +2002-04-05 Akim Demaille + + * bin/autoreconf.in (autoreconf): Be sure to accumulate the + directories when descending in a SUBDIRS. + Reported by Ezra Peisach. + +2002-04-04 Andreas Schwab + + * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Only simplify if path + contains no literal separators. + +2002-04-03 Akim Demaille + + * lib/autoconf/status.m4 (_AC_CONFIG_FILE, _AC_CONFIG_HEADER) + (_AC_CONFIG_COMMAND, _AC_CONFIG_LINK): New. + Use dnl, not the KILL diversion. + Extracted from... + (AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_COMMANDS) + (AC_CONFIG_LINKS): here. + Adjust. + Don't use the KILL diversion, as it kills spurious output, which + results in failures being hidden. + Use m4_defn where appropriate. + (AC_CONFIG_IF_MEMBER): Kill the real bug: a spurious parenthesis + after the second argument. + Use m4_defn. + * lib/autom4te.in (Autoconf, Autotest, M4sh): Don't pass --warning + syntax, as it is provided by M4sugar. + * tests/torture.at (Multiple AC_CONFIG_FILES): New. + +2002-04-03 Andreas Schwab + + * lib/m4sugar/m4sugar.m4 (m4_bmatch): Make sure m4_bregexp is not + expanded if $# <= 2. + + * bin/autoreconf.in (autoreconf): Run automake after rerunning + aclocal. + +2002-04-03 Akim Demaille + + * lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT_REJECT) + (_AC_COMPILER_EXEEXT_REJECT): New. + Also recognize *.bb and *.bbg as compilation byproducts. + (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O) + (_AC_COMPILER_OBJEXT): Use them. + Fixes Debian #138666. + +2002-04-02 Peter Eisentraut + + Integrate AC_PROG_CC_STDC into AC_PROG_CC. + + * lib/autoconf/c.m4 (AC_PROG_CC_STDC): Rename to _AC_PROG_CC_STDC. + AU_DEFUN old name. Use _AC_COMPILE_IFELSE. + (AC_PROG_CC): Call _AC_PROG_CC_STDC. + (AC_C_INLINE): Do not require AC_PROG_CC_STDC. + (AC_C_CONST): Same. + (AC_C_INLINE): Same. + (AC_C_PROTOTYPES): Same. Require AC_PROG_CC instead. + * doc/autoconf.texi, NEWS: Document. + * tests/mktests.sh (au_exclude_list): Add AC_PROG_CC_STDC and + AC_C_CROSS. + +2002-04-02 Akim Demaille + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Invoke + _AS_MKDIR_P_PREPARE. + +2002-03-28 Kevin Ryde + + * lib/autoconf/c.m4 (AC_C_INLINE): Test with a typedef return value, + to avoid versions of HP C which don't allow that. + +2002-03-27 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_BASENAME_PREPARE): New macro. + (AS_SHELL_SANITIZE): Invoke it. + (AS_BASENAME): AS_REQUIRE it, and use $as_basename. + +2002-03-26 Akim Demaille + + * doc/autoconf.texi (Portable Shell): Add pointers to FAQs. + +2002-03-26 Akim Demaille + + * doc/autoconf.texi (Introduction): The GNATS base moved. + +2002-03-25 Paul Eggert + + * tests/m4sh.at: Don't rely on "PATH=test:$PATH test-1" working + as POSIX requires, as it doesn't work with Zsh. + * doc/autoconf.texi (Assignments): Document the problem. + +2002-03-25 Alexandre Duret-Lutz + + * doc/autoconf.texi (Limitations of Make): Mention more issue + about VPATH, overriding of macros in sub-makes, and handling of + SHELL. + +2002-03-21 Paul Eggert + + * doc/autoconf.texi (Here-Documents): Mention Solaris 8 dtksh + problem with here-document buffer boundaries. + + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Unset ENV and BASH_ENV + when reinvoking the shell, to work around problems with installers + who put strange things like "cd" commands in their environments. + +2002-03-19 Akim Demaille + + * tests/semantics.at (AC_C_BIGENDIAN): s/unknow/unknown/. + From Aaron Ucko. + +2002-03-19 Akim Demaille + + * bin/autoscan.in (scan_file): Specify the location in `&used' + invocations. + From Nicolas Joly. + +2002-03-19 Akim Demaille + + * doc/autoconf.texi: Adjust @code/@command, @xref/@ref usage. + From Nishio Futoshi. + +2002-03-19 Akim Demaille + + * lib/m4sugar/m4sugar.m4 (m4_define_default, m4_fst, m4_map): New. + +2002-03-18 Paul Eggert + + * doc/autoconf.texi (Programming in M4sh): Add AS_MKDIR_P. + (Limitations of Usual Tools): Add mkdir section. + + * lib/m4sugar/m4sh.m4 (_AS_MKDIR_P_PREPARE): New macro. + (AS_MKDIR_P): Require it. Use mkdir -p if available, falling + back on AS_DIRNAME to compute prefixes otherwise; this is + roughly what mkinstalldirs does. That way, we need not have + our own filename disassembler. The old disassembler did not + work with Solaris 8 dtksh, which is ksh Version M-12/28/93d. + + * lib/autotest/general.m4 (AT_INIT, AT_CLEANUP): + Create at_test_all by a series of assignments, + not by a single assignment of a long string. The latter causes ksh + version 11/16/88g to silently misbehave on OpenServer 5.0.6a, + presumably because of a buffer overrun. + +2002-03-14 Paul Eggert + + * lib/autotest/general.m4 (at_times_skip): + Renamed from at_times. Now a boolean. + ksh93 Version M-12/28/93d doesn't like 'x=times; $x'; it + says 'times: not found'. + +2002-03-14 Akim Demaille + + * bin/autoreconf.in (&study_gettextize): New. + (&autoreconf): Handle newest gettextize. + Rerun aclocal if needed. + Suggested by Andreas Schwab. + +2002-03-13 Akim Demaille + + * doc/autoconf.texi (Special Shell Variables): More about IFS. + +2002-03-13 Akim Demaille + + * doc/autoconf.texi (Header Portability): New. + Add information about stdint.h and inttypes.h from Paul Eggert. + +2002-03-13 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools): Some about `cp + -p'. + From Bob Proulx. + +2002-03-12 Akim Demaille + + * lib/m4sugar/m4sh.m4 (AS_BASENAME_EXPR): AS_REQUIRE, not + m4_require. + +2002-03-11 Andreas Schwab + + * configure.ac: Explicitly check for EMACS since AM_PATH_LISPDIR + does not do it if --with-lispdir is given. + +2002-03-08 Akim Demaille + + Version 2.53. + +2002-03-08 Akim Demaille + + * doc/autoconf.texi (Subdirectories): Clarify that the + subdirectory should exist. + +2002-03-08 Akim Demaille + + * Makefile.am (AUTOMAKE_OPTIONS): 1.6. + +2002-03-08 Akim Demaille + + * bin/autom4te.in (&handle_m4): Do not foreach with `$_' as it + aliases the actual variables, and modifications of the former + affect the latter. + +2002-03-08 Akim Demaille + + * bin/autom4te.in (&handle_m4): Protect us from corrupted file + because of C-c: have m4 output in tmp files, then mv them. + +2002-03-08 Akim Demaille + + * bin/autoconf.in, bin/autoheader.in, bin/autom4te.in, + * bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in, + * bin/ifnames.in: Copyright update. + +2002-03-08 Akim Demaille + + * doc/autoconf.texi (Invoking autom4te): New. + +2002-03-05 Akim Demaille + + * doc/autoconf.texi (Specifying Names): Clarification suggested by + Kevin Ryde. + +2002-03-05 Akim Demaille + + Version 2.52i. + +2002-03-04 Akim Demaille + + * doc/autoconf.texi (AC_LIBOBJ vs. LIBOBJS): New. + * lib/autoconf/general.m4 (AC_INIT): More informative error + message for LIBOBJ. + +2002-03-04 Akim Demaille + + * lib/freeze.mk ($(build_libdir)/m4sugar/version.m4): New, for + parallel builds. + +2002-03-04 Akim Demaille + + * doc/autoconf.texi (Transforming Names): Equality between target + and host is irrelevant. + (Specifying Names, Canonicalizing): Remove all references to the + backward compatibility hooks. Rather, collect them all into... + (Hosts and Cross-Compilation): this new section. + * doc/install.texi (System Type): Ditto. + * lib/autoconf/general.m4 (AC_CANONICAL_HOST): Explicitly state + that `--host' implies cross-compilation. + +2002-03-04 Akim Demaille + + * doc/autoconf.texi (Evaluation Macros): New. + * lib/m4sugar/m4sugar.m4 (m4_lquote): Remove, it is totally + useless. + (_m4_foreach): Define the variant with immediate evaluation so + that it contains exactly the items, not an expression which + evaluation is the current item. + (m4_re_string, m4_re_word): Don't over quote them. + +2002-03-04 Akim Demaille + + Instead of having stacking `shift's evaluated at the end, let + `foreach' loops immediately evaluate them. + + * lib/m4sugar/m4sugar.m4 (m4_quote, m4_dquote): Use $@ rather than + $*. This is the n-th time I change my mind, but hopefully this is + the last... + (m4_lquote): New. + (m4_text_wrap): Use m4_foreach, which is finally correct _and_ + efficient. + (m4_foreach_quoted, m4_car_quoted, _m4_foreach_quoted): Remove, as + it was only a hack for m4_text_wrap. + (m4_car2): Remove, replaced by... + (m4_cdr): New. + (_m4_foreach): Adjust. + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Adjust, and use + m4_bpatsubst for clarification. + +2002-03-04 Akim Demaille + + * doc/autoconf.texi (Changequote is Evil): New. + +2002-03-03 Kevin Ryde + + * doc/autoconf.texi (Portable Shell): Mention 32-byte #! length limit + on old systems like SunOS. + +2002-03-01 Peter Eisentraut + + * lib/autoconf/c.m4, lib/autoconf/fortran.m4, + lib/autoconf/functions.m4, lib/autoconf/general.m4, + lib/autoconf/headers.m4, lib/autoconf/lang.m4, + lib/autoconf/programs.m4, lib/autoconf/status.m4: Improve spelling + of messages. + +2002-02-28 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Suggest a title to the + message to be sent. + +2002-02-28 Kevin Ryde + + * doc/autoconf.texi (Function Portability): Add va_copy and va_list. + +2002-02-25 Akim Demaille + + * lib/autoconf/functions.m4 (AC_FUNC_SETPGRP): Fix the test. + From Akinori Musha. + +2002-02-13 Alexandre Duret-Lutz + + * lib/Autom4te/XFile.pm (getline, getlines): New functions, + translate \r\n to \n. + +2002-02-07 Akim Demaille + + Version 2.52h. + +2002-02-07 Akim Demaille + + Fix Autoconf PR/209. + Also reported by Frank Denis. + + * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Don't over quote. + +2002-02-07 Akim Demaille + + Fix Autoconf PR/207: + AC_PREFIX_PROGRAM fails with dashed program names + + * lib/autoconf/general.m4 (AC_PREFIX_PROGRAM): Just use a fresh + variable when looking for the prefix program. + Now it also works for shell variables. + +2002-02-07 Akim Demaille + + * doc/autoconf.texi (Limitations of Builtins): More about + case/esac. + +2002-02-06 Akim Demaille + + * lib/autoconf/status.m4 (_AC_OUTPUT_COMMANDS): Don't output empty + case/esac, some shells don't support it. + Reported by Zack Weinberg. + * tests/torture.at (AC_CONFIG_COMMANDS with empty commands): New. + +2002-02-06 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): When handling --keywords, be + sure not to introduce newlines in at_groups. + * lib/autotest/Makefile.am (autotest.m4f): Typo. + +2002-02-06 Akim Demaille + + * tests/torture.at (Configuring subdirectories): Skip if aclocal + is not available. + +2002-02-05 Paul Eggert + + * doc/autoconf.texi (Specific Compiler Characteristics): + Describe HP-UX cc bug workaround more accurately. + * lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Cast to long, + not unsigned long. + * tests/semantics.at (AC_CHECK_SIZEOF): Check non-GCC + cross-compilers, too. This undoes some of the most recent change + to this file. + +2002-02-05 Akim Demaille + + * tests/Makefile.am (check_SCRIPTS): Use it, instead of WRAPPERS, + to make sure they are up to date when `check' is run. + +2002-02-05 Akim Demaille + + * doc/autoconf.texi (Making testsuite Scripts): Document + package.m4. + +2002-02-05 Akim Demaille + + * lib/freeze.mk: New. + +2002-02-05 Akim Demaille + + Implement `autom4te --freeze'. + + * bin/autom4te.in (&freeze): New. + * lib/autoconf/autoconf.m4, lib/autotest/general.m4, + * lib/m4sugar/m4sh.m4: Don't include files given by autom4te. + +2002-02-05 Akim Demaille + + * bin/autom4te.in (&parse_args): Implement `frozen files are + optional are the sum of the previous files on the command line'. + Also, pass `--reload-state=' on them, so... + (handle_m4): don't. + * lib/autom4te.in (Autotest, Autoconf): Rely on M4sh. + (M4sh): Rely on M4sugar. + (Autotest, M4sh, M4sugar): Use frozen files. + +2002-01-31 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Accept $4. + * doc/autoconf.texi (Initializing configure): Adjust. + +2002-01-30 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Map non + alphanumeric to `-' instead of `_'. + +2002-01-30 Akim Demaille + + * tests/semantics.at (AC_CHECK_SIZEOF): Split into two tests: one + for plain code, the other for cross-compilation code. The latter + is now run with GCC only. + * doc/autoconf.texi (Compilers and Preprocessors): New. + +2002-01-30 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Support pre-defined + values. + * doc/autoconf.texi (Initializing configure): Explain how to + change AC_INIT default values. + +2002-01-29 Akim Demaille + + * tests/torture.at (Configuring subdirectories): Use configure.in, + so that aclocal 1.4 works. + Reported by Alexandre Duret-Lutz and Larry Schmitt. + +2002-01-28 Akim Demaille + + * doc/autoconf.texi (Writing testsuite.at): AT_CLEANUP no longer + needs an argument. + +2002-01-28 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Don't be ridiculous: adjust + AUTOTEST_PATH *after* it was set. + Don't put `.' in the PATH: the user should be precise and `./' if + needed. In addition, given that the test suite does some `cd', if + `.' is in the path, the `tested programs' sections will report + programs found in the test suite's directory, while during the + tests (performed in their own directory), these programs are no + longer visible. In other words, the results is confusing and + useless. + * tests/m4sh.at: Adjust: don't rely on `.' being in the PATH. + +2002-01-24 Akim Demaille + + Version 2.52g. + +2002-01-24 Akim Demaille + + * bin/autoheader.in, bin/autoconf.in, bin/autoscan.in, + * doc/autoconf.texi: Finally add Akim as an author. + +2002-01-24 Akim Demaille + + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Use PATH_SEPARATOR. + (_AS_PATH_SEPARATOR_PREPARE): Don't expect $SHELL to be + Bourne. Use /bin/sh. + From Andreas Buening. + +2002-01-24 Akim Demaille + + * config/config.guess, config/config.sub, config/texinfo.tex: + Update from masters. + +2002-01-24 Akim Demaille + + * Makefile.am (AUTOMAKE_OPTIONS): 1.5b. + * config/auxdir.m4, config/cond.m4, config/depend.m4, + * config/init.m4, config/install-sh.m4, config/lispdir.m4, + * config/missing.m4, config/sanity.m4, config/select.m4, + * config/strip.m4: Remove, to ease sync'ing with any version of + Automake. + +2002-01-24 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS) + (_AC_INIT_PREPARE): Support -n as --no-create, as documented. + Reported by Geir Ove Myhr. + +2002-01-21 Akim Demaille + + * lib/autoconf/functions.m4 (AC_FUNC_MMAP): #Undef malloc. + +2002-01-21 Akim Demaille + + * lib/Autom4te/General.pm (getopt): Use a more GNUish error + message on invalid options. + * bin/autom4te.in (parse_args): Don't use + Autoconf::General::getopt with non valid options. + +2002-01-17 Jim Meyering + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Initialize + $ac_cv_exeext so we don't use an old, invalid, cached value. + +2002-01-11 Akim Demaille + + * lib/autoconf/functions.m4 (AC_FUNC_STRNLEN): New, from Jim + Meyering. + * doc/autoconf.texi (Function Portability): Document the strnlen + limitation. + (Particular Functions): Document AC_FUNC_STRNLEN. + * lib/autoscan/functions: Adjust. + +2002-01-06 Akim Demaille + + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Don't create + package.m4, since is really depends upon configure.ac, not + configure. + * doc/autoconf.texi (testsuite Scripts): Adjust. + * tests/Makefile.am (package.m4): New. + EXTRA_DIST it since its a source. + +2002-01-06 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Move the AC_SUBST + of PACKAGE_NAME, PACKAGE_TARNAME, PACKAGE_VERSION, PACKAGE_STRING, + and PACKAGE_BUGREPORT from here... + (_AC_INIT_DEFAULTS): to here, since it is unrelated to the + arguments. + (_AC_INIT_PREPARE): AC_DEFINE these symbols. + * lib/autotest/general.m4: Use AT_PACKAGE_*, not PACKAGE_*. + (AT_INIT): No longer catch `^PACKAGE_(BUGREPORT|STRING)$'. + * tests/tools.at (autoheader): Adjust. + * tests/atspecific.m4 (AT_CHECK_DEFINES): Adjust. + +2002-01-06 Akim Demaille + + * bin/autoscan.in (scan_file): Use `&used'. + +2002-01-03 Akim Demaille + + * doc/autoconf.texi (Output): Improved wording regarding use of + AC_OUTPUT. + From Olly Betts. + +2001-12-18 Kevin Ryde + + * doc/autoconf.texi (Function Portability): Add notes on sscanf + sometimes needing writable input. + +2001-12-17 Jim Meyering + + * doc/autoconf.texi (New Macros): Tweak wording. + +2001-12-14 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): We cleaning up the + trailing files, don't apply `-rf' to files which might not be + created by configure (core, core.*, and *.core), but just `rm -f'. + Suggested by Jonathan Kamens. + +2001-12-14 Aaron M. Ucko + + * lib/autoconf/general.m4: Avoid duplicates in `$ac_configure_args'. + +2001-12-14 Akim Demaille + + * Makefile.am (MAINTAINERCLEANFILES): Remove configure. + +2001-12-13 Peter Eisentraut + + * lib/autoconf/status.m4 (_AC_SRCPATHS): Rename buildpath to + abs_builddir, top_buildpath to abs_top_builddir, srcpath to + abs_srcdir, top_srcpath to abs_top_srcdir. + (_AC_OUTPUT_FILES): Adjust. + * NEWS, doc/autoconf.texi, lib/autoconf/autotest.m4, + * tests/atspecific.m4, tests/autoreconf.in, tests/tools.at, + * tests/wrappl.in, tests/wrapsh.in: Adjust. + +2001-12-12 Steven G. Johnson + + * lib/autoconf/fortran.m4 (_AC_PROG_F77_V_OUTPUT): Fix failed + C/Fortran linking on HP/UX, by extracting the Fortran library + search path from the LPATH line in the $F77 -v output. + +2001-12-12 Kevin Ryde + + * doc/autoconf.texi (File Descriptors): Use a clearer layout for the + forbidden file descriptors table. + +2001-11-26 Akim Demaille + + * bin/autoscan.in (%c_keywords): Build it at top level. + Map to 1 in order to simplify its uses. + +2001-11-26 Akim Demaille + + * bin/autoscan.in (&scan_c_file, &scan_sh_file, &scan_makefile): + Remove $filepath, useless. + (&scan_makefile): Don't remove the $(FOO), ${FOO} and @FOO@ + variables, they are really part of the tokens. + Split the input line on spaces and then look for tokens. + Now autoscan ceases to ask for AC_PROG_LEX for the package Bison + because of `lex$U.$(OBJEXT)'. + (&scan_files): Use "@list" instead of join. + * doc/Makefile.am (CLEANFILES): Add *.fns. + +2001-11-26 Akim Demaille + + * tests/autoreconf.in, tests/autom4te.in, tests/autoupdate.in: + Remove, replaced by... + * tests/wrappl.in: Be common for all the Perl executables. + In particular autoscan and autoheader want -I. + * configure.ac: Adjust. + * lib/autoscan/headers: errno.h is portable. + +2001-11-26 Akim Demaille + + * bin/autoscan.in (used): New. + Use it. + +2001-11-26 Akim Demaille + + * bin/autoscan.in (&scan_c_file): Better parsing of CPP + directives. + (&scan_sh_file): Remove a duplicate pattern. + (&check_configure_ac): Use long options. + * lib/autoscan/headers (alloca.h): Check with AC_FUNC_ALLOCA. + +2001-11-26 Akim Demaille + + * bin/autoscan.in (scan_c_file): Fix the handling of C comments. + Before, having a line containing the opening of a multi line + comment made the whole line be ignored. + +2001-11-26 Akim Demaille + + * doc/autoconf.texi (Using an Autotest Test Suite): New. + (testsuite Scripts): Be one of its subsection. + (Autotest Logs): New. + +2001-11-26 Akim Demaille + + Test groups are now run two directories deeper. + + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Replace srcdir, + top_srcdir and top_builddir with at_srcdir, at_top_srcdir and + at_top_builddir. + * lib/autotest/general.m4 (AT_INIT): Compute srcdir, + top_srcdir, builddir and top_builddir. + Use `at_*dir' relatively to the directory containing the + suite, use `*dir' when relatively to the current group dir. + +2001-11-25 Joseph S. Myers + + * doc/autoconf.texi, TODO, lib/autoconf/fortran.m4, + lib/autoconf/functions.m4, lib/autoconf/headers.m4, + tests/atgeneral.m4, tests/tools.at, tests/atspecific.m4: Fix + spelling errors. + +2001-11-22 Alexandre Duret-Lutz + + * doc/autoconf.texi (Using System Type): Add an example of `case + $host' usage so people quit using `case $target' everywhere. + +2001-11-22 Akim Demaille + + * doc/autoconf.texi (Installation Directory Variables): Englishoes + spotted by Jim Meyering. + +2001-11-16 Paul Eggert + + This patch implements a `long double' suggestion by Oliver Kiddle. + + * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Make the array + static, to catch errors if the value isn't known at compile-time + and the compiler supports dynamic arrays. Change its name from + `_array_' to `test_array' to avoid potential name clashes. + (AC_C_LONG_DOUBLE): Make it a compile-time test, not a run-time + test. Do not define HAVE_LONG_DOUBLE if `long double' is no + better than double. Catch a bug in GCC 2.95.2 x86. + * doc/autoconf.texi (C Compiler): Document the above. + * NEWS: Likewise. + +2001-11-13 Akim Demaille + + * tests/m4sh.at (LINENO): Protect from autom4te's substitution by + hand. + * tests/tools.at: Don't protect dnl, AT_DATA_M4SH does. + +2001-11-13 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): After having run the test + group, go back to the initial directory, not to at_suite_dir. + +2001-11-13 Akim Demaille + + * tests/atspecific.m4 (AT_DATA_M4SUGAR, AT_DATA_M4SH) + (AT_DATA_AUTOCONF): Also protect @&t@ from autom4te. + (AT_CHECK_AUTOCONF, AT_CHECK_AUTOHEADER): Pass no --include + option. + (AT_CHECK_CONFIGURE): Use absolute paths. + (_AT_CHECK_AC_MACRO): Create aclocal.m4 with AC_STATE_SAVE in it. + The problem is still the old one: there is no means in M4 (that I + know about) to create a defining macro, because there is no means + to create `$1' etc., therefore, the defining macro ``swallows'' + all the arguments meant to the defined macro. + +2001-11-13 Akim Demaille + + * tests/atspecific.m4 (AT_DATA_AUTOCONF): New. + (AT_CONFIGURE_AC): Output the definition of AC_STATE_SAVE in + configure.ac. + * tests/aclocal.m4: Remove, as it is no longer used. + +2001-11-13 Akim Demaille + + * lib/autotest/general.m4: Change `tests?' into `groups?' in + variable names when referring to a single test group, or to + `suite' when referring to the whole test suite. + `at_last_test' is removed: m4 compute at_format itself. + (at_stdout, at_stder1, at_stderr): New variables. + (AT_CHECK): Use them. + +2001-11-13 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Be sure to put `.', relative, + in PATH. + Create `testsuite.dir/003/run' instead of `testsuite.003'. + Do it as soon as a test fails, don't wait till the end of the test + suite. + Don't remove $as_me.[0-9]*, since these files no longer exist. + +2001-11-13 Akim Demaille + + * tests/tools.at: Use absolute paths, since we are no longer run + in place. + +2001-11-13 Akim Demaille + + Now that tests are running in their own private dir, there is no + need to list the files to remove at the end of tests groups. + + * lib/autotest/general.m4 (_AT_CLEANUP_FILE, AT_CLEANUP_FILES): + (AT_data_files, at_data_files): Remove. + (AT_CLEANUP, AT_DATA): Simplify. + (AT_INIT): Adjust. + Remove the group dir if !debug && !failed. + * tests/atspecific.m4: Adjust. + +2001-11-13 Akim Demaille + + Start a new layout for Autotest: `testsuite' creates + `testsuite.dir' in which the at-check-line etc. files are to be + found, and `testsuite.dir/003' where the test group 3 is run. + + * lib/autotest/general.m4 (AT_INIT): at_tests_dir, + at_check_line_file, at_format, at_test_normalized, at_group_dir + are new variables. + Create the directories. + Use absolute paths for at- files. + (AT_CHECK): Adjust. + +2001-11-11 Michael Matz + + * m4sugar.m4 (_m4_foreach): Make it linear instead quadratic. + (m4_car2): New. + (m4_car): Properly quote arguments. + +2001-11-13 Akim Demaille + + * tests/aclocal.m4 (AC_STATE_SAVE): s/LIBOBJS/LIB@&t@OBJS/ to cope + with stricter rules on LIBOBJS. + +2001-11-12 Paul Eggert + + * lib/autoconf/c.m4 (AC_C_PROTOTYPES): Define __PROTOTYPES too. + * doc/autoconf.texi (C Compiler): AC_C_PROTOTYPES now defines + __PROTOTYPES too. + +2001-11-12 Akim Demaille + + * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Use AC_CHECK_FUNCS. + +2001-11-12 Akim Demaille + + * lib/autoconf/c.m4, lib/autoconf/fortran.m4, + * lib/autoconf/functions.m4, lib/autoconf/general.m4, + * lib/autoconf/headers.m4, lib/autoconf/libs.m4, + * lib/autoconf/programs.m4, lib/autoconf/specific.m4, + * lib/autoconf/types.m4: When invoking AC_DEFINE and friends, + specify to what the macro should be defined (typically to 1). + +2001-11-12 Akim Demaille + + * lib/autoconf/functions.m4 (AC_FUNC_STRTOD): AC_SUBST POW_LIB. + From Jim Meyering. + +2001-11-12 Akim Demaille + + * lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): Use + AC_TRY_EVAL to run $LEX, not AC_TRY_COMMAND. This validates the + definition used by Automake where LEX is +/- "${missing} lex" and + `missing' itself contains variables. + +2001-11-12 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Push KILL at the end. + Now that M4sh pushes BODY, the comments were output at the end of + the test suites. + +2001-11-08 Akim Demaille + + * bin/autoreconf.in (&autoreconf): Run aclocal before tracing, so + that we can trace macros from aclocal.m4. + Trace AC_PROG_LIBTOOL, not AM_PROG_LIBTOOL, since the latter is + obsoleted, and redirect to the former anyway. + Reported by Ralf Corsepius. + +2001-11-08 Akim Demaille + + * bin/autoreconf.in (&autoreconf): AC_CONFIG_SUBIDRS are to be + processed only if present. + * tests/torture.at (Configuring subdirectories): Use autoreconf + instead of successive calls to autoconf. + Add a nonexistent subdirectory to exercise the patch above. + Reported by Ralf Corsepius. + +2001-11-08 Kevin Ryde + + * doc/autoconf.texi (Limitations of Usual Tools): Note HP-UX cc + doesn't accept .S files. + +2001-11-07 Akim Demaille + + * lib/m4sugar/m4sugar.m4 (m4_pattern_forbid): Accepts $2. + * lib/autoconf/general.m4 (AC_INTI): Forbid LIBOBJS. + (_AC_LIBOBJ): s/LIBOBJS/LIB@&t@OBJS/. + * bin/autom4te.in (warn_forbidden): New. + (handle_output): Use it. + Read m4_pattern_forbid with messages. + +2001-11-05 Akim Demaille + + * bin/autom4te.in (--normalize): Remove. + * lib/autom4te.in: Adjust. + +2001-11-05 Akim Demaille + + * tests/Makefile.am (testsuite): Rename this target as... + ($(TESTSUITE)): this. + From Nicolas Joly. + +2001-11-05 Alexandre Duret-Lutz + + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): When removing + the --prefix option, also remove it's argument. + +2001-11-05 Akim Demaille + + * doc/autoconf.texi (testsuite Invocation): Update. + (Writing testsuite.at): Update. + +2001-11-03 Akim Demaille + + * doc/autoconf.texi: s/@code/@command/ where appropriate. + +2001-11-03 Akim Demaille + + * lib/Autom4te/General.pm: (&catfile, &canonfile) + (&file_name_is_absolute): New, wrappers around routines from + File::Spec. + Use and export them. + (&find_configure_ac): Optionally take a directory where to look at. + * bin/autoreconf.in (&parse_args): Trim the configure.ac part of + the arguments. + Default @ARGV to `.', not find_configure_ac. + (&autoreconf): Argument is a directory. + Trace AC_CONFIG_SUBDIRS and schedule the subdirs for autoreconf'ing. + * doc/autoconf.texi (autoreconf Invocation): Update. + +2001-11-03 Akim Demaille + + * lib/Autom4te/General.pm (@export_vars, @export_subs) + (@export_forward_subs): New. + Add basename, dirname, and fileparse. + (@EXPORT): Adjust. + * bin/autoreconf.in (&autoreconf): Fix call to fileparse. + Don't look for aclocal flags if we already know aclocal is not + used. + Move aclocal.m4t only if it exists. + Reported by Ezra Peisach. + +2001-11-03 Akim Demaille + + * bin/autoreconf.in (&parse_args): Work only on the configure.ac + passed on command line, defaulting to ./configure.ac if present. + (&maybe_autoreconf, File::Find): Remove, unused. + (&autoreconf): If autoconf is not used, don't try to trace. + +2001-11-02 Akim Demaille + + * configure.ac: Bump to 2.52g. + +2001-11-02 Akim Demaille + + Version 2.52f. + +2001-11-02 Akim Demaille + + * config/config.guess, config/config.sub, doc/standards.texi: + * config/lispdir.m4: Update from masters. + * configure.ac: Bump to 2.52f. + +2001-11-02 Akim Demaille + + * bin/autoreconf.in (&autoreconf): Set `$aclocal_flags' to ''. + Don't run aclocal when aclocal.m4 is not from aclocal. + From Ezra Peisach. + Don't run libtoolize and gettextize if --install is not given. + +2001-11-01 Paul Eggert + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): _AS_CR_PREPARE needs to + be invoked before _AS_LINENO_PREPARE. + (_AS_LINENO_PREPARE): Use as_cr_digits and as_cr_alnum rather + than character ranges. + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Fix NLS before + invoking AS_BASENAME. Set the locale variables to 'C' if + possible, as POSIX requires this to get the traditional + behavior. + * doc/autoconf.texi (Special Shell Variables): Describe the above. + +2001-10-31 Paul Eggert + + * lib/m4sugar/m4sh.m4 (_AS_LINENO_WORKS): Do not surround body + with {}, as that triggers a bug in Bash 2.05. + + (_AS_LINENO_PREPARE): Use Sed rather than + Awk. Fix the sed prepass to work even if there are multiple + instances of $LINENO on the same line. Do not substitute for + other variables like $LINENOT. Do not check file dates; such a + check is unreliable on sufficiently fast machines, and removing + the check makes the code simpler and more reliable. Check for + output and chmod failures. + + * doc/autoconf.texi (Special Shell Variables): Document + the above. + +2001-10-31 Akim Demaille + + * tests/Makefile.am (atconfig): Remove this target, Automake + handles it now. + +2001-10-31 Akim Demaille + + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Do not + AC_CONFIG_FILES(atlocal) as it means a file atlocal.in *must* be + provided, while it is optional. + * configure.ac: Adjust. + +2001-10-26 Paul Eggert + + * NEWS, README, configure.ac, lib/Autom4te/General.pm, + lib/Autom4te/Struct.pm: + Require Perl 5.005_03 instead of just 5.005, as some tests fail + with 5.005_02. + + * doc/autoconf.texi (Special Shell Variables): Document some + more LINENO gotchas, particularly with respect to the Awk+Sed hack. + + * lib/m4sugar/m4sh.m4 (_AS_LINENO_WORKS): New macro. + (_AS_LINENO_PREPARE): Use it instead of shell eval, since + eval $LINENO is not portable in practice. + +2001-10-24 Akim Demaille + + * lib/Autom4te/General.pm (backname): New. + +2001-10-24 Akim Demaille + + * m4/: Remove, merged into... + * config/: here. + +2001-10-23 Tim Van Holder + + * doc/autoconf.texi (Shellology): Mention the problems with bash + 2.05's use of ANSI quoting in its `set' builtin. + +2001-10-22 Paul Eggert + + * lib/autoconf/functions.m4 (AC_FUNC_STRERROR_R): + Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p, + and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since + POSIX decided to standardize on the int flavor of strerror_r. + Always do char* test, as there's no reason not to. + Assign to a char* var, to catch strerror_r that returns int*. + + * doc/autoconf.texi (Particular Functions): + Document the above changes. Also, document the fact that + AC_FUNC_STRERROR_R defines HAVE_DECL_STRERROR_R. + + * NEWS: Mention HAVE_WORKING_STRERROR_R -> STRERROR_R_CHAR_P. + +2001-10-20 Akim Demaille + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): The name of + the executable was missing from the log. + +2001-10-20 Akim Demaille + + * lib/Autom4te/General.pm (&update_file): If destination is + unchanged, remove the source. + (&up_to_date_p): Don't be verbose, be debug. + * bin/autoreconf.in: No longer support --m4dir. + (&autoreconf): Display the full path of the configure.ac we are + studying. + Trace it only once. + Be sure to honor --force with gettextize. + Always run aclocal. + * doc/autoconf.texi: Adjust. + +2001-10-20 Akim Demaille + + * bin/autoheader.in ($localdir, $m4, $SIMPLE_BACKUP_SUFFIX): + Remove, dead. + * bin/autoreconf.in (&autoreconf): Do not run gettextize when + `intl' is already present, as it refuses unless --force. + (&parse_args): Use -I, --include instead of the old Autoconf + options. + ($localdir, $autoconf_dir): Remove. + (@include): New. + (&maybe_autoreconf): New, to preserve $_ for File::Find. + +2001-10-19 Jens Petersen + + * lib/autoconf/programs.m4 (AC_PROG_AWK): Prefer gawk to mawk. + * doc/autoconf.texi (Particular Programs): Likewise. + +2001-10-19 Akim Demaille + + * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Name the generated + file in @configure_input@. + Don't mention `automatically' in addition to `generated'. + * tests/torture.at (#define header templates): Adjust. + +2001-10-19 Akim Demaille + + * lib/emacs/autoconf-mode.el, lib/emacs/autotest-mode.el: In a + comment, explain how to install automatic mode selection. + From Russ Allbery. + +2001-10-19 Ezra Peisach + + * bin/autoreconf.in (autoreconf): Display the path to the + configure.ac being studied. + +2001-10-18 Paul Eggert + + * lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Cast sizeof to unsigned + long, to work around a bug in the HP C compiler version HP92453-01 + B.11.11.23709.GP. + + * lib/m4sugar/m4sh.m4 (AS_DIRNAME): Use 'dirname' if that works. + (AS_BASENAME_EXPR): New macro. + (AS_BASENAME_SED): Do not assume GNU sed semantics. + (AS_BASENAME): Use 'basename' if that works; then try 'expr'; + and fall back on 'sed' only if the other two fail. This makes + AS_BASENAME act more like AS_DIRNAME. + (as_me): Shell-quote the argument of AS_BASENAME, in case $0 + contains white space. + * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): + Use AS_DIRNAME, since I think it's now DOS-friendly. + * tests/m4sh.at (DIRNAME_TEST): New arg $3. + Allow "dirname //FOO" to return either / or //, as POSIX allows + either behavior. + +2001-10-10 Akim Demaille + + * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Recognize + `a_out.exe' for OpenVMS 7.1, DEC C 5.5 compiler, via GNV. + From Eric Sharkey. + +2001-10-10 Akim Demaille + + * lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE): m4_defun, not + m4_define, since... + (_AS_ECHO_N): AS_REQUIREs it. + +2001-10-10 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS) + (AC_INCLUDES_DEFAULT): Move to... + * lib/autoconf/headers.m4: here. + * lib/autoconf/types.m4: Comment changes. + * doc/autoconf.texi: Specify where the default includes are used + in the macro prototypes. + +2001-10-09 Akim Demaille + + * lib/autoconf/autoconf.m4 (m4_patsubst, m4_regexp): New + transition code. + +2001-10-08 Akim Demaille + + * bin/autoreconf.in (&autoreconf): Remove debugging code. + (&parse_args): Pass verbosity/debugging options to subtools when + --debug, not when --verbose. + * lib/autom4te.in (Autoreconf-preselections): New. + (Autoconf): Use it. + +2001-10-08 Akim Demaille + + * bin/autoreconf.in (autoreconf): Run libtoolize when appropriate. + +2001-10-08 Akim Demaille + + * doc/autoconf.texi (autoreconf Invocation): Adjust. + * bin/autoreconf.in (autoreconf): Run gettextize when appropriate. + +2001-10-08 Akim Demaille + + * tests/tools.at (AT_CHECK_PERL_SYNTAX): Check autoreconf. + (Syntax of the shell scripts): Don't. + * bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in: Don't + bother with $force since... + * lib/Autom4te/General.pm: does. + +2001-10-08 Akim Demaille + + * bin/autoreconf.in: Rewrite in Perl. + * configure.ac: Adjust. + * lib/Autom4te/General.pm (&up_to_date_p): New. + * bin/autom4te.in (&up_to_date_p): Use it. + Rename as... + (&up_to_date): this. + +2001-10-08 Akim Demaille + + * lib/m4sugar/m4sugar.m4 (m4_case, m4_bmatch, m4_normalize) + (m4_list_cmp): Use $0 to reinvoke yourself. + (m4_patsubsts): New. + (m4_strip, m4_version_unletter): Use it. + * tests/atspecific.m4 (AT_DATA_M4SUGAR, AT_DATA_M4SH): Likewise. + +2001-10-08 Akim Demaille + + * lib/autoconf/autoconf.m4, lib/autoconf/general.m4, + * lib/autoconf/libs.m4, lib/autoconf/status.m4, + * lib/autoconf/types.m4, lib/autotest/general.m4, + * lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4, tests/atspecific.m4, + * tests/torture.at: Rename m4_regexp, m4_patsubst, and m4_match to + m4_bregexp, m4_bpatsubst, and m4_bmatch. + * doc/autoconf.texi (Redefined M4 Macros): Adjust. + +2001-10-08 Akim Demaille + + * lib/m4sugar/m4sh.m4: Use AS_REQUIRE. + +2001-10-08 Akim Demaille + + * lib/m4sugar/m4sh.m4 (AS_DIRNAME_EXPR): Use AS_REQUIRE. + * tests/tools.at (AT_DATA_FORBIDDEN): Rename/move/duplicate to... + * tests/atspecific.m4 (AT_DATA_M4SUGAR, AT_DATA_M4SH): here. + * tests/tools.at, tests/m4sh.at: Use it. + * tests/m4sh.at: Don't rely on Autoconf macros. + (DIRNAME_TEST): Also exercise the expr variant. + * tests/m4sugar.at, tests/atspecific.m4 (AT_CHECK_M4SUGAR): The + preferred M4sugar extension is now `.4s'. + * tests/README: Remove. + +2001-10-08 Akim Demaille + + * lib/m4sugar/m4sugar.m4 (m4_provide_ifelse): Rename as... + (m4_provide_if): this. + * lib/m4sugar/m4sh.m4 (AS_REQUIRE): New. + * lib/autoconf/general.m4 (AS_DEFUN, AC_DEFUN_ONCE, AC_BEFORE) + (AC_REQUIRE, AC_PROVIDE, AC_PROVIDE_IFELSE): Be exact copy of the + M4sugar peer, i.e., drop the `AC_PROVIDE_$1' broken marker. + +2001-10-08 Akim Demaille + + Use `add-log-current-defun-function' for ChangeLog creation. + Suggested by Tom Tromey. + + * lib/emacs/autotest-mode.el (autotest-mode-map): New. + (autotest-mode): Adjust. + * lib/emacs/autoconf-mode.el (autoconf-mode-map): Modernize, map + 'comment-region onto `C-c ;'. + Comments are `#', not `dnl'. + (autoconf-current-defun): New. + (autoconf-font-lock-keywords): Recognize `m4_defun'. + +2001-10-08 Akim Demaille + + * lib/autoconf/general.m4 (_m4_divert(BODY)): Move to... + * lib/m4sugar/m4sh.m4: here. + (AS_INIT): Push the BODY diversion, set the #! /bin/sh line. + * lib/autoconf/general.m4 (AC_PLAIN_SCRIPT) : Remove. + (AT_INIT): Replace AC_PLAIN_SCRIPT with AS_INIT invocation, + include handle the m4_pattern_*, no longer push the + BODY diversion nor set the /bin/sh line, AS_INIT does it. + * lib/autotest/general.m4 (AT_INIT): Likewise. + * tests/base.at: Adjust the tests to use AS_INIT. + * tests/tools.at (AT_DATA_FORBIDDEN): New. + (autoconf: forbidden tokens): Adjust to work on M4sh instead of + Autoconf. + +2001-10-07 Paul Eggert + + * doc/autoconf.texi (config.status Invocation): + CONFIG_SHELL defaults to a shell that supports LINENO if available. + + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): If the current + shell does not support LINENO, and if CONFIG_SHELL is unset or + empty, and if we can find a shell that does support LINENO, + then set CONFIG_SHELL to that shell and then re-execute + ourselves with CONFIG_SHELL. + +2001-10-05 Paul Eggert + + * tests/Makefile.am (clean-local): Don't invoke $(TESTSUITE) if it + doesn't exist. Remove *.tmp, as a .tmp file is created during the + build of $(TESTSUITE). + +2001-10-05 Akim Demaille + + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Look in the path + iff we are a bareword. + Reported by Raja R Harinath. + +2001-10-05 Akim Demaille + + * tests/m4sh.at (LINENO): New. + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Be sure to set + PATH_SEPARATOR before using it. + Fix the absolute path case/esac pattern. + Provide $0 as fallback for as_myself. + Reported by Raja R Harinath. + +2001-10-05 Akim Demaille + + * Makefile.am, config/Makefile.am, lib/emacs/Makefile.am, + * m4/Makefile.am, man/Makefile.am: Add/adjust MAINTAINERCLEANFILES. + +2001-10-05 Akim Demaille + + * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): New, extracted from... + (AS_SHELL_SANITIZE): here. Use it. + (_AS_LINENO_PREPARE): Preserve the exit status of $0.lineno. + From Paul Eggert. + +2001-10-04 Akim Demaille + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Use a portable + combination of Awk and sed to replace $LINENO. + +2001-10-02 Paul Eggert + + * doc/autoconf.texi (Limitations of Builtins): You can't use + "source"; it's not portable. Remove confusing and + somewhat-incorrect example involving "." and "/". + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): "source" -> ".", for + compatibility with POSIX shells. + +2001-10-02 Akim Demaille + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Just source 40.lineno + instead of exec'ing to preserve $0 and $@. + +2001-10-01 Akim Demaille + + * tests/testsuite (AT_INIT) : New. + Don't run twice the same test. + +2001-10-01 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT) <--help>: Catch up with reality. + No longer output the list of tests. + <--list>: New option. + <--full-help>: Remove. + Complete the short/long options duality. + Various small adjustments. + +2001-10-01 Akim Demaille + + * doc/autoconf.texi: Use @kbd for user input. + Always use `$' as shell prompt. + +2001-09-30 Paul Eggert + + * lib/autoconf/status.m4 (AC_OUTPUT_MAKE_DEFS): + Don't use nested parenthesization. This patch was originally + suggested to bug-autoconf by Philippe De Muyter on 2000-05-28, + but somehow it didn't get incorporated then. + * doc/autoconf.texi (Limitations of Usual Tools): + Clarify remark about sed and nested parenthesization. + + * lib/autoconf/types.m4 (AC_CHECK_SIZEOF): + Report an error if the size cannot be determined even though + the type exists. + * lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE): + Check for `expr' arithmetic overflow, and for compilation failure, + and invoke a new argument $4 if either is discovered. + This makes _AC_COMPUTE_INT_COMPILE more like _AC_COMPUTE_INT_RUN. + (_AC_COMPUTE_INT): Pass IF-FAILS arg to _AC_COMPUTE_INT_COMPILE. + +2001-09-28 Akim Demaille + + * lib/emacs/autoconf-mode.el, lib/emacs/autotest-mode.el: New. + * m4/lispdir.m4: New. + * aclocal.m4, configure.ac: Adjust. + +2001-09-28 Akim Demaille + + * lib/autotest/general.m4 (AT_VICTIMS): Rename as... + (AT_TESTED): this. + (AT_INIT): More the wrapped section to where it will be expanded. + Output `AT_tested' only when existing. + Catch unexpanded PACKAGE_STRING and PACKAGE_BUGREPORT. + +2001-09-27 Akim Demaille + + Fix the passing of $? to ACTION-IF-FAILED in AC_TRY_RUN, that + generates too many bug reports. + + * lib/autoconf/general.m4 (_AC_RUN_IFELSE): Pass the right exit + status when executing the ACTION-IF-FALSE. + * tests/base.at (AC_TRY_*): Rename as... + (AC_TRY_COMMAND): this. + (AC_RUN_IFELSE): New. + * tests/compile.at (Extensions, C keywords) + (AC_PROG_CPP requires AC_PROG_CC, GNU Fortran 77) + (Broken/missing compilers, AC_PROG_CPP with warnings) + (AC_PROG_CPP without warnings, AC_PROG_CPP via CC): Move to... + * tests/c.at (Extensions, C keywords) + (Broken/missing compilers, AC_PROG_CPP with warnings) + (AC_PROG_CPP without warnings, AC_PROG_CPP via CC) + (AC_PROG_CPP requires AC_PROG_CC): here and... + * tests/fortran.at (GNU Fortran 77): there. + * doc/autoconf.texi (autoconf Invocation): Fix the example: + AC_TRY_RUN is about compilation, not shell commands. + (Test Programs): AC_TRY_RUN works as used to be advertised. + +2001-09-27 Akim Demaille + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Fix bugs spotted by + Raja R Harinath: + Be sure to detect when $LINENO always returns the same value. + Look for the original script, basename($0) is certainly not + enough. + Pass the CLI arguments to `$as_me.lineno'. + +2001-09-25 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Dump the whole config.log. + Be sure the close and reopen the LOG fd before and after using tee + to extend the log. + : Adjust to the new format of at_help_all. + +2001-09-23 Akim Demaille + + * bin/autom4te.in (parse_args): There can be several invocations + of --language now. + +2001-09-23 Akim Demaille + + * doc/autoconf.texi (Top): Wrap in @ifnottex. + +2001-09-23 Akim Demaille + + * lib/autoconf/status.m4 (_AC_SRCPATHS): Compute and provide + ac_buildpath, ac_top_buildpath, ac_srcpath, and ac_top_srcpath. + (_AC_OUTPUT_FILES): Also substitute srcpath, top_srcpath, + builddir, buildpath, top_builddir, and top_buildpath. + (_AC_OUTPUT_SUBDIRS): Compute the dir variables *before* changing + the current directory. + * lib/autoconf/general.m4 (_AC_INIT_HELP): Compute the dir + variables *before* changing the current directory. + Skip nonexistent dirs. + * doc/autoconf.texi (Preset Output Variables): Document these + variables. + + * lib/autotest/general.m4: Do not reset AT_victims. + Don't compute at_srcdir nor at_top_srcdir. + + * tests/tools.at: Hence use top_srcdir. + + * tests/Makefile.am, tests/autoconf, tests/autoheader, + * tests/autom4te, tests/autoreconf, tests/autoupdate, tests/ifnames: + Remove. + * tests/autoreconf.in, tests/wrappl.in, tests/autom4te.in, + * tests/wrapsh.in, tests/autoupdate.in: New. + * tests/Makefile.am (DISTCLEANFILES, EXTRA_DIST): Adjust. + * configure.ac: Build the position independent wrappers. + + * man/Makefile.am: Now that test wrappers are position + independent, use them and drop dark envvar magic. + +2001-09-23 Akim Demaille + + * doc/autoconf.texi (Common Shell Constructs): Rename as... + (Programming in M4sh): this. + Promote to @section. + +2001-09-23 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Dump config.log last. + Pass $at_debug_args to the rerun test suite. + * lib/m4sugar/Makefile.am (DISTCLEANFILES): New. + * bin/Makefile.am (ETAGS_SH): Don't use characters ranges. + From Paul Eggert. + +2001-09-23 Akim Demaille + + * bin/autom4te.in (@my_warning): Remove, handled by `autom4te.cfg'. + +2001-09-23 Akim Demaille + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix shell + over-escaping. + +2001-09-23 Akim Demaille + + * lib/Autom4te/General.pm (&debug): New. + * bin/autom4te.in ($language): Move to... + (parse_args): here. + Handle --language in languages. + * lib/autom4te.in (Automake-selections, Autoheader-selections) + (Autoscan-selections): New. + (Autoconf): Adjust. + +2001-09-23 Tim Van Holder + + * m4/auxdir.m4, m4/cond.m4, m4/depend.m4, m4/init.m4, + * m4/install-sh.m4, m4/missing.m4, m4/sanity.m4, m4/strip.m4: Updated + to match current versions from CVS Automake. + +2001-09-23 Alexandre Duret-Lutz + + * doc/autoconf.texi (Special Shell Variables): Add pdksh output + for $LINENO. + +2001-09-22 Akim Demaille + + * lib/autoconf/autotest.m4: Create `package.m4'. + * tests/Makefile.am (package.m4): Remove. + +2001-09-22 Akim Demaille + + Rely on `$LINENO' when possible instead of `__oline__'. + + * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Provide some form of + `$LINENO' support replacement when not supported. + (_AS_CR_PREPARE, _AS_TR_CPP_PREPARE, _AS_TR_SH_PREPARE): Invoke + them explicitly to be sure they are not output before this section + (via m4_require). Cosmetic only. + * lib/autoconf/c.m4, lib/autoconf/general.m4, + * lib/autoconf/programs.m4: Replace all the occurrences of + `__oline__' with `$LINENO'. + * doc/autoconf.texi (Special Shell Variables): Document LINENO. + +2001-09-21 Tim Van Holder + + * lib/autoconf/functions.m4 (_AC_FUNC_FORK): Replaceded an 8-bit + character (u: -> ue) in a code comment. + (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Only run 'ln -s' if we know + it works. + +2001-09-21 Akim Demaille + + * Makefile.maint (AUTOM4TE): Neutralize autom4te. + Suggested by Jim Meyering. + +2001-09-20 Tim Van Holder + + * lib/autoconf/programs.m4: Use extensions listed in + $ac_executable_extensions when looking for programs. + +2001-09-20 Tim Van Holder + + * lib/autoconf/general.m4: Fix a small Englisho. + * lib/autoconf/status.m4: Fix a small typo. Handle DOS paths when + setting up ac_dir_suffix and ac_top_builddir. + * lib/m4sugar/m4sh.m4: Default CDPATH to $PATH_SEPARATOR, not ':'. + +2001-09-20 Tim Van Holder + + * doc/autoconf.texi (File System Conventions): Clarify the use of + PATH_SEPARATOR. + (Special Shell Variables[PATH_SEPARATOR]): Ditto. + (Special Shell Variables[CDPATH]): Mention that $PATH_SEPRATOR should + be used instead of ':'. + * lib/autotest/general.m4: Replace occurrences of ':' in + AUTOTEST_PATH with $PATH_SEPARATOR at test suite startup. + +2001-09-20 Tim Van Holder + + * tests/atgeneral.m4: Add basic support for test ranges (e.g. 7-34) as + arguments. Fixed a typo. + +2001-09-20 Tim Van Holder + + * man/Makefile.am (.x.1): Use @PATH_SEPARATOR@, not ':' to set up + $PATH. Also set AUTOM4TE_CFG, so we can process autom4te properly. + +2001-09-20 Tim Van Holder + + * bin/autoscan.in: Add 'exec-perl-if-not-run-by-perl'. + * bin/autoupdate.in: Ditto. + * bin/autoheader.in: Reworded a few comments. + * bin/autoconf.in: Reworded help text for a few options. + * bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in, + * bin/autoscan.in, bin/autoupdate.in: Ditto. + +2001-09-20 Tim Van Holder + + * lib/Autom4te/XFile.pm (open): Simplified the error message (we + already have $file). Set output files to binary mode (helps avoid + CR issues on DOSish systems). + +2001-09-19 Akim Demaille + + * lib/autotest/general.m4: Englishoes. + From Tim Van Holder and Alexey Mahotkin. + +2001-09-18 Paul Eggert + + * doc/autoconf.texi (Common Shell Constructs): New node, + documenting AS_DIRNAME. + (Limitations of Usual Tools): Refer to it when discussing dirname. + Also, update discussion of POSIX standard to reflect latest draft. + + * lib/autoconf/c.m4: + (AC_LANG_INT_SAVE(C)): Also support negative values, down to LONG_MIN. + + * lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE): + Do not pass a first argument with leading '-' + to expr, by parenthesizing initial integers that might be negative. + + * doc/autoconf.texi (Particular Functions): AC_FUNC_GETPGRP + now merely checks whether it is an error to pass an argument + to getpgrp. + + * lib/autoconf/functions.m4 (_AC_FUNC_GETPGRP_TEST): Remove. + (AC_FUNC_GETPGRP): Don't bother with a runtime test. Just check + whether it is a (compile-time) error to pass an argument to + getpgrp. This simpler test supports the revised documentation, + and is all that AC_FUNC_GETPGRP's users really need. + +2001-09-18 Akim Demaille + + * doc/autoconf.texi (Limitations of Make) <$<>: New. + +2001-09-18 Akim Demaille + + * doc/autoconf.texi (Limitations of Usual Tools) : More about + `{}'. + * lib/autotest/general.m4 (AT_INIT): Adjust. + +2001-09-18 Paul Wagland + + * tests/m4sh.at: Ensure that AS_DIRNAME handles '/', '//' and '///' + correctly. + Add test for AS_BASENAME. + * lib/m4sugar/m4sh.m4: Fix AS_BASENAME so that it passes the previous + added test. It now correctly handles /1/2/3/, returning '3' not ''. + Added AS_BASENAME_SED to make the interface the same as AS_DIRNAME. + * tests/base.at: Fixed the expected responses. The old ones were + one line out... + * lib/autoconf/general.m4: Fixed AC_PREFIX_PROGRAM, it now behaves as + the documentation claims it should (and how it behaved in 2.13). + +2001-09-18 Akim Demaille + + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): No INIT-CMDS in + the AC_CONFIG_COMMANDS invocation. + This also solves the name clash problems. + Don't set the package's ID. + * lib/m4sugar/Makefile.am (version.m4): Revamp. + No longer to be shipped. + (version.in): Remove. + * lib/m4sugar/m4sugar.m4, lib/autoconf/general.m4, + * lib/autoconf/status.m4: Adjust. + Use `m4_PACKAGE_STRING'. + * lib/autotest/general.m4 (AT_INIT): N-th signature change: now + the only optional argument is the name of the test suite. + Expect `package.m4' to define the package signature. + * lib/autom4te.in (Autotest): Add `package.m4?'. + * tests/Makefile.am (package.m4): New. + * tests/suite.at: ifnames is a victim. + +2001-09-18 Akim Demaille + + * lib/autom4te.in (Autoconf): Preselect AM_CONDITIONAL, + AC_LIBSOURCE, AC_CONFIG_FILES. + * lib/autotest/general.m4 (AT_INIT): Don't abort when a tested + program version string doesn't match the package's. + * lib/autoconf/general.m4 (AC_CACHE_VAL): Reestablish the space + after `(cached)'. + +2001-09-17 Paul Eggert + + * lib/autoconf/c.m4: (AC_LANG_INT_SAVE(C)): + Allow expression to return any value that can fit into unsigned long + (not int, as before). Check for output errors. + +2001-09-17 Bruno Haible + + * lib/autoconf/c.m4: (AC_LANG_INT_SAVE(C)): + Always include and . Evaluate + the expression in an extra function before these includes. Call + fprintf "%d" only after ensuring the argument is of type 'int'. + Reported by Wayne Chapeskie . + +2001-09-17 Paul Eggert + + Fix bug reported by Paul Townsend on AIX 4.3.3.0 with CFLAGS=-O4 + or CFLAGS=-O5. In that case, the linker has a relaxed view of + fatal errors, and AC_CHECK_LIB causes it to include libraries even + when they don't exist. + + * lib/autoconf/headers.m4 (AC_HEADER_DIRENT): Use AC_SEARCH_LIBS, + not AC_CHECK_LIB, so that we don't use -ldir or -lx if we don't + need it. + + * lib/autoconf/specific.m4 (AC_ISC_POSIX): Replace the old, crufty + version with the version used by fileutils 4.1, except use + AC_SEARCH_LIBS, not AC_CHECK_LIB, so that we don't use -lcposix if + we don't need it. + + * doc/autoconf.texi (AC_ISC_POSIX): Describe new behavior. + +2001-09-13 Akim Demaille + + * tests/base.at, tests/m4sh.at: Be sure to issue the bangshe line + _first_. + Reported by Gerrit P. Haase. + +2001-09-13 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Reset `AT_victims' so that + m4_defn'ing is valid. + +2001-09-13 Akim Demaille + + * lib/m4sugar/m4sugar.m4 (m4_append_uniq): New. + * lib/autotest/general.m4 (AT_VICTIMS, AT_KEYWORDS, _AT_CLEANUP_FILE): + Use it. + +2001-09-13 Akim Demaille + + * lib/m4sugar/m4sugar.m4 (_AS_QUOTE_IFELSE, _AS_BOX_INDIR): Use + m4_match. + (m4_re_escape): New. + * lib/autoconf/status.m4 (AC_CONFIG_IF_MEMBER): Use it. + * lib/autoconf/general.m4 (AC_CACHE_SAVE): Use m4_match. + * lib/autoconf/status.m4 (AC_CONFIG_IF_MEMBER, AC_CONFIG_LINKS): + Likewise. + * lib/autoconf/types.m4 (_AC_CHECK_TYPE_REPLACEMENT_TYPE_P) + (_AC_CHECK_TYPE_MAYBE_TYPE_P, AC_CHECK_MEMBER): Likewise. + * lib/autotest/general.m4 (AT_INIT): Rename AT_TESTS_ALL as + AT_tests_all for consistency. + Set at_victims. + (AT_VICTIMS): Similar to AT_KEYWORDS. + (_AT_CLEANUP_FILE_IF): Use m4_match and m4_re_escape. + +2001-09-13 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Fix stupid bugs. + +2001-09-13 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Create and remove + `$as_me.[0-9]+' instead of `debug-[0-9]+.sh', so that multiple + test suites can cohabit. + +2001-09-13 Akim Demaille + + * tests/mktests.sh: Don't output banners for empty test files. + +2001-09-13 Akim Demaille + + Test suites can be run independently of configure. + + * lib/m4sugar/m4sh.m4 (_AS_ECHO, _AS_ECHO_N_PREPARE): New. + * lib/autoconf/programs.m4 (_AC_PROG_ECHO): Remove. + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Adjust: AC_SUBST + ECHO_N etc. + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Don't ask for at_n + and at_c. + * lib/autotest/general.m4: Use ECHO_*. + +2001-09-13 Akim Demaille + + * bin/ifnames.in: Rewrite in Perl. + * configure.ac: Don't look for AWK. + * tests/tools.at (AWK portability): Remove. + (Syntax of the shell scripts): Don't check ifnames. + (AT_CHECK_PERL_SYNTAX): New. + (Syntax of the Perl scripts): Check ifnames. + * tests/ifnames: New. + +2001-09-13 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Let --keywords also match + test group titles. + * tests/atspecific.m4 (AT_CHECK_AU_MACRO): AT_KEYWORDS(autoupdate). + Remove all the other keywords. + +2001-09-10 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Remove the diversion HELP and + SETUP: no longer used. + Support -k, --keywords. + : Be `no', `short', or `long'. + : New variable. + (AT_KEYWORDS): New. + (AT_CLEANUP_FILE_IFELSE, AT_CLEANUP_FILE): Rename as... + (_AT_CLEANUP_FILE_IF, _AT_CLEANUP_FILE): these. + (_AT_CLEANUP_FILE_IF): Simplify the regexp. + (AT_SETUP): Reset AT_line, AT_keywords, AT_description. + No longer fill the HELP diversion. + (AT_CLEANUP): Use them. + * lib/m4sugar/m4sugar.m4 (m4_append): Support a separator. + (m4_list_append): Remove. + + Spread a few keywords in the Autoconf test suite. + +2001-09-10 Akim Demaille + + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Don't pass + PATH_SEPARATOR, let M4sh compute it. + * lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): New. + * lib/autoconf/programs.m4 (AC_SHELL_PATH_WALK): Use PATH_SEPARATOR. + Move to... + * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Here. + Simplify when the path is not a literal. + (AS_UNAME): Use it to report PATH. + * lib/autoconf/general.m4 (_AC_INIT_PREPARE_FS_SEPARATORS): Remove. + (_AC_INIT_DEFAULTS): AC_SUBST PATH_SEPARATOR. + * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Use _AS_PATH_WALK. + * lib/autotest/general.m4 (AT_INIT): Use _AS_PATH_WALK to + normalize the path, and to look for victims. + * tests/semantics.at (AC_PATH_PROG & AC_PATH_PROGS) + (AC_CHECK_PROG & AC_CHECK_PROGS): Use PATH_SEPARATOR. + +2001-09-07 Akim Demaille + + * bin/autom4te.in (&handle_m4): `< /dev/null' so that GNU M4 1.5 + doesn't neutralize SIGINT, making autoconf etc. non interruptible. + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Move the package + related variables into `at_package_*'. + * lib/autotest/general.m4 (AT_VICTIMS): New. + (AT_INIT): Adjust for stand-alone/embedded test suites. + (AS_MESSAGE_LOG_FD): Define and use it. + * tests/suite.at (AT_VICTIMS): Use it. + * tests/tools.at (autoupdating AC_PREREQ): Don't depend upon + at_version. + +2001-09-07 Akim Demaille + + Move toward possibly stand-alone test suites. + + * lib/autotest/general.m4: Stop displaying srcdir everywhere as, + in addition, it introduces useless differences in logs. + (AT_INIT): Let atconfig and atlocal be both optional. + Adjust PATH computation. + * lib/m4sugar/m4sh.m4 (AS_UNAME): More readable display of PATH. + +2001-09-07 Akim Demaille + + * lib/autoconf/Makefile.am (autoconf.m4f): Depends upon + m4sugar/version.m4. + +2001-09-05 Akim Demaille + + * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use `_array_' + to avoid GCC warnings. + From Uwe Seimet. + +2001-09-05 Akim Demaille + + * bin/autom4te.in: --language is -l, not -s. + +2001-09-05 Akim Demaille + + Be ready to handle filenames as stupid as `dnl.at', for if even + the maintainer is dumb enough to do that... + + * lib/autotest/general.m4 (AT_SETUP, AT_LINE): Demonstrates your + excellence in M4 quotation: consider `__file__' is active. + + And BTW, when invoking m4, pass the --include in the right order: + the wrong one. + + * bin/autom4te.in, bin/autoupdate.in: Use reverse when kingtal to + 4m. + +2001-09-05 Akim Demaille + + * lib/Autom4te/XFile.pm: New lib file. + * bin/autoupdate.in, bin/autoscan.pl, bin/autom4te.in, + * bin/autoheader.in: Use it. + +2001-09-05 Akim Demaille + + * bin/autoupdate.in (&handle_m4_macros) : Undefine iff + defined. + +2001-09-05 Akim Demaille + + * lib/Autom4te/General.pm (&getopt): Work around the `-' Getopt bug. + * bin/autoheader.in, bin/autoupdate.in (&parse_args): Adjust. + + * bin/autoscan.in: Use `getopt' and `find_files' etc. + Add -I, --include support. + * doc/autoconf.texi (autoscan Invocation): Adjust. + +2001-09-05 Akim Demaille + + CVS GNU M4 doesn't like `undefine(undefined)'. + + * bin/autoupdate.in (&handle_m4_macros, &handle_autoconf_macros): + New, extracted from main. + Use IO::File wherever possible. + (input.m4): Be constant, use -I instead of hard coding $tmp. + Therefore be a quoted heredoc. + Don't invoke `_au_disable', since ac was not loaded, but just + `unm4.m4'. + +2001-08-31 Akim Demaille + + Version 2.52d. + +2001-08-31 Akim Demaille + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix the + previous patch. + * tests/atspecific.m4 (AT_CHECK_AUTOHEADER): Can create `config.hin~'. + +2001-08-31 Akim Demaille + + * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): DU 5.0 has + serious problems handling heredocs in heredocs. + Reported by Nicolas Joly. + +2001-08-31 Akim Demaille + + * doc/autoconf.texi: Don't promote non `m4_*' M4 macros. + (Making testsuite Scripts): Update. + +2001-08-31 Akim Demaille + + * lib/Makefile.am (CLEANFILES): Add autom4te.cfg. + +2001-08-31 Akim Demaille + + * doc/autoconf.texi (Quadrigraphs): Document `@&t@'. + (testsuite Scripts): There is no such thing as `atconfig.in'. + And actually one diagram is missing: test suite runtime. + +2001-08-31 Akim Demaille + + * lib/Autom4te/General.pm (&find_file): Browse the includes in the + inverse order. + +2001-08-31 Akim Demaille + + * bin/autoupdate.in (@include): `installcheck' revealed the path + to m4sugar was lacking! + +2001-08-31 Akim Demaille + + * man/Makefile.am (.x.1): We really have to pass + autom4te_perllibdir. + +2001-08-31 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Don't pass all the args to + debug scripts, in particular passing explicitly listed tests to + run is stupid. + +2001-08-31 Akim Demaille + + * bin/autom4te.in (&parse_args): Strip `.' from `@include'. + * bin/autoupdate.in: Use --include, -I, and --force, -f, too. + Use directly autom4te, not autoconf. + * tests/autoupdate: $top_srcdir/lib is needed too for melt files. + +2001-08-31 Akim Demaille + + * tests/semantics.at (AC_C_BIGENDIAN): Missing eol. + * bin/autoheader.in (%symbol): Strip arguments of macros. + +2001-08-31 Akim Demaille + + * doc/autoconf.texi: Catch up -I, --include changes. + +2001-08-31 Akim Demaille + + * bin/autom4te.in (&parse_args): Die on unknown languages. + * bin/autoheader.in: Run directly autom4te --mode=autoconf, no + need for autoconf. + Promote --include over --macrodir and other obsolete options. + +2001-08-31 Akim Demaille + + * lib/Autom4te/General.pm ($version, $help, &getopt): New. + * bin/autoupdate.in, bin/autoheader.in, bin/autom4te.in: Use them. + * bin/autom4te.in ($autoconf): Pass --force. + `print $out' doesn't print `$_' but `$out'. + * tests/tools.at (Syntax of the Perl scripts): Pass the lib dir. + (autoheader): Pass --force since the test suite goes too fast for + the time stamps. + Adjust to the new autoheader messages. + +2001-08-31 Akim Demaille + + * bin/autoheader.in: Handle the acconfig.h etc. junk files. + Check the completeness of the #template. + * lib/Autom4te/General.pm (&update_file): s/remove/unlink/. + * tests/semantics.at (AC_C_BIGENDIAN): Adjust AT_CHECK_AUTOHEADER + invocation. + +2001-08-31 Akim Demaille + + * lib/Autom4te/General.pm (&find_file, &update_file): New. + * bin/autoupdate.in, bin/autoheader.in: Adjust. + Drop AC_MACRODIR dead for real. + * tests/atspecific.m4 (AT_CHECK_AUTOHEADER): Now autoheader says + `autoheader: `config.hin' is created'. + * tests/tools.at (Syntax of the Perl scripts): Check autoheader. + +2001-08-31 Akim Demaille + + * bin/autoheader.in: Rewrite in Perl. + * tests/autoheader: Adjust. + +2001-08-31 Akim Demaille + + * bin/autoconf.in (--include, -I): New option. + Map --localdir, --autoconf-dir onto it. + Forward autom4te's options instead of interpreting them. + * bin/autoconf.in, bin/autoheader.in (AC_MACRODIR, autoconf_dir): + There is no such envvar since the inception of autom4te.cfg. + * bin/autom4te.in (&parse_args): Uniquify `@include'. + * bin/autoupdate.in: Adjust, and perform more control. + * tests/atspecific.m4 (AT_CHECK_AUTOCONF): Adjust. + * tests/autoconf: Dittowise. + +2001-08-31 Akim Demaille + + * bin/autoconf.in: Don't bother with `acsite.m4' and `aclocal.m4'. + * bin/autom4te.in (&find_file): Support `FILE?' standing for + optionally `FILE'. + Use -e, not -f, since /dev/null for instance is OK. + (&parse_args): Adjust. + * lib/autom4te.in (Autoconf): Add `acsite.m4?' and `aclocal.m4?'. + +2001-08-31 Akim Demaille + + * configure.ac: Also find tested executables in bin. + * bin/autoconf.in, bin/autoheader.in, bin/autoreconf.in, + * bin/autoscan.in, autoupdate.in: Use exclusively the name of the + installed peer executables, only PATH is allowed to resolve it. + Pass `autoconf_dir' via options, not via invisible envvars. + * lib/Autom4te/General.pm (&find_peer): Remove. + * lib/autotest/general.m4 (AT_INIT): `AUTOTEST_PATH=a:b' gives + `abuild:asrc:bbuild:bsrc', not `abuild:bbuild:asrc:bsrc'. + * man/Makefile.am: Let help2man rely on PATH instead of trying to + find the executables for it. + * tests/Makefile.am: Major cleanup. Too lazy to document... + * tests/atlocal.in: Remove all the obscure envvar manipulations. + We only need PERL. + * tests/atspecific.m4, tests/tools.at: Passing --localdir is + indeed related to running the test suite, while passing + --autoconf-dir and others is related to running non installed + Autoconf executables. So don't do that, leave it to... + * tests/autoconf, tests/autoheader, tests/autom4te, tests/autoupdate, + * tests/autoscan: New. + * tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): Don't + refer to library files: rely on --language. + +2001-08-29 Akim Demaille + + * bin/autom4te.in, lib/autom4te.in, bin/autoconf.in: + s/--set/--language/. + +2001-08-29 Akim Demaille + + * doc/autoconf.texi: Strip the @nodes. + Suggested by Paul Eggert. + (Initializing configure): Typo. + +2001-08-29 Akim Demaille + + * bin/autom4te.in (&handle_output): s/@__@/@&t@/. + Suggested by Paul Eggert. + +2001-08-29 Akim Demaille + + * Makefile.maint (do-po-update): Wget refuses to overwrite files: + download in a tmp dir. + +2001-08-29 Akim Demaille + + * lib/autotest/general.m4: s/AT-devnull/devnull/ since there are + case insensitive OSes out there :( + From Tim Van Holder. + +2001-08-29 Akim Demaille + + * lib/autom4te.in: New. + * lib/Makefile.am (edit, autom4te.cfg): New. + * bin/autom4te.in (BEGIN): Simplify. + Rely on `AC_MACRODIR' in addition of `autom4te_perllibdir'. + (&load_configuration): New. Use it. + (&parse_args): Support --mode, --set, and --melt. + * bin/autoconf.in: Simplify and adjust. + * tests/Makefile.am (AUTOMAKE): Use --set. + * tests/atlocal.in: Adjust. + * BUGS: distcheck and check are weak. + +2001-08-29 Akim Demaille + + * lib/autotest/general.m4: Use + foo=`(command) 2>/dev/null` + not + foo=`command` 2>/dev/null + (at-devnull): Rename as... + (AT-devnull): this. + (--clean): Remove AT-* files too. + * doc/autoconf.texi (Limitations of Usual Tools): Document `date'. + Reported by Nicolas Joly. + +2001-08-28 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Don't use single + quotes inside single quotes. + Reported by Nicolas Joly. + +2001-08-28 Kevin Ryde + + * doc/autoconf.texi (Function Portability): Mention C right shifts. + +2001-08-27 Tim Van Holder + + * lib/autotest/general.m4: Reword some messages. + (AT_INIT): Check for the `times' builtin before using it. + Support test ranges as arguments to the testsuite. + Have -e imply -d as the help text suggested. + +2001-08-27 Akim Demaille + + * Makefile.maint: Formatting changes. + (do-po-update, po-update, cvs-update, update): New targets. + (AMTAR): Remove. + +2001-08-27 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT) : Remove. + : New. + Pass it to debug-*.sh scripts. + : May contain absolute dir names. + +2001-08-27 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Log the command line. + Support `VAR=VAL' as arguments. + Compute PATH _after_ the options processing, so that AUTOTEST_PATH + may be set via the command line. + +2001-08-27 Akim Demaille + + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): $2 defaults to $1. + * lib/autotest/autotest.m4 (AT_INIT): Expand AUTOTEST_PATH into + first the build dirs, then the src dirs. + * configure.ac (AC_CONFIG_TESTDIR): Adjust. + +2001-08-27 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Output the definition of + at_data_files earlier. + (--clean, -c): New option. + * tests/Makefile.am: Use this option. + +2001-08-27 Akim Demaille + + * lib/autoconf/status.m4 (_AC_SRCPATHS): Rename `ac_dots' as + `ac_top_builddir' to mimic Automake's vocabulary, which much more + readable. + Adjust callers. + * doc/autoconf.texi (Configuration Actions): Document the vars + available in commands. + Emphasize the risks of collisions in init-cmds. + +2001-08-27 Akim Demaille + + * doc/autoconf.texi (Input) : Move to.. + (Initializing configure): this new node. + +2001-08-27 Akim Demaille + + * Makefile.am (EXTRA_DIST): INSTALL.txt is a dead hack. + +2001-08-27 Akim Demaille + + * m4/atconfig.m4 (AT_CONFIG): Remove, replaced by... + * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): this. + New file. + * m4/Makefile.am (EXTRA_DIST): Oops, adjust... + +2001-08-27 Akim Demaille + + * lib/autoconf/general.m4 (AU_DEFINE, AU_DEFUN, AU_ALIAS): Move + to... + * lib/autoconf/autoheader.m4: this new file. + * lib/autoconf/general.m4 (AH_OUTPUT, AH_VERBATIM) + (_AH_VERBATIM_OLD, AH_TEMPLATE, _AH_TEMPLATE_OLD, AH_TOP, AH_BOTTOM): + Move to... + * lib/autoconf/autoupdate.m4: this new file. + +2001-08-27 Akim Demaille + + * lib/autoconf/status.m4 (_AC_SRCPATHS): New. + (_AC_OUTPUT_LINKS, _AC_OUTPUT_FILES, _AC_OUTPUT_SUBDIRS): Use it. + Standardize the var names (ac_sub_srcdir -> ac_srcdir, ac_subdir + -> ac_dir). + (_AC_OUTPUT_HEADERS): AS_DIRNAME always return a dir name. + * lib/autoconf/general.m4 (_AC_INIT_HELP): Ditto. + +2001-08-27 Akim Demaille + + * lib/autoconf/autoconf.m4 (AC_CONFIG_COMMANDS) + (AC_CONFIG_COMMANDS_POST, AC_CONFIG_COMMANDS_PRE, AC_CONFIG_FILES) + (AC_CONFIG_HEADER, AC_CONFIG_HEADERS, AC_CONFIG_IF_MEMBER) + (AC_CONFIG_LINKS, AC_CONFIG_SUBDIRS, AC_FILE_DEPENDENCY_TRACE) + (AC_LINK_FILES, AC_LIST_COMMANDS, AC_LIST_COMMANDS_COMMANDS) + (AC_LIST_FILES, AC_LIST_FILES_COMMANDS, AC_LIST_HEADERS) + (AC_LIST_HEADERS_COMMANDS, AC_LIST_LINKS, AC_LIST_LINKS_COMMANDS) + (AC_OUTPUT, AC_OUTPUT_COMMANDS, AC_OUTPUT_COMMANDS_POST) + (AC_OUTPUT_COMMANDS_PRE, AC_OUTPUT_MAKE_DEFS) + (_AC_CONFIG_COMMANDS_INIT, _AC_CONFIG_DEPENDENCIES) + (_AC_CONFIG_DEPENDENCY, _AC_CONFIG_UNIQUE, _AC_LINK_FILES_CNT) + (_AC_LIST_SUBDIRS, _AC_OUTPUT_COMMANDS, _AC_OUTPUT_COMMANDS_CNT) + (_AC_OUTPUT_COMMANDS_INIT, _AC_OUTPUT_CONFIG_STATUS) + (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_OUTPUT_LINKS) + (_AC_OUTPUT_SUBDIRS): Move to... + * lib/autoconf/status.m4: this new file. + * lib/autoconf/general.m4, lib/autoconf/Makefile.am: Adjust. + * tests/Makefile.am, tests/suite.at: Adjust. + +2001-08-27 Akim Demaille + + Automake 1.5. + + * Makefile.am (AUTOMAKE_OPTIONS): Add 1.5 and dist-bzip2. + (AMTAR): Help automake define it. + (INSTALL, install-data-hook): The INSTALL.txt trick is no longer + needed, 1.5 can have a macro and a target with the same name. + * m4/auxdir.m4, m4/cond.m4, m4/depend.m4, m4/install-sh.m4, + * m4/strip.m4: New. + * m4/init.m4, m4/sanity.m4: Update. + * doc/Makefile.am (CLEANFILES): 1.5 knows the texi2dvi files. + * lib/autoconf/Makefile.am, lib/autotest/Makefile.am, + * lib/m4sugar/Makefile.am, lib/autoscan/Makefile.am, + * lib/Autom4te/Makefile.am, man/Makefile.am: Use dist/nodist. + +2001-08-27 Akim Demaille + + Provide a mean to ``AC_PREREQ'' for M4sugar, M4sh and Autotest. + + * lib/autoconf/version.in: Remove. + * lib/m4sugar/version.in: New. + * lib/m4sugar/m4sugar.m4 (m4_acversion, m4_version_prereq): New. + Adjust callers. + * bin/autoupdate.in: Distinguish M4sugar vs. Autoconf macros by + the name of the directory they're in, instead of the filename, + since version.m4 is now in m4sugar, but m4_acversion must not be + classified as an Autoconf macro. + ($input_m4): Don't qualify the path to m4sugar. + Rather, pass autoconf_dir to m4. + * tests/Makefile.am (testsuite): Remove -I top_srcdir, unneeded. + * tests/suite.at: Require 2.52c. + +2001-08-27 Akim Demaille + + testsuite.log should include config.log. + + * lib/autotest/autotest.m4: New. + * lib/autotest/general.m4, tests/atspecific.m4: Adjust. + * tests/suite.at : Adjust. + (AT_INIT): Log config.log. + * lib/m4sugar/m4sugar.m4 (m4_text_box): New. + * lib/m4sugar/m4sh.m4 (_AS_BOX_LITERAL): Adjust. + * lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Use them. + (_AC_INIT_PREPARE): Fix the incredibly messy and buggy completion + of config.log on traps. + (_AC_OUTPUT_CONFIG_STATUS): Use AS_BOX. + Use consistently `_ACEOF' for configure's here docs, and `_CSEOF' + for config.status'. + Open the log as soon as possible. + Use the same log introduction as configure's. + +2001-08-22 Paul Eggert + + * doc/autoconf.texi (Indices): New node. + Move indices out of the top level menu and into this submenu. + +2001-08-22 Akim Demaille + + * lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): Use + AC_TRY_COMMAND. + (AC_DECL_YYTEXT): Fix the previous patch: it points to AC_PROG_LEX. + +2001-08-22 Akim Demaille + + * lib/autoconf/general.m4 (AC_SHELL_PATH_WALK, AC_CHECK_PROG) + (AC_CHECK_PROGS, AC_PATH_PROG, AC_PATH_PROGS, AC_CHECK_TOOL_PREFIX) + (AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Move to... + * lib/autoconf/programs.m4: here. + * lib/autoconf/specific.m4 (_AC_PROG_ECHO, AC_PROG_MAKE_SET) + (AC_PROG_RANLIB, AC_PROG_YACC, AC_PROG_LEX, _AC_DECL_YYTEXT) + (AC_PROG_INSTALL, AC_PROG_LN_S, AC_RSH): Move to... + * lib/autoconf/programs.m4: here. + (_AC_DECL_YYTEXT): Rename as... + (_AC_PROG_LEX_YYTEXT_DECL): this. + * lib/autoconf/autoconf.m4, lib/autoconf/Makefile.am + * tests/Makefile.am, tests/suite.am: Adjust. + +2001-08-22 Akim Demaille + + * lib/autoconf/general.m4 (AC_LIST_MEMBER_OF, AC_LINKER_OPTION): + Move to... + * lib/autoconf/fortran.m4 (_AC_LIST_MEMBER_IF, _AC_LINKER_OPTION): + here. + * lib/autoconf/general.m4 (AC_TRY_LINK_FUNC): Move to... + * lib/autoconf/functions.m4: here. + * lib/autoconf/general.m4 (AC_SEARCH_LIBS, AC_CHECK_LIB) + (AH_CHECK_LIB): Move to... + * lib/autoconf/libs: this new file. + * lib/autoconf/specific.m4 (_AC_PATH_X_XMKMF, _AC_PATH_X_DIRECT) + (_AC_PATH_X, AC_PATH_X, AC_PATH_XTRA): Move to... + * lib/autoconf/libs.m4: here. + * lib/autoconf/autoconf.m4, lib/autoconf/Makefile.am: Adjust. + +2001-08-22 Akim Demaille + + * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Fail if fails. + * lib/autoconf/general.m4 (_AC_OUTPUT_SUBDIRS): Adjust. + (AC_SITE_LOAD): Better logging of config.site. + +2001-08-20 Akim Demaille + + * configure.ac (AT_CONFIG): Fix the path. + * m4/atconfig.m4 (AT_CONFIG): Don't use EOF but ATEOF so that 2.52 + can be used. + +2001-08-20 Alexandre Duret-Lutz + + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Prepare the cross-compile + program with AC_LANG_PROGRAM before feeding it to + AC_COMPILE_IFELSE. Cleanup grep usage. + +2001-08-20 Akim Demaille + + * ChangeLog, ChangeLog.0, ChangeLog.1, ChangeLog.2, AUTHORS, BUGS, + * NEWS, README, README-alpha, TODO, tests/README: This package is + `Autoconf', not `autoconf' (the executable). + +2001-08-20 Akim Demaille + + Info readers seem to need `Index' in the index node title :( + + * doc/autoconf.texi: Reverse the 2001-08-15 change which + simplified index node names. + +2001-08-20 Akim Demaille + + * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Warn if the + arguments are not literals. + * doc/autoconf.texi (Input) : Arguments must be literals. + Specify the output variables, and macros defined. + +2001-08-20 Akim Demaille + + * doc/autoconf.texi (Examining Declarations) : + (Examining Syntax) + (Examining Libraries) + (Test Programs) : These macros double quote some of + their arguments. + Reported by Werner Lemberg. + +2001-08-20 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Compute top_builddir, + top_srcdir and srcdir from at_topbuild_2_topsrc and at_testdir. + Load atlocal late enough to dump it in the log. + * m4/atconfig.m4 (AT_CONFIG): Pass them to atconfig. + +2001-08-20 Akim Demaille + + * tests/torture.at (Configuring subdirectories): New test. + * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): Say what you are + looking for. + * m4/atconfig.m4: Be sure the let $[0] be expandable. + (top_srcdir): Fix its computation. + +2001-08-20 Akim Demaille + + * lib/autoconf/general.m4 (_AC_OUTPUT_COMMANDS): Say what you do. + * m4/atconfig.m4 (AT_CONFIG): $1 is now the directory where the + test suite lives. + Create `atconfig' automagically. + Configure atlocal.in if present. + * tests/atconfig.in: Remove. + * tests/atlocal.in: New. + * tests/Makefile.am: Adjust. + +2001-08-20 Akim Demaille + + Huh!?!?! There are still some user EOF tags used, which prevents + their use in AC_CONFIG_COMMANDS for instance... + + * lib/autoconf/general.m4, lib/autoconf/specific.m4, + * lib/autotest/general.m4: Rename the EOF tags as `_ACEOF', + `_CSEOF', or `_ATEOF', as appropriate. + * lib/m4sugar/Makefile.am, lib/autoconf/Makefile.am, + * lib/autotest/Makefile.am (check-local): Enforce this constraint. + +2001-08-20 Akim Demaille + + * tests/base.at, tests/m4sh.at, tests/m4sugar.at, + * tests/semantics.at, tests/tools.at, tests/torture.at: + s/^AT_DATA\(([^][]+),/AT_DATA([$1],/. + +2001-08-20 Akim Demaille + + Autotest invokes M4sh's initialization. + + * lib/autotest/general.m4: Adjust the diversion names. + (AT_INIT): Run AS_INIT. + Use the BINSH diversion to invoke /bin/sh. + * tests/base.at, tests/m4sh.at, tests/m4sugar.at, tests/tools.at: + * tests/torture.at: Respect M4sugar and M4sh macro name spaces. + +2001-08-20 Akim Demaille + + Let M4sh have its own diversions. + + * lib/autoconf/general.m4 (_m4_divert(BINSH), _m4_divert(REVISION)) + (_m4_divert(NOTICE)): Rename as... + * lib/m4sugar/m4msh.m4 (_m4_divert(BINSH), _m4_divert(HEADER-REVISION)) + (_m4_divert(HEADER-COMMENT)): these. + (_m4_divert(HEADER-COPYRIGHT), _m4_divert(HEADER-COPYRIGHT)): New. + (_m4_divert(NOTICE)): New, for Libtool. + * lib/autoconf/general.m4 (_m4_divert(PREPARE)): Remove, replaced + long ago with `_m4_divert(GROW)'. + (AC_COPYRIGHT, AC_REVISION, _AC_INIT_NOTICE): Adjust. + +2001-08-20 Akim Demaille + + * tests/base.at, tests/compile.at, tests/foreign.at, + * tests/m4sh.at, tests/m4sugar.at, tests/mktests.sh, + * tests/semantics.at, tests/suite.at, tests/tools.at, + * tests/torture.at: Ask Autotest mode, not Autoconf mode. + +2001-08-20 Akim Demaille + + * bin/autom4te.in (handle_output): Handle @__@. + +2001-08-20 Akim Demaille + + * lib/autoconf/autoconf.m4, lib/autoconf/oldnames.m4, + * lib/autotest/general.m4: Adjust the license. + +2001-08-17 Paul Eggert + + * doc/autoconf.texi (Function Portability): Mention snprintf, + following up on a suggestion by Kevin Ryde. + +2001-08-17 Akim Demaille + + * doc/install.texi, doc/autoconf.texi: Use `autoconf', not + `autoconf_manual', as texinfo.tex 2001-06-21.10 chokes on it. + +2001-08-17 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Refer to `$as_me.log', not + `$0.log' as for projects where testsuite is in src, we'd have + testsuite.log created in src. + +2001-08-17 Akim Demaille + + * bin/autom4te.in (&parse_args): Recognize --normalize. + +2001-08-17 Akim Demaille + + Start implementing the AC_CHECK_HEADER transition scheme. + + * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW) + (_AC_CHECK_HEADER_OLD, _AC_CHECK_HEADER_MONGREL): New. + (AC_CHECK_HEADER): Use them. + +2001-08-17 Akim Demaille + + * doc/autoconf.texi: Work around Texinfo buglets. + (Transformation Rules): One example is enough, users are expected + to have their brains on. And BTW, use DESTDIR. + (dvar): New macro. Use it. + +2001-08-17 Akim Demaille + + * doc/autoconf.texi (Writing testsuite.at) : Complete. + * lib/autotest/general.m4 (AT_INIT): Use the relative dir when + looking for ChangeLogs. + +2001-08-17 Akim Demaille + + * bin/autom4te.in: --normalize is a new option. + * bin/autoconf.in: Use it. + +2001-08-17 Akim Demaille + + * bin/Makefile.am, lib/Autom4te/Makefile.am, lib/autoconf/Makefile.am + * lib/autotest/Makefile.am, lib/m4sugar/Makefile.am: Add TAGS support. + +2001-08-16 Paul Eggert + + * doc/autoconf.texi, doc/install.texi: Put copyright notice at + start, not at end. + +2001-08-15 Akim Demaille + + * doc/Makefile.am (fu): New index, can't use fn because of defmac. + Use it. + +2001-08-15 Akim Demaille + + * doc/autoconf.texi (pr): New index. + (prindex, findex): Use, merge, and output them. + (Environment Variable Index, Output Variable Index) + (Preprocessor Symbol Index, Autoconf Macro Index, M4 Macro Index) + (Autotest Macro Index): Rename as... + (Environment Variables, Output Variables,Preprocessor Symbols) + (Autoconf Macros, M4 Macros, Autotest Macros): these. + * doc/install.texi: Use @command. + (Environment Variables): Rename as... + (Defining Variables): this. + +2001-08-15 Akim Demaille + + * doc/autoconf.texi (Function Portability): sprintf's return + value. + From Kevin Ryde. + +2001-08-15 Akim Demaille + + * Makefile.maint (CVS): New. + (local-check): Run changelog-check. last. + (alpha): Don't depend upon local-check, since... + (cvs-dist): depends upon it. + +2001-08-15 Tim Van Holder + + * tests/Makefile.am: Use a clean-local rule to remove + autom4te.cache (it's a directory, not a file. + * Makefile.am: Ditto (but maintainer-clean-local). + +2001-08-15 Akim Demaille + + * bin/autom4te.in (@m4_warning): New. + (&handle_m4): Use it. + * tests/m4sugar.at (m4_warn): Pass `-f' to autom4te to ensure the + warnings are issued at each run. + * tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): M4sugar + is in the src tree. + +2001-08-15 Akim Demaille + + * tests/atspecific.m4 (AT_CHECK_AUTOUPDATE): Perl is now required: + don't waste time running `autoupdate --version' works. + * tests/tools.at (autoupdating AC_PREREQ): Likewise. + +2001-08-13 Akim Demaille + + * doc/autoconf.texi (ma): Rename this index as... + (ac): this. + +2001-08-13 Akim Demaille + + * Makefile.am: Remove dead code and dead comments. + (pdf, html): New targets. + * doc/autoconf.texi (Using Autotest): New chapter. + * doc/Makefile.am (pdf): New targets. + (CLEANFILES): Adjust. + +2001-08-13 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): Log the start/stop dates and + duration of the test suite. + +2001-08-12 Alexandre Duret-Lutz + + * tests/semantics.at (AC_C_BIGENDIAN): Explicitelly save and load + endianness for comparison instead of relying on AT_CHECK_ENV. + +2001-08-11 Paul Eggert + + * doc/autoconf.texi, doc/install.texi: Add a copyright notice + to the INSTALL file. + +2001-08-11 Paul Eggert + + * NEWS: The autoconf manual now is distributed under the terms + of the GNU Free Documentation License. + + * doc/autoconf.texi: Switch from old style copyright notice to FDL. + Add an appendix "Copying This Manual" for the FDL. + + * doc/fdl.texi: New file, from + . + + * doc/Makefile.am (autoconf_TEXINFOS): Add fdl.texi. + +2001-08-10 Paul Eggert + + * AUTHORS, BUGS, ChangeLog, ChangeLog.0, ChangeLog.1, + ChangeLog.2, GNUmakefile, Makefile.maint, NEWS, README, + README-alpha, TODO, configure.ac, lib/autoconf/Makefile.am, + m4/atconfig.m4, m4/init.m4, m4/m4.m4, m4/missing.m4, + m4/sanity.m4, tests/README, tests/aclocal.m4, + tests/atspecific.m4, tests/base.at, tests/compile.at, + tests/foreign.at, tests/m4sh.at, tests/m4sugar.at, + tests/semantics.at, tests/suite.at, tests/tools.at, + tests/torture.at: Add copyright notice. + + * tests/mktests.sh: Update year in copyright notice. + +2001-08-12 Alexandre Duret-Lutz + + * tests/semantics.at (AC_C_BIGENDIAN): New test. + +2001-08-11 Alexandre Duret-Lutz + + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Handle ACTION-IF-TRUE, + ACTION-IF-FALSE, and ACTION-IF-UNKNOWN. + * doc/autoconf.texi (C Compiler Characteristics): Update + documentation for AC_C_BIGENDIAN. + +2001-08-11 Alexandre Duret-Lutz + + * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Guess endianness by grep'ing + magic values from an object file when cross-compiling. + Based on code by Guido Draheim . + +2001-08-10 Akim Demaille + + * bin/autom4te.in (&handle_output): Don't use `grep' with side + effects. + Suggested by Russ Allbery. + +2001-08-10 Ralf Corsepius + + * lib/autoconf/general.m4 (_AC_OUTPUT_SUBDIRS): Propagate the + current $prefix to the sub-configures. + +2001-08-09 Tim Van Holder + + * lib/autoconf/lang.m4: Ignore *.xSYM when looking for an executable + extension (needed on BeOS). Reported by Guido van Rossum. + +2001-08-09 Akim Demaille + + * bin/autom4te.in ($icache): Load it only if older than autom4te. + +2001-08-07 Akim Demaille + + * lib/autotest/general.m4 (AT_INIT): All the `at-*' are to be + removed. + (at-setup-line): Huh? Be a variable `at_setup_line', not a file. + No need to remove the files before and after the each test, before + each test and at the end of the suite is enough. + Display only the children `times', not the shell's. + If the test failed or was skipped, at-times is not available. + +2001-08-07 Akim Demaille + + Always produce testsuite.log, including when there are no + failures. This helps getting information on skipped tests, and + duration of the tests. Err, implement the latter btw. + + * lib/autotest/general.m4 (AT_INIT): Set up fd 6 for the log. + Dump information on the first run of each test. + (AT_CLEANUP): Create `at-times' containing the duration of the + test group. + +2001-08-07 Akim Demaille + + The use of `dumpstat' revealed that `len' was used although it + should not. m4_text_wrap was using it, but in the Autoconf world + where it is legal. Hence (i) test M4sh in its own world, not + Autoconf's, and (ii), ahem, fix the bug :) + + * lib/autotest/general.m4: Be sure the set good quotes, as tracing + does not like `' instead of []. + (AT_INIT): Forbid `^_?AT_'. + And don't output such tokens. + * tests/Makefile.am (CLEANFILES): Add `script', `script.s4g', + `script.as', and `autom4te.cache'. + Remove `empty' and `macro' which are no longer used. + * tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): New. + * tests/m4sugar.at: Use it. + * lib/m4sugar/m4sugar.m4: Use `m4_len' not `len'. + +2001-08-07 Akim Demaille + + * bin/autoconf.in, bin/autoheader.in: --force, -f is a new option. + +2001-08-07 Alexandre Duret-Lutz + + * bin/autom4te.in (handle_output): Typo in quadrigraph substitution. + +2001-08-04 Akim Demaille + + * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA, AC_FUNC_ERROR_AT_LINE) + (AC_FUNC_FSEEKO, AC_FUNC_OBSTACK): Use AC_LANG_IFELSE, not + AC_TRY_LINK. + * lib/autoconf/headers.m4 (AC_HEADER_MAJOR): Likewise. + * lib/autoconf/fortran.m4 (_AC_LANG_PROGRAM_C_F77_HOOKS) + (AC_F77_MAIN): Likewise. + +2001-08-04 Akim Demaille + + Don't rely on M4sugar outputting the patterns in files, since we + might process the output _without_ running m4, hence without these + files. + + * lib/m4sugar/m4sugar.m4 (m4_init): No need for `m4_tmpdir'. + * bin/autom4te.in (@Request::includes): Remove, unused. + (@Request::source): Rename as... + (@Request::input): this. + (@preselect): Add `m4_pattern_forbid' and `m4_pattern_allow'. + (&handle_output): Fetch the patterns from the traces. + `$forbidden' and `$allowed' are constant: use m//o. + (&handle_m4): M4sugar no longer wants `m4_tmpdir'. + (m4_pattern_forbid, m4_pattern_allow): Adjust for tracing only. + +2001-08-04 Akim Demaille + + `autoconf && autoheader' is sped up. Now, speed up `autoheader && + autoconf', i.e., in addition to caching traces, cache the output. + + * bin/autom4te.in (Request::cache): Rename as... + (Request::id): this. + ($cache, $icache, $tcache, $ocache): New. + (&handle_m4): Save M4 output in the cache instead of $tmp. + (&handle_output): Adjust. + (&up_to_date_p): Check that the output cache is up to date too. + (top level): Run `&handle_m4' iff force or the cache is invalid. + Run `&handle_output' if the output cache is more recent. + +2001-08-04 Akim Demaille + + * bin/autom4te.in ($force): New. + (&parse_args, &print_usage): -f, --force is a new option. + (&handle_output): CPP directives might have spaces after `#'. + (&parse_args): The first file only can be frozen. + +2001-08-04 Akim Demaille + + Don't let autom4te compute the `include' traces several times: + first check that the trace cache file is up to date, and then + compare its timestamp with that of the output. + + * bin/autom4te.in, bin/autoupdate.in, bin/autoscan.in: Normalize + the preamble. Don't require 5.005 as Autom4te::General does it, + and better yet (use `use', not `require'!). + * lib/Autom4te/Struct.pm: Rename the last occurrences of + Class::Struct as Autom4te::Struct. + * lib/Autom4te/General.pm (File::stat): Use it. + (&mtime): New, export it. + * bin/autom4te.in: Use it. + Declare `$req' is invalid if it is outdated. + Don't declare it valid before saving it if something went wrong. + +2001-08-04 Akim Demaille + + Autom4te shall not encode Autoconf data, and preselecting traces + must be proposed to the users. + + * bin/autom4te.in (@required_trace): Remove. + (@preselect): New. + (&parse_args, &print_usage): -p, --preselect is a new option. + (&up_to_date_p): Adjust. + * bin/autoconf.in: Preselect some Autoconf macros. + +2001-08-04 Akim Demaille + + * tests/tools.at (autoconf --trace: user macros): Check traces on + macros invoked without arguments, and macros invoked with multiple + lines arguments. + +2001-08-03 Alexandre Duret-Lutz + + * bin/autom4te.in (handle_traces): Fix rewriting of traces without + arguments. + +2001-08-03 Akim Demaille + + * bin/autoconf.in ($@): Work around the usual sh bug. + From Nicolas Joly. + +2001-08-03 Akim Demaille + + Clean up the handling of the M4 builtins tracing exception. + + * bin/autom4te.in (Request::request): Don't complete M4 builtins + trace requests. + (@m4_builtins): Rename as... + (@m4_builtin): this. + (%m4_builtin_alternate_name): New. + (&parse_args): Complete the trace requests with alternate names. + (&handle_traces): Hence no longer do it here. + (&trace_requests): Remove, unused. + +2001-08-03 Akim Demaille + + * doc/autoconf.texi (Redefined M4 Macros): Document m4_exit, + m4_if, and m4_wrap. + +2001-08-03 Akim Demaille + + * lib/m4sugar/m4sugar.m4 (m4_init): Also forbid `_m4_*' tokens. + (m4_divert_pop): Dump the whole diversion stack when a diversion + mismatch happens. + * bin/autom4te.in (&handle_output): Remember of the first + occurrence of a possibly undefined macro, not the last. + Complain about the possibly undefined macros in the same order as + the appear in the output. + * lib/autoconf/Makefile.am (autoconf.m4f): List its dependencies. + * tests/tools.at (autoconf: forbidden tokens, basic) + (autoconf: forbidden tokens, exceptions): No longer sort + autoconf's stderr, as it is now deterministic. + Check that `dnl' is caught. + +2001-08-01 Akim Demaille + + * configure.ac: Bump to 2.52c. + +2001-08-01 Akim Demaille + + Version 2.52b. + + * lib/Autom4te/Makefile.am (perllibdir): s/Autoconf/Autom4te/. + +2001-08-01 Akim Demaille + + Version 2.52a. + +2001-08-01 Akim Demaille + + * lib/Autom4te/General.pm: Use `carp' and `croak', not `warn' and + `die'. + (&END): New. + * bin/autoconf.in, bin/autom4te.in, bin/autoupdate.in: Remove your + `END', as `Autom4te::General::END' will be triggered. + * bin/autoupdate.in, bin/autoscan.in: Improve error messages accuracy. + * bin/autoupdate.in (File::Compare, File::Copy): Use them instead of + system to run `mv', `rm', and `cmp'. + +2001-08-01 Akim Demaille + + * lib/Autom4te/General.pm (&unique): New. + * bin/autoscan.in (&output): Use it to issue trace requests once. + +2001-08-01 Akim Demaille + + * lib/Autom4te/General.pm: New. + * bin/autom4te.in (Autom4te::General): Use it. + ($me, $tmp, $verbose, $debug, &mktmpdir, &verbose, &xsystem) + (&find_configure_ac, &find_slave): Remove. + * bin/autoscan.in: Likewise. + * bin/autoupdate.in: Likewise. + +2001-08-01 Akim Demaille + + * autoconf.in, autom4te.in, autoscan.in, ifnames.in, + * autoheader.in, autoreconf.in, autoupdate.in: Move to... + * bin: here, new directory. + * lib/Autoconf: Rename as... + * lib/Autom4te: this, to please case insensitive junkie OSes. + +2001-08-01 Akim Demaille + + * autom4te.in ($m4): Handle the --nesting-limit. + * autoconf.in (M4): Remove. + +2001-08-01 Akim Demaille + + * autoconf.in ($AWK): Remove, no longer used. + * test/tools.at: Use AT_CHECK_AUTOCONF. + (AWK portability): Remove, for autoconf no longer uses AWK. + (Syntax of the Perl scripts): New. + * configure.ac: autoconf no longer needs an AWK with a good + regexp engine. + Use a static test on AC_PACKAGE_VERSION. + * autom4te.in (&up_to_date_p): Output depends on the arguments. + * lib/autoconf/Makefile.am: Ship version.m4, maintainer file. + * tests/atconfig.in (PERL): New. + +2001-08-01 Akim Demaille + + * lib/autoconf/lang.m4 (AC_LANG(C), AC_LANG_C, _AC_LANG_ABBREV(C)) + (AC_LANG(C++), AC_LANG_CPLUSPLUS, _AC_LANG_ABBREV(C++)) + (AC_LANG_SOURCE(C), AC_LANG_PROGRAM(C), AC_LANG_CALL(C)) + (AC_LANG_FUNC_LINK_TRY(C), AC_LANG_BOOL_COMPILE_TRY(C)) + (AC_LANG_INT_SAVE(C), _AC_ARG_VAR_CPPFLAGS, _AC_ARG_VAR_LDFLAGS) + (AC_LANG_PREPROC(C), _AC_PROG_PREPROC_WORKS_IFELSE, AC_PROG_CPP) + (AC_LANG_COMPILER(C), ac_cv_prog_gcc, AC_PROG_CC, _AC_PROG_CC_G) + (AC_PROG_GCC_TRADITIONAL, AC_PROG_CC_C_O, AC_LANG_PREPROC(C++)) + (AC_PROG_CXXCPP, AC_LANG_COMPILER(C++), ac_cv_prog_gxx) + (AC_PROG_CXX, _AC_PROG_CXX_G, _AC_PROG_CXX_EXIT_DECLARATION) + (AC_PROG_CC_STDC, AC_C_CROSS, AC_C_CHAR_UNSIGNED, AC_C_LONG_DOUBLE) + (AC_C_BIGENDIAN, AC_C_INLINE, AC_C_CONST, AC_C_VOLATILE) + (AC_C_STRINGIZE, AC_C_PROTOTYPES): Move to... + * lib/autoconf/c.m4: here, new file. + + * lib/autoconf/lang.m4 (AC_LANG(Fortran 77), AC_LANG_FORTRAN77) + (_AC_LANG_ABBREV(Fortran 77), AC_LANG_SOURCE(Fortran 77)) + (AC_LANG_PROGRAM(Fortran 77), AC_LANG_CALL(Fortran 77)) + (AC_LANG_PREPROC(Fortran 77), AC_LANG_COMPILER(Fortran 77)) + (ac_cv_prog_g77, AC_PROG_F77, _AC_PROG_F77_G, AC_PROG_F77_C_O) + (_AC_PROG_F77_V_OUTPUT, _AC_PROG_F77_V, AC_F77_LIBRARY_LDFLAGS) + (AC_F77_DUMMY_MAIN, _AC_LANG_PROGRAM_C_F77_HOOKS, AC_F77_MAIN) + (_AC_F77_NAME_MANGLING, AC_F77_NAME_MANGLING, AC_F77_WRAPPERS) + (AC_F77_FUNC): Move to... + * lib/autoconf/fortran.m4: here, new file. + +2001-08-01 Akim Demaille + + * acfunctions.m4: Rename as... + * lib/autoconf/functions.m4: this. + * acgeneral.m4: Rename as... + * lib/autoconf/general.m4: this. + * acheaders.m4: Rename as... + * lib/autoconf/headers.m4: this. + * aclang.m4: Rename as... + * lib/autoconf/lang.m4: this. + * acoldnames.m4: Rename as... + * lib/autoconf/oldnames.m4: this. + * acspecific.m4: Rename as... + * lib/autoconf/specific.m4: this. + * actypes.m4: Rename as... + * lib/autoconf/types.m4: this. + * autoconf.m4: Rename as... + * lib/autoconf/autoconf.m4: this. + + * m4sugar.m4: Rename as... + * lib/m4sugar/m4sugar.m4: this. + * m4sh.m4: Rename as... + * lib/m4sugar/m4sh.m4: this. + + * tests/atgeneral.m4: Rename as... + * lib/autotest/general.m4: this. + + * acfunctions: Rename as... + * lib/autoscan/functions: this. + * acheaders: Rename as... + * lib/autoscan/headers: this. + * acidentifiers: Rename as... + * lib/autoscan/identifiers: this. + * aclibraries: Rename as... + * lib/autoscan/libraries: this. + * acmakevars: Rename as... + * lib/autoscan/makevars: this. + * acprograms: Rename as... + * lib/autoscan/programs: this. + +2001-08-01 Akim Demaille + + * doc/autoconf.texi: Moving/deleting open files is not portable. + Portability issues for `.' (source), and more information about sed. + +2001-07-25 Steven G. Johnson + + * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Ignore -libmil (on Solaris), + which has a special meaning and is not a reference to libibmil.a. + Reported by Matteo Frigo. + +2001-07-25 Pavel Roskin + + * autom4te.in (mktmpdir): Strip trailing newline from mktemp + output. + +2001-07-25 Akim Demaille + + * autoconf.in: Try to define the variables before using them. + * autom4te.in ($perllibdir): Use `$autom4te_perllibdir' as envvar + instead of `$perllibdir'. + * tests/atconfig.in ($autom4te_perllibdir): Export it. + +2001-07-25 Akim Demaille + + * autoconf.in (ac_LF_and_DOT): Remove, unused. + +2001-07-24 Akim Demaille + + Let autoconf use autom4te for traces. + + * autoconf.in ($task, task trace): Remove, merely pass --trace to + autom4te. + * autoheader.in: Don't pass `-' to autoconf, rather, a tmp file. + (Because I found no way for autom4te to accept `-'). + * autom4te.in (&Request::request): Beware of M4 builtins. + (END): Don't try to remove the content of an empty dir. + (&parse_args): Default is `$f:$l:$n:$%', not `$f:$l:$n:$*'. + (&handle_output): Set a default value to `$forbidden'. + * autoupdate.in (&verbose, &xsystem): New, from autom4te.in. + ($autoconf): Pass --debug and --verbose. + * tests/atspecific.m4 (AT_CHECK_AUTOCONF): Clean up autom4te's + cache. + +2001-07-24 Akim Demaille + + Let autoconf use autom4te to create configure. + + * autoconf.in ($automate): New var. + (task script): Use autom4te. + * autom4te.in (File::Spec): Use it. + (&find_file): New. + (&parse_args): --warning is -W, not -w. + Find the top level files. + (&handle_m4): Pass the warnings flags. + Don't report verbosely m4's failures, unless requested. + (&handle_output): Don't complain for forbidden tokens in comments. + Be sure to report all the forbidden tokens within a single line. + (&trace_format_to_m4): Preserve `$_'. + (&handle_traces): Sort the output macros. + (&up_to_date_p): Find the files before trying to get its time stamp. + +2001-07-24 Akim Demaille + + * Makefile.am: Ship, build and install Autom4te. + (SUBDIRS): Add lib. + * lib/Autoconf/Struct.pm: New, from Automake 1.5. + * configure.in: Require Perl. + * man/autom4te.in: New. + +2001-07-19 Paul Eggert + + * doc/autoconf.texi (Cache Checkpointing): Use AC_MSG_ERROR in + example, rather than (exit 1); exit (which isn't portable). + +2001-07-18 Akim Demaille + + Version 2.52. + +2001-07-18 Akim Demaille + + The C-Fortran 77 hooks are available only once AC_F77_DUMMY_MAIN + was run, while they are needed also when it is expanded. + Reported by Nicolas Joly. + + * aclang.m4 (AC_F77_DUMMY_MAIN): Define _AC_LANG_PROGRAM_C_F77_HOOKS. + (AC_LANG_PROGRAM(C)): Use it instead of depending upon + AC_F77_DUMMY_MAIN being expanded. + +2001-07-18 Akim Demaille + + * configure.in: Bump to 2.51a. + +2001-07-17 Akim Demaille + + Version 2.51. + +2001-07-17 Akim Demaille + + * aclang.m4 (AC_F77_DUMMY_MAIN): Let the interface be more + Autoconfy: $1 = action-if-found, $2 = action-if-not-found. + +2001-07-17 Akim Demaille + + The runtime test for AC_FUNC_GETPGRP fails when prototypes are + used. Well, then use the prototypes when you can, and runtime as + a last resort. + Reported by Artur Frysiak + + * acfunctions.m4 (_AC_FUNC_GETPGRP_TEST): New. + (AC_FUNC_GETPGRP): Use it. + First try to compile with 0-ary or 1-ary calls. + +2001-07-17 Akim Demaille + + * actypes.m4 (_AC_CHECK_TYPE_REPLACEMENT_TYPE_P): `foo_t' is a + replacement type. + From Paul Eggert. + +2001-07-17 Akim Demaille + + * Makefile.maint: Sync. with cppi 1.10. + +2001-07-17 Akim Demaille + + * aclang.m4 (AC_LANG_PROGRAM(C)): Output F77_DUMMY_MAIN only when + AC_F77_DUMMY_MAIN has been run. + From Pavel Roskin and Steven G. Johnson. + +2001-07-17 Akim Demaille + + * configure.in: Rename as... + * configure.ac: this. + +2001-07-17 Akim Demaille + + * Makefile.am (INSTALL.txt): Don't use $@ and $< in non suffix + rules. + From Marc Espie. + * Makefile.maint (release-archive-dir): Rename as... + (release_archive_dir): this, so that it can be specialized in + Makefile. + +2001-07-14 Akim Demaille + + * configure.in: Bump to 2.50d. + +2001-07-14 Akim Demaille + + Version 2.50c. + * Makefile.maint (alpha): Typo. + +2001-07-14 Akim Demaille + + * doc/autoconf.texi (Limitations of Make): Macro names and underscore. + +2001-07-14 Akim Demaille + + * config/config.guess, config/config.sub, config/texinfo.tex + * doc/standards.texi, doc/make-stds.texi: Update. + +2001-07-14 Akim Demaille + + * Makefile.maint (cvs-check, cvs-tag-check, cvs-diff-check): New. + +2001-07-14 Akim Demaille + + * Makefile.maint (maintainer-check): Rename as... + (maintainer-distcheck): this. + (changelog-check, static-check): New. + Use them. + +2001-07-14 Kevin Ryde + + * doc/autoconf.texi (C++ Compilers Characteristics): Last resort + for CXX is g++, not gcc. + +2001-07-14 Akim Demaille + + * doc/autoconf.texi (Files): New subsection. + +2001-07-14 Akim Demaille + + * doc/autoconf.texi (C Compiler, Fortran 77 Compiler): Be subsections + of... + (Generic Compiler Characteristics): this. + (C++ Compiler): New subsection. + +2001-07-14 Akim Demaille + + * autoscan.in: Use IO::File. + Adjust all the routines to use it. + ($log): New file (autoscan.log). + (output): Dump detailed logs into $log, and a shortened version to + stderr. + (&scan_makefile): Refine the regexp catching tokens in the code. + * doc/autoconf.texi (autoscan Invocation): Document `autoscan.log' + and the `configure.ac' checking feature. + +2001-07-12 Akim Demaille + + For some AWK, such as on HPUX 11, `xfoo' does not match `foo|^bar'. + Reported by Michael Elizabeth Chastain. + + * autoconf.in: Refuse such AWK. + * configure.in: Likewise. + * Makefile.am (acversion.m4): Do not use move-if-change this file + has dependencies. + * doc/autoconf.texi (Fortran 77 Compiler): Some typos. + +2001-07-10 Jens Petersen + + * autoscan.in (&scan_makefile): Improve programs regexp to parse + things like "g++", "file.c" and "some-conf" as tokens. + (&scan_file): Match C++ files extensions. + If the filename extension is C++ then ask for c++. + +2001-07-05 Steven G. Johnson + + * aclang.m4 (AC_F77_DUMMY_MAIN): Use AC_TRY_LINK, not + AC_TRY_LINK_FUNC, to check whether defining a dummy + main-like routine is needed for linking with F77 libs. + +2001-07-05 Pavel Roskin + + * aclocal.m4 (_AC_PROG_CXX_EXIT_DECLARATION): Remove conftest* + after using break. + (_AC_PROG_F77_V_OUTPUT): Remove conftest*, not conftest.* after + linking. + +2001-07-05 Akim Demaille + + * Makefile.am (move_if_change): New. Use it instead of `mv'. + (acversion.m4): Name it `$(srcdir)/acversion.m4' to ease broken + Makes' lives. + Reported by Nicolas Joly. + +2001-07-04 Akim Demaille + + * acgeneral.m4 (_AC_RUN_IFELSE): Remove conftest.o when cleaning + up. + * acfunctions.m4 (AC_FUNC_WAIT3): Use `break' to silent some + warnings from compilers. + * aclang.m4 (_AC_LANG_COMPILER_GNU): Log the version information + for all the compilers, not only GNU. Hence move from here... + (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): to here. + +2001-07-04 Akim Demaille + + * acfunctions.m4 (AC_FUNC_STRTOD, AC_FUNC_STRERROR_R) + (AC_FUNC_STRCOLL, AC_FUNC_WAIT3): Use AC_RUN_IFELSE and + AC_COMPILE_IFELSE. + +2001-07-04 Akim Demaille + + * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Actually apply + the ``strings.h'' change claimed below. + +2001-07-04 Akim Demaille + + * aclang.m4 (_AC_LANG_COMPILER_GNU): s/-dumpspecs/-v/. + +2001-07-04 Akim Demaille + + * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Include + strings.h if usable with string.h. + Suggested by Paul Eggert. + +2001-07-04 Akim Demaille + + * autoscan.in (&scan_file): Skip FILE if there is FILE.in. + From Jens Petersen. + +2001-07-03 Akim Demaille + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Specify CONFIG_FILES + etc. in the log. + +2001-07-03 Akim Demaille + + * acheaders.m4 (AC_CHECK_HEADER): When INCLUDES are set, use the + compiler, not the preprocessor. + * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): No longer use + dedicated code to check for inttypes.h, as AC_CHECK_HEADERS does + the right thing. + * Makefile.am (.m4.m4f): Emphasize M4 error messages and fail + earlier if there are. + +2001-07-03 Akim Demaille + + * autoscan.in ($initfile): Remove. + (&find_file): Rename as... + (&scan_file): this. + Immediately scan the current file, instead of gathering them, and + later having them handled by &scan_files. + (&scan_files): Merely invoke Find::File. + Adjust. + +2001-07-02 Akim Demaille + + * autoscan.in: Formatting changes, matching the invocation order. + (File::Find): Use it instead of Perl 4's `find.pl'. + (&wanted): Rename as... + (&find_file): this. + +2001-07-01 Pavel Roskin + + * aclang.m4 (AC_F77_DUMMY_MAIN): Remove conftest* after using + break in the argument to AC_TRY_LINK_FUNC. + (AC_F77_MAIN): Remove conftest* after using break in the + argument to AC_TRY_LINK. + +2001-07-01 Steven G. Johnson + + Add alternate 'main' routine detection for linking C/C++ with Fortran, + fixing link failures for e.g. AC_F77_WRAPPERS on NetBSD. + + * aclang.m4 (AC_F77_DUMMY_MAIN): New macro to detect whether a + dummy alternate main is required even if the user provides her own + 'main'. + (AC_F77_MAIN): New macro to detect whether it is possible to + provide an alternate 'main' function name, using the 'main' from + the Fortran libraries. + (AC_LANG_PROGRAM(C)): Use F77_DUMMY_MAIN, if it is defined, so that + cross-language link tests can be performed successfully. + (_AC_F77_NAME_MANGLING): Require AC_F77_DUMMY_MAIN. Also put $FLIBS + after $LIBS, for consistency; this should be the general rule since + the user may want to link to Fortran libraries that require $FLIBS. + * doc/autoconf.texi: Document AC_F77_DUMMY_MAIN and AC_F77_MAIN. + +2001-06-29 Pavel Roskin + + * atgeneral.m4 (AT_CHECK): Add a newline to the end of + at-stdout and at-stderr instead of removing the newline + from the echo output, which is not guaranteed to work. + +2001-06-28 Jens Petersen + + * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): Only add declaration to + confdefs.h when non-zero. + +2001-06-28 Akim Demaille + + * configure.in: Bump to 2.50c. + +2001-06-26 Akim Demaille + + Version 2.50b. + +2001-06-26 Akim Demaille + + Version 2.50a. + +2001-06-25 Pavel Roskin + + * tests/atspecific.m4 (AT_CHECK_MACRO): Accept one more + argument, AUTOCONF-FLAGS. + * tests/mktests.sh (update_exclude_list): Add + AC_SYS_RESTARTABLE_SYSCALLS and AC_FUNC_WAIT3. + * tests/semantics.at: Test AC_SYS_RESTARTABLE_SYSCALLS and + AC_FUNC_WAIT3 with "-W no-obsolete". + +2001-06-25 Akim Demaille + + * tests/foreign.at (libtool): Fix the `libtoolize --version' decoding. + +2001-06-25 Akim Demaille + + * autoscan.in (%macro): Now maps from word to list of macros. + (&init_tables): Die when a word which is already handled by + explicit macros is mapped to the default macro. + (&print_unique): Remove, inlined in... + (&output_kind): here. + (File::Basename): Use it. + (&output): Sort the CONFIG_FILES. + * acheaders: Normalize. + * acfunctions: Likewise. + +2001-06-25 Akim Demaille + + * aclang.m4 (_AC_LANG_COMPILER_GNU): If GNU, dump the compiler + characteristics in the logs. + Suggested by Mo DeJong. + +2001-06-24 Akim Demaille + + * acfunctions.m4 (AM_FUNC_ERROR_AT_LINE, AM_FUNC_FNMATCH) + (AM_FUNC_MKTIME, AM_FUNC_OBSTACK, AM_FUNC_STRTOD): Reactivated. + * doc/autoconf.texi (Autoconf 2.13): New section. + +2001-06-24 Akim Demaille + + * autoconf.in (Task traces): Separate the error messages from the + traces to improve robustness. + +2001-06-23 Akim Demaille + + * tests/torture.at (AC_ARG_VAR): Make it a single test instead of + three as failures are unlikely, and speed matters. + +2001-06-23 Akim Demaille + + * doc/autoconf.texi (Redefined M4 Macros): New. + +2001-06-23 Akim Demaille + + * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Consider + inttypes.h is missing if it conflicts with sys/types.h, as on IRIX + 5.3. + +2001-06-23 Paolo Bonzini + + * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Defer parsing of + config.status targets to after the evaluation of the INIT-CMDS. + Double quote config.status targets (used to be single quoted). + +2001-06-23 Akim Demaille + + * tests/torture.at (CONFIG_FILES, HEADERS, LINKS and COMMANDS): + Check the content of the created file. + Check the ./config.status command line invocation. + +2001-06-23 Akim Demaille + + * tests/foreign.at (Libtool): Reject prehistoric versions. + +2001-06-23 Akim Demaille + + * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Try to be robust to + preexisting files matching a.*. + +2001-06-23 Akim Demaille + + * acgeneral.m4 (_AC_ARG_VAR_VALIDATE): Output error messages on + stderr. + * doc/autoconf.texi (AC_ARG_VAR): Update. + +2001-06-21 Akim Demaille + + * acgeneral.m4 (_AC_ARG_VAR_VALIDATE): Die instead of warning when + precious variables have changed. + * tests/torture.at (AC_ARG_VAR): Adjust. + +2001-06-21 Akim Demaille + + ./configure --program-suffix=foo produces `transform=s,$$,foo,;', + but some sed choke on multiple `;', and other tools (e.g., + Automake), include the separator themselves. + + * acgeneral.m4 (AC_ARG_VAR): Be sure not to leave extra `;'. + +2001-06-19 Tim Van Holder + + * doc/autoconf.texi (Functions Portability): Rename as... + (Function Portability): this. + (Function Portability): Document potential problems with unlink(). + +2001-06-19 Paul Eggert + + * NEWS, doc/autoconf.texi: Document quadrigraphs. + +2001-06-18 Akim Demaille + + * acfunctions.m4 (AC_FUNC_FORK): Fix typos. + +2001-06-18 Ruediger Kuhlmann + + * acfunctions.m4: (AC_FUNC_VFORK) rename as... + (_AC_FUNC_VFORK): this. + Remove AC_DEFINEs and don't guess cross-compilation values. + (_AC_FUNC_FORK): New, check whether fork() isn't just a stub. + (AC_FUNC_FORK): New, use _AC_FUNC_VFORK and _AC_FUNC_FORK to + define HAVE_WORKING_FORK, HAVE_WORKING_VFORK; and vfork to fork if + vfork doesn't work. + Guess values if cross-compiling, but warn. + * acfunctions: Add AC_FUNC_FORK. + * doc/autoconf.texi: Document AC_FUNC_FORK. Give example to define + and vfork appropriately. + +2001-06-18 Akim Demaille + + * doc/autoconf.texi (Functions Portability): New section. + +2001-06-18 Akim Demaille + + * autoconf.in (M4): Pass --nesting-limit=1024, unless already set + in $M4. + Suggested by Andreas Schwab. + +2001-06-18 Akim Demaille + + * acfunctions.m4 (AC_FUNC_CHOWN, AC_FUNC_CLOSEDIR_VOID) + (AC_FUNC_GETPGRP, AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK) + (AC_FUNC_MMAP, AC_FUNC_SELECT_ARGTYPES, _AC_FUNC_STAT) + (AC_FUNC_UTIME_NULL): Use AC_INCLUDES_DEFAULT. + Don't use AC_TRY_RUN, which double quotes, prefer AC_RUN_IFELSE, + and either AC_LANG_SOURCE or AC_LANG_PROGRAM. + (AC_FUNC_CLOSEDIR_VOID): Protect C++ from `int closedir ();' (or + the converse). + +2001-06-18 Akim Demaille + + * doc/autoconf.texi (ms): New index. + (Macro Index): Rename as... + (Autoconf Macro Index): this. + (M4 Macro Index): New appendix. + (Programming in M4): New chapter. + Define M4sugar, M4sh, m4_pattern_forbid, and m4_pattern_allow. + (Quoting): Rename as... + (M$ Quotation): this. + Be part of `Programming in M4). + +2001-06-18 Nicolas Joly + + * tests/torture.at (AC_ARG_VAR): Set variables and export them + in separate statements for compatibility with Tru64 v5.1. + +2001-06-17 Akim Demaille + + * acgeneral.m4 (_AC_ARG_VAR_VALIDATE): Be sure to cache the + current values of the precious variables, not the previously + cached values. + Pass precious variables which are set to config.status. + * doc/autoconf.texi (Setting Output Variables): Document AC_ARG_VAR. + * tests/torture.at (AC_ARG_VAR): New. + +2001-06-15 Paul Eggert + + * doc/autoconf.texi: Move AC_FUNC_WAIT3 and + AC_SYS_RESTARTABLE_SYSCALLS to the obsolete section, + and explain why and how to replace them. + * acfunctions.m4 (AC_FUNC_WAIT3): Warn as obsolete. + * acspecific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise. + +2001-06-15 Akim Demaille + + `build_alias', `host_alias', and `target_alias' are not AC_SUBST'd. + Reported by Bruno Haible. + + * acgeneral.m4 (AC_ARG_VAR): Move the AC_SUBST, from here... + (_AC_ARG_VAR_PRECIOUS): to here. + +2001-06-15 Pavel Roskin + + * acheaders.m4 (_AC_CHECK_HEADER_DIRENT): Instead of defining + an unused pointer use cast to this type and `if' statement to + avoid warnings from the compiler. + (AC_HEADER_TIME): Likewise. + * actypes.m4 (AC_CHECK_MEMBER): s/foo/ac_aggr/. Use the member + in `if' statement to avoid warnings from the compiler. Declare + ac_aggr static to avoid the need to initialize it. + +2001-06-14 Akim Demaille + + * doc/autoconf.texi (Portable Shell): Move to follow `Writing + Macros'. + +2001-06-13 Akim Demaille + + * m4/missing.m4, config/missing: Updated to Automake 1.4g's. + Suggested by Alexander Mai. + +2001-06-13 Akim Demaille + + * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Guard + sys/types.h and sys/stat.h, and check for them. + +2001-06-13 Akim Demaille + + * acheaders.m4 (AC_CHECK_HEADER, AC_CHECK_HEADERS): Support $4 = + INCLUDES. + +2001-06-12 Maciej W. Rozycki + + * acspecific.m4 (AC_PATH_XTRA): Check if linking against libX11 + succeeds and only try adding libdnet upon a failure. + +2001-06-12 Akim Demaille + + * autoscan.in (&output_kind): Output the comment only if it exists. + (%kind_comment): Add entry for `programs'. + (&output_programs): Use &output_kind. + (&output_functions, &output_identifiers, &output_headers) + (&output_programs): Inline, and remove. + +2001-06-12 Akim Demaille + + * autoscan.in (%kind_comment): New. + (output_kind): New. + (output_functions, output_identifiers, output_headers): Use it. + +2001-06-12 Akim Demaille + + * autoscan.in (&print_unique): Take `$kind' and `$word' as + arguments, to factor indirections into `%macro' and `%used'. + (%generic_macro): Fix a typo. + +2001-06-12 Akim Demaille + + * aclibraries: New. + * autoscan.in (@kinds): Add `libraries'. + Use `@kinds' instead of hard coded lists. + (%programs, %headers, %identifiers, %makevars, %libraries, %functions): + Remove, replaced by... + (%used): this. + +2001-06-12 Akim Demaille + + * autoscan.in (%functions_macros %headers_macros) + (%identifiers_macros %programs_macros %makevars_macros): Remove, + replaced by... + (%macro): New. + +2001-06-11 Raja R Harinath + + * aclang.m4 (AC_NO_EXECUTABLES): Override + _AC_COMPILER_EXEEXT_WORKS, not _AC_LANG_COMPILER_WORKS. + +2001-06-11 Akim Demaille + + * aclang.m4 (AC_NO_EXECUTABLES): Define the macros with their + trailing new line. + Reported by Andreas Schwab. + +2001-06-11 Akim Demaille + + * Makefile.am, Makefile.maint: Typos. + +2001-06-09 Akim Demaille + + * doc/autoconf.texi (Here-Documents): New section, gathering + documentation about here-documents. + Use `href', not `uref', and other changes. + +2001-06-09 Akim Demaille + + * doc/autoconf.texi (Portable Shell Programming): Promoted as a + chapter. + +2001-06-09 Akim Demaille + + * doc/autoconf.texi (Limitations of Builtins): Complete the + description of the here-docs penalties with Alexandre Oliva's + explanations. + +2001-06-01 Paul Eggert + + * doc/autoconf.texi: Talk about here documents and speedups. + Do not use "echo" on arbitrary strings. + Spell "here-documents" consistently with the standard. + +2001-06-09 Akim Demaille + + * doc/autoconf.texi (Concept Index): Introduce it. + Regenerate the menus. + +2001-06-09 Akim Demaille + + * Makefile.maint, GNUmakefile: New, from Jim Meyering. + * config/prev-version.txt: New. + * config/move-if-change: New, for GNU libc. + +2001-06-06 Pavel Roskin + + * tests/atgeneral.m4 (AT_INIT): Remove "/bin/sh" after $SHELL. + +2001-06-06 Akim Demaille + + * acgeneral.m4 (AC_CHECK_LIB): Fix the cache var name to work + properly when $1 is not a literal. + Fixes PR Autoconf/187, reported by Bram Moolenaar. + +2001-06-06 Akim Demaille + + Invoking AC_COPYRIGHT before AC_INIT fails. + + * Makefile.am (.m4.m4f): Pass --fatal-warnings to m4. + * acgeneral.m4 (_m4_divert(VERSION_FSF)) + (_m4_divert(VERSION_USER)): New. + (AC_COPYRIGHT): $2 is the diversion to use. + (_AC_INIT_COPYRIGHT): Use the FSF diversion. + (AC_INIT): Remove dead comments as now it's commutative. + +2001-06-06 Akim Demaille + + * tests/semantics.at (AC_CHECK_LIB): Strengthen to reflect + PR autoconf/187. + +2001-06-05 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PARSE_ARGS): `prefix' and `exec_prefix' + can be empty. + `*dir' variables cannot be NONE. + Reported by Mark Kettenis. + +2001-06-05 Paul Eggert + + * doc/autoconf.texi: Fix references to Solaris and SunOS versions. + +2001-06-04 Akim Demaille + + * acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET) + (AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP) + (AC_TR_SH): Move as... + * m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET) + (AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP) + (AS_TR_SH): these. + (_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE) + (_AS_TR_SH_PREPARE): New. + (AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE. + * tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified. + +2001-06-02 Akim Demaille + + * Makefile.am (.m4.m4f): Pass the options first. + Fixes PR autoconf/182. + +2001-06-02 Nathan Sidwell + + GNU getopt, when POSIXLY_CORRECT does not permute options and + arguments. So pass the options first. + Fixes PR autoconf/184. + + * autoconf.sh (m4_prefiles, m4f_prefiles): New variables. + (run_m4): Remove files. + (run_m4f): Remove. + Update remainder of script to use them. + (for warning in): Do not use a literal comma as it will not be + split by IFS. + +2001-06-02 Christian Marquardt + + * aclang.m4 (AC_PROG_F77): Add Fujitsu's "frt" to the list of + Fortran compilers to check. + (_AC_PROG_F77_V): Add '-###' as a possible option to print + information on library and object files. + (AC_PROG_CXX): Add Fujitsu's "FCC" to the list of C++ compilers + to check. + +2001-06-02 Akim Demaille + + * autom4te.in (Request::@request): Declare with `vars', not `my', + as it prevents updates via `do FILENAME'. + +2001-06-02 Akim Demaille + + * configure.in (standards_texi): Remove, dead code. + +2001-06-02 Akim Demaille + + * autom4te.in: New. + +2001-06-02 Pavel Roskin + + * acgeneral.m4 (_AC_INIT_PREPARE): Don't rely on $? in the traps + for signals other than 0 - exit with code 1. + * m4sh.m4 (AS_TMPDIR): Likewise. + * autoconf.in: Likewise. Also don't rely on exit == exit $?. + * autoheader.in: Likewise. + * autoreconf.in: Likewise. + * tests/torture.at (Signal handling): New test for the above. + +2001-06-01 Akim Demaille + + * m4sugar.m4 (m4_defn, m4_undefine, m4_popdef): Clarify the error + message. + +2001-05-31 Akim Demaille + + * acfunctions, acheaders, acidentifiers, acmakevars, acprograms: + Add copyright and comments. + * acheaders: Add stdint.h. + Suggested by Paul Eggert. + +2001-05-31 Akim Demaille + + * atgeneral.m4 (AT_INIT): Use $SHELL. + * atspecific.m4 (AT_CHECK_DEFINES): Skip HAVE_STDINT_H. + +2001-05-31 Akim Demaille + + * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Include + stdint.h. + From Paul Eggert and Lars Hecking. + +2001-05-31 Akim Demaille + + * tests/base.at: Adjust line numbers in error messages. + +2001-05-31 Akim Demaille + + * tests/base.at, tests/m4sh.at: When using AC_PLAIN_SCRIPT be sure + to emit the bangshe line. + Reported by David Carter. + +2001-05-30 Steven G. Johnson + + * aclang.m4 (AC_PROG_F77): Add Compaq's "fort" to the list of + Fortran (95) compilers to check. + +2001-05-29 Alexandre Duret-Lutz + + * doc/autoconf.texi (Introduction, Pointers): Update the Autoconf + Macro Archive URL. + +2001-05-23 Pavel Roskin + + * aclang.m4 (AC_PROG_CPP): Use `break' instead of `break 2' since + _AC_PROG_PREPROC_WORKS_IFELSE expands arguments outside the loop. + (AC_PROG_CXXCPP): Likewise. + +2001-05-22 Akim Demaille + + * config: New directory. + * configure.in: AC_CONFIG_AUX_DIR it. + * tests/atspecific.m4 (AT_CONFIGURE_AC): Adjust. + +2001-05-22 Akim Demaille + + * autoconf.in, autoreconf.in, autoheader.in, autoscan.in, ifnames.in, + * autoupdate.in: Specify the Emacs mode. + * acversion.m4.in: Rename as... + * acversion.m4: this. + * tests/Makefile.am (CLEANFILES): More garbage. + +2001-05-22 Akim Demaille + + * autoconf.sh, autoreconf.sh, autoheader.sh, autoscan.pl, ifnames.sh: + Rename as... + * autoconf.in, autoreconf.in, autoheader.in, autoscan.in, ifnames.in: + these. + +2001-05-21 Akim Demaille + + * configure.in: Bump to 2.50a. + + + ----- + + Local Variables: + coding: utf-8 + End: + + Copyright (C) 2001-2012 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 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 + . diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..58f2ead --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,127 @@ +# Having a separate GNUmakefile lets me 'include' the dynamically +# generated rules created via cfg.mk (package-local configuration) +# as well as maint.mk (generic maintainer rules). +# This makefile is used only if you run GNU Make. +# It is necessary if you want to build targets usually of interest +# only to the maintainer. + +# Copyright (C) 2001, 2003, 2006-2012 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 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 . + +# If the user runs GNU make but has not yet run ./configure, +# give them a diagnostic. +_gl-Makefile := $(wildcard [M]akefile) +ifneq ($(_gl-Makefile),) + +# Make tar archive easier to reproduce. +export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner + +# Allow the user to add to this in the Makefile. +ALL_RECURSIVE_TARGETS = + +include Makefile + +# Some projects override e.g., _autoreconf here. +-include $(srcdir)/cfg.mk + +# Allow cfg.mk to override these. +_build-aux ?= build-aux +_autoreconf ?= autoreconf -v + +include $(srcdir)/maint.mk + +# Ensure that $(VERSION) is up to date for dist-related targets, but not +# for others: rerunning autoreconf and recompiling everything isn't cheap. +_have-git-version-gen := \ + $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes) +ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL)) + _is-dist-target ?= $(filter-out %clean, \ + $(filter maintainer-% dist% alpha beta stable,$(MAKECMDGOALS))) + _is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS))) + ifneq (,$(_is-dist-target)$(_is-install-target)) + _curr-ver := $(shell cd $(srcdir) \ + && $(_build-aux)/git-version-gen \ + .tarball-version \ + $(git-version-gen-tag-sed-script)) + ifneq ($(_curr-ver),$(VERSION)) + ifeq ($(_curr-ver),UNKNOWN) + $(info WARNING: unable to verify if $(VERSION) is the correct version) + else + ifneq (,$(_is-install-target)) + # GNU Coding Standards state that 'make install' should not cause + # recompilation after 'make all'. But as long as changing the version + # string alters config.h, the cost of having 'make all' always have an + # up-to-date version is prohibitive. So, as a compromise, we merely + # warn when installing a version string that is out of date; the user + # should run 'autoreconf' (or something like 'make distcheck') to + # fix the version, 'make all' to propagate it, then 'make install'. + $(info WARNING: version string $(VERSION) is out of date;) + $(info run '$(MAKE) _version' to fix it) + else + $(info INFO: running autoreconf for new version string: $(_curr-ver)) +GNUmakefile: _version + touch GNUmakefile + endif + endif + endif + endif +endif + +.PHONY: _version +_version: + cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf) + $(MAKE) $(AM_MAKEFLAGS) Makefile + +else + +.DEFAULT_GOAL := abort-due-to-no-makefile +srcdir = . + +# The package can override .DEFAULT_GOAL to run actions like autoreconf. +-include ./cfg.mk + +# Allow cfg.mk to override these. +_build-aux ?= build-aux +_autoreconf ?= autoreconf -v + +include ./maint.mk + +ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile) +$(MAKECMDGOALS): abort-due-to-no-makefile +endif + +abort-due-to-no-makefile: + @echo There seems to be no Makefile in this directory. 1>&2 + @echo "You must run ./configure before running 'make'." 1>&2 + @exit 1 + +endif + +# Tell version 3.79 and up of GNU make to not build goals in this +# directory in parallel, in case someone tries to build multiple +# targets, and one of them can cause a recursive target to be invoked. + +# Only set this if Automake doesn't provide it. +AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) \ + dist distcheck tags ctags + +ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS) + +ifneq ($(word 2, $(MAKECMDGOALS)), ) +ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), ) +.NOTPARALLEL: +endif +endif diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..d60e29a --- /dev/null +++ b/INSTALL @@ -0,0 +1,370 @@ +Installation Instructions +************************* + +Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, +Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +================== + + Briefly, the shell commands './configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the 'README' file for +instructions specific to this package. Some packages provide this +'INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The 'configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a 'Makefile' in each directory of the package. +It may also create one or more '.h' files containing system-dependent +definitions. Finally, it creates a shell script 'config.status' that +you can run in the future to recreate the current configuration, and a +file 'config.log' containing compiler output (useful mainly for +debugging 'configure'). + + It can also use an optional file (typically called 'config.cache' +and enabled with '--cache-file=config.cache' or simply '-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how 'configure' could check whether to do them, and mail +diffs or instructions to the address given in the 'README' so they can +be considered for the next release. If you are using the cache, and at +some point 'config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file 'configure.ac' (or 'configure.in') is used to create +'configure' by a program called 'autoconf'. You need 'configure.ac' if +you want to change it or regenerate 'configure' using a newer version +of 'autoconf'. + + The simplest way to compile this package is: + + 1. 'cd' to the directory containing the package's source code and type + './configure' to configure the package for your system. + + Running 'configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type 'make' to compile the package. + + 3. Optionally, type 'make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type 'make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the 'make install' phase executed with root + privileges. + + 5. Optionally, type 'make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior 'make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing 'make clean'. To also remove the + files that 'configure' created (so you can compile the package for + a different kind of computer), type 'make distclean'. There is + also a 'make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type 'make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like 'make install' and 'make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the 'configure' script does not know about. Run './configure --help' +for details on some of the pertinent environment variables. + + You can give 'configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU 'make'. 'cd' to the +directory where you want the object files and executables to go and run +the 'configure' script. 'configure' automatically checks for the +source code in the directory that 'configure' is in and in '..'. This +is known as a "VPATH" build. + + With a non-GNU 'make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use 'make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple '-arch' options to the +compiler but only a single '-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the 'lipo' tool if you have problems. + +Installation Names +================== + + By default, 'make install' installs the package's commands under +'/usr/local/bin', include files under '/usr/local/include', etc. You +can specify an installation prefix other than '/usr/local' by giving +'configure' the option '--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option '--exec-prefix=PREFIX' to 'configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like '--bindir=DIR' to specify different values for particular +kinds of files. Run 'configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of '${prefix}', so that +specifying just '--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to 'configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +'make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +'${prefix}'. Any directories that were specified during 'configure', +but not in terms of '${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the 'DESTDIR' variable. For +example, 'make install DESTDIR=/alternate/directory' will prepend +'/alternate/directory' before all installation names. The approach of +'DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of '${prefix}' +at 'configure' time. + +Optional Features +================= + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving 'configure' the +option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. + + Some packages pay attention to '--enable-FEATURE' options to +'configure', where FEATURE indicates an optional part of the package. +They may also pay attention to '--with-PACKAGE' options, where PACKAGE +is something like 'gnu-as' or 'x' (for the X Window System). The +'README' should mention any '--enable-' and '--with-' options that the +package recognizes. + + For packages that use the X Window System, 'configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the 'configure' options '--x-includes=DIR' and +'--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of 'make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with 'make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with 'make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX 'make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as 'configure' are involved. Use GNU 'make' +instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its '' header file. The option '-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put '/usr/ucb' early in your 'PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in '/usr/bin'. So, if you need '/usr/ucb' +in your 'PATH', put it _after_ '/usr/bin'. + + On Haiku, software installed for all users goes in '/boot/common', +not '/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + +Specifying the System Type +========================== + + There may be some features 'configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, 'configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +'--build=TYPE' option. TYPE can either be a short name for the system +type, such as 'sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file 'config.sub' for the possible values of each field. If +'config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option '--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with '--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for 'configure' scripts to share, +you can create a site shell script called 'config.site' that gives +default values for variables like 'CC', 'cache_file', and 'prefix'. +'configure' looks for 'PREFIX/share/config.site' if it exists, then +'PREFIX/etc/config.site' if it exists. Or, you can set the +'CONFIG_SITE' environment variable to the location of the site script. +A warning: not all 'configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to 'configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the 'configure' command line, using 'VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified 'gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for 'CONFIG_SHELL' due to +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash + +'configure' Invocation +====================== + + 'configure' recognizes the following options to control how it +operates. + +'--help' +'-h' + Print a summary of all of the options to 'configure', and exit. + +'--help=short' +'--help=recursive' + Print a summary of the options unique to this package's + 'configure', and exit. The 'short' variant lists options used + only in the top level, while the 'recursive' variant lists options + also present in any nested packages. + +'--version' +'-V' + Print the version of Autoconf used to generate the 'configure' + script, and exit. + +'--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally 'config.cache'. FILE defaults to '/dev/null' to + disable caching. + +'--config-cache' +'-C' + Alias for '--cache-file=config.cache'. + +'--quiet' +'--silent' +'-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to '/dev/null' (any error + messages will still be shown). + +'--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + 'configure' can determine that directory automatically. + +'--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +'--no-create' +'-n' + Run the configure checks, but stop before creating any output + files. + +'configure' also accepts some other, not widely useful, options. Run +'configure --help' for more details. diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..bed0b6c --- /dev/null +++ b/Makefile.am @@ -0,0 +1,132 @@ +# Make Autoconf. + +# Copyright (C) 1999-2004, 2006-2012 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 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 . + +# bin/ must be run first, as it builds executables needed for tests. +# autom4te uses autotest.m4f to generate `testsuite', so build tests last. +# Rules in man/ use scripts from both bin/ and tests/, so *it* goes last. +SUBDIRS = bin . lib doc tests man + +ACLOCAL_AMFLAGS = -I m4 + +EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 ChangeLog.3 \ + BUGS COPYINGv3 COPYING.EXCEPTION \ + GNUmakefile maint.mk cfg.mk \ + build-aux/gendocs.sh \ + build-aux/git-version-gen \ + build-aux/announce-gen build-aux/gnupload \ + build-aux/gitlog-to-changelog \ + .prev-version .version + +## --------- ## +## INSTALL. ## +## --------- ## + +AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split + +if MAKE_CASE_SENSITIVE +pkgdata_DATA = $(srcdir)/INSTALL +MAINTAINERCLEANFILES = $(srcdir)/INSTALL + +# Don't leave blank line at end of file. +OMIT_TRAILING_EMPTY_LINES = '/^$$/H; /^$$/d; x; s/\n//p; s/\n*//; x' +# Prefer 'plain quotes' over `makeinfo quotes'. +CONVERT_QUOTES = "s/\`\([^']*\)'/'\1'/g" + +$(srcdir)/INSTALL: $(top_srcdir)/doc/install.texi + echo @firstparagraphindent insert \ + | cat - $(top_srcdir)/doc/install.texi > tmp.texi + $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ + --plaintext tmp.texi \ + | sed -e $(CONVERT_QUOTES) -e $(OMIT_TRAILING_EMPTY_LINES) \ + > $@-t && mv $@-t $@ + rm -f tmp.texi +endif + +# Generate the ChangeLog from git history. +gen_start_date = 2012-01-15 18:00:00 UTC +.PHONY: gen-ChangeLog +gen-ChangeLog: + if test -d $(top_srcdir)/.git; then \ + $(top_srcdir)/build-aux/gitlog-to-changelog \ + --since='$(gen_start_date)' > $(distdir)/cl-t \ + && rm -f $(distdir)/ChangeLog \ + && mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + fi + +# Dummy rule, to pacify automake "gnu" strictness and allow a clean +# bootstrap. Creates a dummy ChangeLog (unless one is already present, +# as might be the case for users of vc-dwim) that will be overridden +# with a proper one at distribution time. +ChangeLog: + @echo dummy > $@ + +# Version string management. There are two files to be aware of: +# .tarball-version - present only in a distribution tarball, and not in +# a checked-out repository. Created with contents that were learned at +# the last time autoconf was run, and used by git-version-gen. Must not +# be present in either $(srcdir) or $(builddir) for git-version-gen to +# give accurate answers during normal development with a checked out tree, +# but must be present in a tarball when there is no version control system. +# Therefore, it cannot be used in any dependencies. GNUmakefile has +# hooks to force a reconfigure at distribution time to get the value +# correct, without penalizing normal development with extra reconfigures. +# .version - present in a checked-out repository and in a distribution +# tarball. At least as current as the most recent .tarball-version +# creation. Usable in dependencies, particularly for files that don't +# want to depend on config.h but do want to track version changes. +BUILT_SOURCES = $(top_srcdir)/.version +$(top_srcdir)/.version: + echo $(VERSION) > $@-t && mv $@-t $@ + +# Arrange so that .tarball-version appears only in distribution tarballs, +# never in a checked-out repository. +dist-hook: gen-ChangeLog + echo $(VERSION) > $(distdir)/.tarball-version + +# Arrange to remove the symlink to GNUmakefile in VPATH builds. +# TODO remove this once automake vs. AC_CONFIG_LINKS issue is fixed. +distclean-local: + if test x"$(VPATH)" != x ; then rm -f GNUmakefile ; fi + +# Perl coverage statistics. +PERL_COVERAGE_DB = `pwd`/cover_db +PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off +PERL_COVER = cover + +check-coverage-run: all + $(mkinstalldirs) $(PERL_COVERAGE_DB) + PERL5OPT="$(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \ + $(MAKE) $(AM_MAKEFLAGS) check + +check-coverage-report: + @if test ! -d $(PERL_COVERAGE_DB); then \ + echo "No coverage database found in \`$(PERL_COVERAGE_DB)'." >&2; \ + echo "Please run \`make check-coverage' first" >&2; \ + exit 1; \ + fi + $(PERL_COVER) $(PERL_COVERAGE_DB) $(PERL_COVER_FLAGS) + +# We don't use direct dependencies here because we'd like to be able +# to invoke the report even after interrupted check-coverage. +check-coverage: check-coverage-run + $(MAKE) $(AM_MAKEFLAGS) check-coverage-report + +clean-local: clean-coverage +clean-coverage: + rm -rf $(PERL_COVERAGE_DB) + +.PHONY: check-coverage check-coverage-run check-coverage-report clean-coverage diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..b77d939 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,853 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Make Autoconf. + +# Copyright (C) 1999-2004, 2006-2012 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 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 . + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ + ChangeLog INSTALL NEWS THANKS TODO build-aux/config.guess \ + build-aux/config.sub build-aux/elisp-comp build-aux/install-sh \ + build-aux/mdate-sh build-aux/missing build-aux/texinfo.tex +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/autobuild.m4 \ + $(top_srcdir)/m4/m4.m4 $(top_srcdir)/m4/make-case.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkgdatadir)" +DATA = $(pkgdata_DATA) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EMACS = @EMACS@ +EMACSLOADPATH = @EMACSLOADPATH@ +EXPR = @EXPR@ +GREP = @GREP@ +HELP2MAN = @HELP2MAN@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +M4 = @M4@ +M4_DEBUGFILE = @M4_DEBUGFILE@ +M4_GNU = @M4_GNU@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERL_FLOCK = @PERL_FLOCK@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TEST_EMACS = @TEST_EMACS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ +ac_cv_sh_n_works = @ac_cv_sh_n_works@ +ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +# bin/ must be run first, as it builds executables needed for tests. +# autom4te uses autotest.m4f to generate `testsuite', so build tests last. +# Rules in man/ use scripts from both bin/ and tests/, so *it* goes last. +SUBDIRS = bin . lib doc tests man +ACLOCAL_AMFLAGS = -I m4 +EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 ChangeLog.3 \ + BUGS COPYINGv3 COPYING.EXCEPTION \ + GNUmakefile maint.mk cfg.mk \ + build-aux/gendocs.sh \ + build-aux/git-version-gen \ + build-aux/announce-gen build-aux/gnupload \ + build-aux/gitlog-to-changelog \ + .prev-version .version + +AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split +@MAKE_CASE_SENSITIVE_TRUE@pkgdata_DATA = $(srcdir)/INSTALL +@MAKE_CASE_SENSITIVE_TRUE@MAINTAINERCLEANFILES = $(srcdir)/INSTALL + +# Don't leave blank line at end of file. +@MAKE_CASE_SENSITIVE_TRUE@OMIT_TRAILING_EMPTY_LINES = '/^$$/H; /^$$/d; x; s/\n//p; s/\n*//; x' +# Prefer 'plain quotes' over `makeinfo quotes'. +@MAKE_CASE_SENSITIVE_TRUE@CONVERT_QUOTES = "s/\`\([^']*\)'/'\1'/g" + +# Generate the ChangeLog from git history. +gen_start_date = 2012-01-15 18:00:00 UTC + +# Version string management. There are two files to be aware of: +# .tarball-version - present only in a distribution tarball, and not in +# a checked-out repository. Created with contents that were learned at +# the last time autoconf was run, and used by git-version-gen. Must not +# be present in either $(srcdir) or $(builddir) for git-version-gen to +# give accurate answers during normal development with a checked out tree, +# but must be present in a tarball when there is no version control system. +# Therefore, it cannot be used in any dependencies. GNUmakefile has +# hooks to force a reconfigure at distribution time to get the value +# correct, without penalizing normal development with extra reconfigures. +# .version - present in a checked-out repository and in a distribution +# tarball. At least as current as the most recent .tarball-version +# creation. Usable in dependencies, particularly for files that don't +# want to depend on config.h but do want to track version changes. +BUILT_SOURCES = $(top_srcdir)/.version + +# Perl coverage statistics. +PERL_COVERAGE_DB = `pwd`/cover_db +PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off +PERL_COVER = cover +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): +install-pkgdataDATA: $(pkgdata_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" + @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ + done + +uninstall-pkgdataDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @$(am__cd) '$(distuninstallcheck_dir)' \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(DATA) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(pkgdatadir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-local \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-pkgdataDATA + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-pkgdataDATA + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ + ctags-recursive install install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-local ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-generic distclean-local \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkgdataDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-recursive uninstall uninstall-am uninstall-pkgdataDATA + + +@MAKE_CASE_SENSITIVE_TRUE@$(srcdir)/INSTALL: $(top_srcdir)/doc/install.texi +@MAKE_CASE_SENSITIVE_TRUE@ echo @firstparagraphindent insert \ +@MAKE_CASE_SENSITIVE_TRUE@ | cat - $(top_srcdir)/doc/install.texi > tmp.texi +@MAKE_CASE_SENSITIVE_TRUE@ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ +@MAKE_CASE_SENSITIVE_TRUE@ --plaintext tmp.texi \ +@MAKE_CASE_SENSITIVE_TRUE@ | sed -e $(CONVERT_QUOTES) -e $(OMIT_TRAILING_EMPTY_LINES) \ +@MAKE_CASE_SENSITIVE_TRUE@ > $@-t && mv $@-t $@ +@MAKE_CASE_SENSITIVE_TRUE@ rm -f tmp.texi +.PHONY: gen-ChangeLog +gen-ChangeLog: + if test -d $(top_srcdir)/.git; then \ + $(top_srcdir)/build-aux/gitlog-to-changelog \ + --since='$(gen_start_date)' > $(distdir)/cl-t \ + && rm -f $(distdir)/ChangeLog \ + && mv $(distdir)/cl-t $(distdir)/ChangeLog; \ + fi + +# Dummy rule, to pacify automake "gnu" strictness and allow a clean +# bootstrap. Creates a dummy ChangeLog (unless one is already present, +# as might be the case for users of vc-dwim) that will be overridden +# with a proper one at distribution time. +ChangeLog: + @echo dummy > $@ +$(top_srcdir)/.version: + echo $(VERSION) > $@-t && mv $@-t $@ + +# Arrange so that .tarball-version appears only in distribution tarballs, +# never in a checked-out repository. +dist-hook: gen-ChangeLog + echo $(VERSION) > $(distdir)/.tarball-version + +# Arrange to remove the symlink to GNUmakefile in VPATH builds. +# TODO remove this once automake vs. AC_CONFIG_LINKS issue is fixed. +distclean-local: + if test x"$(VPATH)" != x ; then rm -f GNUmakefile ; fi + +check-coverage-run: all + $(mkinstalldirs) $(PERL_COVERAGE_DB) + PERL5OPT="$(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \ + $(MAKE) $(AM_MAKEFLAGS) check + +check-coverage-report: + @if test ! -d $(PERL_COVERAGE_DB); then \ + echo "No coverage database found in \`$(PERL_COVERAGE_DB)'." >&2; \ + echo "Please run \`make check-coverage' first" >&2; \ + exit 1; \ + fi + $(PERL_COVER) $(PERL_COVERAGE_DB) $(PERL_COVER_FLAGS) + +# We don't use direct dependencies here because we'd like to be able +# to invoke the report even after interrupted check-coverage. +check-coverage: check-coverage-run + $(MAKE) $(AM_MAKEFLAGS) check-coverage-report + +clean-local: clean-coverage +clean-coverage: + rm -rf $(PERL_COVERAGE_DB) + +.PHONY: check-coverage check-coverage-run check-coverage-report clean-coverage + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..86f728a --- /dev/null +++ b/NEWS @@ -0,0 +1,2114 @@ +GNU Autoconf NEWS - User visible changes. + +* Noteworthy changes in release 2.69 (2012-04-24) [stable] + +** Autoconf now requires perl 5.6 or better (but generated configure + scripts continue to run without perl). + +* Noteworthy changes in release 2.68b (2012-03-01) [beta] + Released by Eric Blake, based on git versions 2.68.*. + +** Autoconf-generated configure scripts now unconditionally re-execute + themselves with $CONFIG_SHELL, if that's set in the environment. + +** The texinfo documentation no longer specifies "front-cover" or + "back-cover" texts, so that it may now be included in Debian's + "main" section. + +** Support for the Go programming language has been added. The new macro + AC_LANG_GO sets variables GOC and GOFLAGS. + +** AS_LITERAL_IF again treats '=' as a literal. Regression introduced in + 2.66. + +** The macro AS_EXECUTABLE_P, present since 2.50, is now documented. + +** Macros + +- AC_PROG_LN_S and AS_LN_S now fall back on 'cp -pR' (not 'cp -p') if 'ln -s' + does not work. This works better for symlinks to directories. + +- New macro AC_HEADER_CHECK_STDBOOL. + +- New and updated macros for Fortran support: + + AC_FC_CHECK_BOUNDS to enable array bounds checking + AC_F77_IMPLICIT_NONE and AC_FC_IMPLICIT_NONE to disable implicit integer + AC_FC_MODULE_EXTENSION to compute the Fortran 90 module name extension + AC_FC_MODULE_FLAG for the Fortran 90 module search path flag + AC_FC_MODULE_OUTPUT_FLAG for the Fortran 90 module output directory flag + AC_FC_PP_SRCEXT for preprocessed Fortran source files extensions + AC_FC_PP_DEFINE for the Fortran preprocessor define flag + +* Noteworthy changes in release 2.68 (2010-09-22) [stable] + Released by Eric Blake, based on git versions 2.67.*. + +** AC_MSG_ERROR (and AS_ERROR) can once again be followed immediately by + `dnl'. Regression introduced in 2.66. + +** AC_INIT again allows URLs with '?' for its BUG-REPORT argument. + Regression introduced in 2.66. + +** AC_REPLACE_FUNCS again allows a non-literal argument, such as a shell + variable that expands to a list of functions to check. Regression + introduced in 2.66. + +** AT_BANNER() with empty argument will cause visual separation from previous + test category. + +** The macros AC_PREPROC_IFELSE, AC_COMPILE_IFELSE, AC_LINK_IFELSE, and + AC_RUN_IFELSE now warn if the first argument failed to use + AC_LANG_SOURCE or AC_LANG_PROGRAM to generate the conftest file + contents. A new macro AC_LANG_DEFINES_PROVIDED exists if you have + a compelling reason why you cannot use AC_LANG_SOURCE but must + avoid the warning. + +** The macro m4_define_default is now documented. + +** Symlinked config.cache files are supported; configure now tries to + update non-symlinked cache files atomically, so that concurrent configure + runs do not leave behind broken cache files. It is still unspecified + which subset or union of results is cached though. + +** Autotest testsuites should not contain long text lines any more, and be + portable even when very many test groups are used. + +** AT_CHECK semantics with respect to the Autotest variable $at_status and + shell execution environment of the arguments are documented now. + +** AC_FC_LIBRARY_LDFLAGS now tolerates output from newer gfortran. + +** Newly obsolete macros + The following macros have been marked obsolete. New programs + should use the corresponding Gnulib modules. Gnulib not only + detects a larger set of portability problems with these functions, + but also provides complete workarounds. + + AC_FUNC_ERROR_AT_LINE AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK + AC_FUNC_MKTIME AC_FUNC_STRTOD + + +* Major changes in Autoconf 2.67 (2010-07-21) [stable] + Released by Eric Blake, based on git versions 2.66.*. + +** AC_CONFIG_SUBDIRS with more than one subdirectory at a time works again. + Regression introduced in 2.66. + +** AC_CHECK_SIZEOF of a pointer type works again. Regression introduced in + 2.66. + +** New macro AC_FC_LINE_LENGTH to accept long Fortran source code lines. + +** AC_PREPROC_IFELSE now keeps the preprocessed output in the conftest.i + file for inspection by the commands in the ACTION-IF-TRUE argument. + +** AC_INIT again allows parentheses and other characters that are literal + in single- or double-quoted strings, and in quoted and unquoted + here-documents, for its PACKAGE and VERSION arguments. Regression + introduced in 2.66. + +** autoreconf passes warning flags to new enough versions of aclocal. + +** Running an Autotest testsuite in parallel mode no longer triggers a + race condition that could cause the testsuite run to end early, + fixing a sporadic failure in autoconf's own testsuite. Bug present + since introduction of parallel tests in 2.63b. + + +* Major changes in Autoconf 2.66 (2010-07-02) [stable] + Released by Eric Blake, based on git versions 2.65.*. + +** AC_FUNC_MMAP works in C++ mode again. Regression introduced in 2.65. + +** Use of m4_divert without a named diversion now issues a syntax warning, + since it is seldom right to change diversions behind autoconf's back. + +** The macros AC_TYPE_INT8_T, AC_TYPE_INT16_T, AC_TYPE_INT32_T, and + AC_TYPE_INT64_T work again. Regression introduced in 2.65. + +** AC_PROG_INSTALL correctly uses `shtool' again. Regression introduced + in 2.64. + +** Autoconf should work on EBCDIC hosts. + +** AC_CHECK_DECL and AC_CHECK_DECLS accept optional function argument types + for overloaded C++ functions. + +** AS_SET_CATFILE accepts nonliterals in its variable name argument now. + +** Autotest testsuites accept an option --recheck to rerun tests that + failed or passed unexpectedly during the last non-debug testsuite run. + +** AC_ARG_ENABLE and AC_ARG_WITH now also accept `+' signs in `--enable-*' + and `--with-*' arguments, converting them to underscores for the variable + names. + +** In configure scripts, loading CONFIG_SITE no longer searches PATH, + and problems in loading the configuration site files are diagnosed. + +** Autotest testsuites may optionally provide colored test results. + +** The previously undocumented Autotest macros AT_ARG_OPTION and + AT_ARG_OPTION_ARG have seen bug fixes and are documented now. + AT_ARG_OPTION has been changed in that the negative of a long option + --OPTION is now --no-OPTION rather than --noOPTION. + +** The macro AS_LITERAL_IF is slightly more conservative; text + containing shell quotes are no longer treated as literals. + Furthermore, a new macro, AS_LITERAL_WORD_IF, adds an additional + level of checking that no whitespace occurs in literals. + +** The macros AS_TR_SH and AS_TR_CPP no longer expand their results. + +** The following macros are now documented: + AS_BOX + +** New macro AC_FC_FIXEDFORM to accept fixed-form Fortran. + + +* Major changes in Autoconf 2.65 (2009-11-21) [stable] + Released by Eric Blake, based on git versions 2.64.*. + +** Autoconf is now licensed under the General Public License version 3 + or later (GPLv3+). As with earlier versions, the license includes + an exception clause so that you may release a configure script + generated by autoconf under the license of your own program. + +** New macros to support Objective C++. + AC_PROG_OBJCXX AC_PROG_OBJCXXCPP + +** The following undocumented autoconf macros, removed in Autoconf 2.64, + have been reinstated: + AH_CHECK_HEADERS + + These macros are present only for backwards compatibility purposes. + +** The macro AC_LANG_COMPILER no longer fails on embedded systems that + lack fopen in the C library, such as AVR or RTEMS (regression + introduced in 2.64). + +** The AC_FC_FREEFORM macro no longer suffers from a whitespace bug that + made it fail with some Fortran compilers (regression introduced in + 2.64). + +** The AC_TYPE_UINT64_T and AC_TYPE_INT64_T macros have been fixed to no + longer mistakenly select a 32-bit type on some compilers (bug present + since macros were introduced in 2.59c). + +** The AC_FUNC_MMAP macro has been fixed to be portable to systems like + Cygwin (bug present since macro was introduced in 2.0). + +** The following documented autotest macros are new: + AT_CHECK_EUNIT + +** The following m4sugar macros now quote their expansion: + m4_toupper m4_tolower + +** The following m4sugar macros are new: + m4_escape + +** The m4sugar macro m4_text_wrap now copes with embedded quoting without + requiring quadrigraphs. For uses like AC_ARG_VAR([a], [[b c]]), + this gives the intuitive behavior of "[b c]" in the output (2.63 + gave the output of "[b], [c]", and 2.64 encountered a failure). + +** The `$tmp' temporary directory used in config.status is documented for + public use now. + +** config.status now provides a --config option to produce the configuration. + +** Many cache variables used by Autoconf's macros are now documented. + +** Configure scripts work better on DJGPP by avoiding a bug present in + the DJGPP port of bash 2.04 in handling 'return' in a shell + function (regression introduced in 2.64). + +* Major changes in Autoconf 2.64 (2009-07-26) [stable] + Released by Eric Blake, based on git versions 2.63b.*. + +** Autoconf now requires GNU M4 1.4.6 or later. Earlier versions of M4 + have a bug in regular expression handling that interferes with some + of the speedups provided since Autoconf 2.63. GNU M4 1.4.13 or + later is recommended. + +** AS_IF and AS_CASE have been taught to avoid syntax errors even when + given arguments that expand to just whitespace. + +** The following documented autoconf macros are new: + AC_ERLANG_SUBST_ERTS_VER + +** The autoheader tool now understands m4 macro arguments passed to + AC_DEFINE and AC_DEFINE_UNQUOTED. + +** Ensure AT_CHECK can support commands that include a # given with + proper m4 quoting. For shell comments, this is a new feature; for + non-shell comments, this fixes a regression introduced in 2.63b. + Additionally, AT_CHECK correctly supplies shell escapes for + metacharacters occurring in m4 macro expansions within the expected + stdout and stderr parameters. + +** The macro AT_CHECK now understands the concept of hard failure. If + a test exits with an unexpected status 99, cleanup actions for the + test are inhibited and the test is treated as a failure regardless + of AT_XFAIL_IF. It also understands the new directives + ignore-nolog, stdout-nolog, and stderr-nolog. + +** The following documented autotest macros are new: + AT_CHECK_UNQUOTED AT_FAIL_IF AT_SKIP_IF + +** The following documented m4sugar macros are new: + m4_argn m4_copy_force m4_default_nblank m4_default_nblank_quoted + m4_ifblank m4_ifnblank m4_rename_force + +** The autoconf testsuite now exercises all Erlang macros. + +* Major changes in Autoconf 2.63b (2009-03-31) [beta] + Released by Eric Blake, based on git versions 2.63.*. + +** The manual is now shipped under the terms of the GNU FDL 1.3. + +** AC_REQUIRE now detects the case of an outer macro which first expands + then later indirectly requires the same inner macro. Previously, + this case led to silent out-of-order expansion (bug present since + 2.50); it now issues a syntax warning, and duplicates the expansion + of the inner macro to guarantee dependencies have been met. See + the manual for advice on how to refactor macros in order to avoid + the bug in earlier autoconf versions and avoid increased script + size in the current version. + +** AC_DEFUN_ONCE has improved semantics. Previously, a macro declared + with AC_DEFUN_ONCE warned on a second invocation; and out-of-order + expansion was still possible. Now, dependencies are guaranteed, + and subsequent invocations are a silent no-op. This makes + AC_DEFUN_ONCE an ideal macro for silencing AC_REQUIRE warnings. + +** The following macros are now defined with AC_DEFUN_ONCE. This means + a subtle change in semantics; previously, an AC_DEFUN macro could + expand one of these macros multiple times or surround the macro + inside shell conditional text to bypass the effects of these + macros, but now the macro will expand exactly once, and prior to + the start of any enclosing AC_DEFUN macro: + AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET + AC_HEADER_ASSERT AC_PROG_INSTALL AC_PROG_MKDIR_P + AC_USE_SYSTEM_EXTENSIONS + +** AC_LANG_ERLANG works once again (regression introduced in 2.61a). + +** AC_HEADER_ASSERT is fixed so that './configure --enable-assert' no + longer mistakenly disables assertions. + +** AC_INIT now takes an optional fifth parameter that can be used to + set AC_PACKAGE_URL, a URL for the package's home page; the URL is + used in `configure --help' and is also available via AC_DEFINE. + +** Autotest testsuites accept an option --jobs[=N] for parallel testing. + This feature is still in testing, and may not work on every + platform, help in improving it would be appreciated. + +** Autotest testsuites do not attempt to write startup error messages + to the log file before that is opened (regression introduced in 2.63). + +** Configure scripts now use shell functions. This feature leads to + smaller configure files and faster execution. + +** Present But Cannot Be Compiled: Autoconf will now proceed with + the compiler's result if a header is present but cannot be compiled. + The warning is still printed, and you should really fix it by + providing a fourth parameter to AC_CHECK_HEADER/AC_CHECK_HEADERS. + +** Autoreconf added aclocal to the set of programs affected by the + `autoreconf -I dir' option. + +** The following documented m4sugar macros are new: + m4_chomp m4_chomp_all m4_cleardivert m4_curry m4_default_quoted + m4_esyscmd_s m4_map_args m4_map_args_pair m4_map_args_sep + m4_map_args_w m4_set_map m4_set_map_sep m4_stack_foreach + m4_stack_foreach_lifo m4_stack_foreach_sep + m4_stack_foreach_sep_lifo + +** The following m4sugar macros are documented now, but in some cases + with slightly different semantics than what the previous + undocumented version had: + m4_copy m4_dumpdefs m4_rename m4_version_prereq + +** The m4sugar macro m4_expand has been taught to handle unterminated + comments and shell case statements. As a result, it is used + internally in more places, such as AC_DEFINE and AT_CHECK. Most + uses of AC_DEFINE and AT_CHECK should not behave any differently; + however, it may be necessary to add double-quoting around + unbalanced `(' where single-quoting used to be sufficient. + +** The following documented m4sh macros are new: + AS_INIT_GENERATED AS_LINENO_PREPARE AS_ME_PREPARE AS_SET_STATUS + AS_VAR_APPEND AS_VAR_ARITH AS_VAR_COPY + +** The following m4sh macros are documented now, but in some cases + with slightly different semantics than what the previous + undocumented version had: + AS_ECHO AS_ECHO_N AS_ESCAPE AS_EXIT AS_LITERAL_IF AS_UNSET + AS_VAR_IF AS_VAR_POPDEF AS_VAR_PUSHDEF AS_VAR_SET AS_VAR_SET_IF + AS_VAR_TEST_SET AS_VERSION_COMPARE + +** The m4sh macros AS_IF and AS_CASE can now be used in shell lists. + The responsibility for supplying a trailing newline now belongs to + the call site, but since most users did not add dnl, this generally + results in fewer empty lines in configure. + + +* Major changes in Autoconf 2.63 (2008-09-09) [stable] + Released by Eric Blake, based on git versions 2.62.*. + +** AC_C_BIGENDIAN does not mistakenly report "universal" for some + bigendian hosts, a regression introduced with universal binary + support in 2.62. + +** AC_PATH_X now includes /lib64 and /usr/lib64 in its list of default + library directories. + +** AC_USE_SYSTEM_EXTENSIONS no longer conflicts with an external + AC_DEFINE([__EXTENSIONS__]). This fixes a regression introduced in + 2.62 when using macros such as AC_AIX that were made obsolete in + favor of the more portable AC_USE_SYSTEM_EXTENSIONS. + +** AC_CHECK_TARGET_TOOLS is usable in the non-cross-compile case. + +** Newly obsolete macros + The following macro has been marked obsolete, since current porting + targets can safely assume C89 semantics that signal handlers return + void. We have no current plans to remove the macro. + + AC_TYPE_SIGNAL + +** The macros m4_map and m4_map_sep now ignore any list elements + consisting of just empty quotes, and m4_map_sep now expands its + separator. This fixes a regression in 2.62 when these macros were + first documented, for the sake of clients expecting the semantics + that these macros had prior to that time. The new macros m4_mapall + and m4_mapall_sep, along with extra quoting of the separator, can + be used to get the semantics that m4_map_sep had in 2.62. + +** Clients of m4_expand, such as AS_HELP_STRING and AT_SETUP, can now + handle properly quoted but otherwise unbalanced parentheses (for + some macros, this fixes a regression in 2.62). + +** Two new quadrigraphs have been introduced: @{:@ for (, and @:}@ for ), + allowing the output of unbalanced parentheses in more contexts. + +** The following m4sugar macros are new: + m4_cleardivert m4_joinall m4_mapall m4_mapall_sep m4_reverse + m4_set_add m4_set_add_all m4_set_contains m4_set_contents + m4_set_delete m4_set_difference m4_set_dump m4_set_empty + m4_set_foreach m4_set_intersection m4_set_list m4_set_listc + m4_set_remove m4_set_size m4_set_union + +** The following m4sugar macros now accept multiple arguments, as is the + case with underlying m4: + m4_defn m4_popdef m4_undefine + +** The following m4sugar macros now guarantee linear scaling; they + previously had linear scaling with m4 1.6 but quadratic scaling + when using m4 1.4.x. All macros built on top of these also gain + the scaling improvements. + m4_bmatch m4_bpatsubsts m4_case m4_cond m4_do m4_dquote_elt + m4_foreach m4_join m4_list_cmp m4_map m4_map_sep m4_max + m4_min m4_shiftn + +** AT_KEYWORDS once again performs expansion on its argument, such that + AT_KEYWORDS([m4_if([$1], [], [default])]) no longer complains about + the possibly unexpanded m4_if [regression introduced in 2.62]. + +** Config header templates `#undef UNDEFINED /* comment */' do not lead to + nested comments any more; regression introduced in 2.62. + + +* Major changes in Autoconf 2.62 (2008-04-05) [stable] + Released by Eric Blake, based on git versions 2.61a.*. + +** Many optimizations have been applied to make overall execution faster. + +** Autotest now makes use of shell functions. + +** config.status now uses awk instead of sed also for config headers. + + - As a side effect, AC_DEFINE and AC_DEFINE_UNQUOTED now handle multi-line + values, i.e., backslash-newline combinations are handled correctly. + Further, for config headers, the total size of values is not limited by + the POSIX length limit of text lines any more, only each single line. + +** New config variable `top_build_prefix'. + +** New Autoconf macros: + AC_AUTOCONF_VERSION AC_OPENMP AC_PATH_PROGS_FEATURE_CHECK + +** AC_C_BIGENDIAN now supports universal binaries a la Mac OS X. + +** AC_C_RESTRICT now prefers to #define 'restrict' to a variant spelling + like '__restrict' if the variant spelling is available, as this is + more likely to work when mixing C and C++ code. + +** AC_CHECK_ALIGNOF's type argument T is now documented better: it must + be a string of tokens such that "T y;" is a valid member declaration + in a struct. + +** AC_CHECK_SIZEOF now accepts objects as well as types: the general rule + is that sizeof (X) works, then AC_CHECK_SIZEOF (X) should work. + +** AC_CHECK_TYPE and AC_CHECK_TYPES now work on any C type-name; formerly, + they did not work for function types. In C++, they now work on any + type-id that can be the operand of sizeof; this is similar to C, + except it excludes anonymous struct and union types. Formerly, + some (but not all) C++ types involving anonymous struct and union + were accepted, though this was not documented. + +** AC_CONFIG_LINKS now prefers to link against files in the build tree + if found, and it works to link against a file of the same name in + the source tree, even if both trees coincide. + +** AC_INIT no longer alters $@; regression introduced in 2.60. + +** AC_USE_SYSTEM_EXTENSIONS now defines _ALL_SOURCE for Interix platforms. + +** AS_HELP_STRING no longer underquotes its first argument; it also handles + the case where the first argument contains single-quoted commas. + For example, "AS_HELP_STRING([-a, [--arg[=foo]]], [bar])" produces: + " -a, --arg[=foo] bar" + Additionally, the macro now takes two additional arguments, + indent-column and wrap-column; these should not normally be needed, + but can be used to fine-tune how the output text is wrapped. + +** AC_PROG_INSTALL now requires an install program that can install multiple + files into a target directory. + +** The command 'autoconf -' now correctly processes a file from stdin. + +** 'autoreconf -m' now honors $MAKE. + +** For all of the directory arguments for 'configure', such as '--prefix' + or '--bindir', trailing slashes are stripped. As an example, if + tab completion in the user's shell appends trailing slashes, the + command './configure --prefix=/usr/' will still result in an + expanded libdir value of /usr/lib, not /usr//lib. + +** `configure --help=recursive' now works in read-only trees and from + unconfigured build trees. + +** If precious variables differ only in whitespace, then the cache consistency + check warns instead of fails, and reuses the old value. + +** AT_BANNER is now documented. + +** AT_SETUP now handles macro expansions properly when calculating line + length. + +** Autotest now determines $srcdir correctly. + +** Testsuites built by autotest now accept a -C/--directory=DIR option + to adjust the working directory prior to creating files. + +** Autoconf now requires GNU M4 1.4.5 or later. Earlier versions of M4 have + a bug in macro tracing that interferes with the interaction between + Autoconf and Automake. GNU M4 1.4.11 or later is recommended. The + configure search for a working M4 is improved. + +** For portability with the eventual M4 2.0, macros should no longer use + anything larger than $9 to refer to arguments. + +** Documentation for m4sugar is improved. + + - The following macros were previously available as undocumented + interfaces; the macros are now documented as stable interfaces. + + __oline__ m4_assert m4_bmatch m4_bpatsubsts m4_car m4_case + m4_cdr m4_default m4_divert_once m4_divert_pop m4_divert_push + m4_divert_text m4_do m4_errprintn m4_fatal m4_flatten + m4_ifndef m4_ifset m4_ifval m4_ifvaln m4_location + m4_n m4_shiftn m4_strip m4_warn + + - The following macros were previously available as undocumented + interfaces, but had bug fixes or semantic changes as part of this + release. Packages that relied on the undocumented behavior + should be analyzed to make sure they will still work with the + new documented behavior. + + m4_cmp m4_list_cmp m4_join m4_map m4_map_sep m4_sign + m4_text_box m4_text_wrap m4_version_compare + + - The m4_wrap macro used to have unspecified order, but now + guarantees FIFO order. m4_wrap_lifo was added to guarantee LIFO + order. + + - Packages using the undocumented m4sugar macro m4_PACKAGE_VERSION + should consider using the new AC_AUTOCONF_VERSION instead. + + - m4sugar macros that are not documented in the manual are still + deemed experimental, and should not be used outside of Autoconf. + +** The m4sugar macros m4_append and m4_append_uniq, first documented in + 2.60, have been fixed to treat both the string and the separator + arguments consistently with regards to quoting. Prior to this fix, + m4_append_uniq could mistakenly duplicate entries if the expansion + of the separator resulted in a different string (for example, if it + contained quotes, a comma, or a macro name). However, it means + that programs previously using + m4_append([name], [string], [[, ]]) + are now using a four-character separator instead of the intended + comma and space. If you need portability to earlier versions of + Autoconf, you can insert the following snippet after AC_INIT but + before any other macro expansions, to enforce the new semantics: + m4_pushdef([m4_append], [m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + Additionally, m4_append_uniq now takes optional parameters that can + be used to take action depending on whether anything was appended, + and warns if a non-empty separator occurs within the string being + appended, since that can lead to duplicates. + +** The following m4sugar macros are new: + m4_append_uniq_w m4_apply m4_combine m4_cond m4_count + m4_dquote_elt m4_echo m4_expand m4_ignore m4_make_list m4_max + m4_min m4_newline m4_shift2 m4_shift3 m4_unquote m4_wrap_lifo + +** Warnings are now generated by default when an installer invokes + 'configure' with an unknown --enable-* or --with-* option. + These warnings can be disabled with the new AC_DISABLE_OPTION_CHECKING + macro, or by invoking 'configure' with --disable-option-checking. + +** Existing obsolete macros + The documentation for the following macros is adjusted to make it + more clear that they have previously been marked obsolete, as their + functionality can be accomplished by other macros. We have no + current plans to remove them from Autoconf. + + AC_ENABLE AC_STRUCT_ST_BLKSIZE AC_STRUCT_ST_RDEV AC_WITH + +** Newly obsolete macros + The following macros have been marked obsolete, as they only + perform a subset of AC_USE_SYSTEM_EXTENSIONS. We have no current + plans to remove them. + + AC_AIX AC_GNU_SOURCE AC_ISC_POSIX AC_MINIX + +** AC_C_LONG_DOUBLE is obsolescent. + The documentation now says that AC_C_LONG_DOUBLE is obsolescent: it + tests for problems that are so old that it is no longer of + practical importance on current systems. New programs need not use + AC_C_LONG_DOUBLE. We have no current plans to remove it. + +** AC_DIAGNOSE, AC_WARNING, and AC_FATAL are obsolescent. + The documentation now favors the use of M4sugar macros m4_warn and + m4_fatal, since the naming makes it more obvious that the + diagnostics are associated with M4 expansion (ie. when running + `autoconf'), and offers less confusion with the AC_MSG_ERROR, + AC_MSG_FAILURE, and AC_MSG_WARN macros which manage diagnostics + when running `configure'. We have no current plans to remove these + macros. + + +* Major changes in Autoconf 2.61a (2006-12-11) + +** AC_FUNC_FSEEKO was broken in 2.61; it didn't make fseeko and ftello visible + on many platforms. This has been fixed. + +** AC_FUNC_SETVBUF_REVERSED is now obsolete. It is still defined for backward + compatibility but it does nothing. The macro was already + obsolescent, as the last systems to have the problem were those + based on SVR2, which became obsolete in 1987. The macro had bugs + on some modern systems and could no longer be maintained reliably + due to lack of ancient systems to test it on. + +** config.status now uses awk instead of sed for most substitutions, for speed. + + - As a side effect multi-line values of substituted variables no + longer have a small limit in total size, though for portability + each line should not exceed the POSIX length limit for text lines. + + - It is now documented that Makefile.in should not contain + overlapping variable occurrences, e.g., @VAR1@VAR2@. + Autoconf's behavior was always iffy in such cases, and the + awk implementation has changed the behavior. + +** Many uses of 'echo' have been rewritten so that Autoconf-generated + scripts have fewer problems with strings or file names containing + embedded special characters such as backslash or leading "-". This + was implemented by using `printf '%s\n' "$foo"' instead of `echo + "$foo"' when printf works. Due to the implementation technique + used, Autoconf-generated scripts now run considerably more slowly + on ancient implementations lacking printf. However, this should + not be a problem, since Autoconf-generated scripts in practice + invariably find a more-modern shell these days. + + +* Major changes in Autoconf 2.61 (2006-11-17) + +** New macros AC_C_FLEXIBLE_ARRAY_MEMBER, AC_C_VARARRAYS. + +** AC_ARG_ENABLE and AC_ARG_WITH now allow '.' in feature and package names. + + +* Major changes in Autoconf 2.60b (2006-10-22) + +** BIN_SH + Autoconf-generated shell scripts no longer export BIN_SH, due to + configuration hassles with this. Installers who need BIN_SH in + their environment should set it before invoking 'configure' and + 'make'. As far as we know, this affects only Unixware installations. + +** Obsolescent macros + The documentation now says that the following macros are obsolescent, + as they are superseded by Gnulib: + + AC_FUNC_FNMATCH AC_FUNC_FNMATCH_GNU AC_FUNC_GETLOADVG AC_REPLACE_FNMATCH + + New programs should use the Gnulib counterparts of these macros. + We have no current plans to remove them from Autoconf. + +** AC_COMPUTE_INT no longer caches or reports results. + +** AC_CHECK_DECL now also works with aggregate objects. + +** AC_USE_SYSTEM_EXTENSIONS now defines _TANDEM_SOURCE for NonStop platforms. + +** GNU M4 1.4.7 or later is now recommended. + +** m4_mkstemp + New M4sugar macro, which is more secure than the POSIX M4 maketemp. + +** m4_maketemp + Now an alias for m4_mkstemp. + +* Major changes in Autoconf 2.60a (2006-08-25) + +** GNU M4 1.4.6 or later is now recommended. + +** The check for C99 now tests for varargs macros, as documented. + It also tests that the preprocessor supports 64-bit integers. + +** Autoconf now uses constructs like "#ifdef HAVE_STDLIB_H" rather than + "#if HAVE_STDLIB_H", so that it now works with "gcc -Wundef -Werror". + +** The functionality of the undocumented _AC_COMPUTE_INT is now provided + by a public and documented macro, AC_COMPUTE_INT. The parameters to the + two macros are different, so autoupdate will not change the old private name + to the new one. _AC_COMPUTE_INT may be removed in a future release. + +** AC_TYPE_LONG_LONG_INT and AC_TYPE_UNSIGNED_LONG_LONG_INT now require + that long long types be at least 64 bits wide, as C99 and tradition + requires. Formerly, they accepted implementations of any width. + + +* Major changes in Autoconf 2.60 + + Released 2006-06-23, by Ralf Wildenhues. + +** Autoconf no longer depends on whether m4wrap is FIFO (as Posix requires) + or LIFO (as in GNU M4 1.4.x). GNU M4 2.0 is expected to conform to Posix + here, so m4wrap/m4_wrap users should no longer depend on LIFO behavior. + +** Provide a way to turn off warnings about the changed directory variables. + +* Major changes in Autoconf 2.59d + + Released 2006-06-05, by Ralf Wildenhues. + +** GNU make now recommended for VPATH builds + INSTALL now suggests VPATH builds (e.g., "sh ../srcdir/configure") + only if you use GNU make. In practice, other 'make' implementations + have too many subtle incompatibilities in their support for VPATH. + Many packages (including Autoconf itself) are portable to other + 'make' implementations, but some packages are not, and recommending + GNU make keeps the installation instructions simpler. + +** Even more safety checks for the new Directory variables: + Warn about suspicious `${datarootdir}' found in config files output. + +** AC_TRY_COMMAND, AC_TRY_EVAL, ac_config_guess, ac_config_sub, ac_configure + These never-documented macros and variables have been marked with + comments saying that they may be removed in a future release, + because their use can lead to unintended code being executed. + If you need functionality that only these macros or variables + currently supply, please write bug-autoconf@gnu.org. + +** AC_SUBST, AC_DEFINE + Literal arguments to these are passed to m4_pattern_allow now. + +** AC_PROG_CC_STDC + Passing 'ac_cv_prog_cc_stdc=no' to 'configure' now sets ac_cv_prog_cc_c99 + and ac_cv_prog_cc_c89 to 'no' as well, for backward compatibility with + obsolete K&R tests in the Automake test suite. + +** AC_PROG_CXX_C_O + New macro. + +** AC_PROG_MKDIR_P + New macro. + +** AS_MKDIR_P + Now more robust with special characters in file names, or when + multiple processes create the same directory at the same time. + +** Obsolescent macros + The documentation now says that the following macros are obsolescent: + they test for problems that are so old that they are no longer of + practical importance on current systems. + + AC_C_BACKSLASH_A AC_FUNC_MEMCMP AC_HEADER_DIRENT + AC_C_CONST AC_FUNC_SELECT_ARGTYPES AC_HEADER_STAT + AC_C_PROTOTYPES AC_FUNC_SETPGRP AC_HEADER_STDC + AC_C_STRINGIZE AC_FUNC_SETVBUF_REVERSED AC_HEADER_SYS_WAIT + AC_C_VOLATILE AC_FUNC_STAT AC_HEADER_TIME + AC_FUNC_CLOSEDIR_VOID AC_FUNC_STRFTIME AC_ISC_POSIX + AC_FUNC_GETPGRP AC_FUNC_UTIME_NULL AC_PROG_GCC_TRADITIONAL + AC_FUNC_LSTAT AC_FUNC_VPRINTF AC_STRUCT_TM + + New programs need not use these macros. We have no current plans to + remove them. + +** autoreconf + For compatibility with future Libtool 2.0, autoreconf will invoke + libtoolize with the option `--ltdl' now, if LT_CONFIG_LTDL_DIR is + used. + +* Major changes in Autoconf 2.59c + + Released 2006-04-12, by Ralf Wildenhues. + +** The configure command now redirects standard input from /dev/null, + to help avoid problems with subsidiary commands that might mistakenly + read standard input. AS_ORIGINAL_STDIN_FD points to the original + standard input before this redirection, if you really want configure to + read from standard input. + +** Directory variables adjusted to recent changes in the GNU Coding Standards. + The following directory variables are new: + + datarootdir read-only architecture-independent data root [PREFIX/share] + localedir locale-specific message catalogs [DATAROOTDIR/locale] + docdir documentation root [DATAROOTDIR/doc/PACKAGE] + htmldir html documentation [DOCDIR] + dvidir dvi documentation [DOCDIR] + pdfdir pdf documentation [DOCDIR] + psdir ps documentation [DOCDIR] + + The following variables have new default values: + + datadir read-only architecture-independent data [DATAROOTDIR] + infodir info documentation [DATAROOTDIR/info] + mandir man documentation [DATAROOTDIR/man] + + This means that if you use any of `@datadir@', `@infodir@', or + `@mandir@' in a file, you will have to ensure `${datarootdir}' is + defined in this file. As a temporary measure, if any of those are + found but no mention of `datarootdir', the substitutions will be + replaced with values that do not contain `${datarootdir}', and a + warning will be issued. + +** @top_builddir@ is now a dir name: it is always nonempty and doesn't have + a trailing slash. Similar change will be made to ac_top_builddir in a + future release; the old style value, which matches (../)*, is (and will + continue to be) available as ac_top_build_prefix. + +** AC_C_TYPEOF + New macro to check for support of 'typeof' syntax a la GNU C. + +** AC_CHECK_DECLS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_HEADERS_ONCE + New "once-only" variants of commonly-used macros, to make 'configure' + smaller and faster in common cases. + +** AC_FUNC_STRTOLD + New macro to check for strtold with C99 semantics. + +** AC_HEADER_ASSERT + New macro that lets builder disable assertions at 'configure'-time. + +** AC_PATH_X + Now checks for X11/Xlib.h and XrmInitialize (X proper) rather than + X11/Intrinsic.h and XtMalloc (Xt). + +** AC_PRESERVE_HELP_ORDER + New macro that causes `configure' to display help strings for AC_ARG_ENABLE + and AC_ARG_WITH arguments in one region, in the order defined. The default + behavior is to group options of each classes separately. + +** AC_PROG_CC, AC_PROG_CXX + No longer automatically arrange to declare the 'exit' function of C, + when a C++ compiler is used. Standard Autoconf macros no longer use + 'exit', so this is no longer an issue for them. If you use C++, and + want to call 'exit', you'll have to arrange for its declaration + yourself. But we now suggest you return from 'main' instead. + +** AC_PROG_CC_C89, AC_PROG_CC_C99 + New macros for ISO C99 support. AC_PROG_CC_C89 and AC_PROG_CC_C99 + check for ANSI C89 and ISO C99 support respectively. + +** AC_PROG_CC_STDC + Has been unobsoleted, and will check if the compiler supports ISO + C99, falling back to ANSI C89 if not. ac_cv_prog_cc_stdc is + retained for backwards compatibility, assuming the value of + ac_cv_prog_cc_c99 or ac_cv_prog_cc_c89 (whichever is valid, in + that order). + +** AC_STRUCT_DIRENT_D_INO, AC_STRUCT_DIRENT_D_TYPE + New macros for checking commonly-used members of struct dirent. + +** AC_SUBST + The substituted value can now contain newlines. + +** AC_SUBST_FILE + The substitution now occurs only when @variable@ is on a line by itself, + optionally surrounded by spaces and tabs. The whole line is replaced. + +** AC_TYPE_LONG_DOUBLE, AC_TYPE_LONG_DOUBLE_WIDER + New macros to check for long double, and whether it is wider than double. + The old macro AC_C_TYPE_LONG_DOUBLE has been marked as obsolete; + applications should switch to the new macro. + +** AC_TYPE_INT8_T, AC_TYPE_INT16_T, AC_TYPE_INT32_T, AC_TYPE_INT64_T, + AC_TYPE_INTMAX_T, AC_TYPE_INTPTR_T, AC_TYPE_LONG_LONG_INT, AC_TYPE_SSIZE_T, + AC_TYPE_UINT8_T, AC_TYPE_UINT16_T, AC_TYPE_UINT32_T, AC_TYPE_UINT64_T, + AC_TYPE_UINTMAX_T, AC_TYPE_UINTPTR_T, AC_TYPE_UNSIGNED_LONG_LONG_INT + New macros to check for C99 and POSIX types. + +** AC_USE_SYSTEM_EXTENSIONS + New macro to enable extensions to Posix. + +** AH_HEADER + New macro which is defined to the name of the first declared config header + or undefined if no config headers have been declared yet. + +** AS_HELP_STRING + The macro correctly handles quadrigraphs now. + +** AS_BOURNE_COMPATIBLE, AS_SHELL_SANITIZE, AS_CASE + These macros are new or published now. + +** AT_COPYRIGHT + New macro for copyright notices in testsuite files. + +** ALLOCA, LIBOBJS, LTLIBOBJS + Object names added to these variables are now prefixed with `${LIBOBJDIR}', + as in `${LIBOBJDIR}alloca.o'. LIBOBJDIR is meant to be defined from + `Makefile.in' in case the object files lie in a different directory. + The LIBOBJDIR feature is experimental. + +** autoreconf + Supports --no-recursive now. + +** New macros to support Erlang/OTP. + New macros for configuring paths to Erlang tools and libraries: + AC_ERLANG_PATH_ERLC, AC_ERLANG_NEED_ERLC, AC_ERLANG_PATH_ERL, + AC_ERLANG_NEED_ERL, AC_ERLANG_CHECK_LIB, AC_ERLANG_SUBST_ROOT_DIR, + AC_ERLANG_SUBST_LIB_DIR. + + New macros for configuring installation of Erlang libraries: + AC_ERLANG_SUBST_INSTALL_LIB_DIR, AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR. + +** The manual now mentions Gnulib more prominently. + +** New macros to support Objective C. + AC_PROG_OBJC, AC_PROG_OBJCPP. + +* Major changes in Autoconf 2.59b + + Released 2004-08-20, by Paul Eggert. + +** AC_CHECK_ALIGNOF + New macro that computes the default alignment of a type. + +** AC_CHECK_TOOL, AC_PATH_TOOL, AC_CHECK_TOOLS + When cross-compiling, these macros will give a warning if the tool + is not prefixed. In the future, unprefixed cross tools will not + be detected; please consult the info documentation for information + about the reason of this change. + +** AC_CHECK_TARGET_TOOL, AC_PATH_TARGET_TOOL, AC_CHECK_TARGET_TOOLS + New macros that detect programs whose name is prefixed with the + target type, if the build type and target type are different. + +** AC_REQUIRE_AUX_FILE + New trace macro that declares expected auxiliary files. + +** AC_PROG_GREP + New macro that tests for a grep program that accepts as a long a line + as possible. + +** AC_PROG_EGREP, AC_PROG_FGREP + These macros now require AC_PROG_GREP, and try EGREP="$GREP -E" and + FGREP="$GREP -F" respectively if possible, or else run a path search for + a program that accepts as long a line as possible. + +** AC_PROG_SED + New macro that tests for a sed program that truncates as few characters + as possible. + +* Major changes in Autoconf 2.59 + + Released 2003-11-04, by Akim Demaille + +** ac_abs_builddir etc. + Absolute file names were actually relative in 2.58. + +* Major changes in Autoconf 2.58 + + Released 2003-11-04, by Akim Demaille + +** core.* + core.* files are no longer removed, as they may be valid user files. + +** autoreconf and auxiliary directory + Autoreconf creates the auxiliary directory if needed. This is + especially useful for initial "bootstrapping" of fresh CVS checkouts. + +** AC_CONFIG_MACRO_DIR + Use this macro to declare the directory for local M4 macros for aclocal. + +** AC_LIBOBJS + No longer includes twice the same file in LIBOBJS if invoked + multiple times. + +** AC_CONFIG_COMMANDS + The directory for its first argument is automatically created. For + instance, with + + AC_CONFIG_COMMANDS([src/modules.hh], [...]) + + $top_builddir/src/ is created if needed. + +** Autotest and local.at + The optional file local.at is always included in Autotest test suites. + +** Warnings + The warnings are always issued, including with cached runs. + This became a significant problem since aclocal and automake can + run autoconf behind the scene. + +** autoheader warnings + The warnings of autoheader can be turned off, using --warning. + For instance, -Wno-obsolete disables the complaints about acconfig.h + and other deprecated constructs. + +** New macros + AC_C_RESTRICT, AC_INCLUDES_DEFAULT, AC_LANG_ASSERT, AC_LANG_WERROR, + AS_SET_CATFILE. + +** AC_DECL_SYS_SIGLIST + Works again. + +** AC_FUNC_MKTIME + Now checks that mktime is the inverse of localtime. + +** Improve DJGPP portability + The Autoconf tools and configure behave better under DJGPP. + +** Present But Cannot Be Compiled + New FAQ section dedicated to the mystic + + configure: WARNING: pi.h: present but cannot be compiled + configure: WARNING: pi.h: check for missing prerequisite headers? + configure: WARNING: pi.h: proceeding with the preprocessor's result + messages. + +** Concurrent executions of autom4te + autom4te now locks its internal files, which enables concurrent + executions of autom4te, likely to happen if automake, autoconf, + autoheader etc. are run simultaneously. + +** Libtool + Use of Libtool 1.5 and higher is encouraged. Compatibility with + Libtool pre-1.4 is not checked. + +** Autotest + Testsuites no longer rerun failed tests in verbose mode; instead, + failures are logged while the test is run. + + In addition, expected failures can be marked as such. + +* Major changes in Autoconf 2.57 + + Released 2002-12-03 by Paul Eggert. + +Bug fixes for problems with AIX linker, with freestanding C compilers, +with GNU M4 limitations, and with obsolete copies of GNU documents. + +The Free Documentation License has been upgraded from 1.1 to 1.2. + +* Major changes in Autoconf 2.56 + + Released 2002-11-15 by Akim Demaille. + +One packaging problem fixed (config/install-sh was not executable). + +* Major changes in Autoconf 2.55 + + Released 2002-11-14 by Akim Demaille. + +Release tips: + + Have your configure.ac checked by autoscan ("autoscan"). + Try the warning options ("autoreconf -fv -Wall"). + +** Documentation + +- AC_CHECK_HEADER, AC_CHECK_HEADERS + More information on proper use. + +- Writing Test Programs + + This sections explains how to write good test sources to use with + AC_COMPILE_IFELSE etc. It documents AC_LANG_PROGRAM and so forth. + +- AC_FOO_IFELSE vs. AC_TRY_FOO + + Explains why Autoconf moves from AC_TRY_COMPILE etc. to + AC_COMPILE_IFELSE and AC_LANG_PROGRAM etc. + +** autoreconf + +- Is more robust to different Gettext installations. + +- Produces messages (when --verbose) to be understood by Emacs' + compile mode. + +- Supports -W/--warnings. + +- -m/--make + Once the GNU Build System reinstalled, run `./config.status + --recheck && ./config.status && make' if possible. + +** autom4te + +- Supports --cache, and --no-cache. + +- ~/.autom4te.cfg makes it possible to disable the caching mechanism + (autom4te.cache). See `Customizing autom4te' in the documentation. + +** config.status + Supports --quiet. + +** Obsolete options + + Support for the obsoleted options -m, --macrodir, -l, --localdir is + dropped in favor of the safer --include/--prepend-include scheme. + +** Macros + +- New macros + AC_COMPILER_IFELSE, AC_FUNC_MBRTOWC, AC_HEADER_STDBOOL, + AC_LANG_CONFTEST, AC_LANG_SOURCE, AC_LANG_PROGRAM, AC_LANG_CALL, + AC_LANG_FUNC_TRY_LINK, AC_MSG_FAILURE, AC_PREPROC_IFELSE. + +- Obsoleted + Obsoleted macros are kept for Autoconf backward compatibility, but + should be avoided in configure.ac. Running autoupdate is advised. + AC_DECL_SYS_SIGLIST. + +- AC_DEFINE/AC_DEFINE_UNQUOTED + + We have to stop using the old compatibility scheme --that tried to + avoid useless backslashes-- because Libtool 1.4.3 contains a + + AC_DEFINE([error_t], [int], + [Define to a type to use for \`error_t' if it is not + otherwise available.]) + + We have to quote the single quotes and backslashes with \. The old + compatibility scheme saw that ` was backslashed, and therefore did + not quote the single quote... Failure. Hence, Autoconf 2.54 is not + compatible with Libtool. Autoconf 2.55 is, but in some cases might + produce more \ than wanted. + + Please, note that in the future the same problem will happen with + AC_MSG_*: use `autoreconf -f -Wall'. + +** Bug Fixes + +- Portability of the Autoconf package to Solaris. + +- Spurious warnings caused by config.status. + This bug is benign, but painful: on some systems (typically + FreeBSD), warnings such as: + + config.status: creating Makefile + mv: Makefile: set owner/group (was: 1357/0): Operation not permitted + + could be issued. This is fixed. + +- Parallel Builds + Simultaneous executions of config.status are possible again. + +- Precious variables accumulation + + config.status could stack several copies of the precious variables + assignments. + + +** Plans for later versions + +- ./configure + + The compatibility hooks with the old scheme will be completely + removed. Please, advice/use `--build', `--host', and `--target' + only. + +- AC_CHECK_HEADER, AC_CHECK_HEADERS + + The tests will be stricter, please make sure your invocations are + valid. + +- shell functions + + Shell functions will gradually be introduced, probably starting with + Autotest. If you know machines which are in use that you suspect + *not* to support shell functions, please run the test suite of + Autoconf 2.55 on it, and report the results to + bug-autoconf@gnu.org. + +- AC_MSG_* + + Special characters in AC_MSG_* need not be quoted. Currently, + Autoconf has heuristics to decide when a string is escaped, or has + to be escaped. This scheme is fragile, and will be removed; the + only risk is uglified messages. Please, run `autoreconf -f -Wall' + to find occurrences that will be affected. + +* Major changes in Autoconf 2.54 + + Released 2002-09-13 by Akim Demaille. + +** Executables + +- autoreconf no longer changes the version of the gettext/po/intl + support files. It now adds the files the correspond to the + AM_GNU_GETTEXT_VERSION declared in configure.ac. + + Warning: It now relies on the 'autopoint' program, which is part + of GNU gettext 0.11.4 and newer. + + Please note that you need to have a GNU gettext version that + corresponds at least to the AM_GNU_GETTEXT_VERSION declared + in configure.ac. You can upgrade to newer GNU gettext versions, + though, without needing to change configure.ac. + +- The -I DIR or --include=DIR option now appends DIR to the include path + instead of prepending; this is for consistency with other GNU tools. + The new -B DIR or --prepend-include=DIR option has the old behavior. + +** Macros + +- AC_OUTPUT + Now handles all the gory details about LIBOBJS and LTLIBOBJS. + Please, remove lines such as + + # This is necessary so that .o files in LIBOBJS are also + # built via the ANSI2KNR-filtering rules. + LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` + + and read the `AC_LIBOBJ vs LIBOBJS' section. Do not define U in + your Makefiles either. + +- AC_CONFIG_LINKS now makes copies if it can't make links. + +- AC_FUNC_FNMATCH now tests only for POSIX compatibility, reverting to + Autoconf 2.13 behavior. The new macro AC_FUNC_FNMATCH_GNU also + tests for GNU extensions to fnmatch, and replaces fnmatch if needed. + +- AC_FUNC_SETVBUF_REVERSED no longer fails when cross-compiling. + +- AC_PROG_CC_STDC is integrated into AC_PROG_CC. + +- AC_PROG_F77 default search no longer includes cf77 and cfg77. + +- New macros + + AC_C_BACKSLASH_A, AC_CONFIG_LIBOBJ_DIR, AC_GNU_SOURCE, + AC_PROG_EGREP, AC_PROG_FGREP, AC_REPLACE_FNMATCH, + AC_FUNC_FNMATCH_GNU, AC_FUNC_REALLOC, AC_TYPE_MBSTATE_T. + +- AC_FUNC_GETLOADAVG + looks for getloadavg.c in the CONFIG_LIBOBJ_DIR. + +- AC_FUNC_MALLOC + Now defines HAVE_MALLOC to 0 if `malloc' does not work, and asks + for an AC_LIBOBJ replacement. + +** Bug fixes + +- Spurious complaints from `m4_bmatch' about invalid regular + expressions are suppressed. + +- Empty top_builddirs are properly handled. + +- AC_CHECK_MEMBER works correctly when the member is an aggregate. + +- AC_PATH_PROG + Now colon in the optional path arguments are properly handled. + +** Improved portability + +- Both Autoconf the package, and the scripts it produces, should run + more reliably with Zsh. Bear in mind it is the default Bourne shell + on Darwin. + +- Autoconf and the scripts it produces no longer assume the existence of + the obsolescent commands egrep and fgrep. + +** Documentation + +- Limitations of Make + More of them. + +- GNATS + The GNATS base moved to + http://bugs.gnu.org/cgi-bin/gnatsweb.pl?database=autoconf + (It is no longer available, though.) + +** Misc. + +- config.log + Now contains the list of output variables and files (AC_SUBST, + AC_SUBST_FILES). + +* Major changes in Autoconf 2.53 + + Released 2002-03-08 by Akim Demaille. + +** Requirements + + Perl 5.005_03 or later is required: autom4te is written in Perl and is + needed by autoconf. autoheader, autoreconf, ifnames, and autoscan are + rewritten in Perl. + +** Documentation + +- AC_INIT + Argument requirements, output variables, defined macros. +- M4sugar, M4sh, Autotest + First sketch. +- Double quoting macros + AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK and AC_TRY_RUN. +- Licensing + The Autoconf manual is now distributed under the terms of the GNU FDL. +- Section `Hosts and Cross-Compilation' + Explains the rationale for the 2.5x changes in the cross-compilation + chain, and in the relationships between build, host, and target + types. + Emphasizes that `cross-compilation' == `--host is given'. + If you are working on compilers etc., be sure to read this section. +- Section `AC_LIBOBJ vs. LIBOBJS' + Explains why assigning LIBOBJS directly is now an error. + Details how to update the code. + +** configure + +- $LINENO + Now used instead of hard coded line numbers. + This eases the comparison of `configure's, and diminishes the + pressure over control version archives. + Automatic replacement for shells that don't support this feature. +- New output variables + @builddir@, @top_builddir@, @abs_srcdir@, @abs_top_srcdir@, @abs_builddir@, + @abs_top_builddir@. + +** Emacs + + Autoconf and Autotest modes are provided. + +** Executables + +- autom4te + New, used by the Autoconf suite to cache and speed up most processing. +- --force, -f + Supported by autom4te, autoconf and autoheader. +- --include, -I + Replaces --autoconf-dir and --localdir in autoconf, autoheader, + autoupdate, and autoreconf. +- autoreconf + No longer passes --cygnus, --foreign, --gnits, --gnu, --include-deps: + automake options are to be given via AUTOMAKE_OPTIONS. +- autoreconf + Runs gettextize and libtoolize when appropriate. +- autoreconf + --m4dir is no longer supported. +- autoreconf + Now runs only in the specified directories, defaulting to `.', + but understands AC_CONFIG_SUBDIRS for dependent directories. + Before, it used to run on all the `configure.ac' found in the + current tree. + Independent packages are properly updated. + +** Bug fixes + +- The top level $prefix is propagated to the AC_CONFIG_SUBDIRS configures. +- AC_TRY_RUN + Under the user pressure, $? is finally available. Probably a mistake. +- AC_F77_LIBRARY_LDFLAGS now supports the HP/UX f90 compiler. +- Precious variables accumulation + config.status could stack several copies of the precious variables + assignments. +- AC_PATH_PROG and family. + Works properly when given a literal path. +- AC_FUNC_SETPGRP + Somewhere since 2.13, the result had been reversed. + +** C Macros + +- AC_C_BIGENDIAN supports the cross-compiling case. +- AC_C_BIGENDIAN accepts ACTION-IF-TRUE, ACTION-IF-FALSE, and + ACTION-IF-UNKNOWN arguments. All are optional, and the default + for ACTION-IF-TRUE is to define WORDS_BIGENDIAN like AC_C_BIGENDIAN + always did. +- AC_C_LONG_DOUBLE now succeeds only if `long double' has more range or + precision than `double'. + +** Generic macros + +- AC_INIT + It now defines the preprocessor symbols PACKAGE_NAME, + PACKAGE_TARNAME, PACKAGE_VERSION, PACKAGE_STRING, and + PACKAGE_BUGREPORT. + +- AC_INIT + Admits a fourth optional parameter: the tar name. + +- AC_CONFIG_COMMANDS, HEADERS, FILES, LINKS. + Provide the user with srcdir, ac_srcdir, ac_top_srcdir, ac_builddir, + ac_top_builddir, ac_abs_srcdir, ac_abs_top_srcdir, ac_abs_builddir, + ac_abs_top_builddir. + +- AC_CONFIG_COMMANDS, HEADERS, FILES, LINKS and AC_OUTPUT. + Are much less expensive when using long lists of files. + +- AC_PREFIX_PROGRAM + Works with shell variables, and non alphanumeric names. + +** Library macros + +- AC_FUNC_STRERROR_R now sets STRERROR_R_CHAR_P, not HAVE_WORKING_STRERROR_R, + because POSIX 1003.1-200x draft 7 says strerror_r returns int, not char *. + +- AC_FUNC_STRTOD substitutes POW_LIB. + +- AC_FUNC_STRNLEN + New. + +* Major changes in Autoconf 2.52 + + Released 2001-07-18 by Akim Demaille. + +** Documentation +- AC_ARG_VAR +- Quadrigraphs + This feature was present in autoconf 2.50 but was not documented. + For example, `@<:@' is translated to `[' just before output. This + is useful when writing strings that contain unbalanced quotes, or + other hard-to-quote constructs. +- m4_pattern_forbid, m4_pattern_allow +- Tips for upgrading from 2.13. +- Using autoscan to maintain a configure.ac. + +** Default includes +- Now include stdint.h. +- sys/types.h and sys/stat.h are guarded. +- strings.h is included if available, and not conflicting with string.h. + +** Bug fixes +- The test suite is more robust and presents less false failures. +- Invocation of GNU M4 now robust to POSIXLY_CORRECT. +- configure accepts --prefix='' again. +- AC_CHECK_LIB works properly when its first argument is not a + literal. +- HAVE_INTTYPES_H is defined only if not conflicting with sys/types.h. +- build_, host_, and target_alias are AC_SUBST as in 2.13. +- AC_ARG_VAR properly propagates precious variables inherited from the + environment to ./config.status. +- Using --program-suffix/--program-prefix is portable. +- Failures to detect the default compiler's output extension are less + likely. +- `config.status foo' works properly when `foo' depends on variables + set in an AC_CONFIG_THING INIT-CMD. +- autoheader is more robust to broken input. +- Fixed Fortran name-mangling and link tests on a number of systems, + e.g. NetBSD; see AC_F77_DUMMY_MAIN, below. + +** Generic macros +- AC_CHECK_HEADER and AC_CHECK_HEADERS support a fourth argument to + specify pre-includes. In this case, the headers are compiled with + cc, not merely preprocessed by cpp. Therefore it is the _usability_ + of a header which is checked for, not just its availability. +- AC_ARG_VAR refuses to run configure when precious variables have + changed. +- Versions of compilers are dumped in the logs. +- AC_CHECK_TYPE recognizes use of `foo_t' as a replacement type. + +** Specific Macros +- AC_PATH_XTRA only adds -ldnet to $LIBS if it's needed to link. +- AC_FUNC_WAIT3 and AC_SYS_RESTARTABLE_SYSCALLS are obsoleted. +- AM_FUNC_ERROR_AT_LINE, AM_FUNC_FNMATCH, AM_FUNC_MKTIME, + AM_FUNC_OBSTACK, and AM_FUNC_STRTOD are now activated. + Be sure to read `Upgrading from Version 2.13' to understand why + running `autoupdate' is needed. +- AC_F77_DUMMY_MAIN, AC_F77_MAIN: new macros to detect whether + a main-like routine is required/possible when linking C/C++ with + Fortran. Users of e.g. AC_F77_WRAPPERS should be aware of these. +- AC_FUNC_GETPGRG behaves better when cross-compiling. + +* Major changes in Autoconf 2.51 +There was no release of Autoconf 2.51 since some packagers had used +this version number without permission to ship intermediary versions +of 2.50. The version was skipped to avoid confusion. + +* Major changes in Autoconf 2.50 + + Released 2001-05-21 by Akim Demaille. + +** Lots of bug fixes +There have been far too many to enumerate them here. Check out +ChangeLog if you really want to know more. + +** Improved documentation +In particular, portability issues are better covered. + +** Use of Automake +All the standard GNU Makefile targets are supported. The layout has +changed: m4/ holds the M4 extensions Autoconf needs for its +configuration, doc/ contains the documentation, and tests/ contains +the test suite. + +** Man pages are provided +For autoconf, autoreconf, autoupdate, autoheader, autoscan, ifnames, +config.guess, config.sub. + +** autoconf +- --trace + Provides a safe and powerful means to trace the macro uses. This + provide the parsing layer for tools which need to `study' + configure.in. + +- --warnings + Specify what category of warnings should be enabled. + +- When recursing into subdirectories, try for configure.gnu before + configure to adapt for packages not using autoconf on case-insensitive + file systems. + +- Diagnostics + More errors are now caught (circular AC_REQUIRE dependencies, + AC_DEFINE in the action part of an AC_CACHE_CHECK, too many pops + etc.). In addition, their location and call stack are given. + +** autoupdate +autoupdate is much more powerful, and is able to provide the glue code +which might be needed to move from an old macro to its newer +equivalent. + +You are strongly encouraged to use it to modernize both your +`configure.in' and your .m4 extension files. + +** autoheader +The internal machinery of autoheader has completely changed. As a +result, using `acconfig.h' should be considered to be obsoleted, and +you are encouraged to get rid of it using the AH macros. + +** autoreconf +Extensive overhaul. + +** Fortran 77 compilers +Globally, the support for Fortran 77 is considerably improved. + +Support for automatically determining a Fortran 77 compiler's +name-mangling scheme. New CPP macros F77_FUNC and F77_FUNC_ are +provided to wrap C/C++ identifiers, thus making it easier and more +transparent for C/C++ to call Fortran 77 routines, and Fortran 77 to +call C/C++ routines. See the Texinfo documentation for details. + +** Test suite +The test suite no longer uses DejaGNU. It should be easy to submit +test cases in this new framework. + +** configure +- --help, --help=long, -hl + no longer dumps useless items. +- --help=short, -hs + lists only specific options. +- --help=recursive, -hr + displays the help of all the embedded packages. +- Remembers environment variables when reconfiguring. + The previous scheme to set envvar before running configure was + ENV=VAL ./configure + what prevented configure from remembering the environment in which + it was run, therefore --recheck was run in an inconsistent + environment. Now, one should run + ./configure ENV=VAR + and then --recheck will work properly. Variables declared with + AC_ARG_VAR are also preserved. +- cross-compilation + $build defaults to `config.guess`, $host to $build, and then $target + to $host. + Cross-compilation is a global status of the package, it no longer + depends upon the current language. + Cross compilation is enabled iff the user specified `--host'. + `configure' now fails if it can't run the executables it compiles, + unless cross-compilation is enabled. +- Cache file + The cache file is disabled by default. The new options + `--config-cache', `-C' set the cache to `config.cache'. + +** config.status +- faster + Much faster on most architectures. +- concurrent executions + It is safe to use `make -j' with config.status. +- human interface improved + It is possible to invoke + ./config.status foobar + instead of the former form (still valid) + CONFIG_COMMANDS= CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=foobar:foo.in:bar.in \ + ./config.status + The same holds for configuration headers and links. + You can instantiate unknown files and headers: + ./config.status --header foo.h:foo.h.in --file bar:baz +- has a useful --help +- accepts special file name "-" for stdin/stdout + + +** Identity Macros +- AC_COPYRIGHT + Specify additional copyright information. + +- AC_INIT + Now expects the identity of the package as argument. + +** General changes. +- Uniform quotation + Most macros, if not all, now strictly follow the `one quotation + level' rule. This results in a more predictable expansion. + +- AC_REQUIRE + A sly bug in the AC_REQUIRE machinery, which could produce incorrect + configure scripts, was fixed by Axel Thimm. + +** Setup Macros +- AC_ARG_VAR + Document and ask for the registration of an envvar. + +- AC_CONFIG_SRCDIR + Specifies the file which `configure' should look for when trying to + find the source tree (used to be handled by AC_INIT). + +- AC_CONFIG_COMMANDS + To add new actions to config.status. Should be used instead of + AC_OUTPUT_COMMANDS. + +- AC_CONFIG_LINKS + Replaces AC_LINK_FILES. + +- AC_CONFIG_HEADERS, AC_CONFIG_COMMANDS, AC_CONFIG_SUBDIRS, + AC_CONFIG_LINKS, and AC_CONFIG_FILES + They now obey sh: you should no longer use shell variables as + argument. Instead of + + test "$package_foo_enabled" = yes && $my_subdirs="$my_subdirs foo" + AC_CONFIG_SUBDIRS($my_subdirs) + + write + + if test "$package_foo_enabled" = yes; then + AC_CONFIG_SUBDIRS(foo) + fi + +- AC_HELP_STRING + To format an Autoconf macro's help string so that it looks pretty + when the user executes `configure --help'. + + +** Generic Test Macros +- AC_CHECK families + The interface of the AC_CHECK families of macros (decl, header, + type, member, func) is now uniform. They support the same set of + default includes. + +- AC_CHECK_DECL, AC_CHECK_DECLS + To check whether a symbol is declared. + +- AC_CHECK_SIZEOF, AC_C_CHAR_UNSIGNED. + No longer need a cross-compilation default. + +- AC_CHECK_TYPE + The test it performs is much more robust than previously, and makes + it possible to test builtin types in addition to typedefs. + It is now schizophrenic: + - AC_CHECK_TYPE(TYPE, REPLACEMENT) + remains for backward compatibility, but its use is discouraged. + - AC_CHECK_TYPE(TYPE, IF-FOUND, IF-NOT-FOUND, INCLUDES) + behaves exactly like the other AC_CHECK macros. + +- AC_CHECK_TYPES + Checks whether given types are supported by the system. + +- AC_CHECK_MEMBER, AC_CHECK_MEMBERS + Check for given members in aggregates (e.g., pw_gecos in struct + passwd). + +- AC_PROG_CC_STDC + Checks if the compiler supports ISO C, included when needs special + options. + +- AC_PROG_CPP + Checking whether the preprocessor indicates missing includes by the + error code. stderr is checked by AC_TRY_CPP only as a fallback. + +- AC_LANG + Takes a language as argument and replaces AC_LANG_C, + AC_LANG_CPLUSPLUS and AC_LANG_FORTRAN77. + +- AC_LANG_PUSH, AC_LANG_POP + Are preferred to AC_LANG_SAVE, AC_LANG_RESTORE. + +** Specific Macros +- AC_FUNC_CHOWN, AC_FUNC_MALLOC, AC_FUNC_STRERROR_R, + AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, AC_FUNC_STAT, AC_FUNC_LSTAT, + AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD, AC_FUNC_FSEEKO. + New. + +- AC_FUNC_GETGROUPS + Sets GETGROUPS_LIBS. + +- AC_FUNC_GETLOADAVG + Defines `HAVE_STRUCT_NLIST_N_UN_N_NAME' instead of `NLIST_NAME_UNION'. + +- AC_PROG_LEX + Now integrates `AC_DECL_YYTEXT' which is obsoleted. + +- AC_SYS_LARGEFILE + Arrange for large-file support. + +- AC_EXEEXT, AC_OBJEXT + You are no longer expected to use them: their computation is + performed by default. + +** C++ compatibility + Every macro has been revisited in order to support at best CC=c++. + +Major changes in Autoconf 2.14: + There was no release of GNU Autoconf 2.14. + +Major changes in Autoconf 2.13: + + Released 1999-05-01 by Ben Elliston. + +* Support for building on 32-bit Windows systems where the only available C or + C++ compiler is the Microsoft Visual C++ command line compiler + (`cl'). Additional support for building on 32-bit Windows systems which are + using the Cygwin or Mingw32 environments. +* Support for alternative object file and executable file extensions. + On 32-bit Windows, for example, these are .obj and .exe. These are discovered + using AC_OBJEXT and AC_EXEEXT, which substitute @OBJEXT@ and + @EXEEXT@ in the output, respectively. +* New macros: AC_CACHE_LOAD, AC_CACHE_SAVE, AC_FUNC_SELECT_ARGTYPES, + AC_VALIDATE_CACHED_SYSTEM_TUPLE, AC_SEARCH_LIBS, AC_TRY_LINK_FUNC, + AC_C_STRINGIZE, AC_CHECK_FILE(S), AC_PROG_F77 (and friends). +* AC_DEFINE now has an optional third argument for a description to be + placed in the config header input file (e.g. config.h.in). +* The C++ code fragment compiled for the C++ compiler test had to be + improved to include an explicit return type for main(). This was + causing failures on systems using recent versions of the EGCS C++ + compiler. +* Fixed an important bug in AC_CHECK_TYPE that would cause a configure + script to report that `sometype_t' was present when only `type_t' + was defined. +* Merge of the FSF version of config.guess and config.sub to modernize + these scripts. Add support for a few new hosts in config.guess. + Incorporate latest versions of install-sh, mkinstalldirs and + texinfo.tex from the FSF. +* autoreconf is capable of running automake if necessary (and + applicable). +* Support for Fortran 77. See the Texinfo documentation for details. +* Bug fixes and workarounds for quirky bugs in vendor utilities. + +Major changes in Autoconf 2.12: + + Released 1996-11-26 by David J. MacKenzie + +* AC_OUTPUT and AC_CONFIG_HEADER can create output files by + concatenating multiple input files separated by colons, like so: + AC_CONFIG_HEADER(config.h:conf.pre:config.h.in:conf.post) + AC_OUTPUT(Makefile:Makefile.in:Makefile.rules) + The arguments may be shell variables, to compute the lists on the fly. +* AC_LINK_FILES and AC_CONFIG_SUBDIRS may be called multiple times. +* New macro AC_OUTPUT_COMMANDS adds more commands to run in config.status. +* Bug fixes. + +Major changes in Autoconf 2.11: + + Released November 18th, 1996, by David J. MacKenzie + +* AC_PROG_CC and AC_PROG_CXX check whether the compiler works. + They also default CFLAGS/CXXFLAGS to "-g -O2" for gcc, instead of "-g -O". +* AC_REPLACE_FUNCS defines HAVE_foo if the system has the function `foo'. +* AC_CONFIG_HEADER expands shell variables in its argument. +* New macros: AC_FUNC_FNMATCH, AC_FUNC_SETPGRP. +* The "checking..." messages and the source code for test programs that + fail are saved in config.log. +* Another workaround has been added for seds with small command length limits. +* config.sub and config.guess recognize more system types. +* Bug fixes. + +Major changes in Autoconf 2.10: + + Released May 7th, 1996, by Roland McGrath + +* Bug fixes. +* The cache variable names used by `AC_CHECK_LIB(LIB, FUNC, ...)' has + changed: now $ac_cv_lib_LIB_FUNC, previously $ac_cv_lib_LIB. + +Major changes in Autoconf 2.9: + + Released March 16th, 1996, by Roland McGrath + +* Bug fixes. + +Major changes in Autoconf 2.8: + + Released March 8th, 1996, by Roland McGrath + +* Bug fixes. + +Major changes in Autoconf 2.7: + + Released November 22nd, 1995, by David J. MacKenzie + +* Bug fixes. + +Major changes in Autoconf 2.6: + + Released November 20th, 1995, by David J. MacKenzie + +* Bug fixes. + +Major changes in Autoconf 2.5: + + Released November 17th, 1995, by Roland McGrath + +* New configure options --bindir, --libdir, --datadir, etc., with + corresponding output variables. +* New macro: AC_CACHE_CHECK, to make using the cache easier. +* config.log contains the command being run as well as any output from it. +* AC_CHECK_LIB can check for libraries with "." or "/" or "+" in their name. +* AC_PROG_INSTALL doesn't cache a name for install-sh, for sharing caches. +* AC_CHECK_PROG, AC_PATH_PROG, AC_CHECK_PROGS, AC_PATH_PROGS, and + AC_CHECK_TOOL can search a path other than $PATH. +* AC_CHECK_SIZEOF takes an optional size to use when cross-compiling. + +Major changes in Autoconf 2.4: + + Released June 14th, 1995, by David J. MacKenzie + +* Fix a few bugs found by Emacs testers. + +Major changes in Autoconf 2.3: + + Released March 27th, 1995, by David J. MacKenzie + +* Fix the cleanup trap in several ways. +* Handle C compilers that are picky about option placement. +* ifnames gets the version number from the right directory. + +Major changes in Autoconf 2.2: + + Released March 8th, 1995, by David J. MacKenzie + +* The ifnames utility is much faster but requires a "new awk" interpreter. +* AC_CHECK_LIB and AC_HAVE_LIBRARY check and add the new + library before existing libs, not after, in case it uses them. +* New macros: AC_FUNC_GETPGRP, AC_CHECK_TOOL. +* Lots of bug fixes. +* Many additions to the TODO file :-) + +Major changes in Autoconf 2.1: + + Released November 4th, 1994, by David J. MacKenzie + +* Fix C++ problems. +* More explanations in the manual. +* Fix a spurious failure in the testsuite. +* Clarify some warning messages. +* autoreconf by default only rebuilds configure and config.h.in files + that are older than any of their particular input files; there is a + --force option to use after installing a new version of Autoconf. + +Thanks to everybody who's submitted changes and additions to Autoconf! +I've incorporated many of them, and am still considering others for +future releases -- but I didn't want to postpone this release indefinitely. + +Caution: don't indiscriminately rebuild configure scripts with +Autoconf version 2. Some configure.in files need minor adjustments to +work with it; the documentation has a chapter on upgrading. A few +configure.in files, including those for GNU Emacs and the GNU C +Library, need major changes because they relied on undocumented +internals of version 1. Future releases of those packages will have +updated configure.in files. + +It's best to use GNU M4 1.3 (or later) with Autoconf version 2. +Autoconf now makes heavy use of M4 diversions, which were implemented +inefficiently in GNU M4 releases before 1.3. + +Major changes in Autoconf 2.0: + + Released October 26th, 1994, by David J. MacKenzie + +** New copyright terms: +* There are no restrictions on distribution or use of configure scripts. + +** Documentation: +* Autoconf manual is reorganized to make information easier to find + and has several new indexes. +* INSTALL is reorganized and clearer and is now made from Texinfo source. + +** New utilities: +* autoscan to generate a preliminary configure.in for a package by + scanning its source code for commonly used nonportable functions, + programs, and header files. +* ifnames to list the symbols used in #if and #ifdef directives in a + source tree. +* autoupdate to update a configure.in to use the version 2 macro names. +* autoreconf to recursively remake configure and configuration header + files in a source tree. + +** Changed utilities: +* autoheader can take pieces of acconfig.h to replace config.h.{top,bot}. +* autoconf and autoheader can look for package-local definition files + in an alternate directory. + +** New macros: +* AC_CACHE_VAL to share results of tests between configure runs. +* AC_DEFUN to define macros, automatically AC_PROVIDE them, and ensure + that macros invoked with AC_REQUIRE don't interrupt other macros. +* AC_CONFIG_AUX_DIR, AC_CANONICAL_SYSTEM, AC_CANONICAL_HOST, AC_LINK_FILES to + support deciding unguessable features based on the host and target types. +* AC_CONFIG_SUBDIRS to recursively configure a source tree. +* AC_ARG_PROGRAM to use the options --program-prefix, + --program-suffix, and --program-transform-name to change the names + of programs being installed. +* AC_PREFIX_DEFAULT to change the default installation prefix. +* AC_TRY_COMPILE to compile a test program without linking it. +* AC_CHECK_TYPE to check whether sys/types.h or stdlib.h defines a given type. +* AC_CHECK_LIB to check for a particular function and library. +* AC_MSG_CHECKING and AC_MSG_RESULT to print test results, on a single line, + whether or not the test succeeds. They obsolete AC_CHECKING and AC_VERBOSE. +* AC_SUBST_FILE to insert one file into another. +* AC_FUNC_MEMCMP to check whether memcmp is 8-bit clean. +* AC_FUNC_STRFTIME to find strftime even if it's in -lintl. +* AC_FUNC_GETMNTENT to find getmntent even if it's in -lsun or -lseq. +* AC_HEADER_SYS_WAIT to check whether sys/wait.h is POSIX.1 compatible. + +** Changed macros: +* Many macros renamed systematically, but old names are accepted for + backward compatibility. +* AC_OUTPUT adds the "automatically generated" comment to + non-Makefiles where it finds @configure_input@ in an input file, to + support files with various comment syntaxes. +* AC_OUTPUT does not replace "prefix" and "exec_prefix" in generated + files when they are not enclosed in @ signs. +* AC_OUTPUT allows the optional environment variable CONFIG_STATUS to + override the file name "config.status". +* AC_OUTPUT takes an optional argument for passing variables from + configure to config.status. +* AC_OUTPUT and AC_CONFIG_HEADER allow you to override the input-file names. +* AC_OUTPUT automatically substitutes the values of CFLAGS, CXXFLAGS, + CPPFLAGS, and LDFLAGS from the environment. +* AC_PROG_CC and AC_PROG_CXX now set CFLAGS and CXXFLAGS, respectively. +* AC_PROG_INSTALL looks for install-sh or install.sh in the directory + specified by AC_CONFIG_AUXDIR, or srcdir or srcdir/.. or + srcdir/../.. by default. +* AC_DEFINE, AC_DEFINE_UNQUOTED, and AC_SUBST are more robust and smaller. +* AC_DEFINE no longer prints anything, because of the new result reporting + mechanism (AC_MSG_CHECKING and AC_MSG_RESULT). +* AC_VERBOSE pays attention to --quiet/--silent, not --verbose. +* AC_ARG_ENABLE and AC_ARG_WITH support whitespace in the arguments to + --enable- and --with- options. +* AC_CHECK_FUNCS and AC_CHECK_HEADERS take optional shell commands to + execute on success or failure. +* Checking for C functions in C++ works. + +** Removed macros: +* AC_REMOTE_TAPE and AC_RSH removed; too specific to tar and cpio, and + better maintained with them. +* AC_ARG_ARRAY removed because no one was likely using it. +* AC_HAVE_POUNDBANG replaced with AC_SYS_INTERPRETER, which doesn't + take arguments, for consistency with all of the other specific checks. + +** New files: +* Comes with config.sub and config.guess, and uses them optionally. +* Uses config.cache to cache test results. An alternate cache file + can be selected with the --cache-file=FILE option. +* Uses optional shell scripts $prefix/share/config.site and + $prefix/etc/config.site to perform site or system specific initializations. +* configure saves compiler output to ./config.log for debugging. +* New files autoconf.m4 and autoheader.m4 load the other Autoconf macros. +* acsite.m4 is the new name for the system-wide aclocal.m4. +* Has a DejaGnu test suite. + +Major changes in Autoconf 1.11: + +* AC_PROG_INSTALL calls install.sh with the -c option. +* AC_SET_MAKE cleans up after itself. +* AC_OUTPUT sets prefix and exec_prefix if they weren't set already. +* AC_OUTPUT prevents shells from looking in PATH for config.status. + +Plus a few other bug fixes. + +Major changes in Autoconf 1.10: + +* autoheader uses config.h.bot if present, analogous to config.h.top. +* AC_PROG_INSTALL looks for install.sh in srcdir or srcdir/.. and + never uses cp. +* AC_PROG_CXX looks for cxx as a C++ compiler. + +Plus several bugs fixed. + +Major changes in Autoconf 1.9: + +* AC_YYTEXT_POINTER replaces AC_DECLARE_YYTEXT. +* AC_SIZEOF_TYPE generates the cpp symbol name automatically, + and autoheader generates entries for those names automatically. +* AC_FIND_X gets the result from xmkmf correctly. +* AC_FIND_X assumes no X if --without-x was given. +* AC_FIND_XTRA adds libraries to the variable X_EXTRA_LIBS. +* AC_PROG_INSTALL finds OSF/1 installbsd. + +Major changes in Autoconf 1.8: + +** New macros: +* New macros AC_LANG_C, AC_LANG_CPLUSPLUS, AC_LANG_SAVE, AC_LANG_RESTORE, + AC_PROG_CXX, AC_PROG_CXXCPP, AC_REQUIRE_CPP + for checking both C++ and C features in one configure script. +* New macros AC_CHECKING, AC_VERBOSE, AC_WARN, AC_ERROR for printing messages. +* New macros AC_FIND_XTRA, AC_MMAP, AC_SIZEOF_TYPE, AC_PREREQ, + AC_SET_MAKE, AC_ENABLE. + +** Changed macros: +* AC_FIND_X looks for X in more places. +* AC_PROG_INSTALL defaults to install.sh instead of cp, if it's in srcdir. + install.sh is distributed with Autoconf. +* AC_DECLARE_YYTEXT has been removed because it can't work, pending + a rewrite of quoting in AC_DEFINE. +* AC_OUTPUT adds its comments in C format when substituting in C files. +* AC_COMPILE_CHECK protects its ECHO-TEXT argument with double quotes. + +** New or changed command line options: +* configure accepts --enable-FEATURE[=ARG] and --disable-FEATURE options. +* configure accepts --without-PACKAGE, which sets withval=no. +* configure accepts --x-includes=DIR and --x-libraries=DIR. +* Giving --with-PACKAGE no argument sets withval=yes instead of withval=1. +* configure accepts --help, --version, --silent/--quiet, --no-create options. +* configure accepts and ignores most other Cygnus configure options, and + warns about unknown options. +* config.status accepts --help, --version options. + +** File names and other changes: +* Relative srcdir values are not made absolute. +* The values of @prefix@ and @exec_prefix@ and @top_srcdir@ get substituted. +* Autoconf library files are installed in ${datadir}/autoconf, not ${datadir}. +* autoheader optionally copies config.h.top to the beginning of config.h.in. +* The example Makefile dependencies for configure et al. work better. +* Namespace cleanup: all shell variables used internally by Autoconf + have names beginning with `ac_'. + +More big improvements are in process for future releases, but have not +yet been (variously) finished, integrated, tested, or documented enough +to release yet. + +Major changes in Autoconf 1.7: + +* New macro AC_OBSOLETE. +* Bugs in Makefile.in fixed. +* AC_LONG_FILE_NAMES improved. + +Major changes in Autoconf 1.6: + +* New macro AC_LONG_64_BITS. +* Multiple .h files can be created. +* AC_FIND_X looks for X files directly if it doesn't find xmkmf. +* AC_ALLOCA defines C_ALLOCA if using alloca.c. +* --with-NAME can take a value, e.g., --with-targets=sun4,hp300bsd. +* Unused --no-create option to configure removed. +* autoheader doesn't change the timestamp of its output file if + the file didn't change. +* All macros that look for libraries now use AC_HAVE_LIBRARY. +* config.status checks three optional environment variables to + modify its behavior. +* The usual bug fixes. + +Major changes in Autoconf 1.5: + +* New macros AC_FIND_X, AC_OFF_T, AC_STAT_MACROS_BROKEN, AC_REVISION. +* autoconf and autoheader scripts have GNU standards conforming + --version and --help options (they print their message and exit). +* Many bug fixes. + +Major changes in Autoconf 1.4: + +* New macros AC_HAVE_POUNDBANG, AC_TIME_WITH_SYS_TIME, AC_LONG_DOUBLE, + AC_GETGROUPS_T, AC_DEFINE_UNQUOTED. +* autoconf and autoheader use the M4 environment variable to determine the + name of the M4 program to use. +* The --macrodir option to autoconf and autoheader specifies the directory + in which acspecific.m4, acgeneral.m4, etc. reside if not the default. +* autoconf and autoheader can take `-' as their file names, which means to + read stdin as input. +* Resulting configure scripts can take a --verbose option which causes them + to print the results of their tests. +* AC_DEFINE quotes its second argument in such a way that spaces, magic + shell characters, etc. will be preserved during various stages of + expansion done by the shell. If you don't want this, use + AC_DEFINE_UNQUOTED instead. +* Much textual processing done with external calls to tr and sed have been + internalized with builtin M4 `patsubst' and `translit' calls. +* AC_OUTPUT doesn't hardwire the file names it outputs. Instead, you can + set the shell variables `gen_files' and `gen_config' to the list of + file names to output. +* AC_DECLARE_YYTEXT does an AC_SUBST of `LEX_OUTPUT_ROOT', which may be + "lex.yy" or "lexyy", depending on the system. +* AC_PROGRAMS_CHECK takes an optional third arg. If given, it is used as + the default value. +* If AC_ALLOCA chooses alloca.c, it also defines STACK_DIRECTION. +* AC_CONST works much more reliably on more systems. +* Many bug fixes. + +Major changes in Autoconf 1.3: + +configure no longer requires awk for packages that use a config.h. +Support handling --with-PACKAGE options. +New `autoheader' script to create `config.h.in' from `configure.in'. +Ignore troublesome -lucb and -lPW when searching for alloca. +Rename --exec_prefix to --exec-prefix for GNU standards conformance. +Improve detection of STDC library. +Add AC_HAVE_LIBRARY to check for non-default libraries. +Function checking should work with future GNU libc releases. + +Major changes in Autoconf 1.2: + +The --srcdir option is now usually unnecessary. +Add a file containing sample comments describing CPP macros. +A comment in config.status tells which host it was configured on. +Substituted variable values can now contain commas. +Fix bugs in various feature checks. + +Major changes in Autoconf 1.1: + +Added AC_STRCOLL macro. +Made AC_GETLOADAVG check for more things. +AC_OUTPUT argument is now optional. +Various bug fixes. + +----- + +Copyright (C) 1993-1996, 1998-2012 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Local Variables: +mode: outline +End: diff --git a/README b/README new file mode 100644 index 0000000..6fb53a9 --- /dev/null +++ b/README @@ -0,0 +1,65 @@ +-*- text -*- + +Autoconf + +Autoconf is an extensible package of M4 macros that produce shell +scripts to automatically configure software source code packages. +These scripts can adapt the packages to many kinds of UNIX-like +systems without manual user intervention. Autoconf creates a +configuration script for a package from a template file that lists the +operating system features that the package can use, in the form of M4 +macro calls. + +Producing configuration scripts using Autoconf requires GNU M4 and +Perl. You should install GNU M4 (version 1.4.6 or later is required; +1.4.14 or later is recommended) and Perl (5.006 or later) before +configuring Autoconf, so that Autoconf's configure script can find +them. The configuration scripts produced by Autoconf are +self-contained, so their users do not need to have Autoconf (or GNU +M4, Perl, etc.). + +You can get GNU M4 here: + +ftp://ftp.gnu.org/gnu/m4/ + +The file INSTALL should be distributed with packages that use +Autoconf-generated configure scripts and Makefiles that conform to the +GNU coding standards. The package's README can just give an overview +of the package, where to report bugs, and a pointer to INSTALL for +instructions on compilation and installation. This removes the need +to maintain many similar sets of installation instructions. + +Be sure to read BUGS and INSTALL. + +Mail suggestions to autoconf@gnu.org, report bugs to +bug-autoconf@gnu.org, and submit patches to autoconf-patches@gnu.org. +All changes can be tracked at the read-only autoconf-commit@gnu.org. +Always include the Autoconf version number, which you can get by +running `autoconf --version'. Archives of bug-autoconf@gnu.org can be +found in , and +similarly for the other mailing lists. + +Licensing + +Autoconf is released under the General Public License version 3 (GPLv3+). +Additionally, Autoconf includes a licensing exception in some of its +source files; see the respective copyright notices for how your +project is impacted by including scripts generated by Autoconf, and the +COPYING.EXCEPTION file for the exception in terms of the Additional +Permissions as described in section 7 of GPLv3. + +For more licensing information, see + and +. + +For any copyright year range specified as YYYY-ZZZZ in this package +note that the range specifies every single year in that closed interval. + +----- + +Copyright (C) 1992-1994, 1998, 2000-2012 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..c3abc72 --- /dev/null +++ b/THANKS @@ -0,0 +1,464 @@ +GNU Autoconf THANKS file + +GNU Autoconf was originally written by David J. MacKenzie. It would +not be what it is today without the invaluable help of these people, +who have reported problems, suggested improvements, or submitted +actual code. Please help us keep this list complete and free from +errors. Also see the AUTHORS file for the list of people with +contributions significant enough to warrant copyright assignment. + +Aaron Crane aaronc@pobox.com +Aaron M. Ucko amu@alum.mit.edu +Aaron W. LaFramboise aaronenvelope277@aaronwl.com +Adam J. Richter adam@yggdrasil.com +Adrian Bunk bunk-gnu@fs.tum.de +Aharon Robbins arnold@gnu.org +Akim Demaille akim@freefriends.org +Akinori Musha knu@iDaemons.org +Alain Knaff Alain.Knaff@imag.fr +Albert Chin-A-Young china@thewrittenword.com +Alec Wolman wolman@cs.washington.edu +Alex Unleashed unledev@gmail.com +Alexander Kurz alexander.kurz@qsc.de +Alexander Mai ? +Alexander Pletzer pletzer@txcorp.com +Alexandre Duret-Lutz duret_g@epita.fr +Alexandre Julliard ? +Alexandre Oliva oliva@lsd.ic.unicamp.br +Alfred G. de Wijn dwijn@iluvatar.eu.org +Alfred M. Szmidt ams@gnu.org +Allan Caffee allan.caffee@gmail.com +Allan Clark allanc@chickenandporn.com +Anders Kaseorg andersk@MIT.EDU +Andreas Buening andreas.buening@nexgo.de +Andreas Jaeger aj@suse.de +Andreas Schott schott@rzg.mpg.de +Andreas Schwab schwab@issan.informatik.uni-dortmund.de +Andreas Waechter andreasw@watson.ibm.com +Andrej Borsenkow borsenkow.msk@sni.de +Andrew Belov ? +Andrew Church achurch@achurch.org +Andrey Simonenko simon@comsys.ntu-kpi.kiev.ua +Andris Pavenis andris.pavenis@iki.fi +Anthony N. Frasso afrasso@yahoo.com +Arkadiusz Miskiewicz arekm@maven.pl +Art Haas ahaas@neosoft.com +Arto C. Nirkko ? +Artur Frysiak wiget@pld.org.pl +Assar Westerlund assar@sics.se +Axel Thimm Axel.Thimm@physik.fu-berlin.de +Bart Oldeman bartoldeman@users.sourceforge.net +Ben Elliston bje@redhat.com +Ben Pfaff pfaffben@debian.org +Benoit Sigoure tsunanet@gmail.com +Bill Moseley moseley@hank.org +Bill Northcott w.northcott@unsw.edu.au +Bill Sommerfeld sommerfeld@apollo.hp.com +BJ Terry bjterry@gmail.com +Bob Friesenhahn bfriesen@simple.dallas.tx.us +Bob Proulx bob@proulx.com +Bob Rossi bob_rossi@cox.net +Bob Wilson bwilson@tensilica.com +Brad Walker me@bradmwalker.com +Braden McDaniel braden@endoframe.com +Bram Moolenaar bram@vim.org +Brian Gough bjg@network-theory.co.uk +Brian J. Murrell brian@sun.com +Bruce Dugan bld0401@gmail.com +Bruce Korb bkorb@gnu.org +Bruce Lilly ? +Bruno Haible haible@ilog.fr +Björn Lindqvist bjourne@gmail.com +Carl Edman cedman@princeton.edu +Carlos Velasco carlosev@newipnet.com +Chad R. Larson chad@anasazi.com +Charles 'Buck' Krasic krasic@cs.ubc.ca +Chikama Masaki masaki.chikama@gmail.com +Chris P. Ross cross@uu.net +Chris Pickett chris.pickett@mail.mcgill.ca +Chris Provenzano proven@cygnus.com +Chris Torek torek@bsdi.com +Christian Cornelssen ccorn@cs.tu-berlin.de +Christian Krackowizer ckrackowiz@std.schuler-ag.com +Christian Krone krischan@sql.de +Christian Rössel christian.roessel@gmx.de +Christophe Jarry christophe.jarry@ouvaton.org +Christopher Hulbert cchgroupmail@gmail.com +Christopher Lee chrislee@ri.cmu.edu +Clinton Roy clinton.roy@gmail.com +Colin Watson cjwatson@debian.org +Corinna Vinschen corinna-cygwin@cygwin.com +Cort Dougan cort@cs.nmt.edu +D'Arcy A MacIsaac ? +Dalibor Topic robilad@kaffe.org +Dan Manthey dan_manthey@partech.com +Daniel Carroll dan@mesastate.edu +Daniel Jacobowitz drow@mvista.com +Daniel Reed ? +Daniele Arena daniele@ripe.net +Dave Adams adams@hpesdwa.fc.hp.com +Dave Erickson retrorandomaccess@hotmail.com +Dave Korn dave.korn.cygwin@googlemail.com +Dave Love fx@gnu.org +David Byron dbyron@hheld.com +David Carter david@carter.net +David Cournapeau david@ar.media.kyoto-u.ac.jp +David Fang fang@csl.cornell.edu +David J. MacKenzie djm@uunet.uu.net +David M. Lloyd dmlloyd@tds.net +David Morgan dmorgan@symark.com +Davie Reiss dreiss@facebook.com +David Relson relson@osagesoftware.com +Dennis J. Linse ? +Derek R. Price derek.price@openavenue.com +Didier Desseaux didess@infonie.fr +Didier Verna didier@xemacs.org +Dieter Jurzitza dieter.jurzitza@t-online.de +Dietmar P. Schindler schd@mra.man.de +Dmitry Grebeniuk gdsfh1@gmail.com +Doug Evans dje@canuck.cygnus.com +Dries Kimpe ? +Dustin J. Mitchell dustin@zmanda.com +Edouard Bechetoille ebecheto@ens-lyon.fr +Elbert Pol elbert.pol@gmail.com +Eli Zaretskii eliz@gnu.org +Elias Pipping pipping@macports.org +Enrique Robledo Arnuncio enrique.robledo@wanadoo.es +Erez Zadok ezk@cs.columbia.edu +Eric Backus ericb@lsid.hp.com +Eric Blake ebb9@byu.net +Eric Lemings lemings@roguewave.com +Eric Mumpower nocturne@mit.edu +Eric Paire ? +Eric Sunshine sunshine@sunshineco.com +Ezra Peisach epeisach@zif.mit.edu +Fedor Sergeev ? +Felix Lee flee@cygnus.com +Fernando Carrijo fcarrijo@freedesktop.org +Franceseco Romani fromani@gmail.com +Frank Denis j@jedi.claranet.fr +François Pinard pinard@iro.umontreal.ca +Fred Kreek Fred.Kreek@kadaster.nl +Frederik Fouvry fouvry@CoLi.Uni-SB.DE +Gareth McCaughan gareth.mccaughan@pobox.com +Gary V. Vaughan gvaughan@oranda.demon.co.uk +Geir Ove Myhr myhr@stud.fim.ntnu.no +Gerrit P. Haase gp@familiehaase.de +Gideon Go gideon.go@gmail.com +Giorgos Keramidas gkeramidas@gmail.com +Giuseppe Guerrini guisguerrini@racine.ra.it +Glenn P. Davis davis@unidata.ucar.edu +Godmar Back gback@cs.utah.edu +Gordon Matzigkeit gord@trick.fig.org +Graham Jenkins c714553@vus415.telstra.com.au +Greg A. Woods woods@weird.com +Greg Schafer gschafer@zip.com.au +Gregorio Guidi ? +Gregory Giannoni sand@narguile.org +Giulio Paci giuliopaci@interfree.it +Guido Draheim Guido.Draheim@gmx.de +Guido Flohr gufl0000@stud.uni-sb.de +Guido van Rossum ? +Guillermo Gomez gomez@mi.uni-erlangen.de +H. Merijn Brand h.m.brand@hccnet.nl +H. Peter Anvin ? +H.J. Lu hjl@gnu.org +Hallvard B Furuseth h.b.furuseth@usit.uio.no +Hans Aberg haberg@math.su.se +Hans Olsson Hans.Olsson@dna.lth.se +Hans Ulrich Niedermann hun@n-dimensional.de +Harlan Stenn stenn@whimsy.udel.edu +Heiko Schlichting inn-workers@fu-berlin.de +Henk Krus h.krus@cyclone.nl +Howard Chu hyc@highlandsun.com +Ian Lance Taylor ian@cygnus.com +Ian Macdonald iamacdo@telkomsa.net +Ian Redfern Ian.Redfern@logicacmg.com +Ilya Bobir ilya.bobir@gmail.com +Ilya Zakharevich ilya@Math.Berkeley.EDU +Ineiev ineiev@yahoo.co.uk +Iohannes m zmoelnig zmoelnig@iem.at +J C Fitzgerald v7022@wave.co.nz +Jaap Haitsma jaap@haitsma.org +James A. Lupo lupoja@feynman.ml.wpafb.af.mil +Jan Madzik jmadzik@gmail.com +Jason Molenda jsm@cygnus.com +Jeff Garzik jgarzik@pobox.com +Jeff Painter ? +Jeff Squyres jsquyres@cisco.com +Jeffrey A Law law@cygnus.com +Jeffrey J. Barteet ? +Jennis Pruett ? +Jens Petersen petersen@redhat.com +Jens Schmidt jens.schmidt35@arcor.de +Jeremy Yallop jeremy@yallop.org +Jerker Bäck jerker.back@home.se +Jim Blandy jimb@wookumz.gnu.ai.mit.edu +Jim Meyering meyering@ascend.com +Jim Warhol jrw@jwarhol.com +Jiro Takabatake jiro@din.or.jp +Jochen Friedrich jochen@scram.de +Joel E. Denny jdenny@ces.clemson.edu +Joel James Adamson joel@chondestes.bio.unc.edu +Joey Mingrone joey@mingrone.org +Johan Danielsson joda@pdc.kth.se +John Calcote john.calcote@gmail.com +John David Anglin dave@hiauly1.hia.nrc.ca +John Fortin fortinj@attglobal.net +John Interrante interran@uluru.stanford.edu +John R. Cary cary@txcorp.com +John W. Eaton jwe@bevo.che.wisc.edu +Jonathan Kamens jik@kamens.brookline.ma.us +Josef Tran josef@timetrackertechnology.com +Josef Vukovic josefvukovic@googlemail.com +Joseph S. Myers jsm28@cam.ac.uk +Joshua G. Hale jgh.emc@gmail.com +Juan Carlos Hurtado adso.lists@gmail.com +Jules Colding colding@42tools.com +Julian C. Cummings cummings@cacr.caltech.edu +Julian Onions j.onions@nexor.co.uk +Julien Danjou acid@debian.org +Julien Élie julien@trigofacile.com +Julio Garvia ? +Justace Clutter ? +Jörn Rennecke amylaar@cygnus.co.uk +Karl Berry karl@cs.umb.edu +Karl Heuer kwzh@gnu.org +Karsten Hopp karsten@redhat.com +Kate Hedstrom ? +Kathryn Hargreaves kathryn@deas.harvard.edu +Kaveh R. Ghazi ghazi@caip.rutgers.edu +Keith Bostic bostic@abyssinian.sleepycat.com +Keith Marshall keith.marshall@total.com +Kelly Anderson tgcorp@attglobal.net +Ken Pizzini ken@halcyon.com +Ken Raeburn raeburn@cygnus.com +Kevin Ryde user42@zip.com.au +Klee Dienes kdienes@apple.com +Koji Arai JCA02266@nifty.ne.jp +Kristian Kvilekval kris@cs.ucsb.edu +Křištof Želechovski giecrilj@stegny.2a.pl +Kurt D. Zeilenga kurt@openldap.org +Larry Jones larry.jones@sdrc.com +Larry Schmitt larry@mail.haleakalawebdesigns.com +Larry Schwimmer rosebud@cyclone.stanford.edu +Lars Hecking lhecking@nmrc.ucc.ie +Lars J. Aas larsa@sim.no +Laurence Darbe ldarby@tuffmail.com +Leo Moisio leo.moisio@gmail.com +Loulou Pouchet loulou@lrde.epita.fr +Luc Maisonobe luc@spaceroots.org +Ludovic Courtes ? +Luke Dalessandro luked@cs.rochester.edu +Magnus Therning therning@gforge.natlab.research.philips.com +Manu manubee@wanadoo.fr +Marc Espie Marc.Espie@liafa.jussieu.fr +Marcus Brinkmann ? +Marcus Daniels marcus@sysc.pdx.edu +Marcus Thiessel marcus@xemacs.org +Mark Cave-Ayland ? +Mark D. Baushke ? +Mark D. Roth ? +Mark Elbrecht snowball3@usa.net +Mark Hessling mark@rexx.org +Mark Kettenis kettenis@gnu.org +Markku Savela msa@msa.tte.vtt.fi +Markus Oberhumer markus.oberhumer@jk.uni-linz.ac.at +Markus Geimer m.geimer@fz-juelich.de +Martin Buchholz martin@xemacs.org +Martin Costabel costabel@wanadoo.fr +Martin Frydl martin@systinet.com +Martin Koeppe mkoeppe@gmx.de +Martin Mokrejs mmokrejs@natur.cuni.cz +Martin Wilck martin@tropos.de +Martyn Johnson Martyn.Johnson@cl.cam.ac.uk +Matěj Týč matej.tyc@gmail.com +Matt Kraai kraai@ftbfs.org +Matteo Frigo ? +Matthew D. Langston langston@SLAC.Stanford.EDU +Matthew Mueller donut@azstarnet.com +Matthew Woehlke mw_triad@users.sourceforge.net +Matthias Andree matthias.andree@gmx.de +Michal Čihař nijel@debian.org +Michael Elizabeth Chastain chastain@cygnus.com +Michael Jenning ? +Michael Matz matz@kde.org +Michael Schoene mrs@mlc.de +Michael Wardle ? +Mike Frysinger vapier@gentoo.org +Mike Hopkirk hops@sco.com +Mike Stump mrs@wrs.com +Mikulas Patocka ? +Miles Bader miles@gnu.ai.mit.edu +Mo DeJong mdejong@cygnus.com +Momchil Velkov velco@fadata.bg +Monty Taylor mordred@inaugust.com +Morten Eriksen mortene@sim.no +Mostafa mostafa_working_away@yahoo.com +Motoyuki Kasahara m-kasahr@sra.co.jp +Nathan Schulte reklipz@gmail.com +Nathanael Nerode neroden@gcc.gnu.org +Nelson H. F. Beebe beebe@math.utah.edu +Nicolas Joly njoly@pasteur.fr +Nicolás Lichtmaier jnl@synapsis-sa.com.ar +Nick Bowler nbowler@elliptictech.com +NightStrike nightstrike@gmail.com +Nishio Futoshi fut_nis@d3.dion.ne.jp +Noah Elliott elliott@hera.llnl.gov +Noah Friedman friedman@gnu.ai.mit.edu +Noah Misch noah@cs.caltech.edu +Norman Gray ? +Olaf Lenz olenz@fias.uni-frankfurt.de +Ole Holm Nielsen Ole.H.Nielsen@fysik.dtu.dk +Oliver Kiddle opk@zsh.org +Olly Betts olly@survex.com +Ossama Othman ossama@debian.org +Pallav Gupta pallavgupta@gmail.com +Paolo Bonzini bonzini@gnu.org +Patrick Tullmann tullmann@cs.utah.edu +Patrick Welche prlw1@newn.cam.ac.uk +Paul Berrevoets paul@swi.com +Paul D. Smith psmith@gnu.org +Paul Eggert eggert@cs.ucla.edu +Paul Gampe paulg@apnic.net +Paul Jarc prj@po.cwru.edu +Paul Martinolich martinol@datasync.com +Paul Pogonyshev ? +Paul Townsend ? +Pavel Roskin pavel_roskin@geocities.com +Pádraig Brady P@draigbrady.com +Per Øyvind Karlsen peroyvind@mandriva.org +Peter Breitenlohner peb@mppmu.mpg.de +Peter Eisentraut peter_e@gmx.net +Peter Hendrickson pdh@wiredyne.com +Peter Johansson trojkan@gmail.com +Peter O'Gorman peter@pogma.com +Peter Palfrader weasel@debian.org +Peter Simons simons@cryp.to +Peter Stephenson pws@csr.com +Philipp Thomas kthomas@gwdg.de +Philippe De Muyter ? +Pierre pierre42d@9online.fr +Pierre Ynard linkfanel@yahoo.fr +Pontus Skoeld pont@soua.net +Rainer Orth ro@TechFak.Uni-Bielefeld.DE +Raja R Harinath harinath@cs.umn.edu +Ralf Corsepius corsepiu@faw.uni-ulm.de +Ralf Menzel menzel@ls6.cs.uni-dortmund.de +Ralf S. Engelschall rse@engelschall.com +Ralf Wildenhues Ralf.Wildenhues@gmx.de +Randall Cotton recotton@earthlink.net +Reuben Thomas rrt@sc3d.org +Richard Dawe rich@phekda.freeserve.co.uk +Richard Stallman rms@gnu.org +Robert Lipe robertlipe@usa.net +Robert S. Maier rsm@math.arizona.edu +Roberto Bagnara bagnara@cs.unipr.it +Rochan rochan@ices.utexas.edu +Roger Leigh rleigh@whinlatter.ukfsn.org +Roland McGrath roland@gnu.org +Rolf Ebert rolf.ebert.gcc@gmx.de +Rolf Vandevaart Rolf.Vandevaart@sun.com +Romain Lenglet romain.lenglet@laposte.net +Ruediger Kuhlmann info@ruediger-kuhlmann.de +Rugxulo rugxulo@gmail.com +Ruslan Babayev ruslan@babayev.com +Russ Allbery rra@stanford.edu +Russ Boylan ross@biostat.ucsf.edu +Ryuji Abe raeva@t3.rim.or.jp +Sam Sexton Sam.Sexton@reuters.com +Sam Sirlin sam@kalessin.jpl.nasa.gov +Sam Steingold sds@gnu.org +Sam Varshavchik mrsam@courier-mta.com +Sander Niemeijer niemeijer@science-and-technology.nl +santilín listas@gestiong.org +Scott Bambrough scottb@corelcomputer.com +Scott McCreary scottmc2@gmail.com +Scott Stanton stanton@scriptics.com +Sebastian Freundt hroptatyr@gna.org +Sergey Poznyakoff ? +Simon Josefsson jas@extundo.com +Simon Leinen simon@lia.di.epfl.ch +Slava Sysoltsev Viatcheslav.Sysoltsev@h-d-gmbh.de +Stefan Seefeld stefan@codesourcery.com +Stefan `Sec' Zehl ? +Stefano Lattarini stefano.lattarini@gmail.com +Stepan Kasal kasal@ucw.cz +Stéphane Chazelas Stephane_Chazelas@yahoo.fr +Stephen Gildea filtered@against.spam +Stephen Rasku srasku@mail.tantalus-systems.com +Stephen P. Schaefer sschaefer@acm.org +Steve Chamberlain sac@cygnus.com +Steve Goetze goetze@dovetail.com +Steve Huston shuston@riverace.com +Steve Robbins steve@nyongwa.montreal.qc.ca +Steven G. Johnson stevenj@alum.mit.edu +Steven R. Loomis srl@icu-project.org +Stu Grossman grossman@cygnus.com +Sumit Pandya sumit@elitecore.com +Syd Polk spolk@cygnus.com +T.E. Dickey dickey@clark.net +Ted Bullock tbullock@canada.com +Theodore Ts'o tytso@mit.edu +Thien-Thi Nguyen ttn@gnu.org +Thomas Jahns jahns@dkrz.de +Thomas Winder tom@vlsivie.tuwien.ac.at +Tim Freeman tim@fungible.com +Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu +Tim Rice tim@multitalents.net +Tim Van Holder tim.van.holder@pandora.be +Tobias Burnus burnus@net-b.de +Tom Browder tom.browder@gmail.com +Tom Epperly tepperly@llnl.gov +Tom Lane tgl@sss.pgh.pa.us +Tom Purcell Tom.Purcell@wang.com +Tom Tromey tromey@cygnus.com +Tom Yu tlyu@mit.edu +Tomohiro Suzuki ? +Tony Leneis tony@plaza.ds.adp.com +Toshio Kuratomi ? +Uwe Seimet us@orbacus.com +Václav Haisman v.haisman@sh.cvut.cz +Vance Shipley vances@motivity.ca +Viktor Dukhovni viktor@anaheim.esm.com +Ville Karaila karaila@iki.fi +Vincent Lefèvre vincent@vinc17.org +Vincent Torri vtorri at univ-evry.fr +Vladimir Volovich vvv@vsu.ru +Volker Borchert bt@teknon.de +Wayne Chapeskie waynec@spinnaker.com +Werner Lemberg wl@gnu.org +Wilfredo Sanchez wsanchez@apple.com +William Pursell bill.pursell@gmail.com +Wiseman Jun junwiseman@gmail.com +Wolfgang Mueller Wolfgang.Mueller@cui.unige.ch +Yaakov Selkowitz yselkowitz@users.sourceforge.net +Yavor Doganov yavor@gnu.org +Yury Puhalsky pooh@cryptopro.ru +Zack Weinberg zack@codesourcery.com +? Seanster@Seanster.com + +Many people are not named here because we lost track of them. We +thank them! Please, help us keep this list up to date. + +================ + +Local Variables: +mode: text +coding: utf-8 +End: + +Copyright (C) 1999-2012 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 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 . diff --git a/TODO b/TODO new file mode 100644 index 0000000..cb124b2 --- /dev/null +++ b/TODO @@ -0,0 +1,601 @@ +-*- outline -*- + +Things it might be nice to do someday. I haven't evaluated all of +these suggestions... their presence here doesn't imply my endorsement. +-djm & his successors. + + +------------------------------------------------------------------------------ + +* Soon + +** AC_CHECK_HEADERS +and the like, don't have a consistent way to handle multi-line +arguments. Fix, test, and document. + +** --target & AC_ARG_PROGRAM +Shouldn't *any* `program' be installed as `$target_alias-program' even +if AC_ARG_PROGRAM is not called? That would be much more predictable. +Ian? + +** AC_CHECK_TOOL... +Write a test that checks that it honors the values set by the user. + +** autom4te and warnings. +Decide what must be done. + +** AC_DEFINE(func, rpl_func) +This scheme causes problems: if for instance, #define malloc +rpl_malloc, then the rest of configure will use an undefined malloc. +Hence some tests fail. Up to now we simply #undef these functions +where we had a problem (cf. AC_FUNC_MKTIME and AC_FUNC_MMAP for +instance). This is _bad_. Maybe the #define func rpl_malloc should +be performed in another file than confdefs.h, say confh.h, which is +used for config.h generation, but not used in configure's own tests. + +** AC_PROG_CC +Currently it tries to put the C compiler in ANSI C mode by default. +We should change this spec so that AC_PROG_CC tries to change the +compiler to be the "nicest" mode, i.e. support for the latest standard +features (currently ISO C99) plus support for all vendor extensions, +even if they are slightly incompatible with C99. The basic idea here +is that AC_PROG_CC should disable pedanticisms and should enable +extensions. + +Have a way to specify different default flags to try; see this thread +for more information: +. + + +* Later + +** config.site +This guy is really a problem. It's contents should be read before +handling the options, so that the latter properly override the latter, +but most people would want a means to have a config.site that depends +on $prefix for instance. + +Some other would like config.site to be looked for in the current +directory. + +Harlan: + + I'll go further. + + I'd like to see several layers of config.site available. + + I'm starting to use "modules" at more places to handle software + installation, and it would be helpful to set general things like: + + prefix=/opt/pkg/@PACKAGE@/@VERSION@ + + once at a global level, and then, for example, have things like: + + --with-etcdir=$prefix/etc + + stuffed "above" the various versions of SSH so I wouldn't have to hunt for + these things every time it was time to recompile a new version of a + previously installed package. + + Something like: + + src/config.site Global stuff + ... + src/ssh/config.site package-specific stuff + src/ssh/ssh-1.2.27/ the actual source code + + I'd like to see automake/autoconf better support packaging tools (like + modules, the *BSD ports/ stuff, and others would like hooks for RPMs). + + +** Languages +Integrate other Fortrans etc. + +** AC_CHECK_FUNCS and AC_TRY_LINK_FUNC +I have still not understood what's the difference between the two +which requires to have two different sources: AC_LANG_CALL and +AC_LANG_FUNC_LINK_TRY (which names seem to be inappropriate). +Wouldn't one be enough? + +** Libtool +Define once for all the hooks they need, any redefinition of +AC_PROG_CC etc. is way too dangerous and too limiting. The GCC team +certainly has requirements too. + +** AC_SEARCH_LIBS +From: Tom Tromey +Subject: AC_SEARCH_LIBS + +I think AC_SEARCH_LIBS has an unfortunate interface. + +ACTION-IF-FOUND is run in addition to the default action. Most +autoconf macros don't work this way. This is confusing. + +In my case I can't use this macro because it always appends to LIBS. +I don't want that. Instead I want to use ACTION-IF-FOUND to set my +own macro. + +Also there is no documentation on the format of library names expected +by the macro. Even a reference to some other function (e.g., "the +library name can have the same forms as with AC_HAVE_LIBRARY" (if that +is true, which I haven't looked up) would be fine. + +** Revamp the language support +We should probably have a language for C89, and C99. We must give the +means to the users to specify some needs over the compilers, and +actually look for a good compiler, instead of stopping at the first +compiler we find. + +In fact, the AC_CHECK_PROG macro and variations have proved their +limitation: we really need something more powerful and simpler too. + +We must take into account the specific problems of the GCC team. We +must extend AC_CHECK_FUNCS in order to use the headers instead of fake +declarations as we currently do. Default headers could be triggered +on when C99, but not with the other languages? + +At the end, we should have a simple macro, such as AC_LANG_COMPILER +for instance, which is built over simpler macros. Each language +support should come with these simpler macros, but each language +should follow the same process. + +We also need to check the srcext which are supported by the compiler. +In fact, this macro is also probably the right place to check for +objext and exeext. + +** AC_PROG_CC_STDC +Should be: AC_PROG_CC_ISO? Or even more specific for the ISO version? +Should include more tests (e.g., AC_C_CONST etc.)? See Peter for very +useful comments on the technology. Should we make this a new +language? AC_LANG(ISO C). It would be great to introduce +AC_LANG_COMPILER in this release too. + +** autoupdate +We should probably install the files which do not depend upon the +user, just the Autoconf library files. But conversely autoupdate must +be opened to user macros, i.e., for instance libtool itself must be +able to say that AM_PROG_LIBTOOL is now AC_PROG_LIBTOOL, and have +autoupdate do its job on old configure.ac. + +* Even later + +** Pentateuch +Heck, there is nothing after `Deuteronomy'! We're stuck, but we +_must_ update the `history' section. Can't go to `New testament', we +might hurt feelings? In addition, it means that the Messiah has come, +which might be slightly presumptuous :). Still, someone fluent in +English should write it. + +** AC_PATH_X +Hi Robert, + +> Hi, autoconf people. While packaging plotutils-2.2 (just released), +> I noticed what looks like a small error in the autoconf-2.13 texinfo +> documentation, the entry for AC_PATH_XTRA, in particular. + +> The documentation says that AC_PATH_XTRA +> ... adds the C compiler flags that X needs to output variable +> `X_CFLAGS', and the X linker flags to `X_LIBS'. If X is not +> available, adds `-DX_DISPLAY_MISSING' to `X_CFLAGS'. + +> It doesn't seem to add -DX_DISPLAY_MISSING to X_CFLAGS. X_DISPLAY_MISSING +> ends up defined in config.h, instead. + +That's only because you're no doubt using AC_CONFIG_HEADER(..) to send +your defines to a config.h-style file. If you were to not use +AC_CONFIG_HEADER and X was not available, then you would see +-DX_DISPLAY_MISSING being added to @DEFS@ as your output files were being +generated. + +But you are right--the documentation is not clear about this. I'll change +it. + +> In fact it looks to me as if right now, X_CFLAGS is used only for +> specifying directories where X include files are stored, via the `-I' option. +> Maybe it should really be called X_CPPFLAGS? + +Well, perhaps. If you feel strongly about this, feel free to submit a +change-request. There is a hyperlink to the bug tracking database from +http://sourceware.cygnus.com/autoconf/. With the way it reads in the +manual right now, it's designed to allow the user to set additional flags +in the environment prior to running configure--and these don't need to be +limited to just -I flags. Nevertheless, I can see a few clean ways to +improve this. + +** AC_SYS_INTERPRETER +Defines $interpval. This is not a standard name. Do we want to keep +this? Clarify our policy on those names. + +** Allow --recursive to config.status +So that --recheck does not pass --no-recursive to configure. + +* autoconf.texi +Move the specific macro documentation blocks into the source files, +and use a doc-block extraction/merge technique to get documentation +into texi-file. This should help avoid bit-rot in the doc, and make +the doc easier to update when people add/change macros. The name +"autodoc" is probably already taken so we probably need another one. + +------------------------------------------------------------------------------ + +* m4 + +** I18n +The error messages for indir and dumpdef are uselessly different. Fix +this for translators. + +** Tracing `builtin' +F**k! --trace FOO does not catch indir([FOO], $@)! +Fixed in M4 1.6, but we can't rely on it yet. + +** m4 loops +As of 2.63, m4_for has a fixed iteration count for speed in the common +usage case. But it used to allow the user to alter iteration count by +reassigning the iterator, allowing a break-like functionality (or even +infloops). Does this need a new (but maybe slower) macro? Should we +also provide something like m4_while([TEST], [EXPR])? Maybe an +m4_break() that works inside a looping construct? +http://lists.gnu.org/archive/html/autoconf-patches/2008-08/msg00121.html + +* Autoconf 3 + +** Cache name spaces. +Cf the discussion with Kaveh. One would like to +AC_CHECK_FUNCS(bar) +# Do something that changes the environment +AC_CACHE_PUSH(foo) +AC_CHECK_FUNCS(bar) +AC_CACHE_POP +in order not to erase the results of a check with another. + +** Cache var names +should depend upon the current language. + +** Use m4 lists? +I think one sad decision in Autoconf was to use white space separated +lists for some arguments. For instance AC_CHECK_FUNCS(foo bar). I +tend to think that, even if it is not as nice, we should use m4 lists, +i.e., AC_CHECK_FUNCS([foo, bar]) in this case. This would ease +specializing loops, and more importantly, make them much more robust. + +A typical example of things that can be performed if we use m4 lists +instead of white space separated lists is the case of things that have +a space in their names, eg, structures. + +With the current scheme it would be extremely difficult to loop over +AC_CHECK_STRUCTS(struct foo struct bar), while it natural and well +defined for m4 lists: AC_CHECK_STRUCTS([struct foo, struct bar]). + +I know that makes a huge difference in syntax, but a major release +should be ready to settle a new world. We *can* provide helping tools +for the transition. Considering the benefits, I really think it is +worth thinking. --akim + +** Forbid shell variables as main arguments +The fact that we have to support shell variables as main argument +forbids many interesting constructions (specialization are not always +possible, equally for AC_REQUIRE'ing macros *with their arguments*). +Any loop should be handled by m4 itself, and nothing should be hidden +to it. As a consequence, shell variables on the main arguments become +useless (the main reason we support shell variables is to allow the +loop versions of single argument macros, eg, to go from AC_CHECK_FUNC +to AC_CHECK_FUNCS). --akim + +** Use the @SUBST@ technology also for headers instead of #undef. +This requires that acconfig.h becomes completely obsolete: autoheader +should generate all the templates. + +** Specializing loops. +For instance, make AC_CHECK_FUNC[S] automatically use any particular +macros for the listed functions. +This requires to obsolete the feature `break' in ACTION-IF, since all +the loops are to be handled by m4, not sh. + +** Faces of a test +Each macro can potentially come with several faces: of course the +configure snippet (AC_foo), a config.h snippet (AH_foo), a system.h +snippet (AS_foo), documentation (AD_foo) and, why not, the some C code +for instance to replace a function. + +The motivation for the `faces' is to encapsulate. It is abnormal that +once one has a configure macro, then she has to read somewhere to find +the piece of system.h to use etc. The macros should come in a +self-contained way, or, said it another way, PnP. + +A major issue is that of specialization. AC_CHECK_HEADER (or another +name) for instance, will have as an effect, via system.h to include +the header. But if the test for the header is specific, the generic +AS_CHECK_HEADER will still be used. Conversely, some headers may not +require a specific AC_ tests, but a specialized AS_ macro. + +------------------------------------------------------------------------------ + +* Make AC_CHECK_LIB check whether the function is already available + before checking for the library. This might involve adding another + kind of cache variable to indicate whether a given function needs a + given library. The current ac_cv_func_ variables are intended to + indicate whether the function is in the default libraries, but + actually also take into account whatever value LIBS had when they + were checked for. + + Isn't this the issue of AC_SEARCH_LIB? --akim + How come the list of libraries to browse not an additional parameter + of AC_CHECK_FUNC, exactly like for the headers? --akim + +------------------------------------------------------------------------------ + +* Select the right CONFIG_SHELL automatically (for Ultrix, Lynx especially.) + +------------------------------------------------------------------------------ + +* Doc: Centralize information on POSIX, MS-DOS, cross-compiling, and + other important topics. + +------------------------------------------------------------------------------ + +* Mike Haertel's suggestions: + +** Cross compiling: + +*** Error messages include instructions for overriding defaults using +config.site. + +*** Distribute a config.site corresponding to a hypothetical bare POSIX system with c89. + +** Site defaults: + +*** Convention for consistency checking of env vars and options in config.site so config.site can print obnoxious messages if it doesn't like options or env vars that users use. + +------------------------------------------------------------------------------ + +* Look at user contributed macros: + IEEE double precision math + more + +------------------------------------------------------------------------------ + +* Provide a way to create a config.h *and* set the DEFS variable from within +the same configure script. + +------------------------------------------------------------------------------ + +In config.status comment, put the host/target/build types, if used. + +------------------------------------------------------------------------------ + +It would be nice if I could (in the Makefile.in files) set the +relative name of config.h. You have config.h ../config.h +../../config.h's all over the place, in the findutils-4.1 directory. +From: "Randall S. Winchester" + +------------------------------------------------------------------------------ + + ls -lt configure configure.in | sort +doesn't work right if configure.in is from a symlink farm, where the +symlink has either a timestamp of its own, or under BSD 4.4, it has +the timestamp of the current directory, neither of which +helps. Changing it to + ls -Llt configure configure.in | sort +works for me, though I don't know how portable that is +_Mark_ + +------------------------------------------------------------------------------ + +Here is the thing I would like the most; +AC_PKG_WITH(PACKAGE, HELP_STRING, PACKAGE-ROOT, PACKAGE-LIBS, PACKAGE-DEFS, + PACKAGE-CCPFLAGS) +like + +AC_PKG_WITH(kerberos,,/usr/local/athena,-lkrb -ldes,[KERBEROS KRB4 +CRYPT],include) +AC_PKG_WITH(hesiod, +[if hesiod is not in kerberos-root add --with-hesiod-root=somewhere] +,,-lhesiod,HESIOD,,) +AC_PKG_WITH(glue,,,-lglue,GLUE,,) +AC_PKG_WITH(bind,,/usr/local/bind, [lib/resolv.a lib/lib44bsd.a], ,include) +After the appropriate checks, the existence of the files, and libs and such +LIBS=$LIBS $PKG-LIBS +DEFS=$DEFS $PKG-DEFS +CPPFLAGS=$PKG-CPPFLAGS $CPPFLAGS +$PKG-ROOT=$PKG-ROOT +The cppflags should reverse the order so that you can have; +-I/usr/local/bind/include -I/usr/local/athena/include +and +-L/usr/local/athena/lib -lkrb -ldes /usr/local/bind/lib/libresolv.a +as order matters. + +also an AC_PKG_CHK_HEADER +and an AC_PKG_CHK_FUNCTION +so one can give alternate names to check for stuff ($PKG-ROOT/lib for +example) +From: Randall Winchester + +------------------------------------------------------------------------------ + +AC_C_CROSS assumes that configure was called like 'CC=target-gcc; +./configure'. I want to write a package that has target dependent +libraries and host dependent tools. So I don't like to lose the +distinction between CC and [G]CC_FOR_TARGET. AC_C_CROSS should check +for equality of target and host. + +It would be great if + +GCC_FOR_TARGET +AR_FOR_TARGET +RANLIB_FOR_TARGET + +would be set automatically if host != target. +AC_LANG_CROSS_C would be nice too, to check header files +etc. with GCC_FOR_TARGET instead of CC + +Here is one simple test + +if test "x$host" != "x$target"; then +AC_CHECK_PROGS(AR_FOR_TARGET, + [$target-ar, $prefix/$target/bin/ar], $target-ar) +AC_CHECK_PROGS(RANLIB_FOR_TARGET, $target-ranlib, $target-ranlib) + [$target-ranlib, $prefix/$target/bin/ranlib], $target-ranlib) +AC_CHECK_PROGS(GCC_FOR_TARGET, $target-gcc, $target-gcc) + [$target-gcc, $prefix/$target/bin/gcc], $target-gcc) +fi + +From: nennker@cs.tu-berlin.DE (Axel Nennker) + +(also look in the autoconf mailing list archives for the proposed +CHECK_TARGET_TOOL macro from Natanael Nerode, a gcc configury guru). + +------------------------------------------------------------------------------ + +The problem occurs with the following libc functions in SunOS 5.4: + + fnmatch glob globfree regcomp regexec regerror regfree wordexp wordfree + +It also occurs with a bunch more libposix4 functions that most people +probably aren't worried about yet, e.g. shm_open. + +All these functions fail with errno set to ENOSYS (89) +``Operation not applicable''. + +Perhaps Autoconf should have a specific macro for fnmatch, another for +glob+globfree, another for regcomp+regexec+regerror+regfree, and +another for wordexp+wordfree. This wouldn't solve the problem in +general, but it should work for Solaris 2.4. Or Autoconf could limit +itself to fnmatch and regcomp, the only two functions that I know have +been a problem so far. + +From Paul Eggert. + +------------------------------------------------------------------------------ + +Make easy macros for checking for X functions and libraries, such as Motif. + +------------------------------------------------------------------------------ + +There are basically three ways to lock files + lockf, fnctl, flock +I'd be interested in adding a macro to pick the "right one" if you're +interested. + +From: Rich Salz + +------------------------------------------------------------------------------ + +Timezone calculations checks. + +------------------------------------------------------------------------------ + +Support different default file system layouts, e.g. SVR4, Linux. +Of course, this can be done locally with config.site. + +------------------------------------------------------------------------------ + +I wonder if it is possible to get the name of X11's app-defaults +directory by autoconf. Moreover, I'd like to have a general way of +accessing imake variables by autoconf, something like + +AC_DEFINE(WINE_APP_DEFAULTS, AC_IMAKE_VAR(XAPPLOADDIR)) + +Slaven Rezic + +------------------------------------------------------------------------------ + +Every user running X11 usually has a directory like *X11* in his PATH +variable. By replacing bin by include, you can find good places to +look for the include files or libraries. + +From: rcb5@win.tue.nl (Richard Verhoeven) + +------------------------------------------------------------------------------ + +In most cases, when autoscan suggests something, using the search or +index command into the Info reader for autoconf manual quickly +explains me what the test is about. However, for header files and +functions, the search might fail, because the test is not of the +specific kind. The Autoconf manual should reflect somewhere all +header files or functions (non-specific features, generally) +triggering autoscan to generate tests, and tell in a few words what is +the problem, and the suggested approach for a solution; that is, how +one should use the result of testing the feature. + +From: pinard@iro.umontreal.ca + +------------------------------------------------------------------------------ + +It would be nice if the configure script would handle an option such as +--x-libraries="/usr/openwin/lib /usr/dt/lib". + +Rick Boykin + +Under Solaris 2.4, the regular X includes and libs and the Motif +includes and libs are in different places. The Emacs configure script +actually allows dir1:dir2:dir3 -- + + if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then + LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` + LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` + fi + if test "${x_includes}" != NONE && test -n "${x_includes}"; then + C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` + fi + +------------------------------------------------------------------------------ + + What messages should be produced by default, if any? + +Probably only the few most important ones, like which configuration +name was used, whether X or Xt are in use, etc. The specific +decisions, and progress messages, should be recorded on the terminal +only if --verbose is used. + + --silent just suppresses the "checking for...result" + messages, not the "creating FOO" messages. + +I think the default should be to suppress both. +From: Richard Stallman + +There is no distinction now between +important decisions (we have X) vs minor decisions (we have lstat). +However, there are probably only a few things you deem important enough to +announce and only those few things will need to be changed. +Perhaps config.status could be written with comments saying what was +decided. +From: Roland McGrath + +------------------------------------------------------------------------------ + +Another thing I wish for is a macro which figures out which libraries are +needed for BSD-style sockets. AC_PATH_X already detects this +correctly...so it's just a matter of separating out the socket-related code. +From: "Joel N. Weber II" + +------------------------------------------------------------------------------ + +in order to use the AC_CANONICAL_SYSTEM macro, I have to have +install-sh somewhere nearby --- why is this? I have no real reason to +distribute install-sh, other than that its absence breaks this code. + +Shouldn't the above loop be looking for config.sub and config.guess? +From: jimb@totoro.bio.indiana.edu (Jim Blandy) + +adding AC_CANONICAL_HOST to my configure.in script caused +all sorts of odd/unexplained errors. Obviously, I had to go +get copies of config.guess, config.sub and install-sh from the +autoconf distribution, but the error messages and autoconf docs +didn't explain that very well. +From: bostic@bsdi.com (Keith Bostic) + +------------------------------------------------------------------------------ + +Perhaps also have AC_TRY_COMPILER try to link an invalid program, and +die if the compiler seemed to succeed--in which case it's not usable +with autoconf scripts. + +------------------------------------------------------------------------------ + +Copyright (C) 1994-1996, 1999-2002, 2007-2012 Free Software Foundation, +Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..bf6339b --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,691 @@ +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.11.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +# 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 10 + +# AM_PATH_LISPDIR +# --------------- +AC_DEFUN([AM_PATH_LISPDIR], +[AC_PREREQ([2.60])dnl + # If set to t, that means we are running in a shell under Emacs. + # If you have an Emacs named "t", then use the full path. + test x"$EMACS" = xt && EMACS= + AC_CHECK_PROGS([EMACS], [emacs xemacs], [no]) + AC_ARG_VAR([EMACS], [the Emacs editor command]) + AC_ARG_VAR([EMACSLOADPATH], [the Emacs library search path]) + AC_ARG_WITH([lispdir], + [ --with-lispdir override the default lisp directory], + [ lispdir="$withval" + AC_MSG_CHECKING([where .elc files should go]) + AC_MSG_RESULT([$lispdir])], + [ + AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [ + if test $EMACS != "no"; then + if test x${lispdir+set} != xset; then + # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly + # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, + # which is non-obvious for non-emacs users. + # Redirecting /dev/null should help a bit; pity we can't detect "broken" + # emacsen earlier and avoid running this altogether. + AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' conftest.out]) + am_cv_lispdir=`sed -n \ + -e 's,/$,,' \ + -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ + -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datarootdir}/\1,;p;q;}' \ + conftest.out` + rm conftest.out + fi + fi + test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' + ]) + lispdir="$am_cv_lispdir" +]) +AC_SUBST([lispdir]) +])# AM_PATH_LISPDIR + +AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/autobuild.m4]) +m4_include([m4/m4.m4]) +m4_include([m4/make-case.m4]) diff --git a/bin/Makefile.am b/bin/Makefile.am new file mode 100644 index 0000000..a6e3b22 --- /dev/null +++ b/bin/Makefile.am @@ -0,0 +1,103 @@ +# Make Autoconf commands. + +# Copyright (C) 1999-2007, 2009-2012 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 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 . + +include ../lib/freeze.mk + +bin_SCRIPTS = autom4te \ + autoconf autoheader autoreconf ifnames autoscan autoupdate + +EXTRA_DIST = autoconf.as autoheader.in autoreconf.in autoupdate.in ifnames.in \ + autoscan.in autom4te.in + +# Files that should be removed, but which Automake does not know. +MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp + +# Get the release year from ../ChangeLog. +RELEASE_YEAR = \ + `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog` + +## ------------- ## +## The scripts. ## +## ------------- ## + +edit = sed \ + -e 's|@SHELL[@]|$(SHELL)|g' \ + -e 's|@PERL[@]|$(PERL)|g' \ + -e 's|@PERL_FLOCK[@]|$(PERL_FLOCK)|g' \ + -e 's|@bindir[@]|$(bindir)|g' \ + -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \ + -e 's|@prefix[@]|$(prefix)|g' \ + -e 's|@autoconf-name[@]|'`echo autoconf | sed '$(transform)'`'|g' \ + -e 's|@autoheader-name[@]|'`echo autoheader | sed '$(transform)'`'|g' \ + -e 's|@autom4te-name[@]|'`echo autom4te | sed '$(transform)'`'|g' \ + -e 's|@M4[@]|$(M4)|g' \ + -e 's|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \ + -e 's|@M4_GNU[@]|$(M4_GNU)|g' \ + -e 's|@AWK[@]|$(AWK)|g' \ + -e 's|@RELEASE_YEAR[@]|'$(RELEASE_YEAR)'|g' \ + -e 's|@VERSION[@]|$(VERSION)|g' \ + -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ + -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g' + +$(top_builddir)/bin/autom4te: autom4te + +# autoconf is written in M4sh. +# FIXME: this target should depend on the frozen files below lib/m4sugar, +# otherwise autom4te may pick up a frozen m4sh.m4f from an earlier +# installation below the same $(prefix); work around this with --melt. +autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies) + $(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@ + +## All the scripts depend on Makefile so that they are rebuilt when the +## prefix etc. changes. It took quite a while to have the rule correct, +## don't break it! +## Use chmod -w to prevent people from editing the wrong file by accident. +$(bin_SCRIPTS): Makefile + rm -f $@ $@.tmp + srcdir=''; \ + test -f ./$@.in || srcdir=$(srcdir)/; \ + $(edit) $${srcdir}$@.in >$@.tmp + chmod +x $@.tmp + chmod a-w $@.tmp + mv $@.tmp $@ + +autoconf: autoconf.in +autoheader: $(srcdir)/autoheader.in +autom4te: $(srcdir)/autom4te.in +autoreconf: $(srcdir)/autoreconf.in +autoscan: $(srcdir)/autoscan.in +autoupdate: $(srcdir)/autoupdate.in +ifnames: $(srcdir)/ifnames.in + + +## --------------- ## +## Building TAGS. ## +## --------------- ## + +TAGS_DEPENDENCIES = $(EXTRA_DIST) + +letters = abcdefghijklmnopqrstuvwxyz +LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ +DIGITS = 0123456789 +WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]* +ETAGS_PERL = --lang=perl \ + autoheader.in autoreconf.in autoupdate.in autoscan.in autom4te.in \ + ifnames.in +ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \ + autoconf.in + +ETAGS_ARGS = $(ETAGS_PERL) $(ETAGS_SH) diff --git a/bin/Makefile.in b/bin/Makefile.in new file mode 100644 index 0000000..4201b5a --- /dev/null +++ b/bin/Makefile.in @@ -0,0 +1,662 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Make Autoconf commands. + +# Copyright (C) 1999-2007, 2009-2012 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 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 . + +# Freeze M4 files. + +# Copyright (C) 2002, 2004, 2006-2012 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 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 . + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/../lib/freeze.mk $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +subdir = bin +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/autobuild.m4 \ + $(top_srcdir)/m4/m4.m4 $(top_srcdir)/m4/make-case.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(bindir)" +SCRIPTS = $(bin_SCRIPTS) +SOURCES = +DIST_SOURCES = +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EMACS = @EMACS@ +EMACSLOADPATH = @EMACSLOADPATH@ +EXPR = @EXPR@ +GREP = @GREP@ +HELP2MAN = @HELP2MAN@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +M4 = @M4@ +M4_DEBUGFILE = @M4_DEBUGFILE@ +M4_GNU = @M4_GNU@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERL_FLOCK = @PERL_FLOCK@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TEST_EMACS = @TEST_EMACS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ +ac_cv_sh_n_works = @ac_cv_sh_n_works@ +ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUFFIXES = .m4 .m4f +AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg + +# Do not use AUTOM4TE here, since maint.mk (my-distcheck) +# checks if we are independent of Autoconf by defining AUTOM4TE (and +# others) to `false'. Autoconf provides autom4te, so that doesn't +# apply to us. +MY_AUTOM4TE = \ + autom4te_perllibdir='$(top_srcdir)'/lib \ + AUTOM4TE_CFG='$(AUTOM4TE_CFG)' $(top_builddir)/bin/autom4te \ + -B '$(top_builddir)'/lib -B '$(top_srcdir)'/lib # keep ` ' + + +# Factor the dependencies between all the frozen files. +# Some day we should explain to Automake how to use autom4te to compute +# the dependencies... +src_libdir = $(top_srcdir)/lib +build_libdir = $(top_builddir)/lib +m4f_dependencies = $(top_builddir)/bin/autom4te $(AUTOM4TE_CFG) +m4sugar_m4f_dependencies = \ + $(m4f_dependencies) \ + $(src_libdir)/m4sugar/m4sugar.m4 \ + $(build_libdir)/m4sugar/version.m4 + +m4sh_m4f_dependencies = \ + $(m4sugar_m4f_dependencies) \ + $(src_libdir)/m4sugar/m4sh.m4 + +autotest_m4f_dependencies = \ + $(m4sh_m4f_dependencies) \ + $(src_libdir)/autotest/autotest.m4 \ + $(src_libdir)/autotest/general.m4 \ + $(src_libdir)/autotest/specific.m4 + +autoconf_m4f_dependencies = \ + $(m4sh_m4f_dependencies) \ + $(src_libdir)/autoconf/autoscan.m4 \ + $(src_libdir)/autoconf/general.m4 \ + $(src_libdir)/autoconf/autoheader.m4 \ + $(src_libdir)/autoconf/autoupdate.m4 \ + $(src_libdir)/autoconf/autotest.m4 \ + $(src_libdir)/autoconf/status.m4 \ + $(src_libdir)/autoconf/oldnames.m4 \ + $(src_libdir)/autoconf/specific.m4 \ + $(src_libdir)/autoconf/lang.m4 \ + $(src_libdir)/autoconf/c.m4 \ + $(src_libdir)/autoconf/fortran.m4 \ + $(src_libdir)/autoconf/erlang.m4 \ + $(src_libdir)/autoconf/go.m4 \ + $(src_libdir)/autoconf/functions.m4 \ + $(src_libdir)/autoconf/headers.m4 \ + $(src_libdir)/autoconf/types.m4 \ + $(src_libdir)/autoconf/libs.m4 \ + $(src_libdir)/autoconf/programs.m4 \ + $(src_libdir)/autoconf/autoconf.m4 + +ETAGS_FOR_M4 = \ + --lang=none \ + --regex='/\(m4_define\|define\)(\[\([^]]*\)\]/\2/' + +ETAGS_FOR_M4SUGAR = \ + $(ETAGS_FOR_M4) \ + --regex='/m4_defun(\[\([^]]*\)\]/\1/' + +ETAGS_FOR_AUTOCONF = \ + $(ETAGS_FOR_M4SUGAR) \ + --regex='/\(A[CU]_DEFUN\|AU_ALIAS\)(\[\([^]]*\)\]/\2/' \ + --regex='/AN_\(FUNCTION\|HEADER\|IDENTIFIER\|LIBRARY\|MAKEVAR\|PROGRAM\)(\[\([^]]*\)\]/\2/' + +bin_SCRIPTS = autom4te \ + autoconf autoheader autoreconf ifnames autoscan autoupdate + +EXTRA_DIST = autoconf.as autoheader.in autoreconf.in autoupdate.in ifnames.in \ + autoscan.in autom4te.in + + +# Files that should be removed, but which Automake does not know. +MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp + +# Get the release year from ../ChangeLog. +RELEASE_YEAR = \ + `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog` + +edit = sed \ + -e 's|@SHELL[@]|$(SHELL)|g' \ + -e 's|@PERL[@]|$(PERL)|g' \ + -e 's|@PERL_FLOCK[@]|$(PERL_FLOCK)|g' \ + -e 's|@bindir[@]|$(bindir)|g' \ + -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \ + -e 's|@prefix[@]|$(prefix)|g' \ + -e 's|@autoconf-name[@]|'`echo autoconf | sed '$(transform)'`'|g' \ + -e 's|@autoheader-name[@]|'`echo autoheader | sed '$(transform)'`'|g' \ + -e 's|@autom4te-name[@]|'`echo autom4te | sed '$(transform)'`'|g' \ + -e 's|@M4[@]|$(M4)|g' \ + -e 's|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \ + -e 's|@M4_GNU[@]|$(M4_GNU)|g' \ + -e 's|@AWK[@]|$(AWK)|g' \ + -e 's|@RELEASE_YEAR[@]|'$(RELEASE_YEAR)'|g' \ + -e 's|@VERSION[@]|$(VERSION)|g' \ + -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ + -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g' + +TAGS_DEPENDENCIES = $(EXTRA_DIST) +letters = abcdefghijklmnopqrstuvwxyz +LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ +DIGITS = 0123456789 +WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]* +ETAGS_PERL = --lang=perl \ + autoheader.in autoreconf.in autoupdate.in autoscan.in autom4te.in \ + ifnames.in + +ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \ + autoconf.in + +ETAGS_ARGS = $(ETAGS_PERL) $(ETAGS_SH) +all: all-am + +.SUFFIXES: +.SUFFIXES: .m4 .m4f +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../lib/freeze.mk $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu bin/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +installcheck-binSCRIPTS: $(bin_SCRIPTS) + bad=0; pid=$$$$; list="$(bin_SCRIPTS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err &2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binSCRIPTS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: installcheck-binSCRIPTS + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binSCRIPTS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + ctags distclean distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am \ + installcheck-binSCRIPTS installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binSCRIPTS + +$(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in + cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg + +# When processing the file with diversion disabled, there must be no +# output but comments and empty lines. +# If freezing produces output, something went wrong: a bad `divert', +# or an improper paren etc. +# It may happen that the output does not end with an end of line, hence +# force an end of line when reporting errors. +.m4.m4f: + $(MY_AUTOM4TE) \ + --language=$* \ + --freeze \ + --output=$@ + +# For parallel builds. +$(build_libdir)/m4sugar/version.m4: + cd $(build_libdir)/m4sugar && $(MAKE) $(AM_MAKEFLAGS) version.m4 + +check-forbidden-patterns: + @if (cd $(srcdir) && \ + $(GREP) $(forbidden_patterns) $(forbidden_patterns_files)) \ + >forbidden.log; then \ + echo "ERROR: forbidden patterns were found:" >&2; \ + sed "s|^|$*.m4: |" &2; \ + echo >&2; \ + exit 1; \ + else \ + rm -f forbidden.log; \ + fi + +$(top_builddir)/bin/autom4te: autom4te + +# autoconf is written in M4sh. +# FIXME: this target should depend on the frozen files below lib/m4sugar, +# otherwise autom4te may pick up a frozen m4sh.m4f from an earlier +# installation below the same $(prefix); work around this with --melt. +autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies) + $(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@ + +$(bin_SCRIPTS): Makefile + rm -f $@ $@.tmp + srcdir=''; \ + test -f ./$@.in || srcdir=$(srcdir)/; \ + $(edit) $${srcdir}$@.in >$@.tmp + chmod +x $@.tmp + chmod a-w $@.tmp + mv $@.tmp $@ + +autoconf: autoconf.in +autoheader: $(srcdir)/autoheader.in +autom4te: $(srcdir)/autom4te.in +autoreconf: $(srcdir)/autoreconf.in +autoscan: $(srcdir)/autoscan.in +autoupdate: $(srcdir)/autoupdate.in +ifnames: $(srcdir)/ifnames.in + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/bin/autoconf.as b/bin/autoconf.as new file mode 100644 index 0000000..aa85394 --- /dev/null +++ b/bin/autoconf.as @@ -0,0 +1,191 @@ +AS_INIT[]dnl -*- shell-script -*- +m4_divert_push([HEADER-COPYRIGHT])dnl +# @configure_input@ +# autoconf -- create `configure' using m4 macros + +# Copyright (C) 1992-1994, 1996, 1999-2012 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 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 . + +m4_divert_pop([HEADER-COPYRIGHT])dnl back to BODY +AS_ME_PREPARE[]dnl + +usage=["\ +Usage: $0 [OPTION]... [TEMPLATE-FILE] + +Generate a configuration script from a TEMPLATE-FILE if given, or +\`configure.ac' if present, or else \`configure.in'. Output is sent +to the standard output if TEMPLATE-FILE is given, else into +\`configure'. + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit + -v, --verbose verbosely report processing + -d, --debug don't remove temporary files + -f, --force consider all files obsolete + -o, --output=FILE save output in FILE (stdout is the default) + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax] + +Warning categories include: + \`cross' cross compilation issues + \`obsolete' obsolete constructs + \`syntax' dubious syntactic constructs + \`all' all the warnings + \`no-CATEGORY' turn off the warnings on CATEGORY + \`none' turn off all the warnings + \`error' warnings are error + +The environment variables \`M4' and \`WARNINGS' are honored. + +Library directories: + -B, --prepend-include=DIR prepend directory DIR to search path + -I, --include=DIR append directory DIR to search path + +Tracing: + -t, --trace=MACRO[:FORMAT] report the list of calls to MACRO + -i, --initialization also trace Autoconf's initialization process + +In tracing mode, no configuration script is created. FORMAT defaults +to \`\$f:\$l:\$n:\$%'; see \`autom4te --help' for information about FORMAT. + +Report bugs to . +GNU Autoconf home page: . +General help using GNU software: ."] + +version=["\ +autoconf (@PACKAGE_NAME@) @VERSION@ +Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. +License GPLv3+/Autoconf: GNU GPL version 3 or later +, +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Written by David J. MacKenzie and Akim Demaille."] + +help="\ +Try \`$as_me --help' for more information." + +exit_missing_arg=' + m4_bpatsubst([AS_ERROR([option `$[1]' requires an argument$as_nl$help])], + ['], ['\\''])' +# restore font-lock: ' + +# Variables. +: ${AUTOM4TE='@bindir@/@autom4te-name@'} +autom4te_options= +outfile= +verbose=false + +# Parse command line. +while test $# -gt 0 ; do + option=[`expr "x$1" : 'x\(--[^=]*\)' \| \ + "x$1" : 'x\(-.\)'`] + optarg=[`expr "x$1" : 'x--[^=]*=\(.*\)' \| \ + "x$1" : 'x-.\(.*\)'`] + case $1 in + --version | -V ) + echo "$version" ; exit ;; + --help | -h ) + AS_ECHO(["$usage"]); exit ;; + + --verbose | -v ) + verbose=: + autom4te_options="$autom4te_options $1"; shift ;; + + # Arguments passed as is to autom4te. + --debug | -d | \ + --force | -f | \ + --include=* | -I?* | \ + --prepend-include=* | -B?* | \ + --warnings=* | -W?* ) + case $1 in + *\'*) arg=`AS_ECHO(["$1"]) | sed "s/'/'\\\\\\\\''/g"` ;; #' + *) arg=$1 ;; + esac + autom4te_options="$autom4te_options '$arg'"; shift ;; + # Options with separated arg passed as is to autom4te. + --include | -I | \ + --prepend-include | -B | \ + --warnings | -W ) + test $# = 1 && eval "$exit_missing_arg" + case $2 in + *\'*) arg=`AS_ECHO(["$2"]) | sed "s/'/'\\\\\\\\''/g"` ;; #' + *) arg=$2 ;; + esac + autom4te_options="$autom4te_options $option '$arg'" + shift; shift ;; + + --trace=* | -t?* ) + traces="$traces --trace='"`AS_ECHO(["$optarg"]) | sed "s/'/'\\\\\\\\''/g"`"'" + shift ;; + --trace | -t ) + test $# = 1 && eval "$exit_missing_arg" + traces="$traces --trace='"`AS_ECHO(["$[2]"]) | sed "s/'/'\\\\\\\\''/g"`"'" + shift; shift ;; + --initialization | -i ) + autom4te_options="$autom4te_options --melt" + shift;; + + --output=* | -o?* ) + outfile=$optarg + shift ;; + --output | -o ) + test $# = 1 && eval "$exit_missing_arg" + outfile=$2 + shift; shift ;; + + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + exec >&2 + AS_ERROR([invalid option `$[1]'$as_nl$help]) ;; #` + * ) + break ;; + esac +done + +# Find the input file. +case $# in + 0) + if test -f configure.ac; then + if test -f configure.in; then + AS_ECHO(["$as_me: warning: both \`configure.ac' and \`configure.in' are present."]) >&2 + AS_ECHO(["$as_me: warning: proceeding with \`configure.ac'."]) >&2 + fi + infile=configure.ac + elif test -f configure.in; then + infile=configure.in + else + AS_ERROR([no input file]) + fi + test -z "$traces" && test -z "$outfile" && outfile=configure;; + 1) + infile=$1 ;; + *) exec >&2 + AS_ERROR([invalid number of arguments$as_nl$help]) ;; +esac + +# Unless specified, the output is stdout. +test -z "$outfile" && outfile=- + +# Run autom4te with expansion. +eval set x "$autom4te_options" \ + --language=autoconf --output=\"\$outfile\" "$traces" \"\$infile\" +shift +$verbose && AS_ECHO(["$as_me: running $AUTOM4TE $*"]) >&2 +exec "$AUTOM4TE" "$@" diff --git a/bin/autoheader.in b/bin/autoheader.in new file mode 100644 index 0000000..d81a313 --- /dev/null +++ b/bin/autoheader.in @@ -0,0 +1,303 @@ +#! @PERL@ +# -*- Perl -*- +# @configure_input@ + +eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + if 0; + +# autoheader -- create `config.h.in' from `configure.ac' + +# Copyright (C) 1992-1994, 1996, 1998-2012 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 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 . + +# Written by Roland McGrath. +# Rewritten in Perl by Akim Demaille. + +BEGIN +{ + my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; + unshift @INC, "$pkgdatadir"; + + # Override SHELL. On DJGPP SHELL may not be set to a shell + # that can handle redirection and quote arguments correctly, + # e.g.: COMMAND.COM. For DJGPP always use the shell that configure + # has detected. + $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); +} + +use Autom4te::ChannelDefs; +use Autom4te::Channels; +use Autom4te::Configure_ac; +use Autom4te::FileUtils; +use Autom4te::General; +use Autom4te::XFile; +use strict; + +# Using `do FILE', we need `local' vars. +use vars qw ($config_h %verbatim %symbol); + +# Lib files. +my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; +local $config_h; +my $config_h_in; +my @prepend_include; +my @include; + + +# $HELP +# ----- +$help = "Usage: $0 [OPTION]... [TEMPLATE-FILE] + +Create a template file of C \`\#define\' statements for \`configure\' to +use. To this end, scan TEMPLATE-FILE, or \`configure.ac\' if present, +or else \`configure.in\'. + + -h, --help print this help, then exit + -V, --version print version number, then exit + -v, --verbose verbosely report processing + -d, --debug don\'t remove temporary files + -f, --force consider all files obsolete + -W, --warnings=CATEGORY report the warnings falling in CATEGORY + +" . Autom4te::ChannelDefs::usage () . " + +Library directories: + -B, --prepend-include=DIR prepend directory DIR to search path + -I, --include=DIR append directory DIR to search path + +Report bugs to . +GNU Autoconf home page: . +General help using GNU software: . +"; + + +# $VERSION +# -------- +$version = "autoheader (@PACKAGE_NAME@) @VERSION@ +Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. +License GPLv3+/Autoconf: GNU GPL version 3 or later +, +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Written by Roland McGrath and Akim Demaille. +"; + + +## ---------- ## +## Routines. ## +## ---------- ## + + +# parse_args () +# ------------- +# Process any command line arguments. +sub parse_args () +{ + my $srcdir; + + parse_WARNINGS; + getopt ('I|include=s' => \@include, + 'B|prepend-include=s' => \@prepend_include, + 'W|warnings=s' => \&parse_warnings); + + if (! @ARGV) + { + my $configure_ac = require_configure_ac; + push @ARGV, $configure_ac; + } +} + + +## -------------- ## +## Main program. ## +## -------------- ## + +mktmpdir ('ah'); +switch_warning 'obsolete'; +parse_args; + +# Preach. +my $config_h_top = find_file ("config.h.top?", + reverse (@prepend_include), @include); +my $config_h_bot = find_file ("config.h.bot?", + reverse (@prepend_include), @include); +my $acconfig_h = find_file ("acconfig.h?", + reverse (@prepend_include), @include); +if ($config_h_top || $config_h_bot || $acconfig_h) + { + my $msg = << "END"; + Using auxiliary files such as \`acconfig.h\', \`config.h.bot\' + and \`config.h.top\', to define templates for \`config.h.in\' + is deprecated and discouraged. + + Using the third argument of \`AC_DEFINE\' and + \`AC_DEFINE_UNQUOTED\' allows one to define a template without + \`acconfig.h\': + + AC_DEFINE([NEED_FUNC_MAIN], 1, + [Define if a function \`main\' is needed.]) + + More sophisticated templates can also be produced, see the + documentation. +END + $msg =~ s/^ /WARNING: /gm; + msg 'obsolete', $msg; + } + +# Set up autoconf. +my $autoconf = "'$autom4te' --language=autoconf "; +$autoconf .= join (' --include=', '', map { shell_quote ($_) } @include); +$autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include); +$autoconf .= ' --debug' if $debug; +$autoconf .= ' --force' if $force; +$autoconf .= ' --verbose' if $verbose; + +# ----------------------- # +# Real work starts here. # +# ----------------------- # + +# Source what the traces are trying to tell us. +verb "$me: running $autoconf to trace from $ARGV[0]"; +my $quoted_tmp = shell_quote ($tmp); +xsystem ("$autoconf" + # If you change this list, update the + # `Autoheader-preselections' section of autom4te.in. + . ' --trace AC_CONFIG_HEADERS:\'$$config_h ||= \'"\'"\'$1\'"\'"\';\'' + . ' --trace AH_OUTPUT:\'$$verbatim{\'"\'"\'$1\'"\'"\'} = \'"\'"\'$2\'"\'"\';\'' + . ' --trace AC_DEFINE_TRACE_LITERAL:\'$$symbol{\'"\'"\'$1\'"\'"\'} = 1;\'' + . " " . shell_quote ($ARGV[0]) . " >$quoted_tmp/traces.pl"); + +local (%verbatim, %symbol); +debug "$me: \`do'ing $tmp/traces.pl:\n" . `sed 's/^/| /' $quoted_tmp/traces.pl`; +do "$tmp/traces.pl"; +warn "couldn't parse $tmp/traces.pl: $@" if $@; +unless ($config_h) + { + error "error: AC_CONFIG_HEADERS not found in $ARGV[0]"; + exit 1; + } + +# We template only the first CONFIG_HEADER. +$config_h =~ s/ .*//; +# Support "outfile[:infile]", defaulting infile="outfile.in". +($config_h, $config_h_in) = split (':', $config_h, 2); +$config_h_in ||= "$config_h.in"; + +# %SYMBOL might contain things like `F77_FUNC(name,NAME)', but we keep +# only the name of the macro. +%symbol = map { s/\(.*//; $_ => 1 } keys %symbol; + +my $out = new Autom4te::XFile ("> " . open_quote ("$tmp/config.hin")); + +# Don't write "do not edit" -- it will get copied into the +# config.h, which it's ok to edit. +print $out "/* $config_h_in. Generated from $ARGV[0] by autoheader. */\n"; + +# Dump the top. +if ($config_h_top) + { + my $in = new Autom4te::XFile ("< " . open_quote ($config_h_top)); + while ($_ = $in->getline) + { + print $out $_; + } + } + +# Dump `acconfig.h', except for its bottom portion. +if ($acconfig_h) + { + my $in = new Autom4te::XFile ("< " . open_quote ($acconfig_h)); + while ($_ = $in->getline) + { + last if /\@BOTTOM\@/; + next if /\@TOP\@/; + print $out $_; + } + } + +# Dump the templates from `configure.ac'. +foreach (sort keys %verbatim) + { + print $out "\n$verbatim{$_}\n"; + } + +# Dump bottom portion of `acconfig.h'. +if ($acconfig_h) + { + my $in = new Autom4te::XFile ("< " . open_quote ($acconfig_h)); + my $dump = 0; + while ($_ = $in->getline) + { + print $out $_ if $dump; + $dump = 1 if /\@BOTTOM\@/; + } + } + +# Dump the bottom. +if ($config_h_bot) + { + my $in = new Autom4te::XFile ("< " . open_quote ($config_h_bot)); + while ($_ = $in->getline) + { + print $out $_; + } + } + +$out->close; + +# Check that all the symbols have a template. +{ + my $in = new Autom4te::XFile ("< " . open_quote ("$tmp/config.hin")); + my $suggest_ac_define = 1; + while ($_ = $in->getline) + { + my ($symbol) = /^\#\s*\w+\s+(\w+)/ + or next; + delete $symbol{$symbol}; + } + foreach (sort keys %symbol) + { + msg 'syntax', "warning: missing template: $_"; + if ($suggest_ac_define) + { + msg 'syntax', "Use AC_DEFINE([$_], [], [Description])"; + $suggest_ac_define = 0; + } + + } + exit 1 + if keys %symbol; +} + +update_file ("$tmp/config.hin", "$config_h_in", $force); + +### Setup "GNU" style for perl-mode and cperl-mode. +## Local Variables: +## perl-indent-level: 2 +## perl-continued-statement-offset: 2 +## perl-continued-brace-offset: 0 +## perl-brace-offset: 0 +## perl-brace-imaginary-offset: 0 +## perl-label-offset: -2 +## cperl-indent-level: 2 +## cperl-brace-offset: 0 +## cperl-continued-brace-offset: 0 +## cperl-label-offset: -2 +## cperl-extra-newline-before-brace: t +## cperl-merge-trailing-else: nil +## cperl-continued-statement-offset: 2 +## End: diff --git a/bin/autom4te.in b/bin/autom4te.in new file mode 100644 index 0000000..11773c9 --- /dev/null +++ b/bin/autom4te.in @@ -0,0 +1,1074 @@ +#! @PERL@ -w +# -*- perl -*- +# @configure_input@ + +eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + if 0; + +# autom4te - Wrapper around M4 libraries. +# Copyright (C) 2001-2003, 2005-2012 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 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 . + + +BEGIN +{ + my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell + # that can handle redirection and quote arguments correctly, + # e.g.: COMMAND.COM. For DJGPP always use the shell that configure + # has detected. + $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); +} + +use Autom4te::C4che; +use Autom4te::ChannelDefs; +use Autom4te::Channels; +use Autom4te::FileUtils; +use Autom4te::General; +use Autom4te::XFile; +use File::Basename; +use strict; + +# Data directory. +my $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@'; + +# $LANGUAGE{LANGUAGE} -- Automatic options for LANGUAGE. +my %language; + +my $output = '-'; + +# Mode of the output file except for traces. +my $mode = "0666"; + +# If melt, don't use frozen files. +my $melt = 0; + +# Names of the cache directory, cache directory index, trace cache +# prefix, and output cache prefix. And the IO object for the index. +my $cache; +my $icache; +my $tcache; +my $ocache; +my $icache_file; + +my $flock_implemented = '@PERL_FLOCK@'; + +# The macros to trace mapped to their format, as specified by the +# user. +my %trace; + +# The macros the user will want to trace in the future. +# We need `include' to get the included file, `m4_pattern_forbid' and +# `m4_pattern_allow' to check the output. +# +# FIXME: What about `sinclude'? +my @preselect = ('include', + 'm4_pattern_allow', 'm4_pattern_forbid', + '_m4_warn'); + +# M4 include path. +my @include; + +# Do we freeze? +my $freeze = 0; + +# $M4. +my $m4 = $ENV{"M4"} || '@M4@'; +# Some non-GNU m4's don't reject the --help option, so give them /dev/null. +fatal "need GNU m4 1.4 or later: $m4" + if system "$m4 --help &1 | grep reload-state >/dev/null"; + +# Set some high recursion limit as the default limit, 250, has already +# been hit with AC_OUTPUT. Don't override the user's choice. +$m4 .= ' --nesting-limit=1024' + if " $m4 " !~ / (--nesting-limit(=[0-9]+)?|-L[0-9]*) /; + + +# @M4_BUILTIN -- M4 builtins and a useful comment. +my @m4_builtin = `echo dumpdef | $m4 2>&1 >/dev/null`; +map { s/:.*//;s/\W// } @m4_builtin; + + +# %M4_BUILTIN_ALTERNATE_NAME +# -------------------------- +# The builtins are renamed, e.g., `define' is renamed `m4_define'. +# So map `define' to `m4_define' and conversely. +# Some macros don't follow this scheme: be sure to properly map to their +# alternate name too. +# +# FIXME: Trace status of renamed builtins was fixed in M4 1.4.5, which +# we now depend on; do we still need to do this mapping? +# +# So we will merge them, i.e., tracing `BUILTIN' or tracing +# `m4_BUILTIN' will be the same: tracing both, but honoring the +# *last* trace specification. +# +# FIXME: This is not enough: in the output `$0' will be `BUILTIN' +# sometimes and `m4_BUILTIN' at others. We should return a unique name, +# the one specified by the user. +# +# FIXME: To be absolutely rigorous, I would say that given that we +# _redefine_ divert (instead of _copying_ it), divert and the like +# should not be part of this list. +my %m4_builtin_alternate_name; +@m4_builtin_alternate_name{"$_", "m4_$_"} = ("m4_$_", "$_") + foreach (grep { !/m4wrap|m4exit|dnl|ifelse|__.*__/ } @m4_builtin); +@m4_builtin_alternate_name{"ifelse", "m4_if"} = ("m4_if", "ifelse"); +@m4_builtin_alternate_name{"m4exit", "m4_exit"} = ("m4_exit", "m4exit"); +@m4_builtin_alternate_name{"m4wrap", "m4_wrap"} = ("m4_wrap", "m4wrap"); + + +# $HELP +# ----- +$help = "Usage: $0 [OPTION]... [FILES] + +Run GNU M4 on the FILES, avoiding useless runs. Output the traces if tracing, +the frozen file if freezing, otherwise the expansion of the FILES. + +If some of the FILES are named \`FILE.m4f\' they are considered to be M4 +frozen files of all the previous files (which are therefore not loaded). +If \`FILE.m4f\' is not found, then \`FILE.m4\' will be used, together with +all the previous files. + +Some files may be optional, i.e., will only be processed if found in the +include path, but then must end in \`.m4?\'; the question mark is not part of +the actual file name. + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit + -v, --verbose verbosely report processing + -d, --debug don\'t remove temporary files + -o, --output=FILE save output in FILE (defaults to \`-\', stdout) + -f, --force don\'t rely on cached values + -W, --warnings=CATEGORY report the warnings falling in CATEGORY + -l, --language=LANG specify the set of M4 macros to use + -C, --cache=DIRECTORY preserve results for future runs in DIRECTORY + --no-cache disable the cache + -m, --mode=OCTAL change the non trace output file mode (0666) + -M, --melt don\'t use M4 frozen files + +Languages include: + \`Autoconf\' create Autoconf configure scripts + \`Autotest\' create Autotest test suites + \`M4sh\' create M4sh shell scripts + \`M4sugar\' create M4sugar output + +" . Autom4te::ChannelDefs::usage . " + +The environment variables \`M4\' and \`WARNINGS\' are honored. + +Library directories: + -B, --prepend-include=DIR prepend directory DIR to search path + -I, --include=DIR append directory DIR to search path + +Tracing: + -t, --trace=MACRO[:FORMAT] report the MACRO invocations + -p, --preselect=MACRO prepare to trace MACRO in a future run + +Freezing: + -F, --freeze produce an M4 frozen state file for FILES + +FORMAT defaults to \`\$f:\$l:\$n:\$%\', and can use the following escapes: + \$\$ literal \$ + \$f file where macro was called + \$l line where macro was called + \$d nesting depth of macro call + \$n name of the macro + \$NUM argument NUM, unquoted and with newlines + \$SEP\@ all arguments, with newlines, quoted, and separated by SEP + \$SEP* all arguments, with newlines, unquoted, and separated by SEP + \$SEP% all arguments, without newlines, unquoted, and separated by SEP +SEP can be empty for the default (comma for \@ and *, colon for %), +a single character for that character, or {STRING} to use a string. + +Report bugs to . +GNU Autoconf home page: . +General help using GNU software: . +"; + +# $VERSION +# -------- +$version = <<"EOF"; +autom4te (@PACKAGE_NAME@) @VERSION@ +Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. +License GPLv3+/Autoconf: GNU GPL version 3 or later +, +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Written by Akim Demaille. +EOF + + +## ---------- ## +## Routines. ## +## ---------- ## + + +# $OPTION +# files_to_options (@FILE) +# ------------------------ +# Transform Autom4te conventions (e.g., using foo.m4f to designate a frozen +# file) into a suitable command line for M4 (e.g., using --reload-state). +# parse_args guarantees that we will see at most one frozen file, and that +# if a frozen file is present, it is the first argument. +sub files_to_options (@) +{ + my (@file) = @_; + my @res; + foreach my $file (@file) + { + my $arg = shell_quote ($file); + if ($file =~ /\.m4f$/) + { + $arg = "--reload-state=$arg"; + # If the user downgraded M4 from 1.6 to 1.4.x after freezing + # the file, then we ensure the frozen __m4_version__ will + # not cause m4_init to make the wrong decision about the + # current M4 version. + $arg .= " --undefine=__m4_version__" + unless grep {/__m4_version__/} @m4_builtin; + } + push @res, $arg; + } + return join ' ', @res; +} + + +# load_configuration ($FILE) +# -------------------------- +# Load the configuration $FILE. +sub load_configuration ($) +{ + my ($file) = @_; + use Text::ParseWords; + + my $cfg = new Autom4te::XFile ("< " . open_quote ($file)); + my $lang; + while ($_ = $cfg->getline) + { + chomp; + # Comments. + next + if /^\s*(\#.*)?$/; + + my @words = shellwords ($_); + my $type = shift @words; + if ($type eq 'begin-language:') + { + fatal "$file:$.: end-language missing for: $lang" + if defined $lang; + $lang = lc $words[0]; + } + elsif ($type eq 'end-language:') + { + error "$file:$.: end-language mismatch: $lang" + if $lang ne lc $words[0]; + $lang = undef; + } + elsif ($type eq 'args:') + { + fatal "$file:$.: no current language" + unless defined $lang; + push @{$language{$lang}}, @words; + } + else + { + error "$file:$.: unknown directive: $type"; + } + } +} + + +# parse_args () +# ------------- +# Process any command line arguments. +sub parse_args () +{ + # We want to look for the early options, which should not be found + # in the configuration file. Prepend to the user arguments. + # Perform this repeatedly so that we can use --language in language + # definitions. Beware that there can be several --language + # invocations. + my @language; + do { + @language = (); + use Getopt::Long; + Getopt::Long::Configure ("pass_through", "permute"); + GetOptions ("l|language=s" => \@language); + + foreach (@language) + { + error "unknown language: $_" + unless exists $language{lc $_}; + unshift @ARGV, @{$language{lc $_}}; + } + } while @language; + + # --debug is useless: it is parsed below. + if (exists $ENV{'AUTOM4TE_DEBUG'}) + { + print STDERR "$me: concrete arguments:\n"; + foreach my $arg (@ARGV) + { + print STDERR "| $arg\n"; + } + } + + # Process the arguments for real this time. + my @trace; + my @prepend_include; + parse_WARNINGS; + getopt + ( + # Operation modes: + "o|output=s" => \$output, + "W|warnings=s" => \&parse_warnings, + "m|mode=s" => \$mode, + "M|melt" => \$melt, + + # Library directories: + "B|prepend-include=s" => \@prepend_include, + "I|include=s" => \@include, + + # Tracing: + # Using a hash for traces is seducing. Unfortunately, upon `-t FOO', + # instead of mapping `FOO' to undef, Getopt maps it to `1', preventing + # us from distinguishing `-t FOO' from `-t FOO=1'. So let's do it + # by hand. + "t|trace=s" => \@trace, + "p|preselect=s" => \@preselect, + + # Freezing. + "F|freeze" => \$freeze, + + # Caching. + "C|cache=s" => \$cache, + "no-cache" => sub { $cache = undef; }, + ); + + fatal "too few arguments +Try `$me --help' for more information." + unless @ARGV; + + # Freezing: + # We cannot trace at the same time (well, we can, but it sounds insane). + # And it implies melting: there is risk not to update properly using + # old frozen files, and worse yet: we could load a frozen file and + # refreeze it! A sort of caching :) + fatal "cannot freeze and trace" + if $freeze && @trace; + $melt = 1 + if $freeze; + + # Names of the cache directory, cache directory index, trace cache + # prefix, and output cache prefix. If the cache is not to be + # preserved, default to a temporary directory (automatically removed + # on exit). + $cache = $tmp + unless $cache; + $icache = "$cache/requests"; + $tcache = "$cache/traces."; + $ocache = "$cache/output."; + + # Normalize the includes: the first occurrence is enough, several is + # a pain since it introduces a useless difference in the path which + # invalidates the cache. And strip `.' which is implicit and always + # first. + @include = grep { !/^\.$/ } uniq (reverse(@prepend_include), @include); + + # Convert @trace to %trace, and work around the M4 builtins tracing + # problem. + # The default format is `$f:$l:$n:$%'. + foreach (@trace) + { + /^([^:]+)(?::(.*))?$/ms; + $trace{$1} = defined $2 ? $2 : '$f:$l:$n:$%'; + $trace{$m4_builtin_alternate_name{$1}} = $trace{$1} + if exists $m4_builtin_alternate_name{$1}; + } + + # Work around the M4 builtins tracing problem for @PRESELECT. + # FIXME: Is this still needed, now that we rely on M4 1.4.5? + push (@preselect, + map { $m4_builtin_alternate_name{$_} } + grep { exists $m4_builtin_alternate_name{$_} } @preselect); + + # If we find frozen files, then all the files before it are + # discarded: the frozen file is supposed to include them all. + # + # We don't want to depend upon m4's --include to find the top level + # files, so we use `find_file' here. Try to get a canonical name, + # as it's part of the key for caching. And some files are optional + # (also handled by `find_file'). + my @argv; + foreach (@ARGV) + { + if ($_ eq '-') + { + push @argv, $_; + } + elsif (/\.m4f$/) + { + # Frozen files are optional => pass a `?' to `find_file'. + my $file = find_file ("$_?", @include); + if (!$melt && $file) + { + @argv = ($file); + } + else + { + s/\.m4f$/.m4/; + push @argv, find_file ($_, @include); + } + } + else + { + my $file = find_file ($_, @include); + push @argv, $file + if $file; + } + } + @ARGV = @argv; +} + + +# handle_m4 ($REQ, @MACRO) +# ------------------------ +# Run m4 on the input files, and save the traces on the @MACRO. +sub handle_m4 ($@) +{ + my ($req, @macro) = @_; + + # GNU m4 appends when using --debugfile/--error-output. + unlink ($tcache . $req->id . "t"); + + # Run m4. + # + # We don't output directly to the cache files, to avoid problems + # when we are interrupted (that leaves corrupted files). + xsystem ("$m4 @M4_GNU@" + . join (' --include=', '', map { shell_quote ($_) } @include) + . ' --debug=aflq' + . (!exists $ENV{'AUTOM4TE_NO_FATAL'} ? ' --fatal-warning' : '') + . " @M4_DEBUGFILE@=" . shell_quote ("$tcache" . $req->id . "t") + . join (' --trace=', '', map { shell_quote ($_) } sort @macro) + . " " . files_to_options (@ARGV) + . " > " . shell_quote ("$ocache" . $req->id . "t")); + + # Everything went ok: preserve the outputs. + foreach my $file (map { $_ . $req->id } ($tcache, $ocache)) + { + use File::Copy; + move ("${file}t", "$file") + or fatal "cannot rename ${file}t as $file: $!"; + } +} + + +# warn_forbidden ($WHERE, $WORD, %FORBIDDEN) +# ------------------------------------------ +# $WORD is forbidden. Warn with a dedicated error message if in +# %FORBIDDEN, otherwise a simple `error: possibly undefined macro' +# will do. +my $first_warn_forbidden = 1; +sub warn_forbidden ($$%) +{ + my ($where, $word, %forbidden) = @_; + my $message; + + for my $re (sort keys %forbidden) + { + if ($word =~ $re) + { + $message = $forbidden{$re}; + last; + } + } + $message ||= "possibly undefined macro: $word"; + warn "$where: error: $message\n"; + if ($first_warn_forbidden) + { + warn < 'forbid:$1:$2', + 'm4_pattern_allow' => 'allow:$1')); + my @patterns = new Autom4te::XFile ("< " . open_quote ("$tmp/patterns"))->getlines; + chomp @patterns; + my %forbidden = + map { /^forbid:([^:]+):.+$/ => /^forbid:[^:]+:(.+)$/ } @patterns; + my $forbidden = join ('|', map { /^forbid:([^:]+)/ } @patterns) || "^\$"; + my $allowed = join ('|', map { /^allow:([^:]+)/ } @patterns) || "^\$"; + + verb "forbidden tokens: $forbidden"; + verb "forbidden token : $_ => $forbidden{$_}" + foreach (sort keys %forbidden); + verb "allowed tokens: $allowed"; + + # Read the (cached) raw M4 output, produce the actual result. We + # have to use the 2nd arg to have Autom4te::XFile honor the third, but then + # stdout is to be handled by hand :(. Don't use fdopen as it means + # we will close STDOUT, which we already do in END. + my $out = new Autom4te::XFile; + if ($output eq '-') + { + $out->open (">$output"); + } + else + { + $out->open($output, O_CREAT | O_WRONLY | O_TRUNC, oct ($mode)); + } + fatal "cannot create $output: $!" + unless $out; + my $in = new Autom4te::XFile ("< " . open_quote ($ocache . $req->id)); + + my %prohibited; + my $res; + while ($_ = $in->getline) + { + s/\s+$//; + s/__oline__/$./g; + s/\@<:\@/[/g; + s/\@:>\@/]/g; + s/\@\{:\@/(/g; + s/\@:\}\@/)/g; + s/\@S\|\@/\$/g; + s/\@%:\@/#/g; + + $res = $_; + + # Don't complain in comments. Well, until we have something + # better, don't consider `#include' etc. are comments. + s/\#.*// + unless /^\#\s*(if|include|endif|ifdef|ifndef|define)\b/; + foreach (split (/\W+/)) + { + $prohibited{$_} = $. + if !/^$/ && /$forbidden/o && !/$allowed/o && ! exists $prohibited{$_}; + } + + # Performed *last*: the empty quadrigraph. + $res =~ s/\@&t\@//g; + + print $out "$res\n"; + } + + $out->close(); + + # If no forbidden words, we're done. + return + if ! %prohibited; + + # Locate the forbidden words in the last input file. + # This is unsatisfying but... + $exit_code = 1; + if ($ARGV[$#ARGV] ne '-') + { + my $prohibited = '\b(' . join ('|', keys %prohibited) . ')\b'; + my $file = new Autom4te::XFile ("< " . open_quote ($ARGV[$#ARGV])); + + while ($_ = $file->getline) + { + # Don't complain in comments. Well, until we have something + # better, don't consider `#include' etc. to be comments. + s/\#.*// + unless /^\#(if|include|endif|ifdef|ifndef|define)\b/; + + # Complain once per word, but possibly several times per line. + while (/$prohibited/) + { + my $word = $1; + warn_forbidden ("$ARGV[$#ARGV]:$.", $word, %forbidden); + delete $prohibited{$word}; + # If we're done, exit. + return + if ! %prohibited; + $prohibited = '\b(' . join ('|', keys %prohibited) . ')\b'; + } + } + } + warn_forbidden ("$output:$prohibited{$_}", $_, %forbidden) + foreach (sort { $prohibited{$a} <=> $prohibited{$b} } keys %prohibited); +} + + +## --------------------- ## +## Handling the traces. ## +## --------------------- ## + + +# $M4_MACRO +# trace_format_to_m4 ($FORMAT) +# ---------------------------- +# Convert a trace $FORMAT into a M4 trace processing macro's body. +sub trace_format_to_m4 ($) +{ + my ($format) = @_; + my $underscore = $_; + my %escape = (# File name. + 'f' => '$1', + # Line number. + 'l' => '$2', + # Depth. + 'd' => '$3', + # Name (also available as $0). + 'n' => '$4', + # Escaped dollar. + '$' => '$'); + + my $res = ''; + $_ = $format; + while ($_) + { + # $n -> $(n + 4) + if (s/^\$(\d+)//) + { + $res .= "\$" . ($1 + 4); + } + # $x, no separator given. + elsif (s/^\$([fldn\$])//) + { + $res .= $escape{$1}; + } + # $.x or ${sep}x. + elsif (s/^\$\{([^}]*)\}([@*%])// + || s/^\$(.?)([@*%])//) + { + # $@, list of quoted effective arguments. + if ($2 eq '@') + { + $res .= ']at_at([' . ($1 ? $1 : ',') . '], $@)['; + } + # $*, list of unquoted effective arguments. + elsif ($2 eq '*') + { + $res .= ']at_star([' . ($1 ? $1 : ',') . '], $@)['; + } + # $%, list of flattened unquoted effective arguments. + elsif ($2 eq '%') + { + $res .= ']at_percent([' . ($1 ? $1 : ':') . '], $@)['; + } + } + elsif (/^(\$.)/) + { + error "invalid escape: $1"; + } + else + { + s/^([^\$]+)//; + $res .= $1; + } + } + + $_ = $underscore; + return '[[' . $res . ']]'; +} + + +# handle_traces($REQ, $OUTPUT, %TRACE) +# ------------------------------------ +# We use M4 itself to process the traces. But to avoid name clashes when +# processing the traces, the builtins are disabled, and moved into `at_'. +# Actually, all the low level processing macros are in `at_' (and `_at_'). +# To avoid clashes between user macros and `at_' macros, the macros which +# implement tracing are in `AT_'. +# +# Having $REQ is needed to neutralize the macros which have been traced, +# but are not wanted now. +sub handle_traces ($$%) +{ + my ($req, $output, %trace) = @_; + + verb "formatting traces for `$output': " . join (', ', sort keys %trace); + + # Processing the traces. + my $trace_m4 = new Autom4te::XFile ("> " . open_quote ("$tmp/traces.m4")); + + $_ = <<'EOF'; + divert(-1) + changequote([, ]) + # _at_MODE(SEPARATOR, ELT1, ELT2...) + # ---------------------------------- + # List the elements, separating then with SEPARATOR. + # MODE can be: + # `at' -- the elements are enclosed in brackets. + # `star' -- the elements are listed as are. + # `percent' -- the elements are `flattened': spaces are singled out, + # and no new line remains. + define([_at_at], + [at_ifelse([$#], [1], [], + [$#], [2], [[[$2]]], + [[[$2]][$1]$0([$1], at_shift(at_shift($@)))])]) + + define([_at_percent], + [at_ifelse([$#], [1], [], + [$#], [2], [at_flatten([$2])], + [at_flatten([$2])[$1]$0([$1], at_shift(at_shift($@)))])]) + + define([_at_star], + [at_ifelse([$#], [1], [], + [$#], [2], [[$2]], + [[$2][$1]$0([$1], at_shift(at_shift($@)))])]) + + # FLATTEN quotes its result. + # Note that the second pattern is `newline, tab or space'. Don't lose + # the tab! + define([at_flatten], + [at_patsubst(at_patsubst([[[$1]]], [\\\n]), [[\n\t ]+], [ ])]) + + define([at_args], [at_shift(at_shift(at_shift(at_shift(at_shift($@)))))]) + define([at_at], [_$0([$1], at_args($@))]) + define([at_percent], [_$0([$1], at_args($@))]) + define([at_star], [_$0([$1], at_args($@))]) + +EOF + s/^ //mg;s/\\t/\t/mg;s/\\n/\n/mg; + print $trace_m4 $_; + + # If you trace `define', then on `define([m4_exit], defn([m4exit])' you + # will produce + # + # AT_define([m4sugar.m4], [115], [1], [define], [m4_exit], ) + # + # Since `' is not quoted, the outer m4, when processing + # `trace.m4' will exit prematurely. Hence, move all the builtins to + # the `at_' name space. + + print $trace_m4 "# Copy the builtins.\n"; + map { print $trace_m4 "define([at_$_], defn([$_]))\n" } @m4_builtin; + print $trace_m4 "\n"; + + print $trace_m4 "# Disable them.\n"; + map { print $trace_m4 "at_undefine([$_])\n" } @m4_builtin; + print $trace_m4 "\n"; + + + # Neutralize traces: we don't want traces of cached requests (%REQUEST). + print $trace_m4 + "## -------------------------------------- ##\n", + "## By default neutralize all the traces. ##\n", + "## -------------------------------------- ##\n", + "\n"; + print $trace_m4 "at_define([AT_$_], [at_dnl])\n" + foreach (sort keys %{$req->macro}); + print $trace_m4 "\n"; + + # Implement traces for current requests (%TRACE). + print $trace_m4 + "## ------------------------- ##\n", + "## Trace processing macros. ##\n", + "## ------------------------- ##\n", + "\n"; + foreach (sort keys %trace) + { + # Trace request can be embed \n. + (my $comment = "Trace $_:$trace{$_}") =~ s/^/\# /; + print $trace_m4 "$comment\n"; + print $trace_m4 "at_define([AT_$_],\n"; + print $trace_m4 trace_format_to_m4 ($trace{$_}) . ")\n\n"; + } + print $trace_m4 "\n"; + + # Reenable output. + print $trace_m4 "at_divert(0)at_dnl\n"; + + # Transform the traces from m4 into an m4 input file. + # Typically, transform: + # + # | m4trace:configure.ac:3: -1- AC_SUBST([exec_prefix], [NONE]) + # + # into + # + # | AT_AC_SUBST([configure.ac], [3], [1], [AC_SUBST], [exec_prefix], [NONE]) + # + # Pay attention that the file name might include colons, if under DOS + # for instance, so we don't use `[^:]+'. + my $traces = new Autom4te::XFile ("< " . open_quote ($tcache . $req->id)); + while ($_ = $traces->getline) + { + # Trace with arguments, as the example above. We don't try + # to match the trailing parenthesis as it might be on a + # separate line. + s{^m4trace:(.+):(\d+): -(\d+)- ([^(]+)\((.*)$} + {AT_$4([$1], [$2], [$3], [$4], $5}; + # Traces without arguments, always on a single line. + s{^m4trace:(.+):(\d+): -(\d+)- ([^)]*)\n$} + {AT_$4([$1], [$2], [$3], [$4])\n}; + print $trace_m4 "$_"; + } + $trace_m4->close; + + my $in = new Autom4te::XFile ("$m4 " . shell_quote ("$tmp/traces.m4") . " |"); + my $out = new Autom4te::XFile ("> " . open_quote ($output)); + + # This is dubious: should we really transform the quadrigraphs in + # traces? It might break balanced [ ] etc. in the output. The + # consensus seems to be that traces are more useful this way. + while ($_ = $in->getline) + { + # It makes no sense to try to transform __oline__. + s/\@<:\@/[/g; + s/\@:>\@/]/g; + s/\@\{:\@/(/g; + s/\@:\}\@/)/g; + s/\@S\|\@/\$/g; + s/\@%:\@/#/g; + s/\@&t\@//g; + print $out $_; + } +} + + +# $BOOL +# up_to_date ($REQ) +# ----------------- +# Are the cache files of $REQ up to date? +# $REQ is `valid' if it corresponds to the request and exists, which +# does not mean it is up to date. It is up to date if, in addition, +# its files are younger than its dependencies. +sub up_to_date ($) +{ + my ($req) = @_; + + return 0 + if ! $req->valid; + + my $tfile = $tcache . $req->id; + my $ofile = $ocache . $req->id; + + # We can't answer properly if the traces are not computed since we + # need to know what other files were included. Actually, if any of + # the cache files is missing, we are not up to date. + return 0 + if ! -f $tfile || ! -f $ofile; + + # The youngest of the cache files must be older than the oldest of + # the dependencies. + my $tmtime = mtime ($tfile); + my $omtime = mtime ($ofile); + my ($file, $mtime) = ($tmtime < $omtime + ? ($ofile, $omtime) : ($tfile, $tmtime)); + + # We depend at least upon the arguments. + my @dep = @ARGV; + + # stdin is always out of date. + if (grep { $_ eq '-' } @dep) + { return 0 } + + # Files may include others. We can use traces since we just checked + # if they are available. + handle_traces ($req, "$tmp/dependencies", + ('include' => '$1', + 'm4_include' => '$1')); + my $deps = new Autom4te::XFile ("< " . open_quote ("$tmp/dependencies")); + while ($_ = $deps->getline) + { + chomp; + my $file = find_file ("$_?", @include); + # If a file which used to be included is no longer there, then + # don't say it's missing (it might no longer be included). But + # of course, that causes the output to be outdated (as if the + # time stamp of that missing file was newer). + return 0 + if ! $file; + push @dep, $file; + } + + # If $FILE is younger than one of its dependencies, it is outdated. + return up_to_date_p ($file, @dep); +} + + +## ---------- ## +## Freezing. ## +## ---------- ## + +# freeze ($OUTPUT) +# ---------------- +sub freeze ($) +{ + my ($output) = @_; + + # When processing the file with diversion disabled, there must be no + # output but comments and empty lines. + my $result = xqx ("$m4" + . ' --fatal-warning' + . join (' --include=', '', map { shell_quote ($_) } @include) + . ' --define=divert' + . " " . files_to_options (@ARGV) + . ' lock (LOCK_EX) + if ($flock_implemented eq "yes"); + +# Read the cache index if available and older than autom4te itself. +# If autom4te is younger, then some structures such as C4che might +# have changed, which would corrupt its processing. +Autom4te::C4che->load ($icache_file) + if -f $icache && mtime ($icache) > mtime ($0); + +# Add the new trace requests. +my $req = Autom4te::C4che->request ('input' => \@ARGV, + 'path' => \@include, + 'macro' => [keys %trace, @preselect]); + +# If $REQ's cache files are not up to date, or simply if the user +# discarded them (-f), declare it invalid. +$req->valid (0) + if $force || ! up_to_date ($req); + +# We now know whether we can trust the Request object. Say it. +verb "the trace request object is:\n" . $req->marshall; + +# We need to run M4 if (i) the user wants it (--force), (ii) $REQ is +# invalid. +handle_m4 ($req, keys %{$req->macro}) + if $force || ! $req->valid; + +# Issue the warnings each time autom4te was run. +my $separator = "\n" . ('-' x 25) . " END OF WARNING " . ('-' x 25) . "\n\n"; +handle_traces ($req, "$tmp/warnings", + ('_m4_warn' => "\$1::\$f:\$l::\$2::\$3$separator")); +# Swallow excessive newlines. +for (split (/\n*$separator\n*/o, contents ("$tmp/warnings"))) +{ + # The message looks like: + # | syntax::input.as:5::ouch + # | ::input.as:4: baz is expanded from... + # | input.as:2: bar is expanded from... + # | input.as:3: foo is expanded from... + # | input.as:5: the top level + # In particular, m4_warn guarantees that either $stackdump is empty, or + # it consists of lines where only the last line ends in "top level". + my ($cat, $loc, $msg, $stacktrace) = split ('::', $_, 4); + msg $cat, $loc, "warning: $msg", + partial => ($stacktrace =~ /top level$/) + 0; + for (split /\n/, $stacktrace) + { + my ($loc, $trace) = split (': ', $_, 2); + msg $cat, $loc, $trace, partial => ($trace !~ /top level$/) + 0; + } +} + +# Now output... +if (%trace) + { + # Always produce traces, since even if the output is young enough, + # there is no guarantee that the traces use the same *format* + # (e.g., `-t FOO:foo' and `-t FOO:bar' are both using the same M4 + # traces, hence the M4 traces cache is usable, but its formatting + # will yield different results). + handle_traces ($req, $output, %trace); + } +else + { + # Actual M4 expansion, if the user wants it, or if $output is old + # (STDOUT is pretty old). + handle_output ($req, $output) + if $force || mtime ($output) < mtime ($ocache . $req->id); + } + +# If we ran up to here, the cache is valid. +$req->valid (1); +Autom4te::C4che->save ($icache_file); + +exit $exit_code; + +### Setup "GNU" style for perl-mode and cperl-mode. +## Local Variables: +## perl-indent-level: 2 +## perl-continued-statement-offset: 2 +## perl-continued-brace-offset: 0 +## perl-brace-offset: 0 +## perl-brace-imaginary-offset: 0 +## perl-label-offset: -2 +## cperl-indent-level: 2 +## cperl-brace-offset: 0 +## cperl-continued-brace-offset: 0 +## cperl-label-offset: -2 +## cperl-extra-newline-before-brace: t +## cperl-merge-trailing-else: nil +## cperl-continued-statement-offset: 2 +## End: diff --git a/bin/autoreconf.in b/bin/autoreconf.in new file mode 100644 index 0000000..acf25d4 --- /dev/null +++ b/bin/autoreconf.in @@ -0,0 +1,717 @@ +#! @PERL@ -w +# -*- perl -*- +# @configure_input@ + +eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + if 0; + +# autoreconf - install the GNU Build System in a directory tree +# Copyright (C) 1994, 1999-2012 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 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 . + +# Written by David J. MacKenzie. +# Extended and rewritten in Perl by Akim Demaille. + +BEGIN +{ + my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell + # that can handle redirection and quote arguments correctly, + # e.g.: COMMAND.COM. For DJGPP always use the shell that configure + # has detected. + $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); +} + +use Autom4te::ChannelDefs; +use Autom4te::Channels; +use Autom4te::Configure_ac; +use Autom4te::FileUtils; +use Autom4te::General; +use Autom4te::XFile; +# Do not use Cwd::chdir, since it might hang. +use Cwd 'cwd'; +use strict; + +## ----------- ## +## Variables. ## +## ----------- ## + +# $HELP +# ----- +$help = "Usage: $0 [OPTION]... [DIRECTORY]... + +Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint' +(formerly `gettextize'), and `libtoolize' where appropriate) +repeatedly to remake the GNU Build System files in specified +DIRECTORIES and their subdirectories (defaulting to `.'). + +By default, it only remakes those files that are older than their +sources. If you install new versions of the GNU Build System, +you can make `autoreconf' remake all of the files by giving it the +`--force' option. + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit + -v, --verbose verbosely report processing + -d, --debug don't remove temporary files + -f, --force consider all files obsolete + -i, --install copy missing auxiliary files + --no-recursive don't rebuild sub-packages + -s, --symlink with -i, install symbolic links instead of copies + -m, --make when applicable, re-run ./configure && make + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax] + +" . Autom4te::ChannelDefs::usage . " + +The environment variable \`WARNINGS\' is honored. Some subtools might +support other warning types, using \`all' is encouraged. + +Library directories: + -B, --prepend-include=DIR prepend directory DIR to search path + -I, --include=DIR append directory DIR to search path + +The environment variables AUTOM4TE, AUTOCONF, AUTOHEADER, AUTOMAKE, +ACLOCAL, AUTOPOINT, LIBTOOLIZE, M4, and MAKE are honored. + +Report bugs to . +GNU Autoconf home page: . +General help using GNU software: . +"; + +# $VERSION +# -------- +$version = "autoreconf (@PACKAGE_NAME@) @VERSION@ +Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. +License GPLv3+/Autoconf: GNU GPL version 3 or later +, +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Written by David J. MacKenzie and Akim Demaille. +"; + +# Lib files. +my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@'; +my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; +my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; +my $automake = $ENV{'AUTOMAKE'} || 'automake'; +my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; +my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; +my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; +my $make = $ENV{'MAKE'} || 'make'; + +# --install -- as --add-missing in other tools. +my $install = 0; +# symlink -- when --install, use symlinks instead. +my $symlink = 0; +# Does aclocal support --force? +my $aclocal_supports_force = 0; +# Does aclocal support -Wfoo? +my $aclocal_supports_warnings = 0; +# Does automake support --force-missing? +my $automake_supports_force_missing = 0; +# Does automake support -Wfoo? +my $automake_supports_warnings = 0; + +my @prepend_include; +my @include; + +# List of command line warning requests. +my @warning; + +# Rerun `./configure && make'? +my $run_make = 0; + +# Recurse into subpackages +my $recursive = 1; + +## ---------- ## +## Routines. ## +## ---------- ## + + +# parse_args () +# ------------- +# Process any command line arguments. +sub parse_args () +{ + my $srcdir; + + getopt ("W|warnings=s" => \@warning, + 'I|include=s' => \@include, + 'B|prepend-include=s' => \@prepend_include, + 'i|install' => \$install, + 's|symlink' => \$symlink, + 'm|make' => \$run_make, + 'recursive!' => \$recursive); + + # Split the warnings as a list of elements instead of a list of + # lists. + @warning = map { split /,/ } @warning; + parse_WARNINGS; + parse_warnings '--warnings', @warning; + + # Even if the user specified a configure.ac, trim to get the + # directory, and look for configure.ac again. Because (i) the code + # is simpler, and (ii) we are still able to diagnose simultaneous + # presence of configure.ac and configure.in. + @ARGV = map { /configure\.(ac|in)$/ ? dirname ($_) : $_ } @ARGV; + push @ARGV, '.' unless @ARGV; + + if ($verbose && $debug) + { + for my $prog ($autoconf, $autoheader, + $automake, $aclocal, + $autopoint, + $libtoolize) + { + xsystem ("$prog --version | sed 1q >&2"); + print STDERR "\n"; + } + } + + my $aclocal_help = `$aclocal --help 2>/dev/null`; + my $automake_help = `$automake --help 2>/dev/null`; + $aclocal_supports_force = $aclocal_help =~ /--force/; + $aclocal_supports_warnings = $aclocal_help =~ /--warnings/; + $automake_supports_force_missing = $automake_help =~ /--force-missing/; + $automake_supports_warnings = $automake_help =~ /--warnings/; + + # Dispatch autoreconf's option to the tools. + # --include; + $aclocal .= join (' -I ', '', map { shell_quote ($_) } @include); + $autoconf .= join (' --include=', '', map { shell_quote ($_) } @include); + $autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include); + $autoheader .= join (' --include=', '', map { shell_quote ($_) } @include); + $autoheader .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include); + + # --install and --symlink; + if ($install) + { + $automake .= ' --add-missing'; + $automake .= ' --copy' unless $symlink; + $libtoolize .= ' --copy' unless $symlink; + } + # --force; + if ($force) + { + $aclocal .= ' --force' + if $aclocal_supports_force; + $autoconf .= ' --force'; + $autoheader .= ' --force'; + $automake .= ' --force-missing' + if $automake_supports_force_missing; + $autopoint .= ' --force'; + $libtoolize .= ' --force'; + } + else + { + # The implementation of --no-force is bogus in all implementations + # of Automake up to 1.8, so we avoid it in these cases. (Automake + # 1.8 is the first version where aclocal supports force, hence + # the condition.) + $automake .= ' --no-force' + if $aclocal_supports_force; + } + # --verbose --verbose or --debug; + if ($verbose > 1 || $debug) + { + $autoconf .= ' --verbose'; + $autoheader .= ' --verbose'; + $automake .= ' --verbose'; + $aclocal .= ' --verbose'; + } + if ($debug) + { + $autoconf .= ' --debug'; + $autoheader .= ' --debug'; + $libtoolize .= ' --debug'; + } + # --warnings; + if (@warning) + { + my $warn = ' --warnings=' . join (',', @warning); + $autoconf .= $warn; + $autoheader .= $warn; + $automake .= $warn + if $automake_supports_warnings; + $aclocal .= $warn + if $aclocal_supports_warnings; + } +} + + +# &run_aclocal ($ACLOCAL, $FLAGS) +# ------------------------------- +# Update aclocal.m4 as lazily as possible, as aclocal pre-1.8 always +# overwrites aclocal.m4, hence triggers autoconf, autoheader, automake +# etc. uselessly. aclocal 1.8+ does not need this. +sub run_aclocal ($$) +{ + my ($aclocal, $flags) = @_; + + # aclocal 1.8+ does all this for free. It can be recognized by its + # --force support. + if ($aclocal_supports_force) + { + xsystem ("$aclocal $flags"); + } + else + { + xsystem ("$aclocal $flags --output=aclocal.m4t"); + # aclocal may produce no output. + if (-f 'aclocal.m4t') + { + update_file ('aclocal.m4t', 'aclocal.m4'); + # Make sure that the local m4 files are older than + # aclocal.m4. + # + # Why is not always the case? Because we already run + # aclocal at first (before tracing), which, for instance, + # can find Gettext's macros in .../share/aclocal, so we may + # have had the right aclocal.m4 already. Then autopoint is + # run, and installs locally these M4 files. Then + # autoreconf, via update_file, sees it is the _same_ + # aclocal.m4, and doesn't change its timestamp. But later, + # Automake's Makefile expresses that aclocal.m4 depends on + # these local files, which are newer, so it triggers aclocal + # again. + # + # To make sure aclocal.m4 is no older, we change the + # modification times of the local M4 files to be not newer + # than it. + # + # First, where are the local files? + my $aclocal_local_dir = '.'; + if ($flags =~ /-I\s+(\S+)/) + { + $aclocal_local_dir = $1; + } + # All the local files newer than aclocal.m4 are to be + # made not newer than it. + my $aclocal_m4_mtime = mtime ('aclocal.m4'); + for my $file (glob ("$aclocal_local_dir/*.m4"), 'acinclude.m4') + { + if ($aclocal_m4_mtime < mtime ($file)) + { + debug "aging $file to be not newer than aclocal.m4"; + utime $aclocal_m4_mtime, $aclocal_m4_mtime, $file; + } + } + } + } +} + +# &autoreconf_current_directory +# ----------------------------- +sub autoreconf_current_directory () +{ + my $configure_ac = find_configure_ac; + + # ---------------------- # + # Is it using Autoconf? # + # ---------------------- # + + my $uses_autoconf; + my $uses_gettext; + if (-f $configure_ac) + { + my $configure_ac_file = new Autom4te::XFile "< $configure_ac"; + while ($_ = $configure_ac_file->getline) + { + s/#.*//; + s/dnl.*//; + $uses_autoconf = 1 if /AC_INIT/; + # See below for why we look for gettext here. + $uses_gettext = 1 if /^AM_GNU_GETTEXT_VERSION/; + } + } + if (!$uses_autoconf) + { + verb "$configure_ac: not using Autoconf"; + return; + } + + + # ------------------- # + # Running autopoint. # + # ------------------- # + + # Gettext is a bit of a problem: its macros are not necessarily + # visible to aclocal, so if we start with a completely striped down + # package (think of a fresh CVS checkout), running `aclocal' first + # will fail: the Gettext macros are missing. + # + # Therefore, we can't use the traces to decide if we use Gettext or + # not. I guess that once Gettext move to 2.5x we will be able to, + # but in the meanwhile forget it. + # + # We can only grep for AM_GNU_GETTEXT_VERSION in configure.ac. You + # might think this approach is naive, and indeed it is, as it + # prevents one to embed AM_GNU_GETTEXT_VERSION in another *.m4, but + # anyway we don't limit the generality, since... that's what + # autopoint does. Actually, it is even more restrictive, as it + # greps for `^AM_GNU_GETTEXT_VERSION('. We did this above, while + # scanning configure.ac. + if (!$uses_gettext) + { + verb "$configure_ac: not using Gettext"; + } + elsif (!$install) + { + verb "$configure_ac: not running autopoint: --install not given"; + } + else + { + xsystem_hint ("autopoint is needed because this package uses Gettext", "$autopoint"); + } + + + # ----------------- # + # Running aclocal. # + # ----------------- # + + # Run it first: it might discover new macros to add, e.g., + # AC_PROG_LIBTOOL, which we will trace later to see if Libtool is + # used. + # + # Always run it. Tracking its sources for up-to-dateness is too + # complex and too error prone. The best we can do is avoiding + # nuking the time stamp. + my $uses_aclocal = 1; + + # Nevertheless, if aclocal.m4 exists and is not made by aclocal, + # don't run aclocal. + + if (-f 'aclocal.m4') + { + my $aclocal_m4 = new Autom4te::XFile 'aclocal.m4'; + $_ = $aclocal_m4->getline; + $uses_aclocal = 0 + unless defined ($_) && /generated.*by aclocal/; + } + + # If there are flags for aclocal in Makefile.am, use them. + my $aclocal_flags = ''; + if ($uses_aclocal && -f 'Makefile.am') + { + my $makefile = new Autom4te::XFile 'Makefile.am'; + while ($_ = $makefile->getline) + { + if (/^ACLOCAL_[A-Z_]*FLAGS\s*=\s*(.*)/) + { + $aclocal_flags = $1; + last; + } + } + } + + if (!$uses_aclocal) + { + verb "$configure_ac: not using aclocal"; + } + else + { + # Some file systems have sub-second time stamps, and if so we may + # run into trouble later, after we rerun autoconf and set the + # time stamps of input files to be no greater than aclocal.m4, + # because the time-stamp-setting operation (utime) has a + # resolution of only 1 second. Work around the problem by + # ensuring that there is at least a one-second window before the + # time stamp of aclocal.m4t in which no file time stamps can + # fall. + sleep 1; + + run_aclocal ($aclocal, $aclocal_flags); + } + + # We might have to rerun aclocal if Libtool (or others) imports new + # macros. + my $rerun_aclocal = 0; + + + + # ------------------------------- # + # See what tools will be needed. # + # ------------------------------- # + + # Perform a single trace reading to avoid --force forcing a rerun + # between two --trace, that's useless. If there is no AC_INIT, then + # we are not interested: it looks like a Cygnus thingy. + my $aux_dir; + my $uses_gettext_via_traces; + my $uses_libtool; + my $uses_libltdl; + my $uses_autoheader; + my $uses_automake; + my @subdir; + verb "$configure_ac: tracing"; + my $traces = new Autom4te::XFile + ("$autoconf" + . join (' ', + map { ' --trace=' . $_ . ':\$n::\${::}%' } + # If you change this list, update the + # `Autoreconf-preselections' section of autom4te.in. + 'AC_CONFIG_AUX_DIR', + 'AC_CONFIG_HEADERS', + 'AC_CONFIG_SUBDIRS', + 'AC_INIT', + 'AC_PROG_LIBTOOL', + 'LT_INIT', + 'LT_CONFIG_LTDL_DIR', + 'AM_GNU_GETTEXT', + 'AM_INIT_AUTOMAKE', + ) + . ' |'); + while ($_ = $traces->getline) + { + chomp; + my ($macro, @args) = split (/::/); + $aux_dir = $args[0] if $macro eq "AC_CONFIG_AUX_DIR"; + $uses_autoconf = 1 if $macro eq "AC_INIT"; + $uses_gettext_via_traces = 1 if $macro eq "AM_GNU_GETTEXT"; + $uses_libtool = 1 if $macro eq "AC_PROG_LIBTOOL" + || $macro eq "LT_INIT"; + $uses_libltdl = 1 if $macro eq "LT_CONFIG_LTDL_DIR"; + $uses_autoheader = 1 if $macro eq "AC_CONFIG_HEADERS"; + $uses_automake = 1 if $macro eq "AM_INIT_AUTOMAKE"; + push @subdir, split (' ', $args[0]) + if $macro eq "AC_CONFIG_SUBDIRS" && $recursive; + } + + # The subdirs are *optional*, they may not exist. + foreach (@subdir) + { + if (-d) + { + verb "$configure_ac: adding subdirectory $_ to autoreconf"; + autoreconf ($_); + } + else + { + verb "$configure_ac: subdirectory $_ not present"; + } + } + + # Gettext consistency checks... + error "$configure_ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION" + if $uses_gettext_via_traces && ! $uses_gettext; + error "$configure_ac: AM_GNU_GETTEXT_VERSION is used, but not AM_GNU_GETTEXT" + if $uses_gettext && ! $uses_gettext_via_traces; + + + # ---------------------------- # + # Setting up the source tree. # + # ---------------------------- # + + # libtoolize, automake --add-missing etc. will drop files in the + # $AUX_DIR. But these tools fail to install these files if the + # directory itself does not exist, which valid: just imagine a CVS + # repository with hand written code only (there is not even a need + # for a Makefile.am!). + + if (defined $aux_dir && ! -d $aux_dir) + { + verb "$configure_ac: creating directory $aux_dir"; + mkdir $aux_dir, 0755 + or error "cannot create $aux_dir: $!"; + } + + + # -------------------- # + # Running libtoolize. # + # -------------------- # + + if (!$uses_libtool) + { + verb "$configure_ac: not using Libtool"; + } + elsif ($install) + { + if ($uses_libltdl) + { + $libtoolize .= " --ltdl"; + } + xsystem_hint ("libtoolize is needed because this package uses Libtool", $libtoolize); + $rerun_aclocal = 1; + } + else + { + verb "$configure_ac: not running libtoolize: --install not given"; + } + + + + # ------------------- # + # Rerunning aclocal. # + # ------------------- # + + # If we re-installed Libtool or Gettext, the macros might have changed. + # Automake also needs an up-to-date aclocal.m4. + if ($rerun_aclocal) + { + if (!$uses_aclocal) + { + verb "$configure_ac: not using aclocal"; + } + else + { + run_aclocal ($aclocal, $aclocal_flags); + } + } + + + # ------------------ # + # Running autoconf. # + # ------------------ # + + # Don't try to be smarter than `autoconf', which does its own up to + # date checks. + # + # We prefer running autoconf before autoheader, because (i) the + # latter runs the former, and (ii) autoconf is stricter than + # autoheader. So all in all, autoconf should give better error + # messages. + xsystem ($autoconf); + + + # -------------------- # + # Running autoheader. # + # -------------------- # + + # We now consider that if AC_CONFIG_HEADERS is used, then autoheader + # is used too. + # + # Just as for autoconf, up to date ness is performed by the tool + # itself. + # + # Run it before automake, since the latter checks the presence of + # config.h.in when it sees an AC_CONFIG_HEADERS. + if (!$uses_autoheader) + { + verb "$configure_ac: not using Autoheader"; + } + else + { + xsystem ($autoheader); + } + + + # ------------------ # + # Running automake. # + # ------------------ # + + if (!$uses_automake) + { + verb "$configure_ac: not using Automake"; + } + else + { + # We should always run automake, and let it decide whether it shall + # update the file or not. In fact, the effect of `$force' is already + # included in `$automake' via `--no-force'. + xsystem ($automake); + } + + + # -------------- # + # Running make. # + # -------------- # + + if ($run_make) + { + if (!-f "config.status") + { + verb "no config.status: cannot re-make"; + } + else + { + xsystem ("./config.status --recheck"); + xsystem ("./config.status"); + if (!-f "Makefile") + { + verb "no Makefile: cannot re-make"; + } + else + { + xsystem ("$make"); + } + } + } +} + + +# &autoreconf ($DIRECTORY) +# ------------------------ +# Reconf the $DIRECTORY. +sub autoreconf ($) +{ + my ($directory) = @_; + my $cwd = cwd; + + # The format for this message is not free: taken from Emacs, itself + # using GNU Make's format. + verb "Entering directory `$directory'"; + chdir $directory + or error "cannot chdir to $directory: $!"; + + autoreconf_current_directory; + + # The format is not free: taken from Emacs, itself using GNU Make's + # format. + verb "Leaving directory `$directory'"; + chdir $cwd + or error "cannot chdir to $cwd: $!"; +} + + +## ------ ## +## Main. ## +## ------ ## + +# When debugging, it is convenient that all the related temporary +# files be at the same place. +mktmpdir ('ar'); +$ENV{'TMPDIR'} = $tmp; +parse_args; + +# Autoreconf all the given configure.ac. Unless `--no-recursive' is passed, +# AC_CONFIG_SUBDIRS will be traversed in &autoreconf_current_directory. +$ENV{'AUTOM4TE'} = $autom4te; +for my $directory (@ARGV) + { + require_configure_ac ($directory); + autoreconf ($directory); + } + +### Setup "GNU" style for perl-mode and cperl-mode. +## Local Variables: +## perl-indent-level: 2 +## perl-continued-statement-offset: 2 +## perl-continued-brace-offset: 0 +## perl-brace-offset: 0 +## perl-brace-imaginary-offset: 0 +## perl-label-offset: -2 +## cperl-indent-level: 2 +## cperl-brace-offset: 0 +## cperl-continued-brace-offset: 0 +## cperl-label-offset: -2 +## cperl-extra-newline-before-brace: t +## cperl-merge-trailing-else: nil +## cperl-continued-statement-offset: 2 +## End: diff --git a/bin/autoscan.in b/bin/autoscan.in new file mode 100644 index 0000000..a67c48d --- /dev/null +++ b/bin/autoscan.in @@ -0,0 +1,678 @@ +#! @PERL@ -w +# -*- perl -*- +# @configure_input@ + +# autoscan - Create configure.scan (a preliminary configure.ac) for a package. +# Copyright (C) 1994, 1999-2012 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 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 . + +# Written by David MacKenzie . + +eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + if 0; + +BEGIN +{ + my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell + # that can handle redirection and quote arguments correctly, + # e.g.: COMMAND.COM. For DJGPP always use the shell that configure + # has detected. + $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); +} + +use Autom4te::ChannelDefs; +use Autom4te::Configure_ac; +use Autom4te::General; +use Autom4te::FileUtils; +use Autom4te::XFile; +use File::Basename; +use File::Find; +use strict; + +use vars qw(@cfiles @makefiles @shfiles @subdirs %printed); + +# The kind of the words we are looking for. +my @kinds = qw (function header identifier program + makevar librarie); + +# For each kind, the default macro. +my %generic_macro = + ( + 'function' => 'AC_CHECK_FUNCS', + 'header' => 'AC_CHECK_HEADERS', + 'identifier' => 'AC_CHECK_TYPES', + 'program' => 'AC_CHECK_PROGS', + 'library' => 'AC_CHECK_LIB' + ); + +my %kind_comment = + ( + 'function' => 'Checks for library functions.', + 'header' => 'Checks for header files.', + 'identifier' => 'Checks for typedefs, structures, and compiler characteristics.', + 'program' => 'Checks for programs.', + ); + +# $USED{KIND}{ITEM} is the list of locations where the ITEM (of KIND) was used +# in the user package. +# For instance $USED{function}{alloca} is the list of `file:line' where +# `alloca (...)' appears. +my %used = (); + +# $MACRO{KIND}{ITEM} is the list of macros to use to test ITEM. +# Initialized from lib/autoscan/*. E.g., $MACRO{function}{alloca} contains +# the singleton AC_FUNC_ALLOCA. Some require several checks. +my %macro = (); + +# $NEEDED_MACROS{MACRO} is an array of locations requiring MACRO. +# E.g., $NEEDED_MACROS{AC_FUNC_ALLOC} the list of `file:line' containing +# `alloca (...)'. +my %needed_macros = + ( + 'AC_PREREQ' => [$me], + ); + +my $configure_scan = 'configure.scan'; +my $log; + +# Autoconf and lib files. +my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; +my $autoconf = "$autom4te --language=autoconf"; +my @prepend_include; +my @include = ('@pkgdatadir@'); + +# $help +# ----- +$help = "Usage: $0 [OPTION]... [SRCDIR] + +Examine source files in the directory tree rooted at SRCDIR, or the +current directory if none is given. Search the source files for +common portability problems, check for incompleteness of +`configure.ac', and create a file `$configure_scan' which is a +preliminary `configure.ac' for that package. + + -h, --help print this help, then exit + -V, --version print version number, then exit + -v, --verbose verbosely report processing + -d, --debug don't remove temporary files + +Library directories: + -B, --prepend-include=DIR prepend directory DIR to search path + -I, --include=DIR append directory DIR to search path + +Report bugs to . +GNU Autoconf home page: . +General help using GNU software: . +"; + +# $version +# -------- +$version = "autoscan (@PACKAGE_NAME@) @VERSION@ +Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. +License GPLv3+/Autoconf: GNU GPL version 3 or later +, +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Written by David J. MacKenzie and Akim Demaille. +"; + + + + +## ------------------------ ## +## Command line interface. ## +## ------------------------ ## + +# parse_args () +# ------------- +# Process any command line arguments. +sub parse_args () +{ + getopt ('I|include=s' => \@include, + 'B|prepend-include=s' => \@prepend_include); + + die "$me: too many arguments +Try `$me --help' for more information.\n" + if @ARGV > 1; + + my $srcdir = $ARGV[0] || "."; + + verb "srcdir = $srcdir"; + chdir $srcdir || error "cannot cd to $srcdir: $!"; +} + + +# init_tables () +# -------------- +# Put values in the tables of what to do with each token. +sub init_tables () +{ + # The data file format supports only one line of macros per function. + # If more than that is required for a common portability problem, + # a new Autoconf macro should probably be written for that case, + # instead of duplicating the code in lots of configure.ac files. + my $file = find_file ("autoscan/autoscan.list", + reverse (@prepend_include), @include); + my $table = new Autom4te::XFile "< " . open_quote ($file); + my $tables_are_consistent = 1; + + while ($_ = $table->getline) + { + # Ignore blank lines and comments. + next + if /^\s*$/ || /^\s*\#/; + + # ': ' or... + # ': warn: '. + if (/^(\S+):\s+(\S+)\s+(\S.*)$/) + { + my ($kind, $word, $macro) = ($1, $2, $3); + error "$file:$.: invalid kind: $_" + unless grep { $_ eq $kind } @kinds; + push @{$macro{$kind}{$word}}, $macro; + } + else + { + error "$file:$.: invalid definition: $_"; + } + } + + if ($debug) + { + foreach my $kind (@kinds) + { + foreach my $word (sort keys %{$macro{$kind}}) + { + print "$kind: $word: @{$macro{$kind}{$word}}\n"; + } + } + + } +} + + +# used ($KIND, $WORD, [$WHERE]) +# ----------------------------- +# $WORD is used as a $KIND. +sub used ($$;$) +{ + my ($kind, $word, $where) = @_; + $where ||= "$File::Find::name:$."; + if ( + # Check for all the libraries. But `-links' is certainly a + # `find' argument, and `-le', a `test' argument. + ($kind eq 'library' && $word !~ /^(e|inks)$/) + # Other than libraries are to be checked only if listed in + # the Autoscan library files. + || defined $macro{$kind}{$word} + ) + { + push (@{$used{$kind}{$word}}, $where); + } +} + + + +## ----------------------- ## +## Scanning source files. ## +## ----------------------- ## + + +# scan_c_file ($FILE-NAME) +# ------------------------ +sub scan_c_file ($) +{ + my ($file_name) = @_; + push @cfiles, $File::Find::name; + + # Nonzero if in a multiline comment. + my $in_comment = 0; + + my $file = new Autom4te::XFile "< " . open_quote ($file_name); + + while ($_ = $file->getline) + { + # Strip out comments. + if ($in_comment && s,^.*?\*/,,) + { + $in_comment = 0; + } + # The whole line is inside a comment. + next if $in_comment; + # All on one line. + s,/\*.*?\*/,,g; + + # Starting on this line. + if (s,/\*.*$,,) + { + $in_comment = 1; + } + + # Preprocessor directives. + if (s/^\s*\#\s*//) + { + if (/^include\s*<([^>]*)>/) + { + used ('header', $1); + } + if (s/^(if|ifdef|ifndef|elif)\s+//) + { + foreach my $word (split (/\W+/)) + { + used ('identifier', $word) + unless $word eq 'defined' || $word !~ /^[a-zA-Z_]/; + } + } + # Ignore other preprocessor directives. + next; + } + + # Remove string and character constants. + s,\"[^\"]*\",,g; + s,\'[^\']*\',,g; + + # Tokens in the code. + # Maybe we should ignore function definitions (in column 0)? + while (s/\b([a-zA-Z_]\w*)\s*\(/ /) + { + used ('function', $1); + } + while (s/\b([a-zA-Z_]\w*)\b/ /) + { + used ('identifier', $1); + } + } + + $file->close; +} + + +# scan_makefile($MAKEFILE-NAME) +# ----------------------------- +sub scan_makefile ($) +{ + my ($file_name) = @_; + push @makefiles, $File::Find::name; + + my $file = new Autom4te::XFile "< " . open_quote ($file_name); + + while ($_ = $file->getline) + { + # Strip out comments. + s/#.*//; + + # Variable assignments. + while (s/\b([a-zA-Z_]\w*)\s*=/ /) + { + used ('makevar', $1); + } + # Be sure to catch a whole word. For instance `lex$U.$(OBJEXT)' + # is a single token. Otherwise we might believe `lex' is needed. + foreach my $word (split (/\s+/)) + { + # Libraries. + if ($word =~ /^-l([a-zA-Z_]\w*)$/) + { + used ('library', $1); + } + # Tokens in the code. + # We allow some additional characters, e.g., `+', since + # autoscan/programs includes `c++'. + if ($word =~ /^[a-zA-Z_][\w+]*$/) + { + used ('program', $word); + } + } + } + + $file->close; +} + + +# scan_sh_file($SHELL-SCRIPT-NAME) +# -------------------------------- +sub scan_sh_file ($) +{ + my ($file_name) = @_; + push @shfiles, $File::Find::name; + + my $file = new Autom4te::XFile "< " . open_quote ($file_name); + + while ($_ = $file->getline) + { + # Strip out comments and variable references. + s/#.*//; + s/\${[^\}]*}//g; + s/@[^@]*@//g; + + # Tokens in the code. + while (s/\b([a-zA-Z_]\w*)\b/ /) + { + used ('program', $1); + } + } + + $file->close; +} + + +# scan_file () +# ------------ +# Called by &find on each file. $_ contains the current file name with +# the current directory of the walk through. +sub scan_file () +{ + # Wanted only if there is no corresponding FILE.in. + return + if -f "$_.in"; + + # Save $_ as Find::File requires it to be preserved. + local $_ = $_; + + # Strip a useless leading `./'. + $File::Find::name =~ s,^\./,,; + + if ($_ ne '.' and -d $_ and + -f "$_/configure.in" || + -f "$_/configure.ac" || + -f "$_/configure.gnu" || + -f "$_/configure") + { + $File::Find::prune = 1; + push @subdirs, $File::Find::name; + } + if (/\.[chlym](\.in)?$/) + { + used 'program', 'cc', $File::Find::name; + scan_c_file ($_); + } + elsif (/\.(cc|cpp|cxx|CC|C|hh|hpp|hxx|HH|H|yy|ypp|ll|lpp)(\.in)?$/) + { + used 'program', 'c++', $File::Find::name; + scan_c_file ($_); + } + elsif ((/^((?:GNUm|M|m)akefile)(\.in)?$/ && ! -f "$1.am") + || /^(?:GNUm|M|m)akefile(\.am)?$/) + { + scan_makefile ($_); + } + elsif (/\.sh(\.in)?$/) + { + scan_sh_file ($_); + } +} + + +# scan_files () +# ------------- +# Read through the files and collect lists of tokens in them +# that might create nonportabilities. +sub scan_files () +{ + find (\&scan_file, '.'); + + if ($verbose) + { + print "cfiles: @cfiles\n"; + print "makefiles: @makefiles\n"; + print "shfiles: @shfiles\n"; + + foreach my $kind (@kinds) + { + print "\n$kind:\n"; + foreach my $word (sort keys %{$used{$kind}}) + { + print "$word: @{$used{$kind}{$word}}\n"; + } + } + } +} + + +## ----------------------- ## +## Output configure.scan. ## +## ----------------------- ## + + +# output_kind ($FILE, $KIND) +# -------------------------- +sub output_kind ($$) +{ + my ($file, $kind) = @_; + # Lists of words to be checked with the generic macro. + my @have; + + print $file "\n# $kind_comment{$kind}\n" + if exists $kind_comment{$kind}; + foreach my $word (sort keys %{$used{$kind}}) + { + # Output the needed macro invocations in $configure_scan if not + # already printed, and remember these macros are needed. + foreach my $macro (@{$macro{$kind}{$word}}) + { + if ($macro =~ /^warn:\s+(.*)/) + { + my $message = $1; + foreach my $location (@{$used{$kind}{$word}}) + { + warn "$location: warning: $message\n"; + } + } + elsif (exists $generic_macro{$kind} + && $macro eq $generic_macro{$kind}) + { + push (@have, $word); + push (@{$needed_macros{"$generic_macro{$kind}([$word])"}}, + @{$used{$kind}{$word}}); + } + else + { + if (! $printed{$macro}) + { + print $file "$macro\n"; + $printed{$macro} = 1; + } + push (@{$needed_macros{$macro}}, + @{$used{$kind}{$word}}); + } + } + } + print $file "$generic_macro{$kind}([" . join(' ', sort(@have)) . "])\n" + if @have; +} + + +# output_libraries ($FILE) +# ------------------------ +sub output_libraries ($) +{ + my ($file) = @_; + + print $file "\n# Checks for libraries.\n"; + foreach my $word (sort keys %{$used{'library'}}) + { + print $file "# FIXME: Replace `main' with a function in `-l$word':\n"; + print $file "AC_CHECK_LIB([$word], [main])\n"; + } +} + + +# output ($CONFIGURE_SCAN) +# ------------------------ +# Print a proto configure.ac. +sub output ($) +{ + my $configure_scan = shift; + my %unique_makefiles; + + my $file = new Autom4te::XFile "> " . open_quote ($configure_scan); + + print $file + ("# -*- Autoconf -*-\n" . + "# Process this file with autoconf to produce a configure script.\n" . + "\n" . + "AC_PREREQ([@VERSION@])\n" . + "AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])\n"); + if (defined $cfiles[0]) + { + print $file "AC_CONFIG_SRCDIR([$cfiles[0]])\n"; + print $file "AC_CONFIG_HEADERS([config.h])\n"; + } + + output_kind ($file, 'program'); + output_kind ($file, 'makevar'); + output_libraries ($file); + output_kind ($file, 'header'); + output_kind ($file, 'identifier'); + output_kind ($file, 'function'); + + print $file "\n"; + if (@makefiles) + { + # Change DIR/Makefile.in to DIR/Makefile. + foreach my $m (@makefiles) + { + $m =~ s/\.(?:in|am)$//; + $unique_makefiles{$m}++; + } + print $file ("AC_CONFIG_FILES([", + join ("\n ", + sort keys %unique_makefiles), "])\n"); + } + if (@subdirs) + { + print $file ("AC_CONFIG_SUBDIRS([", + join ("\n ", + sort @subdirs), "])\n"); + } + print $file "AC_OUTPUT\n"; + + $file->close; +} + + + +## --------------------------------------- ## +## Checking the accuracy of configure.ac. ## +## --------------------------------------- ## + + +# &check_configure_ac ($CONFIGURE_AC) +# ----------------------------------- +# Use autoconf to check if all the suggested macros are included +# in CONFIGURE_AC. +sub check_configure_ac ($) +{ + my ($configure_ac) = @_; + + # Find what needed macros are invoked in CONFIGURE_AC. + # I'd be very happy if someone could explain to me why sort (uniq ...) + # doesn't work properly: I need `uniq (sort ...)'. --akim + my $trace_option = + join (' --trace=', '', + uniq (sort (map { s/\(.*//; $_ } keys %needed_macros))); + + verb "running: $autoconf $trace_option $configure_ac"; + my $traces = + new Autom4te::XFile "$autoconf $trace_option $configure_ac |"; + + while ($_ = $traces->getline) + { + chomp; + my ($file, $line, $macro, @args) = split (/:/, $_); + if ($macro =~ /^AC_CHECK_(HEADER|FUNC|TYPE|MEMBER)S$/) + { + # To be rigorous, we should distinguish between space and comma + # separated macros. But there is no point. + foreach my $word (split (/\s|,/, $args[0])) + { + # AC_CHECK_MEMBERS wants `struct' or `union'. + if ($macro eq "AC_CHECK_MEMBERS" + && $word =~ /^stat.st_/) + { + $word = "struct " . $word; + } + delete $needed_macros{"$macro([$word])"}; + } + } + else + { + delete $needed_macros{$macro}; + } + } + + $traces->close; + + # Report the missing macros. + foreach my $macro (sort keys %needed_macros) + { + warn ("$configure_ac: warning: missing $macro wanted by: " + . (${$needed_macros{$macro}}[0]) + . "\n"); + print $log "$me: warning: missing $macro wanted by: \n"; + foreach my $need (@{$needed_macros{$macro}}) + { + print $log "\t$need\n"; + } + } +} + + +## -------------- ## +## Main program. ## +## -------------- ## + +parse_args; +$log = new Autom4te::XFile "> " . open_quote ("$me.log"); + +$autoconf .= " --debug" if $debug; +$autoconf .= " --verbose" if $verbose; +$autoconf .= join (' --include=', '', map { shell_quote ($_) } @include); +$autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include); + +my $configure_ac = find_configure_ac; +init_tables; +scan_files; +output ('configure.scan'); +if (-f $configure_ac) + { + check_configure_ac ($configure_ac); + } +# This close is really needed. For some reason, probably best named +# a bug, it seems that the dtor of $LOG is not called automatically +# at END. It results in a truncated file. +$log->close; +exit 0; + +### Setup "GNU" style for perl-mode and cperl-mode. +## Local Variables: +## perl-indent-level: 2 +## perl-continued-statement-offset: 2 +## perl-continued-brace-offset: 0 +## perl-brace-offset: 0 +## perl-brace-imaginary-offset: 0 +## perl-label-offset: -2 +## cperl-indent-level: 2 +## cperl-brace-offset: 0 +## cperl-continued-brace-offset: 0 +## cperl-label-offset: -2 +## cperl-extra-newline-before-brace: t +## cperl-merge-trailing-else: nil +## cperl-continued-statement-offset: 2 +## End: diff --git a/bin/autoupdate.in b/bin/autoupdate.in new file mode 100644 index 0000000..9737d49 --- /dev/null +++ b/bin/autoupdate.in @@ -0,0 +1,1063 @@ +#! @PERL@ -w +# -*- perl -*- +# @configure_input@ + +# autoupdate - modernize an Autoconf file. +# Copyright (C) 1994, 1999-2012 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 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 . + +# Originally written by David MacKenzie . +# Rewritten by Akim Demaille . + +eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + if 0; + +BEGIN +{ + my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell + # that can handle redirection and quote arguments correctly, + # e.g.: COMMAND.COM. For DJGPP always use the shell that configure + # has detected. + $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); +} + +use Autom4te::ChannelDefs; +use Autom4te::Channels; +use Autom4te::Configure_ac; +use Autom4te::FileUtils; +use Autom4te::General; +use Autom4te::XFile; +use File::Basename; +use strict; + +# Lib files. +my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; +my $autoconf = "$autom4te --language=autoconf"; +# We need to find m4sugar. +my @prepend_include; +my @include = ('@pkgdatadir@'); +my $force = 0; +# m4. +my $m4 = $ENV{"M4"} || '@M4@'; + + +# $HELP +# ----- +$help = "Usage: $0 [OPTION]... [TEMPLATE-FILE]... + +Update each TEMPLATE-FILE if given, or `configure.ac' if present, +or else `configure.in', to the syntax of the current version of +Autoconf. The original files are backed up. + +Operation modes: + -h, --help print this help, then exit + -V, --version print version number, then exit + -v, --verbose verbosely report processing + -d, --debug don't remove temporary files + -f, --force consider all files obsolete + +Library directories: + -B, --prepend-include=DIR prepend directory DIR to search path + -I, --include=DIR append directory DIR to search path + +Report bugs to . +GNU Autoconf home page: . +General help using GNU software: . +"; + +# $VERSION +# -------- +$version = "autoupdate (@PACKAGE_NAME@) @VERSION@ +Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. +License GPLv3+/Autoconf: GNU GPL version 3 or later +, +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Written by David J. MacKenzie and Akim Demaille. +"; + +## ---------- ## +## Routines. ## +## ---------- ## + + +# parse_args () +# ------------- +# Process any command line arguments. +sub parse_args () +{ + my $srcdir; + + getopt ('I|include=s' => \@include, + 'B|prepend-include=s' => \@prepend_include, + 'f|force' => \$force); + + if (! @ARGV) + { + my $configure_ac = require_configure_ac; + push @ARGV, $configure_ac; + } +} + + + +# ----------------- # +# Autoconf macros. # +# ----------------- # + +my (%ac_macros, %au_macros, %m4_builtins); + +# HANDLE_AUTOCONF_MACROS () +# ------------------------- +# @M4_BUILTINS -- M4 builtins and a useful comment. +sub handle_autoconf_macros () +{ + # Get the builtins. + xsystem ("echo dumpdef | $m4 2>" . shell_quote ("$tmp/m4.defs") . " >/dev/null"); + my $m4_defs = new Autom4te::XFile "< " . open_quote ("$tmp/m4.defs"); + while ($_ = $m4_defs->getline) + { + $m4_builtins{$1} = 1 + if /^(\w+):/; + } + $m4_defs->close; + + my $macros = new Autom4te::XFile ("$autoconf" + . " --trace AU_DEFINE:'AU:\$f:\$1'" + . " --trace define:'AC:\$f:\$1'" + . " --melt /dev/null |"); + while ($_ = $macros->getline) + { + chomp; + my ($domain, $file, $macro) = /^(AC|AU):(.*):([^:]*)$/ or next; + if ($domain eq "AU") + { + $au_macros{$macro} = 1; + } + elsif ($file =~ /(^|\/)m4sugar\/(m4sugar|version)\.m4$/) + { + # Add the m4sugar macros to m4_builtins. + $m4_builtins{$macro} = 1; + } + else + { + # Autoconf, aclocal, and m4sh macros. + $ac_macros{$macro} = 1; + } + } + $macros->close; + + + # Don't keep AU macros in @AC_MACROS. + delete $ac_macros{$_} + foreach (keys %au_macros); + # Don't keep M4sugar macros which are redefined by Autoconf, + # such as `builtin', `changequote' etc. See autoconf/autoconf.m4. + delete $ac_macros{$_} + foreach (keys %m4_builtins); + error "no current Autoconf macros found" + unless keys %ac_macros; + error "no obsolete Autoconf macros found" + unless keys %au_macros; + + if ($debug) + { + print STDERR "Current Autoconf macros:\n"; + print STDERR join (' ', sort keys %ac_macros) . "\n\n"; + print STDERR "Obsolete Autoconf macros:\n"; + print STDERR join (' ', sort keys %au_macros) . "\n\n"; + } + + # ac.m4 -- autoquoting definitions of the AC macros (M4sugar excluded). + # unac.m4 -- undefine the AC macros. + my $ac_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/ac.m4"); + print $ac_m4 "# ac.m4 -- autoquoting definitions of the AC macros.\n"; + my $unac_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/unac.m4"); + print $unac_m4 "# unac.m4 -- undefine the AC macros.\n"; + foreach (sort keys %ac_macros) + { + print $ac_m4 "_au_m4_define([$_], [m4_if(\$#, 0, [[\$0]], [[\$0(\$\@)]])])\n"; + print $unac_m4 "_au_m4_undefine([$_])\n"; + } + + # m4save.m4 -- save the m4 builtins. + # unm4.m4 -- disable the m4 builtins. + # m4.m4 -- enable the m4 builtins. + my $m4save_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/m4save.m4"); + print $m4save_m4 "# m4save.m4 -- save the m4 builtins.\n"; + my $unm4_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/unm4.m4"); + print $unm4_m4 "# unm4.m4 -- disable the m4 builtins.\n"; + my $m4_m4 = new Autom4te::XFile "> " . open_quote ("$tmp/m4.m4"); + print $m4_m4 "# m4.m4 -- enable the m4 builtins.\n"; + foreach (sort keys %m4_builtins) + { + print $m4save_m4 "_au__save([$_])\n"; + print $unm4_m4 "_au__undefine([$_])\n"; + print $m4_m4 "_au__restore([$_])\n"; + } +} + + +## -------------- ## +## Main program. ## +## -------------- ## + +parse_args; +$autoconf .= " --debug" if $debug; +$autoconf .= " --force" if $force; +$autoconf .= " --verbose" if $verbose; +$autoconf .= join (' --include=', '', map { shell_quote ($_) } @include); +$autoconf .= join (' --prepend-include=', '', map { shell_quote ($_) } @prepend_include); + +mktmpdir ('au'); +handle_autoconf_macros; + +# $au_changequote -- enable the quote `[', `]' right before any AU macro. +my $au_changequote = + 's/\b(' . join ('|', keys %au_macros) . ')\b/_au_m4_changequote([,])$1/g'; + +# au.m4 -- definitions the AU macros. +xsystem ("$autoconf --trace AU_DEFINE:'_au_defun(\@<:\@\$1\@:>\@, +\@<:\@\$2\@:>\@)' --melt /dev/null " + . ">" . shell_quote ("$tmp/au.m4")); + + + +## ------------------- ## +## Process the files. ## +## ------------------- ## + +foreach my $file (@ARGV) + { + # We need an actual file. + if ($file eq '-') + { + $file = "$tmp/stdin"; + system "cat >" . shell_quote ($file); + } + elsif (! -r "$file") + { + die "$me: $file: No such file or directory"; + } + + # input.m4 -- m4 program to produce the updated file. + # Load the values, the dispatcher, neutralize m4, and the prepared + # input file. + my $input_m4 = <<\EOF; + divert(-1) -*- Autoconf -*- + changequote([,]) + + # Define our special macros: + define([_au__defn], defn([defn])) + define([_au__divert], defn([divert])) + define([_au__ifdef], defn([ifdef])) + define([_au__include], defn([include])) + define([_au___undefine], defn([undefine])) + define([_au__undefine], [_au__ifdef([$1], [_au___undefine([$1])])]) + define([_au__save], [m4_ifdef([$1], + [m4_define([_au_$1], _m4_defn([$1]))])]) + define([_au__restore], + [_au_m4_ifdef([_au_$1], + [_au_m4_define([$1], _au__defn([_au_$1]))])]) + + # Set up m4sugar. + include(m4sugar/m4sugar.m4) + + # Redefine __file__ to make warnings nicer; $file is replaced below. + m4_define([__file__], [$file]) + + # Redefine m4_location to fix the line number. + m4_define([m4_location], [__file__:m4_eval(__line__ - _au__first_line)]) + + # Move all the builtins into the `_au_' pseudo namespace + m4_include([m4save.m4]) + + # _au_defun(NAME, BODY) + # --------------------- + # Define NAME to BODY, plus AU activation/deactivation. + _au_m4_define([_au_defun], + [_au_m4_define([$1], + [_au_enable()dnl + $2[]dnl + _au_disable()])]) + + # Import the definition of the obsolete macros. + _au__include([au.m4]) + + + ## ------------------------ ## + ## _au_enable/_au_disable. ## + ## ------------------------ ## + + # They work by pair: each time an AU macro is activated, it runs + # _au_enable, and at its end its runs _au_disable (see _au_defun + # above). AU macros might use AU macros, which should + # enable/disable only for the outer AU macros. + # + # `_au_enabled' is used to this end, determining whether we really + # enable/disable. + + + # __au_enable + # ----------- + # Reenable the builtins, m4sugar, and the autoquoting AC macros. + _au_m4_define([__au_enable], + [_au__divert(-1) + # Enable special characters. + _au_m4_changecom([#]) + + _au__include([m4.m4]) + _au__include([ac.m4]) + + _au__divert(0)]) + + # _au_enable + # ---------- + # Called at the beginning of all the obsolete macros. If this is the + # outermost level, call __au_enable. + _au_m4_define([_au_enable], + [_au_m4_ifdef([_au_enabled], + [], + [__au_enable()])_au_dnl + _au_m4_pushdef([_au_enabled])]) + + + # __au_disable + # ------------ + # Disable the AC autoquoting macros, m4sugar, and m4. + _au_m4_define([__au_disable], + [_au__divert(-1) + _au__include([unac.m4]) + _au__include([unm4.m4]) + + # Disable special characters. + _au_m4_changequote() + _au_m4_changecom() + + _au__divert(0)]) + + # _au_disable + # ----------- + # Called at the end of all the obsolete macros. If we are at the + # outermost level, call __au_disable. + _au_m4_define([_au_disable], + [_au_m4_popdef([_au_enabled])_au_dnl + _au_m4_ifdef([_au_enabled], + [], + [__au_disable()])]) + + + ## ------------------------------- ## + ## Disable, and process the file. ## + ## ------------------------------- ## + # The AC autoquoting macros are not loaded yet, hence invoking + # `_au_disable' would be wrong. + _au__include([unm4.m4]) + + # Disable special characters, and set the first line number. + _au_m4_changequote() + _au_m4_changecom() + + _au_m4_define(_au__first_line, _au___line__)_au__divert(0)_au_dnl +EOF + + $input_m4 =~ s/^ //mg; + $input_m4 =~ s/\$file/$file/g; + + # prepared input -- input, but reenables the quote before each AU macro. + open INPUT_M4, "> " . open_quote ("$tmp/input.m4") + or error "cannot open: $!"; + open FILE, "< " . open_quote ($file) + or error "cannot open: $!"; + print INPUT_M4 "$input_m4"; + while () + { + eval $au_changequote; + print INPUT_M4; + } + close FILE + or error "cannot close $file: $!"; + close INPUT_M4 + or error "cannot close $tmp/input.m4: $!"; + + # Now ask m4 to perform the update. + xsystem ("$m4 --include=" . shell_quote ($tmp) + . join (' --include=', '', map { shell_quote ($_) } reverse (@prepend_include)) + . join (' --include=', '', map { shell_quote ($_) } @include) + . " " . shell_quote ("$tmp/input.m4") . " > " . shell_quote ("$tmp/updated")); + update_file ("$tmp/updated", + "$file" eq "$tmp/stdin" ? '-' : "$file"); + } +exit 0; + + +# ## ---------------------------- ## +# ## How `autoupdate' functions. ## +# ## ---------------------------- ## +# +# The task of `autoupdate' is not trivial: the biggest difficulty being +# that you must limit the changes to the parts that really need to be +# updated. Finding a satisfying implementation proved to be quite hard, +# as this is the fifth implementation of `autoupdate'. +# +# Below, we will use a simple example of an obsolete macro: +# +# AU_DEFUN([OLD], [NEW([$1, $2], m4_eval([$1 + $2]))]) +# AC_DEFUN([NEW], [echo "sum($1) = $2"]) +# +# the input file contains +# +# dnl The Unbelievable Truth +# OLD(1, 2) +# NEW([0, 0], [0]) +# +# Of course the expected output is +# +# dnl The Unbelievable Truth +# NEW([1, 2], [3]) +# NEW([0, 0], [0]) +# +# +# # First implementation: sed +# # ========================= +# +# The first implementation was only able to change the name of obsolete +# macros. +# +# The file `acoldnames.m4' defined the old names based on the new names. +# It was simple then to produce a sed script such as: +# +# s/OLD/NEW/g +# +# Updating merely consisted in running this script on the file to +# update. +# +# This scheme suffers from an obvious limitation: that `autoupdate' was +# unable to cope with new macros that just swap some of its arguments +# compared to the old macro. Fortunately, that was enough to upgrade +# from Autoconf 1 to Autoconf 2. (But I have no idea whether the +# changes in Autoconf 2 were precisely limited by this constraint.) +# +# +# # Second implementation: hooks +# # ============================ +# +# The version 2.15 of Autoconf brought a vast number of changes compared +# to 2.13, so a solution was needed. One could think of extending the +# `sed' scripts with specialized code for complex macros. However, this +# approach is of course full of flaws: +# +# a. the Autoconf maintainers have to write these snippets, which we +# just don't want to, +# +# b. I really don't think you'll ever manage to handle the quoting of +# m4 with a sed script. +# +# To satisfy a., let's remark that the code which implements the old +# features in term of the new feature is exactly the code which should +# replace the old code. +# +# To answer point b, as usual in the history of Autoconf, the answer, at +# least on the paper, is simple: m4 is the best tool to parse m4, so +# let's use m4. +# +# Therefore the specification is: +# +# I want to be able to tell Autoconf, well, m4, that the macro I +# am currently defining is an obsolete macro (so that the user is +# warned), and its code is the code to use when running autoconf, +# but that the very same code has to be used when running +# autoupdate. To summarize, the interface I want is +# `AU_DEFUN(OLD-NAME, NEW-CODE)'. +# +# +# Now for the technical details. +# +# When running autoconf, except for the warning, AU_DEFUN is basically +# AC_DEFUN. +# +# When running autoupdate, we want *only* OLD-NAMEs to be expanded. +# This obviously means that acgeneral.m4 and acspecific.m4 must not be +# loaded. Nonetheless, because we want to use a rich set of m4 +# features, m4sugar.m4 is needed. Please note that the fact that +# Autoconf's macros are not loaded is positive on two points: +# +# - we do get an updated `configure.ac', not a `configure'! +# +# - the old macros are replaced by *calls* to the new-macros, not the +# body of the new macros, since their body is not defined!!! +# (Whoa, that's really beautiful!). +# +# Additionally we need to disable the quotes when reading the input for +# two reasons: first because otherwise `m4' will swallow the quotes of +# other macros: +# +# NEW([1, 2], 3) +# => NEW(1, 2, 3) +# +# and second, because we want to update the macro calls which are +# quoted, i.e., we want +# +# FOO([OLD(1, 2)]) +# => FOO([NEW([1, 2], [3])]) +# +# If we don't disable the quotes, only the macros called at the top +# level would be updated. +# +# So, let's disable the quotes. +# +# Well, not quite: m4sugar.m4 still needs to use quotes for some macros. +# Well, in this case, when running in autoupdate code, each macro first +# reestablishes the quotes, expands itself, and disables the quotes. +# +# Thinking a bit more, you realize that in fact, people may use `define', +# `ifelse' etc. in their files, and you certainly don't want to process +# them. Another example is `dnl': you don't want to remove the +# comments. You then realize you don't want exactly to import m4sugar: +# you want to specify when it is enabled (macros active), and disabled. +# m4sugar provides m4_disable/m4_enable to this end. +# +# You're getting close to it. Now remains one task: how to handle +# twofold definitions? +# +# Remember that the same AU_DEFUN must be understood in two different +# ways, the AC way, and the AU way. +# +# One first solution is to check whether acgeneral.m4 was loaded. But +# that's definitely not cute. Another is simply to install `hooks', +# that is to say, to keep in some place m4 knows, late `define' to be +# triggered *only* in AU mode. +# +# You first think of designing AU_DEFUN like this: +# +# 1. AC_DEFUN(OLD-NAME, +# [Warn the user OLD-NAME is obsolete. +# NEW-CODE]) +# +# 2. Store for late AU binding([define(OLD_NAME, +# [Reestablish the quotes. +# NEW-CODE +# Disable the quotes.])]) +# +# but this will not work: NEW-CODE probably uses $1, $2 etc. and these +# guys will be replaced with the argument of `Store for late AU binding' +# when you call it. +# +# I don't think there is a means to avoid this using this technology +# (remember that $1 etc. are *always* expanded in m4). You may also try +# to replace them with $[1] to preserve them for a later evaluation, but +# if `Store for late AU binding' is properly written, it will remain +# quoted till the end... +# +# You have to change technology. Since the problem is that `$1' +# etc. should be `consumed' right away, one solution is to define now a +# second macro, `AU_OLD-NAME', and to install a hook than binds OLD-NAME +# to AU_OLD-NAME. Then, autoupdate.m4 just need to run the hooks. By +# the way, the same method was used in autoheader. +# +# +# # Third implementation: m4 namespaces by m4sugar +# # ============================================== +# +# Actually, this implementation was just a clean up of the previous +# implementation: instead of defining hooks by hand, m4sugar was equipped +# with `namespaces'. What are they? +# +# Sometimes we want to disable some *set* of macros, and restore them +# later. We provide support for this via namespaces. +# +# There are basically three characters playing this scene: defining a +# macro in a namespace, disabling a namespace, and restoring a namespace +# (i.e., all the definitions it holds). +# +# Technically, to define a MACRO in NAMESPACE means to define the macro +# named `NAMESPACE::MACRO' to the VALUE. At the same time, we append +# `undefine(NAME)' in the macro named `m4_disable(NAMESPACE)', and +# similarly a binding of NAME to the value of `NAMESPACE::MACRO' in +# `m4_enable(NAMESPACE)'. These mechanisms allow to bind the macro of +# NAMESPACE and to unbind them at will. +# +# Of course this implementation is really inefficient: m4 has to grow +# strings which can become quickly huge, which slows it significantly. +# +# In particular one should avoid as much as possible to use `define' for +# temporaries. Now that `define' has quite a complex meaning, it is an +# expensive operations that should be limited to macros. Use +# `m4_define' for temporaries. +# +# Private copies of the macros we used in entering / exiting the m4sugar +# namespace. It is much more convenient than fighting with the renamed +# version of define etc. +# +# +# +# Those two implementations suffered from serious problems: +# +# - namespaces were really expensive, and incurred a major performance +# loss on `autoconf' itself, not only `autoupdate'. One solution +# would have been the limit the use of namespaces to `autoupdate', but +# that's again some complications on m4sugar, which really doesn't need +# this. So we wanted to get rid of the namespaces. +# +# - since the quotes were disabled, autoupdate was sometimes making +# wrong guesses, for instance on: +# +# foo([1, 2]) +# +# m4 saw 2 arguments: `[1'and `2]'. A simple solution, somewhat +# fragile, is to reestablish the quotes right before all the obsolete +# macros, i.e., to use sed so that the previous text becomes +# +# changequote([, ])foo([1, 2]) +# +# To this end, one wants to trace the definition of obsolete macros. +# +# It was there that the limitations of the namespace approach became +# painful: because it was a complex machinery playing a lot with the +# builtins of m4 (hence, quite fragile), tracing was almost impossible. +# +# +# So this approach was dropped. +# +# +# # The fourth implementation: two steps +# # ==================================== +# +# If you drop the uses of namespaces, you no longer can compute the +# updated value, and replace the old call with it simultaneously. +# +# Obviously you will use m4 to compute the updated values, but you may +# use some other tool to achieve the replacement. Personally, I trust +# nobody but m4 to parse m4, so below, m4 will perform the two tasks. +# +# How can m4 be used to replace *some* macros calls with newer values. +# Well, that's dead simple: m4 should learn the definitions of obsolete +# macros, forget its builtins, disable the quotes, and then run on the +# input file, which amounts to doing this: +# +# divert(-1)dnl +# changequote([, ]) +# define([OLD], [NEW([$1, $2], m4_eval([$1 + $2]))changequote()]) +# undefine([dnl]) +# undefine([m4_eval]) +# # Some more undefines... +# changequote() +# divert(0)dnl +# dnl The Unbelievable Truth +# changequote([, ])OLD(1, 2) +# NEW([0, 0], +# 0) +# +# which will result in +# +# dnl The Unbelievable Truth +# NEW(1, 2, m4_eval(1 + 2)) +# NEW([0, 0], +# 0) +# +# Grpmh. Two problems. A minor problem: it would have been much better +# to have the `m4_eval' computed, and a major problem: you lost the +# quotation in the result. +# +# Let's address the big problem first. One solution is to define any +# modern macro to rewrite its calls with the proper quotation, thanks to +# `$@'. Again, tracing the `define's makes it possible to know which +# are these macros, so you input is: +# +# divert(-1)dnl +# changequote([, ]) +# define([OLD], [NEW([$1, $2], m4_eval([$1 + $2]))changequote()]) +# define([NEW], [[NEW($@)]changequote()]) +# undefine([dnl]) +# undefine([m4_eval]) +# # Some more undefines... +# changequote() +# divert(0)dnl +# dnl The Unbelievable Truth +# changequote([, ])OLD(1, 2) +# changequote([, ])NEW([0, 0], +# 0) +# +# which results in +# +# dnl The Unbelievable Truth +# NEW([1, 2],[m4_eval(1 + 2)]) +# NEW([0, 0],[0]) +# +# Our problem is solved, i.e., the first call to `NEW' is properly +# quoted, but introduced another problem: we changed the layout of the +# second calls, which can be a drama in the case of huge macro calls +# (think of `AC_TRY_RUN' for instance). This example didn't show it, +# but we also introduced parens to macros which did not have some: +# +# AC_INIT +# => AC_INIT() +# +# No big deal for the semantics (unless the macro depends upon $#, which +# is bad), but the users would not be happy. +# +# Additionally, we introduced quotes that were not there before, which is +# OK in most cases, but could change the semantics of the file. +# +# Cruel dilemma: we do want the auto-quoting definition of `NEW' when +# evaluating `OLD', but we don't when we evaluate the second `NEW'. +# Back to namespaces? +# +# No. +# +# +# # Second step: replacement +# # ------------------------ +# +# No, as announced above, we will work in two steps: in a first step we +# compute the updated values, and in a second step we replace them. Our +# goal is something like this: +# +# divert(-1)dnl +# changequote([, ]) +# define([OLD], [NEW([1, 2], [3])changequote()]) +# undefine([dnl]) +# undefine([m4_eval]) +# # Some more undefines... +# changequote() +# divert(0)dnl +# dnl The Unbelievable Truth +# changequote([, ])OLD(1, 2) +# NEW([0, 0], +# 0) +# +# i.e., the new value of `OLD' is precomputed using the auto-quoting +# definition of `NEW' and the m4 builtins. We'll see how afterwards, +# let's finish with the replacement. +# +# Of course the solution above is wrong: if there were other calls to +# `OLD' with different values, we would smash them to the same value. +# But it is quite easy to generalize the scheme above: +# +# divert(-1)dnl +# changequote([, ]) +# define([OLD([1],[2])], [NEW([1, 2], [3])]) +# define([OLD], [defn([OLD($@)])changequote()]) +# undefine([dnl]) +# undefine([m4_eval]) +# # Some more undefines... +# changequote() +# divert(0)dnl +# dnl The Unbelievable Truth +# changequote([, ])OLD(1, 2) +# NEW([0, 0], +# 0) +# +# i.e., for each call to obsolete macros, we build an array `call => +# value', and use a macro to dispatch these values. This results in: +# +# dnl The Unbelievable Truth +# NEW([1, 2], [3]) +# NEW([0, 0], +# 0) +# +# In French, we say `Youpi !', which you might roughly translate as +# `Yippee!'. +# +# +# # First step: computation +# # ----------------------- +# +# Let's study the anatomy of the file, and name its sections: +# +# prologue +# divert(-1)dnl +# changequote([, ]) +# values +# define([OLD([1],[2])], [NEW([1, 2], [3])]) +# dispatcher +# define([OLD], [defn([OLD($@)])changequote()]) +# disabler +# undefine([dnl]) +# undefine([m4_eval]) +# # Some more undefines... +# changequote() +# divert(0)dnl +# input +# dnl The Unbelievable Truth +# changequote([, ])OLD(1, 2) +# NEW([0, 0], +# 0) +# +# +# # Computing the `values' section +# # .............................. +# +# First we need to get the list of all the AU macro uses. To this end, +# first get the list of all the AU macros names by tracing `AU_DEFUN' in +# the initialization of autoconf. This list is computed in the file +# `au.txt' below. +# +# Then use this list to trace all the AU macro uses in the input. The +# goal is obtain in the case of our example: +# +# [define([OLD([1],[2])],]@<<@OLD([1],[2])@>>@[)] +# +# This is the file `values.in' below. +# +# We want to evaluate this with only the builtins (in fact m4sugar), the +# auto-quoting definitions of the new macros (`new.m4'), and the +# definition of the old macros (`old.m4'). Computing these last two +# files is easy: it's just a matter of using the right `--trace' option. +# +# So the content of `values.in' is: +# +# include($autoconf_dir/m4sugar.m4) +# m4_include(new.m4) +# m4_include(old.m4) +# divert(0)dnl +# [define([OLD([1],[2])],]@<<@OLD([1],[2])@>>@[)] +# +# We run m4 on it, which yields: +# +# define([OLD([1],[2])],@<<@NEW([1, 2], [3])@>>@) +# +# Transform `@<<@' and `@>>@' into quotes and we get +# +# define([OLD([1],[2])],[NEW([1, 2], [3])]) +# +# This is `values.m4'. +# +# +# # Computing the `dispatcher' section +# # .................................. +# +# The `prologue', and the `disabler' are simple and need no commenting. +# +# To compute the `dispatcher' (`dispatch.m4'), again, it is a simple +# matter of using the right `--trace'. +# +# Finally, the input is not exactly the input file, rather it is the +# input file with the added `changequote'. To this end, we build +# `quote.sed'. +# +# +# # Putting it all together +# # ....................... +# +# We build the file `input.m4' which contains: +# +# divert(-1)dnl +# changequote([, ]) +# include(values.m4) +# include(dispatch.m4) +# undefine([dnl]) +# undefine([eval]) +# # Some more undefines... +# changequote() +# divert(0)dnl +# dnl The Unbelievable Truth +# changequote([, ])OLD(1, 2) +# NEW([0, 0], +# 0) +# +# And we just run m4 on it. Et voila`, Monsieur ! Mais oui, mais oui. +# +# Well, there are a few additional technicalities. For instance, we +# rely on `changequote', `ifelse' and `defn', but we don't want to +# interpret the changequotes of the user, so we simply use another name: +# `_au_changequote' etc. +# +# +# # Failure of the fourth approach +# # ------------------------------ +# +# This approach is heavily based on traces, but then there is an obvious +# problem: non expanded code will never be seen. In particular, the body +# of a `define' definition is not seen, so on the input +# +# define([idem], [OLD(0, [$1])]) +# +# autoupdate would never see the `OLD', and wouldn't have updated it. +# Worse yet, if `idem(0)' was used later, then autoupdate sees that +# `OLD' is used, computes the result for `OLD(0, 0)' and sets up a +# dispatcher for `OLD'. Since there was no computed value for `OLD(0, +# [$1])', the dispatcher would have replaced with... nothing, leading +# to +# +# define([idem], []) +# +# With some more thinking, you see that the two step approach is wrong, +# the namespace approach was much saner. +# +# But you learned a lot, in particular you realized that using traces +# can make it possible to simulate namespaces! +# +# +# +# # The fifth implementation: m4 namespaces by files +# # ================================================ +# +# The fourth implementation demonstrated something unsurprising: you +# cannot precompute, i.e., the namespace approach was the right one. +# Still, we no longer want them, they're too expensive. Let's have a +# look at the way it worked. +# +# When updating +# +# dnl The Unbelievable Truth +# OLD(1, 2) +# NEW([0, 0], [0]) +# +# you evaluate `input.m4': +# +# divert(-1) +# changequote([, ]) +# define([OLD], +# [m4_enable()NEW([$1, $2], m4_eval([$1 + $2]))m4_disable()]) +# ... +# m4_disable() +# dnl The Unbelievable Truth +# OLD(1, 2) +# NEW([0, 0], [0]) +# +# where `m4_disable' undefines the m4 and m4sugar, and disables the quotes +# and comments: +# +# define([m4_disable], +# [undefine([__file__]) +# ... +# changecom(#) +# changequote()]) +# +# `m4_enable' does the converse: reestablish quotes and comments +# --easy--, reestablish m4sugar --easy: just load `m4sugar.m4' again-- and +# reenable the builtins. This later task requires that you first save +# the builtins. And BTW, the definition above of `m4_disable' cannot +# work: you undefined `changequote' before using it! So you need to use +# your privates copies of the builtins. Let's introduce three files for +# this: +# +# `m4save.m4' +# moves the m4 builtins into the `_au_' pseudo namespace, +# `unm4.m4' +# undefines the builtins, +# `m4.m4' +# restores them. +# +# So `input.m4' is: +# +# divert(-1) +# changequote([, ]) +# +# include([m4save.m4]) +# +# # Import AU. +# define([OLD], +# [m4_enable()NEW([$1, $2], m4_eval([$1 + $2]))m4_disable()]) +# +# define([_au_enable], +# [_au_changecom([#]) +# _au_include([m4.m4]) +# _au_include(m4sugar.m4)]) +# +# define([_au_disable], +# [# Disable m4sugar. +# # Disable the m4 builtins. +# _au_include([unm4.m4]) +# # 1. Disable special characters. +# _au_changequote() +# _au_changecom()]) +# +# m4_disable() +# dnl The Unbelievable Truth +# OLD(1, 2) +# NEW([0, 0], [0]) +# +# Based on what we learned in the fourth implementation we know that we +# have to enable the quotes *before* any AU macro, and we know we need +# to build autoquoting versions of the AC macros. But the autoquoting +# AC definitions must be disabled in the rest of the file, and enabled +# inside AU macros. +# +# Using `autoconf --trace' it is easy to build the files +# +# `ac.m4' +# define the autoquoting AC fake macros +# `disable.m4' +# undefine the m4sugar and AC autoquoting macros. +# `au.m4' +# definitions of the AU macros (such as `OLD' above). +# +# Now, `input.m4' is: +# +# divert(-1) +# changequote([, ]) +# +# include([m4save.m4]) +# # Import AU. +# include([au.m4]) +# +# define([_au_enable], +# [_au_changecom([#]) +# _au_include([m4.m4]) +# _au_include(m4sugar.m4) +# _au_include(ac.m4)]) +# +# define([_au_disable], +# [_au_include([disable.m4]) +# _au_include([unm4.m4]) +# # 1. Disable special characters. +# _au_changequote() +# _au_changecom()]) +# +# m4_disable() +# dnl The Unbelievable Truth +# _au_changequote([, ])OLD(1, 2) +# NEW([0, 0], [0]) +# +# Finally, version V is ready. +# +# Well... almost. +# +# There is a slight problem that remains: if an AU macro OUTER includes +# an AU macro INNER, then _au_enable will be run when entering OUTER +# and when entering INNER (not good, but not too bad yet). But when +# getting out of INNER, _au_disable will disable everything while we +# were still in OUTER. Badaboom. +# +# Therefore _au_enable and _au_disable have to be written to work by +# pairs: each _au_enable pushdef's _au_enabled, and each _au_disable +# popdef's _au_enabled. And of course _au_enable and _au_disable are +# effective when _au_enabled is *not* defined. +# +# Finally, version V' is ready. And there is much rejoicing. (And I +# have free time again. I think. Yeah, right.) + +### Setup "GNU" style for perl-mode and cperl-mode. +## Local Variables: +## perl-indent-level: 2 +## perl-continued-statement-offset: 2 +## perl-continued-brace-offset: 0 +## perl-brace-offset: 0 +## perl-brace-imaginary-offset: 0 +## perl-label-offset: -2 +## cperl-indent-level: 2 +## cperl-brace-offset: 0 +## cperl-continued-brace-offset: 0 +## cperl-label-offset: -2 +## cperl-extra-newline-before-brace: t +## cperl-merge-trailing-else: nil +## cperl-continued-statement-offset: 2 +## End: diff --git a/bin/ifnames.in b/bin/ifnames.in new file mode 100644 index 0000000..ba2cd05 --- /dev/null +++ b/bin/ifnames.in @@ -0,0 +1,153 @@ +#! @PERL@ -w +# -*- perl -*- +# @configure_input@ + +eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' + if 0; + +# ifnames - print the identifiers used in C preprocessor conditionals + +# Copyright (C) 1994-1995, 1999-2003, 2005-2012 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 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 . + +# Reads from stdin if no files are given. +# Writes to stdout. + +# Written by David MacKenzie +# and Paul Eggert . + +BEGIN +{ + my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@'; + unshift @INC, $pkgdatadir; + + # Override SHELL. On DJGPP SHELL may not be set to a shell + # that can handle redirection and quote arguments correctly, + # e.g.: COMMAND.COM. For DJGPP always use the shell that configure + # has detected. + $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); +} + +use Autom4te::General; +use Autom4te::XFile; +use Autom4te::FileUtils; + +# $HELP +# ----- +$help = "Usage: $0 [OPTION]... [FILE]... + +Scan all of the C source FILES (or the standard input, if none are +given) and write to the standard output a sorted list of all the +identifiers that appear in those files in `#if', `#elif', `#ifdef', or +`#ifndef' directives. Print each identifier on a line, followed by a +space-separated list of the files in which that identifier occurs. + + -h, --help print this help, then exit + -V, --version print version number, then exit + +Report bugs to . +GNU Autoconf home page: . +General help using GNU software: . +"; + + +# $VERSION +# -------- +$version = "ifnames (@PACKAGE_NAME@) @VERSION@ +Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc. +License GPLv3+/Autoconf: GNU GPL version 3 or later +, +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Written by David J. MacKenzie and Paul Eggert. +"; + + +# &parse_args () +# -------------- +# Process any command line arguments. +sub parse_args () +{ + getopt (); +} + + +# %OCCURRENCE +# ----------- +my %occurrence; + + +# &scan_file ($FILE-NAME) +# ----------------------- +sub scan_file ($) +{ + my ($file_name) = @_; + my $file = new Autom4te::XFile ("< " . open_quote ($file_name)); + while ($_ = $file->getline) + { + # Continuation lines. + $_ .= $file->getline + while (s/\\$//); + + # Preprocessor directives. + if (s/^\s*\#\s*(if|ifdef|ifndef|elif)\s+//) + { + # Remove comments. Not perfect, but close enough. + s(/\*.*?\*/)(); + s(/\*.*)(); + s(//.*)(); + foreach my $word (split (/\W+/)) + { + next + if $word eq 'defined' || $word !~ /^[a-zA-Z_]/; + $occurrence{$word}{$file_name} = 1; + } + } + } +} + + +## ------ ## +## Main. ## +## ------ ## + +parse_args(); +foreach (@ARGV) + { + scan_file ($_); + } +foreach (sort keys %occurrence) + { + print "$_ ", join (' ', sort keys %{$occurrence{$_}}), "\n"; + } + +### Setup "GNU" style for perl-mode and cperl-mode. +## Local Variables: +## perl-indent-level: 2 +## perl-continued-statement-offset: 2 +## perl-continued-brace-offset: 0 +## perl-brace-offset: 0 +## perl-brace-imaginary-offset: 0 +## perl-label-offset: -2 +## cperl-indent-level: 2 +## cperl-brace-offset: 0 +## cperl-continued-brace-offset: 0 +## cperl-label-offset: -2 +## cperl-extra-newline-before-brace: t +## cperl-merge-trailing-else: nil +## cperl-continued-statement-offset: 2 +## End: diff --git a/build-aux/announce-gen b/build-aux/announce-gen new file mode 100755 index 0000000..8c6ed36 --- /dev/null +++ b/build-aux/announce-gen @@ -0,0 +1,542 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Generate a release announcement message. + +my $VERSION = '2012-04-19 14:36'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2002-2012 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 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 . + +# Written by Jim Meyering + +use strict; + +use Getopt::Long; +use Digest::MD5; +eval { require Digest::SHA; } + or eval 'use Digest::SHA1'; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +my %valid_release_types = map {$_ => 1} qw (alpha beta stable); +my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz'); + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try '$ME --help' for more information.\n"; + } + else + { + my @types = sort keys %valid_release_types; + print $STREAM < = C + +Compute the sizes of the C<@file> and return them as a hash. Return +C if one of the computation failed. + +=cut + +sub sizes (@) +{ + my (@file) = @_; + + my $fail = 0; + my %res; + foreach my $f (@file) + { + my $cmd = "du --human $f"; + my $t = `$cmd`; + # FIXME-someday: give a better diagnostic, a la $PROCESS_STATUS + $@ + and (warn "$ME: command failed: '$cmd'\n"), $fail = 1; + chomp $t; + $t =~ s/^([\d.]+[MkK]).*/${1}B/; + $res{$f} = $t; + } + return $fail ? undef : %res; +} + +=item C dedicated to the list of <@file>, which +sizes are stored in C<%size>, and which are available from the C<@url>. + +=cut + +sub print_locations ($\@\%@) +{ + my ($title, $url, $size, @file) = @_; + print "Here are the $title:\n"; + foreach my $url (@{$url}) + { + for my $file (@file) + { + print " $url/$file"; + print " (", $$size{$file}, ")" + if exists $$size{$file}; + print "\n"; + } + } + print "\n"; +} + +=item C. + +=cut + +sub print_checksums (@) +{ + my (@file) = @_; + + print "Here are the MD5 and SHA1 checksums:\n"; + print "\n"; + + foreach my $meth (qw (md5 sha1)) + { + foreach my $f (@file) + { + open IN, '<', $f + or die "$ME: $f: cannot open for reading: $!\n"; + binmode IN; + my $dig = + ($meth eq 'md5' + ? Digest::MD5->new->addfile(*IN)->hexdigest + : Digest::SHA1->new->addfile(*IN)->hexdigest); + close IN; + print "$dig $f\n"; + } + } + print "\n"; +} + +=item C addressing changes +between versions C<$prev_version> and C<$curr_version>. + +=cut + +sub print_news_deltas ($$$) +{ + my ($news_file, $prev_version, $curr_version) = @_; + + my $news_name = $news_file; + $news_name =~ s|^\./||; + + print "\n$news_name\n\n"; + + # Print all lines from $news_file, starting with the first one + # that mentions $curr_version up to but not including + # the first occurrence of $prev_version. + my $in_items; + + my $re_prefix = qr/(?:\* )?(?:Noteworthy c|Major c|C)(?i:hanges)/; + + my $found_news; + open NEWS, '<', $news_file + or die "$ME: $news_file: cannot open for reading: $!\n"; + while (defined (my $line = )) + { + if ( ! $in_items) + { + # Match lines like these: + # * Major changes in release 5.0.1: + # * Noteworthy changes in release 6.6 (2006-11-22) [stable] + $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$curr_version\E(?:[^\d.]|$)/o + or next; + $in_items = 1; + print $line; + } + else + { + # This regexp must not match version numbers in NEWS items. + # For example, they might well say "introduced in 4.5.5", + # and we don't want that to match. + $line =~ /^$re_prefix.*(?:[^\d.]|$)\Q$prev_version\E(?:[^\d.]|$)/o + and last; + print $line; + $line =~ /\S/ + and $found_news = 1; + } + } + close NEWS; + + $in_items + or die "$ME: $news_file: no matching lines for '$curr_version'\n"; + $found_news + or die "$ME: $news_file: no news item found for '$curr_version'\n"; +} + +sub print_changelog_deltas ($$) +{ + my ($package_name, $prev_version) = @_; + + # Print new ChangeLog entries. + + # First find all CVS-controlled ChangeLog files. + use File::Find; + my @changelog; + find ({wanted => sub {$_ eq 'ChangeLog' && -d 'CVS' + and push @changelog, $File::Find::name}}, + '.'); + + # If there are no ChangeLog files, we're done. + @changelog + or return; + my %changelog = map {$_ => 1} @changelog; + + # Reorder the list of files so that if there are ChangeLog + # files in the specified directories, they're listed first, + # in this order: + my @dir = qw ( . src lib m4 config doc ); + + # A typical @changelog array might look like this: + # ./ChangeLog + # ./po/ChangeLog + # ./m4/ChangeLog + # ./lib/ChangeLog + # ./doc/ChangeLog + # ./config/ChangeLog + my @reordered; + foreach my $d (@dir) + { + my $dot_slash = $d eq '.' ? $d : "./$d"; + my $target = "$dot_slash/ChangeLog"; + delete $changelog{$target} + and push @reordered, $target; + } + + # Append any remaining ChangeLog files. + push @reordered, sort keys %changelog; + + # Remove leading './'. + @reordered = map { s!^\./!!; $_ } @reordered; + + print "\nChangeLog entries:\n\n"; + # print join ("\n", @reordered), "\n"; + + $prev_version =~ s/\./_/g; + my $prev_cvs_tag = "\U$package_name\E-$prev_version"; + + my $cmd = "cvs -n diff -u -r$prev_cvs_tag -rHEAD @reordered"; + open DIFF, '-|', $cmd + or die "$ME: cannot run '$cmd': $!\n"; + # Print two types of lines, making minor changes: + # Lines starting with '+++ ', e.g., + # +++ ChangeLog 22 Feb 2003 16:52:51 -0000 1.247 + # and those starting with '+'. + # Don't print the others. + my $prev_printed_line_empty = 1; + while (defined (my $line = )) + { + if ($line =~ /^\+\+\+ /) + { + my $separator = "*"x70 ."\n"; + $line =~ s///; + $line =~ s/\s.*//; + $prev_printed_line_empty + or print "\n"; + print $separator, $line, $separator; + } + elsif ($line =~ /^\+/) + { + $line =~ s///; + print $line; + $prev_printed_line_empty = ($line =~ /^$/); + } + } + close DIFF; + + # The exit code should be 1. + # Allow in case there are no modified ChangeLog entries. + $? == 256 || $? == 128 + or warn "$ME: warning: '$cmd' had unexpected exit code or signal ($?)\n"; +} + +sub get_tool_versions ($$) +{ + my ($tool_list, $gnulib_version) = @_; + @$tool_list + or return (); + + my $fail; + my @tool_version_pair; + foreach my $t (@$tool_list) + { + if ($t eq 'gnulib') + { + push @tool_version_pair, ucfirst $t . ' ' . $gnulib_version; + next; + } + # Assume that the last "word" on the first line of + # 'tool --version' output is the version string. + my ($first_line, undef) = split ("\n", `$t --version`); + if ($first_line =~ /.* (\d[\w.-]+)$/) + { + $t = ucfirst $t; + push @tool_version_pair, "$t $1"; + } + else + { + defined $first_line + and $first_line = ''; + warn "$ME: $t: unexpected --version output\n:$first_line"; + $fail = 1; + } + } + + $fail + and exit 1; + + return @tool_version_pair; +} + +{ + # Neutralize the locale, so that, for instance, "du" does not + # issue "1,2" instead of "1.2", what confuses our regexps. + $ENV{LC_ALL} = "C"; + + my $mail_headers; + my $release_type; + my $package_name; + my $prev_version; + my $curr_version; + my $gpg_key_id; + my @url_dir_list; + my @news_file; + my $bootstrap_tools; + my $gnulib_version; + my $print_checksums_p = 1; + + GetOptions + ( + 'mail-headers=s' => \$mail_headers, + 'release-type=s' => \$release_type, + 'package-name=s' => \$package_name, + 'previous-version=s' => \$prev_version, + 'current-version=s' => \$curr_version, + 'gpg-key-id=s' => \$gpg_key_id, + 'url-directory=s' => \@url_dir_list, + 'news=s' => \@news_file, + 'bootstrap-tools=s' => \$bootstrap_tools, + 'gnulib-version=s' => \$gnulib_version, + 'print-checksums!' => \$print_checksums_p, + 'archive-suffix=s' => \@archive_suffixes, + + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + ) or usage 1; + + my $fail = 0; + # Ensure that sure each required option is specified. + $release_type + or (warn "$ME: release type not specified\n"), $fail = 1; + $package_name + or (warn "$ME: package name not specified\n"), $fail = 1; + $prev_version + or (warn "$ME: previous version string not specified\n"), $fail = 1; + $curr_version + or (warn "$ME: current version string not specified\n"), $fail = 1; + $gpg_key_id + or (warn "$ME: GnuPG key ID not specified\n"), $fail = 1; + @url_dir_list + or (warn "$ME: URL directory name(s) not specified\n"), $fail = 1; + + my @tool_list = split ',', $bootstrap_tools; + + grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version + and (warn "$ME: when specifying gnulib as a tool, you must also specify\n" + . "--gnulib-version=V, where V is the result of running git describe\n" + . "in the gnulib source directory.\n"), $fail = 1; + + exists $valid_release_types{$release_type} + or (warn "$ME: '$release_type': invalid release type\n"), $fail = 1; + + @ARGV + and (warn "$ME: too many arguments:\n", join ("\n", @ARGV), "\n"), + $fail = 1; + $fail + and usage 1; + + my $my_distdir = "$package_name-$curr_version"; + + my $xd = "$package_name-$prev_version-$curr_version.xdelta"; + + my @candidates = map { "$my_distdir.$_" } @archive_suffixes; + my @tarballs = grep {-f $_} @candidates; + + @tarballs + or die "$ME: none of " . join(', ', @candidates) . " were found\n"; + my @sizable = @tarballs; + -f $xd + and push @sizable, $xd; + my %size = sizes (@sizable); + %size + or exit 1; + + my $headers = ''; + if (defined $mail_headers) + { + ($headers = $mail_headers) =~ s/\s+(\S+:)/\n$1/g; + $headers .= "\n"; + } + + # The markup is escaped as <\# so that when this script is sent by + # mail (or part of a diff), Gnus is not triggered. + print < + +FIXME: put comments here + +EOF + + if (@url_dir_list == 1 && @tarballs == 1) + { + # When there's only one tarball and one URL, use a more concise form. + my $m = "$url_dir_list[0]/$tarballs[0]"; + print "Here are the compressed sources and a GPG detached signature[*]:\n" + . " $m\n" + . " $m.sig\n\n"; + } + else + { + print_locations ("compressed sources", @url_dir_list, %size, @tarballs); + -f $xd + and print_locations ("xdelta diffs (useful? if so, " + . "please tell bug-gnulib\@gnu.org)", + @url_dir_list, %size, $xd); + my @sig_files = map { "$_.sig" } @tarballs; + print_locations ("GPG detached signatures[*]", @url_dir_list, %size, + @sig_files); + } + + if ($url_dir_list[0] =~ "gnu\.org") + { + print "Use a mirror for higher download bandwidth:\n"; + if (@tarballs == 1 && $url_dir_list[0] =~ m!http://ftp\.gnu\.org/gnu/!) + { + (my $m = "$url_dir_list[0]/$tarballs[0]") + =~ s!http://ftp\.gnu\.org/gnu/!http://ftpmirror\.gnu\.org/!; + print " $m\n" + . " $m.sig\n\n"; + + } + else + { + print " http://www.gnu.org/order/ftp.html\n\n"; + } + } + + $print_checksums_p + and print_checksums (@sizable); + + print <. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/build-aux/config.sub b/build-aux/config.sub new file mode 100755 index 0000000..59bb593 --- /dev/null +++ b/build-aux/config.sub @@ -0,0 +1,1779 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. + +timestamp='2012-04-18' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 \ + | ns16k | ns32k \ + | open8 \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze) + basic_machine=microblaze-xilinx + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i386-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/build-aux/elisp-comp b/build-aux/elisp-comp new file mode 100755 index 0000000..7766db4 --- /dev/null +++ b/build-aux/elisp-comp @@ -0,0 +1,93 @@ +#!/bin/sh +# Copyright (C) 1995-2012 Free Software Foundation, Inc. + +scriptversion=2010-02-06.18; # UTC + +# Franc,ois Pinard , 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) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU 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 . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +case $1 in + '') + echo "$0: No files. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: elisp-comp [--help] [--version] FILES... + +This script byte-compiles all '.el' files listed as FILES using GNU +Emacs, and put the resulting '.elc' files into the current directory, +so disregarding the original directories used in '.el' arguments. + +This script manages in such a way that all Emacs LISP files to +be compiled are made visible between themselves, in the event +they require or load-library one another. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "elisp-comp $scriptversion" + exit $? + ;; +esac + +if test -z "$EMACS" || test "$EMACS" = "t"; then + # Value of "t" means we are running in a shell under Emacs. + # Just assume Emacs is called "emacs". + EMACS=emacs +fi + +tempdir=elc.$$ + +# Cleanup the temporary directory on exit. +trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0 +do_exit='(exit $ret); exit $ret' +trap "ret=129; $do_exit" 1 +trap "ret=130; $do_exit" 2 +trap "ret=141; $do_exit" 13 +trap "ret=143; $do_exit" 15 + +mkdir $tempdir +cp "$@" $tempdir + +( + cd $tempdir + echo "(setq load-path (cons nil load-path))" > script + $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $? + mv *.elc .. +) || exit $? + +(exit 0); exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh new file mode 100755 index 0000000..c8abd55 --- /dev/null +++ b/build-aux/gendocs.sh @@ -0,0 +1,385 @@ +#!/bin/sh -e +# gendocs.sh -- generate a GNU manual in many formats. This script is +# mentioned in maintain.texi. See the help message below for usage details. + +scriptversion=2011-04-08.14 + +# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 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 . +# +# Original author: Mohit Agarwal. +# Send bug reports and any other correspondence to bug-texinfo@gnu.org. +# +# The latest version of this script, and the companion template, is +# available from Texinfo CVS: +# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs.sh +# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs_template +# +# An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib). + +prog=`basename "$0"` +srcdir=`pwd` + +scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh" +templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template" + +: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="} +: ${MAKEINFO="makeinfo"} +: ${TEXI2DVI="texi2dvi -t @finalout"} +: ${DVIPS="dvips"} +: ${DOCBOOK2HTML="docbook2html"} +: ${DOCBOOK2PDF="docbook2pdf"} +: ${DOCBOOK2PS="docbook2ps"} +: ${DOCBOOK2TXT="docbook2txt"} +: ${GENDOCS_TEMPLATE_DIR="."} +: ${TEXI2HTML="texi2html"} +unset CDPATH +unset use_texi2html + +version="gendocs.sh $scriptversion + +Copyright 2010 Free Software Foundation, Inc. +There is NO warranty. You may redistribute this software +under the terms of the GNU General Public License. +For more information about these matters, see the files named COPYING." + +usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE + +Generate various output formats from PACKAGE.texinfo (or .texi or .txi) source. +See the GNU Maintainers document for a more extensive discussion: + http://www.gnu.org/prep/maintain_toc.html + +Options: + -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi} + -o OUTDIR write files into OUTDIR, instead of manual/. + --email ADR use ADR as contact in generated web pages. + --docbook convert to DocBook too (xml, txt, html, pdf and ps). + --html ARG pass indicated ARG to makeinfo or texi2html for HTML targets. + --texi2html use texi2html to generate HTML targets. + --help display this help and exit successfully. + --version display version information and exit successfully. + +Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\" + +Typical sequence: + cd PACKAGESOURCE/doc + wget \"$scripturl\" + wget \"$templateurl\" + $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\" + +Output will be in a new subdirectory \"manual\" (by default, use -o OUTDIR +to override). Move all the new files into your web CVS tree, as +explained in the Web Pages node of maintain.texi. + +Please use the --email ADDRESS option to specify your bug-reporting +address in the generated HTML pages. + +MANUAL-TITLE is included as part of the HTML of the overall +manual/index.html file. It should include the name of the package being +documented. manual/index.html is created by substitution from the file +$GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the +generic template for your own purposes.) + +If you have several manuals, you'll need to run this script several +times with different MANUAL values, specifying a different output +directory with -o each time. Then write (by hand) an overall index.html +with links to them all. + +If a manual's Texinfo sources are spread across several directories, +first copy or symlink all Texinfo sources into a single directory. +(Part of the script's work is to make a tar.gz of the sources.) + +You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML, and +DVIPS to control the programs that get executed, and +GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is +looked for. With --docbook, the environment variables DOCBOOK2HTML, +DOCBOOK2PDF, DOCBOOK2PS, and DOCBOOK2TXT are also respected. + +By default, makeinfo and texi2dvi are run in the default (English) +locale, since that's the language of most Texinfo manuals. If you +happen to have a non-English manual and non-English web site, see the +SETLANG setting in the source. + +Email bug reports or enhancement requests to bug-texinfo@gnu.org. +" + +calcsize() +{ + size=`ls -ksl $1 | awk '{print $1}'` + echo $size +} + +MANUAL_TITLE= +PACKAGE= +EMAIL=webmasters@gnu.org # please override with --email +htmlarg= +outdir=manual +srcfile= + +while test $# -gt 0; do + case $1 in + --email) shift; EMAIL=$1;; + --help) echo "$usage"; exit 0;; + --version) echo "$version"; exit 0;; + -s) shift; srcfile=$1;; + -o) shift; outdir=$1;; + --docbook) docbook=yes;; + --html) shift; htmlarg=$1;; + --texi2html) use_texi2html=1;; + -*) + echo "$0: Unknown option \`$1'." >&2 + echo "$0: Try \`--help' for more information." >&2 + exit 1;; + *) + if test -z "$PACKAGE"; then + PACKAGE=$1 + elif test -z "$MANUAL_TITLE"; then + MANUAL_TITLE=$1 + else + echo "$0: extra non-option argument \`$1'." >&2 + exit 1 + fi;; + esac + shift +done + +# For most of the following, the base name is just $PACKAGE +base=$PACKAGE + +if test -n "$srcfile"; then + # but here, we use the basename of $srcfile + base=`basename "$srcfile"` + case $base in + *.txi|*.texi|*.texinfo) base=`echo "$base"|sed 's/\.[texinfo]*$//'`;; + esac + PACKAGE=$base +elif test -s "$srcdir/$PACKAGE.texinfo"; then + srcfile=$srcdir/$PACKAGE.texinfo +elif test -s "$srcdir/$PACKAGE.texi"; then + srcfile=$srcdir/$PACKAGE.texi +elif test -s "$srcdir/$PACKAGE.txi"; then + srcfile=$srcdir/$PACKAGE.txi +else + echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2 + exit 1 +fi + +if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then + echo "$0: cannot read $GENDOCS_TEMPLATE_DIR/gendocs_template." >&2 + echo "$0: it is available from $templateurl." >&2 + exit 1 +fi + +case $outdir in + /*) abs_outdir=$outdir;; + *) abs_outdir=$srcdir/$outdir;; +esac + +echo Generating output formats for $srcfile + +cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\"" +echo "Generating info files... ($cmd)" +eval "$cmd" +mkdir -p "$outdir/" +tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info* +info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"` +# do not mv the info files, there's no point in having them available +# separately on the web. + +cmd="$SETLANG ${TEXI2DVI} \"$srcfile\"" +echo "Generating dvi ... ($cmd)" +eval "$cmd" + +# now, before we compress dvi: +echo Generating postscript... +${DVIPS} $PACKAGE -o +gzip -f -9 $PACKAGE.ps +ps_gz_size=`calcsize $PACKAGE.ps.gz` +mv $PACKAGE.ps.gz "$outdir/" + +# compress/finish dvi: +gzip -f -9 $PACKAGE.dvi +dvi_gz_size=`calcsize $PACKAGE.dvi.gz` +mv $PACKAGE.dvi.gz "$outdir/" + +cmd="$SETLANG ${TEXI2DVI} --pdf \"$srcfile\"" +echo "Generating pdf ... ($cmd)" +eval "$cmd" +pdf_size=`calcsize $PACKAGE.pdf` +mv $PACKAGE.pdf "$outdir/" + +cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\"" +echo "Generating ASCII... ($cmd)" +eval "$cmd" +ascii_size=`calcsize $PACKAGE.txt` +gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz" +ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"` +mv $PACKAGE.txt "$outdir/" + +html_split() +{ + opt="--split=$1 $htmlarg --node-files" + cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\"" + echo "Generating html by $1... ($cmd)" + eval "$cmd" + split_html_dir=$PACKAGE.html + ( + cd ${split_html_dir} || exit 1 + ln -sf ${PACKAGE}.html index.html + tar -czf "$abs_outdir/${PACKAGE}.html_$1.tar.gz" -- *.html + ) + eval html_$1_tgz_size=`calcsize "$outdir/${PACKAGE}.html_$1.tar.gz"` + rm -f "$outdir"/html_$1/*.html + mkdir -p "$outdir/html_$1/" + mv ${split_html_dir}/*.html "$outdir/html_$1/" + rmdir ${split_html_dir} +} + +if test -z "$use_texi2html"; then + opt="--no-split --html -o $PACKAGE.html $htmlarg" + cmd="$SETLANG $MAKEINFO $opt \"$srcfile\"" + echo "Generating monolithic html... ($cmd)" + rm -rf $PACKAGE.html # in case a directory is left over + eval "$cmd" + html_mono_size=`calcsize $PACKAGE.html` + gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz" + html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"` + mv $PACKAGE.html "$outdir/" + + cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $htmlarg \"$srcfile\"" + echo "Generating html by node... ($cmd)" + eval "$cmd" + split_html_dir=$PACKAGE.html + ( + cd ${split_html_dir} || exit 1 + tar -czf "$abs_outdir/${PACKAGE}.html_node.tar.gz" -- *.html + ) + html_node_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node.tar.gz"` + rm -f "$outdir"/html_node/*.html + mkdir -p "$outdir/html_node/" + mv ${split_html_dir}/*.html "$outdir/html_node/" + rmdir ${split_html_dir} +else + cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $htmlarg \"$srcfile\"" + echo "Generating monolithic html... ($cmd)" + rm -rf $PACKAGE.html # in case a directory is left over + eval "$cmd" + html_mono_size=`calcsize $PACKAGE.html` + gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz" + html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"` + mv $PACKAGE.html "$outdir/" + + html_split node + html_split chapter + html_split section +fi + +echo Making .tar.gz for sources... +d=`dirname $srcfile` +( + cd "$d" + srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` || true + tar cvzfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles +) +texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"` + +if test -n "$docbook"; then + cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml" + echo "Generating docbook XML... ($cmd)" + eval "$cmd" + docbook_xml_size=`calcsize $PACKAGE-db.xml` + gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz" + docbook_xml_gz_size=`calcsize "$outdir/$PACKAGE-db.xml.gz"` + mv $PACKAGE-db.xml "$outdir/" + + split_html_db_dir=html_node_db + cmd="${DOCBOOK2HTML} -o $split_html_db_dir \"${outdir}/$PACKAGE-db.xml\"" + echo "Generating docbook HTML... ($cmd)" + eval "$cmd" + ( + cd ${split_html_db_dir} || exit 1 + tar -czf "$abs_outdir/${PACKAGE}.html_node_db.tar.gz" -- *.html + ) + html_node_db_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node_db.tar.gz"` + rm -f "$outdir"/html_node_db/*.html + mkdir -p "$outdir/html_node_db" + mv ${split_html_db_dir}/*.html "$outdir/html_node_db/" + rmdir ${split_html_db_dir} + + cmd="${DOCBOOK2TXT} \"${outdir}/$PACKAGE-db.xml\"" + echo "Generating docbook ASCII... ($cmd)" + eval "$cmd" + docbook_ascii_size=`calcsize $PACKAGE-db.txt` + mv $PACKAGE-db.txt "$outdir/" + + cmd="${DOCBOOK2PS} \"${outdir}/$PACKAGE-db.xml\"" + echo "Generating docbook PS... ($cmd)" + eval "$cmd" + gzip -f -9 -c $PACKAGE-db.ps >"$outdir/$PACKAGE-db.ps.gz" + docbook_ps_gz_size=`calcsize "$outdir/$PACKAGE-db.ps.gz"` + mv $PACKAGE-db.ps "$outdir/" + + cmd="${DOCBOOK2PDF} \"${outdir}/$PACKAGE-db.xml\"" + echo "Generating docbook PDF... ($cmd)" + eval "$cmd" + docbook_pdf_size=`calcsize $PACKAGE-db.pdf` + mv $PACKAGE-db.pdf "$outdir/" +fi + +echo "Writing index file..." +if test -z "$use_texi2html"; then + CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\ + /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d" +else + CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d" +fi +curdate=`$SETLANG date '+%B %d, %Y'` +sed \ + -e "s!%%TITLE%%!$MANUAL_TITLE!g" \ + -e "s!%%EMAIL%%!$EMAIL!g" \ + -e "s!%%PACKAGE%%!$PACKAGE!g" \ + -e "s!%%DATE%%!$curdate!g" \ + -e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \ + -e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \ + -e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \ + -e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \ + -e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \ + -e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \ + -e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \ + -e "s!%%PDF_SIZE%%!$pdf_size!g" \ + -e "s!%%PS_GZ_SIZE%%!$ps_gz_size!g" \ + -e "s!%%ASCII_SIZE%%!$ascii_size!g" \ + -e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \ + -e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \ + -e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \ + -e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \ + -e "s!%%DOCBOOK_PS_GZ_SIZE%%!$docbook_ps_gz_size!g" \ + -e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \ + -e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \ + -e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \ + -e "s,%%SCRIPTURL%%,$scripturl,g" \ + -e "s!%%SCRIPTNAME%%!$prog!g" \ + -e "$CONDS" \ +$GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html" + +echo "Done, see $outdir/ subdirectory for new files." + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen new file mode 100755 index 0000000..0fa9063 --- /dev/null +++ b/build-aux/git-version-gen @@ -0,0 +1,220 @@ +#!/bin/sh +# Print a version string. +scriptversion=2012-03-18.17; # UTC + +# Copyright (C) 2007-2012 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 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/>. + +# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. +# It may be run two ways: +# - from a git repository in which the "git describe" command below +# produces useful output (thus requiring at least one signed tag) +# - from a non-git-repo directory containing a .tarball-version file, which +# presumes this script is invoked like "./git-version-gen .tarball-version". + +# In order to use intra-version strings in your project, you will need two +# separate generated version string files: +# +# .tarball-version - present only in a distribution tarball, and not in +# a checked-out repository. Created with contents that were learned at +# the last time autoconf was run, and used by git-version-gen. Must not +# be present in either $(srcdir) or $(builddir) for git-version-gen to +# give accurate answers during normal development with a checked out tree, +# but must be present in a tarball when there is no version control system. +# Therefore, it cannot be used in any dependencies. GNUmakefile has +# hooks to force a reconfigure at distribution time to get the value +# correct, without penalizing normal development with extra reconfigures. +# +# .version - present in a checked-out repository and in a distribution +# tarball. Usable in dependencies, particularly for files that don't +# want to depend on config.h but do want to track version changes. +# Delete this file prior to any autoconf run where you want to rebuild +# files to pick up a version string change; and leave it stale to +# minimize rebuild time after unrelated changes to configure sources. +# +# As with any generated file in a VC'd directory, you should add +# /.version to .gitignore, so that you don't accidentally commit it. +# .tarball-version is never generated in a VC'd directory, so needn't +# be listed there. +# +# Use the following line in your configure.ac, so that $(VERSION) will +# automatically be up-to-date each time configure is run (and note that +# since configure.ac no longer includes a version string, Makefile rules +# should not depend on configure.ac for version updates). +# +# AC_INIT([GNU project], +# m4_esyscmd([build-aux/git-version-gen .tarball-version]), +# [bug-project@example]) +# +# Then use the following lines in your Makefile.am, so that .version +# will be present for dependencies, and so that .version and +# .tarball-version will exist in distribution tarballs. +# +# EXTRA_DIST = $(top_srcdir)/.version +# BUILT_SOURCES = $(top_srcdir)/.version +# $(top_srcdir)/.version: +# echo $(VERSION) > $@-t && mv $@-t $@ +# dist-hook: +# echo $(VERSION) > $(distdir)/.tarball-version + + +me=$0 + +version="git-version-gen $scriptversion + +Copyright 2011 Free Software Foundation, Inc. +There is NO warranty. You may redistribute this software +under the terms of the GNU General Public License. +For more information about these matters, see the files named COPYING." + +usage="\ +Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT] +Print a version string. + +Options: + + --prefix prefix of git tags (default 'v') + + --help display this help and exit + --version output version information and exit + +Running without arguments will suffice in most cases." + +prefix=v + +while test $# -gt 0; do + case $1 in + --help) echo "$usage"; exit 0;; + --version) echo "$version"; exit 0;; + --prefix) shift; prefix="$1";; + -*) + echo "$0: Unknown option '$1'." >&2 + echo "$0: Try '--help' for more information." >&2 + exit 1;; + *) + if test -z "$tarball_version_file"; then + tarball_version_file="$1" + elif test -z "$tag_sed_script"; then + tag_sed_script="$1" + else + echo "$0: extra non-option argument '$1'." >&2 + exit 1 + fi;; + esac + shift +done + +if test -z "$tarball_version_file"; then + echo "$usage" + exit 1 +fi + +tag_sed_script="${tag_sed_script:-s/x/x/}" + +nl=' +' + +# Avoid meddling by environment variable of the same name. +v= +v_from_git= + +# First see if there is a tarball-only version file. +# then try "git describe", then default. +if test -f $tarball_version_file +then + v=`cat $tarball_version_file` || v= + case $v in + *$nl*) v= ;; # reject multi-line output + [0-9]*) ;; + *) v= ;; + esac + test -z "$v" \ + && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2 +fi + +if test -n "$v" +then + : # use $v +# Otherwise, if there is at least one git commit involving the working +# directory, and "git describe" output looks sensible, use that to +# derive a version string. +elif test "`git log -1 --pretty=format:x . 2>&1`" = x \ + && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \ + || git describe --abbrev=4 HEAD 2>/dev/null` \ + && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \ + && case $v in + $prefix[0-9]*) ;; + *) (exit 1) ;; + esac +then + # Is this a new git that lists number of commits since the last + # tag or the previous older version that did not? + # Newer: v6.10-77-g0f8faeb + # Older: v6.10-g0f8faeb + case $v in + *-*-*) : git describe is okay three part flavor ;; + *-*) + : git describe is older two part flavor + # Recreate the number of commits and rewrite such that the + # result is the same as if we were using the newer version + # of git describe. + vtag=`echo "$v" | sed 's/-.*//'` + commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \ + || { commit_list=failed; + echo "$0: WARNING: git rev-list failed" 1>&2; } + numcommits=`echo "$commit_list" | wc -l` + v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`; + test "$commit_list" = failed && v=UNKNOWN + ;; + esac + + # Change the first '-' to a '.', so version-comparing tools work properly. + # Remove the "g" in git describe's output string, to save a byte. + v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; + v_from_git=1 +else + v=UNKNOWN +fi + +v=`echo "$v" |sed "s/^$prefix//"` + +# Test whether to append the "-dirty" suffix only if the version +# string we're using came from git. I.e., skip the test if it's "UNKNOWN" +# or if it came from .tarball-version. +if test -n "$v_from_git"; then + # Don't declare a version "dirty" merely because a time stamp has changed. + git update-index --refresh > /dev/null 2>&1 + + dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty= + case "$dirty" in + '') ;; + *) # Append the suffix only if there isn't one already. + case $v in + *-dirty) ;; + *) v="$v-dirty" ;; + esac ;; + esac +fi + +# Omit the trailing newline, so that m4_esyscmd can use the result directly. +echo "$v" | tr -d "$nl" + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog new file mode 100755 index 0000000..38c6f3a --- /dev/null +++ b/build-aux/gitlog-to-changelog @@ -0,0 +1,385 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Convert git log output to ChangeLog format. + +my $VERSION = '2012-01-18 07:50'; # UTC +# The definition above must lie within the first 8 lines in order +# for the Emacs time-stamp write hook (at end) to update it. +# If you change this file with Emacs, please let the write hook +# do its job. Otherwise, update this string manually. + +# Copyright (C) 2008-2012 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 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/>. + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try '$ME --help' for more information.\n"; + } + else + { + print $STREAM <<EOF; +Usage: $ME [OPTIONS] [ARGS] + +Convert git log output to ChangeLog format. If present, any ARGS +are passed to "git log". To avoid ARGS being parsed as options to +$ME, they may be preceded by '--'. + +OPTIONS: + + --amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that + makes a change to SHA1's commit log text or metadata. + --append-dot append a dot to the first line of each commit message if + there is no other punctuation or blank at the end. + --no-cluster never cluster commit messages under the same date/author + header; the default is to cluster adjacent commit messages + if their headers are the same and neither commit message + contains multiple paragraphs. + --since=DATE convert only the logs since DATE; + the default is to convert all log entries. + --format=FMT set format string for commit subject and body; + see 'man git-log' for the list of format metacharacters; + the default is '%s%n%b%n' + + --help display this help and exit + --version output version information and exit + +EXAMPLE: + + $ME --since=2008-01-01 > ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +SPECIAL SYNTAX: + +The following types of strings are interpreted specially when they appear +at the beginning of a log message line. They are not copied to the output. + + Copyright-paperwork-exempt: Yes + Append the "(tiny change)" notation to the usual "date name email" + ChangeLog header to mark a change that does not require a copyright + assignment. + Co-authored-by: Joe User <user\@example.com> + List the specified name and email address on a second + ChangeLog header, denoting a co-author. + Signed-off-by: Joe User <user\@example.com> + These lines are simply elided. + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1 (alone on +a line) referring to a commit in the current project, and CODE refers to one +or more consecutive lines of Perl code. Pairs must be separated by one or +more blank line. + +Here is sample input for use with --amend=FILE, from coreutils: + +3a169f4c5d9159283548178668d2fae6fced3030 +# fix typo in title: +s/all tile types/all file types/ + +1379ed974f1fa39b12e2ffab18b3f7a607082202 +# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. +# Change the author to be Paul. Note the escaped "@": +s,Jim .*>,Paul Eggert <eggert\\\@cs.ucla.edu>, + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new string. +sub shell_quote($) +{ + my ($s) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1 +# (alone on a line) referring to a commit in the current project, and +# CODE refers to one or more consecutive lines of Perl code. +# Pairs must be separated by one or more blank line. +sub parse_amend_file($) +{ + my ($f) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = <F>)) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$line\n"; + } + } + close F; + + $fail + and exit 1; + + return $h; +} + +{ + my $since_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + my $cluster = 1; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + 'cluster!' => \$cluster, + ) or usage 1; + + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + + # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) + # that makes a correction in the log or attribution of that commit. + my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = (qw (git log --log-size), + '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); + + my $prev_multi_paragraph; + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = <PIPE>) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[0-9a-fA-F]{40}$/ + or die "$ME:$.: invalid SHA1: $sha\n"; + + # If this commit's log requires any transformation, do it now. + my $code = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $s->reval("$code") + or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; + + # Note that we've used this entry. + delete $amend_code->{$sha}; + + # Update $rest upon success. + $rest = $_; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog + # `(tiny change)' annotation. + my $tiny = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line) + ? ' (tiny change)' : ''); + + my $date_line = sprintf "%s %s$tiny\n", + strftime ("%F", localtime ($1)), $2; + + my @coauthors = grep /^Co-authored-by:.*$/, @line; + # Omit meta-data lines we've already interpreted. + @line = grep !/^(?:Signed-off-by:[ ].*>$ + |Co-authored-by:[ ] + |Copyright-paperwork-exempt:[ ] + )/x, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # Record whether there are two or more paragraphs. + my $multi_paragraph = grep /^\s*$/, @line; + + # Format 'Co-authored-by: A U Thor <email@example.com>' lines in + # standard multi-author ChangeLog format. + for (@coauthors) + { + s/^Co-authored-by:\s*/\t /; + s/\s*</ </; + + /<.*?@.*\..*>/ + or warn "$ME: warning: missing email address for " + . substr ($_, 5) . "\n"; + } + + # If clustering of commit messages has been disabled, if this header + # would be different from the previous date/name/email/coauthors header, + # or if this or the previous entry consists of two or more paragraphs, + # then print the header. + if ( ! $cluster + || $date_line ne $prev_date_line + || "@coauthors" ne "@prev_coauthors" + || $multi_paragraph + || $prev_multi_paragraph) + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + @coauthors + and print join ("\n", @coauthors), "\n"; + } + $prev_date_line = $date_line; + @prev_coauthors = @coauthors; + $prev_multi_paragraph = $multi_paragraph; + + # If there were any lines + if (@line == 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"; + } + else + { + if ($append_dot) + { + # If the first line of the message has enough room, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = <PIPE>) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic + + # Complain about any unused entry in the --amend=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/build-aux/gnupload b/build-aux/gnupload new file mode 100755 index 0000000..b71ddfd --- /dev/null +++ b/build-aux/gnupload @@ -0,0 +1,416 @@ +#!/bin/sh +# Sign files and upload them. + +scriptversion=2012-01-15.15; # UTC + +# Copyright (C) 2004-2012 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Originally written by Alexandre Duret-Lutz <adl@gnu.org>. +# The master copy of this file is maintained in the gnulib Git repository. +# Please send bug reports and feature requests to bug-gnulib@gnu.org. + +set -e + +GPG='gpg --batch --no-tty' +conffile=.gnuploadrc +to= +dry_run=false +symlink_files= +delete_files= +delete_symlinks= +collect_var= +dbg= +nl=' +' + +usage="Usage: $0 [OPTION]... [CMD] FILE... [[CMD] FILE...] + +Sign all FILES, and process them at selected destinations according to CMD. +<http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html> +explains further. + +Commands: + --delete delete FILES from destination + --symlink create symbolic links + --rmsymlink remove symbolic links + -- treat the remaining arguments as files to upload + +Options: + --help print this help text and exit + --to DEST specify one destination for FILES + (multiple --to options are allowed) + --user NAME sign with key NAME + --symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names + --dry-run do nothing, show what would have been done + --version output version information and exit + +If --symlink-regex is given without EXPR, then the link target name +is created by replacing the version information with '-latest', e.g.: + + foo-1.3.4.tar.gz -> foo-latest.tar.gz + +Recognized destinations are: + alpha.gnu.org:DIRECTORY + savannah.gnu.org:DIRECTORY + savannah.nongnu.org:DIRECTORY + ftp.gnu.org:DIRECTORY + build directive files and upload files by FTP + download.gnu.org.ua:{alpha|ftp}/DIRECTORY + build directive files and upload files by SFTP + [user@]host:DIRECTORY upload files with scp + +Options and commands are applied in order. If the file $conffile exists +in the current working directory, its contents are prepended to the +actual command line options. Use this to keep your defaults. Comments +(#) and empty lines in $conffile are allowed. + +Examples: +1. Upload foobar-1.0.tar.gz to ftp.gnu.org: + gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz + +2. Upload foobar-1.0.tar.gz and foobar-1.0.tar.xz to ftp.gnu.org: + gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz foobar-1.0.tar.xz + +3. Same as above, and also create symbolic links to foobar-latest.tar.*: + gnupload --to ftp.gnu.org:foobar \\ + --symlink-regex \\ + foobar-1.0.tar.gz foobar-1.0.tar.xz + +4. Upload foobar-0.9.90.tar.gz to two sites: + gnupload --to alpha.gnu.org:foobar \\ + --to sources.redhat.com:~ftp/pub/foobar \\ + foobar-0.9.90.tar.gz + +5. Delete oopsbar-0.9.91.tar.gz and upload foobar-0.9.91.tar.gz + (the -- terminates the list of files to delete): + gnupload --to alpha.gnu.org:foobar \\ + --to sources.redhat.com:~ftp/pub/foobar \\ + --delete oopsbar-0.9.91.tar.gz \\ + -- foobar-0.9.91.tar.gz + +gnupload uses the ncftpput program to do the transfers; if you don't +happen to have an ncftp package installed, the ncftpput-ftp script in +the build-aux/ directory of the gnulib package +(http://savannah.gnu.org/projects/gnulib) may serve as a replacement. + +Send patches and bug reports to <bug-gnulib@gnu.org>." + +# Read local configuration file +if test -r "$conffile"; then + echo "$0: Reading configuration file $conffile" + conf=`sed 's/#.*$//;/^$/d' "$conffile" | tr "\015$nl" ' '` + eval set x "$conf \"\$@\"" + shift +fi + +while test -n "$1"; do + case $1 in + -*) + collect_var= + case $1 in + --help) + echo "$usage" + exit $? + ;; + --to) + if test -z "$2"; then + echo "$0: Missing argument for --to" 1>&2 + exit 1 + else + to="$to $2" + shift + fi + ;; + --user) + if test -z "$2"; then + echo "$0: Missing argument for --user" 1>&2 + exit 1 + else + GPG="$GPG --local-user $2" + shift + fi + ;; + --delete) + collect_var=delete_files + ;; + --rmsymlink) + collect_var=delete_symlinks + ;; + --symlink-regex=*) + symlink_expr=`expr "$1" : '[^=]*=\(.*\)'` + ;; + --symlink-regex) + symlink_expr='s|-[0-9][0-9\.]*\(-[0-9][0-9]*\)\{0,1\}\.|-latest.|' + ;; + --symlink) + collect_var=symlink_files + ;; + --dry-run|-n) + dry_run=: + ;; + --version) + echo "gnupload $scriptversion" + exit $? + ;; + --) + shift + break + ;; + -*) + echo "$0: Unknown option '$1', try '$0 --help'" 1>&2 + exit 1 + ;; + esac + ;; + *) + if test -z "$collect_var"; then + break + else + eval "$collect_var=\"\$$collect_var $1\"" + fi + ;; + esac + shift +done + +dprint() +{ + echo "Running $* ..." +} + +if $dry_run; then + dbg=dprint +fi + +if test -z "$to"; then + echo "$0: Missing destination sites" >&2 + exit 1 +fi + +if test -n "$symlink_files"; then + x=`echo "$symlink_files" | sed 's/[^ ]//g;s/ //g'` + if test -n "$x"; then + echo "$0: Odd number of symlink arguments" >&2 + exit 1 + fi +fi + +if test $# = 0; then + if test -z "${symlink_files}${delete_files}${delete_symlinks}"; then + echo "$0: No file to upload" 1>&2 + exit 1 + fi +else + # Make sure all files exist. We don't want to ask + # for the passphrase if the script will fail. + for file + do + if test ! -f $file; then + echo "$0: Cannot find '$file'" 1>&2 + exit 1 + elif test -n "$symlink_expr"; then + linkname=`echo $file | sed "$symlink_expr"` + if test -z "$linkname"; then + echo "$0: symlink expression produces empty results" >&2 + exit 1 + elif test "$linkname" = $file; then + echo "$0: symlink expression does not alter file name" >&2 + exit 1 + fi + fi + done +fi + +# Make sure passphrase is not exported in the environment. +unset passphrase + +# Reset PATH to be sure that echo is a built-in. We will later use +# 'echo $passphrase' to output the passphrase, so it is important that +# it is a built-in (third-party programs tend to appear in 'ps' +# listings with their arguments...). +# Remember this script runs with 'set -e', so if echo is not built-in +# it will exit now. +PATH=/empty echo -n "Enter GPG passphrase: " +stty -echo +read -r passphrase +stty echo +echo + +if test $# -ne 0; then + for file + do + echo "Signing $file ..." + rm -f $file.sig + echo "$passphrase" | $dbg $GPG --passphrase-fd 0 -ba -o $file.sig $file + done +fi + + +# mkdirective DESTDIR BASE FILE STMT +# Arguments: See upload, below +mkdirective () +{ + stmt="$4" + if test -n "$3"; then + stmt=" +filename: $3$stmt" + fi + + cat >${2}.directive<<EOF +version: 1.1 +directory: $1 +comment: gnupload v. $scriptversion$stmt +EOF + if $dry_run; then + echo "File ${2}.directive:" + cat ${2}.directive + echo "File ${2}.directive:" | sed 's/./-/g' + fi +} + +mksymlink () +{ + while test $# -ne 0 + do + echo "symlink: $1 $2" + shift + shift + done +} + +# upload DEST DESTDIR BASE FILE STMT FILES +# Arguments: +# DEST Destination site; +# DESTDIR Destination directory; +# BASE Base name for the directive file; +# FILE Name of the file to distribute (may be empty); +# STMT Additional statements for the directive file; +# FILES List of files to upload. +upload () +{ + dest=$1 + destdir=$2 + base=$3 + file=$4 + stmt=$5 + files=$6 + + rm -f $base.directive $base.directive.asc + case $dest in + alpha.gnu.org:*) + mkdirective "$destdir" "$base" "$file" "$stmt" + echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive + $dbg ncftpput ftp-upload.gnu.org /incoming/alpha $files $base.directive.asc + ;; + ftp.gnu.org:*) + mkdirective "$destdir" "$base" "$file" "$stmt" + echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive + $dbg ncftpput ftp-upload.gnu.org /incoming/ftp $files $base.directive.asc + ;; + savannah.gnu.org:*) + if test -z "$files"; then + echo "$0: warning: standalone directives not applicable for $dest" >&2 + fi + $dbg ncftpput savannah.gnu.org /incoming/savannah/$destdir $files + ;; + savannah.nongnu.org:*) + if test -z "$files"; then + echo "$0: warning: standalone directives not applicable for $dest" >&2 + fi + $dbg ncftpput savannah.nongnu.org /incoming/savannah/$destdir $files + ;; + download.gnu.org.ua:alpha/*|download.gnu.org.ua:ftp/*) + destdir_p1=`echo "$destdir" | sed 's,^[^/]*/,,'` + destdir_topdir=`echo "$destdir" | sed 's,/.*,,'` + mkdirective "$destdir_p1" "$base" "$file" "$stmt" + echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive + for f in $files $base.directive.asc + do + echo put $f + done | $dbg sftp -b - puszcza.gnu.org.ua:/incoming/$destdir_topdir + ;; + /*) + dest_host=`echo "$dest" | sed 's,:.*,,'` + mkdirective "$destdir" "$base" "$file" "$stmt" + echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive + $dbg cp $files $base.directive.asc $dest_host + ;; + *) + if test -z "$files"; then + echo "$0: warning: standalone directives not applicable for $dest" >&2 + fi + $dbg scp $files $dest + ;; + esac + rm -f $base.directive $base.directive.asc +} + +##### +# Process any standalone directives +stmt= +if test -n "$symlink_files"; then + stmt="$stmt +`mksymlink $symlink_files`" +fi + +for file in $delete_files +do + stmt="$stmt +archive: $file" +done + +for file in $delete_symlinks +do + stmt="$stmt +rmsymlink: $file" +done + +if test -n "$stmt"; then + for dest in $to + do + destdir=`echo $dest | sed 's/[^:]*://'` + upload "$dest" "$destdir" "`hostname`-$$" "" "$stmt" + done +fi + +# Process actual uploads +for dest in $to +do + for file + do + echo "Uploading $file to $dest ..." + stmt= + files="$file $file.sig" + destdir=`echo $dest | sed 's/[^:]*://'` + if test -n "$symlink_expr"; then + linkname=`echo $file | sed "$symlink_expr"` + stmt="$stmt +symlink: $file $linkname +symlink: $file.sig $linkname.sig" + fi + upload "$dest" "$destdir" "$file" "$file" "$stmt" "$files" + done +done + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/install-sh b/build-aux/install-sh new file mode 100755 index 0000000..377bb86 --- /dev/null +++ b/build-aux/install-sh @@ -0,0 +1,527 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2011-11-20.07; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh new file mode 100755 index 0000000..4614441 --- /dev/null +++ b/build-aux/mdate-sh @@ -0,0 +1,224 @@ +#!/bin/sh +# Get modification time of a file or directory and pretty-print it. + +scriptversion=2010-08-21.06; # UTC + +# Copyright (C) 1995-2012 Free Software Foundation, Inc. +# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 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) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU 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/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +fi + +case $1 in + '') + echo "$0: No file. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: mdate-sh [--help] [--version] FILE + +Pretty-print the modification day of FILE, in the format: +1 January 1970 + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "mdate-sh $scriptversion" + exit $? + ;; +esac + +error () +{ + echo "$0: $1" >&2 + exit 1 +} + + +# Prevent date giving response in another language. +LANG=C +export LANG +LC_ALL=C +export LC_ALL +LC_TIME=C +export LC_TIME + +# GNU ls changes its time format in response to the TIME_STYLE +# variable. Since we cannot assume 'unset' works, revert this +# variable to its documented default. +if test "${TIME_STYLE+set}" = set; then + TIME_STYLE=posix-long-iso + export TIME_STYLE +fi + +save_arg1=$1 + +# Find out how to get the extended ls output of a file or directory. +if ls -L /dev/null 1>/dev/null 2>&1; then + ls_command='ls -L -l -d' +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 +# This differs from Unix, which adds ownership information. +# drwxrwx--- 2 root root 4096 Aug 11 2001 foo +# +# To find the date, we split the line on spaces and iterate on words +# until we find a month. This cannot work with files whose owner is a +# user named "Jan", or "Feb", etc. However, it's unlikely that '/' +# will be owned by a user whose name is a month. So we first look at +# the extended ls output of the root directory to decide how many +# 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_command /` + +# Find which argument is the month. +month= +command= +until test $month +do + test $# -gt 0 || error "failed parsing '$ls_command /' output" + shift + # Add another shift to the command. + command="$command shift;" + case $1 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; + esac +done + +test -n "$month" || error "failed parsing '$ls_command /' output" + +# Get the extended ls output of the file or directory. +set dummy x`eval "$ls_command \"\\\$save_arg1\""` + +# Remove all preceding arguments +eval $command + +# Because of the dummy argument above, month is in $2. +# +# On a POSIX system, we should have +# +# $# = 5 +# $1 = file size +# $2 = month +# $3 = day +# $4 = year or time +# $5 = filename +# +# On Darwin 7.7.0 and 7.6.0, we have +# +# $# = 4 +# $1 = day +# $2 = month +# $3 = year or time +# $4 = filename + +# Get the month. +case $2 in + Jan) month=January; nummonth=1;; + Feb) month=February; nummonth=2;; + Mar) month=March; nummonth=3;; + Apr) month=April; nummonth=4;; + May) month=May; nummonth=5;; + Jun) month=June; nummonth=6;; + Jul) month=July; nummonth=7;; + Aug) month=August; nummonth=8;; + Sep) month=September; nummonth=9;; + Oct) month=October; nummonth=10;; + Nov) month=November; nummonth=11;; + Dec) month=December; nummonth=12;; +esac + +case $3 in + ???*) day=$1;; + *) day=$3; shift;; +esac + +# Here we have to deal with the problem that the ls output gives either +# the time of day or the year. +case $3 in + *:*) set `date`; eval year=\$$# + case $2 in + Jan) nummonthtod=1;; + Feb) nummonthtod=2;; + Mar) nummonthtod=3;; + Apr) nummonthtod=4;; + May) nummonthtod=5;; + Jun) nummonthtod=6;; + Jul) nummonthtod=7;; + Aug) nummonthtod=8;; + Sep) nummonthtod=9;; + Oct) nummonthtod=10;; + Nov) nummonthtod=11;; + Dec) nummonthtod=12;; + esac + # For the first six month of the year the time notation can also + # be used for files modified in the last year. + if (expr $nummonth \> $nummonthtod) > /dev/null; + then + year=`expr $year - 1` + fi;; + *) year=$3;; +esac + +# The result. +echo $day $month $year + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/missing b/build-aux/missing new file mode 100755 index 0000000..9a55648 --- /dev/null +++ b/build-aux/missing @@ -0,0 +1,330 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2012-01-06.18; # UTC + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, 'missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file 'aclocal.m4' + autoconf touch file 'configure' + autoheader touch file 'config.h.in' + autom4te touch the output file, or create a stub one + automake touch all 'Makefile.in' files + bison create 'y.tab.[ch]', if possible, from existing .[ch] + flex create 'lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create 'lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create 'y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to <bug-automake@gnu.org>." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) + # Not GNU programs, they don't have --version. + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running '$TOOL --version' or '$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $program in + aclocal*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified 'acinclude.m4' or '${configure_ac}'. You might want + to install the Automake and Perl packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified '${configure_ac}'. You might want to install the + Autoconf and GNU m4 packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified 'acconfig.h' or '${configure_ac}'. You might want + to install the Autoconf and GNU m4 packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. + You might want to install the Automake and Perl packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te*) + echo 1>&2 "\ +WARNING: '$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get '$1' as part of Autoconf from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison*|yacc*) + echo 1>&2 "\ +WARNING: '$1' $msg. You should only need it if + you modified a '.y' file. You may need the Bison package + in order for those modifications to take effect. You can get + Bison from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex*|flex*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified a '.l' file. You may need the Flex package + in order for those modifications to take effect. You can get + Flex from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + Help2man package in order for those modifications to take + effect. You can get Help2man from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit $? + fi + ;; + + makeinfo*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified a '.texi' or '.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy 'make' (AIX, + DU, IRIX). You might want to install the Texinfo package or + the GNU make package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + *) + echo 1>&2 "\ +WARNING: '$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the 'README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing '$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex new file mode 100644 index 0000000..e4dca02 --- /dev/null +++ b/build-aux/texinfo.tex @@ -0,0 +1,10011 @@ +% texinfo.tex -- TeX macros to handle Texinfo files. +% +% Load plain if necessary, i.e., if running under initex. +\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi +% +\def\texinfoversion{2012-04-06.11} +% +% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007, 2008, 2009, 2010, 2011, 2012 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 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 +% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +% 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/>. +% +% As a special exception, when this file is read by TeX when processing +% a Texinfo source document, you may use the result without +% restriction. (This has been our intent since Texinfo was invented.) +% +% Please try the latest version of texinfo.tex before submitting bug +% reports; you can get the latest version from: +% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or +% ftp://tug.org/tex/texinfo.tex +% (and all CTAN mirrors, see http://www.ctan.org). +% The texinfo.tex in any given distribution could well be out +% of date, so if that's what you're using, please check. +% +% Send bug reports to bug-texinfo@gnu.org. Please include including a +% complete document in each bug report with which we can reproduce the +% problem. Patches are, of course, greatly appreciated. +% +% To process a Texinfo manual with TeX, it's most reliable to use the +% texi2dvi shell script that comes with the distribution. For a simple +% manual foo.texi, however, you can get away with this: +% tex foo.texi +% texindex foo.?? +% tex foo.texi +% tex foo.texi +% dvips foo.dvi -o # or whatever; this makes foo.ps. +% The extra TeX runs get the cross-reference information correct. +% Sometimes one run after texindex suffices, and sometimes you need more +% than two; texi2dvi does it as many times as necessary. +% +% It is possible to adapt texinfo.tex for other languages, to some +% extent. You can get the existing language-specific files from the +% full Texinfo distribution. +% +% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. + + +\message{Loading texinfo [version \texinfoversion]:} + +% If in a .fmt file, print the version number +% and turn on active characters that we couldn't do earlier because +% they might have appeared in the input file name. +\everyjob{\message{[Texinfo version \texinfoversion]}% + \catcode`+=\active \catcode`\_=\active} + +\chardef\other=12 + +% We never want plain's \outer definition of \+ in Texinfo. +% For @tex, we can use \tabalign. +\let\+ = \relax + +% Save some plain tex macros whose names we will redefine. +\let\ptexb=\b +\let\ptexbullet=\bullet +\let\ptexc=\c +\let\ptexcomma=\, +\let\ptexdot=\. +\let\ptexdots=\dots +\let\ptexend=\end +\let\ptexequiv=\equiv +\let\ptexexclam=\! +\let\ptexfootnote=\footnote +\let\ptexgtr=> +\let\ptexhat=^ +\let\ptexi=\i +\let\ptexindent=\indent +\let\ptexinsert=\insert +\let\ptexlbrace=\{ +\let\ptexless=< +\let\ptexnewwrite\newwrite +\let\ptexnoindent=\noindent +\let\ptexplus=+ +\let\ptexraggedright=\raggedright +\let\ptexrbrace=\} +\let\ptexslash=\/ +\let\ptexstar=\* +\let\ptext=\t +\let\ptextop=\top +{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode + +% If this character appears in an error message or help string, it +% starts a new line in the output. +\newlinechar = `^^J + +% Use TeX 3.0's \inputlineno to get the line number, for better error +% messages, but if we're using an old version of TeX, don't do anything. +% +\ifx\inputlineno\thisisundefined + \let\linenumber = \empty % Pre-3.0. +\else + \def\linenumber{l.\the\inputlineno:\space} +\fi + +% Set up fixed words for English if not already set. +\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi +\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi +\ifx\putworderror\undefined \gdef\putworderror{error}\fi +\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi +\ifx\putwordin\undefined \gdef\putwordin{in}\fi +\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi +\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi +\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi +\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi +\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi +\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi +\ifx\putwordof\undefined \gdef\putwordof{of}\fi +\ifx\putwordon\undefined \gdef\putwordon{on}\fi +\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi +\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi +\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi +\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi +\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi +\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi +\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi +% +\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi +\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi +\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi +\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi +\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi +\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi +\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi +\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi +\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi +\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi +\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi +\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi +% +\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi +\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi +\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi +\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi +\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi + +% Since the category of space is not known, we have to be careful. +\chardef\spacecat = 10 +\def\spaceisspace{\catcode`\ =\spacecat} + +% sometimes characters are active, so we need control sequences. +\chardef\ampChar = `\& +\chardef\colonChar = `\: +\chardef\commaChar = `\, +\chardef\dashChar = `\- +\chardef\dotChar = `\. +\chardef\exclamChar= `\! +\chardef\hashChar = `\# +\chardef\lquoteChar= `\` +\chardef\questChar = `\? +\chardef\rquoteChar= `\' +\chardef\semiChar = `\; +\chardef\slashChar = `\/ +\chardef\underChar = `\_ + +% Ignore a token. +% +\def\gobble#1{} + +% The following is used inside several \edef's. +\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} + +% Hyphenation fixes. +\hyphenation{ + Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script + ap-pen-dix bit-map bit-maps + data-base data-bases eshell fall-ing half-way long-est man-u-script + man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm + par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces + spell-ing spell-ings + stand-alone strong-est time-stamp time-stamps which-ever white-space + wide-spread wrap-around +} + +% Margin to add to right of even pages, to left of odd pages. +\newdimen\bindingoffset +\newdimen\normaloffset +\newdimen\pagewidth \newdimen\pageheight + +% For a final copy, take out the rectangles +% that mark overfull boxes (in case you have decided +% that the text looks ok even though it passes the margin). +% +\def\finalout{\overfullrule=0pt } + +% Sometimes it is convenient to have everything in the transcript file +% and nothing on the terminal. We don't just call \tracingall here, +% since that produces some useless output on the terminal. We also make +% some effort to order the tracing commands to reduce output in the log +% file; cf. trace.sty in LaTeX. +% +\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% +\def\loggingall{% + \tracingstats2 + \tracingpages1 + \tracinglostchars2 % 2 gives us more in etex + \tracingparagraphs1 + \tracingoutput1 + \tracingmacros2 + \tracingrestores1 + \showboxbreadth\maxdimen \showboxdepth\maxdimen + \ifx\eTeXversion\thisisundefined\else % etex gives us more logging + \tracingscantokens1 + \tracingifs1 + \tracinggroups1 + \tracingnesting2 + \tracingassigns1 + \fi + \tracingcommands3 % 3 gives us more in etex + \errorcontextlines16 +}% + +% @errormsg{MSG}. Do the index-like expansions on MSG, but if things +% aren't perfect, it's not the end of the world, being an error message, +% after all. +% +\def\errormsg{\begingroup \indexnofonts \doerrormsg} +\def\doerrormsg#1{\errmessage{#1}} + +% add check for \lastpenalty to plain's definitions. If the last thing +% we did was a \nobreak, we don't want to insert more space. +% +\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount + \removelastskip\penalty-50\smallskip\fi\fi} +\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount + \removelastskip\penalty-100\medskip\fi\fi} +\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount + \removelastskip\penalty-200\bigskip\fi\fi} + +% Do @cropmarks to get crop marks. +% +\newif\ifcropmarks +\let\cropmarks = \cropmarkstrue +% +% Dimensions to add cropmarks at corners. +% Added by P. A. MacKay, 12 Nov. 1986 +% +\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines +\newdimen\cornerlong \cornerlong=1pc +\newdimen\cornerthick \cornerthick=.3pt +\newdimen\topandbottommargin \topandbottommargin=.75in + +% Output a mark which sets \thischapter, \thissection and \thiscolor. +% We dump everything together because we only have one kind of mark. +% This works because we only use \botmark / \topmark, not \firstmark. +% +% A mark contains a subexpression of the \ifcase ... \fi construct. +% \get*marks macros below extract the needed part using \ifcase. +% +% Another complication is to let the user choose whether \thischapter +% (\thissection) refers to the chapter (section) in effect at the top +% of a page, or that at the bottom of a page. The solution is +% described on page 260 of The TeXbook. It involves outputting two +% marks for the sectioning macros, one before the section break, and +% one after. I won't pretend I can describe this better than DEK... +\def\domark{% + \toks0=\expandafter{\lastchapterdefs}% + \toks2=\expandafter{\lastsectiondefs}% + \toks4=\expandafter{\prevchapterdefs}% + \toks6=\expandafter{\prevsectiondefs}% + \toks8=\expandafter{\lastcolordefs}% + \mark{% + \the\toks0 \the\toks2 + \noexpand\or \the\toks4 \the\toks6 + \noexpand\else \the\toks8 + }% +} +% \topmark doesn't work for the very first chapter (after the title +% page or the contents), so we use \firstmark there -- this gets us +% the mark with the chapter defs, unless the user sneaks in, e.g., +% @setcolor (or @url, or @link, etc.) between @contents and the very +% first @chapter. +\def\gettopheadingmarks{% + \ifcase0\topmark\fi + \ifx\thischapter\empty \ifcase0\firstmark\fi \fi +} +\def\getbottomheadingmarks{\ifcase1\botmark\fi} +\def\getcolormarks{\ifcase2\topmark\fi} + +% Avoid "undefined control sequence" errors. +\def\lastchapterdefs{} +\def\lastsectiondefs{} +\def\prevchapterdefs{} +\def\prevsectiondefs{} +\def\lastcolordefs{} + +% Main output routine. +\chardef\PAGE = 255 +\output = {\onepageout{\pagecontents\PAGE}} + +\newbox\headlinebox +\newbox\footlinebox + +% \onepageout takes a vbox as an argument. Note that \pagecontents +% does insertions, but you have to call it yourself. +\def\onepageout#1{% + \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi + % + \ifodd\pageno \advance\hoffset by \bindingoffset + \else \advance\hoffset by -\bindingoffset\fi + % + % Do this outside of the \shipout so @code etc. will be expanded in + % the headline as they should be, not taken literally (outputting ''code). + \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi + \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% + \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi + \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% + % + {% + % Have to do this stuff outside the \shipout because we want it to + % take effect in \write's, yet the group defined by the \vbox ends + % before the \shipout runs. + % + \indexdummies % don't expand commands in the output. + \normalturnoffactive % \ in index entries must not stay \, e.g., if + % the page break happens to be in the middle of an example. + % We don't want .vr (or whatever) entries like this: + % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} + % "\acronym" won't work when it's read back in; + % it needs to be + % {\code {{\tt \backslashcurfont }acronym} + \shipout\vbox{% + % Do this early so pdf references go to the beginning of the page. + \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi + % + \ifcropmarks \vbox to \outervsize\bgroup + \hsize = \outerhsize + \vskip-\topandbottommargin + \vtop to0pt{% + \line{\ewtop\hfil\ewtop}% + \nointerlineskip + \line{% + \vbox{\moveleft\cornerthick\nstop}% + \hfill + \vbox{\moveright\cornerthick\nstop}% + }% + \vss}% + \vskip\topandbottommargin + \line\bgroup + \hfil % center the page within the outer (page) hsize. + \ifodd\pageno\hskip\bindingoffset\fi + \vbox\bgroup + \fi + % + \unvbox\headlinebox + \pagebody{#1}% + \ifdim\ht\footlinebox > 0pt + % Only leave this space if the footline is nonempty. + % (We lessened \vsize for it in \oddfootingyyy.) + % The \baselineskip=24pt in plain's \makefootline has no effect. + \vskip 24pt + \unvbox\footlinebox + \fi + % + \ifcropmarks + \egroup % end of \vbox\bgroup + \hfil\egroup % end of (centering) \line\bgroup + \vskip\topandbottommargin plus1fill minus1fill + \boxmaxdepth = \cornerthick + \vbox to0pt{\vss + \line{% + \vbox{\moveleft\cornerthick\nsbot}% + \hfill + \vbox{\moveright\cornerthick\nsbot}% + }% + \nointerlineskip + \line{\ewbot\hfil\ewbot}% + }% + \egroup % \vbox from first cropmarks clause + \fi + }% end of \shipout\vbox + }% end of group with \indexdummies + \advancepageno + \ifnum\outputpenalty>-20000 \else\dosupereject\fi +} + +\newinsert\margin \dimen\margin=\maxdimen + +\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} +{\catcode`\@ =11 +\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi +% 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\relax \unvbox#1\relax +\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi +\ifr@ggedbottom \kern-\dimen@ \vfil \fi} +} + +% Here are the rules for the cropmarks. Note that they are +% offset so that the space between them is truly \outerhsize or \outervsize +% (P. A. MacKay, 12 November, 1986) +% +\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} +\def\nstop{\vbox + {\hrule height\cornerthick depth\cornerlong width\cornerthick}} +\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} +\def\nsbot{\vbox + {\hrule height\cornerlong depth\cornerthick width\cornerthick}} + +% Parse an argument, then pass it to #1. The argument is the rest of +% the input line (except we remove a trailing comment). #1 should be a +% macro which expects an ordinary undelimited TeX argument. +% +\def\parsearg{\parseargusing{}} +\def\parseargusing#1#2{% + \def\argtorun{#2}% + \begingroup + \obeylines + \spaceisspace + #1% + \parseargline\empty% Insert the \empty token, see \finishparsearg below. +} + +{\obeylines % + \gdef\parseargline#1^^M{% + \endgroup % End of the group started in \parsearg. + \argremovecomment #1\comment\ArgTerm% + }% +} + +% First remove any @comment, then any @c comment. +\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} +\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} + +% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space. +% +% \argremovec might leave us with trailing space, e.g., +% @end itemize @c foo +% This space token undergoes the same procedure and is eventually removed +% by \finishparsearg. +% +\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} +\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} +\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% + \def\temp{#3}% + \ifx\temp\empty + % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: + \let\temp\finishparsearg + \else + \let\temp\argcheckspaces + \fi + % Put the space token in: + \temp#1 #3\ArgTerm +} + +% If a _delimited_ argument is enclosed in braces, they get stripped; so +% to get _exactly_ the rest of the line, we had to prevent such situation. +% We prepended an \empty token at the very beginning and we expand it now, +% just before passing the control to \argtorun. +% (Similarly, we have to think about #3 of \argcheckspacesY above: it is +% either the null string, or it ends with \^^M---thus there is no danger +% that a pair of braces would be stripped. +% +% But first, we have to remove the trailing space token. +% +\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} + +% \parseargdef\foo{...} +% is roughly equivalent to +% \def\foo{\parsearg\Xfoo} +% \def\Xfoo#1{...} +% +% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my +% favourite TeX trick. --kasal, 16nov03 + +\def\parseargdef#1{% + \expandafter \doparseargdef \csname\string#1\endcsname #1% +} +\def\doparseargdef#1#2{% + \def#2{\parsearg#1}% + \def#1##1% +} + +% Several utility definitions with active space: +{ + \obeyspaces + \gdef\obeyedspace{ } + + % Make each space character in the input produce a normal interword + % space in the output. Don't allow a line break at this space, as this + % is used only in environments like @example, where each line of input + % should produce a line of output anyway. + % + \gdef\sepspaces{\obeyspaces\let =\tie} + + % If an index command is used in an @example environment, any spaces + % therein should become regular spaces in the raw index file, not the + % expansion of \tie (\leavevmode \penalty \@M \ ). + \gdef\unsepspaces{\let =\space} +} + + +\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} + +% Define the framework for environments in texinfo.tex. It's used like this: +% +% \envdef\foo{...} +% \def\Efoo{...} +% +% It's the responsibility of \envdef to insert \begingroup before the +% actual body; @end closes the group after calling \Efoo. \envdef also +% defines \thisenv, so the current environment is known; @end checks +% whether the environment name matches. The \checkenv macro can also be +% used to check whether the current environment is the one expected. +% +% Non-false conditionals (@iftex, @ifset) don't fit into this, so they +% are not treated as environments; they don't open a group. (The +% implementation of @end takes care not to call \endgroup in this +% special case.) + + +% At run-time, environments start with this: +\def\startenvironment#1{\begingroup\def\thisenv{#1}} +% initialize +\let\thisenv\empty + +% ... but they get defined via ``\envdef\foo{...}'': +\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} +\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} + +% Check whether we're in the right environment: +\def\checkenv#1{% + \def\temp{#1}% + \ifx\thisenv\temp + \else + \badenverr + \fi +} + +% Environment mismatch, #1 expected: +\def\badenverr{% + \errhelp = \EMsimple + \errmessage{This command can appear only \inenvironment\temp, + not \inenvironment\thisenv}% +} +\def\inenvironment#1{% + \ifx#1\empty + outside of any environment% + \else + in environment \expandafter\string#1% + \fi +} + +% @end foo executes the definition of \Efoo. +% But first, it executes a specialized version of \checkenv +% +\parseargdef\end{% + \if 1\csname iscond.#1\endcsname + \else + % The general wording of \badenverr may not be ideal. + \expandafter\checkenv\csname#1\endcsname + \csname E#1\endcsname + \endgroup + \fi +} + +\newhelp\EMsimple{Press RETURN to continue.} + + +% Be sure we're in horizontal mode when doing a tie, since we make space +% equivalent to this in @example-like environments. Otherwise, a space +% at the beginning of a line will start with \penalty -- and +% since \penalty is valid in vertical mode, we'd end up putting the +% penalty on the vertical list instead of in the new paragraph. +{\catcode`@ = 11 + % Avoid using \@M directly, because that causes trouble + % if the definition is written into an index file. + \global\let\tiepenalty = \@M + \gdef\tie{\leavevmode\penalty\tiepenalty\ } +} + +% @: forces normal size whitespace following. +\def\:{\spacefactor=1000 } + +% @* forces a line break. +\def\*{\hfil\break\hbox{}\ignorespaces} + +% @/ allows a line break. +\let\/=\allowbreak + +% @. is an end-of-sentence period. +\def\.{.\spacefactor=\endofsentencespacefactor\space} + +% @! is an end-of-sentence bang. +\def\!{!\spacefactor=\endofsentencespacefactor\space} + +% @? is an end-of-sentence query. +\def\?{?\spacefactor=\endofsentencespacefactor\space} + +% @frenchspacing on|off says whether to put extra space after punctuation. +% +\def\onword{on} +\def\offword{off} +% +\parseargdef\frenchspacing{% + \def\temp{#1}% + \ifx\temp\onword \plainfrenchspacing + \else\ifx\temp\offword \plainnonfrenchspacing + \else + \errhelp = \EMsimple + \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% + \fi\fi +} + +% @w prevents a word break. Without the \leavevmode, @w at the +% beginning of a paragraph, when TeX is still in vertical mode, would +% produce a whole line of output instead of starting the paragraph. +\def\w#1{\leavevmode\hbox{#1}} + +% @group ... @end group forces ... to be all on one page, by enclosing +% it in a TeX vbox. We use \vtop instead of \vbox to construct the box +% to keep its height that of a normal line. According to the rules for +% \topskip (p.114 of the TeXbook), the glue inserted is +% max (\topskip - \ht (first item), 0). If that height is large, +% therefore, no glue is inserted, and the space between the headline and +% the text is small, which looks bad. +% +% Another complication is that the group might be very large. This can +% cause the glue on the previous page to be unduly stretched, because it +% does not have much material. In this case, it's better to add an +% explicit \vfill so that the extra space is at the bottom. The +% threshold for doing this is if the group is more than \vfilllimit +% percent of a page (\vfilllimit can be changed inside of @tex). +% +\newbox\groupbox +\def\vfilllimit{0.7} +% +\envdef\group{% + \ifnum\catcode`\^^M=\active \else + \errhelp = \groupinvalidhelp + \errmessage{@group invalid in context where filling is enabled}% + \fi + \startsavinginserts + % + \setbox\groupbox = \vtop\bgroup + % Do @comment since we are called inside an environment such as + % @example, where each end-of-line in the input causes an + % end-of-line in the output. We don't want the end-of-line after + % the `@group' to put extra space in the output. Since @group + % should appear on a line by itself (according to the Texinfo + % manual), we don't worry about eating any user text. + \comment +} +% +% The \vtop produces a box with normal height and large depth; thus, TeX puts +% \baselineskip glue before it, and (when the next line of text is done) +% \lineskip glue after it. Thus, space below is not quite equal to space +% above. But it's pretty close. +\def\Egroup{% + % To get correct interline space between the last line of the group + % and the first line afterwards, we have to propagate \prevdepth. + \endgraf % Not \par, as it may have been set to \lisppar. + \global\dimen1 = \prevdepth + \egroup % End the \vtop. + % \dimen0 is the vertical size of the group's box. + \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox + % \dimen2 is how much space is left on the page (more or less). + \dimen2 = \pageheight \advance\dimen2 by -\pagetotal + % if the group doesn't fit on the current page, and it's a big big + % group, force a page break. + \ifdim \dimen0 > \dimen2 + \ifdim \pagetotal < \vfilllimit\pageheight + \page + \fi + \fi + \box\groupbox + \prevdepth = \dimen1 + \checkinserts +} +% +% TeX puts in an \escapechar (i.e., `@') at the beginning of the help +% message, so this ends up printing `@group can only ...'. +% +\newhelp\groupinvalidhelp{% +group can only be used in environments such as @example,^^J% +where each line of input produces a line of output.} + +% @need space-in-mils +% forces a page break if there is not space-in-mils remaining. + +\newdimen\mil \mil=0.001in + +\parseargdef\need{% + % Ensure vertical mode, so we don't make a big box in the middle of a + % paragraph. + \par + % + % If the @need value is less than one line space, it's useless. + \dimen0 = #1\mil + \dimen2 = \ht\strutbox + \advance\dimen2 by \dp\strutbox + \ifdim\dimen0 > \dimen2 + % + % Do a \strut just to make the height of this box be normal, so the + % normal leading is inserted relative to the preceding line. + % And a page break here is fine. + \vtop to #1\mil{\strut\vfil}% + % + % TeX does not even consider page breaks if a penalty added to the + % main vertical list is 10000 or more. But in order to see if the + % empty box we just added fits on the page, we must make it consider + % page breaks. On the other hand, we don't want to actually break the + % page after the empty box. So we use a penalty of 9999. + % + % There is an extremely small chance that TeX will actually break the + % page at this \penalty, if there are no other feasible breakpoints in + % sight. (If the user is using lots of big @group commands, which + % almost-but-not-quite fill up a page, TeX will have a hard time doing + % good page breaking, for example.) However, I could not construct an + % example where a page broke at this \penalty; if it happens in a real + % document, then we can reconsider our strategy. + \penalty9999 + % + % Back up by the size of the box, whether we did a page break or not. + \kern -#1\mil + % + % Do not allow a page break right after this kern. + \nobreak + \fi +} + +% @br forces paragraph break (and is undocumented). + +\let\br = \par + +% @page forces the start of a new page. +% +\def\page{\par\vfill\supereject} + +% @exdent text.... +% outputs text on separate line in roman font, starting at standard page margin + +% This records the amount of indent in the innermost environment. +% That's how much \exdent should take out. +\newskip\exdentamount + +% This defn is used inside fill environments such as @defun. +\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} + +% This defn is used inside nofill environments such as @example. +\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount + \leftline{\hskip\leftskip{\rm#1}}}} + +% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current +% paragraph. For more general purposes, use the \margin insertion +% class. WHICH is `l' or `r'. Not documented, written for gawk manual. +% +\newskip\inmarginspacing \inmarginspacing=1cm +\def\strutdepth{\dp\strutbox} +% +\def\doinmargin#1#2{\strut\vadjust{% + \nobreak + \kern-\strutdepth + \vtop to \strutdepth{% + \baselineskip=\strutdepth + \vss + % if you have multiple lines of stuff to put here, you'll need to + % make the vbox yourself of the appropriate size. + \ifx#1l% + \llap{\ignorespaces #2\hskip\inmarginspacing}% + \else + \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% + \fi + \null + }% +}} +\def\inleftmargin{\doinmargin l} +\def\inrightmargin{\doinmargin r} +% +% @inmargin{TEXT [, RIGHT-TEXT]} +% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; +% else use TEXT for both). +% +\def\inmargin#1{\parseinmargin #1,,\finish} +\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \def\lefttext{#1}% have both texts + \def\righttext{#2}% + \else + \def\lefttext{#1}% have only one text + \def\righttext{#1}% + \fi + % + \ifodd\pageno + \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin + \else + \def\temp{\inleftmargin\lefttext}% + \fi + \temp +} + +% @| inserts a changebar to the left of the current line. It should +% surround any changed text. This approach does *not* work if the +% change spans more than two lines of output. To handle that, we would +% have adopt a much more difficult approach (putting marks into the main +% vertical list for the beginning and end of each change). This command +% is not documented, not supported, and doesn't work. +% +\def\|{% + % \vadjust can only be used in horizontal mode. + \leavevmode + % + % Append this vertical mode material after the current line in the output. + \vadjust{% + % We want to insert a rule with the height and depth of the current + % leading; that is exactly what \strutbox is supposed to record. + \vskip-\baselineskip + % + % \vadjust-items are inserted at the left edge of the type. So + % the \llap here moves out into the left-hand margin. + \llap{% + % + % For a thicker or thinner bar, change the `1pt'. + \vrule height\baselineskip width1pt + % + % This is the space between the bar and the text. + \hskip 12pt + }% + }% +} + +% @include FILE -- \input text of FILE. +% +\def\include{\parseargusing\filenamecatcodes\includezzz} +\def\includezzz#1{% + \pushthisfilestack + \def\thisfile{#1}% + {% + \makevalueexpandable % we want to expand any @value in FILE. + \turnoffactive % and allow special characters in the expansion + \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @include of #1^^J}% + \edef\temp{\noexpand\input #1 }% + % + % This trickery is to read FILE outside of a group, in case it makes + % definitions, etc. + \expandafter + }\temp + \popthisfilestack +} +\def\filenamecatcodes{% + \catcode`\\=\other + \catcode`~=\other + \catcode`^=\other + \catcode`_=\other + \catcode`|=\other + \catcode`<=\other + \catcode`>=\other + \catcode`+=\other + \catcode`-=\other + \catcode`\`=\other + \catcode`\'=\other +} + +\def\pushthisfilestack{% + \expandafter\pushthisfilestackX\popthisfilestack\StackTerm +} +\def\pushthisfilestackX{% + \expandafter\pushthisfilestackY\thisfile\StackTerm +} +\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% + \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% +} + +\def\popthisfilestack{\errthisfilestackempty} +\def\errthisfilestackempty{\errmessage{Internal error: + the stack of filenames is empty.}} +% +\def\thisfile{} + +% @center line +% outputs that line, centered. +% +\parseargdef\center{% + \ifhmode + \let\centersub\centerH + \else + \let\centersub\centerV + \fi + \centersub{\hfil \ignorespaces#1\unskip \hfil}% + \let\centersub\relax % don't let the definition persist, just in case +} +\def\centerH#1{{% + \hfil\break + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{#1}% + \break +}} +% +\newcount\centerpenalty +\def\centerV#1{% + % The idea here is the same as in \startdefun, \cartouche, etc.: if + % @center is the first thing after a section heading, we need to wipe + % out the negative parskip inserted by \sectionheading, but still + % prevent a page break here. + \centerpenalty = \lastpenalty + \ifnum\centerpenalty>10000 \vskip\parskip \fi + \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi + \line{\kern\leftskip #1\kern\rightskip}% +} + +% @sp n outputs n lines of vertical space +% +\parseargdef\sp{\vskip #1\baselineskip} + +% @comment ...line which is ignored... +% @c is the same as @comment +% @ignore ... @end ignore is another way to write a comment +% +\def\comment{\begingroup \catcode`\^^M=\other% +\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% +\commentxxx} +{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} +% +\let\c=\comment + +% @paragraphindent NCHARS +% We'll use ems for NCHARS, close enough. +% NCHARS can also be the word `asis' or `none'. +% We cannot feasibly implement @paragraphindent asis, though. +% +\def\asisword{asis} % no translation, these are keywords +\def\noneword{none} +% +\parseargdef\paragraphindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \defaultparindent = 0pt + \else + \defaultparindent = #1em + \fi + \fi + \parindent = \defaultparindent +} + +% @exampleindent NCHARS +% We'll use ems for NCHARS like @paragraphindent. +% It seems @exampleindent asis isn't necessary, but +% I preserve it to make it similar to @paragraphindent. +\parseargdef\exampleindent{% + \def\temp{#1}% + \ifx\temp\asisword + \else + \ifx\temp\noneword + \lispnarrowing = 0pt + \else + \lispnarrowing = #1em + \fi + \fi +} + +% @firstparagraphindent WORD +% If WORD is `none', then suppress indentation of the first paragraph +% after a section heading. If WORD is `insert', then do indent at such +% paragraphs. +% +% The paragraph indentation is suppressed or not by calling +% \suppressfirstparagraphindent, which the sectioning commands do. +% We switch the definition of this back and forth according to WORD. +% By default, we suppress indentation. +% +\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} +\def\insertword{insert} +% +\parseargdef\firstparagraphindent{% + \def\temp{#1}% + \ifx\temp\noneword + \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent + \else\ifx\temp\insertword + \let\suppressfirstparagraphindent = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @firstparagraphindent option `\temp'}% + \fi\fi +} + +% Here is how we actually suppress indentation. Redefine \everypar to +% \kern backwards by \parindent, and then reset itself to empty. +% +% We also make \indent itself not actually do anything until the next +% paragraph. +% +\gdef\dosuppressfirstparagraphindent{% + \gdef\indent{% + \restorefirstparagraphindent + \indent + }% + \gdef\noindent{% + \restorefirstparagraphindent + \noindent + }% + \global\everypar = {% + \kern -\parindent + \restorefirstparagraphindent + }% +} + +\gdef\restorefirstparagraphindent{% + \global \let \indent = \ptexindent + \global \let \noindent = \ptexnoindent + \global \everypar = {}% +} + + +% @refill is a no-op. +\let\refill=\relax + +% If working on a large document in chapters, it is convenient to +% be able to disable indexing, cross-referencing, and contents, for test runs. +% This is done with @novalidate (before @setfilename). +% +\newif\iflinks \linkstrue % by default we want the aux files. +\let\novalidate = \linksfalse + +% @setfilename is done at the beginning of every texinfo file. +% So open here the files we need to have open while reading the input. +% This makes it possible to make a .fmt file for texinfo. +\def\setfilename{% + \fixbackslash % Turn off hack to swallow `\input texinfo'. + \iflinks + \tryauxfile + % Open the new aux file. TeX will close it automatically at exit. + \immediate\openout\auxfile=\jobname.aux + \fi % \openindices needs to do some work in any case. + \openindices + \let\setfilename=\comment % Ignore extra @setfilename cmds. + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. + \openin 1 texinfo.cnf + \ifeof 1 \else \input texinfo.cnf \fi + \closein 1 + % + \comment % Ignore the actual filename. +} + +% Called from \setfilename. +% +\def\openindices{% + \newindex{cp}% + \newcodeindex{fn}% + \newcodeindex{vr}% + \newcodeindex{tp}% + \newcodeindex{ky}% + \newcodeindex{pg}% +} + +% @bye. +\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} + + +\message{pdf,} +% adobe `portable' document format +\newcount\tempnum +\newcount\lnkcount +\newtoks\filename +\newcount\filenamelength +\newcount\pgn +\newtoks\toksA +\newtoks\toksB +\newtoks\toksC +\newtoks\toksD +\newbox\boxA +\newcount\countA +\newif\ifpdf +\newif\ifpdfmakepagedest + +% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 +% can be set). So we test for \relax and 0 as well as being undefined. +\ifx\pdfoutput\thisisundefined +\else + \ifx\pdfoutput\relax + \else + \ifcase\pdfoutput + \else + \pdftrue + \fi + \fi +\fi + +% PDF uses PostScript string constants for the names of xref targets, +% for display in the outlines, and in other places. Thus, we have to +% double any backslashes. Otherwise, a name like "\node" will be +% interpreted as a newline (\n), followed by o, d, e. Not good. +% +% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and +% related messages. The final outcome is that it is up to the TeX user +% to double the backslashes and otherwise make the string valid, so +% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to +% do this reliably, so we use it. + +% #1 is a control sequence in which to do the replacements, +% which we \xdef. +\def\txiescapepdf#1{% + \ifx\pdfescapestring\relax + % No primitive available; should we give a warning or log? + % Many times it won't matter. + \else + % The expandable \pdfescapestring primitive escapes parentheses, + % backslashes, and other special chars. + \xdef#1{\pdfescapestring{#1}}% + \fi +} + +\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images +with PDF output, and none of those formats could be found. (.eps cannot +be supported due to the design of the PDF format; use regular TeX (DVI +output) for that.)} + +\ifpdf + % + % Color manipulation macros based on pdfcolor.tex, + % except using rgb instead of cmyk; the latter is said to render as a + % very dark gray on-screen and a very dark halftone in print, instead + % of actual black. + \def\rgbDarkRed{0.50 0.09 0.12} + \def\rgbBlack{0 0 0} + % + % k sets the color for filling (usual text, etc.); + % K sets the color for stroking (thin rules, e.g., normal _'s). + \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} + % + % Set color, and create a mark which defines \thiscolor accordingly, + % so that \makeheadline knows which color to restore. + \def\setcolor#1{% + \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% + \domark + \pdfsetcolor{#1}% + } + % + \def\maincolor{\rgbBlack} + \pdfsetcolor{\maincolor} + \edef\thiscolor{\maincolor} + \def\lastcolordefs{} + % + \def\makefootline{% + \baselineskip24pt + \line{\pdfsetcolor{\maincolor}\the\footline}% + } + % + \def\makeheadline{% + \vbox to 0pt{% + \vskip-22.5pt + \line{% + \vbox to8.5pt{}% + % Extract \thiscolor definition from the marks. + \getcolormarks + % Typeset the headline with \maincolor, then restore the color. + \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% + }% + \vss + }% + \nointerlineskip + } + % + % + \pdfcatalog{/PageMode /UseOutlines} + % + % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). + \def\dopdfimage#1#2#3{% + \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% + \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% + % + % pdftex (and the PDF format) support .pdf, .png, .jpg (among + % others). Let's try in that order, PDF first since if + % someone has a scalable image, presumably better to use that than a + % bitmap. + \let\pdfimgext=\empty + \begingroup + \openin 1 #1.pdf \ifeof 1 + \openin 1 #1.PDF \ifeof 1 + \openin 1 #1.png \ifeof 1 + \openin 1 #1.jpg \ifeof 1 + \openin 1 #1.jpeg \ifeof 1 + \openin 1 #1.JPG \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{JPG}% + \fi + \else \gdef\pdfimgext{jpeg}% + \fi + \else \gdef\pdfimgext{jpg}% + \fi + \else \gdef\pdfimgext{png}% + \fi + \else \gdef\pdfimgext{PDF}% + \fi + \else \gdef\pdfimgext{pdf}% + \fi + \closein 1 + \endgroup + % + % without \immediate, ancient pdftex seg faults when the same image is + % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) + \ifnum\pdftexversion < 14 + \immediate\pdfimage + \else + \immediate\pdfximage + \fi + \ifdim \wd0 >0pt width \pdfimagewidth \fi + \ifdim \wd2 >0pt height \pdfimageheight \fi + \ifnum\pdftexversion<13 + #1.\pdfimgext + \else + {#1.\pdfimgext}% + \fi + \ifnum\pdftexversion < 14 \else + \pdfrefximage \pdflastximage + \fi} + % + \def\pdfmkdest#1{{% + % We have to set dummies so commands such as @code, and characters + % such as \, aren't expanded when present in a section title. + \indexnofonts + \turnoffactive + \makevalueexpandable + \def\pdfdestname{#1}% + \txiescapepdf\pdfdestname + \safewhatsit{\pdfdest name{\pdfdestname} xyz}% + }} + % + % used to mark target names; must be expandable. + \def\pdfmkpgn#1{#1} + % + % by default, use a color that is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. + \def\urlcolor{\rgbDarkRed} + \def\linkcolor{\rgbDarkRed} + \def\endlink{\setcolor{\maincolor}\pdfendlink} + % + % Adding outlines to PDF; macros for calculating structure of outlines + % come from Petr Olsak + \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% + \else \csname#1\endcsname \fi} + \def\advancenumber#1{\tempnum=\expnumber{#1}\relax + \advance\tempnum by 1 + \expandafter\xdef\csname#1\endcsname{\the\tempnum}} + % + % #1 is the section text, which is what will be displayed in the + % outline by the pdf viewer. #2 is the pdf expression for the number + % of subentries (or empty, for subsubsections). #3 is the node text, + % which might be empty if this toc entry had no corresponding node. + % #4 is the page number + % + \def\dopdfoutline#1#2#3#4{% + % Generate a link to the node text if that exists; else, use the + % page number. We could generate a destination for the section + % text in the case where a section has no node, but it doesn't + % seem worth the trouble, since most documents are normally structured. + \edef\pdfoutlinedest{#3}% + \ifx\pdfoutlinedest\empty + \def\pdfoutlinedest{#4}% + \else + \txiescapepdf\pdfoutlinedest + \fi + % + % Also escape PDF chars in the display string. + \edef\pdfoutlinetext{#1}% + \txiescapepdf\pdfoutlinetext + % + \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% + } + % + \def\pdfmakeoutlines{% + \begingroup + % Read toc silently, to get counts of subentries for \pdfoutline. + \def\partentry##1##2##3##4{}% ignore parts in the outlines + \def\numchapentry##1##2##3##4{% + \def\thischapnum{##2}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + }% + \def\numsecentry##1##2##3##4{% + \advancenumber{chap\thischapnum}% + \def\thissecnum{##2}% + \def\thissubsecnum{0}% + }% + \def\numsubsecentry##1##2##3##4{% + \advancenumber{sec\thissecnum}% + \def\thissubsecnum{##2}% + }% + \def\numsubsubsecentry##1##2##3##4{% + \advancenumber{subsec\thissubsecnum}% + }% + \def\thischapnum{0}% + \def\thissecnum{0}% + \def\thissubsecnum{0}% + % + % use \def rather than \let here because we redefine \chapentry et + % al. a second time, below. + \def\appentry{\numchapentry}% + \def\appsecentry{\numsecentry}% + \def\appsubsecentry{\numsubsecentry}% + \def\appsubsubsecentry{\numsubsubsecentry}% + \def\unnchapentry{\numchapentry}% + \def\unnsecentry{\numsecentry}% + \def\unnsubsecentry{\numsubsecentry}% + \def\unnsubsubsecentry{\numsubsubsecentry}% + \readdatafile{toc}% + % + % Read toc second time, this time actually producing the outlines. + % The `-' means take the \expnumber as the absolute number of + % subentries, which we calculated on our first read of the .toc above. + % + % We use the node names as the destinations. + \def\numchapentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% + \def\numsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% + \def\numsubsecentry##1##2##3##4{% + \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% + \def\numsubsubsecentry##1##2##3##4{% count is always zero + \dopdfoutline{##1}{}{##3}{##4}}% + % + % PDF outlines are displayed using system fonts, instead of + % document fonts. Therefore we cannot use special characters, + % since the encoding is unknown. For example, the eogonek from + % Latin 2 (0xea) gets translated to a | character. Info from + % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. + % + % TODO this right, we have to translate 8-bit characters to + % their "best" equivalent, based on the @documentencoding. Too + % much work for too little return. Just use the ASCII equivalents + % we use for the index sort strings. + % + \indexnofonts + \setupdatafile + % We can have normal brace characters in the PDF outlines, unlike + % Texinfo index files. So set that up. + \def\{{\lbracecharliteral}% + \def\}{\rbracecharliteral}% + \catcode`\\=\active \otherbackslash + \input \tocreadfilename + \endgroup + } + {\catcode`[=1 \catcode`]=2 + \catcode`{=\other \catcode`}=\other + \gdef\lbracecharliteral[{]% + \gdef\rbracecharliteral[}]% + ] + % + \def\skipspaces#1{\def\PP{#1}\def\D{|}% + \ifx\PP\D\let\nextsp\relax + \else\let\nextsp\skipspaces + \ifx\p\space\else\addtokens{\filename}{\PP}% + \advance\filenamelength by 1 + \fi + \fi + \nextsp} + \def\getfilename#1{% + \filenamelength=0 + % If we don't expand the argument now, \skipspaces will get + % snagged on things like "@value{foo}". + \edef\temp{#1}% + \expandafter\skipspaces\temp|\relax + } + \ifnum\pdftexversion < 14 + \let \startlink \pdfannotlink + \else + \let \startlink \pdfstartlink + \fi + % make a live url in pdf output. + \def\pdfurl#1{% + \begingroup + % it seems we really need yet another set of dummies; have not + % tried to figure out what each command should do in the context + % of @url. for now, just make @/ a no-op, that's the only one + % people have actually reported a problem with. + % + \normalturnoffactive + \def\@{@}% + \let\/=\empty + \makevalueexpandable + % do we want to go so far as to use \indexnofonts instead of just + % special-casing \var here? + \def\var##1{##1}% + % + \leavevmode\setcolor{\urlcolor}% + \startlink attr{/Border [0 0 0]}% + user{/Subtype /Link /A << /S /URI /URI (#1) >>}% + \endgroup} + \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} + \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} + \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} + \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} + \def\maketoks{% + \expandafter\poptoks\the\toksA|ENDTOKS|\relax + \ifx\first0\adn0 + \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 + \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 + \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 + \else + \ifnum0=\countA\else\makelink\fi + \ifx\first.\let\next=\done\else + \let\next=\maketoks + \addtokens{\toksB}{\the\toksD} + \ifx\first,\addtokens{\toksB}{\space}\fi + \fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \next} + \def\makelink{\addtokens{\toksB}% + {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} + \def\pdflink#1{% + \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} + \setcolor{\linkcolor}#1\endlink} + \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} +\else + % non-pdf mode + \let\pdfmkdest = \gobble + \let\pdfurl = \gobble + \let\endlink = \relax + \let\setcolor = \gobble + \let\pdfsetcolor = \gobble + \let\pdfmakeoutlines = \relax +\fi % \ifx\pdfoutput + + +\message{fonts,} + +% Change the current font style to #1, remembering it in \curfontstyle. +% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in +% italics, not bold italics. +% +\def\setfontstyle#1{% + \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. + \csname ten#1\endcsname % change the current font +} + +% Select #1 fonts with the current style. +% +\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} + +\def\rm{\fam=0 \setfontstyle{rm}} +\def\it{\fam=\itfam \setfontstyle{it}} +\def\sl{\fam=\slfam \setfontstyle{sl}} +\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} +\def\tt{\fam=\ttfam \setfontstyle{tt}} + +% Unfortunately, we have to override this for titles and the like, since +% in those cases "rm" is bold. Sigh. +\def\rmisbold{\rm\def\curfontstyle{bf}} + +% Texinfo sort of supports the sans serif font style, which plain TeX does not. +% So we set up a \sf. +\newfam\sffam +\def\sf{\fam=\sffam \setfontstyle{sf}} +\let\li = \sf % Sometimes we call it \li, not \sf. + +% We don't need math for this font style. +\def\ttsl{\setfontstyle{ttsl}} + + +% Default leading. +\newdimen\textleading \textleading = 13.2pt + +% Set the baselineskip to #1, and the lineskip and strut size +% correspondingly. There is no deep meaning behind these magic numbers +% used as factors; they just match (closely enough) what Knuth defined. +% +\def\lineskipfactor{.08333} +\def\strutheightpercent{.70833} +\def\strutdepthpercent {.29167} +% +% can get a sort of poor man's double spacing by redefining this. +\def\baselinefactor{1} +% +\def\setleading#1{% + \dimen0 = #1\relax + \normalbaselineskip = \baselinefactor\dimen0 + \normallineskip = \lineskipfactor\normalbaselineskip + \normalbaselines + \setbox\strutbox =\hbox{% + \vrule width0pt height\strutheightpercent\baselineskip + depth \strutdepthpercent \baselineskip + }% +} + +% PDF CMaps. See also LaTeX's t1.cmap. +% +% do nothing with this by default. +\expandafter\let\csname cmapOT1\endcsname\gobble +\expandafter\let\csname cmapOT1IT\endcsname\gobble +\expandafter\let\csname cmapOT1TT\endcsname\gobble + +% if we are producing pdf, and we have \pdffontattr, then define cmaps. +% (\pdffontattr was introduced many years ago, but people still run +% older pdftex's; it's easy to conditionalize, so we do.) +\ifpdf \ifx\pdffontattr\thisisundefined \else + \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}% + }% +\fi\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, #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 +% emacs-page end of cmaps + +% Use cm as the default font prefix. +% To specify the font prefix, you must define \fontprefix +% before you read in texinfo.tex. +\ifx\fontprefix\thisisundefined +\def\fontprefix{cm} +\fi +% Support font families that don't use the same naming scheme as CM. +\def\rmshape{r} +\def\rmbshape{bx} %where the normal face is bold +\def\bfshape{b} +\def\bxshape{bx} +\def\ttshape{tt} +\def\ttbshape{tt} +\def\ttslshape{sltt} +\def\itshape{ti} +\def\itbshape{bxti} +\def\slshape{sl} +\def\slbshape{bxsl} +\def\sfshape{ss} +\def\sfbshape{ss} +\def\scshape{csc} +\def\scbshape{csc} + +% Definitions for a main text size of 11pt. This is the default in +% Texinfo. +% +\def\definetextfontsizexi{% +% Text fonts (11.2pt, magstep1). +\def\textnominalsize{11pt} +\edef\mainmagstep{\magstephalf} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1095} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstep1}{OT1} +\setfont\deftt\ttshape{10}{\magstep1}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\titleecsize{2074} + +% Chapter (and unnumbered) fonts (17.28pt). +\def\chapnominalsize{17pt} +\setfont\chaprm\rmbshape{12}{\magstep2}{OT1} +\setfont\chapit\itbshape{10}{\magstep3}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep3}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} +\setfont\chapsf\sfbshape{17}{1000}{OT1} +\let\chapbf=\chaprm +\setfont\chapsc\scbshape{10}{\magstep3}{OT1} +\font\chapi=cmmi12 scaled \magstep2 +\font\chapsy=cmsy10 scaled \magstep3 +\def\chapecsize{1728} + +% Section fonts (14.4pt). +\def\secnominalsize{14pt} +\setfont\secrm\rmbshape{12}{\magstep1}{OT1} +\setfont\secit\itbshape{10}{\magstep2}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep2}{OT1} +\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\secsf\sfbshape{12}{\magstep1}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep2}{OT1} +\font\seci=cmmi12 scaled \magstep1 +\font\secsy=cmsy10 scaled \magstep2 +\def\sececsize{1440} + +% Subsection fonts (13.15pt). +\def\ssecnominalsize{13pt} +\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} +\setfont\ssecit\itbshape{10}{1315}{OT1IT} +\setfont\ssecsl\slbshape{10}{1315}{OT1} +\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} +\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1315}{OT1} +\font\sseci=cmmi12 scaled \magstephalf +\font\ssecsy=cmsy10 scaled 1315 +\def\ssececsize{1200} + +% Reduced fonts for @acro in text (10pt). +\def\reducednominalsize{10pt} +\setfont\reducedrm\rmshape{10}{1000}{OT1} +\setfont\reducedtt\ttshape{10}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{1000}{OT1} +\setfont\reducedit\itshape{10}{1000}{OT1IT} +\setfont\reducedsl\slshape{10}{1000}{OT1} +\setfont\reducedsf\sfshape{10}{1000}{OT1} +\setfont\reducedsc\scshape{10}{1000}{OT1} +\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} +\font\reducedi=cmmi10 +\font\reducedsy=cmsy10 +\def\reducedecsize{1000} + +\textleading = 13.2pt % line spacing for 11pt CM +\textfonts % reset the current fonts +\rm +} % end of 11pt text font size definitions + + +% Definitions to make the main text be 10pt Computer Modern, with +% section, chapter, etc., sizes following suit. This is for the GNU +% Press printing of the Emacs 22 manual. Maybe other manuals in the +% future. Used with @smallbook, which sets the leading to 12pt. +% +\def\definetextfontsizex{% +% Text fonts (10pt). +\def\textnominalsize{10pt} +\edef\mainmagstep{1000} +\setfont\textrm\rmshape{10}{\mainmagstep}{OT1} +\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} +\setfont\textbf\bfshape{10}{\mainmagstep}{OT1} +\setfont\textit\itshape{10}{\mainmagstep}{OT1IT} +\setfont\textsl\slshape{10}{\mainmagstep}{OT1} +\setfont\textsf\sfshape{10}{\mainmagstep}{OT1} +\setfont\textsc\scshape{10}{\mainmagstep}{OT1} +\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} +\font\texti=cmmi10 scaled \mainmagstep +\font\textsy=cmsy10 scaled \mainmagstep +\def\textecsize{1000} + +% A few fonts for @defun names and args. +\setfont\defbf\bfshape{10}{\magstephalf}{OT1} +\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} +\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} +\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} + +% Fonts for indices, footnotes, small examples (9pt). +\def\smallnominalsize{9pt} +\setfont\smallrm\rmshape{9}{1000}{OT1} +\setfont\smalltt\ttshape{9}{1000}{OT1TT} +\setfont\smallbf\bfshape{10}{900}{OT1} +\setfont\smallit\itshape{9}{1000}{OT1IT} +\setfont\smallsl\slshape{9}{1000}{OT1} +\setfont\smallsf\sfshape{9}{1000}{OT1} +\setfont\smallsc\scshape{10}{900}{OT1} +\setfont\smallttsl\ttslshape{10}{900}{OT1TT} +\font\smalli=cmmi9 +\font\smallsy=cmsy9 +\def\smallecsize{0900} + +% Fonts for small examples (8pt). +\def\smallernominalsize{8pt} +\setfont\smallerrm\rmshape{8}{1000}{OT1} +\setfont\smallertt\ttshape{8}{1000}{OT1TT} +\setfont\smallerbf\bfshape{10}{800}{OT1} +\setfont\smallerit\itshape{8}{1000}{OT1IT} +\setfont\smallersl\slshape{8}{1000}{OT1} +\setfont\smallersf\sfshape{8}{1000}{OT1} +\setfont\smallersc\scshape{10}{800}{OT1} +\setfont\smallerttsl\ttslshape{10}{800}{OT1TT} +\font\smalleri=cmmi8 +\font\smallersy=cmsy8 +\def\smallerecsize{0800} + +% Fonts for title page (20.4pt): +\def\titlenominalsize{20pt} +\setfont\titlerm\rmbshape{12}{\magstep3}{OT1} +\setfont\titleit\itbshape{10}{\magstep4}{OT1IT} +\setfont\titlesl\slbshape{10}{\magstep4}{OT1} +\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} +\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} +\setfont\titlesf\sfbshape{17}{\magstep1}{OT1} +\let\titlebf=\titlerm +\setfont\titlesc\scbshape{10}{\magstep4}{OT1} +\font\titlei=cmmi12 scaled \magstep3 +\font\titlesy=cmsy10 scaled \magstep4 +\def\titleecsize{2074} + +% Chapter fonts (14.4pt). +\def\chapnominalsize{14pt} +\setfont\chaprm\rmbshape{12}{\magstep1}{OT1} +\setfont\chapit\itbshape{10}{\magstep2}{OT1IT} +\setfont\chapsl\slbshape{10}{\magstep2}{OT1} +\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} +\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} +\setfont\chapsf\sfbshape{12}{\magstep1}{OT1} +\let\chapbf\chaprm +\setfont\chapsc\scbshape{10}{\magstep2}{OT1} +\font\chapi=cmmi12 scaled \magstep1 +\font\chapsy=cmsy10 scaled \magstep2 +\def\chapecsize{1440} + +% Section fonts (12pt). +\def\secnominalsize{12pt} +\setfont\secrm\rmbshape{12}{1000}{OT1} +\setfont\secit\itbshape{10}{\magstep1}{OT1IT} +\setfont\secsl\slbshape{10}{\magstep1}{OT1} +\setfont\sectt\ttbshape{12}{1000}{OT1TT} +\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} +\setfont\secsf\sfbshape{12}{1000}{OT1} +\let\secbf\secrm +\setfont\secsc\scbshape{10}{\magstep1}{OT1} +\font\seci=cmmi12 +\font\secsy=cmsy10 scaled \magstep1 +\def\sececsize{1200} + +% Subsection fonts (10pt). +\def\ssecnominalsize{10pt} +\setfont\ssecrm\rmbshape{10}{1000}{OT1} +\setfont\ssecit\itbshape{10}{1000}{OT1IT} +\setfont\ssecsl\slbshape{10}{1000}{OT1} +\setfont\ssectt\ttbshape{10}{1000}{OT1TT} +\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} +\setfont\ssecsf\sfbshape{10}{1000}{OT1} +\let\ssecbf\ssecrm +\setfont\ssecsc\scbshape{10}{1000}{OT1} +\font\sseci=cmmi10 +\font\ssecsy=cmsy10 +\def\ssececsize{1000} + +% Reduced fonts for @acro in text (9pt). +\def\reducednominalsize{9pt} +\setfont\reducedrm\rmshape{9}{1000}{OT1} +\setfont\reducedtt\ttshape{9}{1000}{OT1TT} +\setfont\reducedbf\bfshape{10}{900}{OT1} +\setfont\reducedit\itshape{9}{1000}{OT1IT} +\setfont\reducedsl\slshape{9}{1000}{OT1} +\setfont\reducedsf\sfshape{9}{1000}{OT1} +\setfont\reducedsc\scshape{10}{900}{OT1} +\setfont\reducedttsl\ttslshape{10}{900}{OT1TT} +\font\reducedi=cmmi9 +\font\reducedsy=cmsy9 +\def\reducedecsize{0900} + +\divide\parskip by 2 % reduce space between paragraphs +\textleading = 12pt % line spacing for 10pt CM +\textfonts % reset the current fonts +\rm +} % end of 10pt text font size definitions + + +% We provide the user-level command +% @fonttextsize 10 +% (or 11) to redefine the text font size. pt is assumed. +% +\def\xiword{11} +\def\xword{10} +\def\xwordpt{10pt} +% +\parseargdef\fonttextsize{% + \def\textsizearg{#1}% + %\wlog{doing @fonttextsize \textsizearg}% + % + % Set \globaldefs so that documents can use this inside @tex, since + % makeinfo 4.8 does not support it, but we need it nonetheless. + % + \begingroup \globaldefs=1 + \ifx\textsizearg\xword \definetextfontsizex + \else \ifx\textsizearg\xiword \definetextfontsizexi + \else + \errhelp=\EMsimple + \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} + \fi\fi + \endgroup +} + + +% In order for the font changes to affect most math symbols and letters, +% we have to define the \textfont of the standard families. Since +% texinfo doesn't allow for producing subscripts and superscripts except +% in the main text, we don't bother to reset \scriptfont and +% \scriptscriptfont (which would also require loading a lot more fonts). +% +\def\resetmathfonts{% + \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy + \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf + \textfont\ttfam=\tentt \textfont\sffam=\tensf +} + +% The font-changing commands redefine the meanings of \tenSTYLE, instead +% of just \STYLE. We do this because \STYLE needs to also set the +% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire +% \tenSTYLE to set the current font. +% +% Each font-changing command also sets the names \lsize (one size lower) +% and \lllsize (three sizes lower). These relative commands are used in +% the LaTeX logo and acronyms. +% +% This all needs generalizing, badly. +% +\def\textfonts{% + \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl + \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc + \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy + \let\tenttsl=\textttsl + \def\curfontsize{text}% + \def\lsize{reduced}\def\lllsize{smaller}% + \resetmathfonts \setleading{\textleading}} +\def\titlefonts{% + \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl + \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc + \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy + \let\tenttsl=\titlettsl + \def\curfontsize{title}% + \def\lsize{chap}\def\lllsize{subsec}% + \resetmathfonts \setleading{27pt}} +\def\titlefont#1{{\titlefonts\rmisbold #1}} +\def\chapfonts{% + \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl + \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc + \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy + \let\tenttsl=\chapttsl + \def\curfontsize{chap}% + \def\lsize{sec}\def\lllsize{text}% + \resetmathfonts \setleading{19pt}} +\def\secfonts{% + \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl + \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc + \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy + \let\tenttsl=\secttsl + \def\curfontsize{sec}% + \def\lsize{subsec}\def\lllsize{reduced}% + \resetmathfonts \setleading{16pt}} +\def\subsecfonts{% + \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl + \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc + \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy + \let\tenttsl=\ssecttsl + \def\curfontsize{ssec}% + \def\lsize{text}\def\lllsize{small}% + \resetmathfonts \setleading{15pt}} +\let\subsubsecfonts = \subsecfonts +\def\reducedfonts{% + \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl + \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc + \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy + \let\tenttsl=\reducedttsl + \def\curfontsize{reduced}% + \def\lsize{small}\def\lllsize{smaller}% + \resetmathfonts \setleading{10.5pt}} +\def\smallfonts{% + \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl + \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc + \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy + \let\tenttsl=\smallttsl + \def\curfontsize{small}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{10.5pt}} +\def\smallerfonts{% + \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl + \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc + \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy + \let\tenttsl=\smallerttsl + \def\curfontsize{smaller}% + \def\lsize{smaller}\def\lllsize{smaller}% + \resetmathfonts \setleading{9.5pt}} + +% Fonts for short table of contents. +\setfont\shortcontrm\rmshape{12}{1000}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + +% Define these just so they can be easily changed for other fonts. +\def\angleleft{$\langle$} +\def\angleright{$\rangle$} + +% Set the fonts to use with the @small... environments. +\let\smallexamplefonts = \smallfonts + +% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample +% can fit this many characters: +% 8.5x11=86 smallbook=72 a4=90 a5=69 +% If we use \scriptfonts (8pt), then we can fit this many characters: +% 8.5x11=90+ smallbook=80 a4=90+ a5=77 +% For me, subjectively, the few extra characters that fit aren't worth +% the additional smallness of 8pt. So I'm making the default 9pt. +% +% By the way, for comparison, here's what fits with @example (10pt): +% 8.5x11=71 smallbook=60 a4=75 a5=58 +% --karl, 24jan03. + +% Set up the default fonts, so we can use them for creating boxes. +% +\definetextfontsizexi + + +\message{markup,} + +% Check if we are currently using a typewriter font. Since all the +% Computer Modern typewriter fonts have zero interword stretch (and +% shrink), and it is reasonable to expect all typewriter fonts to have +% this property, we can check that font parameter. +% +\def\ifmonospace{\ifdim\fontdimen3\font=0pt } + +% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will +% define and register \INITMACRO to be called on markup style changes. +% \INITMACRO can check \currentmarkupstyle for the innermost +% style and the set of \ifmarkupSTYLE switches for all styles +% currently in effect. +\newif\ifmarkupvar +\newif\ifmarkupsamp +\newif\ifmarkupkey +%\newif\ifmarkupfile % @file == @samp. +%\newif\ifmarkupoption % @option == @samp. +\newif\ifmarkupcode +\newif\ifmarkupkbd +%\newif\ifmarkupenv % @env == @code. +%\newif\ifmarkupcommand % @command == @code. +\newif\ifmarkuptex % @tex (and part of @math, for now). +\newif\ifmarkupexample +\newif\ifmarkupverb +\newif\ifmarkupverbatim + +\let\currentmarkupstyle\empty + +\def\setupmarkupstyle#1{% + \csname markup#1true\endcsname + \def\currentmarkupstyle{#1}% + \markupstylesetup +} + +\let\markupstylesetup\empty + +\def\defmarkupstylesetup#1{% + \expandafter\def\expandafter\markupstylesetup + \expandafter{\markupstylesetup #1}% + \def#1% +} + +% Markup style setup for left and right quotes. +\defmarkupstylesetup\markupsetuplq{% + \expandafter\let\expandafter \temp + \csname markupsetuplq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuplqdefault \else \temp \fi +} + +\defmarkupstylesetup\markupsetuprq{% + \expandafter\let\expandafter \temp + \csname markupsetuprq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuprqdefault \else \temp \fi +} + +{ +\catcode`\'=\active +\catcode`\`=\active + +\gdef\markupsetuplqdefault{\let`\lq} +\gdef\markupsetuprqdefault{\let'\rq} + +\gdef\markupsetcodequoteleft{\let`\codequoteleft} +\gdef\markupsetcodequoteright{\let'\codequoteright} + +\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} +} + +\let\markupsetuplqcode \markupsetcodequoteleft +\let\markupsetuprqcode \markupsetcodequoteright +% +\let\markupsetuplqexample \markupsetcodequoteleft +\let\markupsetuprqexample \markupsetcodequoteright +% +\let\markupsetuplqsamp \markupsetcodequoteleft +\let\markupsetuprqsamp \markupsetcodequoteright +% +\let\markupsetuplqverb \markupsetcodequoteleft +\let\markupsetuprqverb \markupsetcodequoteright +% +\let\markupsetuplqverbatim \markupsetcodequoteleft +\let\markupsetuprqverbatim \markupsetcodequoteright + +\let\markupsetuplqkbd \markupsetnoligaturesquoteleft + +% Allow an option to not use regular directed right quote/apostrophe +% (char 0x27), but instead the undirected quote from cmtt (char 0x0d). +% The undirected quote is ugly, so don't make it the default, but it +% works for pasting with more pdf viewers (at least evince), the +% lilypond developers report. xpdf does work with the regular 0x27. +% +\def\codequoteright{% + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi + \else \char'15 \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +% +\def\codequoteleft{% + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + % [Knuth] pp. 380,381,391 + % \relax disables Spanish ligatures ?` and !` of \tt font. + \relax`% + \else \char'22 \fi + \else \char'22 \fi +} + +% Commands to set the quote options. +% +\parseargdef\codequoteundirected{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequoteundirected\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% + \fi\fi +} +% +\parseargdef\codequotebacktick{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = t% + \else\ifx\temp\offword + \expandafter\let\csname SETtxicodequotebacktick\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% + \fi\fi +} + +% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. +\def\noligaturesquoteleft{\relax\lq} + +% Count depth in font-changes, for error checks +\newcount\fontdepth \fontdepth=0 + +% Font commands. + +% #1 is the font command (\sl or \it), #2 is the text to slant. +% If we are in a monospaced environment, however, 1) always use \ttsl, +% and 2) do not add an italic correction. +\def\dosmartslant#1#2{% + \ifusingtt + {{\ttsl #2}\let\next=\relax}% + {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% + \next +} +\def\smartslanted{\dosmartslant\sl} +\def\smartitalic{\dosmartslant\it} + +% Output an italic correction unless \next (presumed to be the following +% character) is such as not to need one. +\def\smartitaliccorrection{% + \ifx\next,% + \else\ifx\next-% + \else\ifx\next.% + \else\ptexslash + \fi\fi\fi + \aftersmartic +} + +% like \smartslanted except unconditionally uses \ttsl, and no ic. +% @var is set to this for defun arguments. +\def\ttslanted#1{{\ttsl #1}} + +% @cite is like \smartslanted except unconditionally use \sl. We never want +% ttsl for book titles, do we? +\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} + +\def\aftersmartic{} +\def\var#1{% + \let\saveaftersmartic = \aftersmartic + \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% + \smartslanted{#1}% +} + +\let\i=\smartitalic +\let\slanted=\smartslanted +\let\dfn=\smartslanted +\let\emph=\smartitalic + +% Explicit font changes: @r, @sc, undocumented @ii. +\def\r#1{{\rm #1}} % roman font +\def\sc#1{{\smallcaps#1}} % smallcaps font +\def\ii#1{{\it #1}} % italic font + +% @b, explicit bold. Also @strong. +\def\b#1{{\bf #1}} +\let\strong=\b + +% @sansserif, explicit sans. +\def\sansserif#1{{\sf #1}} + +% We can't just use \exhyphenpenalty, because that only has effect at +% the end of a paragraph. Restore normal hyphenation at the end of the +% group within which \nohyphenation is presumably called. +% +\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} +\def\restorehyphenation{\hyphenchar\font = `- } + +% Set sfcode to normal for the chars that usually have another value. +% Can't use plain's \frenchspacing because it uses the `\x notation, and +% sometimes \x has an active definition that messes things up. +% +\catcode`@=11 + \def\plainfrenchspacing{% + \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m + \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m + \def\endofsentencespacefactor{1000}% for @. and friends + } + \def\plainnonfrenchspacing{% + \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 + \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 + \def\endofsentencespacefactor{3000}% for @. and friends + } +\catcode`@=\other +\def\endofsentencespacefactor{3000}% default + +% @t, explicit typewriter. +\def\t#1{% + {\tt \rawbackslash \plainfrenchspacing #1}% + \null +} + +% @samp. +\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} + +% definition of @key that produces a lozenge. Doesn't adjust to text size. +%\setfont\keyrm\rmshape{8}{1000}{OT1} +%\font\keysy=cmsy9 +%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% +% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% +% \vbox{\hrule\kern-0.4pt +% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% +% \kern-0.4pt\hrule}% +% \kern-.06em\raise0.4pt\hbox{\angleright}}}} + +% definition of @key with no lozenge. If the current font is already +% monospace, don't change it; that way, we respect @kbdinputstyle. But +% if it isn't monospace, then use \tt. +% +\def\key#1{{\setupmarkupstyle{key}% + \nohyphenation + \ifmonospace\else\tt\fi + #1}\null} + +% ctrl is no longer a Texinfo command. +\def\ctrl #1{{\tt \rawbackslash \hat}#1} + +% @file, @option are the same as @samp. +\let\file=\samp +\let\option=\samp + +% @code is a modification of @t, +% which makes spaces the same size as normal in the surrounding text. +\def\tclose#1{% + {% + % Change normal interword space to be same as for the current font. + \spaceskip = \fontdimen2\font + % + % Switch to typewriter. + \tt + % + % But `\ ' produces the large typewriter interword space. + \def\ {{\spaceskip = 0pt{} }}% + % + % Turn off hyphenation. + \nohyphenation + % + \rawbackslash + \plainfrenchspacing + #1% + }% + \null % reset spacefactor to 1000 +} + +% We *must* turn on hyphenation at `-' and `_' in @code. +% Otherwise, it is too hard to avoid overfull hboxes +% in the Emacs manual, the Library manual, etc. + +% Unfortunately, TeX uses one parameter (\hyphenchar) to control +% both hyphenation at - and hyphenation within words. +% We must therefore turn them both off (\tclose does that) +% and arrange explicitly to hyphenate at a dash. +% -- rms. +{ + \catcode`\-=\active \catcode`\_=\active + \catcode`\'=\active \catcode`\`=\active + \global\let'=\rq \global\let`=\lq % default definitions + % + \global\def\code{\begingroup + \setupmarkupstyle{code}% + % The following should really be moved into \setupmarkupstyle handlers. + \catcode\dashChar=\active \catcode\underChar=\active + \ifallowcodebreaks + \let-\codedash + \let_\codeunder + \else + \let-\realdash + \let_\realunder + \fi + \codex + } +} + +\def\codex #1{\tclose{#1}\endgroup} + +\def\realdash{-} +\def\codedash{-\discretionary{}{}{}} +\def\codeunder{% + % this is all so @math{@code{var_name}+1} can work. In math mode, _ + % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) + % will therefore expand the active definition of _, which is us + % (inside @code that is), therefore an endless loop. + \ifusingtt{\ifmmode + \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. + \else\normalunderscore \fi + \discretionary{}{}{}}% + {\_}% +} + +% An additional complication: the above will allow breaks after, e.g., +% each of the four underscores in __typeof__. This is undesirable in +% some manuals, especially if they don't have long identifiers in +% general. @allowcodebreaks provides a way to control this. +% +\newif\ifallowcodebreaks \allowcodebreakstrue + +\def\keywordtrue{true} +\def\keywordfalse{false} + +\parseargdef\allowcodebreaks{% + \def\txiarg{#1}% + \ifx\txiarg\keywordtrue + \allowcodebreakstrue + \else\ifx\txiarg\keywordfalse + \allowcodebreaksfalse + \else + \errhelp = \EMsimple + \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% + \fi\fi +} + +% @uref (abbreviation for `urlref') takes an optional (comma-separated) +% second argument specifying the text to display and an optional third +% arg as text to display instead of (rather than in addition to) the url +% itself. First (mandatory) arg is the url. +% (This \urefnobreak definition isn't used now, leaving it for a while +% for comparison.) +\def\urefnobreak#1{\dourefnobreak #1,,,\finish} +\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \ifpdf + \unhbox0 % PDF: 2nd arg given, show only it + \else + \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url + \fi + \else + \code{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% This \urefbreak definition is the active one. +\def\urefbreak{\begingroup \urefcatcodes \dourefbreak} +\let\uref=\urefbreak +\def\dourefbreak#1{\urefbreakfinish #1,,,\finish} +\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example + \unsepspaces + \pdfurl{#1}% + \setbox0 = \hbox{\ignorespaces #3}% + \ifdim\wd0 > 0pt + \unhbox0 % third arg given, show only that + \else + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0 > 0pt + \ifpdf + \unhbox0 % PDF: 2nd arg given, show only it + \else + \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url + \fi + \else + \urefcode{#1}% only url given, so show it + \fi + \fi + \endlink +\endgroup} + +% Allow line breaks around only a few characters (only). +\def\urefcatcodes{% + \catcode\ampChar=\active \catcode\dotChar=\active + \catcode\hashChar=\active \catcode\questChar=\active + \catcode\slashChar=\active +} +{ + \urefcatcodes + % + \global\def\urefcode{\begingroup + \setupmarkupstyle{code}% + \urefcatcodes + \let&\urefcodeamp + \let.\urefcodedot + \let#\urefcodehash + \let?\urefcodequest + \let/\urefcodeslash + \codex + } + % + % By default, they are just regular characters. + \global\def&{\normalamp} + \global\def.{\normaldot} + \global\def#{\normalhash} + \global\def?{\normalquest} + \global\def/{\normalslash} +} + +% we put a little stretch before and after the breakable chars, to help +% line breaking of long url's. The unequal skips make look better in +% cmtt at least, especially for dots. +\def\urefprestretch{\urefprebreak \hskip0pt plus.13em } +\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } +% +\def\urefcodeamp{\urefprestretch \&\urefpoststretch} +\def\urefcodedot{\urefprestretch .\urefpoststretch} +\def\urefcodehash{\urefprestretch \#\urefpoststretch} +\def\urefcodequest{\urefprestretch ?\urefpoststretch} +\def\urefcodeslash{\futurelet\next\urefcodeslashfinish} +{ + \catcode`\/=\active + \global\def\urefcodeslashfinish{% + \urefprestretch \slashChar + % Allow line break only after the final / in a sequence of + % slashes, to avoid line break between the slashes in http://. + \ifx\next/\else \urefpoststretch \fi + } +} + +% One more complication: by default we'll break after the special +% characters, but some people like to break before the special chars, so +% allow that. Also allow no breaking at all, for manual control. +% +\parseargdef\urefbreakstyle{% + \def\txiarg{#1}% + \ifx\txiarg\wordnone + \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordbefore + \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} + \else\ifx\txiarg\wordafter + \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} + \else + \errhelp = \EMsimple + \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\wordafter{after} +\def\wordbefore{before} +\def\wordnone{none} + +\urefbreakstyle after + +% @url synonym for @uref, since that's how everyone uses it. +% +\let\url=\uref + +% rms does not like angle brackets --karl, 17may97. +% So now @email is just like @uref, unless we are pdf. +% +%\def\email#1{\angleleft{\tt #1}\angleright} +\ifpdf + \def\email#1{\doemail#1,,\finish} + \def\doemail#1,#2,#3\finish{\begingroup + \unsepspaces + \pdfurl{mailto:#1}% + \setbox0 = \hbox{\ignorespaces #2}% + \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi + \endlink + \endgroup} +\else + \let\email=\uref +\fi + +% @kbd is like @code, except that if the argument is just one @key command, +% then @kbd has no effect. +\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} + +% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), +% `example' (@kbd uses ttsl only inside of @example and friends), +% or `code' (@kbd uses normal tty font always). +\parseargdef\kbdinputstyle{% + \def\txiarg{#1}% + \ifx\txiarg\worddistinct + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% + \else\ifx\txiarg\wordexample + \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% + \else\ifx\txiarg\wordcode + \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \else + \errhelp = \EMsimple + \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% + \fi\fi\fi +} +\def\worddistinct{distinct} +\def\wordexample{example} +\def\wordcode{code} + +% Default is `distinct'. +\kbdinputstyle distinct + +\def\xkey{\key} +\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% +\ifx\one\xkey\ifx\threex\three \key{#2}% +\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi +\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} + +% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. +\let\indicateurl=\code +\let\env=\code +\let\command=\code + +% @clicksequence{File @click{} Open ...} +\def\clicksequence#1{\begingroup #1\endgroup} + +% @clickstyle @arrow (by default) +\parseargdef\clickstyle{\def\click{#1}} +\def\click{\arrow} + +% Typeset a dimension, e.g., `in' or `pt'. The only reason for the +% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. +% +\def\dmn#1{\thinspace #1} + +% @l was never documented to mean ``switch to the Lisp font'', +% and it is not used as such in any manual I can find. We need it for +% Polish suppressed-l. --karl, 22sep96. +%\def\l#1{{\li #1}\null} + +% @acronym for "FBI", "NATO", and the like. +% We print this one point size smaller, since it's intended for +% all-uppercase. +% +\def\acronym#1{\doacronym #1,,\finish} +\def\doacronym#1,#2,#3\finish{% + {\selectfonts\lsize #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi + \null % reset \spacefactor=1000 +} + +% @abbr for "Comput. J." and the like. +% No font change, but don't do end-of-sentence spacing. +% +\def\abbr#1{\doabbr #1,,\finish} +\def\doabbr#1,#2,#3\finish{% + {\plainfrenchspacing #1}% + \def\temp{#2}% + \ifx\temp\empty \else + \space ({\unsepspaces \ignorespaces \temp \unskip})% + \fi + \null % reset \spacefactor=1000 +} + +% @asis just yields its argument. Used with @table, for example. +% +\def\asis#1{#1} + +% @math outputs its argument in math mode. +% +% One complication: _ usually means subscripts, but it could also mean +% an actual _ character, as in @math{@var{some_variable} + 1}. So make +% _ active, and distinguish by seeing if the current family is \slfam, +% which is what @var uses. +{ + \catcode`\_ = \active + \gdef\mathunderscore{% + \catcode`\_=\active + \def_{\ifnum\fam=\slfam \_\else\sb\fi}% + } +} +% Another complication: we want \\ (and @\) to output a math (or tt) \. +% FYI, plain.tex uses \\ as a temporary control sequence (for no +% particular reason), but this is not advertised and we don't care. +% +% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. +\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} +% +\def\math{% + \tex + \mathunderscore + \let\\ = \mathbackslash + \mathactive + % make the texinfo accent commands work in math mode + \let\"=\ddot + \let\'=\acute + \let\==\bar + \let\^=\hat + \let\`=\grave + \let\u=\breve + \let\v=\check + \let\~=\tilde + \let\dotaccent=\dot + $\finishmath +} +\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. + +% Some active characters (such as <) are spaced differently in math. +% We have to reset their definitions in case the @math was an argument +% to a command which sets the catcodes (such as @item or @section). +% +{ + \catcode`^ = \active + \catcode`< = \active + \catcode`> = \active + \catcode`+ = \active + \catcode`' = \active + \gdef\mathactive{% + \let^ = \ptexhat + \let< = \ptexless + \let> = \ptexgtr + \let+ = \ptexplus + \let' = \ptexquoteright + } +} + +% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. +% Ignore unless FMTNAME == tex; then it is like @iftex and @tex, +% except specified as a normal braced arg, so no newlines to worry about. +% +\def\outfmtnametex{tex} +% +\long\def\inlinefmt#1{\doinlinefmt #1,\finish} +\long\def\doinlinefmt#1,#2,\finish{% + \def\inlinefmtname{#1}% + \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi +} +% For raw, must switch into @tex before parsing the argument, to avoid +% setting catcodes prematurely. Doing it this way means that, for +% example, @inlineraw{html, foo{bar} gets a parse error instead of being +% ignored. But this isn't important because if people want a literal +% *right* brace they would have to use a command anyway, so they may as +% well use a command to get a left brace too. We could re-use the +% delimiter character idea from \verb, but it seems like overkill. +% +\long\def\inlineraw{\tex \doinlineraw} +\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} +\def\doinlinerawtwo#1,#2,\finish{% + \def\inlinerawname{#1}% + \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi + \endgroup % close group opened by \tex. +} + + +\message{glyphs,} +% and logos. + +% @@ prints an @, as does @atchar{}. +\def\@{\char64 } +\let\atchar=\@ + +% @{ @} @lbracechar{} @rbracechar{} all generate brace characters. +% Unless we're in typewriter, use \ecfont because the CM text fonts do +% not have braces, and we don't want to switch into math. +\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} +\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} +\let\{=\mylbrace \let\lbracechar=\{ +\let\}=\myrbrace \let\rbracechar=\} +\begingroup + % Definitions to produce \{ and \} commands for indices, + % and @{ and @} for the aux/toc files. + \catcode`\{ = \other \catcode`\} = \other + \catcode`\[ = 1 \catcode`\] = 2 + \catcode`\! = 0 \catcode`\\ = \other + !gdef!lbracecmd[\{]% + !gdef!rbracecmd[\}]% + !gdef!lbraceatcmd[@{]% + !gdef!rbraceatcmd[@}]% +!endgroup + +% @comma{} to avoid , parsing problems. +\let\comma = , + +% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. +\let\, = \ptexc +\let\dotaccent = \ptexdot +\def\ringaccent#1{{\accent23 #1}} +\let\tieaccent = \ptext +\let\ubaraccent = \ptexb +\let\udotaccent = \d + +% Other special characters: @questiondown @exclamdown @ordf @ordm +% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. +\def\questiondown{?`} +\def\exclamdown{!`} +\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} +\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} + +% Dotless i and dotless j, used for accents. +\def\imacro{i} +\def\jmacro{j} +\def\dotless#1{% + \def\temp{#1}% + \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi + \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi + \else \errmessage{@dotless can be used only with i or j}% + \fi\fi +} + +% The \TeX{} logo, as in plain, but resetting the spacing so that a +% period following counts as ending a sentence. (Idea found in latex.) +% +\edef\TeX{\TeX \spacefactor=1000 } + +% @LaTeX{} logo. Not quite the same results as the definition in +% latex.ltx, since we use a different font for the raised A; it's most +% convenient for us to use an explicitly smaller font, rather than using +% the \scriptstyle font (since we don't reset \scriptstyle and +% \scriptscriptstyle). +% +\def\LaTeX{% + L\kern-.36em + {\setbox0=\hbox{T}% + \vbox to \ht0{\hbox{% + \ifx\textnominalsize\xwordpt + % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. + % Revert to plain's \scriptsize, which is 7pt. + \count255=\the\fam $\fam\count255 \scriptstyle A$% + \else + % For 11pt, we can use our lllsize. + \selectfonts\lllsize A% + \fi + }% + \vss + }}% + \kern-.15em + \TeX +} + +% Some math mode symbols. +\def\bullet{$\ptexbullet$} +\def\geq{\ifmmode \ge\else $\ge$\fi} +\def\leq{\ifmmode \le\else $\le$\fi} +\def\minus{\ifmmode -\else $-$\fi} + +% @dots{} outputs an ellipsis using the current font. +% We do .5em per period so that it has the same spacing in the cm +% typewriter fonts as three actual period characters; on the other hand, +% in other typewriter fonts three periods are wider than 1.5em. So do +% whichever is larger. +% +\def\dots{% + \leavevmode + \setbox0=\hbox{...}% get width of three periods + \ifdim\wd0 > 1.5em + \dimen0 = \wd0 + \else + \dimen0 = 1.5em + \fi + \hbox to \dimen0{% + \hskip 0pt plus.25fil + .\hskip 0pt plus1fil + .\hskip 0pt plus1fil + .\hskip 0pt plus.5fil + }% +} + +% @enddots{} is an end-of-sentence ellipsis. +% +\def\enddots{% + \dots + \spacefactor=\endofsentencespacefactor +} + +% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. +% +% Since these characters are used in examples, they should be an even number of +% \tt widths. Each \tt character is 1en, so two makes it 1em. +% +\def\point{$\star$} +\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} +\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} +\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} +\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} +\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} + +% The @error{} command. +% Adapted from the TeXbook's \boxit. +% +\newbox\errorbox +% +{\tentt \global\dimen0 = 3em}% Width of the box. +\dimen2 = .55pt % Thickness of rules +% The text. (`r' is open on the right, `e' somewhat less so on the left.) +\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} +% +\setbox\errorbox=\hbox to \dimen0{\hfil + \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. + \advance\hsize by -2\dimen2 % Rules. + \vbox{% + \hrule height\dimen2 + \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. + \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. + \kern3pt\vrule width\dimen2}% Space to right. + \hrule height\dimen2} + \hfil} +% +\def\error{\leavevmode\lower.7ex\copy\errorbox} + +% @pounds{} is a sterling sign, which Knuth put in the CM italic font. +% +\def\pounds{{\it\$}} + +% @euro{} comes from a separate font, depending on the current style. +% We use the free feym* fonts from the eurosym package by Henrik +% Theiling, which support regular, slanted, bold and bold slanted (and +% "outlined" (blackboard board, sort of) versions, which we don't need). +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. +% +% Although only regular is the truly official Euro symbol, we ignore +% that. The Euro is designed to be slightly taller than the regular +% font height. +% +% feymr - regular +% feymo - slanted +% feybr - bold +% feybo - bold slanted +% +% There is no good (free) typewriter version, to my knowledge. +% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. +% Hmm. +% +% Also doesn't work in math. Do we need to do math with euro symbols? +% Hope not. +% +% +\def\euro{{\eurofont e}} +\def\eurofont{% + % We set the font at each command, rather than predefining it in + % \textfonts and the other font-switching commands, so that + % installations which never need the symbol don't have to have the + % font installed. + % + % There is only one designed size (nominal 10pt), so we always scale + % that to the current nominal size. + % + % By the way, simply using "at 1em" works for cmr10 and the like, but + % does not work for cmbx10 and other extended/shrunken fonts. + % + \def\eurosize{\csname\curfontsize nominalsize\endcsname}% + % + \ifx\curfontstyle\bfstylename + % bold: + \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize + \else + % regular: + \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize + \fi + \thiseurofont +} + +% Glyphs from the EC fonts. We don't use \let for the aliases, because +% sometimes we redefine the original macro, and the alias should reflect +% the redefinition. +% +% Use LaTeX names for the Icelandic letters. +\def\DH{{\ecfont \char"D0}} % Eth +\def\dh{{\ecfont \char"F0}} % eth +\def\TH{{\ecfont \char"DE}} % Thorn +\def\th{{\ecfont \char"FE}} % thorn +% +\def\guillemetleft{{\ecfont \char"13}} +\def\guillemotleft{\guillemetleft} +\def\guillemetright{{\ecfont \char"14}} +\def\guillemotright{\guillemetright} +\def\guilsinglleft{{\ecfont \char"0E}} +\def\guilsinglright{{\ecfont \char"0F}} +\def\quotedblbase{{\ecfont \char"12}} +\def\quotesinglbase{{\ecfont \char"0D}} +% +% This positioning is not perfect (see the ogonek LaTeX package), but +% we have the precomposed glyphs for the most common cases. We put the +% tests to use those glyphs in the single \ogonek macro so we have fewer +% dummy definitions to worry about for index entries, etc. +% +% ogonek is also used with other letters in Lithuanian (IOU), but using +% the precomposed glyphs for those is not so easy since they aren't in +% the same EC font. +\def\ogonek#1{{% + \def\temp{#1}% + \ifx\temp\macrocharA\Aogonek + \else\ifx\temp\macrochara\aogonek + \else\ifx\temp\macrocharE\Eogonek + \else\ifx\temp\macrochare\eogonek + \else + \ecfont \setbox0=\hbox{#1}% + \ifdim\ht0=1ex\accent"0C #1% + \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% + \fi + \fi\fi\fi\fi + }% +} +\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} +\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} +\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} +\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} +% +% Use the ec* fonts (cm-super in outline format) for non-CM glyphs. +\def\ecfont{% + % We can't distinguish serif/sans and italic/slanted, but this + % is used for crude hacks anyway (like adding French and German + % quotes to documents typeset with CM, where we lose kerning), so + % hopefully nobody will notice/care. + \edef\ecsize{\csname\curfontsize ecsize\endcsname}% + \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% + \ifx\curfontstyle\bfstylename + % bold: + \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize + \else + % regular: + \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize + \fi + \thisecfont +} + +% @registeredsymbol - R in a circle. The font for the R should really +% be smaller yet, but lllsize is the best we can do for now. +% Adapted from the plain.tex definition of \copyright. +% +\def\registeredsymbol{% + $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% + \hfil\crcr\Orb}}% + }$% +} + +% @textdegree - the normal degrees sign. +% +\def\textdegree{$^\circ$} + +% Laurent Siebenmann reports \Orb undefined with: +% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 +% so we'll define it if necessary. +% +\ifx\Orb\thisisundefined +\def\Orb{\mathhexbox20D} +\fi + +% Quotes. +\chardef\quotedblleft="5C +\chardef\quotedblright=`\" +\chardef\quoteleft=`\` +\chardef\quoteright=`\' + + +\message{page headings,} + +\newskip\titlepagetopglue \titlepagetopglue = 1.5in +\newskip\titlepagebottomglue \titlepagebottomglue = 2pc + +% First the title page. Must do @settitle before @titlepage. +\newif\ifseenauthor +\newif\iffinishedtitlepage + +% Do an implicit @contents or @shortcontents after @end titlepage if the +% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. +% +\newif\ifsetcontentsaftertitlepage + \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue +\newif\ifsetshortcontentsaftertitlepage + \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue + +\parseargdef\shorttitlepage{% + \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% + \endgroup\page\hbox{}\page} + +\envdef\titlepage{% + % Open one extra group, as we want to close it in the middle of \Etitlepage. + \begingroup + \parindent=0pt \textfonts + % Leave some space at the very top of the page. + \vglue\titlepagetopglue + % No rule at page bottom unless we print one at the top with @title. + \finishedtitlepagetrue + % + % Most title ``pages'' are actually two pages long, with space + % at the top of the second. We don't want the ragged left on the second. + \let\oldpage = \page + \def\page{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + \let\page = \oldpage + \page + \null + }% +} + +\def\Etitlepage{% + \iffinishedtitlepage\else + \finishtitlepage + \fi + % It is important to do the page break before ending the group, + % because the headline and footline are only empty inside the group. + % If we use the new definition of \page, we always get a blank page + % after the title page, which we certainly don't want. + \oldpage + \endgroup + % + % Need this before the \...aftertitlepage checks so that if they are + % in effect the toc pages will come out with page numbers. + \HEADINGSon + % + % If they want short, they certainly want long too. + \ifsetshortcontentsaftertitlepage + \shortcontents + \contents + \global\let\shortcontents = \relax + \global\let\contents = \relax + \fi + % + \ifsetcontentsaftertitlepage + \contents + \global\let\contents = \relax + \global\let\shortcontents = \relax + \fi +} + +\def\finishtitlepage{% + \vskip4pt \hrule height 2pt width \hsize + \vskip\titlepagebottomglue + \finishedtitlepagetrue +} + +% Macros to be used within @titlepage: + +\let\subtitlerm=\tenrm +\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} + +\parseargdef\title{% + \checkenv\titlepage + \leftline{\titlefonts\rmisbold #1} + % print a rule at the page bottom also. + \finishedtitlepagefalse + \vskip4pt \hrule height 4pt width \hsize \vskip4pt +} + +\parseargdef\subtitle{% + \checkenv\titlepage + {\subtitlefont \rightline{#1}}% +} + +% @author should come last, but may come many times. +% It can also be used inside @quotation. +% +\parseargdef\author{% + \def\temp{\quotation}% + \ifx\thisenv\temp + \def\quotationauthor{#1}% printed in \Equotation. + \else + \checkenv\titlepage + \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi + {\secfonts\rmisbold \leftline{#1}}% + \fi +} + + +% Set up page headings and footings. + +\let\thispage=\folio + +\newtoks\evenheadline % headline on even pages +\newtoks\oddheadline % headline on odd pages +\newtoks\evenfootline % footline on even pages +\newtoks\oddfootline % footline on odd pages + +% Now make TeX use those variables +\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline + \else \the\evenheadline \fi}} +\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline + \else \the\evenfootline \fi}\HEADINGShook} +\let\HEADINGShook=\relax + +% Commands to set those variables. +% For example, this is what @headings on does +% @evenheading @thistitle|@thispage|@thischapter +% @oddheading @thischapter|@thispage|@thistitle +% @evenfooting @thisfile|| +% @oddfooting ||@thisfile + + +\def\evenheading{\parsearg\evenheadingxxx} +\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} +\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% +\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddheading{\parsearg\oddheadingxxx} +\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} +\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% +\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% + +\def\evenfooting{\parsearg\evenfootingxxx} +\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} +\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% +\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} + +\def\oddfooting{\parsearg\oddfootingxxx} +\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} +\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% + \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% + % + % Leave some space for the footline. Hopefully ok to assume + % @evenfooting will not be used by itself. + \global\advance\pageheight by -12pt + \global\advance\vsize by -12pt +} + +\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} + +% @evenheadingmarks top \thischapter <- chapter at the top of a page +% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page +% +% The same set of arguments for: +% +% @oddheadingmarks +% @evenfootingmarks +% @oddfootingmarks +% @everyheadingmarks +% @everyfootingmarks + +\def\evenheadingmarks{\headingmarks{even}{heading}} +\def\oddheadingmarks{\headingmarks{odd}{heading}} +\def\evenfootingmarks{\headingmarks{even}{footing}} +\def\oddfootingmarks{\headingmarks{odd}{footing}} +\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} + \headingmarks{odd}{heading}{#1} } +\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} + \headingmarks{odd}{footing}{#1} } +% #1 = even/odd, #2 = heading/footing, #3 = top/bottom. +\def\headingmarks#1#2#3 {% + \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname + \global\expandafter\let\csname get#1#2marks\endcsname \temp +} + +\everyheadingmarks bottom +\everyfootingmarks bottom + +% @headings double turns headings on for double-sided printing. +% @headings single turns headings on for single-sided printing. +% @headings off turns them off. +% @headings on same as @headings double, retained for compatibility. +% @headings after turns on double-sided headings after this page. +% @headings doubleafter turns on double-sided headings after this page. +% @headings singleafter turns on single-sided headings after this page. +% By default, they are off at the start of a document, +% and turned `on' after @end titlepage. + +\def\headings #1 {\csname HEADINGS#1\endcsname} + +\def\headingsoff{% non-global headings elimination + \evenheadline={\hfil}\evenfootline={\hfil}% + \oddheadline={\hfil}\oddfootline={\hfil}% +} + +\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting +\HEADINGSoff % it's the default + +% When we turn headings on, set the page number to 1. +% For double-sided printing, put current file name in lower left corner, +% chapter name on inside top of right hand pages, document +% title on inside top of left hand pages, and page numbers on outside top +% edge of all pages. +\def\HEADINGSdouble{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} +\let\contentsalignmacro = \chappager + +% For single-sided printing, chapter title goes across top left of page, +% page number on top right. +\def\HEADINGSsingle{% +\global\pageno=1 +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} +\def\HEADINGSon{\HEADINGSdouble} + +\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} +\let\HEADINGSdoubleafter=\HEADINGSafter +\def\HEADINGSdoublex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\folio\hfil\thistitle}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage +} + +\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} +\def\HEADINGSsinglex{% +\global\evenfootline={\hfil} +\global\oddfootline={\hfil} +\global\evenheadline={\line{\thischapter\hfil\folio}} +\global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chappager +} + +% Subroutines used in generating headings +% This produces Day Month Year style of output. +% Only define if not already defined, in case a txi-??.tex file has set +% up a different format (e.g., txi-cs.tex does this). +\ifx\today\thisisundefined +\def\today{% + \number\day\space + \ifcase\month + \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr + \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug + \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec + \fi + \space\number\year} +\fi + +% @settitle line... specifies the title of the document, for headings. +% It generates no output of its own. +\def\thistitle{\putwordNoTitle} +\def\settitle{\parsearg{\gdef\thistitle}} + + +\message{tables,} +% Tables -- @table, @ftable, @vtable, @item(x). + +% default indentation of table text +\newdimen\tableindent \tableindent=.8in +% default indentation of @itemize and @enumerate text +\newdimen\itemindent \itemindent=.3in +% margin between end of table item and start of table text. +\newdimen\itemmargin \itemmargin=.1in + +% used internally for \itemindent minus \itemmargin +\newdimen\itemmax + +% Note @table, @ftable, and @vtable define @item, @itemx, etc., with +% these defs. +% They also define \itemindex +% to index the item name in whatever manner is desired (perhaps none). + +\newif\ifitemxneedsnegativevskip + +\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} + +\def\internalBitem{\smallbreak \parsearg\itemzzz} +\def\internalBitemx{\itemxpar \parsearg\itemzzz} + +\def\itemzzz #1{\begingroup % + \advance\hsize by -\rightskip + \advance\hsize by -\tableindent + \setbox0=\hbox{\itemindicate{#1}}% + \itemindex{#1}% + \nobreak % This prevents a break before @itemx. + % + % If the item text does not fit in the space we have, put it on a line + % by itself, and do not allow a page break either before or after that + % line. We do not start a paragraph here because then if the next + % command is, e.g., @kindex, the whatsit would get put into the + % horizontal list on a line by itself, resulting in extra blank space. + \ifdim \wd0>\itemmax + % + % Make this a paragraph so we get the \parskip glue and wrapping, + % but leave it ragged-right. + \begingroup + \advance\leftskip by-\tableindent + \advance\hsize by\tableindent + \advance\rightskip by0pt plus1fil\relax + \leavevmode\unhbox0\par + \endgroup + % + % We're going to be starting a paragraph, but we don't want the + % \parskip glue -- logically it's part of the @item we just started. + \nobreak \vskip-\parskip + % + % Stop a page break at the \parskip glue coming up. However, if + % what follows is an environment such as @example, there will be no + % \parskip glue; then the negative vskip we just inserted would + % cause the example and the item to crash together. So we use this + % bizarre value of 10001 as a signal to \aboveenvbreak to insert + % \parskip glue after all. Section titles are handled this way also. + % + \penalty 10001 + \endgroup + \itemxneedsnegativevskipfalse + \else + % The item text fits into the space. Start a paragraph, so that the + % following text (if any) will end up on the same line. + \noindent + % Do this with kerns and \unhbox so that if there is a footnote in + % the item text, it can migrate to the main vertical list and + % eventually be printed. + \nobreak\kern-\tableindent + \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 + \unhbox0 + \nobreak\kern\dimen0 + \endgroup + \itemxneedsnegativevskiptrue + \fi +} + +\def\item{\errmessage{@item while not in a list environment}} +\def\itemx{\errmessage{@itemx while not in a list environment}} + +% @table, @ftable, @vtable. +\envdef\table{% + \let\itemindex\gobble + \tablecheck{table}% +} +\envdef\ftable{% + \def\itemindex ##1{\doind {fn}{\code{##1}}}% + \tablecheck{ftable}% +} +\envdef\vtable{% + \def\itemindex ##1{\doind {vr}{\code{##1}}}% + \tablecheck{vtable}% +} +\def\tablecheck#1{% + \ifnum \the\catcode`\^^M=\active + \endgroup + \errmessage{This command won't work in this context; perhaps the problem is + that we are \inenvironment\thisenv}% + \def\next{\doignore{#1}}% + \else + \let\next\tablex + \fi + \next +} +\def\tablex#1{% + \def\itemindicate{#1}% + \parsearg\tabley +} +\def\tabley#1{% + {% + \makevalueexpandable + \edef\temp{\noexpand\tablez #1\space\space\space}% + \expandafter + }\temp \endtablez +} +\def\tablez #1 #2 #3 #4\endtablez{% + \aboveenvbreak + \ifnum 0#1>0 \advance \leftskip by #1\mil \fi + \ifnum 0#2>0 \tableindent=#2\mil \fi + \ifnum 0#3>0 \advance \rightskip by #3\mil \fi + \itemmax=\tableindent + \advance \itemmax by -\itemmargin + \advance \leftskip by \tableindent + \exdentamount=\tableindent + \parindent = 0pt + \parskip = \smallskipamount + \ifdim \parskip=0pt \parskip=2pt \fi + \let\item = \internalBitem + \let\itemx = \internalBitemx +} +\def\Etable{\endgraf\afterenvbreak} +\let\Eftable\Etable +\let\Evtable\Etable +\let\Eitemize\Etable +\let\Eenumerate\Etable + +% This is the counter used by @enumerate, which is really @itemize + +\newcount \itemno + +\envdef\itemize{\parsearg\doitemize} + +\def\doitemize#1{% + \aboveenvbreak + \itemmax=\itemindent + \advance\itemmax by -\itemmargin + \advance\leftskip by \itemindent + \exdentamount=\itemindent + \parindent=0pt + \parskip=\smallskipamount + \ifdim\parskip=0pt \parskip=2pt \fi + % + % Try typesetting the item mark that if the document erroneously says + % something like @itemize @samp (intending @table), there's an error + % right away at the @itemize. It's not the best error message in the + % world, but it's better than leaving it to the @item. This means if + % the user wants an empty mark, they have to say @w{} not just @w. + \def\itemcontents{#1}% + \setbox0 = \hbox{\itemcontents}% + % + % @itemize with no arg is equivalent to @itemize @bullet. + \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi + % + \let\item=\itemizeitem +} + +% Definition of @item while inside @itemize and @enumerate. +% +\def\itemizeitem{% + \advance\itemno by 1 % for enumerations + {\let\par=\endgraf \smallbreak}% reasonable place to break + {% + % If the document has an @itemize directly after a section title, a + % \nobreak will be last on the list, and \sectionheading will have + % done a \vskip-\parskip. In that case, we don't want to zero + % parskip, or the item text will crash with the heading. On the + % other hand, when there is normal text preceding the item (as there + % usually is), we do want to zero parskip, or there would be too much + % space. In that case, we won't have a \nobreak before. At least + % that's the theory. + \ifnum\lastpenalty<10000 \parskip=0in \fi + \noindent + \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% + % + \vadjust{\penalty 1200}}% not good to break after first line of item. + \flushcr +} + +% \splitoff TOKENS\endmark defines \first to be the first token in +% TOKENS, and \rest to be the remainder. +% +\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% + +% Allow an optional argument of an uppercase letter, lowercase letter, +% or number, to specify the first label in the enumerated list. No +% argument is the same as `1'. +% +\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} +\def\enumeratey #1 #2\endenumeratey{% + % If we were given no argument, pretend we were given `1'. + \def\thearg{#1}% + \ifx\thearg\empty \def\thearg{1}\fi + % + % Detect if the argument is a single token. If so, it might be a + % letter. Otherwise, the only valid thing it can be is a number. + % (We will always have one token, because of the test we just made. + % This is a good thing, since \splitoff doesn't work given nothing at + % all -- the first parameter is undelimited.) + \expandafter\splitoff\thearg\endmark + \ifx\rest\empty + % Only one token in the argument. It could still be anything. + % A ``lowercase letter'' is one whose \lccode is nonzero. + % An ``uppercase letter'' is one whose \lccode is both nonzero, and + % not equal to itself. + % Otherwise, we assume it's a number. + % + % We need the \relax at the end of the \ifnum lines to stop TeX from + % continuing to look for a <number>. + % + \ifnum\lccode\expandafter`\thearg=0\relax + \numericenumerate % a number (we hope) + \else + % It's a letter. + \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax + \lowercaseenumerate % lowercase letter + \else + \uppercaseenumerate % uppercase letter + \fi + \fi + \else + % Multiple tokens in the argument. We hope it's a number. + \numericenumerate + \fi +} + +% An @enumerate whose labels are integers. The starting integer is +% given in \thearg. +% +\def\numericenumerate{% + \itemno = \thearg + \startenumeration{\the\itemno}% +} + +% The starting (lowercase) letter is in \thearg. +\def\lowercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more lowercase letters in @enumerate; get a bigger + alphabet}% + \fi + \char\lccode\itemno + }% +} + +% The starting (uppercase) letter is in \thearg. +\def\uppercaseenumerate{% + \itemno = \expandafter`\thearg + \startenumeration{% + % Be sure we're not beyond the end of the alphabet. + \ifnum\itemno=0 + \errmessage{No more uppercase letters in @enumerate; get a bigger + alphabet} + \fi + \char\uccode\itemno + }% +} + +% Call \doitemize, adding a period to the first argument and supplying the +% common last two arguments. Also subtract one from the initial value in +% \itemno, since @item increments \itemno. +% +\def\startenumeration#1{% + \advance\itemno by -1 + \doitemize{#1.}\flushcr +} + +% @alphaenumerate and @capsenumerate are abbreviations for giving an arg +% to @enumerate. +% +\def\alphaenumerate{\enumerate{a}} +\def\capsenumerate{\enumerate{A}} +\def\Ealphaenumerate{\Eenumerate} +\def\Ecapsenumerate{\Eenumerate} + + +% @multitable macros +% Amy Hendrickson, 8/18/94, 3/6/96 +% +% @multitable ... @end multitable will make as many columns as desired. +% Contents of each column will wrap at width given in preamble. Width +% can be specified either with sample text given in a template line, +% or in percent of \hsize, the current width of text on page. + +% Table can continue over pages but will only break between lines. + +% To make preamble: +% +% Either define widths of columns in terms of percent of \hsize: +% @multitable @columnfractions .25 .3 .45 +% @item ... +% +% Numbers following @columnfractions are the percent of the total +% current hsize to be used for each column. You may use as many +% columns as desired. + + +% Or use a template: +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item ... +% using the widest term desired in each column. + +% Each new table line starts with @item, each subsequent new column +% starts with @tab. Empty columns may be produced by supplying @tab's +% with nothing between them for as many times as empty columns are needed, +% ie, @tab@tab@tab will produce two empty columns. + +% @item, @tab do not need to be on their own lines, but it will not hurt +% if they are. + +% Sample multitable: + +% @multitable {Column 1 template} {Column 2 template} {Column 3 template} +% @item first col stuff @tab second col stuff @tab third col +% @item +% first col stuff +% @tab +% second col stuff +% @tab +% third col +% @item first col stuff @tab second col stuff +% @tab Many paragraphs of text may be used in any column. +% +% They will wrap at the width determined by the template. +% @item@tab@tab This will be in third column. +% @end multitable + +% Default dimensions may be reset by user. +% @multitableparskip is vertical space between paragraphs in table. +% @multitableparindent is paragraph indent in table. +% @multitablecolmargin is horizontal space to be left between columns. +% @multitablelinespace is space to leave between table items, baseline +% to baseline. +% 0pt means it depends on current normal line spacing. +% +\newskip\multitableparskip +\newskip\multitableparindent +\newdimen\multitablecolspace +\newskip\multitablelinespace +\multitableparskip=0pt +\multitableparindent=6pt +\multitablecolspace=12pt +\multitablelinespace=0pt + +% Macros used to set up halign preamble: +% +\let\endsetuptable\relax +\def\xendsetuptable{\endsetuptable} +\let\columnfractions\relax +\def\xcolumnfractions{\columnfractions} +\newif\ifsetpercent + +% #1 is the @columnfraction, usually a decimal number like .5, but might +% be just 1. We just use it, whatever it is. +% +\def\pickupwholefraction#1 {% + \global\advance\colcount by 1 + \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% + \setuptable +} + +\newcount\colcount +\def\setuptable#1{% + \def\firstarg{#1}% + \ifx\firstarg\xendsetuptable + \let\go = \relax + \else + \ifx\firstarg\xcolumnfractions + \global\setpercenttrue + \else + \ifsetpercent + \let\go\pickupwholefraction + \else + \global\advance\colcount by 1 + \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a + % separator; typically that is always in the input, anyway. + \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% + \fi + \fi + \ifx\go\pickupwholefraction + % Put the argument back for the \pickupwholefraction call, so + % we'll always have a period there to be parsed. + \def\go{\pickupwholefraction#1}% + \else + \let\go = \setuptable + \fi% + \fi + \go +} + +% multitable-only commands. +% +% @headitem starts a heading row, which we typeset in bold. +% Assignments have to be global since we are inside the implicit group +% of an alignment entry. \everycr resets \everytab so we don't have to +% undo it ourselves. +\def\headitemfont{\b}% for people to use in the template row; not changeable +\def\headitem{% + \checkenv\multitable + \crcr + \global\everytab={\bf}% can't use \headitemfont since the parsing differs + \the\everytab % for the first item +}% +% +% A \tab used to include \hskip1sp. But then the space in a template +% line is not enough. That is bad. So let's go back to just `&' until +% we again encounter the problem the 1sp was intended to solve. +% --karl, nathan@acm.org, 20apr99. +\def\tab{\checkenv\multitable &\the\everytab}% + +% @multitable ... @end multitable definitions: +% +\newtoks\everytab % insert after every tab. +% +\envdef\multitable{% + \vskip\parskip + \startsavinginserts + % + % @item within a multitable starts a normal row. + % We use \def instead of \let so that if one of the multitable entries + % contains an @itemize, we don't choke on the \item (seen as \crcr aka + % \endtemplate) expanding \doitemize. + \def\item{\crcr}% + % + \tolerance=9500 + \hbadness=9500 + \setmultitablespacing + \parskip=\multitableparskip + \parindent=\multitableparindent + \overfullrule=0pt + \global\colcount=0 + % + \everycr = {% + \noalign{% + \global\everytab={}% + \global\colcount=0 % Reset the column counter. + % Check for saved footnotes, etc. + \checkinserts + % Keeps underfull box messages off when table breaks over pages. + %\filbreak + % Maybe so, but it also creates really weird page breaks when the + % table breaks over pages. Wouldn't \vfil be better? Wait until the + % problem manifests itself, so it can be fixed for real --karl. + }% + }% + % + \parsearg\domultitable +} +\def\domultitable#1{% + % To parse everything between @multitable and @item: + \setuptable#1 \endsetuptable + % + % This preamble sets up a generic column definition, which will + % be used as many times as user calls for columns. + % \vtop will set a single line and will also let text wrap and + % continue for many paragraphs if desired. + \halign\bgroup &% + \global\advance\colcount by 1 + \multistrut + \vtop{% + % Use the current \colcount to find the correct column width: + \hsize=\expandafter\csname col\the\colcount\endcsname + % + % In order to keep entries from bumping into each other + % we will add a \leftskip of \multitablecolspace to all columns after + % the first one. + % + % If a template has been used, we will add \multitablecolspace + % to the width of each template entry. + % + % If the user has set preamble in terms of percent of \hsize we will + % use that dimension as the width of the column, and the \leftskip + % will keep entries from bumping into each other. Table will start at + % left margin and final column will justify at right margin. + % + % Make sure we don't inherit \rightskip from the outer environment. + \rightskip=0pt + \ifnum\colcount=1 + % The first column will be indented with the surrounding text. + \advance\hsize by\leftskip + \else + \ifsetpercent \else + % If user has not set preamble in terms of percent of \hsize + % we will advance \hsize by \multitablecolspace. + \advance\hsize by \multitablecolspace + \fi + % In either case we will make \leftskip=\multitablecolspace: + \leftskip=\multitablecolspace + \fi + % Ignoring space at the beginning and end avoids an occasional spurious + % blank line, when TeX decides to break the line at the space before the + % box from the multistrut, so the strut ends up on a line by itself. + % For example: + % @multitable @columnfractions .11 .89 + % @item @code{#} + % @tab Legal holiday which is valid in major parts of the whole country. + % Is automatically provided with highlighting sequences respectively + % marking characters. + \noindent\ignorespaces##\unskip\multistrut + }\cr +} +\def\Emultitable{% + \crcr + \egroup % end the \halign + \global\setpercentfalse +} + +\def\setmultitablespacing{% + \def\multistrut{\strut}% just use the standard line spacing + % + % Compute \multitablelinespace (if not defined by user) for use in + % \multitableparskip calculation. We used define \multistrut based on + % this, but (ironically) that caused the spacing to be off. + % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. +\ifdim\multitablelinespace=0pt +\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip +\global\advance\multitablelinespace by-\ht0 +\fi +% Test to see if parskip is larger than space between lines of +% table. If not, do nothing. +% If so, set to same dimension as multitablelinespace. +\ifdim\multitableparskip>\multitablelinespace +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. +\fi% +\ifdim\multitableparskip=0pt +\global\multitableparskip=\multitablelinespace +\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller + % than skip between lines in the table. +\fi} + + +\message{conditionals,} + +% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, +% @ifnotxml always succeed. They currently do nothing; we don't +% attempt to check whether the conditionals are properly nested. But we +% have to remember that they are conditionals, so that @end doesn't +% attempt to close an environment group. +% +\def\makecond#1{% + \expandafter\let\csname #1\endcsname = \relax + \expandafter\let\csname iscond.#1\endcsname = 1 +} +\makecond{iftex} +\makecond{ifnotdocbook} +\makecond{ifnothtml} +\makecond{ifnotinfo} +\makecond{ifnotplaintext} +\makecond{ifnotxml} + +% Ignore @ignore, @ifhtml, @ifinfo, and the like. +% +\def\direntry{\doignore{direntry}} +\def\documentdescription{\doignore{documentdescription}} +\def\docbook{\doignore{docbook}} +\def\html{\doignore{html}} +\def\ifdocbook{\doignore{ifdocbook}} +\def\ifhtml{\doignore{ifhtml}} +\def\ifinfo{\doignore{ifinfo}} +\def\ifnottex{\doignore{ifnottex}} +\def\ifplaintext{\doignore{ifplaintext}} +\def\ifxml{\doignore{ifxml}} +\def\ignore{\doignore{ignore}} +\def\menu{\doignore{menu}} +\def\xml{\doignore{xml}} + +% Ignore text until a line `@end #1', keeping track of nested conditionals. +% +% A count to remember the depth of nesting. +\newcount\doignorecount + +\def\doignore#1{\begingroup + % Scan in ``verbatim'' mode: + \obeylines + \catcode`\@ = \other + \catcode`\{ = \other + \catcode`\} = \other + % + % Make sure that spaces turn into tokens that match what \doignoretext wants. + \spaceisspace + % + % Count number of #1's that we've seen. + \doignorecount = 0 + % + % Swallow text until we reach the matching `@end #1'. + \dodoignore{#1}% +} + +{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. + \obeylines % + % + \gdef\dodoignore#1{% + % #1 contains the command name as a string, e.g., `ifinfo'. + % + % Define a command to find the next `@end #1'. + \long\def\doignoretext##1^^M@end #1{% + \doignoretextyyy##1^^M@#1\_STOP_}% + % + % And this command to find another #1 command, at the beginning of a + % line. (Otherwise, we would consider a line `@c @ifset', for + % example, to count as an @ifset for nesting.) + \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% + % + % And now expand that command. + \doignoretext ^^M% + }% +} + +\def\doignoreyyy#1{% + \def\temp{#1}% + \ifx\temp\empty % Nothing found. + \let\next\doignoretextzzz + \else % Found a nested condition, ... + \advance\doignorecount by 1 + \let\next\doignoretextyyy % ..., look for another. + % If we're here, #1 ends with ^^M\ifinfo (for example). + \fi + \next #1% the token \_STOP_ is present just after this macro. +} + +% We have to swallow the remaining "\_STOP_". +% +\def\doignoretextzzz#1{% + \ifnum\doignorecount = 0 % We have just found the outermost @end. + \let\next\enddoignore + \else % Still inside a nested condition. + \advance\doignorecount by -1 + \let\next\doignoretext % Look for the next @end. + \fi + \next +} + +% Finish off ignored text. +{ \obeylines% + % Ignore anything after the last `@end #1'; this matters in verbatim + % environments, where otherwise the newline after an ignored conditional + % would result in a blank line in the output. + \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% +} + + +% @set VAR sets the variable VAR to an empty value. +% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. +% +% Since we want to separate VAR from REST-OF-LINE (which might be +% empty), we can't just use \parsearg; we have to insert a space of our +% own to delimit the rest of the line, and then take it out again if we +% didn't need it. +% We rely on the fact that \parsearg sets \catcode`\ =10. +% +\parseargdef\set{\setyyy#1 \endsetyyy} +\def\setyyy#1 #2\endsetyyy{% + {% + \makevalueexpandable + \def\temp{#2}% + \edef\next{\gdef\makecsname{SET#1}}% + \ifx\temp\empty + \next{}% + \else + \setzzz#2\endsetzzz + \fi + }% +} +% Remove the trailing space \setxxx inserted. +\def\setzzz#1 \endsetzzz{\next{#1}} + +% @clear VAR clears (i.e., unsets) the variable VAR. +% +\parseargdef\clear{% + {% + \makevalueexpandable + \global\expandafter\let\csname SET#1\endcsname=\relax + }% +} + +% @value{foo} gets the text saved in variable foo. +\def\value{\begingroup\makevalueexpandable\valuexxx} +\def\valuexxx#1{\expandablevalue{#1}\endgroup} +{ + \catcode`\- = \active \catcode`\_ = \active + % + \gdef\makevalueexpandable{% + \let\value = \expandablevalue + % We don't want these characters active, ... + \catcode`\-=\other \catcode`\_=\other + % ..., but we might end up with active ones in the argument if + % we're called from @code, as @code{@value{foo-bar_}}, though. + % So \let them to their normal equivalents. + \let-\realdash \let_\normalunderscore + } +} + +% We have this subroutine so that we can handle at least some @value's +% properly in indexes (we call \makevalueexpandable in \indexdummies). +% The command has to be fully expandable (if the variable is set), since +% the result winds up in the index file. This means that if the +% variable's value contains other Texinfo commands, it's almost certain +% it will fail (although perhaps we could fix that with sufficient work +% to do a one-level expansion on the result, instead of complete). +% +\def\expandablevalue#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + {[No value for ``#1'']}% + \message{Variable `#1', used in @value, is not set.}% + \else + \csname SET#1\endcsname + \fi +} + +% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined +% with @set. +% +% To get special treatment of `@end ifset,' call \makeond and the redefine. +% +\makecond{ifset} +\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} +\def\doifset#1#2{% + {% + \makevalueexpandable + \let\next=\empty + \expandafter\ifx\csname SET#2\endcsname\relax + #1% If not set, redefine \next. + \fi + \expandafter + }\next +} +\def\ifsetfail{\doignore{ifset}} + +% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been +% defined with @set, or has been undefined with @clear. +% +% The `\else' inside the `\doifset' parameter is a trick to reuse the +% above code: if the variable is not set, do nothing, if it is set, +% then redefine \next to \ifclearfail. +% +\makecond{ifclear} +\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} +\def\ifclearfail{\doignore{ifclear}} + +% @dircategory CATEGORY -- specify a category of the dir file +% which this file should belong to. Ignore this in TeX. +\let\dircategory=\comment + +% @defininfoenclose. +\let\definfoenclose=\comment + + +\message{indexing,} +% Index generation facilities + +% Define \newwrite to be identical to plain tex's \newwrite +% except not \outer, so it can be used within macros and \if's. +\edef\newwrite{\makecsname{ptexnewwrite}} + +% \newindex {foo} defines an index named foo. +% It automatically defines \fooindex such that +% \fooindex ...rest of line... puts an entry in the index foo. +% It also defines \fooindfile to be the number of the output channel for +% the file that accumulates this index. The file's extension is foo. +% The name of an index should be no more than 2 characters long +% for the sake of vms. +% +\def\newindex#1{% + \iflinks + \expandafter\newwrite \csname#1indfile\endcsname + \openout \csname#1indfile\endcsname \jobname.#1 % Open the file + \fi + \expandafter\xdef\csname#1index\endcsname{% % Define @#1index + \noexpand\doindex{#1}} +} + +% @defindex foo == \newindex{foo} +% +\def\defindex{\parsearg\newindex} + +% Define @defcodeindex, like @defindex except put all entries in @code. +% +\def\defcodeindex{\parsearg\newcodeindex} +% +\def\newcodeindex#1{% + \iflinks + \expandafter\newwrite \csname#1indfile\endcsname + \openout \csname#1indfile\endcsname \jobname.#1 + \fi + \expandafter\xdef\csname#1index\endcsname{% + \noexpand\docodeindex{#1}}% +} + + +% @synindex foo bar makes index foo feed into index bar. +% Do this instead of @defindex foo if you don't want it as a separate index. +% +% @syncodeindex foo bar similar, but put all entries made for index foo +% inside @code. +% +\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} +\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} + +% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), +% #3 the target index (bar). +\def\dosynindex#1#2#3{% + % Only do \closeout if we haven't already done it, else we'll end up + % closing the target index. + \expandafter \ifx\csname donesynindex#2\endcsname \relax + % The \closeout helps reduce unnecessary open files; the limit on the + % Acorn RISC OS is a mere 16 files. + \expandafter\closeout\csname#2indfile\endcsname + \expandafter\let\csname donesynindex#2\endcsname = 1 + \fi + % redefine \fooindfile: + \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname + \expandafter\let\csname#2indfile\endcsname=\temp + % redefine \fooindex: + \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% +} + +% Define \doindex, the driver for all \fooindex macros. +% Argument #1 is generated by the calling \fooindex macro, +% and it is "foo", the name of the index. + +% \doindex just uses \parsearg; it calls \doind for the actual work. +% This is because \doind is more useful to call from other macros. + +% There is also \dosubind {index}{topic}{subtopic} +% which makes an entry in a two-level index such as the operation index. + +\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} +\def\singleindexer #1{\doind{\indexname}{#1}} + +% like the previous two, but they put @code around the argument. +\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} +\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} + +% Take care of Texinfo commands that can appear in an index entry. +% Since there are some commands we want to expand, and others we don't, +% we have to laboriously prevent expansion for those that we don't. +% +\def\indexdummies{% + \escapechar = `\\ % use backslash in output files. + \def\@{@}% change to @@ when we switch to @ as escape char in index files. + \def\ {\realbackslash\space }% + % + % Need these unexpandable (because we define \tt as a dummy) + % definitions when @{ or @} appear in index entry text. Also, more + % complicated, when \tex is in effect and \{ is a \delimiter again. + % We can't use \lbracecmd and \rbracecmd because texindex assumes + % braces and backslashes are used only as delimiters. Perhaps we + % should define @lbrace and @rbrace commands a la @comma. + \def\{{{\tt\char123}}% + \def\}{{\tt\char125}}% + % + % I don't entirely understand this, but when an index entry is + % generated from a macro call, the \endinput which \scanmacro inserts + % causes processing to be prematurely terminated. This is, + % apparently, because \indexsorttmp is fully expanded, and \endinput + % is an expandable command. The redefinition below makes \endinput + % disappear altogether for that purpose -- although logging shows that + % processing continues to some further point. On the other hand, it + % seems \endinput does not hurt in the printed index arg, since that + % is still getting written without apparent harm. + % + % Sample source (mac-idx3.tex, reported by Graham Percival to + % help-texinfo, 22may06): + % @macro funindex {WORD} + % @findex xyz + % @end macro + % ... + % @funindex commtest + % + % The above is not enough to reproduce the bug, but it gives the flavor. + % + % Sample whatsit resulting: + % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} + % + % So: + \let\endinput = \empty + % + % Do the redefinitions. + \commondummies +} + +% For the aux and toc files, @ is the escape character. So we want to +% redefine everything using @ as the escape character (instead of +% \realbackslash, still used for index files). When everything uses @, +% this will be simpler. +% +\def\atdummies{% + \def\@{@@}% + \def\ {@ }% + \let\{ = \lbraceatcmd + \let\} = \rbraceatcmd + % + % Do the redefinitions. + \commondummies + \otherbackslash +} + +% Called from \indexdummies and \atdummies. +% +\def\commondummies{% + % + % \definedummyword defines \#1 as \string\#1\space, thus effectively + % preventing its expansion. This is used only for control words, + % not control letters, because the \space would be incorrect for + % control characters, but is needed to separate the control word + % from whatever follows. + % + % For control letters, we have \definedummyletter, which omits the + % space. + % + % These can be used both for control words that take an argument and + % those that do not. If it is followed by {arg} in the input, then + % that will dutifully get written to the index (or wherever). + % + \def\definedummyword ##1{\def##1{\string##1\space}}% + \def\definedummyletter##1{\def##1{\string##1}}% + \let\definedummyaccent\definedummyletter + % + \commondummiesnofonts + % + \definedummyletter\_% + \definedummyletter\-% + % + % Non-English letters. + \definedummyword\AA + \definedummyword\AE + \definedummyword\DH + \definedummyword\L + \definedummyword\O + \definedummyword\OE + \definedummyword\TH + \definedummyword\aa + \definedummyword\ae + \definedummyword\dh + \definedummyword\exclamdown + \definedummyword\l + \definedummyword\o + \definedummyword\oe + \definedummyword\ordf + \definedummyword\ordm + \definedummyword\questiondown + \definedummyword\ss + \definedummyword\th + % + % Although these internal commands shouldn't show up, sometimes they do. + \definedummyword\bf + \definedummyword\gtr + \definedummyword\hat + \definedummyword\less + \definedummyword\sf + \definedummyword\sl + \definedummyword\tclose + \definedummyword\tt + % + \definedummyword\LaTeX + \definedummyword\TeX + % + % Assorted special characters. + \definedummyword\arrow + \definedummyword\bullet + \definedummyword\comma + \definedummyword\copyright + \definedummyword\registeredsymbol + \definedummyword\dots + \definedummyword\enddots + \definedummyword\entrybreak + \definedummyword\equiv + \definedummyword\error + \definedummyword\euro + \definedummyword\expansion + \definedummyword\geq + \definedummyword\guillemetleft + \definedummyword\guillemetright + \definedummyword\guilsinglleft + \definedummyword\guilsinglright + \definedummyword\lbracechar + \definedummyword\leq + \definedummyword\minus + \definedummyword\ogonek + \definedummyword\pounds + \definedummyword\point + \definedummyword\print + \definedummyword\quotedblbase + \definedummyword\quotedblleft + \definedummyword\quotedblright + \definedummyword\quoteleft + \definedummyword\quoteright + \definedummyword\quotesinglbase + \definedummyword\rbracechar + \definedummyword\result + \definedummyword\textdegree + % + % We want to disable all macros so that they are not expanded by \write. + \macrolist + % + \normalturnoffactive + % + % Handle some cases of @value -- where it does not contain any + % (non-fully-expandable) commands. + \makevalueexpandable +} + +% \commondummiesnofonts: common to \commondummies and \indexnofonts. +% +\def\commondummiesnofonts{% + % Control letters and accents. + \definedummyletter\!% + \definedummyaccent\"% + \definedummyaccent\'% + \definedummyletter\*% + \definedummyaccent\,% + \definedummyletter\.% + \definedummyletter\/% + \definedummyletter\:% + \definedummyaccent\=% + \definedummyletter\?% + \definedummyaccent\^% + \definedummyaccent\`% + \definedummyaccent\~% + \definedummyword\u + \definedummyword\v + \definedummyword\H + \definedummyword\dotaccent + \definedummyword\ogonek + \definedummyword\ringaccent + \definedummyword\tieaccent + \definedummyword\ubaraccent + \definedummyword\udotaccent + \definedummyword\dotless + % + % Texinfo font commands. + \definedummyword\b + \definedummyword\i + \definedummyword\r + \definedummyword\sansserif + \definedummyword\sc + \definedummyword\slanted + \definedummyword\t + % + % Commands that take arguments. + \definedummyword\abbr + \definedummyword\acronym + \definedummyword\anchor + \definedummyword\cite + \definedummyword\code + \definedummyword\command + \definedummyword\dfn + \definedummyword\dmn + \definedummyword\email + \definedummyword\emph + \definedummyword\env + \definedummyword\file + \definedummyword\image + \definedummyword\indicateurl + \definedummyword\inforef + \definedummyword\kbd + \definedummyword\key + \definedummyword\math + \definedummyword\option + \definedummyword\pxref + \definedummyword\ref + \definedummyword\samp + \definedummyword\strong + \definedummyword\tie + \definedummyword\uref + \definedummyword\url + \definedummyword\var + \definedummyword\verb + \definedummyword\w + \definedummyword\xref +} + +% \indexnofonts is used when outputting the strings to sort the index +% by, and when constructing control sequence names. It eliminates all +% control sequences and just writes whatever the best ASCII sort string +% would be for a given command (usually its argument). +% +\def\indexnofonts{% + % Accent commands should become @asis. + \def\definedummyaccent##1{\let##1\asis}% + % We can just ignore other control letters. + \def\definedummyletter##1{\let##1\empty}% + % All control words become @asis by default; overrides below. + \let\definedummyword\definedummyaccent + % + \commondummiesnofonts + % + % Don't no-op \tt, since it isn't a user-level command + % and is used in the definitions of the active chars like <, >, |, etc. + % Likewise with the other plain tex font commands. + %\let\tt=\asis + % + \def\ { }% + \def\@{@}% + \def\_{\normalunderscore}% + \def\-{}% @- shouldn't affect sorting + % + % Unfortunately, texindex is not prepared to handle braces in the + % content at all. So for index sorting, we map @{ and @} to strings + % starting with |, since that ASCII character is between ASCII { and }. + \def\{{|a}% + \def\lbracechar{|a}% + % + \def\}{|b}% + \def\rbracechar{|b}% + % + % Non-English letters. + \def\AA{AA}% + \def\AE{AE}% + \def\DH{DZZ}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% + \def\TH{ZZZ}% + \def\aa{aa}% + \def\ae{ae}% + \def\dh{dzz}% + \def\exclamdown{!}% + \def\l{l}% + \def\oe{oe}% + \def\ordf{a}% + \def\ordm{o}% + \def\o{o}% + \def\questiondown{?}% + \def\ss{ss}% + \def\th{zzz}% + % + \def\LaTeX{LaTeX}% + \def\TeX{TeX}% + % + % Assorted special characters. + % (The following {} will end up in the sort string, but that's ok.) + \def\arrow{->}% + \def\bullet{bullet}% + \def\comma{,}% + \def\copyright{copyright}% + \def\dots{...}% + \def\enddots{...}% + \def\equiv{==}% + \def\error{error}% + \def\euro{euro}% + \def\expansion{==>}% + \def\geq{>=}% + \def\guillemetleft{<<}% + \def\guillemetright{>>}% + \def\guilsinglleft{<}% + \def\guilsinglright{>}% + \def\leq{<=}% + \def\minus{-}% + \def\point{.}% + \def\pounds{pounds}% + \def\print{-|}% + \def\quotedblbase{"}% + \def\quotedblleft{"}% + \def\quotedblright{"}% + \def\quoteleft{`}% + \def\quoteright{'}% + \def\quotesinglbase{,}% + \def\registeredsymbol{R}% + \def\result{=>}% + \def\textdegree{o}% + % + \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax + \else \indexlquoteignore \fi + % + % We need to get rid of all macros, leaving only the arguments (if present). + % Of course this is not nearly correct, but it is the best we can do for now. + % makeinfo does not expand macros in the argument to @deffn, which ends up + % writing an index entry, and texindex isn't prepared for an index sort entry + % that starts with \. + % + % Since macro invocations are followed by braces, we can just redefine them + % to take a single TeX argument. The case of a macro invocation that + % goes to end-of-line is not handled. + % + \macrolist +} + +% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us +% ignore left quotes in the sort term. +{\catcode`\`=\active + \gdef\indexlquoteignore{\let`=\empty}} + +\let\indexbackslash=0 %overridden during \printindex. +\let\SETmarginindex=\relax % put index entries in margin (undocumented)? + +% Most index entries go through here, but \dosubind is the general case. +% #1 is the index name, #2 is the entry text. +\def\doind#1#2{\dosubind{#1}{#2}{}} + +% Workhorse for all \fooindexes. +% #1 is name of index, #2 is stuff to put there, #3 is subentry -- +% empty if called from \doind, as we usually are (the main exception +% is with most defuns, which call us directly). +% +\def\dosubind#1#2#3{% + \iflinks + {% + % Store the main index entry text (including the third arg). + \toks0 = {#2}% + % If third arg is present, precede it with a space. + \def\thirdarg{#3}% + \ifx\thirdarg\empty \else + \toks0 = \expandafter{\the\toks0 \space #3}% + \fi + % + \edef\writeto{\csname#1indfile\endcsname}% + % + \safewhatsit\dosubindwrite + }% + \fi +} + +% Write the entry in \toks0 to the index file: +% +\def\dosubindwrite{% + % Put the index entry in the margin if desired. + \ifx\SETmarginindex\relax\else + \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% + \fi + % + % Remember, we are within a group. + \indexdummies % Must do this here, since \bf, etc expand at this stage + \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now + % so it will be output as is; and it will print as backslash. + % + % Process the index entry with all font commands turned off, to + % get the string to sort by. + {\indexnofonts + \edef\temp{\the\toks0}% need full expansion + \xdef\indexsorttmp{\temp}% + }% + % + % Set up the complete index entry, with both the sort key and + % the original text, including any font commands. We write + % three arguments to \entry to the .?? file (four in the + % subentry case), texindex reduces to two when writing the .??s + % sorted result. + \edef\temp{% + \write\writeto{% + \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% + }% + \temp +} + +% Take care of unwanted page breaks/skips around a whatsit: +% +% If a skip is the last thing on the list now, preserve it +% by backing up by \lastskip, doing the \write, then inserting +% the skip again. Otherwise, the whatsit generated by the +% \write or \pdfdest will make \lastskip zero. The result is that +% sequences like this: +% @end defun +% @tindex whatever +% @defun ... +% will have extra space inserted, because the \medbreak in the +% start of the @defun won't see the skip inserted by the @end of +% the previous defun. +% +% But don't do any of this if we're not in vertical mode. We +% don't want to do a \vskip and prematurely end a paragraph. +% +% Avoid page breaks due to these extra skips, too. +% +% But wait, there is a catch there: +% We'll have to check whether \lastskip is zero skip. \ifdim is not +% sufficient for this purpose, as it ignores stretch and shrink parts +% of the skip. The only way seems to be to check the textual +% representation of the skip. +% +% The following is almost like \def\zeroskipmacro{0.0pt} except that +% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). +% +\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} +% +\newskip\whatsitskip +\newcount\whatsitpenalty +% +% ..., ready, GO: +% +\def\safewhatsit#1{\ifhmode + #1% + \else + % \lastskip and \lastpenalty cannot both be nonzero simultaneously. + \whatsitskip = \lastskip + \edef\lastskipmacro{\the\lastskip}% + \whatsitpenalty = \lastpenalty + % + % If \lastskip is nonzero, that means the last item was a + % skip. And since a skip is discardable, that means this + % -\whatsitskip glue we're inserting is preceded by a + % non-discardable item, therefore it is not a potential + % breakpoint, therefore no \nobreak needed. + \ifx\lastskipmacro\zeroskipmacro + \else + \vskip-\whatsitskip + \fi + % + #1% + % + \ifx\lastskipmacro\zeroskipmacro + % If \lastskip was zero, perhaps the last item was a penalty, and + % perhaps it was >=10000, e.g., a \nobreak. In that case, we want + % to re-insert the same penalty (values >10000 are used for various + % signals); since we just inserted a non-discardable item, any + % following glue (such as a \parskip) would be a breakpoint. For example: + % @deffn deffn-whatever + % @vindex index-whatever + % Description. + % would allow a break between the index-whatever whatsit + % and the "Description." paragraph. + \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi + \else + % On the other hand, if we had a nonzero \lastskip, + % this make-up glue would be preceded by a non-discardable item + % (the whatsit from the \write), so we must insert a \nobreak. + \nobreak\vskip\whatsitskip + \fi +\fi} + +% The index entry written in the file actually looks like +% \entry {sortstring}{page}{topic} +% or +% \entry {sortstring}{page}{topic}{subtopic} +% The texindex program reads in these files and writes files +% containing these kinds of lines: +% \initial {c} +% before the first topic whose initial is c +% \entry {topic}{pagelist} +% for a topic that is used without subtopics +% \primary {topic} +% for the beginning of a topic that is used with subtopics +% \secondary {subtopic}{pagelist} +% for each subtopic. + +% Define the user-accessible indexing commands +% @findex, @vindex, @kindex, @cindex. + +\def\findex {\fnindex} +\def\kindex {\kyindex} +\def\cindex {\cpindex} +\def\vindex {\vrindex} +\def\tindex {\tpindex} +\def\pindex {\pgindex} + +\def\cindexsub {\begingroup\obeylines\cindexsub} +{\obeylines % +\gdef\cindexsub "#1" #2^^M{\endgroup % +\dosubind{cp}{#2}{#1}}} + +% Define the macros used in formatting output of the sorted index material. + +% @printindex causes a particular index (the ??s file) to get printed. +% It does not print any chapter heading (usually an @unnumbered). +% +\parseargdef\printindex{\begingroup + \dobreak \chapheadingskip{10000}% + % + \smallfonts \rm + \tolerance = 9500 + \plainfrenchspacing + \everypar = {}% don't want the \kern\-parindent from indentation suppression. + % + % See if the index file exists and is nonempty. + % Change catcode of @ here so that if the index file contains + % \initial {@} + % as its first line, TeX doesn't complain about mismatched braces + % (because it thinks @} is a control sequence). + \catcode`\@ = 11 + \openin 1 \jobname.#1s + \ifeof 1 + % \enddoublecolumns gets confused if there is no text in the index, + % and it loses the chapter title and the aux file entries for the + % index. The easiest way to prevent this problem is to make sure + % there is some text. + \putwordIndexNonexistent + \else + % + % If the index file exists but is empty, then \openin leaves \ifeof + % false. We have to make TeX try to read something from the file, so + % it can discover if there is anything in it. + \read 1 to \temp + \ifeof 1 + \putwordIndexIsEmpty + \else + % Index files are almost Texinfo source, but we use \ as the escape + % character. It would be better to use @, but that's too big a change + % to make right now. + \def\indexbackslash{\backslashcurfont}% + \catcode`\\ = 0 + \escapechar = `\\ + \begindoublecolumns + \input \jobname.#1s + \enddoublecolumns + \fi + \fi + \closein 1 +\endgroup} + +% These macros are used by the sorted index file itself. +% Change them to control the appearance of the index. + +\def\initial#1{{% + % Some minor font changes for the special characters. + \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt + % + % Remove any glue we may have, we'll be inserting our own. + \removelastskip + % + % We like breaks before the index initials, so insert a bonus. + \nobreak + \vskip 0pt plus 3\baselineskip + \penalty 0 + \vskip 0pt plus -3\baselineskip + % + % Typeset the initial. Making this add up to a whole number of + % baselineskips increases the chance of the dots lining up from column + % to column. It still won't often be perfect, because of the stretch + % we need before each entry, but it's better. + % + % No shrink because it confuses \balancecolumns. + \vskip 1.67\baselineskip plus .5\baselineskip + \leftline{\secbf #1}% + % Do our best not to break after the initial. + \nobreak + \vskip .33\baselineskip plus .1\baselineskip +}} + +% \entry typesets a paragraph consisting of the text (#1), dot leaders, and +% then page number (#2) flushed to the right margin. It is used for index +% and table of contents entries. The paragraph is indented by \leftskip. +% +% A straightforward implementation would start like this: +% \def\entry#1#2{... +% But this freezes the catcodes in the argument, and can cause problems to +% @code, which sets - active. This problem was fixed by a kludge--- +% ``-'' was active throughout whole index, but this isn't really right. +% The right solution is to prevent \entry from swallowing the whole text. +% --kasal, 21nov03 +\def\entry{% + \begingroup + % + % Start a new paragraph if necessary, so our assignments below can't + % affect previous text. + \par + % + % Do not fill out the last line with white space. + \parfillskip = 0in + % + % No extra space above this paragraph. + \parskip = 0in + % + % Do not prefer a separate line ending with a hyphen to fewer lines. + \finalhyphendemerits = 0 + % + % \hangindent is only relevant when the entry text and page number + % don't both fit on one line. In that case, bob suggests starting the + % dots pretty far over on the line. Unfortunately, a large + % indentation looks wrong when the entry text itself is broken across + % lines. So we use a small indentation and put up with long leaders. + % + % \hangafter is reset to 1 (which is the value we want) at the start + % of each paragraph, so we need not do anything with that. + \hangindent = 2em + % + % When the entry text needs to be broken, just fill out the first line + % with blank space. + \rightskip = 0pt plus1fil + % + % A bit of stretch before each entry for the benefit of balancing + % columns. + \vskip 0pt plus1pt + % + % When reading the text of entry, convert explicit line breaks + % from @* into spaces. The user might give these in long section + % titles, for instance. + \def\*{\unskip\space\ignorespaces}% + \def\entrybreak{\hfil\break}% + % + % Swallow the left brace of the text (first parameter): + \afterassignment\doentry + \let\temp = +} +\def\entrybreak{\unskip\space\ignorespaces}% +\def\doentry{% + \bgroup % Instead of the swallowed brace. + \noindent + \aftergroup\finishentry + % And now comes the text of the entry. +} +\def\finishentry#1{% + % #1 is the page number. + % + % The following is kludged to not output a line of dots in the index if + % there are no page numbers. The next person who breaks this will be + % cursed by a Unix daemon. + \setbox\boxA = \hbox{#1}% + \ifdim\wd\boxA = 0pt + \ % + \else + % + % If we must, put the page number on a line of its own, and fill out + % this line with blank space. (The \hfil is overwhelmed with the + % fill leaders glue in \indexdotfill if the page number does fit.) + \hfil\penalty50 + \null\nobreak\indexdotfill % Have leaders before the page number. + % + % The `\ ' here is removed by the implicit \unskip that TeX does as + % part of (the primitive) \par. Without it, a spurious underfull + % \hbox ensues. + \ifpdf + \pdfgettoks#1.% + \ \the\toksA + \else + \ #1% + \fi + \fi + \par + \endgroup +} + +% Like plain.tex's \dotfill, except uses up at least 1 em. +\def\indexdotfill{\cleaders + \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} + +\def\primary #1{\line{#1\hfil}} + +\newskip\secondaryindent \secondaryindent=0.5cm +\def\secondary#1#2{{% + \parfillskip=0in + \parskip=0in + \hangindent=1in + \hangafter=1 + \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill + \ifpdf + \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. + \else + #2 + \fi + \par +}} + +% Define two-column mode, which we use to typeset indexes. +% Adapted from the TeXbook, page 416, which is to say, +% the manmac.tex format used to print the TeXbook itself. +\catcode`\@=11 + +\newbox\partialpage +\newdimen\doublecolumnhsize + +\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns + % Grab any single-column material above us. + \output = {% + % + % Here is a possibility not foreseen in manmac: if we accumulate a + % whole lot of material, we might end up calling this \output + % routine twice in a row (see the doublecol-lose test, which is + % essentially a couple of indexes with @setchapternewpage off). In + % that case we just ship out what is in \partialpage with the normal + % output routine. Generally, \partialpage will be empty when this + % runs and this will be a no-op. See the indexspread.tex test case. + \ifvoid\partialpage \else + \onepageout{\pagecontents\partialpage}% + \fi + % + \global\setbox\partialpage = \vbox{% + % Unvbox the main output page. + \unvbox\PAGE + \kern-\topskip \kern\baselineskip + }% + }% + \eject % run that output routine to set \partialpage + % + % Use the double-column output routine for subsequent pages. + \output = {\doublecolumnout}% + % + % Change the page size parameters. We could do this once outside this + % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 + % format, but then we repeat the same computation. Repeating a couple + % of assignments once per index is clearly meaningless for the + % execution time, so we may as well do it in one place. + % + % First we halve the line length, less a little for the gutter between + % the columns. We compute the gutter based on the line length, so it + % changes automatically with the paper format. The magic constant + % below is chosen so that the gutter has the same value (well, +-<1pt) + % as it did when we hard-coded it. + % + % We put the result in a separate register, \doublecolumhsize, so we + % can restore it in \pagesofar, after \hsize itself has (potentially) + % been clobbered. + % + \doublecolumnhsize = \hsize + \advance\doublecolumnhsize by -.04154\hsize + \divide\doublecolumnhsize by 2 + \hsize = \doublecolumnhsize + % + % Double the \vsize as well. (We don't need a separate register here, + % since nobody clobbers \vsize.) + \vsize = 2\vsize +} + +% The double-column output routine for all double-column pages except +% the last. +% +\def\doublecolumnout{% + \splittopskip=\topskip \splitmaxdepth=\maxdepth + % Get the available space for the double columns -- the normal + % (undoubled) page height minus any material left over from the + % previous page. + \dimen@ = \vsize + \divide\dimen@ by 2 + \advance\dimen@ by -\ht\partialpage + % + % box0 will be the left-hand column, box2 the right. + \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ + \onepageout\pagesofar + \unvbox255 + \penalty\outputpenalty +} +% +% Re-output the contents of the output page -- any previous material, +% followed by the two boxes we just split, in box0 and box2. +\def\pagesofar{% + \unvbox\partialpage + % + \hsize = \doublecolumnhsize + \wd0=\hsize \wd2=\hsize + \hbox to\pagewidth{\box0\hfil\box2}% +} +% +% All done with double columns. +\def\enddoublecolumns{% + % The following penalty ensures that the page builder is exercised + % _before_ we change the output routine. This is necessary in the + % following situation: + % + % The last section of the index consists only of a single entry. + % Before this section, \pagetotal is less than \pagegoal, so no + % break occurs before the last section starts. However, the last + % section, consisting of \initial and the single \entry, does not + % fit on the page and has to be broken off. Without the following + % penalty the page builder will not be exercised until \eject + % below, and by that time we'll already have changed the output + % routine to the \balancecolumns version, so the next-to-last + % double-column page will be processed with \balancecolumns, which + % is wrong: The two columns will go to the main vertical list, with + % the broken-off section in the recent contributions. As soon as + % the output routine finishes, TeX starts reconsidering the page + % break. The two columns and the broken-off section both fit on the + % page, because the two columns now take up only half of the page + % goal. When TeX sees \eject from below which follows the final + % section, it invokes the new output routine that we've set after + % \balancecolumns below; \onepageout will try to fit the two columns + % and the final section into the vbox of \pageheight (see + % \pagebody), causing an overfull box. + % + % Note that glue won't work here, because glue does not exercise the + % page builder, unlike penalties (see The TeXbook, pp. 280-281). + \penalty0 + % + \output = {% + % Split the last of the double-column material. Leave it on the + % current page, no automatic page break. + \balancecolumns + % + % If we end up splitting too much material for the current page, + % though, there will be another page break right after this \output + % invocation ends. Having called \balancecolumns once, we do not + % want to call it again. Therefore, reset \output to its normal + % definition right away. (We hope \balancecolumns will never be + % called on to balance too much material, but if it is, this makes + % the output somewhat more palatable.) + \global\output = {\onepageout{\pagecontents\PAGE}}% + }% + \eject + \endgroup % started in \begindoublecolumns + % + % \pagegoal was set to the doubled \vsize above, since we restarted + % the current page. We're now back to normal single-column + % typesetting, so reset \pagegoal to the normal \vsize (after the + % \endgroup where \vsize got restored). + \pagegoal = \vsize +} +% +% Called at the end of the double column material. +\def\balancecolumns{% + \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. + \dimen@ = \ht0 + \advance\dimen@ by \topskip + \advance\dimen@ by-\baselineskip + \divide\dimen@ by 2 % target to split to + %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% + \splittopskip = \topskip + % Loop until we get a decent breakpoint. + {% + \vbadness = 10000 + \loop + \global\setbox3 = \copy0 + \global\setbox1 = \vsplit3 to \dimen@ + \ifdim\ht3>\dimen@ + \global\advance\dimen@ by 1pt + \repeat + }% + %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% + \setbox0=\vbox to\dimen@{\unvbox1}% + \setbox2=\vbox to\dimen@{\unvbox3}% + % + \pagesofar +} +\catcode`\@ = \other + + +\message{sectioning,} +% Chapters, sections, etc. + +% Let's start with @part. +\outer\parseargdef\part{\partzzz{#1}} +\def\partzzz#1{% + \chapoddpage + \null + \vskip.3\vsize % move it down on the page a bit + \begingroup + \noindent \titlefonts\rmisbold #1\par % the text + \let\lastnode=\empty % no node to associate with + \writetocentry{part}{#1}{}% but put it in the toc + \headingsoff % no headline or footline on the part page + \chapoddpage + \endgroup +} + +% \unnumberedno is an oxymoron. But we count the unnumbered +% sections so that we can refer to them unambiguously in the pdf +% outlines by their "section number". We avoid collisions with chapter +% numbers by starting them at 10000. (If a document ever has 10000 +% chapters, we're in trouble anyway, I'm sure.) +\newcount\unnumberedno \unnumberedno = 10000 +\newcount\chapno +\newcount\secno \secno=0 +\newcount\subsecno \subsecno=0 +\newcount\subsubsecno \subsubsecno=0 + +% This counter is funny since it counts through charcodes of letters A, B, ... +\newcount\appendixno \appendixno = `\@ +% +% \def\appendixletter{\char\the\appendixno} +% We do the following ugly conditional instead of the above simple +% construct for the sake of pdftex, which needs the actual +% letter in the expansion, not just typeset. +% +\def\appendixletter{% + \ifnum\appendixno=`A A% + \else\ifnum\appendixno=`B B% + \else\ifnum\appendixno=`C C% + \else\ifnum\appendixno=`D D% + \else\ifnum\appendixno=`E E% + \else\ifnum\appendixno=`F F% + \else\ifnum\appendixno=`G G% + \else\ifnum\appendixno=`H H% + \else\ifnum\appendixno=`I I% + \else\ifnum\appendixno=`J J% + \else\ifnum\appendixno=`K K% + \else\ifnum\appendixno=`L L% + \else\ifnum\appendixno=`M M% + \else\ifnum\appendixno=`N N% + \else\ifnum\appendixno=`O O% + \else\ifnum\appendixno=`P P% + \else\ifnum\appendixno=`Q Q% + \else\ifnum\appendixno=`R R% + \else\ifnum\appendixno=`S S% + \else\ifnum\appendixno=`T T% + \else\ifnum\appendixno=`U U% + \else\ifnum\appendixno=`V V% + \else\ifnum\appendixno=`W W% + \else\ifnum\appendixno=`X X% + \else\ifnum\appendixno=`Y Y% + \else\ifnum\appendixno=`Z Z% + % The \the is necessary, despite appearances, because \appendixletter is + % expanded while writing the .toc file. \char\appendixno is not + % expandable, thus it is written literally, thus all appendixes come out + % with the same letter (or @) in the toc without it. + \else\char\the\appendixno + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} + +% Each @chapter defines these (using marks) as the number+name, number +% and name of the chapter. Page headings and footings can use +% these. @section does likewise. +\def\thischapter{} +\def\thischapternum{} +\def\thischaptername{} +\def\thissection{} +\def\thissectionnum{} +\def\thissectionname{} + +\newcount\absseclevel % used to calculate proper heading level +\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count + +% @raisesections: treat @section as chapter, @subsection as section, etc. +\def\raisesections{\global\advance\secbase by -1} +\let\up=\raisesections % original BFox name + +% @lowersections: treat @chapter as section, @section as subsection, etc. +\def\lowersections{\global\advance\secbase by 1} +\let\down=\lowersections % original BFox name + +% we only have subsub. +\chardef\maxseclevel = 3 +% +% A numbered section within an unnumbered changes to unnumbered too. +% To achieve this, remember the "biggest" unnum. sec. we are currently in: +\chardef\unnlevel = \maxseclevel +% +% Trace whether the current chapter is an appendix or not: +% \chapheadtype is "N" or "A", unnumbered chapters are ignored. +\def\chapheadtype{N} + +% Choose a heading macro +% #1 is heading type +% #2 is heading level +% #3 is text for heading +\def\genhead#1#2#3{% + % Compute the abs. sec. level: + \absseclevel=#2 + \advance\absseclevel by \secbase + % Make sure \absseclevel doesn't fall outside the range: + \ifnum \absseclevel < 0 + \absseclevel = 0 + \else + \ifnum \absseclevel > 3 + \absseclevel = 3 + \fi + \fi + % The heading type: + \def\headtype{#1}% + \if \headtype U% + \ifnum \absseclevel < \unnlevel + \chardef\unnlevel = \absseclevel + \fi + \else + % Check for appendix sections: + \ifnum \absseclevel = 0 + \edef\chapheadtype{\headtype}% + \else + \if \headtype A\if \chapheadtype N% + \errmessage{@appendix... within a non-appendix chapter}% + \fi\fi + \fi + % Check for numbered within unnumbered: + \ifnum \absseclevel > \unnlevel + \def\headtype{U}% + \else + \chardef\unnlevel = 3 + \fi + \fi + % Now print the heading: + \if \headtype U% + \ifcase\absseclevel + \unnumberedzzz{#3}% + \or \unnumberedseczzz{#3}% + \or \unnumberedsubseczzz{#3}% + \or \unnumberedsubsubseczzz{#3}% + \fi + \else + \if \headtype A% + \ifcase\absseclevel + \appendixzzz{#3}% + \or \appendixsectionzzz{#3}% + \or \appendixsubseczzz{#3}% + \or \appendixsubsubseczzz{#3}% + \fi + \else + \ifcase\absseclevel + \chapterzzz{#3}% + \or \seczzz{#3}% + \or \numberedsubseczzz{#3}% + \or \numberedsubsubseczzz{#3}% + \fi + \fi + \fi + \suppressfirstparagraphindent +} + +% an interface: +\def\numhead{\genhead N} +\def\apphead{\genhead A} +\def\unnmhead{\genhead U} + +% @chapter, @appendix, @unnumbered. Increment top-level counter, reset +% all lower-level sectioning counters to zero. +% +% Also set \chaplevelprefix, which we prepend to @float sequence numbers +% (e.g., figures), q.v. By default (before any chapter), that is empty. +\let\chaplevelprefix = \empty +% +\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz +\def\chapterzzz#1{% + % section resetting is \global in case the chapter is in a group, such + % as an @include file. + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\chapno by 1 + % + % Used for \float. + \gdef\chaplevelprefix{\the\chapno.}% + \resetallfloatnos + % + % \putwordChapter can contain complex things in translations. + \toks0=\expandafter{\putwordChapter}% + \message{\the\toks0 \space \the\chapno}% + % + % Write the actual heading. + \chapmacro{#1}{Ynumbered}{\the\chapno}% + % + % So @section and the like are numbered underneath this chapter. + \global\let\section = \numberedsec + \global\let\subsection = \numberedsubsec + \global\let\subsubsection = \numberedsubsubsec +} + +\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz +% +\def\appendixzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\appendixno by 1 + \gdef\chaplevelprefix{\appendixletter.}% + \resetallfloatnos + % + % \putwordAppendix can contain complex things in translations. + \toks0=\expandafter{\putwordAppendix}% + \message{\the\toks0 \space \appendixletter}% + % + \chapmacro{#1}{Yappendix}{\appendixletter}% + % + \global\let\section = \appendixsec + \global\let\subsection = \appendixsubsec + \global\let\subsubsection = \appendixsubsubsec +} + +% normally unnmhead0 calls unnumberedzzz: +\outer\parseargdef\unnumbered{\unnmhead0{#1}} +\def\unnumberedzzz#1{% + \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 + \global\advance\unnumberedno by 1 + % + % Since an unnumbered has no number, no prefix for figures. + \global\let\chaplevelprefix = \empty + \resetallfloatnos + % + % This used to be simply \message{#1}, but TeX fully expands the + % argument to \message. Therefore, if #1 contained @-commands, TeX + % expanded them. For example, in `@unnumbered The @cite{Book}', TeX + % expanded @cite (which turns out to cause errors because \cite is meant + % to be executed, not expanded). + % + % Anyway, we don't want the fully-expanded definition of @cite to appear + % as a result of the \message, we just want `@cite' itself. We use + % \the<toks register> to achieve this: TeX expands \the<toks> only once, + % simply yielding the contents of <toks register>. (We also do this for + % the toc entries.) + \toks0 = {#1}% + \message{(\the\toks0)}% + % + \chapmacro{#1}{Ynothing}{\the\unnumberedno}% + % + \global\let\section = \unnumberedsec + \global\let\subsection = \unnumberedsubsec + \global\let\subsubsection = \unnumberedsubsubsec +} + +% @centerchap is like @unnumbered, but the heading is centered. +\outer\parseargdef\centerchap{% + % Well, we could do the following in a group, but that would break + % an assumption that \chapmacro is called at the outermost level. + % Thus we are safer this way: --kasal, 24feb04 + \let\centerparametersmaybe = \centerparameters + \unnmhead0{#1}% + \let\centerparametersmaybe = \relax +} + +% @top is like @unnumbered. +\let\top\unnumbered + +% Sections. +% +\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz +\def\seczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% +} + +% normally calls appendixsectionzzz: +\outer\parseargdef\appendixsection{\apphead1{#1}} +\def\appendixsectionzzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% +} +\let\appendixsec\appendixsection + +% normally calls unnumberedseczzz: +\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} +\def\unnumberedseczzz#1{% + \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 + \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% +} + +% Subsections. +% +% normally calls numberedsubseczzz: +\outer\parseargdef\numberedsubsec{\numhead2{#1}} +\def\numberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% +} + +% normally calls appendixsubseczzz: +\outer\parseargdef\appendixsubsec{\apphead2{#1}} +\def\appendixsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno}% +} + +% normally calls unnumberedsubseczzz: +\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} +\def\unnumberedsubseczzz#1{% + \global\subsubsecno=0 \global\advance\subsecno by 1 + \sectionheading{#1}{subsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno}% +} + +% Subsubsections. +% +% normally numberedsubsubseczzz: +\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} +\def\numberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynumbered}% + {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% normally appendixsubsubseczzz: +\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} +\def\appendixsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Yappendix}% + {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% normally unnumberedsubsubseczzz: +\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} +\def\unnumberedsubsubseczzz#1{% + \global\advance\subsubsecno by 1 + \sectionheading{#1}{subsubsec}{Ynothing}% + {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% +} + +% These macros control what the section commands do, according +% to what kind of chapter we are in (ordinary, appendix, or unnumbered). +% Define them by default for a numbered chapter. +\let\section = \numberedsec +\let\subsection = \numberedsubsec +\let\subsubsection = \numberedsubsubsec + +% Define @majorheading, @heading and @subheading + +% NOTE on use of \vbox for chapter headings, section headings, and such: +% 1) We use \vbox rather than the earlier \line to permit +% overlong headings to fold. +% 2) \hyphenpenalty is set to 10000 because hyphenation in a +% heading is obnoxious; this forbids it. +% 3) Likewise, headings look best if no \parindent is used, and +% if justification is not attempted. Hence \raggedright. + +\def\majorheading{% + {\advance\chapheadingskip by 10pt \chapbreak }% + \parsearg\chapheadingzzz +} + +\def\chapheading{\chapbreak \parsearg\chapheadingzzz} +\def\chapheadingzzz#1{% + {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt\ptexraggedright + \rmisbold #1\hfill}}% + \bigskip \par\penalty 200\relax + \suppressfirstparagraphindent +} + +% @heading, @subheading, @subsubheading. +\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} +\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} + \suppressfirstparagraphindent} + +% These macros generate a chapter, section, etc. heading only +% (including whitespace, linebreaking, etc. around it), +% given all the information in convenient, parsed form. + +% Args are the skip and penalty (usually negative) +\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} + +% Parameter controlling skip before chapter headings (if needed) +\newskip\chapheadingskip + +% Define plain chapter starts, and page on/off switching for it. +\def\chapbreak{\dobreak \chapheadingskip {-4000}} +\def\chappager{\par\vfill\supereject} +% Because \domark is called before \chapoddpage, the filler page will +% get the headings for the next chapter, which is wrong. But we don't +% care -- we just disable all headings on the filler page. +\def\chapoddpage{% + \chappager + \ifodd\pageno \else + \begingroup + \headingsoff + \null + \chappager + \endgroup + \fi +} + +\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} + +\def\CHAPPAGoff{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chapbreak +\global\let\pagealignmacro=\chappager} + +\def\CHAPPAGon{% +\global\let\contentsalignmacro = \chappager +\global\let\pchapsepmacro=\chappager +\global\let\pagealignmacro=\chappager +\global\def\HEADINGSon{\HEADINGSsingle}} + +\def\CHAPPAGodd{% +\global\let\contentsalignmacro = \chapoddpage +\global\let\pchapsepmacro=\chapoddpage +\global\let\pagealignmacro=\chapoddpage +\global\def\HEADINGSon{\HEADINGSdouble}} + +\CHAPPAGon + +% Chapter opening. +% +% #1 is the text, #2 is the section type (Ynumbered, Ynothing, +% Yappendix, Yomitfromtoc), #3 the chapter number. +% +% To test against our argument. +\def\Ynothingkeyword{Ynothing} +\def\Yomitfromtockeyword{Yomitfromtoc} +\def\Yappendixkeyword{Yappendix} +% +\def\chapmacro#1#2#3{% + % Insert the first mark before the heading break (see notes for \domark). + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% + \gdef\thissection{}}% + % + \def\temptype{#2}% + \ifx\temptype\Ynothingkeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{\thischaptername}}% + \else\ifx\temptype\Yomitfromtockeyword + \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% + \gdef\thischapter{}}% + \else\ifx\temptype\Yappendixkeyword + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\appendixletter}% + % \noexpand\putwordAppendix avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} + \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \else + \toks0={#1}% + \xdef\lastchapterdefs{% + \gdef\noexpand\thischaptername{\the\toks0}% + \gdef\noexpand\thischapternum{\the\chapno}% + % \noexpand\putwordChapter avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordChapter{} + \noexpand\thischapternum: + \noexpand\thischaptername}% + }% + \fi\fi\fi + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert the chapter heading break. + \pchapsepmacro + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevchapterdefs=\lastchapterdefs + \let\prevsectiondefs=\lastsectiondefs + \domark + % + {% + \chapfonts \rmisbold + % + % Have to define \lastsection before calling \donoderef, because the + % xref code eventually uses it. On the other hand, it has to be called + % after \pchapsepmacro, or the headline will change too soon. + \gdef\lastsection{#1}% + % + % Only insert the separating space if we have a chapter/appendix + % number, and don't print the unnumbered ``number''. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unnchap}% + \else\ifx\temptype\Yomitfromtockeyword + \setbox0 = \hbox{}% contents like unnumbered, but no toc entry + \def\toctype{omit}% + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% + \def\toctype{app}% + \else + \setbox0 = \hbox{#3\enspace}% + \def\toctype{numchap}% + \fi\fi\fi + % + % Write the toc entry for this chapter. Must come before the + % \donoderef, because we include the current node name in the toc + % entry, and \donoderef resets it to empty. + \writetocentry{\toctype}{#1}{#3}% + % + % For pdftex, we have to write out the node definition (aka, make + % the pdfdest) after any page break, but before the actual text has + % been typeset. If the destination for the pdf outline is after the + % text, then jumping from the outline may wind up with the text not + % being visible, for instance under high magnification. + \donoderef{#2}% + % + % Typeset the actual heading. + \nobreak % Avoid page breaks at the interline glue. + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright + \hangindent=\wd0 \centerparametersmaybe + \unhbox0 #1\par}% + }% + \nobreak\bigskip % no page break after a chapter title + \nobreak +} + +% @centerchap -- centered and unnumbered. +\let\centerparametersmaybe = \relax +\def\centerparameters{% + \advance\rightskip by 3\rightskip + \leftskip = \rightskip + \parfillskip = 0pt +} + + +% I don't think this chapter style is supported any more, so I'm not +% updating it with the new noderef stuff. We'll see. --karl, 11aug03. +% +\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} +% +\def\unnchfopen #1{% +\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt\ptexraggedright + \rmisbold #1\hfill}}\bigskip \par\nobreak +} +\def\chfopen #1#2{\chapoddpage {\chapfonts +\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% +\par\penalty 5000 % +} +\def\centerchfopen #1{% +\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt + \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak +} +\def\CHAPFopen{% + \global\let\chapmacro=\chfopen + \global\let\centerchapmacro=\centerchfopen} + + +% Section titles. These macros combine the section number parts and +% call the generic \sectionheading to do the printing. +% +\newskip\secheadingskip +\def\secheadingbreak{\dobreak \secheadingskip{-1000}} + +% Subsection titles. +\newskip\subsecheadingskip +\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} + +% Subsubsection titles. +\def\subsubsecheadingskip{\subsecheadingskip} +\def\subsubsecheadingbreak{\subsecheadingbreak} + + +% Print any size, any type, section title. +% +% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is +% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the +% section number. +% +\def\seckeyword{sec} +% +\def\sectionheading#1#2#3#4{% + {% + \checkenv{}% should not be in an environment. + % + % Switch to the right set of fonts. + \csname #2fonts\endcsname \rmisbold + % + \def\sectionlevel{#2}% + \def\temptype{#3}% + % + % Insert first mark before the heading break (see notes for \domark). + \let\prevsectiondefs=\lastsectiondefs + \ifx\temptype\Ynothingkeyword + \ifx\sectionlevel\seckeyword + \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% + \gdef\thissection{\thissectionname}}% + \fi + \else\ifx\temptype\Yomitfromtockeyword + % Don't redefine \thissection. + \else\ifx\temptype\Yappendixkeyword + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \else + \ifx\sectionlevel\seckeyword + \toks0={#1}% + \xdef\lastsectiondefs{% + \gdef\noexpand\thissectionname{\the\toks0}% + \gdef\noexpand\thissectionnum{#4}% + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: + \noexpand\thissectionname}% + }% + \fi + \fi\fi\fi + % + % Go into vertical mode. Usually we'll already be there, but we + % don't want the following whatsit to end up in a preceding paragraph + % if the document didn't happen to have a blank line. + \par + % + % Output the mark. Pass it through \safewhatsit, to take care of + % the preceding space. + \safewhatsit\domark + % + % Insert space above the heading. + \csname #2headingbreak\endcsname + % + % Now the second mark, after the heading break. No break points + % between here and the heading. + \let\prevsectiondefs=\lastsectiondefs + \domark + % + % Only insert the space after the number if we have a section number. + \ifx\temptype\Ynothingkeyword + \setbox0 = \hbox{}% + \def\toctype{unn}% + \gdef\lastsection{#1}% + \else\ifx\temptype\Yomitfromtockeyword + % for @headings -- no section number, don't include in toc, + % and don't redefine \lastsection. + \setbox0 = \hbox{}% + \def\toctype{omit}% + \let\sectionlevel=\empty + \else\ifx\temptype\Yappendixkeyword + \setbox0 = \hbox{#4\enspace}% + \def\toctype{app}% + \gdef\lastsection{#1}% + \else + \setbox0 = \hbox{#4\enspace}% + \def\toctype{num}% + \gdef\lastsection{#1}% + \fi\fi\fi + % + % Write the toc entry (before \donoderef). See comments in \chapmacro. + \writetocentry{\toctype\sectionlevel}{#1}{#4}% + % + % Write the node reference (= pdf destination for pdftex). + % Again, see comments in \chapmacro. + \donoderef{#3}% + % + % Interline glue will be inserted when the vbox is completed. + % That glue will be a valid breakpoint for the page, since it'll be + % preceded by a whatsit (usually from the \donoderef, or from the + % \writetocentry if there was no node). We don't want to allow that + % break, since then the whatsits could end up on page n while the + % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. + \nobreak + % + % Output the actual section heading. + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright + \hangindent=\wd0 % zero if no section number + \unhbox0 #1}% + }% + % Add extra space after the heading -- half of whatever came above it. + % Don't allow stretch, though. + \kern .5 \csname #2headingskip\endcsname + % + % Do not let the kern be a potential breakpoint, as it would be if it + % was followed by glue. + \nobreak + % + % We'll almost certainly start a paragraph next, so don't let that + % glue accumulate. (Not a breakpoint because it's preceded by a + % discardable item.) However, when a paragraph is not started next + % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out + % or the negative glue will cause weirdly wrong output, typically + % obscuring the section heading with something else. + \vskip-\parskip + % + % This is so the last item on the main vertical list is a known + % \penalty > 10000, so \startdefun, etc., can recognize the situation + % and do the needful. + \penalty 10001 +} + + +\message{toc,} +% Table of contents. +\newwrite\tocfile + +% Write an entry to the toc file, opening it if necessary. +% Called from @chapter, etc. +% +% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} +% We append the current node name (if any) and page number as additional +% arguments for the \{chap,sec,...}entry macros which will eventually +% read this. The node name is used in the pdf outlines as the +% destination to jump to. +% +% We open the .toc file for writing here instead of at @setfilename (or +% any other fixed time) so that @contents can be anywhere in the document. +% But if #1 is `omit', then we don't do anything. This is used for the +% table of contents chapter openings themselves. +% +\newif\iftocfileopened +\def\omitkeyword{omit}% +% +\def\writetocentry#1#2#3{% + \edef\writetoctype{#1}% + \ifx\writetoctype\omitkeyword \else + \iftocfileopened\else + \immediate\openout\tocfile = \jobname.toc + \global\tocfileopenedtrue + \fi + % + \iflinks + {\atdummies + \edef\temp{% + \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% + \temp + }% + \fi + \fi + % + % Tell \shipout to create a pdf destination on each page, if we're + % writing pdf. These are used in the table of contents. We can't + % just write one on every page because the title pages are numbered + % 1 and 2 (the page numbers aren't printed), and so are the first + % two pages of the document. Thus, we'd have two destinations named + % `1', and two named `2'. + \ifpdf \global\pdfmakepagedesttrue \fi +} + + +% These characters do not print properly in the Computer Modern roman +% fonts, so we must take special care. This is more or less redundant +% with the Texinfo input format setup at the end of this file. +% +\def\activecatcodes{% + \catcode`\"=\active + \catcode`\$=\active + \catcode`\<=\active + \catcode`\>=\active + \catcode`\\=\active + \catcode`\^=\active + \catcode`\_=\active + \catcode`\|=\active + \catcode`\~=\active +} + + +% Read the toc file, which is essentially Texinfo input. +\def\readtocfile{% + \setupdatafile + \activecatcodes + \input \tocreadfilename +} + +\newskip\contentsrightmargin \contentsrightmargin=1in +\newcount\savepageno +\newcount\lastnegativepageno \lastnegativepageno = -1 + +% Prepare to read what we've written to \tocfile. +% +\def\startcontents#1{% + % If @setchapternewpage on, and @headings double, the contents should + % start on an odd page, unlike chapters. Thus, we maintain + % \contentsalignmacro in parallel with \pagealignmacro. + % From: Torbjorn Granlund <tege@matematik.su.se> + \contentsalignmacro + \immediate\closeout\tocfile + % + % Don't need to put `Contents' or `Short Contents' in the headline. + % It is abundantly clear what they are. + \chapmacro{#1}{Yomitfromtoc}{}% + % + \savepageno = \pageno + \begingroup % Set up to handle contents files properly. + \raggedbottom % Worry more about breakpoints than the bottom. + \advance\hsize by -\contentsrightmargin % Don't use the full line length. + % + % Roman numerals for page numbers. + \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi +} + +% redefined for the two-volume lispref. We always output on +% \jobname.toc even if this is redefined. +% +\def\tocreadfilename{\jobname.toc} + +% Normal (long) toc. +% +\def\contents{% + \startcontents{\putwordTOC}% + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \ifeof 1 \else + \pdfmakeoutlines + \fi + \closein 1 + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} + +% And just the chapters. +\def\summarycontents{% + \startcontents{\putwordShortTOC}% + % + \let\partentry = \shortpartentry + \let\numchapentry = \shortchapentry + \let\appentry = \shortchapentry + \let\unnchapentry = \shortunnchapentry + % We want a true roman here for the page numbers. + \secfonts + \let\rm=\shortcontrm \let\bf=\shortcontbf + \let\sl=\shortcontsl \let\tt=\shortconttt + \rm + \hyphenpenalty = 10000 + \advance\baselineskip by 1pt % Open it up a little. + \def\numsecentry##1##2##3##4{} + \let\appsecentry = \numsecentry + \let\unnsecentry = \numsecentry + \let\numsubsecentry = \numsecentry + \let\appsubsecentry = \numsecentry + \let\unnsubsecentry = \numsecentry + \let\numsubsubsecentry = \numsecentry + \let\appsubsubsecentry = \numsecentry + \let\unnsubsubsecentry = \numsecentry + \openin 1 \tocreadfilename\space + \ifeof 1 \else + \readtocfile + \fi + \closein 1 + \vfill \eject + \contentsalignmacro % in case @setchapternewpage odd is in effect + \endgroup + \lastnegativepageno = \pageno + \global\pageno = \savepageno +} +\let\shortcontents = \summarycontents + +% Typeset the label for a chapter or appendix for the short contents. +% The arg is, e.g., `A' for an appendix, or `3' for a chapter. +% +\def\shortchaplabel#1{% + % This space should be enough, since a single number is .5em, and the + % widest letter (M) is 1em, at least in the Computer Modern fonts. + % But use \hss just in case. + % (This space doesn't include the extra space that gets added after + % the label; that gets put in by \shortchapentry above.) + % + % We'd like to right-justify chapter numbers, but that looks strange + % with appendix letters. And right-justifying numbers and + % left-justifying letters looks strange when there is less than 10 + % chapters. Have to read the whole toc once to know how many chapters + % there are before deciding ... + \hbox to 1em{#1\hss}% +} + +% These macros generate individual entries in the table of contents. +% The first argument is the chapter or section name. +% The last argument is the page number. +% The arguments in between are the chapter number, section number, ... + +% Parts, in the main contents. Replace the part number, which doesn't +% exist, with an empty box. Let's hope all the numbers have the same width. +% Also ignore the page number, which is conventionally not printed. +\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} +\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} +% +% Parts, in the short toc. +\def\shortpartentry#1#2#3#4{% + \penalty-300 + \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip + \shortchapentry{{\bf #1}}{\numeralbox}{}{}% +} + +% Chapters, in the main contents. +\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} +% +% Chapters, in the short toc. +% See comments in \dochapentry re vbox and related settings. +\def\shortchapentry#1#2#3#4{% + \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% +} + +% Appendices, in the main contents. +% Need the word Appendix, and a fixed-size box. +% +\def\appendixbox#1{% + % We use M since it's probably the widest letter. + \setbox0 = \hbox{\putwordAppendix{} M}% + \hbox to \wd0{\putwordAppendix{} #1\hss}} +% +\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} + +% Unnumbered chapters. +\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} +\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} + +% Sections. +\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} +\let\appsecentry=\numsecentry +\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} + +% Subsections. +\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} +\let\appsubsecentry=\numsubsecentry +\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} + +% And subsubsections. +\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} +\let\appsubsubsecentry=\numsubsubsecentry +\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} + +% This parameter controls the indentation of the various levels. +% Same as \defaultparindent. +\newdimen\tocindent \tocindent = 15pt + +% Now for the actual typesetting. In all these, #1 is the text and #2 is the +% page number. +% +% If the toc has to be broken over pages, we want it to be at chapters +% if at all possible; hence the \penalty. +\def\dochapentry#1#2{% + \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip + \begingroup + \chapentryfonts + \tocentry{#1}{\dopageno\bgroup#2\egroup}% + \endgroup + \nobreak\vskip .25\baselineskip plus.1\baselineskip +} + +\def\dosecentry#1#2{\begingroup + \secentryfonts \leftskip=\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsecentry#1#2{\begingroup + \subsecentryfonts \leftskip=2\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +\def\dosubsubsecentry#1#2{\begingroup + \subsubsecentryfonts \leftskip=3\tocindent + \tocentry{#1}{\dopageno\bgroup#2\egroup}% +\endgroup} + +% We use the same \entry macro as for the index entries. +\let\tocentry = \entry + +% Space between chapter (or whatever) number and the title. +\def\labelspace{\hskip1em \relax} + +\def\dopageno#1{{\rm #1}} +\def\doshortpageno#1{{\rm #1}} + +\def\chapentryfonts{\secfonts \rm} +\def\secentryfonts{\textfonts} +\def\subsecentryfonts{\textfonts} +\def\subsubsecentryfonts{\textfonts} + + +\message{environments,} +% @foo ... @end foo. + +% @tex ... @end tex escapes into raw TeX temporarily. +% One exception: @ is still an escape character, so that @end tex works. +% But \@ or @@ will get a plain @ character. + +\envdef\tex{% + \setupmarkupstyle{tex}% + \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 + \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 + \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie + \catcode `\%=14 + \catcode `\+=\other + \catcode `\"=\other + \catcode `\|=\other + \catcode `\<=\other + \catcode `\>=\other + \catcode`\`=\other + \catcode`\'=\other + \escapechar=`\\ + % + % ' is active in math mode (mathcode"8000). So reset it, and all our + % other math active characters (just in case), to plain's definitions. + \mathactive + % + \let\b=\ptexb + \let\bullet=\ptexbullet + \let\c=\ptexc + \let\,=\ptexcomma + \let\.=\ptexdot + \let\dots=\ptexdots + \let\equiv=\ptexequiv + \let\!=\ptexexclam + \let\i=\ptexi + \let\indent=\ptexindent + \let\noindent=\ptexnoindent + \let\{=\ptexlbrace + \let\+=\tabalign + \let\}=\ptexrbrace + \let\/=\ptexslash + \let\*=\ptexstar + \let\t=\ptext + \expandafter \let\csname top\endcsname=\ptextop % outer + \let\frenchspacing=\plainfrenchspacing + % + \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% + \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% + \def\@{@}% +} +% There is no need to define \Etex. + +% Define @lisp ... @end lisp. +% @lisp environment forms a group so it can rebind things, +% including the definition of @end lisp (which normally is erroneous). + +% Amount to narrow the margins by for @lisp. +\newskip\lispnarrowing \lispnarrowing=0.4in + +% This is the definition that ^^M gets inside @lisp, @example, and other +% such environments. \null is better than a space, since it doesn't +% have any width. +\def\lisppar{\null\endgraf} + +% This space is always present above and below environments. +\newskip\envskipamount \envskipamount = 0pt + +% Make spacing and below environment symmetrical. We use \parskip here +% to help in doing that, since in @example-like environments \parskip +% is reset to zero; thus the \afterenvbreak inserts no space -- but the +% start of the next paragraph will insert \parskip. +% +\def\aboveenvbreak{{% + % =10000 instead of <10000 because of a special case in \itemzzz and + % \sectionheading, q.v. + \ifnum \lastpenalty=10000 \else + \advance\envskipamount by \parskip + \endgraf + \ifdim\lastskip<\envskipamount + \removelastskip + % it's not a good place to break if the last penalty was \nobreak + % or better ... + \ifnum\lastpenalty<10000 \penalty-50 \fi + \vskip\envskipamount + \fi + \fi +}} + +\let\afterenvbreak = \aboveenvbreak + +% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will +% also clear it, so that its embedded environments do the narrowing again. +\let\nonarrowing=\relax + +% @cartouche ... @end cartouche: draw rectangle w/rounded corners around +% environment contents. +\font\circle=lcircle10 +\newdimen\circthick +\newdimen\cartouter\newdimen\cartinner +\newskip\normbskip\newskip\normpskip\newskip\normlskip +\circthick=\fontdimen8\circle +% +\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth +\def\ctr{{\hskip 6pt\circle\char'010}} +\def\cbl{{\circle\char'012\hskip -6pt}} +\def\cbr{{\hskip 6pt\circle\char'011}} +\def\carttop{\hbox to \cartouter{\hskip\lskip + \ctl\leaders\hrule height\circthick\hfil\ctr + \hskip\rskip}} +\def\cartbot{\hbox to \cartouter{\hskip\lskip + \cbl\leaders\hrule height\circthick\hfil\cbr + \hskip\rskip}} +% +\newskip\lskip\newskip\rskip + +\envdef\cartouche{% + \ifhmode\par\fi % can't be in the midst of a paragraph. + \startsavinginserts + \lskip=\leftskip \rskip=\rightskip + \leftskip=0pt\rightskip=0pt % we want these *outside*. + \cartinner=\hsize \advance\cartinner by-\lskip + \advance\cartinner by-\rskip + \cartouter=\hsize + \advance\cartouter by 18.4pt % allow for 3pt kerns on either + % side, and for 6pt waste from + % each corner char, and rule thickness + \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip + % Flag to tell @lisp, etc., not to narrow margin. + \let\nonarrowing = t% + % + % If this cartouche directly follows a sectioning command, we need the + % \parskip glue (backspaced over by default) or the cartouche can + % collide with the section heading. + \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi + % + \vbox\bgroup + \baselineskip=0pt\parskip=0pt\lineskip=0pt + \carttop + \hbox\bgroup + \hskip\lskip + \vrule\kern3pt + \vbox\bgroup + \kern3pt + \hsize=\cartinner + \baselineskip=\normbskip + \lineskip=\normlskip + \parskip=\normpskip + \vskip -\parskip + \comment % For explanation, see the end of def\group. +} +\def\Ecartouche{% + \ifhmode\par\fi + \kern3pt + \egroup + \kern3pt\vrule + \hskip\rskip + \egroup + \cartbot + \egroup + \checkinserts +} + + +% This macro is called at the beginning of all the @example variants, +% inside a group. +\newdimen\nonfillparindent +\def\nonfillstart{% + \aboveenvbreak + \hfuzz = 12pt % Don't be fussy + \sepspaces % Make spaces be word-separators rather than space tokens. + \let\par = \lisppar % don't ignore blank lines + \obeylines % each line of input is a line of output + \parskip = 0pt + % Turn off paragraph indentation but redefine \indent to emulate + % the normal \indent. + \nonfillparindent=\parindent + \parindent = 0pt + \let\indent\nonfillindent + % + \emergencystretch = 0pt % don't try to avoid overfull boxes + \ifx\nonarrowing\relax + \advance \leftskip by \lispnarrowing + \exdentamount=\lispnarrowing + \else + \let\nonarrowing = \relax + \fi + \let\exdent=\nofillexdent +} + +\begingroup +\obeyspaces +% We want to swallow spaces (but not other tokens) after the fake +% @indent in our nonfill-environments, where spaces are normally +% active and set to @tie, resulting in them not being ignored after +% @indent. +\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% +\gdef\nonfillindentcheck{% +\ifx\temp % +\expandafter\nonfillindentgobble% +\else% +\leavevmode\nonfillindentbox% +\fi% +}% +\endgroup +\def\nonfillindentgobble#1{\nonfillindent} +\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} + +% If you want all examples etc. small: @set dispenvsize small. +% If you want even small examples the full size: @set dispenvsize nosmall. +% This affects the following displayed environments: +% @example, @display, @format, @lisp +% +\def\smallword{small} +\def\nosmallword{nosmall} +\let\SETdispenvsize\relax +\def\setnormaldispenv{% + \ifx\SETdispenvsize\smallword + % end paragraph for sake of leading, in case document has no blank + % line. This is redundant with what happens in \aboveenvbreak, but + % we need to do it before changing the fonts, and it's inconvenient + % to change the fonts afterward. + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} +\def\setsmalldispenv{% + \ifx\SETdispenvsize\nosmallword + \else + \ifnum \lastpenalty=10000 \else \endgraf \fi + \smallexamplefonts \rm + \fi +} + +% We often define two environments, @foo and @smallfoo. +% Let's do it in one command. #1 is the env name, #2 the definition. +\def\makedispenvdef#1#2{% + \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% + \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% + \expandafter\let\csname E#1\endcsname \afterenvbreak + \expandafter\let\csname Esmall#1\endcsname \afterenvbreak +} + +% Define two environment synonyms (#1 and #2) for an environment. +\def\maketwodispenvdef#1#2#3{% + \makedispenvdef{#1}{#3}% + \makedispenvdef{#2}{#3}% +} +% +% @lisp: indented, narrowed, typewriter font; +% @example: same as @lisp. +% +% @smallexample and @smalllisp: use smaller fonts. +% Originally contributed by Pavel@xerox. +% +\maketwodispenvdef{lisp}{example}{% + \nonfillstart + \tt\setupmarkupstyle{example}% + \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. + \gobble % eat return +} +% @display/@smalldisplay: same as @lisp except keep current font. +% +\makedispenvdef{display}{% + \nonfillstart + \gobble +} + +% @format/@smallformat: same as @display except don't narrow margins. +% +\makedispenvdef{format}{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} + +% @flushleft: same as @format, but doesn't obey \SETdispenvsize. +\envdef\flushleft{% + \let\nonarrowing = t% + \nonfillstart + \gobble +} +\let\Eflushleft = \afterenvbreak + +% @flushright. +% +\envdef\flushright{% + \let\nonarrowing = t% + \nonfillstart + \advance\leftskip by 0pt plus 1fill\relax + \gobble +} +\let\Eflushright = \afterenvbreak + + +% @raggedright does more-or-less normal line breaking but no right +% justification. From plain.tex. +\envdef\raggedright{% + \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax +} +\let\Eraggedright\par + +\envdef\raggedleft{% + \parindent=0pt \leftskip0pt plus2em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedleft\par + +\envdef\raggedcenter{% + \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedcenter\par + + +% @quotation does normal linebreaking (hence we can't use \nonfillstart) +% and narrows the margins. We keep \parskip nonzero in general, since +% we're doing normal filling. So, when using \aboveenvbreak and +% \afterenvbreak, temporarily make \parskip 0. +% +\makedispenvdef{quotation}{\quotationstart} +% +\def\quotationstart{% + {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip + \parindent=0pt + % + % @cartouche defines \nonarrowing to inhibit narrowing at next level down. + \ifx\nonarrowing\relax + \advance\leftskip by \lispnarrowing + \advance\rightskip by \lispnarrowing + \exdentamount = \lispnarrowing + \else + \let\nonarrowing = \relax + \fi + \parsearg\quotationlabel +} + +% We have retained a nonzero parskip for the environment, since we're +% doing normal filling. +% +\def\Equotation{% + \par + \ifx\quotationauthor\thisisundefined\else + % indent a bit. + \leftline{\kern 2\leftskip \sl ---\quotationauthor}% + \fi + {\parskip=0pt \afterenvbreak}% +} +\def\Esmallquotation{\Equotation} + +% If we're given an argument, typeset it in bold with a colon after. +\def\quotationlabel#1{% + \def\temp{#1}% + \ifx\temp\empty \else + {\bf #1: }% + \fi +} + + +% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>} +% If we want to allow any <char> as delimiter, +% we need the curly braces so that makeinfo sees the @verb command, eg: +% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org +% +% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. +% +% [Knuth] p.344; only we need to do the other characters Texinfo sets +% active too. Otherwise, they get lost as the first character on a +% verbatim line. +\def\dospecials{% + \do\ \do\\\do\{\do\}\do\$\do\&% + \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% + \do\<\do\>\do\|\do\@\do+\do\"% + % Don't do the quotes -- if we do, @set txicodequoteundirected and + % @set txicodequotebacktick will not have effect on @verb and + % @verbatim, and ?` and !` ligatures won't get disabled. + %\do\`\do\'% +} +% +% [Knuth] p. 380 +\def\uncatcodespecials{% + \def\do##1{\catcode`##1=\other}\dospecials} +% +% Setup for the @verb command. +% +% Eight spaces for a tab +\begingroup + \catcode`\^^I=\active + \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} +\endgroup +% +\def\setupverb{% + \tt % easiest (and conventionally used) font for verbatim + \def\par{\leavevmode\endgraf}% + \setupmarkupstyle{verb}% + \tabeightspaces + % Respect line breaks, + % print special symbols as themselves, and + % make each space count + % must do in this order: + \obeylines \uncatcodespecials \sepspaces +} + +% Setup for the @verbatim environment +% +% Real tab expansion. +\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount +% +% We typeset each line of the verbatim in an \hbox, so we can handle +% tabs. The \global is in case the verbatim line starts with an accent, +% or some other command that starts with a begin-group. Otherwise, the +% entire \verbbox would disappear at the corresponding end-group, before +% it is typeset. Meanwhile, we can't have nested verbatim commands +% (can we?), so the \global won't be overwriting itself. +\newbox\verbbox +\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} +% +\begingroup + \catcode`\^^I=\active + \gdef\tabexpand{% + \catcode`\^^I=\active + \def^^I{\leavevmode\egroup + \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab + \divide\dimen\verbbox by\tabw + \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw + \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw + \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox + }% + } +\endgroup + +% start the verbatim environment. +\def\setupverbatim{% + \let\nonarrowing = t% + \nonfillstart + \tt % easiest (and conventionally used) font for verbatim + % The \leavevmode here is for blank lines. Otherwise, we would + % never \starttabox and the \egroup would end verbatim mode. + \def\par{\leavevmode\egroup\box\verbbox\endgraf}% + \tabexpand + \setupmarkupstyle{verbatim}% + % Respect line breaks, + % print special symbols as themselves, and + % make each space count. + % Must do in this order: + \obeylines \uncatcodespecials \sepspaces + \everypar{\starttabbox}% +} + +% Do the @verb magic: verbatim text is quoted by unique +% delimiter characters. Before first delimiter expect a +% right brace, after last delimiter expect closing brace: +% +% \def\doverb'{'<char>#1<char>'}'{#1} +% +% [Knuth] p. 382; only eat outer {} +\begingroup + \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other + \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] +\endgroup +% +\def\verb{\begingroup\setupverb\doverb} +% +% +% Do the @verbatim magic: define the macro \doverbatim so that +% the (first) argument ends when '@end verbatim' is reached, ie: +% +% \def\doverbatim#1@end verbatim{#1} +% +% For Texinfo it's a lot easier than for LaTeX, +% because texinfo's \verbatim doesn't stop at '\end{verbatim}': +% we need not redefine '\', '{' and '}'. +% +% Inspired by LaTeX's verbatim command set [latex.ltx] +% +\begingroup + \catcode`\ =\active + \obeylines % + % ignore everything up to the first ^^M, that's the newline at the end + % of the @verbatim input line itself. Otherwise we get an extra blank + % line in the output. + \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% + % We really want {...\end verbatim} in the body of the macro, but + % without the active space; thus we have to use \xdef and \gobble. +\endgroup +% +\envdef\verbatim{% + \setupverbatim\doverbatim +} +\let\Everbatim = \afterenvbreak + + +% @verbatiminclude FILE - insert text of file in verbatim environment. +% +\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} +% +\def\doverbatiminclude#1{% + {% + \makevalueexpandable + \setupverbatim + \indexnofonts % Allow `@@' and other weird things in file names. + \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% + \input #1 + \afterenvbreak + }% +} + +% @copying ... @end copying. +% Save the text away for @insertcopying later. +% +% We save the uninterpreted tokens, rather than creating a box. +% Saving the text in a box would be much easier, but then all the +% typesetting commands (@smallbook, font changes, etc.) have to be done +% beforehand -- and a) we want @copying to be done first in the source +% file; b) letting users define the frontmatter in as flexible order as +% possible is very desirable. +% +\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} +\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} +% +\def\insertcopying{% + \begingroup + \parindent = 0pt % paragraph indentation looks wrong on title page + \scanexp\copyingtext + \endgroup +} + + +\message{defuns,} +% @defun etc. + +\newskip\defbodyindent \defbodyindent=.4in +\newskip\defargsindent \defargsindent=50pt +\newskip\deflastargmargin \deflastargmargin=18pt +\newcount\defunpenalty + +% Start the processing of @deffn: +\def\startdefun{% + \ifnum\lastpenalty<10000 + \medbreak + \defunpenalty=10003 % Will keep this @deffn together with the + % following @def command, see below. + \else + % If there are two @def commands in a row, we'll have a \nobreak, + % which is there to keep the function description together with its + % header. But if there's nothing but headers, we need to allow a + % break somewhere. Check specifically for penalty 10002, inserted + % by \printdefunline, instead of 10000, since the sectioning + % commands also insert a nobreak penalty, and we don't want to allow + % a break between a section heading and a defun. + % + % As a further refinement, we avoid "club" headers by signalling + % with penalty of 10003 after the very first @deffn in the + % sequence (see above), and penalty of 10002 after any following + % @def command. + \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi + % + % Similarly, after a section heading, do not allow a break. + % But do insert the glue. + \medskip % preceded by discardable penalty, so not a breakpoint + \fi + % + \parindent=0in + \advance\leftskip by \defbodyindent + \exdentamount=\defbodyindent +} + +\def\dodefunx#1{% + % First, check whether we are in the right environment: + \checkenv#1% + % + % As above, allow line break if we have multiple x headers in a row. + % It's not a great place, though. + \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi + % + % And now, it's time to reuse the body of the original defun: + \expandafter\gobbledefun#1% +} +\def\gobbledefun#1\startdefun{} + +% \printdefunline \deffnheader{text} +% +\def\printdefunline#1#2{% + \begingroup + % call \deffnheader: + #1#2 \endheader + % common ending: + \interlinepenalty = 10000 + \advance\rightskip by 0pt plus 1fil\relax + \endgraf + \nobreak\vskip -\parskip + \penalty\defunpenalty % signal to \startdefun and \dodefunx + % Some of the @defun-type tags do not enable magic parentheses, + % rendering the following check redundant. But we don't optimize. + \checkparencounts + \endgroup +} + +\def\Edefun{\endgraf\medbreak} + +% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; +% the only thing remaining is to define \deffnheader. +% +\def\makedefun#1{% + \expandafter\let\csname E#1\endcsname = \Edefun + \edef\temp{\noexpand\domakedefun + \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% + \temp +} + +% \domakedefun \deffn \deffnx \deffnheader +% +% Define \deffn and \deffnx, without parameters. +% \deffnheader has to be defined explicitly. +% +\def\domakedefun#1#2#3{% + \envdef#1{% + \startdefun + \doingtypefnfalse % distinguish typed functions from all else + \parseargusing\activeparens{\printdefunline#3}% + }% + \def#2{\dodefunx#1}% + \def#3% +} + +\newif\ifdoingtypefn % doing typed function? +\newif\ifrettypeownline % typeset return type on its own line? + +% @deftypefnnewline on|off says whether the return type of typed functions +% are printed on their own line. This affects @deftypefn, @deftypefun, +% @deftypeop, and @deftypemethod. +% +\parseargdef\deftypefnnewline{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETtxideftypefnnl\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @txideftypefnnl value `\temp', + must be on|off}% + \fi\fi +} + +% Untyped functions: + +% @deffn category name args +\makedefun{deffn}{\deffngeneral{}} + +% @deffn category class name args +\makedefun{defop}#1 {\defopon{#1\ \putwordon}} + +% \defopon {category on}class name args +\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deffngeneral {subind}category name args +% +\def\deffngeneral#1#2 #3 #4\endheader{% + % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. + \dosubind{fn}{\code{#3}}{#1}% + \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% +} + +% Typed functions: + +% @deftypefn category type name args +\makedefun{deftypefn}{\deftypefngeneral{}} + +% @deftypeop category class type name args +\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} + +% \deftypeopon {category on}class type name args +\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } + +% \deftypefngeneral {subind}category type name args +% +\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% + \dosubind{fn}{\code{#4}}{#1}% + \doingtypefntrue + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +% Typed variables: + +% @deftypevr category type var args +\makedefun{deftypevr}{\deftypecvgeneral{}} + +% @deftypecv category class type var args +\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} + +% \deftypecvof {category of}class type var args +\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } + +% \deftypecvgeneral {subind}category type var args +% +\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% + \dosubind{vr}{\code{#4}}{#1}% + \defname{#2}{#3}{#4}\defunargs{#5\unskip}% +} + +% Untyped variables: + +% @defvr category var args +\makedefun{defvr}#1 {\deftypevrheader{#1} {} } + +% @defcv category class var args +\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} + +% \defcvof {category of}class var args +\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } + +% Types: + +% @deftp category name args +\makedefun{deftp}#1 #2 #3\endheader{% + \doind{tp}{\code{#2}}% + \defname{#1}{}{#2}\defunargs{#3\unskip}% +} + +% Remaining @defun-like shortcuts: +\makedefun{defun}{\deffnheader{\putwordDeffunc} } +\makedefun{defmac}{\deffnheader{\putwordDefmac} } +\makedefun{defspec}{\deffnheader{\putwordDefspec} } +\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } +\makedefun{defvar}{\defvrheader{\putwordDefvar} } +\makedefun{defopt}{\defvrheader{\putwordDefopt} } +\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } +\makedefun{defmethod}{\defopon\putwordMethodon} +\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} +\makedefun{defivar}{\defcvof\putwordInstanceVariableof} +\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} + +% \defname, which formats the name of the @def (not the args). +% #1 is the category, such as "Function". +% #2 is the return type, if any. +% #3 is the function name. +% +% We are followed by (but not passed) the arguments, if any. +% +\def\defname#1#2#3{% + \par + % Get the values of \leftskip and \rightskip as they were outside the @def... + \advance\leftskip by -\defbodyindent + % + % Determine if we are typesetting the return type of a typed function + % on a line by itself. + \rettypeownlinefalse + \ifdoingtypefn % doing a typed function specifically? + % then check user option for putting return type on its own line: + \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else + \rettypeownlinetrue + \fi + \fi + % + % How we'll format the category name. Putting it in brackets helps + % distinguish it from the body text that may end up on the next line + % just below it. + \def\temp{#1}% + \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} + % + % Figure out line sizes for the paragraph shape. We'll always have at + % least two. + \tempnum = 2 + % + % The first line needs space for \box0; but if \rightskip is nonzero, + % we need only space for the part of \box0 which exceeds it: + \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip + % + % If doing a return type on its own line, we'll have another line. + \ifrettypeownline + \advance\tempnum by 1 + \def\maybeshapeline{0in \hsize}% + \else + \def\maybeshapeline{}% + \fi + % + % The continuations: + \dimen2=\hsize \advance\dimen2 by -\defargsindent + % + % The final paragraph shape: + \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 + % + % Put the category name at the right margin. + \noindent + \hbox to 0pt{% + \hfil\box0 \kern-\hsize + % \hsize has to be shortened this way: + \kern\leftskip + % Intentionally do not respect \rightskip, since we need the space. + }% + % + % Allow all lines to be underfull without complaint: + \tolerance=10000 \hbadness=10000 + \exdentamount=\defbodyindent + {% + % defun fonts. We use typewriter by default (used to be bold) because: + % . we're printing identifiers, they should be in tt in principle. + % . in languages with many accents, such as Czech or French, it's + % common to leave accents off identifiers. The result looks ok in + % tt, but exceedingly strange in rm. + % . we don't want -- and --- to be treated as ligatures. + % . this still does not fix the ?` and !` ligatures, but so far no + % one has made identifiers using them :). + \df \tt + \def\temp{#2}% text of the return type + \ifx\temp\empty\else + \tclose{\temp}% typeset the return type + \ifrettypeownline + % put return type on its own line; prohibit line break following: + \hfil\vadjust{\nobreak}\break + \else + \space % type on same line, so just followed by a space + \fi + \fi % no return type + #3% output function name + }% + {\rm\enskip}% hskip 0.5 em of \tenrm + % + \boldbrax + % arguments will be output next, if any. +} + +% Print arguments in slanted roman (not ttsl), inconsistently with using +% tt for the name. This is because literal text is sometimes needed in +% the argument list (groff manual), and ttsl and tt are not very +% distinguishable. Prevent hyphenation at `-' chars. +% +\def\defunargs#1{% + % use sl by default (not ttsl), + % tt for the names. + \df \sl \hyphenchar\font=0 + % + % On the other hand, if an argument has two dashes (for instance), we + % want a way to get ttsl. Let's try @var for that. + \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% + #1% + \sl\hyphenchar\font=45 +} + +% We want ()&[] to print specially on the defun line. +% +\def\activeparens{% + \catcode`\(=\active \catcode`\)=\active + \catcode`\[=\active \catcode`\]=\active + \catcode`\&=\active +} + +% Make control sequences which act like normal parenthesis chars. +\let\lparen = ( \let\rparen = ) + +% Be sure that we always have a definition for `(', etc. For example, +% if the fn name has parens in it, \boldbrax will not be in effect yet, +% so TeX would otherwise complain about undefined control sequence. +{ + \activeparens + \global\let(=\lparen \global\let)=\rparen + \global\let[=\lbrack \global\let]=\rbrack + \global\let& = \& + + \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} + \gdef\magicamp{\let&=\amprm} +} + +\newcount\parencount + +% If we encounter &foo, then turn on ()-hacking afterwards +\newif\ifampseen +\def\amprm#1 {\ampseentrue{\bf\ }} + +\def\parenfont{% + \ifampseen + % At the first level, print parens in roman, + % otherwise use the default font. + \ifnum \parencount=1 \rm \fi + \else + % The \sf parens (in \boldbrax) actually are a little bolder than + % the contained text. This is especially needed for [ and ] . + \sf + \fi +} +\def\infirstlevel#1{% + \ifampseen + \ifnum\parencount=1 + #1% + \fi + \fi +} +\def\bfafterword#1 {#1 \bf} + +\def\opnr{% + \global\advance\parencount by 1 + {\parenfont(}% + \infirstlevel \bfafterword +} +\def\clnr{% + {\parenfont)}% + \infirstlevel \sl + \global\advance\parencount by -1 +} + +\newcount\brackcount +\def\lbrb{% + \global\advance\brackcount by 1 + {\bf[}% +} +\def\rbrb{% + {\bf]}% + \global\advance\brackcount by -1 +} + +\def\checkparencounts{% + \ifnum\parencount=0 \else \badparencount \fi + \ifnum\brackcount=0 \else \badbrackcount \fi +} +% these should not use \errmessage; the glibc manual, at least, actually +% has such constructs (when documenting function pointers). +\def\badparencount{% + \message{Warning: unbalanced parentheses in @def...}% + \global\parencount=0 +} +\def\badbrackcount{% + \message{Warning: unbalanced square brackets in @def...}% + \global\brackcount=0 +} + + +\message{macros,} +% @macro. + +% To do this right we need a feature of e-TeX, \scantokens, +% which we arrange to emulate with a temporary file in ordinary TeX. +\ifx\eTeXversion\thisisundefined + \newwrite\macscribble + \def\scantokens#1{% + \toks0={#1}% + \immediate\openout\macscribble=\jobname.tmp + \immediate\write\macscribble{\the\toks0}% + \immediate\closeout\macscribble + \input \jobname.tmp + } +\fi + +\def\scanmacro#1{\begingroup + \newlinechar`\^^M + \let\xeatspaces\eatspaces + % + % Undo catcode changes of \startcontents and \doprintindex + % When called from @insertcopying or (short)caption, we need active + % backslash to get it printed correctly. Previously, we had + % \catcode`\\=\other instead. We'll see whether a problem appears + % with macro expansion. --kasal, 19aug04 + \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ + % + % ... and for \example: + \spaceisspace + % + % The \empty here causes a following catcode 5 newline to be eaten as + % part of reading whitespace after a control sequence. It does not + % eat a catcode 13 newline. There's no good way to handle the two + % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX + % would then have different behavior). See the Macro Details node in + % the manual for the workaround we recommend for macros and + % line-oriented commands. + % + \scantokens{#1\empty}% +\endgroup} + +\def\scanexp#1{% + \edef\temp{\noexpand\scanmacro{#1}}% + \temp +} + +\newcount\paramno % Count of parameters +\newtoks\macname % Macro name +\newif\ifrecursive % Is it recursive? + +% List of all defined macros in the form +% \definedummyword\macro1\definedummyword\macro2... +% Currently is also contains all @aliases; the list can be split +% if there is a need. +\def\macrolist{} + +% Add the macro to \macrolist +\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} +\def\addtomacrolistxxx#1{% + \toks0 = \expandafter{\macrolist\definedummyword#1}% + \xdef\macrolist{\the\toks0}% +} + +% Utility routines. +% This does \let #1 = #2, with \csnames; that is, +% \let \csname#1\endcsname = \csname#2\endcsname +% (except of course we have to play expansion games). +% +\def\cslet#1#2{% + \expandafter\let + \csname#1\expandafter\endcsname + \csname#2\endcsname +} + +% Trim leading and trailing spaces off a string. +% Concepts from aro-bend problem 15 (see CTAN). +{\catcode`\@=11 +\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} +\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} +\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} +\def\unbrace#1{#1} +\unbrace{\gdef\trim@@@ #1 } #2@{#1} +} + +% Trim a single trailing ^^M off a string. +{\catcode`\^^M=\other \catcode`\Q=3% +\gdef\eatcr #1{\eatcra #1Q^^MQ}% +\gdef\eatcra#1^^MQ{\eatcrb#1Q}% +\gdef\eatcrb#1Q#2Q{#1}% +} + +% Macro bodies are absorbed as an argument in a context where +% all characters are catcode 10, 11 or 12, except \ which is active +% (as in normal texinfo). It is necessary to change the definition of \ +% to recognize macro arguments; this is the job of \mbodybackslash. +% +% Non-ASCII encodings make 8-bit characters active, so un-activate +% them to avoid their expansion. Must do this non-globally, to +% confine the change to the current group. +% +% It's necessary to have hard CRs when the macro is executed. This is +% done by making ^^M (\endlinechar) catcode 12 when reading the macro +% body, and then making it the \newlinechar in \scanmacro. +% +\def\scanctxt{% used as subroutine + \catcode`\"=\other + \catcode`\+=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\@=\other + \catcode`\^=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\~=\other + \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi +} + +\def\scanargctxt{% used for copying and captions, not macros. + \scanctxt + \catcode`\\=\other + \catcode`\^^M=\other +} + +\def\macrobodyctxt{% used for @macro definitions + \scanctxt + \catcode`\{=\other + \catcode`\}=\other + \catcode`\^^M=\other + \usembodybackslash +} + +\def\macroargctxt{% used when scanning invocations + \scanctxt + \catcode`\\=0 +} +% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" +% for the single characters \ { }. Thus, we end up with the "commands" +% that would be written @\ @{ @} in a Texinfo document. +% +% We already have @{ and @}. For @\, we define it here, and only for +% this purpose, to produce a typewriter backslash (so, the @\ that we +% define for @math can't be used with @macro calls): +% +\def\\{\normalbackslash}% +% +% We would like to do this for \, too, since that is what makeinfo does. +% But it is not possible, because Texinfo already has a command @, for a +% cedilla accent. Documents must use @comma{} instead. +% +% \anythingelse will almost certainly be an error of some kind. + + +% \mbodybackslash is the definition of \ in @macro bodies. +% It maps \foo\ => \csname macarg.foo\endcsname => #N +% where N is the macro parameter number. +% We define \csname macarg.\endcsname to be \realbackslash, so +% \\ in macro replacement text gets you a backslash. +% +{\catcode`@=0 @catcode`@\=@active + @gdef@usembodybackslash{@let\=@mbodybackslash} + @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} +} +\expandafter\def\csname macarg.\endcsname{\realbackslash} + +\def\margbackslash#1{\char`\#1 } + +\def\macro{\recursivefalse\parsearg\macroxxx} +\def\rmacro{\recursivetrue\parsearg\macroxxx} + +\def\macroxxx#1{% + \getargs{#1}% now \macname is the macname and \argl the arglist + \ifx\argl\empty % no arguments + \paramno=0\relax + \else + \expandafter\parsemargdef \argl;% + \if\paramno>256\relax + \ifx\eTeXversion\thisisundefined + \errhelp = \EMsimple + \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} + \fi + \fi + \fi + \if1\csname ismacro.\the\macname\endcsname + \message{Warning: redefining \the\macname}% + \else + \expandafter\ifx\csname \the\macname\endcsname \relax + \else \errmessage{Macro name \the\macname\space already defined}\fi + \global\cslet{macsave.\the\macname}{\the\macname}% + \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% + \addtomacrolist{\the\macname}% + \fi + \begingroup \macrobodyctxt + \ifrecursive \expandafter\parsermacbody + \else \expandafter\parsemacbody + \fi} + +\parseargdef\unmacro{% + \if1\csname ismacro.#1\endcsname + \global\cslet{#1}{macsave.#1}% + \global\expandafter\let \csname ismacro.#1\endcsname=0% + % Remove the macro name from \macrolist: + \begingroup + \expandafter\let\csname#1\endcsname \relax + \let\definedummyword\unmacrodo + \xdef\macrolist{\macrolist}% + \endgroup + \else + \errmessage{Macro #1 not defined}% + \fi +} + +% Called by \do from \dounmacro on each macro. The idea is to omit any +% macro definitions that have been changed to \relax. +% +\def\unmacrodo#1{% + \ifx #1\relax + % remove this + \else + \noexpand\definedummyword \noexpand#1% + \fi +} + +% This makes use of the obscure feature that if the last token of a +% <parameter list> is #, then the preceding argument is delimited by +% an opening brace, and that opening brace is not consumed. +\def\getargs#1{\getargsxxx#1{}} +\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} +\def\getmacname#1 #2\relax{\macname={#1}} +\def\getmacargs#1{\def\argl{#1}} + +% For macro processing make @ a letter so that we can make Texinfo private macro names. +\edef\texiatcatcode{\the\catcode`\@} +\catcode `@=11\relax + +% Parse the optional {params} list. Set up \paramno and \paramlist +% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH +% in the params list to some hook where the argument si to be expanded. If +% there are less than 10 arguments that hook is to be replaced by ##N where N +% is the position in that list, that is to say the macro arguments are to be +% defined `a la TeX in the macro body. +% +% That gets used by \mbodybackslash (above). +% +% We need to get `macro parameter char #' into several definitions. +% The technique used is stolen from LaTeX: let \hash be something +% unexpandable, insert that wherever you need a #, and then redefine +% it to # just before using the token list produced. +% +% The same technique is used to protect \eatspaces till just before +% the macro is used. +% +% If there are 10 or more arguments, a different technique is used, where the +% hook remains in the body, and when macro is to be expanded the body is +% processed again to replace the arguments. +% +% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the +% argument N value and then \edef the body (nothing else will expand because of +% the catcode regime underwhich the body was input). +% +% If you compile with TeX (not eTeX), and you have macros with 10 or more +% arguments, you need that no macro has more than 256 arguments, otherwise an +% error is produced. +\def\parsemargdef#1;{% + \paramno=0\def\paramlist{}% + \let\hash\relax + \let\xeatspaces\relax + \parsemargdefxxx#1,;,% + % In case that there are 10 or more arguments we parse again the arguments + % list to set new definitions for the \macarg.BLAH macros corresponding to + % each BLAH argument. It was anyhow needed to parse already once this list + % in order to count the arguments, and as macros with at most 9 arguments + % are by far more frequent than macro with 10 or more arguments, defining + % twice the \macarg.BLAH macros does not cost too much processing power. + \ifnum\paramno<10\relax\else + \paramno0\relax + \parsemmanyargdef@@#1,;,% 10 or more arguments + \fi +} +\def\parsemargdefxxx#1,{% + \if#1;\let\next=\relax + \else \let\next=\parsemargdefxxx + \advance\paramno by 1 + \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname + {\xeatspaces{\hash\the\paramno}}% + \edef\paramlist{\paramlist\hash\the\paramno,}% + \fi\next} + +\def\parsemmanyargdef@@#1,{% + \if#1;\let\next=\relax + \else + \let\next=\parsemmanyargdef@@ + \edef\tempb{\eatspaces{#1}}% + \expandafter\def\expandafter\tempa + \expandafter{\csname macarg.\tempb\endcsname}% + % Note that we need some extra \noexpand\noexpand, this is because we + % don't want \the to be expanded in the \parsermacbody as it uses an + % \xdef . + \expandafter\edef\tempa + {\noexpand\noexpand\noexpand\the\toks\the\paramno}% + \advance\paramno by 1\relax + \fi\next} + +% These two commands read recursive and nonrecursive macro bodies. +% (They're different since rec and nonrec macros end differently.) +% + +\catcode `\@\texiatcatcode +\long\def\parsemacbody#1@end macro% +{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% +\long\def\parsermacbody#1@end rmacro% +{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% +\catcode `\@=11\relax + +\let\endargs@\relax +\let\nil@\relax +\def\nilm@{\nil@}% +\long\def\nillm@{\nil@}% + +% This macro is expanded during the Texinfo macro expansion, not during its +% definition. It gets all the arguments values and assigns them to macros +% macarg.ARGNAME +% +% #1 is the macro name +% #2 is the list of argument names +% #3 is the list of argument values +\def\getargvals@#1#2#3{% + \def\macargdeflist@{}% + \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. + \def\paramlist{#2,\nil@}% + \def\macroname{#1}% + \begingroup + \macroargctxt + \def\argvaluelist{#3,\nil@}% + \def\@tempa{#3}% + \ifx\@tempa\empty + \setemptyargvalues@ + \else + \getargvals@@ + \fi +} + +% +\def\getargvals@@{% + \ifx\paramlist\nilm@ + % Some sanity check needed here that \argvaluelist is also empty. + \ifx\argvaluelist\nillm@ + \else + \errhelp = \EMsimple + \errmessage{Too many arguments in macro `\macroname'!}% + \fi + \let\next\macargexpandinbody@ + \else + \ifx\argvaluelist\nillm@ + % No more arguments values passed to macro. Set remaining named-arg + % macros to empty. + \let\next\setemptyargvalues@ + \else + % pop current arg name into \@tempb + \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% + \expandafter\@tempa\expandafter{\paramlist}% + % pop current argument value into \@tempc + \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% + \expandafter\@tempa\expandafter{\argvaluelist}% + % Here \@tempb is the current arg name and \@tempc is the current arg value. + % First place the new argument macro definition into \@tempd + \expandafter\macname\expandafter{\@tempc}% + \expandafter\let\csname macarg.\@tempb\endcsname\relax + \expandafter\def\expandafter\@tempe\expandafter{% + \csname macarg.\@tempb\endcsname}% + \edef\@tempd{\long\def\@tempe{\the\macname}}% + \push@\@tempd\macargdeflist@ + \let\next\getargvals@@ + \fi + \fi + \next +} + +\def\push@#1#2{% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter#2% + \expandafter\expandafter\expandafter{% + \expandafter#1#2}% +} + +% Replace arguments by their values in the macro body, and place the result +% in macro \@tempa +\def\macvalstoargs@{% + % To do this we use the property that token registers that are \the'ed + % within an \edef expand only once. So we are going to place all argument + % values into respective token registers. + % + % First we save the token context, and initialize argument numbering. + \begingroup + \paramno0\relax + % Then, for each argument number #N, we place the corresponding argument + % value into a new token list register \toks#N + \expandafter\putargsintokens@\saveparamlist@,;,% + % Then, we expand the body so that argument are replaced by their + % values. The trick for values not to be expanded themselves is that they + % are within tokens and that tokens expand only once in an \edef . + \edef\@tempc{\csname mac.\macroname .body\endcsname}% + % Now we restore the token stack pointer to free the token list registers + % which we have used, but we make sure that expanded body is saved after + % group. + \expandafter + \endgroup + \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% + } + +\def\macargexpandinbody@{% + %% Define the named-macro outside of this group and then close this group. + \expandafter + \endgroup + \macargdeflist@ + % First the replace in body the macro arguments by their values, the result + % is in \@tempa . + \macvalstoargs@ + % Then we point at the \norecurse or \gobble (for recursive) macro value + % with \@tempb . + \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname + % Depending on whether it is recursive or not, we need some tailing + % \egroup . + \ifx\@tempb\gobble + \let\@tempc\relax + \else + \let\@tempc\egroup + \fi + % And now we do the real job: + \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% + \@tempd +} + +\def\putargsintokens@#1,{% + \if#1;\let\next\relax + \else + \let\next\putargsintokens@ + % First we allocate the new token list register, and give it a temporary + % alias \@tempb . + \toksdef\@tempb\the\paramno + % Then we place the argument value into that token list register. + \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname + \expandafter\@tempb\expandafter{\@tempa}% + \advance\paramno by 1\relax + \fi + \next +} + +% Save the token stack pointer into macro #1 +\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} +% Restore the token stack pointer from number in macro #1 +\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} +% newtoks that can be used non \outer . +\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} + +% Tailing missing arguments are set to empty +\def\setemptyargvalues@{% + \ifx\paramlist\nilm@ + \let\next\macargexpandinbody@ + \else + \expandafter\setemptyargvaluesparser@\paramlist\endargs@ + \let\next\setemptyargvalues@ + \fi + \next +} + +\def\setemptyargvaluesparser@#1,#2\endargs@{% + \expandafter\def\expandafter\@tempa\expandafter{% + \expandafter\def\csname macarg.#1\endcsname{}}% + \push@\@tempa\macargdeflist@ + \def\paramlist{#2}% +} + +% #1 is the element target macro +% #2 is the list macro +% #3,#4\endargs@ is the list value +\def\pop@#1#2#3,#4\endargs@{% + \def#1{#3}% + \def#2{#4}% +} +\long\def\longpop@#1#2#3,#4\endargs@{% + \long\def#1{#3}% + \long\def#2{#4}% +} + +% This defines a Texinfo @macro. There are eight cases: recursive and +% nonrecursive macros of zero, one, up to nine, and many arguments. +% Much magic with \expandafter here. +% \xdef is used so that macro definitions will survive the file +% they're defined in; @include reads the file inside a group. +% +\def\defmacro{% + \let\hash=##% convert placeholders to macro parameter chars + \ifrecursive + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\scanmacro{\temp}}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname xxx\endcsname}% + \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \egroup\noexpand\scanmacro{\temp}}% + \else + \ifnum\paramno<10\relax % at most 9 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{\egroup\noexpand\scanmacro{\temp}}% + \else % 10 or more + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble + \fi + \fi + \else + \ifcase\paramno + % 0 + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \or % 1 + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \noexpand\braceorline + \expandafter\noexpand\csname\the\macname xxx\endcsname}% + \expandafter\xdef\csname\the\macname xxx\endcsname##1{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \else % at most 9 + \ifnum\paramno<10\relax + \expandafter\xdef\csname\the\macname\endcsname{% + \bgroup\noexpand\macroargctxt + \expandafter\noexpand\csname\the\macname xx\endcsname}% + \expandafter\xdef\csname\the\macname xx\endcsname##1{% + \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% + \expandafter\expandafter + \expandafter\xdef + \expandafter\expandafter + \csname\the\macname xxx\endcsname + \paramlist{% + \egroup + \noexpand\norecurse{\the\macname}% + \noexpand\scanmacro{\temp}\egroup}% + \else % 10 or more: + \expandafter\xdef\csname\the\macname\endcsname{% + \noexpand\getargvals@{\the\macname}{\argl}% + }% + \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp + \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse + \fi + \fi + \fi} + +\catcode `\@\texiatcatcode\relax + +\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} + +% \braceorline decides whether the next nonwhitespace character is a +% {. If so it reads up to the closing }, if not, it reads the whole +% line. Whatever was read is then fed to the next control sequence +% as an argument (by \parsebrace or \parsearg). +% +\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} +\def\braceorlinexxx{% + \ifx\nchar\bgroup\else + \expandafter\parsearg + \fi \macnamexxx} + + +% @alias. +% We need some trickery to remove the optional spaces around the equal +% sign. Make them active and then expand them all to nothing. +% +\def\alias{\parseargusing\obeyspaces\aliasxxx} +\def\aliasxxx #1{\aliasyyy#1\relax} +\def\aliasyyy #1=#2\relax{% + {% + \expandafter\let\obeyedspace=\empty + \addtomacrolist{#1}% + \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% + }% + \next +} + + +\message{cross references,} + +\newwrite\auxfile +\newif\ifhavexrefs % True if xref values are known. +\newif\ifwarnedxrefs % True if we warned once that they aren't known. + +% @inforef is relatively simple. +\def\inforef #1{\inforefzzz #1,,,,**} +\def\inforefzzz #1,#2,#3,#4**{% + \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, + node \samp{\ignorespaces#1{}}} + +% @node's only job in TeX is to define \lastnode, which is used in +% cross-references. The @node line might or might not have commas, and +% might or might not have spaces before the first comma, like: +% @node foo , bar , ... +% We don't want such trailing spaces in the node name. +% +\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} +% +% also remove a trailing comma, in case of something like this: +% @node Help-Cross, , , Cross-refs +\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} +\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} + +\let\nwnode=\node +\let\lastnode=\empty + +% Write a cross-reference definition for the current node. #1 is the +% type (Ynumbered, Yappendix, Ynothing). +% +\def\donoderef#1{% + \ifx\lastnode\empty\else + \setref{\lastnode}{#1}% + \global\let\lastnode=\empty + \fi +} + +% @anchor{NAME} -- define xref target at arbitrary point. +% +\newcount\savesfregister +% +\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} +\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} +\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} + +% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an +% anchor), which consists of three parts: +% 1) NAME-title - the current sectioning name taken from \lastsection, +% or the anchor name. +% 2) NAME-snt - section number and type, passed as the SNT arg, or +% empty for anchors. +% 3) NAME-pg - the page number. +% +% This is called from \donoderef, \anchor, and \dofloat. In the case of +% floats, there is an additional part, which is not written here: +% 4) NAME-lof - the text as it should appear in a @listoffloats. +% +\def\setref#1#2{% + \pdfmkdest{#1}% + \iflinks + {% + \atdummies % preserve commands, but don't expand them + \edef\writexrdef##1##2{% + \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef + ##1}{##2}}% these are parameters of \writexrdef + }% + \toks0 = \expandafter{\lastsection}% + \immediate \writexrdef{title}{\the\toks0 }% + \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. + \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout + }% + \fi +} + +% @xrefautosectiontitle on|off says whether @section(ing) names are used +% automatically in xrefs, if the third arg is not explicitly specified. +% This was provided as a "secret" @set xref-automatic-section-title +% variable, now it's official. +% +\parseargdef\xrefautomaticsectiontitle{% + \def\temp{#1}% + \ifx\temp\onword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \empty + \else\ifx\temp\offword + \expandafter\let\csname SETxref-automatic-section-title\endcsname + = \relax + \else + \errhelp = \EMsimple + \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', + must be on|off}% + \fi\fi +} + +% +% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is +% the node name, #2 the name of the Info cross-reference, #3 the printed +% node name, #4 the name of the Info file, #5 the name of the printed +% manual. All but the node name can be omitted. +% +\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} +\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} +\def\ref#1{\xrefX[#1,,,,,,,]} +% +\newbox\toprefbox +\newbox\printedrefnamebox +\newbox\infofilenamebox +\newbox\printedmanualbox +% +\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup + \unsepspaces + % + % Get args without leading/trailing spaces. + \def\printedrefname{\ignorespaces #3}% + \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% + % + \def\infofilename{\ignorespaces #4}% + \setbox\infofilenamebox = \hbox{\infofilename\unskip}% + % + \def\printedmanual{\ignorespaces #5}% + \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% + % + % If the printed reference name (arg #3) was not explicitly given in + % the @xref, figure out what we want to use. + \ifdim \wd\printedrefnamebox = 0pt + % No printed node name was explicitly given. + \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax + % Not auto section-title: use node name inside the square brackets. + \def\printedrefname{\ignorespaces #1}% + \else + % Auto section-title: use chapter/section title inside + % the square brackets if we have it. + \ifdim \wd\printedmanualbox > 0pt + % It is in another manual, so we don't have it; use node name. + \def\printedrefname{\ignorespaces #1}% + \else + \ifhavexrefs + % We (should) know the real title if we have the xref values. + \def\printedrefname{\refx{#1-title}{}}% + \else + % Otherwise just copy the Info node name. + \def\printedrefname{\ignorespaces #1}% + \fi% + \fi + \fi + \fi + % + % Make link in pdf output. + \ifpdf + {\indexnofonts + \turnoffactive + \makevalueexpandable + % This expands tokens, so do it after making catcode changes, so _ + % etc. don't get their TeX definitions. This ignores all spaces in + % #4, including (wrongly) those in the middle of the filename. + \getfilename{#4}% + % + % This (wrongly) does not take account of leading or trailing + % spaces in #1, which should be ignored. + \edef\pdfxrefdest{#1}% + \ifx\pdfxrefdest\empty + \def\pdfxrefdest{Top}% no empty targets + \else + \txiescapepdf\pdfxrefdest % escape PDF special chars + \fi + % + \leavevmode + \startlink attr{/Border [0 0 0]}% + \ifnum\filenamelength>0 + goto file{\the\filename.pdf} name{\pdfxrefdest}% + \else + goto name{\pdfmkpgn{\pdfxrefdest}}% + \fi + }% + \setcolor{\linkcolor}% + \fi + % + % Float references are printed completely differently: "Figure 1.2" + % instead of "[somenode], p.3". We distinguish them by the + % LABEL-title being set to a magic string. + {% + % Have to otherify everything special to allow the \csname to + % include an _ in the xref name, etc. + \indexnofonts + \turnoffactive + \expandafter\global\expandafter\let\expandafter\Xthisreftitle + \csname XR#1-title\endcsname + }% + \iffloat\Xthisreftitle + % If the user specified the print name (third arg) to the ref, + % print it instead of our usual "Figure 1.2". + \ifdim\wd\printedrefnamebox = 0pt + \refx{#1-snt}{}% + \else + \printedrefname + \fi + % + % If the user also gave the printed manual name (fifth arg), append + % "in MANUALNAME". + \ifdim \wd\printedmanualbox > 0pt + \space \putwordin{} \cite{\printedmanual}% + \fi + \else + % node/anchor (non-float) references. + % + % If we use \unhbox to print the node names, TeX does not insert + % empty discretionaries after hyphens, which means that it will not + % find a line break at a hyphen in a node names. Since some manuals + % are best written with fairly long node names, containing hyphens, + % this is a loss. Therefore, we give the text of the node name + % again, so it is as if TeX is seeing it for the first time. + % + \ifdim \wd\printedmanualbox > 0pt + % Cross-manual reference with a printed manual name. + % + \crossmanualxref{\cite{\printedmanual\unskip}}% + % + \else\ifdim \wd\infofilenamebox > 0pt + % Cross-manual reference with only an info filename (arg 4), no + % printed manual name (arg 5). This is essentially the same as + % the case above; we output the filename, since we have nothing else. + % + \crossmanualxref{\code{\infofilename\unskip}}% + % + \else + % Reference within this manual. + % + % _ (for example) has to be the character _ for the purposes of the + % control sequence corresponding to the node, but it has to expand + % into the usual \leavevmode...\vrule stuff for purposes of + % printing. So we \turnoffactive for the \refx-snt, back on for the + % printing, back off for the \refx-pg. + {\turnoffactive + % Only output a following space if the -snt ref is nonempty; for + % @unnumbered and @anchor, it won't be. + \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% + \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi + }% + % output the `[mynode]' via the macro below so it can be overridden. + \xrefprintnodename\printedrefname + % + % But we always want a comma and a space: + ,\space + % + % output the `page 3'. + \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \fi\fi + \fi + \endlink +\endgroup} + +% Output a cross-manual xref to #1. Used just above (twice). +% +% Only include the text "Section ``foo'' in" if the foo is neither +% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply +% "see The Foo Manual", the idea being to refer to the whole manual. +% +% But, this being TeX, we can't easily compare our node name against the +% string "Top" while ignoring the possible spaces before and after in +% the input. By adding the arbitrary 7sp below, we make it much less +% likely that a real node name would have the same width as "Top" (e.g., +% in a monospaced font). Hopefully it will never happen in practice. +% +% For the same basic reason, we retypeset the "Top" at every +% reference, since the current font is indeterminate. +% +\def\crossmanualxref#1{% + \setbox\toprefbox = \hbox{Top\kern7sp}% + \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% + \ifdim \wd2 > 7sp % nonempty? + \ifdim \wd2 = \wd\toprefbox \else % same as Top? + \putwordSection{} ``\printedrefname'' \putwordin{}\space + \fi + \fi + #1% +} + +% This macro is called from \xrefX for the `[nodename]' part of xref +% output. It's a separate macro only so it can be changed more easily, +% since square brackets don't work well in some documents. Particularly +% one that Bob is working on :). +% +\def\xrefprintnodename#1{[#1]} + +% Things referred to by \setref. +% +\def\Ynothing{} +\def\Yomitfromtoc{} +\def\Ynumbered{% + \ifnum\secno=0 + \putwordChapter@tie \the\chapno + \else \ifnum\subsecno=0 + \putwordSection@tie \the\chapno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno + \else + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} +\def\Yappendix{% + \ifnum\secno=0 + \putwordAppendix@tie @char\the\appendixno{}% + \else \ifnum\subsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno + \else + \putwordSection@tie + @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} + +% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. +% If its value is nonempty, SUFFIX is output afterward. +% +\def\refx#1#2{% + {% + \indexnofonts + \otherbackslash + \expandafter\global\expandafter\let\expandafter\thisrefX + \csname XR#1\endcsname + }% + \ifx\thisrefX\relax + % If not defined, say something at least. + \angleleft un\-de\-fined\angleright + \iflinks + \ifhavexrefs + {\toks0 = {#1}% avoid expansion of possibly-complex value + \message{\linenumber Undefined cross reference `\the\toks0'.}}% + \else + \ifwarnedxrefs\else + \global\warnedxrefstrue + \message{Cross reference values unknown; you must run TeX again.}% + \fi + \fi + \fi + \else + % It's defined, so just use it. + \thisrefX + \fi + #2% Output the suffix in any case. +} + +% This is the macro invoked by entries in the aux file. Usually it's +% just a \def (we prepend XR to the control sequence name to avoid +% collisions). But if this is a float type, we have more work to do. +% +\def\xrdef#1#2{% + {% The node name might contain 8-bit characters, which in our current + % implementation are changed to commands like @'e. Don't let these + % mess up the control sequence name. + \indexnofonts + \turnoffactive + \xdef\safexrefname{#1}% + }% + % + \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref + % + % Was that xref control sequence that we just defined for a float? + \expandafter\iffloat\csname XR\safexrefname\endcsname + % it was a float, and we have the (safe) float type in \iffloattype. + \expandafter\let\expandafter\floatlist + \csname floatlist\iffloattype\endcsname + % + % Is this the first time we've seen this float type? + \expandafter\ifx\floatlist\relax + \toks0 = {\do}% yes, so just \do + \else + % had it before, so preserve previous elements in list. + \toks0 = \expandafter{\floatlist\do}% + \fi + % + % Remember this xref in the control sequence \floatlistFLOATTYPE, + % for later use in \listoffloats. + \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 + {\safexrefname}}% + \fi +} + +% Read the last existing aux file, if any. No error if none exists. +% +\def\tryauxfile{% + \openin 1 \jobname.aux + \ifeof 1 \else + \readdatafile{aux}% + \global\havexrefstrue + \fi + \closein 1 +} + +\def\setupdatafile{% + \catcode`\^^@=\other + \catcode`\^^A=\other + \catcode`\^^B=\other + \catcode`\^^C=\other + \catcode`\^^D=\other + \catcode`\^^E=\other + \catcode`\^^F=\other + \catcode`\^^G=\other + \catcode`\^^H=\other + \catcode`\^^K=\other + \catcode`\^^L=\other + \catcode`\^^N=\other + \catcode`\^^P=\other + \catcode`\^^Q=\other + \catcode`\^^R=\other + \catcode`\^^S=\other + \catcode`\^^T=\other + \catcode`\^^U=\other + \catcode`\^^V=\other + \catcode`\^^W=\other + \catcode`\^^X=\other + \catcode`\^^Z=\other + \catcode`\^^[=\other + \catcode`\^^\=\other + \catcode`\^^]=\other + \catcode`\^^^=\other + \catcode`\^^_=\other + % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. + % in xref tags, i.e., node names. But since ^^e4 notation isn't + % supported in the main text, it doesn't seem desirable. Furthermore, + % that is not enough: for node names that actually contain a ^ + % character, we would end up writing a line like this: 'xrdef {'hat + % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first + % argument, and \hat is not an expandable control sequence. It could + % all be worked out, but why? Either we support ^^ or we don't. + % + % The other change necessary for this was to define \auxhat: + % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter + % and then to call \auxhat in \setq. + % + \catcode`\^=\other + % + % Special characters. Should be turned off anyway, but... + \catcode`\~=\other + \catcode`\[=\other + \catcode`\]=\other + \catcode`\"=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\$=\other + \catcode`\#=\other + \catcode`\&=\other + \catcode`\%=\other + \catcode`+=\other % avoid \+ for paranoia even though we've turned it off + % + % This is to support \ in node names and titles, since the \ + % characters end up in a \csname. It's easier than + % leaving it active and making its active definition an actual \ + % character. What I don't understand is why it works in the *value* + % of the xrdef. Seems like it should be a catcode12 \, and that + % should not typeset properly. But it works, so I'm moving on for + % now. --karl, 15jan04. + \catcode`\\=\other + % + % Make the characters 128-255 be printing characters. + {% + \count1=128 + \def\loop{% + \catcode\count1=\other + \advance\count1 by 1 + \ifnum \count1<256 \loop \fi + }% + }% + % + % @ is our escape character in .aux files, and we need braces. + \catcode`\{=1 + \catcode`\}=2 + \catcode`\@=0 +} + +\def\readdatafile#1{% +\begingroup + \setupdatafile + \input\jobname.#1 +\endgroup} + + +\message{insertions,} +% including footnotes. + +\newcount \footnoteno + +% The trailing space in the following definition for supereject is +% vital for proper filling; pages come out unaligned when you do a +% pagealignmacro call if that space before the closing brace is +% removed. (Generally, numeric constants should always be followed by a +% space to prevent strange expansion errors.) +\def\supereject{\par\penalty -20000\footnoteno =0 } + +% @footnotestyle is meaningful for Info output only. +\let\footnotestyle=\comment + +{\catcode `\@=11 +% +% Auto-number footnotes. Otherwise like plain. +\gdef\footnote{% + \let\indent=\ptexindent + \let\noindent=\ptexnoindent + \global\advance\footnoteno by \@ne + \edef\thisfootno{$^{\the\footnoteno}$}% + % + % In case the footnote comes at the end of a sentence, preserve the + % extra spacing after we do the footnote number. + \let\@sf\empty + \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi + % + % Remove inadvertent blank space before typesetting the footnote number. + \unskip + \thisfootno\@sf + \dofootnote +}% + +% Don't bother with the trickery in plain.tex to not require the +% footnote text as a parameter. Our footnotes don't need to be so general. +% +% Oh yes, they do; otherwise, @ifset (and anything else that uses +% \parseargline) fails inside footnotes because the tokens are fixed when +% the footnote is read. --karl, 16nov96. +% +\gdef\dofootnote{% + \insert\footins\bgroup + % We want to typeset this text as a normal paragraph, even if the + % footnote reference occurs in (for example) a display environment. + % So reset some parameters. + \hsize=\pagewidth + \interlinepenalty\interfootnotelinepenalty + \splittopskip\ht\strutbox % top baseline for broken footnotes + \splitmaxdepth\dp\strutbox + \floatingpenalty\@MM + \leftskip\z@skip + \rightskip\z@skip + \spaceskip\z@skip + \xspaceskip\z@skip + \parindent\defaultparindent + % + \smallfonts \rm + % + % Because we use hanging indentation in footnotes, a @noindent appears + % to exdent this text, so make it be a no-op. makeinfo does not use + % hanging indentation so @noindent can still be needed within footnote + % text after an @example or the like (not that this is good style). + \let\noindent = \relax + % + % Hang the footnote text off the number. Use \everypar in case the + % footnote extends for more than one paragraph. + \everypar = {\hang}% + \textindent{\thisfootno}% + % + % Don't crash into the line above the footnote text. Since this + % expands into a box, it must come within the paragraph, lest it + % provide a place where TeX can split the footnote. + \footstrut + % + % Invoke rest of plain TeX footnote routine. + \futurelet\next\fo@t +} +}%end \catcode `\@=11 + +% In case a @footnote appears in a vbox, save the footnote text and create +% the real \insert just after the vbox finished. Otherwise, the insertion +% would be lost. +% Similarly, if a @footnote appears inside an alignment, save the footnote +% text to a box and make the \insert when a row of the table is finished. +% And the same can be done for other insert classes. --kasal, 16nov03. + +% Replace the \insert primitive by a cheating macro. +% Deeper inside, just make sure that the saved insertions are not spilled +% out prematurely. +% +\def\startsavinginserts{% + \ifx \insert\ptexinsert + \let\insert\saveinsert + \else + \let\checkinserts\relax + \fi +} + +% This \insert replacement works for both \insert\footins{foo} and +% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. +% +\def\saveinsert#1{% + \edef\next{\noexpand\savetobox \makeSAVEname#1}% + \afterassignment\next + % swallow the left brace + \let\temp = +} +\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} +\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} + +\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} + +\def\placesaveins#1{% + \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname + {\box#1}% +} + +% eat @SAVE -- beware, all of them have catcode \other: +{ + \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) + \gdef\gobblesave @SAVE{} +} + +% initialization: +\def\newsaveins #1{% + \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% + \next +} +\def\newsaveinsX #1{% + \csname newbox\endcsname #1% + \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts + \checksaveins #1}% +} + +% initialize: +\let\checkinserts\empty +\newsaveins\footins +\newsaveins\margin + + +% @image. We use the macros from epsf.tex to support this. +% If epsf.tex is not installed and @image is used, we complain. +% +% Check for and read epsf.tex up front. If we read it only at @image +% time, we might be inside a group, and then its definitions would get +% undone and the next image would fail. +\openin 1 = epsf.tex +\ifeof 1 \else + % Do not bother showing banner with epsf.tex v2.7k (available in + % doc/epsf.tex and on ctan). + \def\epsfannounce{\toks0 = }% + \input epsf.tex +\fi +\closein 1 +% +% We will only complain once about lack of epsf.tex. +\newif\ifwarnednoepsf +\newhelp\noepsfhelp{epsf.tex must be installed for images to + work. It is also included in the Texinfo distribution, or you can get + it from ftp://tug.org/tex/epsf.tex.} +% +\def\image#1{% + \ifx\epsfbox\thisisundefined + \ifwarnednoepsf \else + \errhelp = \noepsfhelp + \errmessage{epsf.tex not found, images will be ignored}% + \global\warnednoepsftrue + \fi + \else + \imagexxx #1,,,,,\finish + \fi +} +% +% Arguments to @image: +% #1 is (mandatory) image filename; we tack on .eps extension. +% #2 is (optional) width, #3 is (optional) height. +% #4 is (ignored optional) html alt text. +% #5 is (ignored optional) extension. +% #6 is just the usual extra ignored arg for parsing stuff. +\newif\ifimagevmode +\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup + \catcode`\^^M = 5 % in case we're inside an example + \normalturnoffactive % allow _ et al. in names + % If the image is by itself, center it. + \ifvmode + \imagevmodetrue + \else \ifx\centersub\centerV + % for @center @image, we need a vbox so we can have our vertical space + \imagevmodetrue + \vbox\bgroup % vbox has better behavior than vtop herev + \fi\fi + % + \ifimagevmode + \nobreak\medskip + % Usually we'll have text after the image which will insert + % \parskip glue, so insert it here too to equalize the space + % above and below. + \nobreak\vskip\parskip + \nobreak + \fi + % + % Leave vertical mode so that indentation from an enclosing + % environment such as @quotation is respected. + % However, if we're at the top level, we don't want the + % normal paragraph indentation. + % On the other hand, if we are in the case of @center @image, we don't + % want to start a paragraph, which will create a hsize-width box and + % eradicate the centering. + \ifx\centersub\centerV\else \noindent \fi + % + % Output the image. + \ifpdf + \dopdfimage{#1}{#2}{#3}% + \else + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi + \epsfbox{#1.eps}% + \fi + % + \ifimagevmode + \medskip % space after a standalone image + \fi + \ifx\centersub\centerV \egroup \fi +\endgroup} + + +% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, +% etc. We don't actually implement floating yet, we always include the +% float "here". But it seemed the best name for the future. +% +\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} + +% There may be a space before second and/or third parameter; delete it. +\def\eatcommaspace#1, {#1,} + +% #1 is the optional FLOATTYPE, the text label for this float, typically +% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, +% this float will not be numbered and cannot be referred to. +% +% #2 is the optional xref label. Also must be present for the float to +% be referable. +% +% #3 is the optional positioning argument; for now, it is ignored. It +% will somehow specify the positions allowed to float to (here, top, bottom). +% +% We keep a separate counter for each FLOATTYPE, which we reset at each +% chapter-level command. +\let\resetallfloatnos=\empty +% +\def\dofloat#1,#2,#3,#4\finish{% + \let\thiscaption=\empty + \let\thisshortcaption=\empty + % + % don't lose footnotes inside @float. + % + % BEWARE: when the floats start float, we have to issue warning whenever an + % insert appears inside a float which could possibly float. --kasal, 26may04 + % + \startsavinginserts + % + % We can't be used inside a paragraph. + \par + % + \vtop\bgroup + \def\floattype{#1}% + \def\floatlabel{#2}% + \def\floatloc{#3}% we do nothing with this yet. + % + \ifx\floattype\empty + \let\safefloattype=\empty + \else + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + \fi + % + % If label is given but no type, we handle that as the empty type. + \ifx\floatlabel\empty \else + % We want each FLOATTYPE to be numbered separately (Figure 1, + % Table 1, Figure 2, ...). (And if no label, no number.) + % + \expandafter\getfloatno\csname\safefloattype floatno\endcsname + \global\advance\floatno by 1 + % + {% + % This magic value for \lastsection is output by \setref as the + % XREFLABEL-title value. \xrefX uses it to distinguish float + % labels (which have a completely different output format) from + % node and anchor labels. And \xrdef uses it to construct the + % lists of floats. + % + \edef\lastsection{\floatmagic=\safefloattype}% + \setref{\floatlabel}{Yfloat}% + }% + \fi + % + % start with \parskip glue, I guess. + \vskip\parskip + % + % Don't suppress indentation if a float happens to start a section. + \restorefirstparagraphindent +} + +% we have these possibilities: +% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap +% @float Foo,lbl & no caption: Foo 1.1 +% @float Foo & @caption{Cap}: Foo: Cap +% @float Foo & no caption: Foo +% @float ,lbl & Caption{Cap}: 1.1: Cap +% @float ,lbl & no caption: 1.1 +% @float & @caption{Cap}: Cap +% @float & no caption: +% +\def\Efloat{% + \let\floatident = \empty + % + % In all cases, if we have a float type, it comes first. + \ifx\floattype\empty \else \def\floatident{\floattype}\fi + % + % If we have an xref label, the number comes next. + \ifx\floatlabel\empty \else + \ifx\floattype\empty \else % if also had float type, need tie first. + \appendtomacro\floatident{\tie}% + \fi + % the number. + \appendtomacro\floatident{\chaplevelprefix\the\floatno}% + \fi + % + % Start the printed caption with what we've constructed in + % \floatident, but keep it separate; we need \floatident again. + \let\captionline = \floatident + % + \ifx\thiscaption\empty \else + \ifx\floatident\empty \else + \appendtomacro\captionline{: }% had ident, so need a colon between + \fi + % + % caption text. + \appendtomacro\captionline{\scanexp\thiscaption}% + \fi + % + % If we have anything to print, print it, with space before. + % Eventually this needs to become an \insert. + \ifx\captionline\empty \else + \vskip.5\parskip + \captionline + % + % Space below caption. + \vskip\parskip + \fi + % + % If have an xref label, write the list of floats info. Do this + % after the caption, to avoid chance of it being a breakpoint. + \ifx\floatlabel\empty \else + % Write the text that goes in the lof to the aux file as + % \floatlabel-lof. Besides \floatident, we include the short + % caption if specified, else the full caption if specified, else nothing. + {% + \atdummies + % + % since we read the caption text in the macro world, where ^^M + % is turned into a normal character, we have to scan it back, so + % we don't write the literal three characters "^^M" into the aux file. + \scanexp{% + \xdef\noexpand\gtemp{% + \ifx\thisshortcaption\empty + \thiscaption + \else + \thisshortcaption + \fi + }% + }% + \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident + \ifx\gtemp\empty \else : \gtemp \fi}}% + }% + \fi + \egroup % end of \vtop + % + % place the captured inserts + % + % BEWARE: when the floats start floating, we have to issue warning + % whenever an insert appears inside a float which could possibly + % float. --kasal, 26may04 + % + \checkinserts +} + +% Append the tokens #2 to the definition of macro #1, not expanding either. +% +\def\appendtomacro#1#2{% + \expandafter\def\expandafter#1\expandafter{#1#2}% +} + +% @caption, @shortcaption +% +\def\caption{\docaption\thiscaption} +\def\shortcaption{\docaption\thisshortcaption} +\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} +\def\defcaption#1#2{\egroup \def#1{#2}} + +% The parameter is the control sequence identifying the counter we are +% going to use. Create it if it doesn't exist and assign it to \floatno. +\def\getfloatno#1{% + \ifx#1\relax + % Haven't seen this figure type before. + \csname newcount\endcsname #1% + % + % Remember to reset this floatno at the next chap. + \expandafter\gdef\expandafter\resetallfloatnos + \expandafter{\resetallfloatnos #1=0 }% + \fi + \let\floatno#1% +} + +% \setref calls this to get the XREFLABEL-snt value. We want an @xref +% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we +% first read the @float command. +% +\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% + +% Magic string used for the XREFLABEL-title value, so \xrefX can +% distinguish floats from other xref types. +\def\floatmagic{!!float!!} + +% #1 is the control sequence we are passed; we expand into a conditional +% which is true if #1 represents a float ref. That is, the magic +% \lastsection value which we \setref above. +% +\def\iffloat#1{\expandafter\doiffloat#1==\finish} +% +% #1 is (maybe) the \floatmagic string. If so, #2 will be the +% (safe) float type for this float. We set \iffloattype to #2. +% +\def\doiffloat#1=#2=#3\finish{% + \def\temp{#1}% + \def\iffloattype{#2}% + \ifx\temp\floatmagic +} + +% @listoffloats FLOATTYPE - print a list of floats like a table of contents. +% +\parseargdef\listoffloats{% + \def\floattype{#1}% floattype + {% + % the floattype might have accents or other special characters, + % but we need to use it in a control sequence name. + \indexnofonts + \turnoffactive + \xdef\safefloattype{\floattype}% + }% + % + % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. + \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax + \ifhavexrefs + % if the user said @listoffloats foo but never @float foo. + \message{\linenumber No `\safefloattype' floats to list.}% + \fi + \else + \begingroup + \leftskip=\tocindent % indent these entries like a toc + \let\do=\listoffloatsdo + \csname floatlist\safefloattype\endcsname + \endgroup + \fi +} + +% This is called on each entry in a list of floats. We're passed the +% xref label, in the form LABEL-title, which is how we save it in the +% aux file. We strip off the -title and look up \XRLABEL-lof, which +% has the text we're supposed to typeset here. +% +% Figures without xref labels will not be included in the list (since +% they won't appear in the aux file). +% +\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} +\def\listoffloatsdoentry#1-title\finish{{% + % Can't fully expand XR#1-lof because it can contain anything. Just + % pass the control sequence. On the other hand, XR#1-pg is just the + % page number, and we want to fully expand that so we can get a link + % in pdf output. + \toksA = \expandafter{\csname XR#1-lof\endcsname}% + % + % use the same \entry macro we use to generate the TOC and index. + \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% + \writeentry +}} + + +\message{localization,} + +% For single-language documents, @documentlanguage is usually given very +% early, just after @documentencoding. Single argument is the language +% (de) or locale (de_DE) abbreviation. +% +{ + \catcode`\_ = \active + \globaldefs=1 +\parseargdef\documentlanguage{\begingroup + \let_=\normalunderscore % normal _ character for filenames + \tex % read txi-??.tex file in plain TeX. + % Read the file by the name they passed if it exists. + \openin 1 txi-#1.tex + \ifeof 1 + \documentlanguagetrywithoutunderscore{#1_\finish}% + \else + \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex + \fi + \closein 1 + \endgroup % end raw TeX +\endgroup} +% +% If they passed de_DE, and txi-de_DE.tex doesn't exist, +% try txi-de.tex. +% +\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% + \openin 1 txi-#1.tex + \ifeof 1 + \errhelp = \nolanghelp + \errmessage{Cannot read language file txi-#1.tex}% + \else + \globaldefs = 1 % everything in the txi-LL files needs to persist + \input txi-#1.tex + \fi + \closein 1 +} +}% end of special _ catcode +% +\newhelp\nolanghelp{The given language definition file cannot be found or +is empty. Maybe you need to install it? Putting it in the current +directory should work if nowhere else does.} + +% This macro is called from txi-??.tex files; the first argument is the +% \language name to set (without the "\lang@" prefix), the second and +% third args are \{left,right}hyphenmin. +% +% The language names to pass are determined when the format is built. +% See the etex.log file created at that time, e.g., +% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. +% +% With TeX Live 2008, etex now includes hyphenation patterns for all +% available languages. This means we can support hyphenation in +% Texinfo, at least to some extent. (This still doesn't solve the +% accented characters problem.) +% +\catcode`@=11 +\def\txisetlanguage#1#2#3{% + % do not set the language if the name is undefined in the current TeX. + \expandafter\ifx\csname lang@#1\endcsname \relax + \message{no patterns for #1}% + \else + \global\language = \csname lang@#1\endcsname + \fi + % but there is no harm in adjusting the hyphenmin values regardless. + \global\lefthyphenmin = #2\relax + \global\righthyphenmin = #3\relax +} + +% Helpers for encodings. +% Set the catcode of characters 128 through 255 to the specified number. +% +\def\setnonasciicharscatcode#1{% + \count255=128 + \loop\ifnum\count255<256 + \global\catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +\def\setnonasciicharscatcodenonglobal#1{% + \count255=128 + \loop\ifnum\count255<256 + \catcode\count255=#1\relax + \advance\count255 by 1 + \repeat +} + +% @documentencoding sets the definition of non-ASCII characters +% according to the specified encoding. +% +\parseargdef\documentencoding{% + % Encoding being declared for the document. + \def\declaredencoding{\csname #1.enc\endcsname}% + % + % Supported encodings: names converted to tokens in order to be able + % to compare them with \ifx. + \def\ascii{\csname US-ASCII.enc\endcsname}% + \def\latnine{\csname ISO-8859-15.enc\endcsname}% + \def\latone{\csname ISO-8859-1.enc\endcsname}% + \def\lattwo{\csname ISO-8859-2.enc\endcsname}% + \def\utfeight{\csname UTF-8.enc\endcsname}% + % + \ifx \declaredencoding \ascii + \asciichardefs + % + \else \ifx \declaredencoding \lattwo + \setnonasciicharscatcode\active + \lattwochardefs + % + \else \ifx \declaredencoding \latone + \setnonasciicharscatcode\active + \latonechardefs + % + \else \ifx \declaredencoding \latnine + \setnonasciicharscatcode\active + \latninechardefs + % + \else \ifx \declaredencoding \utfeight + \setnonasciicharscatcode\active + \utfeightchardefs + % + \else + \message{Unknown document encoding #1, ignoring.}% + % + \fi % utfeight + \fi % latnine + \fi % latone + \fi % lattwo + \fi % ascii +} + +% A message to be logged when using a character that isn't available +% the default font encoding (OT1). +% +\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} + +% Take account of \c (plain) vs. \, (Texinfo) difference. +\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} + +% First, make active non-ASCII characters in order for them to be +% correctly categorized when TeX reads the replacement text of +% macros containing the character definitions. +\setnonasciicharscatcode\active +% +% Latin1 (ISO-8859-1) character definitions. +\def\latonechardefs{% + \gdef^^a0{\tie} + \gdef^^a1{\exclamdown} + \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a3{{\pounds}} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\missingcharmsg{YEN SIGN}} + \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} + \gdef^^aa{\ordf} + \gdef^^ab{\guillemetleft} + \gdef^^ac{$\lnot$} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} + \gdef^^af{\={}} + % + \gdef^^b0{\textdegree} + \gdef^^b1{$\pm$} + \gdef^^b2{$^2$} + \gdef^^b3{$^3$} + \gdef^^b4{\'{}} + \gdef^^b5{$\mu$} + \gdef^^b6{\P} + % + \gdef^^b7{$^.$} + \gdef^^b8{\cedilla\ } + \gdef^^b9{$^1$} + \gdef^^ba{\ordm} + % + \gdef^^bb{\guillemetright} + \gdef^^bc{$1\over4$} + \gdef^^bd{$1\over2$} + \gdef^^be{$3\over4$} + \gdef^^bf{\questiondown} + % + \gdef^^c0{\`A} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\~A} + \gdef^^c4{\"A} + \gdef^^c5{\ringaccent A} + \gdef^^c6{\AE} + \gdef^^c7{\cedilla C} + \gdef^^c8{\`E} + \gdef^^c9{\'E} + \gdef^^ca{\^E} + \gdef^^cb{\"E} + \gdef^^cc{\`I} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\"I} + % + \gdef^^d0{\DH} + \gdef^^d1{\~N} + \gdef^^d2{\`O} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\~O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\O} + \gdef^^d9{\`U} + \gdef^^da{\'U} + \gdef^^db{\^U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\TH} + \gdef^^df{\ss} + % + \gdef^^e0{\`a} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\~a} + \gdef^^e4{\"a} + \gdef^^e5{\ringaccent a} + \gdef^^e6{\ae} + \gdef^^e7{\cedilla c} + \gdef^^e8{\`e} + \gdef^^e9{\'e} + \gdef^^ea{\^e} + \gdef^^eb{\"e} + \gdef^^ec{\`{\dotless i}} + \gdef^^ed{\'{\dotless i}} + \gdef^^ee{\^{\dotless i}} + \gdef^^ef{\"{\dotless i}} + % + \gdef^^f0{\dh} + \gdef^^f1{\~n} + \gdef^^f2{\`o} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\~o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\o} + \gdef^^f9{\`u} + \gdef^^fa{\'u} + \gdef^^fb{\^u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\th} + \gdef^^ff{\"y} +} + +% Latin9 (ISO-8859-15) encoding character definitions. +\def\latninechardefs{% + % Encoding is almost identical to Latin1. + \latonechardefs + % + \gdef^^a4{\euro} + \gdef^^a6{\v S} + \gdef^^a8{\v s} + \gdef^^b4{\v Z} + \gdef^^b8{\v z} + \gdef^^bc{\OE} + \gdef^^bd{\oe} + \gdef^^be{\"Y} +} + +% Latin2 (ISO-8859-2) character definitions. +\def\lattwochardefs{% + \gdef^^a0{\tie} + \gdef^^a1{\ogonek{A}} + \gdef^^a2{\u{}} + \gdef^^a3{\L} + \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} + \gdef^^a5{\v L} + \gdef^^a6{\'S} + \gdef^^a7{\S} + \gdef^^a8{\"{}} + \gdef^^a9{\v S} + \gdef^^aa{\cedilla S} + \gdef^^ab{\v T} + \gdef^^ac{\'Z} + \gdef^^ad{\-} + \gdef^^ae{\v Z} + \gdef^^af{\dotaccent Z} + % + \gdef^^b0{\textdegree} + \gdef^^b1{\ogonek{a}} + \gdef^^b2{\ogonek{ }} + \gdef^^b3{\l} + \gdef^^b4{\'{}} + \gdef^^b5{\v l} + \gdef^^b6{\'s} + \gdef^^b7{\v{}} + \gdef^^b8{\cedilla\ } + \gdef^^b9{\v s} + \gdef^^ba{\cedilla s} + \gdef^^bb{\v t} + \gdef^^bc{\'z} + \gdef^^bd{\H{}} + \gdef^^be{\v z} + \gdef^^bf{\dotaccent z} + % + \gdef^^c0{\'R} + \gdef^^c1{\'A} + \gdef^^c2{\^A} + \gdef^^c3{\u A} + \gdef^^c4{\"A} + \gdef^^c5{\'L} + \gdef^^c6{\'C} + \gdef^^c7{\cedilla C} + \gdef^^c8{\v C} + \gdef^^c9{\'E} + \gdef^^ca{\ogonek{E}} + \gdef^^cb{\"E} + \gdef^^cc{\v E} + \gdef^^cd{\'I} + \gdef^^ce{\^I} + \gdef^^cf{\v D} + % + \gdef^^d0{\DH} + \gdef^^d1{\'N} + \gdef^^d2{\v N} + \gdef^^d3{\'O} + \gdef^^d4{\^O} + \gdef^^d5{\H O} + \gdef^^d6{\"O} + \gdef^^d7{$\times$} + \gdef^^d8{\v R} + \gdef^^d9{\ringaccent U} + \gdef^^da{\'U} + \gdef^^db{\H U} + \gdef^^dc{\"U} + \gdef^^dd{\'Y} + \gdef^^de{\cedilla T} + \gdef^^df{\ss} + % + \gdef^^e0{\'r} + \gdef^^e1{\'a} + \gdef^^e2{\^a} + \gdef^^e3{\u a} + \gdef^^e4{\"a} + \gdef^^e5{\'l} + \gdef^^e6{\'c} + \gdef^^e7{\cedilla c} + \gdef^^e8{\v c} + \gdef^^e9{\'e} + \gdef^^ea{\ogonek{e}} + \gdef^^eb{\"e} + \gdef^^ec{\v e} + \gdef^^ed{\'{\dotless{i}}} + \gdef^^ee{\^{\dotless{i}}} + \gdef^^ef{\v d} + % + \gdef^^f0{\dh} + \gdef^^f1{\'n} + \gdef^^f2{\v n} + \gdef^^f3{\'o} + \gdef^^f4{\^o} + \gdef^^f5{\H o} + \gdef^^f6{\"o} + \gdef^^f7{$\div$} + \gdef^^f8{\v r} + \gdef^^f9{\ringaccent u} + \gdef^^fa{\'u} + \gdef^^fb{\H u} + \gdef^^fc{\"u} + \gdef^^fd{\'y} + \gdef^^fe{\cedilla t} + \gdef^^ff{\dotaccent{}} +} + +% UTF-8 character definitions. +% +% This code to support UTF-8 is based on LaTeX's utf8.def, with some +% changes for Texinfo conventions. It is included here under the GPL by +% permission from Frank Mittelbach and the LaTeX team. +% +\newcount\countUTFx +\newcount\countUTFy +\newcount\countUTFz + +\gdef\UTFviiiTwoOctets#1#2{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\endcsname} +% +\gdef\UTFviiiThreeOctets#1#2#3{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} +% +\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter + \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} + +\gdef\UTFviiiDefined#1{% + \ifx #1\relax + \message{\linenumber Unicode char \string #1 not defined for Texinfo}% + \else + \expandafter #1% + \fi +} + +\begingroup + \catcode`\~13 + \catcode`\"12 + + \def\UTFviiiLoop{% + \global\catcode\countUTFx\active + \uccode`\~\countUTFx + \uppercase\expandafter{\UTFviiiTmp}% + \advance\countUTFx by 1 + \ifnum\countUTFx < \countUTFy + \expandafter\UTFviiiLoop + \fi} + + \countUTFx = "C2 + \countUTFy = "E0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiTwoOctets\string~}} + \UTFviiiLoop + + \countUTFx = "E0 + \countUTFy = "F0 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiThreeOctets\string~}} + \UTFviiiLoop + + \countUTFx = "F0 + \countUTFy = "F4 + \def\UTFviiiTmp{% + \xdef~{\noexpand\UTFviiiFourOctets\string~}} + \UTFviiiLoop +\endgroup + +\begingroup + \catcode`\"=12 + \catcode`\<=12 + \catcode`\.=12 + \catcode`\,=12 + \catcode`\;=12 + \catcode`\!=12 + \catcode`\~=13 + + \gdef\DeclareUnicodeCharacter#1#2{% + \countUTFz = "#1\relax + %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% + \begingroup + \parseXMLCharref + \def\UTFviiiTwoOctets##1##2{% + \csname u8:##1\string ##2\endcsname}% + \def\UTFviiiThreeOctets##1##2##3{% + \csname u8:##1\string ##2\string ##3\endcsname}% + \def\UTFviiiFourOctets##1##2##3##4{% + \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% + \expandafter\expandafter\expandafter\expandafter + \expandafter\expandafter\expandafter + \gdef\UTFviiiTmp{#2}% + \endgroup} + + \gdef\parseXMLCharref{% + \ifnum\countUTFz < "A0\relax + \errhelp = \EMsimple + \errmessage{Cannot define Unicode char value < 00A0}% + \else\ifnum\countUTFz < "800\relax + \parseUTFviiiA,% + \parseUTFviiiB C\UTFviiiTwoOctets.,% + \else\ifnum\countUTFz < "10000\relax + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% + \else + \parseUTFviiiA;% + \parseUTFviiiA,% + \parseUTFviiiA!% + \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% + \fi\fi\fi + } + + \gdef\parseUTFviiiA#1{% + \countUTFx = \countUTFz + \divide\countUTFz by 64 + \countUTFy = \countUTFz + \multiply\countUTFz by 64 + \advance\countUTFx by -\countUTFz + \advance\countUTFx by 128 + \uccode `#1\countUTFx + \countUTFz = \countUTFy} + + \gdef\parseUTFviiiB#1#2#3#4{% + \advance\countUTFz by "#10\relax + \uccode `#3\countUTFz + \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} +\endgroup + +\def\utfeightchardefs{% + \DeclareUnicodeCharacter{00A0}{\tie} + \DeclareUnicodeCharacter{00A1}{\exclamdown} + \DeclareUnicodeCharacter{00A3}{\pounds} + \DeclareUnicodeCharacter{00A8}{\"{ }} + \DeclareUnicodeCharacter{00A9}{\copyright} + \DeclareUnicodeCharacter{00AA}{\ordf} + \DeclareUnicodeCharacter{00AB}{\guillemetleft} + \DeclareUnicodeCharacter{00AD}{\-} + \DeclareUnicodeCharacter{00AE}{\registeredsymbol} + \DeclareUnicodeCharacter{00AF}{\={ }} + + \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} + \DeclareUnicodeCharacter{00B4}{\'{ }} + \DeclareUnicodeCharacter{00B8}{\cedilla{ }} + \DeclareUnicodeCharacter{00BA}{\ordm} + \DeclareUnicodeCharacter{00BB}{\guillemetright} + \DeclareUnicodeCharacter{00BF}{\questiondown} + + \DeclareUnicodeCharacter{00C0}{\`A} + \DeclareUnicodeCharacter{00C1}{\'A} + \DeclareUnicodeCharacter{00C2}{\^A} + \DeclareUnicodeCharacter{00C3}{\~A} + \DeclareUnicodeCharacter{00C4}{\"A} + \DeclareUnicodeCharacter{00C5}{\AA} + \DeclareUnicodeCharacter{00C6}{\AE} + \DeclareUnicodeCharacter{00C7}{\cedilla{C}} + \DeclareUnicodeCharacter{00C8}{\`E} + \DeclareUnicodeCharacter{00C9}{\'E} + \DeclareUnicodeCharacter{00CA}{\^E} + \DeclareUnicodeCharacter{00CB}{\"E} + \DeclareUnicodeCharacter{00CC}{\`I} + \DeclareUnicodeCharacter{00CD}{\'I} + \DeclareUnicodeCharacter{00CE}{\^I} + \DeclareUnicodeCharacter{00CF}{\"I} + + \DeclareUnicodeCharacter{00D0}{\DH} + \DeclareUnicodeCharacter{00D1}{\~N} + \DeclareUnicodeCharacter{00D2}{\`O} + \DeclareUnicodeCharacter{00D3}{\'O} + \DeclareUnicodeCharacter{00D4}{\^O} + \DeclareUnicodeCharacter{00D5}{\~O} + \DeclareUnicodeCharacter{00D6}{\"O} + \DeclareUnicodeCharacter{00D8}{\O} + \DeclareUnicodeCharacter{00D9}{\`U} + \DeclareUnicodeCharacter{00DA}{\'U} + \DeclareUnicodeCharacter{00DB}{\^U} + \DeclareUnicodeCharacter{00DC}{\"U} + \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DE}{\TH} + \DeclareUnicodeCharacter{00DF}{\ss} + + \DeclareUnicodeCharacter{00E0}{\`a} + \DeclareUnicodeCharacter{00E1}{\'a} + \DeclareUnicodeCharacter{00E2}{\^a} + \DeclareUnicodeCharacter{00E3}{\~a} + \DeclareUnicodeCharacter{00E4}{\"a} + \DeclareUnicodeCharacter{00E5}{\aa} + \DeclareUnicodeCharacter{00E6}{\ae} + \DeclareUnicodeCharacter{00E7}{\cedilla{c}} + \DeclareUnicodeCharacter{00E8}{\`e} + \DeclareUnicodeCharacter{00E9}{\'e} + \DeclareUnicodeCharacter{00EA}{\^e} + \DeclareUnicodeCharacter{00EB}{\"e} + \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} + \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} + \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} + \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + + \DeclareUnicodeCharacter{00F0}{\dh} + \DeclareUnicodeCharacter{00F1}{\~n} + \DeclareUnicodeCharacter{00F2}{\`o} + \DeclareUnicodeCharacter{00F3}{\'o} + \DeclareUnicodeCharacter{00F4}{\^o} + \DeclareUnicodeCharacter{00F5}{\~o} + \DeclareUnicodeCharacter{00F6}{\"o} + \DeclareUnicodeCharacter{00F8}{\o} + \DeclareUnicodeCharacter{00F9}{\`u} + \DeclareUnicodeCharacter{00FA}{\'u} + \DeclareUnicodeCharacter{00FB}{\^u} + \DeclareUnicodeCharacter{00FC}{\"u} + \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FE}{\th} + \DeclareUnicodeCharacter{00FF}{\"y} + + \DeclareUnicodeCharacter{0100}{\=A} + \DeclareUnicodeCharacter{0101}{\=a} + \DeclareUnicodeCharacter{0102}{\u{A}} + \DeclareUnicodeCharacter{0103}{\u{a}} + \DeclareUnicodeCharacter{0104}{\ogonek{A}} + \DeclareUnicodeCharacter{0105}{\ogonek{a}} + \DeclareUnicodeCharacter{0106}{\'C} + \DeclareUnicodeCharacter{0107}{\'c} + \DeclareUnicodeCharacter{0108}{\^C} + \DeclareUnicodeCharacter{0109}{\^c} + \DeclareUnicodeCharacter{0118}{\ogonek{E}} + \DeclareUnicodeCharacter{0119}{\ogonek{e}} + \DeclareUnicodeCharacter{010A}{\dotaccent{C}} + \DeclareUnicodeCharacter{010B}{\dotaccent{c}} + \DeclareUnicodeCharacter{010C}{\v{C}} + \DeclareUnicodeCharacter{010D}{\v{c}} + \DeclareUnicodeCharacter{010E}{\v{D}} + + \DeclareUnicodeCharacter{0112}{\=E} + \DeclareUnicodeCharacter{0113}{\=e} + \DeclareUnicodeCharacter{0114}{\u{E}} + \DeclareUnicodeCharacter{0115}{\u{e}} + \DeclareUnicodeCharacter{0116}{\dotaccent{E}} + \DeclareUnicodeCharacter{0117}{\dotaccent{e}} + \DeclareUnicodeCharacter{011A}{\v{E}} + \DeclareUnicodeCharacter{011B}{\v{e}} + \DeclareUnicodeCharacter{011C}{\^G} + \DeclareUnicodeCharacter{011D}{\^g} + \DeclareUnicodeCharacter{011E}{\u{G}} + \DeclareUnicodeCharacter{011F}{\u{g}} + + \DeclareUnicodeCharacter{0120}{\dotaccent{G}} + \DeclareUnicodeCharacter{0121}{\dotaccent{g}} + \DeclareUnicodeCharacter{0124}{\^H} + \DeclareUnicodeCharacter{0125}{\^h} + \DeclareUnicodeCharacter{0128}{\~I} + \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} + \DeclareUnicodeCharacter{012A}{\=I} + \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} + \DeclareUnicodeCharacter{012C}{\u{I}} + \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} + + \DeclareUnicodeCharacter{0130}{\dotaccent{I}} + \DeclareUnicodeCharacter{0131}{\dotless{i}} + \DeclareUnicodeCharacter{0132}{IJ} + \DeclareUnicodeCharacter{0133}{ij} + \DeclareUnicodeCharacter{0134}{\^J} + \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} + \DeclareUnicodeCharacter{0139}{\'L} + \DeclareUnicodeCharacter{013A}{\'l} + + \DeclareUnicodeCharacter{0141}{\L} + \DeclareUnicodeCharacter{0142}{\l} + \DeclareUnicodeCharacter{0143}{\'N} + \DeclareUnicodeCharacter{0144}{\'n} + \DeclareUnicodeCharacter{0147}{\v{N}} + \DeclareUnicodeCharacter{0148}{\v{n}} + \DeclareUnicodeCharacter{014C}{\=O} + \DeclareUnicodeCharacter{014D}{\=o} + \DeclareUnicodeCharacter{014E}{\u{O}} + \DeclareUnicodeCharacter{014F}{\u{o}} + + \DeclareUnicodeCharacter{0150}{\H{O}} + \DeclareUnicodeCharacter{0151}{\H{o}} + \DeclareUnicodeCharacter{0152}{\OE} + \DeclareUnicodeCharacter{0153}{\oe} + \DeclareUnicodeCharacter{0154}{\'R} + \DeclareUnicodeCharacter{0155}{\'r} + \DeclareUnicodeCharacter{0158}{\v{R}} + \DeclareUnicodeCharacter{0159}{\v{r}} + \DeclareUnicodeCharacter{015A}{\'S} + \DeclareUnicodeCharacter{015B}{\'s} + \DeclareUnicodeCharacter{015C}{\^S} + \DeclareUnicodeCharacter{015D}{\^s} + \DeclareUnicodeCharacter{015E}{\cedilla{S}} + \DeclareUnicodeCharacter{015F}{\cedilla{s}} + + \DeclareUnicodeCharacter{0160}{\v{S}} + \DeclareUnicodeCharacter{0161}{\v{s}} + \DeclareUnicodeCharacter{0162}{\cedilla{t}} + \DeclareUnicodeCharacter{0163}{\cedilla{T}} + \DeclareUnicodeCharacter{0164}{\v{T}} + + \DeclareUnicodeCharacter{0168}{\~U} + \DeclareUnicodeCharacter{0169}{\~u} + \DeclareUnicodeCharacter{016A}{\=U} + \DeclareUnicodeCharacter{016B}{\=u} + \DeclareUnicodeCharacter{016C}{\u{U}} + \DeclareUnicodeCharacter{016D}{\u{u}} + \DeclareUnicodeCharacter{016E}{\ringaccent{U}} + \DeclareUnicodeCharacter{016F}{\ringaccent{u}} + + \DeclareUnicodeCharacter{0170}{\H{U}} + \DeclareUnicodeCharacter{0171}{\H{u}} + \DeclareUnicodeCharacter{0174}{\^W} + \DeclareUnicodeCharacter{0175}{\^w} + \DeclareUnicodeCharacter{0176}{\^Y} + \DeclareUnicodeCharacter{0177}{\^y} + \DeclareUnicodeCharacter{0178}{\"Y} + \DeclareUnicodeCharacter{0179}{\'Z} + \DeclareUnicodeCharacter{017A}{\'z} + \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} + \DeclareUnicodeCharacter{017C}{\dotaccent{z}} + \DeclareUnicodeCharacter{017D}{\v{Z}} + \DeclareUnicodeCharacter{017E}{\v{z}} + + \DeclareUnicodeCharacter{01C4}{D\v{Z}} + \DeclareUnicodeCharacter{01C5}{D\v{z}} + \DeclareUnicodeCharacter{01C6}{d\v{z}} + \DeclareUnicodeCharacter{01C7}{LJ} + \DeclareUnicodeCharacter{01C8}{Lj} + \DeclareUnicodeCharacter{01C9}{lj} + \DeclareUnicodeCharacter{01CA}{NJ} + \DeclareUnicodeCharacter{01CB}{Nj} + \DeclareUnicodeCharacter{01CC}{nj} + \DeclareUnicodeCharacter{01CD}{\v{A}} + \DeclareUnicodeCharacter{01CE}{\v{a}} + \DeclareUnicodeCharacter{01CF}{\v{I}} + + \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} + \DeclareUnicodeCharacter{01D1}{\v{O}} + \DeclareUnicodeCharacter{01D2}{\v{o}} + \DeclareUnicodeCharacter{01D3}{\v{U}} + \DeclareUnicodeCharacter{01D4}{\v{u}} + + \DeclareUnicodeCharacter{01E2}{\={\AE}} + \DeclareUnicodeCharacter{01E3}{\={\ae}} + \DeclareUnicodeCharacter{01E6}{\v{G}} + \DeclareUnicodeCharacter{01E7}{\v{g}} + \DeclareUnicodeCharacter{01E8}{\v{K}} + \DeclareUnicodeCharacter{01E9}{\v{k}} + + \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} + \DeclareUnicodeCharacter{01F1}{DZ} + \DeclareUnicodeCharacter{01F2}{Dz} + \DeclareUnicodeCharacter{01F3}{dz} + \DeclareUnicodeCharacter{01F4}{\'G} + \DeclareUnicodeCharacter{01F5}{\'g} + \DeclareUnicodeCharacter{01F8}{\`N} + \DeclareUnicodeCharacter{01F9}{\`n} + \DeclareUnicodeCharacter{01FC}{\'{\AE}} + \DeclareUnicodeCharacter{01FD}{\'{\ae}} + \DeclareUnicodeCharacter{01FE}{\'{\O}} + \DeclareUnicodeCharacter{01FF}{\'{\o}} + + \DeclareUnicodeCharacter{021E}{\v{H}} + \DeclareUnicodeCharacter{021F}{\v{h}} + + \DeclareUnicodeCharacter{0226}{\dotaccent{A}} + \DeclareUnicodeCharacter{0227}{\dotaccent{a}} + \DeclareUnicodeCharacter{0228}{\cedilla{E}} + \DeclareUnicodeCharacter{0229}{\cedilla{e}} + \DeclareUnicodeCharacter{022E}{\dotaccent{O}} + \DeclareUnicodeCharacter{022F}{\dotaccent{o}} + + \DeclareUnicodeCharacter{0232}{\=Y} + \DeclareUnicodeCharacter{0233}{\=y} + \DeclareUnicodeCharacter{0237}{\dotless{j}} + + \DeclareUnicodeCharacter{02DB}{\ogonek{ }} + + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} + \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} + \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} + \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} + \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} + \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} + \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} + \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} + \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} + \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} + \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} + \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} + + \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} + \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} + + \DeclareUnicodeCharacter{1E20}{\=G} + \DeclareUnicodeCharacter{1E21}{\=g} + \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} + \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} + \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} + \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} + \DeclareUnicodeCharacter{1E26}{\"H} + \DeclareUnicodeCharacter{1E27}{\"h} + + \DeclareUnicodeCharacter{1E30}{\'K} + \DeclareUnicodeCharacter{1E31}{\'k} + \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} + \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} + \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} + \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} + \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} + \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} + \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} + \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} + \DeclareUnicodeCharacter{1E3E}{\'M} + \DeclareUnicodeCharacter{1E3F}{\'m} + + \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} + \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} + \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} + \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} + \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} + \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} + \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} + \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} + \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} + \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} + + \DeclareUnicodeCharacter{1E54}{\'P} + \DeclareUnicodeCharacter{1E55}{\'p} + \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} + \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} + \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} + \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} + \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} + \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} + \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} + \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} + + \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} + \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} + \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} + \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} + \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} + \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} + \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} + \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} + \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} + \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} + + \DeclareUnicodeCharacter{1E7C}{\~V} + \DeclareUnicodeCharacter{1E7D}{\~v} + \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} + \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} + + \DeclareUnicodeCharacter{1E80}{\`W} + \DeclareUnicodeCharacter{1E81}{\`w} + \DeclareUnicodeCharacter{1E82}{\'W} + \DeclareUnicodeCharacter{1E83}{\'w} + \DeclareUnicodeCharacter{1E84}{\"W} + \DeclareUnicodeCharacter{1E85}{\"w} + \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} + \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} + \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} + \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} + \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} + \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} + \DeclareUnicodeCharacter{1E8C}{\"X} + \DeclareUnicodeCharacter{1E8D}{\"x} + \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} + \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} + + \DeclareUnicodeCharacter{1E90}{\^Z} + \DeclareUnicodeCharacter{1E91}{\^z} + \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} + \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} + \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} + \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} + \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} + \DeclareUnicodeCharacter{1E97}{\"t} + \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} + \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} + + \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} + \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} + + \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} + \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} + \DeclareUnicodeCharacter{1EBC}{\~E} + \DeclareUnicodeCharacter{1EBD}{\~e} + + \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} + \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} + \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} + \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} + + \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} + \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} + + \DeclareUnicodeCharacter{1EF2}{\`Y} + \DeclareUnicodeCharacter{1EF3}{\`y} + \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} + + \DeclareUnicodeCharacter{1EF8}{\~Y} + \DeclareUnicodeCharacter{1EF9}{\~y} + + \DeclareUnicodeCharacter{2013}{--} + \DeclareUnicodeCharacter{2014}{---} + \DeclareUnicodeCharacter{2018}{\quoteleft} + \DeclareUnicodeCharacter{2019}{\quoteright} + \DeclareUnicodeCharacter{201A}{\quotesinglbase} + \DeclareUnicodeCharacter{201C}{\quotedblleft} + \DeclareUnicodeCharacter{201D}{\quotedblright} + \DeclareUnicodeCharacter{201E}{\quotedblbase} + \DeclareUnicodeCharacter{2022}{\bullet} + \DeclareUnicodeCharacter{2026}{\dots} + \DeclareUnicodeCharacter{2039}{\guilsinglleft} + \DeclareUnicodeCharacter{203A}{\guilsinglright} + \DeclareUnicodeCharacter{20AC}{\euro} + + \DeclareUnicodeCharacter{2192}{\expansion} + \DeclareUnicodeCharacter{21D2}{\result} + + \DeclareUnicodeCharacter{2212}{\minus} + \DeclareUnicodeCharacter{2217}{\point} + \DeclareUnicodeCharacter{2261}{\equiv} +}% end of \utfeightchardefs + + +% US-ASCII character definitions. +\def\asciichardefs{% nothing need be done + \relax +} + +% Make non-ASCII characters printable again for compatibility with +% existing Texinfo documents that may use them, even without declaring a +% document encoding. +% +\setnonasciicharscatcode \other + + +\message{formatting,} + +\newdimen\defaultparindent \defaultparindent = 15pt + +\chapheadingskip = 15pt plus 4pt minus 2pt +\secheadingskip = 12pt plus 3pt minus 2pt +\subsecheadingskip = 9pt plus 2pt minus 2pt + +% Prevent underfull vbox error messages. +\vbadness = 10000 + +% Don't be very finicky about underfull hboxes, either. +\hbadness = 6666 + +% Following George Bush, get rid of widows and orphans. +\widowpenalty=10000 +\clubpenalty=10000 + +% Use TeX 3.0's \emergencystretch to help line breaking, but if we're +% using an old version of TeX, don't do anything. We want the amount of +% stretch added to depend on the line length, hence the dependence on +% \hsize. We call this whenever the paper size is set. +% +\def\setemergencystretch{% + \ifx\emergencystretch\thisisundefined + % Allow us to assign to \emergencystretch anyway. + \def\emergencystretch{\dimen0}% + \else + \emergencystretch = .15\hsize + \fi +} + +% Parameters in order: 1) textheight; 2) textwidth; +% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; +% 7) physical page height; 8) physical page width. +% +% We also call \setleading{\textleading}, so the caller should define +% \textleading. The caller should also set \parskip. +% +\def\internalpagesizes#1#2#3#4#5#6#7#8{% + \voffset = #3\relax + \topskip = #6\relax + \splittopskip = \topskip + % + \vsize = #1\relax + \advance\vsize by \topskip + \outervsize = \vsize + \advance\outervsize by 2\topandbottommargin + \pageheight = \vsize + % + \hsize = #2\relax + \outerhsize = \hsize + \advance\outerhsize by 0.5in + \pagewidth = \hsize + % + \normaloffset = #4\relax + \bindingoffset = #5\relax + % + \ifpdf + \pdfpageheight #7\relax + \pdfpagewidth #8\relax + % if we don't reset these, they will remain at "1 true in" of + % whatever layout pdftex was dumped with. + \pdfhorigin = 1 true in + \pdfvorigin = 1 true in + \fi + % + \setleading{\textleading} + % + \parindent = \defaultparindent + \setemergencystretch +} + +% @letterpaper (the default). +\def\letterpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % If page is nothing but text, make it come out even. + \internalpagesizes{607.2pt}{6in}% that's 46 lines + {\voffset}{.25in}% + {\bindingoffset}{36pt}% + {11in}{8.5in}% +}} + +% Use @smallbook to reset parameters for 7x9.25 trim size. +\def\smallbook{{\globaldefs = 1 + \parskip = 2pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.5in}{5in}% + {-.2in}{0in}% + {\bindingoffset}{16pt}% + {9.25in}{7in}% + % + \lispnarrowing = 0.3in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .5cm +}} + +% Use @smallerbook to reset parameters for 6x9 trim size. +% (Just testing, parameters still in flux.) +\def\smallerbook{{\globaldefs = 1 + \parskip = 1.5pt plus 1pt + \textleading = 12pt + % + \internalpagesizes{7.4in}{4.8in}% + {-.2in}{-.4in}% + {0pt}{14pt}% + {9in}{6in}% + % + \lispnarrowing = 0.25in + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = .4cm +}} + +% Use @afourpaper to print on European A4 paper. +\def\afourpaper{{\globaldefs = 1 + \parskip = 3pt plus 2pt minus 1pt + \textleading = 13.2pt + % + % Double-side printing via postscript on Laserjet 4050 + % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. + % To change the settings for a different printer or situation, adjust + % \normaloffset until the front-side and back-side texts align. Then + % do the same for \bindingoffset. You can set these for testing in + % your texinfo source file like this: + % @tex + % \global\normaloffset = -6mm + % \global\bindingoffset = 10mm + % @end tex + \internalpagesizes{673.2pt}{160mm}% that's 51 lines + {\voffset}{\hoffset}% + {\bindingoffset}{44pt}% + {297mm}{210mm}% + % + \tolerance = 700 + \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = 5mm +}} + +% Use @afivepaper to print on European A5 paper. +% From romildo@urano.iceb.ufop.br, 2 July 2000. +% He also recommends making @example and @lisp be small. +\def\afivepaper{{\globaldefs = 1 + \parskip = 2pt plus 1pt minus 0.1pt + \textleading = 12.5pt + % + \internalpagesizes{160mm}{120mm}% + {\voffset}{\hoffset}% + {\bindingoffset}{8pt}% + {210mm}{148mm}% + % + \lispnarrowing = 0.2in + \tolerance = 800 + \hfuzz = 1.2pt + \contentsrightmargin = 0pt + \defbodyindent = 2mm + \tableindent = 12mm +}} + +% A specific text layout, 24x15cm overall, intended for A4 paper. +\def\afourlatex{{\globaldefs = 1 + \afourpaper + \internalpagesizes{237mm}{150mm}% + {\voffset}{4.6mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + % + % Must explicitly reset to 0 because we call \afourpaper. + \globaldefs = 0 +}} + +% Use @afourwide to print on A4 paper in landscape format. +\def\afourwide{{\globaldefs = 1 + \afourpaper + \internalpagesizes{241mm}{165mm}% + {\voffset}{-2.95mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + \globaldefs = 0 +}} + +% @pagesizes TEXTHEIGHT[,TEXTWIDTH] +% Perhaps we should allow setting the margins, \topskip, \parskip, +% and/or leading, also. Or perhaps we should compute them somehow. +% +\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} +\def\pagesizesyyy#1,#2,#3\finish{{% + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi + \globaldefs = 1 + % + \parskip = 3pt plus 2pt minus 1pt + \setleading{\textleading}% + % + \dimen0 = #1\relax + \advance\dimen0 by \voffset + % + \dimen2 = \hsize + \advance\dimen2 by \normaloffset + % + \internalpagesizes{#1}{\hsize}% + {\voffset}{\normaloffset}% + {\bindingoffset}{44pt}% + {\dimen0}{\dimen2}% +}} + +% Set default to letter. +% +\letterpaper + + +\message{and turning on texinfo input format.} + +\def^^L{\par} % remove \outer, so ^L can appear in an @comment + +% DEL is a comment character, in case @c does not suffice. +\catcode`\^^? = 14 + +% Define macros to output various characters with catcode for normal text. +\catcode`\"=\other \def\normaldoublequote{"} +\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix +\catcode`\+=\other \def\normalplus{+} +\catcode`\<=\other \def\normalless{<} +\catcode`\>=\other \def\normalgreater{>} +\catcode`\^=\other \def\normalcaret{^} +\catcode`\_=\other \def\normalunderscore{_} +\catcode`\|=\other \def\normalverticalbar{|} +\catcode`\~=\other \def\normaltilde{~} + +% This macro is used to make a character print one way in \tt +% (where it can probably be output as-is), and another way in other fonts, +% where something hairier probably needs to be done. +% +% #1 is what to print if we are indeed using \tt; #2 is what to print +% otherwise. Since all the Computer Modern typewriter fonts have zero +% interword stretch (and shrink), and it is reasonable to expect all +% typewriter fonts to have this, we can check that font parameter. +% +\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} + +% Same as above, but check for italic font. Actually this also catches +% non-italic slanted fonts since it is impossible to distinguish them from +% italic fonts. But since this is only used by $ and it uses \sl anyway +% this is not a problem. +\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} + +% Turn off all special characters except @ +% (and those which the user can use as if they were ordinary). +% Most of these we simply print from the \tt font, but for some, we can +% use math or other variants that look better in normal text. + +\catcode`\"=\active +\def\activedoublequote{{\tt\char34}} +\let"=\activedoublequote +\catcode`\~=\active +\def~{{\tt\char126}} +\chardef\hat=`\^ +\catcode`\^=\active +\def^{{\tt \hat}} + +\catcode`\_=\active +\def_{\ifusingtt\normalunderscore\_} +\let\realunder=_ +% Subroutine for the previous macro. +\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } + +\catcode`\|=\active +\def|{{\tt\char124}} +\chardef \less=`\< +\catcode`\<=\active +\def<{{\tt \less}} +\chardef \gtr=`\> +\catcode`\>=\active +\def>{{\tt \gtr}} +\catcode`\+=\active +\def+{{\tt \char 43}} +\catcode`\$=\active +\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix + +% If a .fmt file is being used, characters that might appear in a file +% name cannot be active until we have parsed the command line. +% So turn them off again, and have \everyjob (or @setfilename) turn them on. +% \otherifyactive is called near the end of this file. +\def\otherifyactive{\catcode`+=\other \catcode`\_=\other} + +% Used sometimes to turn off (effectively) the active characters even after +% parsing them. +\def\turnoffactive{% + \normalturnoffactive + \otherbackslash +} + +\catcode`\@=0 + +% \backslashcurfont outputs one backslash character in current font, +% as in \char`\\. +\global\chardef\backslashcurfont=`\\ +\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work + +% \realbackslash is an actual character `\' with catcode other, and +% \doublebackslash is two of them (for the pdf outlines). +{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} + +% In texinfo, backslash is an active character; it prints the backslash +% in fixed width font. +\catcode`\\=\active % @ for escape char from now on. + +% The story here is that in math mode, the \char of \backslashcurfont +% ends up printing the roman \ from the math symbol font (because \char +% in math mode uses the \mathcode, and plain.tex sets +% \mathcode`\\="026E). It seems better for @backslashchar{} to always +% print a typewriter backslash, hence we use an explicit \mathchar, +% which is the decimal equivalent of "715c (class 7, e.g., use \fam; +% ignored family value; char position "5C). We can't use " for the +% usual hex value because it has already been made active. +@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} +@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. + +% On startup, @fixbackslash assigns: +% @let \ = @normalbackslash +% \rawbackslash defines an active \ to do \backslashcurfont. +% \otherbackslash defines an active \ to be a literal `\' character with +% catcode other. We switch back and forth between these. +@gdef@rawbackslash{@let\=@backslashcurfont} +@gdef@otherbackslash{@let\=@realbackslash} + +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. +% +@def@normalturnoffactive{% + @let"=@normaldoublequote + @let$=@normaldollar %$ font-lock fix + @let+=@normalplus + @let<=@normalless + @let>=@normalgreater + @let\=@normalbackslash + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let~=@normaltilde + @markupsetuplqdefault + @markupsetuprqdefault + @unsepspaces +} + +% Make _ and + \other characters, temporarily. +% This is canceled by @fixbackslash. +@otherifyactive + +% If a .fmt file is being used, we don't want the `\input texinfo' to show up. +% That is what \eatinput is for; after that, the `\' should revert to printing +% a backslash. +% +@gdef@eatinput input texinfo{@fixbackslash} +@global@let\ = @eatinput + +% On the other hand, perhaps the file did not have a `\input texinfo'. Then +% the first `\' in the file would cause an error. This macro tries to fix +% that, assuming it is called before the first `\' could plausibly occur. +% Also turn back on active characters that might appear in the input +% file name, in case not using a pre-dumped format. +% +@gdef@fixbackslash{% + @ifx\@eatinput @let\ = @normalbackslash @fi + @catcode`+=@active + @catcode`@_=@active +} + +% Say @foo, not \foo, in error messages. +@escapechar = `@@ + +% These (along with & and #) are made active for url-breaking, so need +% active definitions as the normal characters. +@def@normaldot{.} +@def@normalquest{?} +@def@normalslash{/} + +% These look ok in all fonts, so just make them not special. +% @hashchar{} gets its own user-level command, because of #line. +@catcode`@& = @other @def@normalamp{&} +@catcode`@# = @other @def@normalhash{#} +@catcode`@% = @other @def@normalpercent{%} + +@let @hashchar = @normalhash + +@c Finally, make ` and ' active, so that txicodequoteundirected and +@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we +@c don't make ` and ' active, @code will not get them as active chars. +@c Do this last of all since we use ` in the previous @catcode assignments. +@catcode`@'=@active +@catcode`@`=@active +@markupsetuplqdefault +@markupsetuprqdefault + +@c Local variables: +@c eval: (add-hook 'write-file-hooks 'time-stamp) +@c page-delimiter: "^\\\\message" +@c time-stamp-start: "def\\\\texinfoversion{" +@c time-stamp-format: "%:y-%02m-%02d.%02H" +@c time-stamp-end: "}" +@c End: + +@c vim:sw=2: + +@ignore + arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 +@end ignore diff --git a/cfg.mk b/cfg.mk new file mode 100644 index 0000000..e79ff55 --- /dev/null +++ b/cfg.mk @@ -0,0 +1,141 @@ +# Customize maint.mk for Autoconf. -*- Makefile -*- +# Copyright (C) 2003-2004, 2006, 2008-2012 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 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/>. + +# This file is '-include'd into GNUmakefile. + +# Build with our own versions of these tools, when possible. +export PATH = $(shell echo "`pwd`/tests:$$PATH") + +# Remove the autoreconf-provided INSTALL, so that we regenerate it. +_autoreconf = autoreconf -i -v && rm -f INSTALL + +# Used in maint.mk's web-manual rule +manual_title = Creating Automatic Configuration Scripts + +# The local directory containing the checked-out copy of gnulib used +# in this release (override the default). The $GNULIB_SRCDIR variable +# is also honored by the gnulib-provided bootstrap script, so using it +# here is consistent. +gnulib_dir = $${GNULIB_SRCDIR-'$(abs_srcdir)'/../gnulib} + +# The bootstrap tools (override the default). +bootstrap-tools = automake + +# Set preferred lists for announcements. + +announcement_Cc_ = $(PACKAGE_BUGREPORT), autotools-announce@gnu.org +announcement_mail-alpha = autoconf@gnu.org +announcement_mail-beta = autoconf@gnu.org +announcement_mail-stable = info-gnu@gnu.org, autoconf@gnu.org +announcement_mail_headers_ = \ +To: $(announcement_mail-$(RELEASE_TYPE)) \ +CC: $(announcement_Cc_) \ +Mail-Followup-To: autoconf@gnu.org + +# Update files from gnulib. +.PHONY: fetch gnulib-update autom4te-update +fetch: gnulib-update autom4te-update + +gnulib-update: + cp $(gnulib_dir)/build-aux/announce-gen $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/config.guess $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/config.sub $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/elisp-comp $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/gendocs.sh $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/git-version-gen $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/gitlog-to-changelog $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/gnupload $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/install-sh $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/mdate-sh $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/missing $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/move-if-change $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/texinfo.tex $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/update-copyright $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/useless-if-before-free $(srcdir)/build-aux + cp $(gnulib_dir)/build-aux/vc-list-files $(srcdir)/build-aux + cp $(gnulib_dir)/doc/fdl.texi $(srcdir)/doc + cp $(gnulib_dir)/doc/gendocs_template $(srcdir)/doc + cp $(gnulib_dir)/doc/gnu-oids.texi $(srcdir)/doc + cp $(gnulib_dir)/doc/make-stds.texi $(srcdir)/doc + cp $(gnulib_dir)/doc/standards.texi $(srcdir)/doc + cp $(gnulib_dir)/m4/autobuild.m4 $(srcdir)/m4 + cp $(gnulib_dir)/top/GNUmakefile $(srcdir) + cp $(gnulib_dir)/top/maint.mk $(srcdir) + +WGET = wget +WGETFLAGS = -C off + +## Fetch the latest versions of files we care about. +automake_gitweb = \ + http://git.savannah.gnu.org/gitweb/?p=automake.git;a=blob_plain;hb=HEAD; +autom4te_files = \ + Autom4te/Configure_ac.pm \ + Autom4te/Channels.pm \ + Autom4te/FileUtils.pm \ + Autom4te/Getopt.pm \ + Autom4te/XFile.pm + +move_if_change = '$(abs_srcdir)'/build-aux/move-if-change + +autom4te-update: + rm -fr Fetchdir > /dev/null 2>&1 + mkdir -p Fetchdir/Autom4te + for file in $(autom4te_files); do \ + infile=`echo $$file | sed 's/Autom4te/Automake/g'`; \ + $(WGET) $(WGET_FLAGS) \ + "$(automake_gitweb)f=lib/$$infile" \ + -O "Fetchdir/$$file" || exit; \ + done + perl -pi -e 's/Automake::/Autom4te::/g' Fetchdir/Autom4te/*.pm + for file in $(autom4te_files); do \ + $(move_if_change) Fetchdir/$$file $(srcdir)/lib/$$file || exit; \ + done + rm -fr Fetchdir > /dev/null 2>&1 + +# Tests not to run. +local-checks-to-skip ?= \ + changelog-check \ + sc_GPL_version \ + sc_cast_of_alloca_return_value \ + sc_m4_quote_check \ + sc_makefile_at_at_check \ + sc_prohibit_HAVE_MBRTOWC \ + sc_prohibit_always-defined_macros \ + sc_prohibit_always_true_header_tests \ + sc_prohibit_magic_number_exit \ + sc_prohibit_stat_st_blocks \ + sc_unmarked_diagnostics + + +# Always use shorthand copyrights. +update-copyright-env = \ + UPDATE_COPYRIGHT_USE_INTERVALS=1 \ + UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72 + +# Prevent incorrect NEWS edits. +old_NEWS_hash = 54ad39275441a2a3fcbe6182da4f84fb + +exclude_file_name_regexp--sc_prohibit_undesirable_word_seq = \ + ^(maint\.mk|build-aux/texinfo\.tex)$$ +exclude_file_name_regexp--sc_prohibit_test_minus_ao = \ + ^(maint\.mk|doc/autoconf\.texi)$$ +exclude_file_name_regexp--sc_prohibit_atoi_atof = ^doc/autoconf\.texi$$ +exclude_file_name_regexp--sc_useless_cpp_parens = \ + ^(build-aux/config\.guess|doc/standards\.texi)$$ +exclude_file_name_regexp--sc_trailing_blank = ^build-aux/texinfo\.tex$$ +exclude_file_name_regexp--sc_two_space_separator_in_usage = \ + ^build-aux/gnupload$$ diff --git a/configure b/configure new file mode 100755 index 0000000..402f0fb --- /dev/null +++ b/configure @@ -0,0 +1,4390 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for GNU Autoconf 2.69. +# +# Report bugs to <bug-autoconf@gnu.org>. +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 </dev/null +exec 6>&1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='GNU Autoconf' +PACKAGE_TARNAME='autoconf' +PACKAGE_VERSION='2.69' +PACKAGE_STRING='GNU Autoconf 2.69' +PACKAGE_BUGREPORT='bug-autoconf@gnu.org' +PACKAGE_URL='http://www.gnu.org/software/autoconf/' + +ac_unique_file="lib/autoconf/autoconf.m4" +ac_subst_vars='LTLIBOBJS +LIBOBJS +MAKE_CASE_SENSITIVE_FALSE +MAKE_CASE_SENSITIVE_TRUE +SED +EGREP +GREP +lispdir +EMACSLOADPATH +EMACS +TEST_EMACS +PERL_FLOCK +PERL +HELP2MAN +M4_DEBUGFILE +M4_GNU +M4 +EXPR +ac_cv_dir_trailing_space +ac_cv_unsupported_fs_chars +ac_cv_sh_n_works +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_lispdir +' + ac_precious_vars='build_alias +host_alias +target_alias +M4 +EMACS +EMACSLOADPATH' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures GNU Autoconf 2.69 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/autoconf] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of GNU Autoconf 2.69:";; + esac + cat <<\_ACEOF + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-lispdir override the default lisp directory + +Some influential environment variables: + M4 Location of GNU M4 1.4.6 or later. Defaults to the first program + of `m4', `gm4', or `gnum4' on PATH that meets Autoconf needs. + EMACS the Emacs editor command + EMACSLOADPATH + the Emacs library search path + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to <bug-autoconf@gnu.org>. +GNU Autoconf home page: <http://www.gnu.org/software/autoconf/>. +General help using GNU software: <http://www.gnu.org/gethelp/>. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +GNU Autoconf configure 2.69 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## +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 Autoconf $as_me 2.69, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +ac_aux_dir= +for ac_dir in build-aux "$srcdir"/build-aux; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + +am__api_version='1.11' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='autoconf' + VERSION='2.69' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + + + + + if test -z "$AB_PACKAGE"; then + AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE} + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5 +$as_echo "$as_me: autobuild project... $AB_PACKAGE" >&6;} + + if test -z "$AB_VERSION"; then + AB_VERSION=${PACKAGE_VERSION:-$VERSION} + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5 +$as_echo "$as_me: autobuild revision... $AB_VERSION" >&6;} + + hostname=`hostname` + if test "$hostname"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5 +$as_echo "$as_me: autobuild hostname... $hostname" >&6;} + fi + + + + date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ` + if test "$?" != 0; then + date=`date` + fi + if test "$date"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5 +$as_echo "$as_me: autobuild timestamp... $date" >&6;} + fi + + +# We use `/bin/sh -n script' to check that there are no syntax errors +# in the scripts. Although incredible, there are /bin/sh that go into +# endless loops with `-n', e.g., SunOS's: +# +# $ uname -a +# SunOS ondine 4.1.3 2 sun4m unknown +# $ cat endless.sh +# while false +# do +# : +# done +# exit 0 +# $ time sh endless.sh +# sh endless.sh 0,02s user 0,03s system 78% cpu 0,064 total +# $ time sh -nx endless.sh +# ^Csh -nx endless.sh 3,67s user 0,03s system 63% cpu 5,868 total +# +# Also, some implementations of /bin/sh (e.g., Solaris 8) are soooo slow +# that they are unusable on large scripts like our testsuite. + +# So before using `/bin/sh -n' to check our scripts, we first check +# that `/bin/sh -n' is known to not have these problems. + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /bin/sh -n is known to work" >&5 +$as_echo_n "checking whether /bin/sh -n is known to work... " >&6; } +if ${ac_cv_sh_n_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ( + unset BASH_VERSION ZSH_VERSION + /bin/sh -c ' + test -n "${BASH_VERSION+set}" || # Bash + test -n "${KSH_VERSION+set}" || # pdksh + test -n "${ZSH_VERSION+set}" || # zsh + test -n "${.sh.version}" # ksh93; put this last since its syntax is dodgy + ' + ) 2>/dev/null +then ac_cv_sh_n_works=yes +else ac_cv_sh_n_works=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sh_n_works" >&5 +$as_echo "$ac_cv_sh_n_works" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for characters that cannot appear in file names" >&5 +$as_echo_n "checking for characters that cannot appear in file names... " >&6; } +if ${ac_cv_unsupported_fs_chars+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_unsupported_fs_chars= +for c in '\\' \" '<' '>' '*' '?' '|' +do + touch "conftest.t${c}t" 2>/dev/null + test -f "conftest.t${c}t" && rm -f "conftest.t${c}t" && continue + # $c cannot be used in a file name. + ac_cv_unsupported_fs_chars=$ac_cv_unsupported_fs_chars$c +done + +fi + +if test -n "$ac_cv_unsupported_fs_chars"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_unsupported_fs_chars" >&5 +$as_echo "$ac_cv_unsupported_fs_chars" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether directories can have trailing spaces" >&5 +$as_echo_n "checking whether directories can have trailing spaces... " >&6; } +if ${ac_cv_dir_trailing_space+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -rf 'conftest.d ' && mkdir 'conftest.d ' && touch 'conftest.d /tfile' 2>/dev/null +stat=$? +rm -rf 'conftest.d ' +case $stat$? in #( + 00) ac_cv_dir_trailing_space=yes ;; #( + *) ac_cv_dir_trailing_space=no ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dir_trailing_space" >&5 +$as_echo "$ac_cv_dir_trailing_space" >&6; } + + +# Initialize the test suite. +ac_config_commands="$ac_config_commands tests/atconfig" + +ac_config_files="$ac_config_files tests/Makefile tests/atlocal" + +# Extract the first word of "expr", so it can be a program name with args. +set dummy expr; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_EXPR+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $EXPR in + [\\/]* | ?:[\\/]*) + ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +EXPR=$ac_cv_path_EXPR +if test -n "$EXPR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5 +$as_echo "$EXPR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + +## ---- ## +## M4. ## +## ---- ## + +# We use an absolute name for GNU m4 so even if users have another m4 first in +# their path, the installer can configure with a path that has GNU m4 +# on it and get that path embedded in the installed autoconf and +# autoheader scripts. + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU M4 that supports accurate traces" >&5 +$as_echo_n "checking for GNU M4 that supports accurate traces... " >&6; } +if ${ac_cv_path_M4+:} false; then : + $as_echo_n "(cached) " >&6 +else + rm -f conftest.m4f +ac_had_posixly_correct=${POSIXLY_CORRECT:+yes} +{ POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} +if test -z "$M4"; then + ac_path_M4_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in m4 gm4 gnum4; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_M4="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_M4" || continue + # Root out GNU M4 1.4.5, as well as non-GNU m4 that ignore -t, -F. + # Root out GNU M4 1.4.15 with buggy false negative replacement strstr. + # Root out Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 with buggy + # false positive strstr. + ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)' + ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl + ac_snippet=${ac_snippet}${as_nl}if'else(in''dex(..wi.d.,.d.),-1,bug)' + ac_snippet=${ac_snippet}${as_nl}if'else(in''dex(;:11-:12-:12-:12-:12-:12-:12-:12-:12.:12.:12.:12.:12.:12.:12.:12.:12-,:12-:12-:12-:12-:12-:12-:12-:12-),-1,,strstr-bug2)' + test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \ + && test -z "`$as_echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \ + && test -f conftest.m4f \ + && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=: + rm -f conftest.m4f + $ac_path_M4_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_M4"; then + as_fn_error $? "no acceptable m4 could be found in \$PATH. +GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended. +GNU M4 1.4.15 uses a buggy replacement strstr on some systems. +Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug." "$LINENO" 5 + fi +else + ac_cv_path_M4=$M4 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_M4" >&5 +$as_echo "$ac_cv_path_M4" >&6; } + M4=$ac_cv_path_M4 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_cv_path_M4 accepts --gnu" >&5 +$as_echo_n "checking whether $ac_cv_path_M4 accepts --gnu... " >&6; } +if ${ac_cv_prog_gnu_m4_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + case `$M4 --help < /dev/null 2>&1` in + *--gnu*) ac_cv_prog_gnu_m4_gnu=yes ;; + *) ac_cv_prog_gnu_m4_gnu=no ;; + esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_m4_gnu" >&5 +$as_echo "$ac_cv_prog_gnu_m4_gnu" >&6; } + if test "$ac_cv_prog_gnu_m4_gnu" = yes; then + M4_GNU=--gnu + else + M4_GNU= + fi + + if test x$ac_had_posixly_correct = xyes; then + POSIXLY_CORRECT=: + if test $ac_cv_prog_gnu_m4_gnu = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the version of M4 that was found does not support -g" >&5 +$as_echo "$as_me: WARNING: the version of M4 that was found does not support -g" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using it with POSIXLY_CORRECT set may cause problems" >&5 +$as_echo "$as_me: WARNING: using it with POSIXLY_CORRECT set may cause problems" >&2;} + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how m4 supports trace files" >&5 +$as_echo_n "checking how m4 supports trace files... " >&6; } +if ${ac_cv_prog_gnu_m4_debugfile+:} false; then : + $as_echo_n "(cached) " >&6 +else + case `$M4 --help < /dev/null 2>&1` in + *debugfile*) ac_cv_prog_gnu_m4_debugfile=--debugfile ;; + *) ac_cv_prog_gnu_m4_debugfile=--error-output ;; + esac +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_m4_debugfile" >&5 +$as_echo "$ac_cv_prog_gnu_m4_debugfile" >&6; } + M4_DEBUGFILE=$ac_cv_prog_gnu_m4_debugfile + + + +## ----------- ## +## Man pages. ## +## ----------- ## + +ac_config_files="$ac_config_files man/Makefile" + + +HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"} + + + +## ------ ## +## Perl. ## +## ------ ## + +# We use an absolute name for perl so the #! line in autoscan will work. +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "$PERL" = no; then + as_fn_error $? "perl is not found" "$LINENO" 5 +fi +$PERL -e 'require 5.006;' || { + as_fn_error $? "Perl 5.006 or better is required" "$LINENO" 5 +} + +# Find out whether the system supports flock +# Note this test does not try to find out whether it works with this +# particular file system. It merely avoids us running flock on systems +# where that bails out. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PERL Fcntl::flock is implemented" >&5 +$as_echo_n "checking whether $PERL Fcntl::flock is implemented... " >&6; } +if ${ac_cv_perl_flock_implemented+:} false; then : + $as_echo_n "(cached) " >&6 +else + echo lock me > conftest.fil + if $PERL -e 'use Fcntl ":flock"; flock("conftest.fil", LOCK_EX); 1;'; then + ac_cv_perl_flock_implemented=yes + else + ac_cv_perl_flock_implemented=no + fi + rm -f conftest.fil + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_perl_flock_implemented" >&5 +$as_echo "$ac_cv_perl_flock_implemented" >&6; } +PERL_FLOCK=$ac_cv_perl_flock_implemented + + + +## ------- ## +## Emacs. ## +## ------- ## + +ac_config_files="$ac_config_files lib/emacs/Makefile" + +TEST_EMACS=$EMACS +test x"$TEST_EMACS" = xt && TEST_EMACS= +for ac_prog in emacs xemacs +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_TEST_EMACS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$TEST_EMACS"; then + ac_cv_prog_TEST_EMACS="$TEST_EMACS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_TEST_EMACS="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +TEST_EMACS=$ac_cv_prog_TEST_EMACS +if test -n "$TEST_EMACS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_EMACS" >&5 +$as_echo "$TEST_EMACS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$TEST_EMACS" && break +done +test -n "$TEST_EMACS" || TEST_EMACS="no" + + +# autoconf-mode.el and autotest-mode.el do not work with older version of +# Emacs (i.e. 18.x.x). During byte-compilation, Emacs complains: +# "Variable (broken nil) seen on pass 2 of byte compiler but not pass 1" +# We detect this problem here. +if test "$TEST_EMACS" != no; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $TEST_EMACS is sufficiently recent" >&5 +$as_echo_n "checking whether $TEST_EMACS is sufficiently recent... " >&6; } +if ${ac_cv_prog_emacs_ok+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Note: The quoted "EOF" is intentional. It protects the ` in the text. + cat >conftest.el << "EOF" + (defvar broken) + (defun broken-mode () (setq broken-defaults `(broken nil))) +EOF + if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$TEST_EMACS -batch -q -f batch-byte-compile conftest.el 1>&2"; } >&5 + ($TEST_EMACS -batch -q -f batch-byte-compile conftest.el 1>&2) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + ac_cv_prog_emacs_ok=yes +else + ac_cv_prog_emacs_ok=no +fi + rm -f conftest.el conftest.elc +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_emacs_ok" >&5 +$as_echo "$ac_cv_prog_emacs_ok" >&6; } + if test $ac_cv_prog_emacs_ok = no; then : + TEST_EMACS=no +fi +fi + +EMACS=$TEST_EMACS + + + # If set to t, that means we are running in a shell under Emacs. + # If you have an Emacs named "t", then use the full path. + test x"$EMACS" = xt && EMACS= + for ac_prog in emacs xemacs +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_EMACS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$EMACS"; then + ac_cv_prog_EMACS="$EMACS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_EMACS="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +EMACS=$ac_cv_prog_EMACS +if test -n "$EMACS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS" >&5 +$as_echo "$EMACS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$EMACS" && break +done +test -n "$EMACS" || EMACS="no" + + + + +# Check whether --with-lispdir was given. +if test "${with_lispdir+set}" = set; then : + withval=$with_lispdir; lispdir="$withval" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 +$as_echo_n "checking where .elc files should go... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lispdir" >&5 +$as_echo "$lispdir" >&6; } +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where .elc files should go" >&5 +$as_echo_n "checking where .elc files should go... " >&6; } +if ${am_cv_lispdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $EMACS != "no"; then + if test x${lispdir+set} != xset; then + # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly + # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, + # which is non-obvious for non-emacs users. + # Redirecting /dev/null should help a bit; pity we can't detect "broken" + # emacsen earlier and avoid running this altogether. + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) \"\\n\")) (setq load-path (cdr load-path)))' </dev/null >conftest.out"; } >&5 + ($EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + am_cv_lispdir=`sed -n \ + -e 's,/$,,' \ + -e '/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ + -e '/.*\/share\/x*emacs\/site-lisp$/{s,.*/share/\(x*emacs/site-lisp\),${datarootdir}/\1,;p;q;}' \ + conftest.out` + rm conftest.out + fi + fi + test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_lispdir" >&5 +$as_echo "$am_cv_lispdir" >&6; } + lispdir="$am_cv_lispdir" + +fi + + + + + +## ------------ ## +## Grep & sed. ## +## ------------ ## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + + + +## ----- ## +## Make. ## +## ----- ## +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} is case sensitive" >&5 +$as_echo_n "checking whether ${MAKE-make} is case sensitive... " >&6; } +if eval \${ac_cv_prog_make_${ac_make}_case+:} false; then : + $as_echo_n "(cached) " >&6 +else + echo all: >conftest.make +if ${MAKE-make} -f conftest.make ALL >/dev/null 2>&1; then + ac_res=no +else + ac_res=yes +fi +eval ac_cv_prog_make_${ac_make}_case=$ac_res +rm -f conftest.make +fi +eval ac_res=\$ac_cv_prog_make_${ac_make}_case + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \$ac_cv_prog_make_${ac_make}_case = yes; then + MAKE_CASE_SENSITIVE_TRUE= + MAKE_CASE_SENSITIVE_FALSE='#' +else + MAKE_CASE_SENSITIVE_TRUE='#' + MAKE_CASE_SENSITIVE_FALSE= +fi + + + + +## ------------ ## +## Conclusion. ## +## ------------ ## + +GNUmakefile=GNUmakefile +ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile" + + +ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile lib/m4sugar/Makefile lib/autoconf/Makefile lib/autotest/Makefile bin/Makefile" + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +if test -z "${MAKE_CASE_SENSITIVE_TRUE}" && test -z "${MAKE_CASE_SENSITIVE_FALSE}"; then + as_fn_error $? "conditional \"MAKE_CASE_SENSITIVE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by GNU Autoconf $as_me 2.69, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_links="$ac_config_links" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration links: +$config_links + +Configuration commands: +$config_commands + +Report bugs to <bug-autoconf@gnu.org>. +GNU Autoconf home page: <http://www.gnu.org/software/autoconf/>. +General help using GNU software: <http://www.gnu.org/gethelp/>." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +GNU Autoconf config.status 2.69 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# + +GNUmakefile=$GNUmakefile + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;; + "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; + "lib/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/emacs/Makefile" ;; + "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "lib/Autom4te/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Autom4te/Makefile" ;; + "lib/autoscan/Makefile") CONFIG_FILES="$CONFIG_FILES lib/autoscan/Makefile" ;; + "lib/m4sugar/Makefile") CONFIG_FILES="$CONFIG_FILES lib/m4sugar/Makefile" ;; + "lib/autoconf/Makefile") CONFIG_FILES="$CONFIG_FILES lib/autoconf/Makefile" ;; + "lib/autotest/Makefile") CONFIG_FILES="$CONFIG_FILES lib/autotest/Makefile" ;; + "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' <conf$$subs.awk | sed ' +/^[^""]/{ + N + s/\n// +} +' >>$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES :L $CONFIG_LINKS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + :L) + # + # CONFIG_LINK + # + + if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then + : + else + # Prefer the file from the source tree if names are identical. + if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then + ac_source=$srcdir/$ac_source + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 +$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} + + if test ! -r "$ac_source"; then + as_fn_error $? "$ac_source: file not found" "$LINENO" 5 + fi + rm -f "$ac_file" + + # Try a relative symlink, then a hard link, then a copy. + case $ac_source in + [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; + *) ac_rel_source=$ac_top_build_prefix$ac_source ;; + esac + ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || + ln "$ac_source" "$ac_file" 2>/dev/null || + cp -p "$ac_source" "$ac_file" || + as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 + fi + ;; + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "tests/atconfig":C) cat >tests/atconfig <<ATEOF +# Configurable variable values for building test suites. +# Generated by $0. +# Copyright (C) 2012 Free Software Foundation, Inc. + +# The test suite will define top_srcdir=$at_top_srcdir/../.. etc. +at_testdir='tests' +abs_builddir='$ac_abs_builddir' +at_srcdir='$ac_srcdir' +abs_srcdir='$ac_abs_srcdir' +at_top_srcdir='$ac_top_srcdir' +abs_top_srcdir='$ac_abs_top_srcdir' +at_top_build_prefix='$ac_top_build_prefix' +abs_top_builddir='$ac_abs_top_builddir' + +# Backward compatibility with Autotest <= 2.59b: +at_top_builddir=\$at_top_build_prefix + +AUTOTEST_PATH='tests' + +SHELL=\${CONFIG_SHELL-'$SHELL'} +ATEOF + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + +# Report the state of this version of Autoconf if this is a beta. diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..696e513 --- /dev/null +++ b/configure.ac @@ -0,0 +1,241 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +# Copyright (C) 1992-1995, 1999-2012 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 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/>. + +# We need AC_CONFIG_TESTDIR, AC_PROG_SED, AC_PROG_GREP. +AC_PREREQ([2.60]) + +AC_INIT([GNU Autoconf], + m4_esyscmd([build-aux/git-version-gen .tarball-version]), + [bug-autoconf@gnu.org]) +AC_CONFIG_SRCDIR([lib/autoconf/autoconf.m4]) + +AC_CONFIG_AUX_DIR([build-aux]) + +AM_INIT_AUTOMAKE([1.11 dist-xz readme-alpha no-texinfo.tex std-options]) + +AB_INIT + +# We use `/bin/sh -n script' to check that there are no syntax errors +# in the scripts. Although incredible, there are /bin/sh that go into +# endless loops with `-n', e.g., SunOS's: +# +# $ uname -a +# SunOS ondine 4.1.3 2 sun4m unknown +# $ cat endless.sh +# while false +# do +# : +# done +# exit 0 +# $ time sh endless.sh +# sh endless.sh 0,02s user 0,03s system 78% cpu 0,064 total +# $ time sh -nx endless.sh +# ^Csh -nx endless.sh 3,67s user 0,03s system 63% cpu 5,868 total +# +# Also, some implementations of /bin/sh (e.g., Solaris 8) are soooo slow +# that they are unusable on large scripts like our testsuite. + +# So before using `/bin/sh -n' to check our scripts, we first check +# that `/bin/sh -n' is known to not have these problems. + +AC_CACHE_CHECK([whether /bin/sh -n is known to work], [ac_cv_sh_n_works], +[if ( + unset BASH_VERSION ZSH_VERSION + /bin/sh -c ' + test -n "${BASH_VERSION+set}" || # Bash + test -n "${KSH_VERSION+set}" || # pdksh + test -n "${ZSH_VERSION+set}" || # zsh + test -n "${.sh.version}" # ksh93; put this last since its syntax is dodgy + ' + ) 2>/dev/null +then ac_cv_sh_n_works=yes +else ac_cv_sh_n_works=no +fi +]) +AC_SUBST([ac_cv_sh_n_works]) + +AC_MSG_CHECKING([for characters that cannot appear in file names]) +AC_CACHE_VAL([ac_cv_unsupported_fs_chars], +[ac_cv_unsupported_fs_chars= +for c in '\\' \" '<' '>' '*' '?' '|' +do + touch "conftest.t${c}t" 2>/dev/null + test -f "conftest.t${c}t" && rm -f "conftest.t${c}t" && continue + # $c cannot be used in a file name. + ac_cv_unsupported_fs_chars=$ac_cv_unsupported_fs_chars$c +done +]) +if test -n "$ac_cv_unsupported_fs_chars"; then + AC_MSG_RESULT([$ac_cv_unsupported_fs_chars]) +else + AC_MSG_RESULT([none]) +fi + +AC_SUBST([ac_cv_unsupported_fs_chars]) + +AC_CACHE_CHECK([whether directories can have trailing spaces], + [ac_cv_dir_trailing_space], +[rm -rf 'conftest.d ' && mkdir 'conftest.d ' && touch 'conftest.d /tfile' 2>/dev/null +stat=$? +rm -rf 'conftest.d ' +case $stat$? in #( + 00) ac_cv_dir_trailing_space=yes ;; #( + *) ac_cv_dir_trailing_space=no ;; +esac +]) +AC_SUBST([ac_cv_dir_trailing_space]) + +# Initialize the test suite. +AC_CONFIG_TESTDIR([tests]) +AC_CONFIG_FILES([tests/Makefile tests/atlocal]) +AC_PATH_PROG([EXPR], [expr]) + + +## ---- ## +## M4. ## +## ---- ## + +# We use an absolute name for GNU m4 so even if users have another m4 first in +# their path, the installer can configure with a path that has GNU m4 +# on it and get that path embedded in the installed autoconf and +# autoheader scripts. +AC_PROG_GNU_M4 + +## ----------- ## +## Man pages. ## +## ----------- ## + +AC_CONFIG_FILES([man/Makefile]) +AM_MISSING_PROG([HELP2MAN], [help2man]) + + +## ------ ## +## Perl. ## +## ------ ## + +# We use an absolute name for perl so the #! line in autoscan will work. +AC_PATH_PROG([PERL], [perl], [no]) +AC_SUBST([PERL])dnl +if test "$PERL" = no; then + AC_MSG_ERROR([perl is not found]) +fi +$PERL -e 'require 5.006;' || { + AC_MSG_ERROR([Perl 5.006 or better is required]) +} + +# Find out whether the system supports flock +# Note this test does not try to find out whether it works with this +# particular file system. It merely avoids us running flock on systems +# where that bails out. +AC_CACHE_CHECK([whether $PERL Fcntl::flock is implemented], + [ac_cv_perl_flock_implemented], + [echo lock me > conftest.fil + if $PERL -e 'use Fcntl ":flock"; flock("conftest.fil", LOCK_EX); 1;'; then + ac_cv_perl_flock_implemented=yes + else + ac_cv_perl_flock_implemented=no + fi + rm -f conftest.fil + ]) +AC_SUBST([PERL_FLOCK], [$ac_cv_perl_flock_implemented]) + + +## ------- ## +## Emacs. ## +## ------- ## + +AC_CONFIG_FILES([lib/emacs/Makefile]) +TEST_EMACS=$EMACS +test x"$TEST_EMACS" = xt && TEST_EMACS= +AC_CHECK_PROGS([TEST_EMACS], [emacs xemacs], [no]) + +# autoconf-mode.el and autotest-mode.el do not work with older version of +# Emacs (i.e. 18.x.x). During byte-compilation, Emacs complains: +# "Variable (broken nil) seen on pass 2 of byte compiler but not pass 1" +# We detect this problem here. +AS_IF([test "$TEST_EMACS" != no], + [AC_CACHE_CHECK([whether $TEST_EMACS is sufficiently recent], + [ac_cv_prog_emacs_ok], + [# Note: The quoted "EOF" is intentional. It protects the ` in the text. + cat >conftest.el << "EOF" + (defvar broken) + (defun broken-mode () (setq broken-defaults `(broken nil))) +EOF + AS_IF([AC_RUN_LOG( + [$TEST_EMACS -batch -q -f batch-byte-compile conftest.el 1>&2])], + [ac_cv_prog_emacs_ok=yes], [ac_cv_prog_emacs_ok=no]) + rm -f conftest.el conftest.elc]) + AS_IF([test $ac_cv_prog_emacs_ok = no], [TEST_EMACS=no])]) + +AC_SUBST([EMACS], [$TEST_EMACS]) + +AM_PATH_LISPDIR + + +## ------------ ## +## Grep & sed. ## +## ------------ ## +AC_PROG_GREP +AC_PROG_EGREP +AC_PROG_SED + + +## ----- ## +## Make. ## +## ----- ## +AC_PROG_MAKE_CASE_SENSITIVE + + +## ------------ ## +## Conclusion. ## +## ------------ ## + +dnl Allow maintainer rules under GNU make even in VPATH builds. This does +dnl not work in autoconf 2.61 or earlier, but we don't want to require +dnl unreleased autoconf during bootstrap, hence the version test. +dnl TODO remove the version check once we depend on autoconf 2.62. +dnl Meanwhile, we must use a shell variable so that we bypass automake's +dnl attempts to remove the sole copy of GNUmakefile in a non-VPATH build +dnl during 'make distclean'. +dnl TODO avoid the shell variable once automake is fixed. +GNUmakefile=GNUmakefile +m4_if(m4_version_compare([2.61a.100], + m4_defn([m4_PACKAGE_VERSION])), [1], [], + [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [], + [GNUmakefile=$GNUmakefile])]) + +AC_CONFIG_FILES([Makefile doc/Makefile + lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile + lib/m4sugar/Makefile + lib/autoconf/Makefile lib/autotest/Makefile + bin/Makefile]) + +AC_OUTPUT +# Report the state of this version of Autoconf if this is a beta. +m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [[-a-z]], +[ cat <<EOF + +You are about to use an experimental version of Autoconf. Be sure to +read the relevant mailing lists, most importantly <autoconf@gnu.org>. + +Below you will find information on the status of this version of Autoconf. + +EOF + sed -n '/^\* Status/,$p' $srcdir/BUGS +echo +])dnl diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..a3075ff --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,33 @@ +# Make Autoconf documentation. + +# Copyright (C) 2000-2003, 2007-2012 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 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/>. + +AM_MAKEINFOFLAGS = --no-split +TEXI2HTML_FLAGS = -split_chapter +TEXINFO_TEX = ../build-aux/texinfo.tex + +info_TEXINFOS = autoconf.texi standards.texi +autoconf_TEXINFOS = fdl.texi install.texi +standards_TEXINFOS = fdl.texi gnu-oids.texi make-stds.texi + +EXTRA_DIST = gendocs_template + +# Files from texi2dvi that should be removed, but which Automake does +# not know. +CLEANFILES = autoconf.ACs autoconf.cvs autoconf.MSs autoconf.prs \ + autoconf.ATs autoconf.evs autoconf.fns autoconf.ovs \ + autoconf.ca autoconf.CA autoconf.cas autoconf.CAs \ + autoconf.tmp diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000..647c92c --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,665 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Make Autoconf documentation. + +# Copyright (C) 2000-2003, 2007-2012 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 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/>. +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +DIST_COMMON = $(autoconf_TEXINFOS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/stamp-vti \ + $(srcdir)/version.texi $(standards_TEXINFOS) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/autobuild.m4 \ + $(top_srcdir)/m4/m4.m4 $(top_srcdir)/m4/make-case.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +INFO_DEPS = $(srcdir)/autoconf.info $(srcdir)/standards.info +am__TEXINFO_TEX_DIR = $(srcdir)/../build-aux +DVIS = autoconf.dvi standards.dvi +PDFS = autoconf.pdf standards.pdf +PSS = autoconf.ps standards.ps +HTMLS = autoconf.html standards.html +TEXINFOS = autoconf.texi standards.texi +TEXI2DVI = texi2dvi +TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) +DVIPS = dvips +am__installdirs = "$(DESTDIR)$(infodir)" +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EMACS = @EMACS@ +EMACSLOADPATH = @EMACSLOADPATH@ +EXPR = @EXPR@ +GREP = @GREP@ +HELP2MAN = @HELP2MAN@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +M4 = @M4@ +M4_DEBUGFILE = @M4_DEBUGFILE@ +M4_GNU = @M4_GNU@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERL_FLOCK = @PERL_FLOCK@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TEST_EMACS = @TEST_EMACS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_cv_dir_trailing_space = @ac_cv_dir_trailing_space@ +ac_cv_sh_n_works = @ac_cv_sh_n_works@ +ac_cv_unsupported_fs_chars = @ac_cv_unsupported_fs_chars@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +lispdir = @lispdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_MAKEINFOFLAGS = --no-split +TEXI2HTML_FLAGS = -split_chapter +TEXINFO_TEX = ../build-aux/texinfo.tex +info_TEXINFOS = autoconf.texi standards.texi +autoconf_TEXINFOS = fdl.texi install.texi +standards_TEXINFOS = fdl.texi gnu-oids.texi make-stds.texi +EXTRA_DIST = gendocs_template + +# Files from texi2dvi that should be removed, but which Automake does +# not know. +CLEANFILES = autoconf.ACs autoconf.cvs autoconf.MSs autoconf.prs \ + autoconf.ATs autoconf.evs autoconf.fns autoconf.ovs \ + autoconf.ca autoconf.CA autoconf.cas autoconf.CAs \ + autoconf.tmp + +all: all-am + +.SUFFIXES: +.SUFFIXES: .dvi .html .info .pdf .ps .texi +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +.texi.info: + restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && $(am__cd) $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + $(am__cd) $(srcdir); \ + else \ + rc=$$?; \ + $(am__cd) $(srcdir) && \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc + +.texi.dvi: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2DVI) $< + +.texi.pdf: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2PDF) $< + +.texi.html: + rm -rf $(@:.html=.htp) + if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.html=.htp) $<; \ + then \ + rm -rf $@; \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ + else \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ + exit 1; \ + fi +$(srcdir)/autoconf.info: autoconf.texi $(srcdir)/version.texi $(autoconf_TEXINFOS) +autoconf.dvi: autoconf.texi $(srcdir)/version.texi $(autoconf_TEXINFOS) +autoconf.pdf: autoconf.texi $(srcdir)/version.texi $(autoconf_TEXINFOS) +autoconf.html: autoconf.texi $(srcdir)/version.texi $(autoconf_TEXINFOS) +$(srcdir)/version.texi: $(srcdir)/stamp-vti +$(srcdir)/stamp-vti: autoconf.texi $(top_srcdir)/configure + @(dir=.; test -f ./autoconf.texi || dir=$(srcdir); \ + set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/autoconf.texi`; \ + echo "@set UPDATED $$1 $$2 $$3"; \ + echo "@set UPDATED-MONTH $$2 $$3"; \ + echo "@set EDITION $(VERSION)"; \ + echo "@set VERSION $(VERSION)") > vti.tmp + @cmp -s vti.tmp $(srcdir)/version.texi \ + || (echo "Updating $(srcdir)/version.texi"; \ + cp vti.tmp $(srcdir)/version.texi) + -@rm -f vti.tmp + @cp $(srcdir)/version.texi $@ + +mostlyclean-vti: + -rm -f vti.tmp + +maintainer-clean-vti: + -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi +$(srcdir)/standards.info: standards.texi $(standards_TEXINFOS) +standards.dvi: standards.texi $(standards_TEXINFOS) +standards.pdf: standards.texi $(standards_TEXINFOS) +standards.html: standards.texi $(standards_TEXINFOS) +.dvi.ps: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(DVIPS) -o $@ $< + +uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ + rm -f "$(DESTDIR)$(dvidir)/$$f"; \ + done + +uninstall-html-am: + @$(NORMAL_UNINSTALL) + @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ + rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ + done + +uninstall-info-am: + @$(PRE_UNINSTALL) + @if test -d '$(DESTDIR)$(infodir)' && \ + (install-info --version && \ + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ + if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ + done; \ + else :; fi + @$(NORMAL_UNINSTALL) + @list='$(INFO_DEPS)'; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ + (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ + echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ + else :; fi); \ + done + +uninstall-pdf-am: + @$(NORMAL_UNINSTALL) + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ + done + +uninstall-ps-am: + @$(NORMAL_UNINSTALL) + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ + rm -f "$(DESTDIR)$(psdir)/$$f"; \ + done + +dist-info: $(INFO_DEPS) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; \ + for base in $$list; do \ + case $$base in \ + $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$base; then d=.; else d=$(srcdir); fi; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f "$(distdir)/$$relfile" || \ + cp -p $$file "$(distdir)/$$relfile"; \ + else :; fi; \ + done; \ + done + +mostlyclean-aminfo: + -rm -rf autoconf.AC autoconf.ACs autoconf.AT autoconf.ATs autoconf.CA \ + autoconf.CAs autoconf.MS autoconf.MSs autoconf.aux \ + autoconf.cp autoconf.cps autoconf.cv autoconf.cvs \ + autoconf.ev autoconf.evs autoconf.fn autoconf.fns \ + autoconf.ky autoconf.kys autoconf.log autoconf.ov \ + autoconf.ovs autoconf.pg autoconf.pgs autoconf.pr \ + autoconf.prs autoconf.tmp autoconf.toc autoconf.tp \ + autoconf.tps autoconf.vr standards.aux standards.cp \ + standards.cps standards.fn standards.ky standards.log \ + standards.pg standards.tmp standards.toc standards.tp \ + standards.tps standards.vr + +clean-aminfo: + -test -z "autoconf.dvi autoconf.pdf autoconf.ps autoconf.html standards.dvi \ + standards.pdf standards.ps standards.html" \ + || rm -rf autoconf.dvi autoconf.pdf autoconf.ps autoconf.html standards.dvi \ + standards.pdf standards.ps standards.html + +maintainer-clean-aminfo: + @list='$(INFO_DEPS)'; for i in $$list; do \ + i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ + echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ + rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-info +check-am: all-am +check: check-am +all-am: Makefile $(INFO_DEPS) +installdirs: + for dir in "$(DESTDIR)$(infodir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-aminfo clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: $(DVIS) + +html: html-am + +html-am: $(HTMLS) + +info: info-am + +info-am: $(INFO_DEPS) + +install-data-am: install-info-am + +install-dvi: install-dvi-am + +install-dvi-am: $(DVIS) + @$(NORMAL_INSTALL) + test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ + done +install-exec-am: + +install-html: install-html-am + +install-html-am: $(HTMLS) + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__strip_dir) \ + if test -d "$$d$$p"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ + else \ + list2="$$list2 $$d$$p"; \ + fi; \ + done; \ + test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ + done; } +install-info: install-info-am + +install-info-am: $(INFO_DEPS) + @$(NORMAL_INSTALL) + test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ + for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ + if test -f $$ifile; then \ + echo "$$ifile"; \ + else : ; fi; \ + done; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done + @$(POST_INSTALL) + @if (install-info --version && \ + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ + for file in $$list; do \ + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ + done; \ + else : ; fi +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done +install-ps: install-ps-am + +install-ps-am: $(PSS) + @$(NORMAL_INSTALL) + test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-aminfo \ + maintainer-clean-generic maintainer-clean-vti + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti + +pdf: pdf-am + +pdf-am: $(PDFS) + +ps: ps-am + +ps-am: $(PSS) + +uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-pdf-am uninstall-ps-am + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-aminfo clean-generic \ + dist-info distclean distclean-generic distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic \ + maintainer-clean-vti mostlyclean mostlyclean-aminfo \ + mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-dvi-am uninstall-html-am \ + uninstall-info-am uninstall-pdf-am uninstall-ps-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/doc/autoconf.info b/doc/autoconf.info new file mode 100644 index 0000000..1ba3bfd --- /dev/null +++ b/doc/autoconf.info @@ -0,0 +1,25690 @@ +This is autoconf.info, produced by makeinfo version 4.13 from +autoconf.texi. + +This manual (24 April 2012) is for GNU Autoconf (version 2.69), a +package for creating scripts to configure source code packages using +templates and an M4 macro package. + + Copyright (C) 1992-1996, 1998-2012 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.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover texts, and + no Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License." + +INFO-DIR-SECTION Software development +START-INFO-DIR-ENTRY +* Autoconf: (autoconf). Create source code configuration scripts. +END-INFO-DIR-ENTRY + +INFO-DIR-SECTION Individual utilities +START-INFO-DIR-ENTRY +* autoscan: (autoconf)autoscan Invocation. + Semi-automatic `configure.ac' writing +* ifnames: (autoconf)ifnames Invocation. Listing conditionals in source. +* autoconf-invocation: (autoconf)autoconf Invocation. + How to create configuration scripts +* autoreconf: (autoconf)autoreconf Invocation. + Remaking multiple `configure' scripts +* autoheader: (autoconf)autoheader Invocation. + How to create configuration templates +* autom4te: (autoconf)autom4te Invocation. + The Autoconf executables backbone +* configure: (autoconf)configure Invocation. Configuring a package. +* autoupdate: (autoconf)autoupdate Invocation. + Automatic update of `configure.ac' +* config.status: (autoconf)config.status Invocation. Recreating configurations. +* testsuite: (autoconf)testsuite Invocation. Running an Autotest test suite. +END-INFO-DIR-ENTRY + + +File: autoconf.info, Node: Top, Next: Introduction, Up: (dir) + +Autoconf +******** + +This manual (24 April 2012) is for GNU Autoconf (version 2.69), a +package for creating scripts to configure source code packages using +templates and an M4 macro package. + + Copyright (C) 1992-1996, 1998-2012 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.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, no Front-Cover texts, and + no Back-Cover Texts. A copy of the license is included in the + section entitled "GNU Free Documentation License." + +* Menu: + +* Introduction:: Autoconf's purpose, strengths, and weaknesses +* The GNU Build System:: A set of tools for portable software packages +* Making configure Scripts:: How to organize and produce Autoconf scripts +* Setup:: Initialization and output +* Existing Tests:: Macros that check for particular features +* Writing Tests:: How to write new feature checks +* Results:: What to do with results from feature checks +* Programming in M4:: Layers on top of which Autoconf is written +* Programming in M4sh:: Shell portability layer +* Writing Autoconf Macros:: Adding new macros to Autoconf +* Portable Shell:: Shell script portability pitfalls +* Portable Make:: Makefile portability pitfalls +* Portable C and C++:: C and C++ portability pitfalls +* Manual Configuration:: Selecting features that can't be guessed +* Site Configuration:: Local defaults for `configure' +* Running configure Scripts:: How to use the Autoconf output +* config.status Invocation:: Recreating a configuration +* Obsolete Constructs:: Kept for backward compatibility +* Using Autotest:: Creating portable test suites +* FAQ:: Frequent Autoconf Questions, with answers +* History:: History of Autoconf +* GNU Free Documentation License:: License for copying this manual +* Indices:: Indices of symbols, concepts, etc. + + --- The Detailed Node Listing --- + +The GNU Build System + +* Automake:: Escaping makefile hell +* Gnulib:: The GNU portability library +* Libtool:: Building libraries portably +* Pointers:: More info on the GNU build system + +Making `configure' Scripts + +* Writing Autoconf Input:: What to put in an Autoconf input file +* autoscan Invocation:: Semi-automatic `configure.ac' writing +* ifnames Invocation:: Listing the conditionals in source code +* autoconf Invocation:: How to create configuration scripts +* autoreconf Invocation:: Remaking multiple `configure' scripts + +Writing `configure.ac' + +* Shell Script Compiler:: Autoconf as solution of a problem +* Autoconf Language:: Programming in Autoconf +* Autoconf Input Layout:: Standard organization of `configure.ac' + +Initialization and Output Files + +* Initializing configure:: Option processing etc. +* Versioning:: Dealing with Autoconf versions +* Notices:: Copyright, version numbers in `configure' +* Input:: Where Autoconf should find files +* Output:: Outputting results from the configuration +* Configuration Actions:: Preparing the output based on results +* Configuration Files:: Creating output files +* Makefile Substitutions:: Using output variables in makefiles +* Configuration Headers:: Creating a configuration header file +* Configuration Commands:: Running arbitrary instantiation commands +* Configuration Links:: Links depending on the configuration +* Subdirectories:: Configuring independent packages together +* Default Prefix:: Changing the default installation prefix + +Substitutions in Makefiles + +* Preset Output Variables:: Output variables that are always set +* Installation Directory Variables:: Other preset output variables +* Changed Directory Variables:: Warnings about `datarootdir' +* Build Directories:: Supporting multiple concurrent compiles +* Automatic Remaking:: Makefile rules for configuring + +Configuration Header Files + +* Header Templates:: Input for the configuration headers +* autoheader Invocation:: How to create configuration templates +* Autoheader Macros:: How to specify CPP templates + +Existing Tests + +* Common Behavior:: Macros' standard schemes +* Alternative Programs:: Selecting between alternative programs +* Files:: Checking for the existence of files +* Libraries:: Library archives that might be missing +* Library Functions:: C library functions that might be missing +* Header Files:: Header files that might be missing +* Declarations:: Declarations that may be missing +* Structures:: Structures or members that might be missing +* Types:: Types that might be missing +* Compilers and Preprocessors:: Checking for compiling programs +* System Services:: Operating system services +* Posix Variants:: Special kludges for specific Posix variants +* Erlang Libraries:: Checking for the existence of Erlang libraries + +Common Behavior + +* Standard Symbols:: Symbols defined by the macros +* Default Includes:: Includes used by the generic macros + +Alternative Programs + +* Particular Programs:: Special handling to find certain programs +* Generic Programs:: How to find other programs + +Library Functions + +* Function Portability:: Pitfalls with usual functions +* Particular Functions:: Special handling to find certain functions +* Generic Functions:: How to find other functions + +Header Files + +* Header Portability:: Collected knowledge on common headers +* Particular Headers:: Special handling to find certain headers +* Generic Headers:: How to find other headers + +Declarations + +* Particular Declarations:: Macros to check for certain declarations +* Generic Declarations:: How to find other declarations + +Structures + +* Particular Structures:: Macros to check for certain structure members +* Generic Structures:: How to find other structure members + +Types + +* Particular Types:: Special handling to find certain types +* Generic Types:: How to find other types + +Compilers and Preprocessors + +* Specific Compiler Characteristics:: Some portability issues +* Generic Compiler Characteristics:: Language independent tests and features +* C Compiler:: Checking its characteristics +* C++ Compiler:: Likewise +* Objective C Compiler:: Likewise +* Objective C++ Compiler:: Likewise +* Erlang Compiler and Interpreter:: Likewise +* Fortran Compiler:: Likewise +* Go Compiler:: Likewise + +Writing Tests + +* Language Choice:: Selecting which language to use for testing +* Writing Test Programs:: Forging source files for compilers +* Running the Preprocessor:: Detecting preprocessor symbols +* Running the Compiler:: Detecting language or header features +* Running the Linker:: Detecting library features +* Runtime:: Testing for runtime features +* Systemology:: A zoology of operating systems +* Multiple Cases:: Tests for several possible values + +Writing Test Programs + +* Guidelines:: General rules for writing test programs +* Test Functions:: Avoiding pitfalls in test programs +* Generating Sources:: Source program boilerplate + +Results of Tests + +* Defining Symbols:: Defining C preprocessor symbols +* Setting Output Variables:: Replacing variables in output files +* Special Chars in Variables:: Characters to beware of in variables +* Caching Results:: Speeding up subsequent `configure' runs +* Printing Messages:: Notifying `configure' users + +Caching Results + +* Cache Variable Names:: Shell variables used in caches +* Cache Files:: Files `configure' uses for caching +* Cache Checkpointing:: Loading and saving the cache file + +Programming in M4 + +* M4 Quotation:: Protecting macros from unwanted expansion +* Using autom4te:: The Autoconf executables backbone +* Programming in M4sugar:: Convenient pure M4 macros +* Debugging via autom4te:: Figuring out what M4 was doing + +M4 Quotation + +* Active Characters:: Characters that change the behavior of M4 +* One Macro Call:: Quotation and one macro call +* Quoting and Parameters:: M4 vs. shell parameters +* Quotation and Nested Macros:: Macros calling macros +* Changequote is Evil:: Worse than INTERCAL: M4 + changequote +* Quadrigraphs:: Another way to escape special characters +* Balancing Parentheses:: Dealing with unbalanced parentheses +* Quotation Rule Of Thumb:: One parenthesis, one quote + +Using `autom4te' + +* autom4te Invocation:: A GNU M4 wrapper +* Customizing autom4te:: Customizing the Autoconf package + +Programming in M4sugar + +* Redefined M4 Macros:: M4 builtins changed in M4sugar +* Diagnostic Macros:: Diagnostic messages from M4sugar +* Diversion support:: Diversions in M4sugar +* Conditional constructs:: Conditions in M4 +* Looping constructs:: Iteration in M4 +* Evaluation Macros:: More quotation and evaluation control +* Text processing Macros:: String manipulation in M4 +* Number processing Macros:: Arithmetic computation in M4 +* Set manipulation Macros:: Set manipulation in M4 +* Forbidden Patterns:: Catching unexpanded macros + +Programming in M4sh + +* Common Shell Constructs:: Portability layer for common shell constructs +* Polymorphic Variables:: Support for indirect variable names +* Initialization Macros:: Macros to establish a sane shell environment +* File Descriptor Macros:: File descriptor macros for input and output + +Writing Autoconf Macros + +* Macro Definitions:: Basic format of an Autoconf macro +* Macro Names:: What to call your new macros +* Reporting Messages:: Notifying `autoconf' users +* Dependencies Between Macros:: What to do when macros depend on other macros +* Obsoleting Macros:: Warning about old ways of doing things +* Coding Style:: Writing Autoconf macros a` la Autoconf + +Dependencies Between Macros + +* Prerequisite Macros:: Ensuring required information +* Suggested Ordering:: Warning about possible ordering problems +* One-Shot Macros:: Ensuring a macro is called only once + +Portable Shell Programming + +* Shellology:: A zoology of shells +* Invoking the Shell:: Invoking the shell as a command +* Here-Documents:: Quirks and tricks +* File Descriptors:: FDs and redirections +* Signal Handling:: Shells, signals, and headaches +* File System Conventions:: File names +* Shell Pattern Matching:: Pattern matching +* Shell Substitutions:: Variable and command expansions +* Assignments:: Varying side effects of assignments +* Parentheses:: Parentheses in shell scripts +* Slashes:: Slashes in shell scripts +* Special Shell Variables:: Variables you should not change +* Shell Functions:: What to look out for if you use them +* Limitations of Builtins:: Portable use of not so portable /bin/sh +* Limitations of Usual Tools:: Portable use of portable tools + +Portable Make Programming + +* $< in Ordinary Make Rules:: $< in ordinary rules +* Failure in Make Rules:: Failing portably in rules +* Special Chars in Names:: Special Characters in Macro Names +* Backslash-Newline-Empty:: Empty lines after backslash-newline +* Backslash-Newline Comments:: Spanning comments across line boundaries +* Long Lines in Makefiles:: Line length limitations +* Macros and Submakes:: `make macro=value' and submakes +* The Make Macro MAKEFLAGS:: `$(MAKEFLAGS)' portability issues +* The Make Macro SHELL:: `$(SHELL)' portability issues +* Parallel Make:: Parallel `make' quirks +* Comments in Make Rules:: Other problems with Make comments +* Newlines in Make Rules:: Using literal newlines in rules +* Comments in Make Macros:: Other problems with Make comments in macros +* Trailing whitespace in Make Macros:: Macro substitution problems +* Command-line Macros and whitespace:: Whitespace trimming of values +* obj/ and Make:: Don't name a subdirectory `obj' +* make -k Status:: Exit status of `make -k' +* VPATH and Make:: `VPATH' woes +* Single Suffix Rules:: Single suffix rules and separated dependencies +* Timestamps and Make:: Subsecond timestamp resolution + +`VPATH' and Make + +* Variables listed in VPATH:: `VPATH' must be literal on ancient hosts +* VPATH and Double-colon:: Problems with `::' on ancient hosts +* $< in Explicit Rules:: `$<' does not work in ordinary rules +* Automatic Rule Rewriting:: `VPATH' goes wild on Solaris +* Tru64 Directory Magic:: `mkdir' goes wild on Tru64 +* Make Target Lookup:: More details about `VPATH' lookup + +Portable C and C++ Programming + +* Varieties of Unportability:: How to make your programs unportable +* Integer Overflow:: When integers get too large +* Preprocessor Arithmetic:: `#if' expression problems +* Null Pointers:: Properties of null pointers +* Buffer Overruns:: Subscript errors and the like +* Volatile Objects:: `volatile' and signals +* Floating Point Portability:: Portable floating-point arithmetic +* Exiting Portably:: Exiting and the exit status + +Integer Overflow + +* Integer Overflow Basics:: Why integer overflow is a problem +* Signed Overflow Examples:: Examples of code assuming wraparound +* Optimization and Wraparound:: Optimizations that break uses of wraparound +* Signed Overflow Advice:: Practical advice for signed overflow issues +* Signed Integer Division:: `INT_MIN / -1' and `INT_MIN % -1' + +Manual Configuration + +* Specifying Target Triplets:: Specifying target triplets +* Canonicalizing:: Getting the canonical system type +* Using System Type:: What to do with the system type + +Site Configuration + +* Help Formatting:: Customizing `configure --help' +* External Software:: Working with other optional software +* Package Options:: Selecting optional features +* Pretty Help Strings:: Formatting help string +* Option Checking:: Controlling checking of `configure' options +* Site Details:: Configuring site details +* Transforming Names:: Changing program names when installing +* Site Defaults:: Giving `configure' local defaults + +Transforming Program Names When Installing + +* Transformation Options:: `configure' options to transform names +* Transformation Examples:: Sample uses of transforming names +* Transformation Rules:: Makefile uses of transforming names + +Running `configure' Scripts + +* Basic Installation:: Instructions for typical cases +* Compilers and Options:: Selecting compilers and optimization +* Multiple Architectures:: Compiling for multiple architectures at once +* Installation Names:: Installing in different directories +* Optional Features:: Selecting optional features +* Particular Systems:: Particular systems +* System Type:: Specifying the system type +* Sharing Defaults:: Setting site-wide defaults for `configure' +* Defining Variables:: Specifying the compiler etc. +* configure Invocation:: Changing how `configure' runs + +Obsolete Constructs + +* Obsolete config.status Use:: Obsolete convention for `config.status' +* acconfig Header:: Additional entries in `config.h.in' +* autoupdate Invocation:: Automatic update of `configure.ac' +* Obsolete Macros:: Backward compatibility macros +* Autoconf 1:: Tips for upgrading your files +* Autoconf 2.13:: Some fresher tips + +Upgrading From Version 1 + +* Changed File Names:: Files you might rename +* Changed Makefiles:: New things to put in `Makefile.in' +* Changed Macros:: Macro calls you might replace +* Changed Results:: Changes in how to check test results +* Changed Macro Writing:: Better ways to write your own macros + +Upgrading From Version 2.13 + +* Changed Quotation:: Broken code which used to work +* New Macros:: Interaction with foreign macros +* Hosts and Cross-Compilation:: Bugward compatibility kludges +* AC_LIBOBJ vs LIBOBJS:: LIBOBJS is a forbidden token +* AC_ACT_IFELSE vs AC_TRY_ACT:: A more generic scheme for testing sources + +Generating Test Suites with Autotest + +* Using an Autotest Test Suite:: Autotest and the user +* Writing Testsuites:: Autotest macros +* testsuite Invocation:: Running `testsuite' scripts +* Making testsuite Scripts:: Using autom4te to create `testsuite' + +Using an Autotest Test Suite + +* testsuite Scripts:: The concepts of Autotest +* Autotest Logs:: Their contents + +Frequent Autoconf Questions, with answers + +* Distributing:: Distributing `configure' scripts +* Why GNU M4:: Why not use the standard M4? +* Bootstrapping:: Autoconf and GNU M4 require each other? +* Why Not Imake:: Why GNU uses `configure' instead of Imake +* Defining Directories:: Passing `datadir' to program +* Autom4te Cache:: What is it? Can I remove it? +* Present But Cannot Be Compiled:: Compiler and Preprocessor Disagree +* Expanded Before Required:: Expanded Before Required +* Debugging:: Debugging `configure' scripts + +History of Autoconf + +* Genesis:: Prehistory and naming of `configure' +* Exodus:: The plagues of M4 and Perl +* Leviticus:: The priestly code of portability arrives +* Numbers:: Growth and contributors +* Deuteronomy:: Approaching the promises of easy configuration + +Indices + +* Environment Variable Index:: Index of environment variables used +* Output Variable Index:: Index of variables set in output files +* Preprocessor Symbol Index:: Index of C preprocessor symbols defined +* Cache Variable Index:: Index of documented cache variables +* Autoconf Macro Index:: Index of Autoconf macros +* M4 Macro Index:: Index of M4, M4sugar, and M4sh macros +* Autotest Macro Index:: Index of Autotest macros +* Program & Function Index:: Index of those with portability problems +* Concept Index:: General index + + +File: autoconf.info, Node: Introduction, Next: The GNU Build System, Prev: Top, Up: Top + +1 Introduction +************** + + A physicist, an engineer, and a computer scientist were discussing the + nature of God. "Surely a Physicist," said the physicist, "because + early in the Creation, God made Light; and you know, Maxwell's + equations, the dual nature of electromagnetic waves, the relativistic + consequences..." "An Engineer!," said the engineer, "because +before making Light, God split the Chaos into Land and Water; it takes a + hell of an engineer to handle that big amount of mud, and orderly + separation of solids from liquids..." The computer scientist + shouted: "And the Chaos, where do you think it was coming from, hmm?" + + --Anonymous + + Autoconf is a tool for producing shell scripts that automatically +configure software source code packages to adapt to many kinds of +Posix-like systems. The configuration scripts produced by Autoconf are +independent of Autoconf when they are run, so their users do not need +to have Autoconf. + + The configuration scripts produced by Autoconf require no manual user +intervention when run; they do not normally even need an argument +specifying the system type. Instead, they individually test for the +presence of each feature that the software package they are for might +need. (Before each check, they print a one-line message stating what +they are checking for, so the user doesn't get too bored while waiting +for the script to finish.) As a result, they deal well with systems +that are hybrids or customized from the more common Posix variants. +There is no need to maintain files that list the features supported by +each release of each variant of Posix. + + For each software package that Autoconf is used with, it creates a +configuration script from a template file that lists the system features +that the package needs or can use. After the shell code to recognize +and respond to a system feature has been written, Autoconf allows it to +be shared by many software packages that can use (or need) that feature. +If it later turns out that the shell code needs adjustment for some +reason, it needs to be changed in only one place; all of the +configuration scripts can be regenerated automatically to take advantage +of the updated code. + + Those who do not understand Autoconf are condemned to reinvent it, +poorly. The primary goal of Autoconf is making the _user's_ life +easier; making the _maintainer's_ life easier is only a secondary goal. +Put another way, the primary goal is not to make the generation of +`configure' automatic for package maintainers (although patches along +that front are welcome, since package maintainers form the user base of +Autoconf); rather, the goal is to make `configure' painless, portable, +and predictable for the end user of each "autoconfiscated" package. +And to this degree, Autoconf is highly successful at its goal -- most +complaints to the Autoconf list are about difficulties in writing +Autoconf input, and not in the behavior of the resulting `configure'. +Even packages that don't use Autoconf will generally provide a +`configure' script, and the most common complaint about these +alternative home-grown scripts is that they fail to meet one or more of +the GNU Coding Standards (*note Configuration: +(standards)Configuration.) that users have come to expect from +Autoconf-generated `configure' scripts. + + The Metaconfig package is similar in purpose to Autoconf, but the +scripts it produces require manual user intervention, which is quite +inconvenient when configuring large source trees. Unlike Metaconfig +scripts, Autoconf scripts can support cross-compiling, if some care is +taken in writing them. + + Autoconf does not solve all problems related to making portable +software packages--for a more complete solution, it should be used in +concert with other GNU build tools like Automake and Libtool. These +other tools take on jobs like the creation of a portable, recursive +makefile with all of the standard targets, linking of shared libraries, +and so on. *Note The GNU Build System::, for more information. + + Autoconf imposes some restrictions on the names of macros used with +`#if' in C programs (*note Preprocessor Symbol Index::). + + Autoconf requires GNU M4 version 1.4.6 or later in order to generate +the scripts. It uses features that some versions of M4, including GNU +M4 1.3, do not have. Autoconf works better with GNU M4 version 1.4.14 +or later, though this is not required. + + *Note Autoconf 1::, for information about upgrading from version 1. +*Note History::, for the story of Autoconf's development. *Note FAQ::, +for answers to some common questions about Autoconf. + + See the Autoconf web page (http://www.gnu.org/software/autoconf/) +for up-to-date information, details on the mailing lists, pointers to a +list of known bugs, etc. + + Mail suggestions to the Autoconf mailing list <autoconf@gnu.org>. +Past suggestions are archived +(http://lists.gnu.org/archive/html/autoconf/). + + Mail bug reports to the Autoconf Bugs mailing list +<bug-autoconf@gnu.org>. Past bug reports are archived +(http://lists.gnu.org/archive/html/bug-autoconf/). + + If possible, first check that your bug is not already solved in +current development versions, and that it has not been reported yet. +Be sure to include all the needed information and a short +`configure.ac' that demonstrates the problem. + + Autoconf's development tree is accessible via `git'; see the +Autoconf Summary (http://savannah.gnu.org/projects/autoconf/) for +details, or view the actual repository +(http://git.sv.gnu.org/gitweb/?p=autoconf.git). Anonymous CVS access +is also available, see `README' for more details. Patches relative to +the current `git' version can be sent for review to the Autoconf +Patches mailing list <autoconf-patches@gnu.org>, with discussion on +prior patches archived +(http://lists.gnu.org/archive/html/autoconf-patches/); and all commits +are posted in the read-only Autoconf Commit mailing list +<autoconf-commit@gnu.org>, which is also archived +(http://lists.gnu.org/archive/html/autoconf-commit/). + + Because of its mission, the Autoconf package itself includes only a +set of often-used macros that have already demonstrated their +usefulness. Nevertheless, if you wish to share your macros, or find +existing ones, see the Autoconf Macro Archive +(http://www.gnu.org/software/autoconf-archive/), which is kindly run by +Peter Simons <simons@cryp.to>. + + +File: autoconf.info, Node: The GNU Build System, Next: Making configure Scripts, Prev: Introduction, Up: Top + +2 The GNU Build System +********************** + +Autoconf solves an important problem--reliable discovery of +system-specific build and runtime information--but this is only one +piece of the puzzle for the development of portable software. To this +end, the GNU project has developed a suite of integrated utilities to +finish the job Autoconf started: the GNU build system, whose most +important components are Autoconf, Automake, and Libtool. In this +chapter, we introduce you to those tools, point you to sources of more +information, and try to convince you to use the entire GNU build system +for your software. + +* Menu: + +* Automake:: Escaping makefile hell +* Gnulib:: The GNU portability library +* Libtool:: Building libraries portably +* Pointers:: More info on the GNU build system + + +File: autoconf.info, Node: Automake, Next: Gnulib, Up: The GNU Build System + +2.1 Automake +============ + +The ubiquity of `make' means that a makefile is almost the only viable +way to distribute automatic build rules for software, but one quickly +runs into its numerous limitations. Its lack of support for automatic +dependency tracking, recursive builds in subdirectories, reliable +timestamps (e.g., for network file systems), and so on, mean that +developers must painfully (and often incorrectly) reinvent the wheel +for each project. Portability is non-trivial, thanks to the quirks of +`make' on many systems. On top of all this is the manual labor +required to implement the many standard targets that users have come to +expect (`make install', `make distclean', `make uninstall', etc.). +Since you are, of course, using Autoconf, you also have to insert +repetitive code in your `Makefile.in' to recognize `@CC@', `@CFLAGS@', +and other substitutions provided by `configure'. Into this mess steps +"Automake". + + Automake allows you to specify your build needs in a `Makefile.am' +file with a vastly simpler and more powerful syntax than that of a plain +makefile, and then generates a portable `Makefile.in' for use with +Autoconf. For example, the `Makefile.am' to build and install a simple +"Hello world" program might look like: + + bin_PROGRAMS = hello + hello_SOURCES = hello.c + +The resulting `Makefile.in' (~400 lines) automatically supports all the +standard targets, the substitutions provided by Autoconf, automatic +dependency tracking, `VPATH' building, and so on. `make' builds the +`hello' program, and `make install' installs it in `/usr/local/bin' (or +whatever prefix was given to `configure', if not `/usr/local'). + + The benefits of Automake increase for larger packages (especially +ones with subdirectories), but even for small programs the added +convenience and portability can be substantial. And that's not all... + + +File: autoconf.info, Node: Gnulib, Next: Libtool, Prev: Automake, Up: The GNU Build System + +2.2 Gnulib +========== + +GNU software has a well-deserved reputation for running on many +different types of systems. While our primary goal is to write +software for the GNU system, many users and developers have been +introduced to us through the systems that they were already using. + + Gnulib is a central location for common GNU code, intended to be +shared among free software packages. Its components are typically +shared at the source level, rather than being a library that gets built, +installed, and linked against. The idea is to copy files from Gnulib +into your own source tree. There is no distribution tarball; developers +should just grab source modules from the repository. The source files +are available online, under various licenses, mostly GNU GPL or GNU +LGPL. + + Gnulib modules typically contain C source code along with Autoconf +macros used to configure the source code. For example, the Gnulib +`stdbool' module implements a `stdbool.h' header that nearly conforms +to C99, even on old-fashioned hosts that lack `stdbool.h'. This module +contains a source file for the replacement header, along with an +Autoconf macro that arranges to use the replacement header on +old-fashioned systems. + + +File: autoconf.info, Node: Libtool, Next: Pointers, Prev: Gnulib, Up: The GNU Build System + +2.3 Libtool +=========== + +Often, one wants to build not only programs, but libraries, so that +other programs can benefit from the fruits of your labor. Ideally, one +would like to produce _shared_ (dynamically linked) libraries, which +can be used by multiple programs without duplication on disk or in +memory and can be updated independently of the linked programs. +Producing shared libraries portably, however, is the stuff of +nightmares--each system has its own incompatible tools, compiler flags, +and magic incantations. Fortunately, GNU provides a solution: +"Libtool". + + Libtool handles all the requirements of building shared libraries for +you, and at this time seems to be the _only_ way to do so with any +portability. It also handles many other headaches, such as: the +interaction of Make rules with the variable suffixes of shared +libraries, linking reliably with shared libraries before they are +installed by the superuser, and supplying a consistent versioning system +(so that different versions of a library can be installed or upgraded +without breaking binary compatibility). Although Libtool, like +Autoconf, can be used without Automake, it is most simply utilized in +conjunction with Automake--there, Libtool is used automatically +whenever shared libraries are needed, and you need not know its syntax. + + +File: autoconf.info, Node: Pointers, Prev: Libtool, Up: The GNU Build System + +2.4 Pointers +============ + +Developers who are used to the simplicity of `make' for small projects +on a single system might be daunted at the prospect of learning to use +Automake and Autoconf. As your software is distributed to more and +more users, however, you otherwise quickly find yourself putting lots +of effort into reinventing the services that the GNU build tools +provide, and making the same mistakes that they once made and overcame. +(Besides, since you're already learning Autoconf, Automake is a piece +of cake.) + + There are a number of places that you can go to for more information +on the GNU build tools. + + - Web + + The project home pages for Autoconf + (http://www.gnu.org/software/autoconf/), Automake + (http://www.gnu.org/software/automake/), Gnulib + (http://www.gnu.org/software/gnulib/), and Libtool + (http://www.gnu.org/software/libtool/). + + - Automake Manual + + *Note Automake: (automake)Top, for more information on Automake. + + - Books + + The book `GNU Autoconf, Automake and Libtool'(1) describes the + complete GNU build environment. You can also find the entire book + on-line (http://sources.redhat.com/autobook/). + + + ---------- Footnotes ---------- + + (1) `GNU Autoconf, Automake and Libtool', by G. V. Vaughan, B. +Elliston, T. Tromey, and I. L. Taylor. SAMS (originally New Riders), +2000, ISBN 1578701902. + + +File: autoconf.info, Node: Making configure Scripts, Next: Setup, Prev: The GNU Build System, Up: Top + +3 Making `configure' Scripts +**************************** + +The configuration scripts that Autoconf produces are by convention +called `configure'. When run, `configure' creates several files, +replacing configuration parameters in them with appropriate values. +The files that `configure' creates are: + + - one or more `Makefile' files, usually one in each subdirectory of + the package (*note Makefile Substitutions::); + + - optionally, a C header file, the name of which is configurable, + containing `#define' directives (*note Configuration Headers::); + + - a shell script called `config.status' that, when run, recreates + the files listed above (*note config.status Invocation::); + + - an optional shell script normally called `config.cache' (created + when using `configure --config-cache') that saves the results of + running many of the tests (*note Cache Files::); + + - a file called `config.log' containing any messages produced by + compilers, to help debugging if `configure' makes a mistake. + + To create a `configure' script with Autoconf, you need to write an +Autoconf input file `configure.ac' (or `configure.in') and run +`autoconf' on it. If you write your own feature tests to supplement +those that come with Autoconf, you might also write files called +`aclocal.m4' and `acsite.m4'. If you use a C header file to contain +`#define' directives, you might also run `autoheader', and you can +distribute the generated file `config.h.in' with the package. + + Here is a diagram showing how the files that can be used in +configuration are produced. Programs that are executed are suffixed by +`*'. Optional files are enclosed in square brackets (`[]'). +`autoconf' and `autoheader' also read the installed Autoconf macro +files (by reading `autoconf.m4'). + +Files used in preparing a software package for distribution, when using +just Autoconf: + your source files --> [autoscan*] --> [configure.scan] --> configure.ac + + configure.ac --. + | .------> autoconf* -----> configure + [aclocal.m4] --+---+ + | `-----> [autoheader*] --> [config.h.in] + [acsite.m4] ---' + + Makefile.in + +Additionally, if you use Automake, the following additional productions +come into play: + + [acinclude.m4] --. + | + [local macros] --+--> aclocal* --> aclocal.m4 + | + configure.ac ----' + + configure.ac --. + +--> automake* --> Makefile.in + Makefile.am ---' + +Files used in configuring a software package: + .-------------> [config.cache] + configure* ------------+-------------> config.log + | + [config.h.in] -. v .-> [config.h] -. + +--> config.status* -+ +--> make* + Makefile.in ---' `-> Makefile ---' + +* Menu: + +* Writing Autoconf Input:: What to put in an Autoconf input file +* autoscan Invocation:: Semi-automatic `configure.ac' writing +* ifnames Invocation:: Listing the conditionals in source code +* autoconf Invocation:: How to create configuration scripts +* autoreconf Invocation:: Remaking multiple `configure' scripts + + +File: autoconf.info, Node: Writing Autoconf Input, Next: autoscan Invocation, Up: Making configure Scripts + +3.1 Writing `configure.ac' +========================== + +To produce a `configure' script for a software package, create a file +called `configure.ac' that contains invocations of the Autoconf macros +that test the system features your package needs or can use. Autoconf +macros already exist to check for many features; see *note Existing +Tests::, for their descriptions. For most other features, you can use +Autoconf template macros to produce custom checks; see *note Writing +Tests::, for information about them. For especially tricky or +specialized features, `configure.ac' might need to contain some +hand-crafted shell commands; see *note Portable Shell Programming: +Portable Shell. The `autoscan' program can give you a good start in +writing `configure.ac' (*note autoscan Invocation::, for more +information). + + Previous versions of Autoconf promoted the name `configure.in', +which is somewhat ambiguous (the tool needed to process this file is not +described by its extension), and introduces a slight confusion with +`config.h.in' and so on (for which `.in' means "to be processed by +`configure'"). Using `configure.ac' is now preferred. + +* Menu: + +* Shell Script Compiler:: Autoconf as solution of a problem +* Autoconf Language:: Programming in Autoconf +* Autoconf Input Layout:: Standard organization of `configure.ac' + + +File: autoconf.info, Node: Shell Script Compiler, Next: Autoconf Language, Up: Writing Autoconf Input + +3.1.1 A Shell Script Compiler +----------------------------- + +Just as for any other computer language, in order to properly program +`configure.ac' in Autoconf you must understand _what_ problem the +language tries to address and _how_ it does so. + + The problem Autoconf addresses is that the world is a mess. After +all, you are using Autoconf in order to have your package compile +easily on all sorts of different systems, some of them being extremely +hostile. Autoconf itself bears the price for these differences: +`configure' must run on all those systems, and thus `configure' must +limit itself to their lowest common denominator of features. + + Naturally, you might then think of shell scripts; who needs +`autoconf'? A set of properly written shell functions is enough to +make it easy to write `configure' scripts by hand. Sigh! +Unfortunately, even in 2008, where shells without any function support +are far and few between, there are pitfalls to avoid when making use of +them. Also, finding a Bourne shell that accepts shell functions is not +trivial, even though there is almost always one on interesting porting +targets. + + So, what is really needed is some kind of compiler, `autoconf', that +takes an Autoconf program, `configure.ac', and transforms it into a +portable shell script, `configure'. + + How does `autoconf' perform this task? + + There are two obvious possibilities: creating a brand new language or +extending an existing one. The former option is attractive: all sorts +of optimizations could easily be implemented in the compiler and many +rigorous checks could be performed on the Autoconf program (e.g., +rejecting any non-portable construct). Alternatively, you can extend +an existing language, such as the `sh' (Bourne shell) language. + + Autoconf does the latter: it is a layer on top of `sh'. It was +therefore most convenient to implement `autoconf' as a macro expander: +a program that repeatedly performs "macro expansions" on text input, +replacing macro calls with macro bodies and producing a pure `sh' +script in the end. Instead of implementing a dedicated Autoconf macro +expander, it is natural to use an existing general-purpose macro +language, such as M4, and implement the extensions as a set of M4 +macros. + + +File: autoconf.info, Node: Autoconf Language, Next: Autoconf Input Layout, Prev: Shell Script Compiler, Up: Writing Autoconf Input + +3.1.2 The Autoconf Language +--------------------------- + +The Autoconf language differs from many other computer languages +because it treats actual code the same as plain text. Whereas in C, +for instance, data and instructions have different syntactic status, in +Autoconf their status is rigorously the same. Therefore, we need a +means to distinguish literal strings from text to be expanded: +quotation. + + When calling macros that take arguments, there must not be any white +space between the macro name and the open parenthesis. + + AC_INIT ([oops], [1.0]) # incorrect + AC_INIT([hello], [1.0]) # good + + Arguments should be enclosed within the quote characters `[' and +`]', and be separated by commas. Any leading blanks or newlines in +arguments are ignored, unless they are quoted. You should always quote +an argument that might contain a macro name, comma, parenthesis, or a +leading blank or newline. This rule applies recursively for every macro +call, including macros called from other macros. For more details on +quoting rules, see *note Programming in M4::. + + For instance: + + AC_CHECK_HEADER([stdio.h], + [AC_DEFINE([HAVE_STDIO_H], [1], + [Define to 1 if you have <stdio.h>.])], + [AC_MSG_ERROR([sorry, can't do anything for you])]) + +is quoted properly. You may safely simplify its quotation to: + + AC_CHECK_HEADER([stdio.h], + [AC_DEFINE([HAVE_STDIO_H], 1, + [Define to 1 if you have <stdio.h>.])], + [AC_MSG_ERROR([sorry, can't do anything for you])]) + +because `1' cannot contain a macro call. Here, the argument of +`AC_MSG_ERROR' must be quoted; otherwise, its comma would be +interpreted as an argument separator. Also, the second and third +arguments of `AC_CHECK_HEADER' must be quoted, since they contain macro +calls. The three arguments `HAVE_STDIO_H', `stdio.h', and `Define to 1 +if you have <stdio.h>.' do not need quoting, but if you unwisely +defined a macro with a name like `Define' or `stdio' then they would +need quoting. Cautious Autoconf users would keep the quotes, but many +Autoconf users find such precautions annoying, and would rewrite the +example as follows: + + AC_CHECK_HEADER(stdio.h, + [AC_DEFINE(HAVE_STDIO_H, 1, + [Define to 1 if you have <stdio.h>.])], + [AC_MSG_ERROR([sorry, can't do anything for you])]) + +This is safe, so long as you adopt good naming conventions and do not +define macros with names like `HAVE_STDIO_H', `stdio', or `h'. Though +it is also safe here to omit the quotes around `Define to 1 if you have +<stdio.h>.' this is not recommended, as message strings are more likely +to inadvertently contain commas. + + The following example is wrong and dangerous, as it is underquoted: + + AC_CHECK_HEADER(stdio.h, + AC_DEFINE(HAVE_STDIO_H, 1, + Define to 1 if you have <stdio.h>.), + AC_MSG_ERROR([sorry, can't do anything for you])) + + In other cases, you may have to use text that also resembles a macro +call. You must quote that text even when it is not passed as a macro +argument. For example, these two approaches in `configure.ac' (quoting +just the potential problems, or quoting the entire line) will protect +your script in case autoconf ever adds a macro `AC_DC': + + echo "Hard rock was here! --[AC_DC]" + [echo "Hard rock was here! --AC_DC"] + +which results in this text in `configure': + + echo "Hard rock was here! --AC_DC" + echo "Hard rock was here! --AC_DC" + +When you use the same text in a macro argument, you must therefore have +an extra quotation level (since one is stripped away by the macro +substitution). In general, then, it is a good idea to _use double +quoting for all literal string arguments_, either around just the +problematic portions, or over the entire argument: + + AC_MSG_WARN([[AC_DC] stinks --Iron Maiden]) + AC_MSG_WARN([[AC_DC stinks --Iron Maiden]]) + + However, the above example triggers a warning about a possibly +unexpanded macro when running `autoconf', because it collides with the +namespace of macros reserved for the Autoconf language. To be really +safe, you can use additional escaping (either a quadrigraph, or +creative shell constructs) to silence that particular warning: + + echo "Hard rock was here! --AC""_DC" + AC_MSG_WARN([[AC@&t@_DC stinks --Iron Maiden]]) + + You are now able to understand one of the constructs of Autoconf that +has been continually misunderstood... The rule of thumb is that +_whenever you expect macro expansion, expect quote expansion_; i.e., +expect one level of quotes to be lost. For instance: + + AC_COMPILE_IFELSE(AC_LANG_SOURCE([char b[10];]), [], + [AC_MSG_ERROR([you lose])]) + +is incorrect: here, the first argument of `AC_LANG_SOURCE' is `char +b[10];' and is expanded once, which results in `char b10;'; and the +`AC_LANG_SOURCE' is also expanded prior to being passed to +`AC_COMPILE_IFELSE'. (There was an idiom common in Autoconf's past to +address this issue via the M4 `changequote' primitive, but do not use +it!) Let's take a closer look: the author meant the first argument to +be understood as a literal, and therefore it must be quoted twice; +likewise, the intermediate `AC_LANG_SOURCE' macro should be quoted once +so that it is only expanded after the rest of the body of +`AC_COMPILE_IFELSE' is in place: + + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char b[10];]])], [], + [AC_MSG_ERROR([you lose])]) + +Voila`, you actually produce `char b[10];' this time! + + On the other hand, descriptions (e.g., the last parameter of +`AC_DEFINE' or `AS_HELP_STRING') are not literals--they are subject to +line breaking, for example--and should not be double quoted. Even if +these descriptions are short and are not actually broken, double +quoting them yields weird results. + + Some macros take optional arguments, which this documentation +represents as [ARG] (not to be confused with the quote characters). +You may just leave them empty, or use `[]' to make the emptiness of the +argument explicit, or you may simply omit the trailing commas. The +three lines below are equivalent: + + AC_CHECK_HEADERS([stdio.h], [], [], []) + AC_CHECK_HEADERS([stdio.h],,,) + AC_CHECK_HEADERS([stdio.h]) + + It is best to put each macro call on its own line in `configure.ac'. +Most of the macros don't add extra newlines; they rely on the newline +after the macro call to terminate the commands. This approach makes +the generated `configure' script a little easier to read by not +inserting lots of blank lines. It is generally safe to set shell +variables on the same line as a macro call, because the shell allows +assignments without intervening newlines. + + You can include comments in `configure.ac' files by starting them +with the `#'. For example, it is helpful to begin `configure.ac' files +with a line like this: + + # Process this file with autoconf to produce a configure script. + + +File: autoconf.info, Node: Autoconf Input Layout, Prev: Autoconf Language, Up: Writing Autoconf Input + +3.1.3 Standard `configure.ac' Layout +------------------------------------ + +The order in which `configure.ac' calls the Autoconf macros is not +important, with a few exceptions. Every `configure.ac' must contain a +call to `AC_INIT' before the checks, and a call to `AC_OUTPUT' at the +end (*note Output::). Additionally, some macros rely on other macros +having been called first, because they check previously set values of +some variables to decide what to do. These macros are noted in the +individual descriptions (*note Existing Tests::), and they also warn +you when `configure' is created if they are called out of order. + + To encourage consistency, here is a suggested order for calling the +Autoconf macros. Generally speaking, the things near the end of this +list are those that could depend on things earlier in it. For example, +library functions could be affected by types and libraries. + + Autoconf requirements + `AC_INIT(PACKAGE, VERSION, BUG-REPORT-ADDRESS)' + information on the package + checks for programs + checks for libraries + checks for header files + checks for types + checks for structures + checks for compiler characteristics + checks for library functions + checks for system services + `AC_CONFIG_FILES([FILE...])' + `AC_OUTPUT' + + +File: autoconf.info, Node: autoscan Invocation, Next: ifnames Invocation, Prev: Writing Autoconf Input, Up: Making configure Scripts + +3.2 Using `autoscan' to Create `configure.ac' +============================================= + +The `autoscan' program can help you create and/or maintain a +`configure.ac' file for a software package. `autoscan' examines source +files in the directory tree rooted at a directory given as a command +line argument, or the current directory if none is given. It searches +the source files for common portability problems and creates a file +`configure.scan' which is a preliminary `configure.ac' for that +package, and checks a possibly existing `configure.ac' for completeness. + + When using `autoscan' to create a `configure.ac', you should +manually examine `configure.scan' before renaming it to `configure.ac'; +it probably needs some adjustments. Occasionally, `autoscan' outputs a +macro in the wrong order relative to another macro, so that `autoconf' +produces a warning; you need to move such macros manually. Also, if +you want the package to use a configuration header file, you must add a +call to `AC_CONFIG_HEADERS' (*note Configuration Headers::). You might +also have to change or add some `#if' directives to your program in +order to make it work with Autoconf (*note ifnames Invocation::, for +information about a program that can help with that job). + + When using `autoscan' to maintain a `configure.ac', simply consider +adding its suggestions. The file `autoscan.log' contains detailed +information on why a macro is requested. + + `autoscan' uses several data files (installed along with Autoconf) +to determine which macros to output when it finds particular symbols in +a package's source files. These data files all have the same format: +each line consists of a symbol, one or more blanks, and the Autoconf +macro to output if that symbol is encountered. Lines starting with `#' +are comments. + + `autoscan' accepts the following options: + +`--help' +`-h' + Print a summary of the command line options and exit. + +`--version' +`-V' + Print the version number of Autoconf and exit. + +`--verbose' +`-v' + Print the names of the files it examines and the potentially + interesting symbols it finds in them. This output can be + voluminous. + +`--debug' +`-d' + Don't remove temporary files. + +`--include=DIR' +`-I DIR' + Append DIR to the include path. Multiple invocations accumulate. + +`--prepend-include=DIR' +`-B DIR' + Prepend DIR to the include path. Multiple invocations accumulate. + + +File: autoconf.info, Node: ifnames Invocation, Next: autoconf Invocation, Prev: autoscan Invocation, Up: Making configure Scripts + +3.3 Using `ifnames' to List Conditionals +======================================== + +`ifnames' can help you write `configure.ac' for a software package. It +prints the identifiers that the package already uses in C preprocessor +conditionals. If a package has already been set up to have some +portability, `ifnames' can thus help you figure out what its +`configure' needs to check for. It may help fill in some gaps in a +`configure.ac' generated by `autoscan' (*note autoscan Invocation::). + + `ifnames' scans all of the C source files named on the command line +(or the standard input, if none are given) and writes to the standard +output a sorted list of all the identifiers that appear in those files +in `#if', `#elif', `#ifdef', or `#ifndef' directives. It prints each +identifier on a line, followed by a space-separated list of the files +in which that identifier occurs. + +`ifnames' accepts the following options: + +`--help' +`-h' + Print a summary of the command line options and exit. + +`--version' +`-V' + Print the version number of Autoconf and exit. + + +File: autoconf.info, Node: autoconf Invocation, Next: autoreconf Invocation, Prev: ifnames Invocation, Up: Making configure Scripts + +3.4 Using `autoconf' to Create `configure' +========================================== + +To create `configure' from `configure.ac', run the `autoconf' program +with no arguments. `autoconf' processes `configure.ac' with the M4 +macro processor, using the Autoconf macros. If you give `autoconf' an +argument, it reads that file instead of `configure.ac' and writes the +configuration script to the standard output instead of to `configure'. +If you give `autoconf' the argument `-', it reads from the standard +input instead of `configure.ac' and writes the configuration script to +the standard output. + + The Autoconf macros are defined in several files. Some of the files +are distributed with Autoconf; `autoconf' reads them first. Then it +looks for the optional file `acsite.m4' in the directory that contains +the distributed Autoconf macro files, and for the optional file +`aclocal.m4' in the current directory. Those files can contain your +site's or the package's own Autoconf macro definitions (*note Writing +Autoconf Macros::, for more information). If a macro is defined in +more than one of the files that `autoconf' reads, the last definition +it reads overrides the earlier ones. + + `autoconf' accepts the following options: + +`--help' +`-h' + Print a summary of the command line options and exit. + +`--version' +`-V' + Print the version number of Autoconf and exit. + +`--verbose' +`-v' + Report processing steps. + +`--debug' +`-d' + Don't remove the temporary files. + +`--force' +`-f' + Remake `configure' even if newer than its input files. + +`--include=DIR' +`-I DIR' + Append DIR to the include path. Multiple invocations accumulate. + +`--prepend-include=DIR' +`-B DIR' + Prepend DIR to the include path. Multiple invocations accumulate. + +`--output=FILE' +`-o FILE' + Save output (script or trace) to FILE. The file `-' stands for + the standard output. + +`--warnings=CATEGORY' +`-W CATEGORY' + Report the warnings related to CATEGORY (which can actually be a + comma separated list). *Note Reporting Messages::, macro + `AC_DIAGNOSE', for a comprehensive list of categories. Special + values include: + + `all' + report all the warnings + + `none' + report none + + `error' + treats warnings as errors + + `no-CATEGORY' + disable warnings falling into CATEGORY + + Warnings about `syntax' are enabled by default, and the environment + variable `WARNINGS', a comma separated list of categories, is + honored as well. Passing `-W CATEGORY' actually behaves as if you + had passed `--warnings syntax,$WARNINGS,CATEGORY'. To disable the + defaults and `WARNINGS', and then enable warnings about obsolete + constructs, use `-W none,obsolete'. + + Because `autoconf' uses `autom4te' behind the scenes, it displays + a back trace for errors, but not for warnings; if you want them, + just pass `-W error'. *Note autom4te Invocation::, for some + examples. + +`--trace=MACRO[:FORMAT]' +`-t MACRO[:FORMAT]' + Do not create the `configure' script, but list the calls to MACRO + according to the FORMAT. Multiple `--trace' arguments can be used + to list several macros. Multiple `--trace' arguments for a single + macro are not cumulative; instead, you should just make FORMAT as + long as needed. + + The FORMAT is a regular string, with newlines if desired, and + several special escape codes. It defaults to `$f:$l:$n:$%'; see + *note autom4te Invocation::, for details on the FORMAT. + +`--initialization' +`-i' + By default, `--trace' does not trace the initialization of the + Autoconf macros (typically the `AC_DEFUN' definitions). This + results in a noticeable speedup, but can be disabled by this + option. + + It is often necessary to check the content of a `configure.ac' file, +but parsing it yourself is extremely fragile and error-prone. It is +suggested that you rely upon `--trace' to scan `configure.ac'. For +instance, to find the list of variables that are substituted, use: + + $ autoconf -t AC_SUBST + configure.ac:2:AC_SUBST:ECHO_C + configure.ac:2:AC_SUBST:ECHO_N + configure.ac:2:AC_SUBST:ECHO_T + More traces deleted + +The example below highlights the difference between `$@', `$*', and +`$%'. + + $ cat configure.ac + AC_DEFINE(This, is, [an + [example]]) + $ autoconf -t 'AC_DEFINE:@: $@ + *: $* + %: $%' + @: [This],[is],[an + [example]] + *: This,is,an + [example] + %: This:is:an [example] + +The FORMAT gives you a lot of freedom: + + $ autoconf -t 'AC_SUBST:$$ac_subst{"$1"} = "$f:$l";' + $ac_subst{"ECHO_C"} = "configure.ac:2"; + $ac_subst{"ECHO_N"} = "configure.ac:2"; + $ac_subst{"ECHO_T"} = "configure.ac:2"; + More traces deleted + +A long SEPARATOR can be used to improve the readability of complex +structures, and to ease their parsing (for instance when no single +character is suitable as a separator): + + $ autoconf -t 'AM_MISSING_PROG:${|:::::|}*' + ACLOCAL|:::::|aclocal|:::::|$missing_dir + AUTOCONF|:::::|autoconf|:::::|$missing_dir + AUTOMAKE|:::::|automake|:::::|$missing_dir + More traces deleted + + +File: autoconf.info, Node: autoreconf Invocation, Prev: autoconf Invocation, Up: Making configure Scripts + +3.5 Using `autoreconf' to Update `configure' Scripts +==================================================== + +Installing the various components of the GNU Build System can be +tedious: running `autopoint' for Gettext, `automake' for `Makefile.in' +etc. in each directory. It may be needed either because some tools +such as `automake' have been updated on your system, or because some of +the sources such as `configure.ac' have been updated, or finally, +simply in order to install the GNU Build System in a fresh tree. + + `autoreconf' runs `autoconf', `autoheader', `aclocal', `automake', +`libtoolize', and `autopoint' (when appropriate) repeatedly to update +the GNU Build System in the specified directories and their +subdirectories (*note Subdirectories::). By default, it only remakes +those files that are older than their sources. The environment +variables `AUTOM4TE', `AUTOCONF', `AUTOHEADER', `AUTOMAKE', `ACLOCAL', +`AUTOPOINT', `LIBTOOLIZE', `M4', and `MAKE' may be used to override the +invocation of the respective tools. + + If you install a new version of some tool, you can make `autoreconf' +remake _all_ of the files by giving it the `--force' option. + + *Note Automatic Remaking::, for Make rules to automatically rebuild +`configure' scripts when their source files change. That method +handles the timestamps of configuration header templates properly, but +does not pass `--autoconf-dir=DIR' or `--localdir=DIR'. + + Gettext supplies the `autopoint' command to add translation +infrastructure to a source package. If you use `autopoint', your +`configure.ac' should invoke both `AM_GNU_GETTEXT' and +`AM_GNU_GETTEXT_VERSION(GETTEXT-VERSION)'. *Note Invoking the +`autopoint' Program: (gettext)autopoint Invocation, for further details. + +`autoreconf' accepts the following options: + +`--help' +`-h' + Print a summary of the command line options and exit. + +`--version' +`-V' + Print the version number of Autoconf and exit. + +`--verbose' +`-v' + Print the name of each directory `autoreconf' examines and the + commands it runs. If given two or more times, pass `--verbose' to + subordinate tools that support it. + +`--debug' +`-d' + Don't remove the temporary files. + +`--force' +`-f' + Remake even `configure' scripts and configuration headers that are + newer than their input files (`configure.ac' and, if present, + `aclocal.m4'). + +`--install' +`-i' + Install the missing auxiliary files in the package. By default, + files are copied; this can be changed with `--symlink'. + + If deemed appropriate, this option triggers calls to `automake + --add-missing', `libtoolize', `autopoint', etc. + +`--no-recursive' + Do not rebuild files in subdirectories to configure (see *note + Subdirectories::, macro `AC_CONFIG_SUBDIRS'). + +`--symlink' +`-s' + When used with `--install', install symbolic links to the missing + auxiliary files instead of copying them. + +`--make' +`-m' + When the directories were configured, update the configuration by + running `./config.status --recheck && ./config.status', and then + run `make'. + +`--include=DIR' +`-I DIR' + Append DIR to the include path. Multiple invocations accumulate. + Passed on to `aclocal', `autoconf' and `autoheader' internally. + +`--prepend-include=DIR' +`-B DIR' + Prepend DIR to the include path. Multiple invocations accumulate. + Passed on to `autoconf' and `autoheader' internally. + +`--warnings=CATEGORY' +`-W CATEGORY' + Report the warnings related to CATEGORY (which can actually be a + comma separated list). + + `cross' + related to cross compilation issues. + + `obsolete' + report the uses of obsolete constructs. + + `portability' + portability issues + + `syntax' + dubious syntactic constructs. + + `all' + report all the warnings + + `none' + report none + + `error' + treats warnings as errors + + `no-CATEGORY' + disable warnings falling into CATEGORY + + Warnings about `syntax' are enabled by default, and the environment + variable `WARNINGS', a comma separated list of categories, is + honored as well. Passing `-W CATEGORY' actually behaves as if you + had passed `--warnings syntax,$WARNINGS,CATEGORY'. To disable the + defaults and `WARNINGS', and then enable warnings about obsolete + constructs, use `-W none,obsolete'. + + If you want `autoreconf' to pass flags that are not listed here on +to `aclocal', set `ACLOCAL_AMFLAGS' in your `Makefile.am'. Due to a +limitation in the Autoconf implementation these flags currently must be +set on a single line in `Makefile.am', without any backslash-newlines. + + +File: autoconf.info, Node: Setup, Next: Existing Tests, Prev: Making configure Scripts, Up: Top + +4 Initialization and Output Files +********************************* + +Autoconf-generated `configure' scripts need some information about how +to initialize, such as how to find the package's source files and about +the output files to produce. The following sections describe the +initialization and the creation of output files. + +* Menu: + +* Initializing configure:: Option processing etc. +* Versioning:: Dealing with Autoconf versions +* Notices:: Copyright, version numbers in `configure' +* Input:: Where Autoconf should find files +* Output:: Outputting results from the configuration +* Configuration Actions:: Preparing the output based on results +* Configuration Files:: Creating output files +* Makefile Substitutions:: Using output variables in makefiles +* Configuration Headers:: Creating a configuration header file +* Configuration Commands:: Running arbitrary instantiation commands +* Configuration Links:: Links depending on the configuration +* Subdirectories:: Configuring independent packages together +* Default Prefix:: Changing the default installation prefix + + +File: autoconf.info, Node: Initializing configure, Next: Versioning, Up: Setup + +4.1 Initializing `configure' +============================ + +Every `configure' script must call `AC_INIT' before doing anything else +that produces output. Calls to silent macros, such as `AC_DEFUN', may +also occur prior to `AC_INIT', although these are generally used via +`aclocal.m4', since that is implicitly included before the start of +`configure.ac'. The only other required macro is `AC_OUTPUT' (*note +Output::). + + -- Macro: AC_INIT (PACKAGE, VERSION, [BUG-REPORT], [TARNAME], [URL]) + Process any command-line arguments and perform initialization and + verification. + + Set the name of the PACKAGE and its VERSION. These are typically + used in `--version' support, including that of `configure'. The + optional argument BUG-REPORT should be the email to which users + should send bug reports. The package TARNAME differs from + PACKAGE: the latter designates the full package name (e.g., `GNU + Autoconf'), while the former is meant for distribution tar ball + names (e.g., `autoconf'). It defaults to PACKAGE with `GNU ' + stripped, lower-cased, and all characters other than alphanumerics + and underscores are changed to `-'. If provided, URL should be + the home page for the package. + + The arguments of `AC_INIT' must be static, i.e., there should not + be any shell computation, quotes, or newlines, but they can be + computed by M4. This is because the package information strings + are expanded at M4 time into several contexts, and must give the + same text at shell time whether used in single-quoted strings, + double-quoted strings, quoted here-documents, or unquoted + here-documents. It is permissible to use `m4_esyscmd' or + `m4_esyscmd_s' for computing a version string that changes with + every commit to a version control system (in fact, Autoconf does + just that, for all builds of the development tree made between + releases). + + The following M4 macros (e.g., `AC_PACKAGE_NAME'), output variables + (e.g., `PACKAGE_NAME'), and preprocessor symbols (e.g., + `PACKAGE_NAME'), are defined by `AC_INIT': + + `AC_PACKAGE_NAME', `PACKAGE_NAME' + Exactly PACKAGE. + + `AC_PACKAGE_TARNAME', `PACKAGE_TARNAME' + Exactly TARNAME, possibly generated from PACKAGE. + + `AC_PACKAGE_VERSION', `PACKAGE_VERSION' + Exactly VERSION. + + `AC_PACKAGE_STRING', `PACKAGE_STRING' + Exactly `PACKAGE VERSION'. + + `AC_PACKAGE_BUGREPORT', `PACKAGE_BUGREPORT' + Exactly BUG-REPORT, if one was provided. Typically an email + address, or URL to a bug management web page. + + `AC_PACKAGE_URL', `PACKAGE_URL' + Exactly URL, if one was provided. If URL was empty, but + PACKAGE begins with `GNU ', then this defaults to + `http://www.gnu.org/software/TARNAME/', otherwise, no URL is + assumed. + + If your `configure' script does its own option processing, it should +inspect `$@' or `$*' immediately after calling `AC_INIT', because other +Autoconf macros liberally use the `set' command to process strings, and +this has the side effect of updating `$@' and `$*'. However, we +suggest that you use standard macros like `AC_ARG_ENABLE' instead of +attempting to implement your own option processing. *Note Site +Configuration::. + + +File: autoconf.info, Node: Versioning, Next: Notices, Prev: Initializing configure, Up: Setup + +4.2 Dealing with Autoconf versions +================================== + +The following optional macros can be used to help choose the minimum +version of Autoconf that can successfully compile a given +`configure.ac'. + + -- Macro: AC_PREREQ (VERSION) + Ensure that a recent enough version of Autoconf is being used. If + the version of Autoconf being used to create `configure' is + earlier than VERSION, print an error message to the standard error + output and exit with failure (exit status is 63). For example: + + AC_PREREQ([2.69]) + + This macro may be used before `AC_INIT'. + + -- Macro: AC_AUTOCONF_VERSION + This macro was introduced in Autoconf 2.62. It identifies the + version of Autoconf that is currently parsing the input file, in a + format suitable for `m4_version_compare' (*note + m4_version_compare::); in other words, for this release of + Autoconf, its value is `2.69'. One potential use of this macro is + for writing conditional fallbacks based on when a feature was + added to Autoconf, rather than using `AC_PREREQ' to require the + newer version of Autoconf. However, remember that the Autoconf + philosophy favors feature checks over version checks. + + You should not expand this macro directly; use + `m4_defn([AC_AUTOCONF_VERSION])' instead. This is because some + users might have a beta version of Autoconf installed, with + arbitrary letters included in its version string. This means it + is possible for the version string to contain the name of a + defined macro, such that expanding `AC_AUTOCONF_VERSION' would + trigger the expansion of that macro during rescanning, and change + the version string to be different than what you intended to check. + + +File: autoconf.info, Node: Notices, Next: Input, Prev: Versioning, Up: Setup + +4.3 Notices in `configure' +========================== + +The following macros manage version numbers for `configure' scripts. +Using them is optional. + + -- Macro: AC_COPYRIGHT (COPYRIGHT-NOTICE) + State that, in addition to the Free Software Foundation's + copyright on the Autoconf macros, parts of your `configure' are + covered by the COPYRIGHT-NOTICE. + + The COPYRIGHT-NOTICE shows up in both the head of `configure' and + in `configure --version'. + + -- Macro: AC_REVISION (REVISION-INFO) + Copy revision stamp REVISION-INFO into the `configure' script, + with any dollar signs or double-quotes removed. This macro lets + you put a revision stamp from `configure.ac' into `configure' + without RCS or CVS changing it when you check in `configure'. + That way, you can determine easily which revision of + `configure.ac' a particular `configure' corresponds to. + + For example, this line in `configure.ac': + + AC_REVISION([$Revision: 1.30 $]) + + produces this in `configure': + + #!/bin/sh + # From configure.ac Revision: 1.30 + + +File: autoconf.info, Node: Input, Next: Output, Prev: Notices, Up: Setup + +4.4 Finding `configure' Input +============================= + + -- Macro: AC_CONFIG_SRCDIR (UNIQUE-FILE-IN-SOURCE-DIR) + UNIQUE-FILE-IN-SOURCE-DIR is some file that is in the package's + source directory; `configure' checks for this file's existence to + make sure that the directory that it is told contains the source + code in fact does. Occasionally people accidentally specify the + wrong directory with `--srcdir'; this is a safety check. *Note + configure Invocation::, for more information. + + Packages that do manual configuration or use the `install' program +might need to tell `configure' where to find some other shell scripts +by calling `AC_CONFIG_AUX_DIR', though the default places it looks are +correct for most cases. + + -- Macro: AC_CONFIG_AUX_DIR (DIR) + Use the auxiliary build tools (e.g., `install-sh', `config.sub', + `config.guess', Cygnus `configure', Automake and Libtool scripts, + etc.) that are in directory DIR. These are auxiliary files used + in configuration. DIR can be either absolute or relative to + `SRCDIR'. The default is `SRCDIR' or `SRCDIR/..' or + `SRCDIR/../..', whichever is the first that contains `install-sh'. + The other files are not checked for, so that using + `AC_PROG_INSTALL' does not automatically require distributing the + other auxiliary files. It checks for `install.sh' also, but that + name is obsolete because some `make' have a rule that creates + `install' from it if there is no makefile. + + The auxiliary directory is commonly named `build-aux'. If you + need portability to DOS variants, do not name the auxiliary + directory `aux'. *Note File System Conventions::. + + -- Macro: AC_REQUIRE_AUX_FILE (FILE) + Declares that FILE is expected in the directory defined above. In + Autoconf proper, this macro does nothing: its sole purpose is to be + traced by third-party tools to produce a list of expected auxiliary + files. For instance it is called by macros like `AC_PROG_INSTALL' + (*note Particular Programs::) or `AC_CANONICAL_BUILD' (*note + Canonicalizing::) to register the auxiliary files they need. + + Similarly, packages that use `aclocal' should declare where local +macros can be found using `AC_CONFIG_MACRO_DIR'. + + -- Macro: AC_CONFIG_MACRO_DIR (DIR) + Specify DIR as the location of additional local Autoconf macros. + This macro is intended for use by future versions of commands like + `autoreconf' that trace macro calls. It should be called directly + from `configure.ac' so that tools that install macros for + `aclocal' can find the macros' declarations. + + Note that if you use `aclocal' from Automake to generate + `aclocal.m4', you must also set `ACLOCAL_AMFLAGS = -I DIR' in your + top-level `Makefile.am'. Due to a limitation in the Autoconf + implementation of `autoreconf', these include directives currently + must be set on a single line in `Makefile.am', without any + backslash-newlines. + + +File: autoconf.info, Node: Output, Next: Configuration Actions, Prev: Input, Up: Setup + +4.5 Outputting Files +==================== + +Every Autoconf script, e.g., `configure.ac', should finish by calling +`AC_OUTPUT'. That is the macro that generates and runs +`config.status', which in turn creates the makefiles and any other +files resulting from configuration. This is the only required macro +besides `AC_INIT' (*note Input::). + + -- Macro: AC_OUTPUT + Generate `config.status' and launch it. Call this macro once, at + the end of `configure.ac'. + + `config.status' performs all the configuration actions: all the + output files (see *note Configuration Files::, macro + `AC_CONFIG_FILES'), header files (see *note Configuration + Headers::, macro `AC_CONFIG_HEADERS'), commands (see *note + Configuration Commands::, macro `AC_CONFIG_COMMANDS'), links (see + *note Configuration Links::, macro `AC_CONFIG_LINKS'), + subdirectories to configure (see *note Subdirectories::, macro + `AC_CONFIG_SUBDIRS') are honored. + + The location of your `AC_OUTPUT' invocation is the exact point + where configuration actions are taken: any code afterwards is + executed by `configure' once `config.status' was run. If you want + to bind actions to `config.status' itself (independently of + whether `configure' is being run), see *note Running Arbitrary + Configuration Commands: Configuration Commands. + + Historically, the usage of `AC_OUTPUT' was somewhat different. +*Note Obsolete Macros::, for a description of the arguments that +`AC_OUTPUT' used to support. + + If you run `make' in subdirectories, you should run it using the +`make' variable `MAKE'. Most versions of `make' set `MAKE' to the name +of the `make' program plus any options it was given. (But many do not +include in it the values of any variables set on the command line, so +those are not passed on automatically.) Some old versions of `make' do +not set this variable. The following macro allows you to use it even +with those versions. + + -- Macro: AC_PROG_MAKE_SET + If the Make command, `$MAKE' if set or else `make', predefines + `$(MAKE)', define output variable `SET_MAKE' to be empty. + Otherwise, define `SET_MAKE' to a macro definition that sets + `$(MAKE)', such as `MAKE=make'. Calls `AC_SUBST' for `SET_MAKE'. + + If you use this macro, place a line like this in each `Makefile.in' +that runs `MAKE' on other directories: + + @SET_MAKE@ + + +File: autoconf.info, Node: Configuration Actions, Next: Configuration Files, Prev: Output, Up: Setup + +4.6 Performing Configuration Actions +==================================== + +`configure' is designed so that it appears to do everything itself, but +there is actually a hidden slave: `config.status'. `configure' is in +charge of examining your system, but it is `config.status' that +actually takes the proper actions based on the results of `configure'. +The most typical task of `config.status' is to _instantiate_ files. + + This section describes the common behavior of the four standard +instantiating macros: `AC_CONFIG_FILES', `AC_CONFIG_HEADERS', +`AC_CONFIG_COMMANDS' and `AC_CONFIG_LINKS'. They all have this +prototype: + + AC_CONFIG_ITEMS(TAG..., [COMMANDS], [INIT-CMDS]) + +where the arguments are: + +TAG... + A blank-or-newline-separated list of tags, which are typically the + names of the files to instantiate. + + You are encouraged to use literals as TAGS. In particular, you + should avoid + + ... && my_foos="$my_foos fooo" + ... && my_foos="$my_foos foooo" + AC_CONFIG_ITEMS([$my_foos]) + + and use this instead: + + ... && AC_CONFIG_ITEMS([fooo]) + ... && AC_CONFIG_ITEMS([foooo]) + + The macros `AC_CONFIG_FILES' and `AC_CONFIG_HEADERS' use special + TAG values: they may have the form `OUTPUT' or `OUTPUT:INPUTS'. + The file OUTPUT is instantiated from its templates, INPUTS + (defaulting to `OUTPUT.in'). + + `AC_CONFIG_FILES([Makefile:boiler/top.mk:boiler/bot.mk])', for + example, asks for the creation of the file `Makefile' that + contains the expansion of the output variables in the + concatenation of `boiler/top.mk' and `boiler/bot.mk'. + + The special value `-' might be used to denote the standard output + when used in OUTPUT, or the standard input when used in the + INPUTS. You most probably don't need to use this in + `configure.ac', but it is convenient when using the command line + interface of `./config.status', see *note config.status + Invocation::, for more details. + + The INPUTS may be absolute or relative file names. In the latter + case they are first looked for in the build tree, and then in the + source tree. Input files should be text files, and a line length + below 2000 bytes should be safe. + +COMMANDS + Shell commands output literally into `config.status', and + associated with a tag that the user can use to tell `config.status' + which commands to run. The commands are run each time a TAG + request is given to `config.status', typically each time the file + `TAG' is created. + + The variables set during the execution of `configure' are _not_ + available here: you first need to set them via the INIT-CMDS. + Nonetheless the following variables are precomputed: + + `srcdir' + The name of the top source directory, assuming that the + working directory is the top build directory. This is what + the `configure' option `--srcdir' sets. + + `ac_top_srcdir' + The name of the top source directory, assuming that the + working directory is the current build directory. + + `ac_top_build_prefix' + The name of the top build directory, assuming that the working + directory is the current build directory. It can be empty, + or else ends with a slash, so that you may concatenate it. + + `ac_srcdir' + The name of the corresponding source directory, assuming that + the working directory is the current build directory. + + `tmp' + The name of a temporary directory within the build tree, + which you can use if you need to create additional temporary + files. The directory is cleaned up when `config.status' is + done or interrupted. Please use package-specific file name + prefixes to avoid clashing with files that `config.status' + may use internally. + + The "current" directory refers to the directory (or + pseudo-directory) containing the input part of TAGS. For + instance, running + + AC_CONFIG_COMMANDS([deep/dir/out:in/in.in], [...], [...]) + + with `--srcdir=../package' produces the following values: + + # Argument of --srcdir + srcdir='../package' + # Reversing deep/dir + ac_top_build_prefix='../../' + # Concatenation of $ac_top_build_prefix and srcdir + ac_top_srcdir='../../../package' + # Concatenation of $ac_top_srcdir and deep/dir + ac_srcdir='../../../package/deep/dir' + + independently of `in/in.in'. + +INIT-CMDS + Shell commands output _unquoted_ near the beginning of + `config.status', and executed each time `config.status' runs + (regardless of the tag). Because they are unquoted, for example, + `$var' is output as the value of `var'. INIT-CMDS is typically + used by `configure' to give `config.status' some variables it + needs to run the COMMANDS. + + You should be extremely cautious in your variable names: all the + INIT-CMDS share the same name space and may overwrite each other + in unpredictable ways. Sorry... + + All these macros can be called multiple times, with different TAG +values, of course! + + +File: autoconf.info, Node: Configuration Files, Next: Makefile Substitutions, Prev: Configuration Actions, Up: Setup + +4.7 Creating Configuration Files +================================ + +Be sure to read the previous section, *note Configuration Actions::. + + -- Macro: AC_CONFIG_FILES (FILE..., [CMDS], [INIT-CMDS]) + Make `AC_OUTPUT' create each `FILE' by copying an input file (by + default `FILE.in'), substituting the output variable values. This + macro is one of the instantiating macros; see *note Configuration + Actions::. *Note Makefile Substitutions::, for more information + on using output variables. *Note Setting Output Variables::, for + more information on creating them. This macro creates the + directory that the file is in if it doesn't exist. Usually, + makefiles are created this way, but other files, such as + `.gdbinit', can be specified as well. + + Typical calls to `AC_CONFIG_FILES' look like this: + + AC_CONFIG_FILES([Makefile src/Makefile man/Makefile X/Imakefile]) + AC_CONFIG_FILES([autoconf], [chmod +x autoconf]) + + You can override an input file name by appending to FILE a + colon-separated list of input files. Examples: + + AC_CONFIG_FILES([Makefile:boiler/top.mk:boiler/bot.mk] + [lib/Makefile:boiler/lib.mk]) + + Doing this allows you to keep your file names acceptable to DOS + variants, or to prepend and/or append boilerplate to the file. + + +File: autoconf.info, Node: Makefile Substitutions, Next: Configuration Headers, Prev: Configuration Files, Up: Setup + +4.8 Substitutions in Makefiles +============================== + +Each subdirectory in a distribution that contains something to be +compiled or installed should come with a file `Makefile.in', from which +`configure' creates a file `Makefile' in that directory. To create +`Makefile', `configure' performs a simple variable substitution, +replacing occurrences of `@VARIABLE@' in `Makefile.in' with the value +that `configure' has determined for that variable. Variables that are +substituted into output files in this way are called "output +variables". They are ordinary shell variables that are set in +`configure'. To make `configure' substitute a particular variable into +the output files, the macro `AC_SUBST' must be called with that +variable name as an argument. Any occurrences of `@VARIABLE@' for +other variables are left unchanged. *Note Setting Output Variables::, +for more information on creating output variables with `AC_SUBST'. + + A software package that uses a `configure' script should be +distributed with a file `Makefile.in', but no makefile; that way, the +user has to properly configure the package for the local system before +compiling it. + + *Note Makefile Conventions: (standards)Makefile Conventions, for +more information on what to put in makefiles. + +* Menu: + +* Preset Output Variables:: Output variables that are always set +* Installation Directory Variables:: Other preset output variables +* Changed Directory Variables:: Warnings about `datarootdir' +* Build Directories:: Supporting multiple concurrent compiles +* Automatic Remaking:: Makefile rules for configuring + + +File: autoconf.info, Node: Preset Output Variables, Next: Installation Directory Variables, Up: Makefile Substitutions + +4.8.1 Preset Output Variables +----------------------------- + +Some output variables are preset by the Autoconf macros. Some of the +Autoconf macros set additional output variables, which are mentioned in +the descriptions for those macros. *Note Output Variable Index::, for a +complete list of output variables. *Note Installation Directory +Variables::, for the list of the preset ones related to installation +directories. Below are listed the other preset ones, many of which are +precious variables (*note Setting Output Variables::, `AC_ARG_VAR'). + + The preset variables which are available during `config.status' +(*note Configuration Actions::) may also be used during `configure' +tests. For example, it is permissible to reference `$srcdir' when +constructing a list of directories to pass via option `-I' during a +compiler feature check. When used in this manner, coupled with the +fact that `configure' is always run from the top build directory, it is +sufficient to use just `$srcdir' instead of `$top_srcdir'. + + -- Variable: CFLAGS + Debugging and optimization options for the C compiler. If it is + not set in the environment when `configure' runs, the default + value is set when you call `AC_PROG_CC' (or empty if you don't). + `configure' uses this variable when compiling or linking programs + to test for C features. + + If a compiler option affects only the behavior of the preprocessor + (e.g., `-DNAME'), it should be put into `CPPFLAGS' instead. If it + affects only the linker (e.g., `-LDIRECTORY'), it should be put + into `LDFLAGS' instead. If it affects only the compiler proper, + `CFLAGS' is the natural home for it. If an option affects + multiple phases of the compiler, though, matters get tricky. One + approach to put such options directly into `CC', e.g., `CC='gcc + -m64''. Another is to put them into both `CPPFLAGS' and + `LDFLAGS', but not into `CFLAGS'. + + However, remember that some `Makefile' variables are reserved by + the GNU Coding Standards for the use of the "user"--the person + building the package. For instance, `CFLAGS' is one such variable. + + Sometimes package developers are tempted to set user variables + such as `CFLAGS' because it appears to make their job easier. + However, the package itself should never set a user variable, + particularly not to include switches that are required for proper + compilation of the package. Since these variables are documented + as being for the package builder, that person rightfully expects + to be able to override any of these variables at build time. If + the package developer needs to add switches without interfering + with the user, the proper way to do that is to introduce an + additional variable. Automake makes this easy by introducing + `AM_CFLAGS' (*note Flag Variables Ordering: (automake)Flag + Variables Ordering.), but the concept is the same even if Automake + is not used. + + -- Variable: configure_input + A comment saying that the file was generated automatically by + `configure' and giving the name of the input file. `AC_OUTPUT' + adds a comment line containing this variable to the top of every + makefile it creates. For other files, you should reference this + variable in a comment at the top of each input file. For example, + an input shell script should begin like this: + + #!/bin/sh + # @configure_input@ + + The presence of that line also reminds people editing the file + that it needs to be processed by `configure' in order to be used. + + -- Variable: CPPFLAGS + Preprocessor options for the C, C++, Objective C, and Objective C++ + preprocessors and compilers. If it is not set in the environment + when `configure' runs, the default value is empty. `configure' + uses this variable when preprocessing or compiling programs to + test for C, C++, Objective C, and Objective C++ features. + + This variable's contents should contain options like `-I', `-D', + and `-U' that affect only the behavior of the preprocessor. + Please see the explanation of `CFLAGS' for what you can do if an + option affects other phases of the compiler as well. + + Currently, `configure' always links as part of a single invocation + of the compiler that also preprocesses and compiles, so it uses + this variable also when linking programs. However, it is unwise to + depend on this behavior because the GNU Coding Standards do not + require it and many packages do not use `CPPFLAGS' when linking + programs. + + *Note Special Chars in Variables::, for limitations that `CPPFLAGS' + might run into. + + -- Variable: CXXFLAGS + Debugging and optimization options for the C++ compiler. It acts + like `CFLAGS', but for C++ instead of C. + + -- Variable: DEFS + `-D' options to pass to the C compiler. If `AC_CONFIG_HEADERS' is + called, `configure' replaces `@DEFS@' with `-DHAVE_CONFIG_H' + instead (*note Configuration Headers::). This variable is not + defined while `configure' is performing its tests, only when + creating the output files. *Note Setting Output Variables::, for + how to check the results of previous tests. + + -- Variable: ECHO_C + -- Variable: ECHO_N + -- Variable: ECHO_T + How does one suppress the trailing newline from `echo' for + question-answer message pairs? These variables provide a way: + + echo $ECHO_N "And the winner is... $ECHO_C" + sleep 100000000000 + echo "${ECHO_T}dead." + + Some old and uncommon `echo' implementations offer no means to + achieve this, in which case `ECHO_T' is set to tab. You might not + want to use it. + + -- Variable: ERLCFLAGS + Debugging and optimization options for the Erlang compiler. If it + is not set in the environment when `configure' runs, the default + value is empty. `configure' uses this variable when compiling + programs to test for Erlang features. + + -- Variable: FCFLAGS + Debugging and optimization options for the Fortran compiler. If it + is not set in the environment when `configure' runs, the default + value is set when you call `AC_PROG_FC' (or empty if you don't). + `configure' uses this variable when compiling or linking programs + to test for Fortran features. + + -- Variable: FFLAGS + Debugging and optimization options for the Fortran 77 compiler. + If it is not set in the environment when `configure' runs, the + default value is set when you call `AC_PROG_F77' (or empty if you + don't). `configure' uses this variable when compiling or linking + programs to test for Fortran 77 features. + + -- Variable: LDFLAGS + Options for the linker. If it is not set in the environment when + `configure' runs, the default value is empty. `configure' uses + this variable when linking programs to test for C, C++, Objective + C, Objective C++, Fortran, and Go features. + + This variable's contents should contain options like `-s' and `-L' + that affect only the behavior of the linker. Please see the + explanation of `CFLAGS' for what you can do if an option also + affects other phases of the compiler. + + Don't use this variable to pass library names (`-l') to the + linker; use `LIBS' instead. + + -- Variable: LIBS + `-l' options to pass to the linker. The default value is empty, + but some Autoconf macros may prepend extra libraries to this + variable if those libraries are found and provide necessary + functions, see *note Libraries::. `configure' uses this variable + when linking programs to test for C, C++, Objective C, Objective + C++, Fortran, and Go features. + + -- Variable: OBJCFLAGS + Debugging and optimization options for the Objective C compiler. + It acts like `CFLAGS', but for Objective C instead of C. + + -- Variable: OBJCXXFLAGS + Debugging and optimization options for the Objective C++ compiler. + It acts like `CXXFLAGS', but for Objective C++ instead of C++. + + -- Variable: GOFLAGS + Debugging and optimization options for the Go compiler. It acts + like `CFLAGS', but for Go instead of C. + + -- Variable: builddir + Rigorously equal to `.'. Added for symmetry only. + + -- Variable: abs_builddir + Absolute name of `builddir'. + + -- Variable: top_builddir + The relative name of the top level of the current build tree. In + the top-level directory, this is the same as `builddir'. + + -- Variable: top_build_prefix + The relative name of the top level of the current build tree with + final slash if nonempty. This is the same as `top_builddir', + except that it contains zero or more runs of `../', so it should + not be appended with a slash for concatenation. This helps for + `make' implementations that otherwise do not treat `./file' and + `file' as equal in the toplevel build directory. + + -- Variable: abs_top_builddir + Absolute name of `top_builddir'. + + -- Variable: srcdir + The name of the directory that contains the source code for that + makefile. + + -- Variable: abs_srcdir + Absolute name of `srcdir'. + + -- Variable: top_srcdir + The name of the top-level source code directory for the package. + In the top-level directory, this is the same as `srcdir'. + + -- Variable: abs_top_srcdir + Absolute name of `top_srcdir'. + + +File: autoconf.info, Node: Installation Directory Variables, Next: Changed Directory Variables, Prev: Preset Output Variables, Up: Makefile Substitutions + +4.8.2 Installation Directory Variables +-------------------------------------- + +The following variables specify the directories for package +installation, see *note Variables for Installation Directories: +(standards)Directory Variables, for more information. Each variable +corresponds to an argument of `configure'; trailing slashes are +stripped so that expressions such as `${prefix}/lib' expand with only +one slash between directory names. See the end of this section for +details on when and how to use these variables. + + -- Variable: bindir + The directory for installing executables that users run. + + -- Variable: datadir + The directory for installing idiosyncratic read-only + architecture-independent data. + + -- Variable: datarootdir + The root of the directory tree for read-only + architecture-independent data files. + + -- Variable: docdir + The directory for installing documentation files (other than Info + and man). + + -- Variable: dvidir + The directory for installing documentation files in DVI format. + + -- Variable: exec_prefix + The installation prefix for architecture-dependent files. By + default it's the same as `prefix'. You should avoid installing + anything directly to `exec_prefix'. However, the default value for + directories containing architecture-dependent files should be + relative to `exec_prefix'. + + -- Variable: htmldir + The directory for installing HTML documentation. + + -- Variable: includedir + The directory for installing C header files. + + -- Variable: infodir + The directory for installing documentation in Info format. + + -- Variable: libdir + The directory for installing object code libraries. + + -- Variable: libexecdir + The directory for installing executables that other programs run. + + -- Variable: localedir + The directory for installing locale-dependent but + architecture-independent data, such as message catalogs. This + directory usually has a subdirectory per locale. + + -- Variable: localstatedir + The directory for installing modifiable single-machine data. + + -- Variable: mandir + The top-level directory for installing documentation in man format. + + -- Variable: oldincludedir + The directory for installing C header files for non-GCC compilers. + + -- Variable: pdfdir + The directory for installing PDF documentation. + + -- Variable: prefix + The common installation prefix for all files. If `exec_prefix' is + defined to a different value, `prefix' is used only for + architecture-independent files. + + -- Variable: psdir + The directory for installing PostScript documentation. + + -- Variable: sbindir + The directory for installing executables that system + administrators run. + + -- Variable: sharedstatedir + The directory for installing modifiable architecture-independent + data. + + -- Variable: sysconfdir + The directory for installing read-only single-machine data. + + Most of these variables have values that rely on `prefix' or +`exec_prefix'. It is deliberate that the directory output variables +keep them unexpanded: typically `@datarootdir@' is replaced by +`${prefix}/share', not `/usr/local/share', and `@datadir@' is replaced +by `${datarootdir}'. + + This behavior is mandated by the GNU Coding Standards, so that when +the user runs: + +`make' + she can still specify a different prefix from the one specified to + `configure', in which case, if needed, the package should hard + code dependencies corresponding to the make-specified prefix. + +`make install' + she can specify a different installation location, in which case + the package _must_ still depend on the location which was compiled + in (i.e., never recompile when `make install' is run). This is an + extremely important feature, as many people may decide to install + all the files of a package grouped together, and then install + links from the final locations to there. + + In order to support these features, it is essential that +`datarootdir' remains defined as `${prefix}/share', so that its value +can be expanded based on the current value of `prefix'. + + A corollary is that you should not use these variables except in +makefiles. For instance, instead of trying to evaluate `datadir' in +`configure' and hard-coding it in makefiles using e.g., +`AC_DEFINE_UNQUOTED([DATADIR], ["$datadir"], [Data directory.])', you +should add `-DDATADIR='$(datadir)'' to your makefile's definition of +`CPPFLAGS' (`AM_CPPFLAGS' if you are also using Automake). + + Similarly, you should not rely on `AC_CONFIG_FILES' to replace +`bindir' and friends in your shell scripts and other files; instead, +let `make' manage their replacement. For instance Autoconf ships +templates of its shell scripts ending with `.in', and uses a makefile +snippet similar to the following to build scripts like `autoheader' and +`autom4te': + + edit = sed \ + -e 's|@bindir[@]|$(bindir)|g' \ + -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \ + -e 's|@prefix[@]|$(prefix)|g' + + autoheader autom4te: Makefile + rm -f $@ $@.tmp + srcdir=''; \ + test -f ./$@.in || srcdir=$(srcdir)/; \ + $(edit) $${srcdir}$@.in >$@.tmp + chmod +x $@.tmp + chmod a-w $@.tmp + mv $@.tmp $@ + + autoheader: $(srcdir)/autoheader.in + autom4te: $(srcdir)/autom4te.in + + Some details are noteworthy: + +`@bindir[@]' + The brackets prevent `configure' from replacing `@bindir@' in the + Sed expression itself. Brackets are preferable to a backslash + here, since Posix says `\@' is not portable. + +`$(bindir)' + Don't use `@bindir@'! Use the matching makefile variable instead. + +`$(pkgdatadir)' + The example takes advantage of the variable `$(pkgdatadir)' + provided by Automake; it is equivalent to `$(datadir)/$(PACKAGE)'. + +`/' + Don't use `/' in the Sed expressions that replace file names since + most likely the variables you use, such as `$(bindir)', contain + `/'. Use a shell metacharacter instead, such as `|'. + +special characters + File names, file name components, and the value of `VPATH' should + not contain shell metacharacters or white space. *Note Special + Chars in Variables::. + +dependency on `Makefile' + Since `edit' uses values that depend on the configuration specific + values (`prefix', etc.) and not only on `VERSION' and so forth, + the output depends on `Makefile', not `configure.ac'. + +`$@' + The main rule is generic, and uses `$@' extensively to avoid the + need for multiple copies of the rule. + +Separated dependencies and single suffix rules + You can't use them! The above snippet cannot be (portably) + rewritten as: + + autoconf autoheader: Makefile + .in: + rm -f $@ $@.tmp + $(edit) $< >$@.tmp + chmod +x $@.tmp + mv $@.tmp $@ + + *Note Single Suffix Rules::, for details. + +`$(srcdir)' + Be sure to specify the name of the source directory, otherwise the + package won't support separated builds. + + For the more specific installation of Erlang libraries, the +following variables are defined: + + -- Variable: ERLANG_INSTALL_LIB_DIR + The common parent directory of Erlang library installation + directories. This variable is set by calling the + `AC_ERLANG_SUBST_INSTALL_LIB_DIR' macro in `configure.ac'. + + -- Variable: ERLANG_INSTALL_LIB_DIR_LIBRARY + The installation directory for Erlang library LIBRARY. This + variable is set by using the `AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR' + macro in `configure.ac'. + + *Note Erlang Libraries::, for details. + + +File: autoconf.info, Node: Changed Directory Variables, Next: Build Directories, Prev: Installation Directory Variables, Up: Makefile Substitutions + +4.8.3 Changed Directory Variables +--------------------------------- + +In Autoconf 2.60, the set of directory variables has changed, and the +defaults of some variables have been adjusted (*note Installation +Directory Variables::) to changes in the GNU Coding Standards. +Notably, `datadir', `infodir', and `mandir' are now expressed in terms +of `datarootdir'. If you are upgrading from an earlier Autoconf +version, you may need to adjust your files to ensure that the directory +variables are substituted correctly (*note Defining Directories::), and +that a definition of `datarootdir' is in place. For example, in a +`Makefile.in', adding + + datarootdir = @datarootdir@ + +is usually sufficient. If you use Automake to create `Makefile.in', it +will add this for you. + + To help with the transition, Autoconf warns about files that seem to +use `datarootdir' without defining it. In some cases, it then expands +the value of `$datarootdir' in substitutions of the directory +variables. The following example shows such a warning: + + $ cat configure.ac + AC_INIT + AC_CONFIG_FILES([Makefile]) + AC_OUTPUT + $ cat Makefile.in + prefix = @prefix@ + datadir = @datadir@ + $ autoconf + $ configure + configure: creating ./config.status + config.status: creating Makefile + config.status: WARNING: + Makefile.in seems to ignore the --datarootdir setting + $ cat Makefile + prefix = /usr/local + datadir = ${prefix}/share + + Usually one can easily change the file to accommodate both older and +newer Autoconf releases: + + $ cat Makefile.in + prefix = @prefix@ + datarootdir = @datarootdir@ + datadir = @datadir@ + $ configure + configure: creating ./config.status + config.status: creating Makefile + $ cat Makefile + prefix = /usr/local + datarootdir = ${prefix}/share + datadir = ${datarootdir} + + In some cases, however, the checks may not be able to detect that a +suitable initialization of `datarootdir' is in place, or they may fail +to detect that such an initialization is necessary in the output file. +If, after auditing your package, there are still spurious `configure' +warnings about `datarootdir', you may add the line + + AC_DEFUN([AC_DATAROOTDIR_CHECKED]) + +to your `configure.ac' to disable the warnings. This is an exception +to the usual rule that you should not define a macro whose name begins +with `AC_' (*note Macro Names::). + + +File: autoconf.info, Node: Build Directories, Next: Automatic Remaking, Prev: Changed Directory Variables, Up: Makefile Substitutions + +4.8.4 Build Directories +----------------------- + +You can support compiling a software package for several architectures +simultaneously from the same copy of the source code. The object files +for each architecture are kept in their own directory. + + To support doing this, `make' uses the `VPATH' variable to find the +files that are in the source directory. GNU Make can do this. Most +other recent `make' programs can do this as well, though they may have +difficulties and it is often simpler to recommend GNU `make' (*note +VPATH and Make::). Older `make' programs do not support `VPATH'; when +using them, the source code must be in the same directory as the object +files. + + If you are using GNU Automake, the remaining details in this section +are already covered for you, based on the contents of your +`Makefile.am'. But if you are using Autoconf in isolation, then +supporting `VPATH' requires the following in your `Makefile.in': + + srcdir = @srcdir@ + VPATH = @srcdir@ + + Do not set `VPATH' to the value of another variable (*note Variables +listed in VPATH::. + + `configure' substitutes the correct value for `srcdir' when it +produces `Makefile'. + + Do not use the `make' variable `$<', which expands to the file name +of the file in the source directory (found with `VPATH'), except in +implicit rules. (An implicit rule is one such as `.c.o', which tells +how to create a `.o' file from a `.c' file.) Some versions of `make' +do not set `$<' in explicit rules; they expand it to an empty value. + + Instead, Make command lines should always refer to source files by +prefixing them with `$(srcdir)/'. For example: + + time.info: time.texinfo + $(MAKEINFO) '$(srcdir)/time.texinfo' + + +File: autoconf.info, Node: Automatic Remaking, Prev: Build Directories, Up: Makefile Substitutions + +4.8.5 Automatic Remaking +------------------------ + +You can put rules like the following in the top-level `Makefile.in' for +a package to automatically update the configuration information when +you change the configuration files. This example includes all of the +optional files, such as `aclocal.m4' and those related to configuration +header files. Omit from the `Makefile.in' rules for any of these files +that your package does not use. + + The `$(srcdir)/' prefix is included because of limitations in the +`VPATH' mechanism. + + The `stamp-' files are necessary because the timestamps of +`config.h.in' and `config.h' are not changed if remaking them does not +change their contents. This feature avoids unnecessary recompilation. +You should include the file `stamp-h.in' in your package's +distribution, so that `make' considers `config.h.in' up to date. Don't +use `touch' (*note Limitations of Usual Tools: touch.); instead, use +`echo' (using `date' would cause needless differences, hence CVS +conflicts, etc.). + + $(srcdir)/configure: configure.ac aclocal.m4 + cd '$(srcdir)' && autoconf + + # autoheader might not change config.h.in, so touch a stamp file. + $(srcdir)/config.h.in: stamp-h.in + $(srcdir)/stamp-h.in: configure.ac aclocal.m4 + cd '$(srcdir)' && autoheader + echo timestamp > '$(srcdir)/stamp-h.in' + + config.h: stamp-h + stamp-h: config.h.in config.status + ./config.status + + Makefile: Makefile.in config.status + ./config.status + + config.status: configure + ./config.status --recheck + +(Be careful if you copy these lines directly into your makefile, as you +need to convert the indented lines to start with the tab character.) + + In addition, you should use + + AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) + +so `config.status' ensures that `config.h' is considered up to date. +*Note Output::, for more information about `AC_OUTPUT'. + + *Note config.status Invocation::, for more examples of handling +configuration-related dependencies. + + +File: autoconf.info, Node: Configuration Headers, Next: Configuration Commands, Prev: Makefile Substitutions, Up: Setup + +4.9 Configuration Header Files +============================== + +When a package contains more than a few tests that define C preprocessor +symbols, the command lines to pass `-D' options to the compiler can get +quite long. This causes two problems. One is that the `make' output +is hard to visually scan for errors. More seriously, the command lines +can exceed the length limits of some operating systems. As an +alternative to passing `-D' options to the compiler, `configure' +scripts can create a C header file containing `#define' directives. +The `AC_CONFIG_HEADERS' macro selects this kind of output. Though it +can be called anywhere between `AC_INIT' and `AC_OUTPUT', it is +customary to call it right after `AC_INIT'. + + The package should `#include' the configuration header file before +any other header files, to prevent inconsistencies in declarations (for +example, if it redefines `const'). + + To provide for VPATH builds, remember to pass the C compiler a `-I.' +option (or `-I..'; whichever directory contains `config.h'). Even if +you use `#include "config.h"', the preprocessor searches only the +directory of the currently read file, i.e., the source directory, not +the build directory. + + With the appropriate `-I' option, you can use `#include <config.h>'. +Actually, it's a good habit to use it, because in the rare case when +the source directory contains another `config.h', the build directory +should be searched first. + + -- Macro: AC_CONFIG_HEADERS (HEADER ..., [CMDS], [INIT-CMDS]) + This macro is one of the instantiating macros; see *note + Configuration Actions::. Make `AC_OUTPUT' create the file(s) in + the blank-or-newline-separated list HEADER containing C + preprocessor `#define' statements, and replace `@DEFS@' in + generated files with `-DHAVE_CONFIG_H' instead of the value of + `DEFS'. The usual name for HEADER is `config.h'. + + If HEADER already exists and its contents are identical to what + `AC_OUTPUT' would put in it, it is left alone. Doing this allows + making some changes in the configuration without needlessly causing + object files that depend on the header file to be recompiled. + + Usually the input file is named `HEADER.in'; however, you can + override the input file name by appending to HEADER a + colon-separated list of input files. For example, you might need + to make the input file name acceptable to DOS variants: + + AC_CONFIG_HEADERS([config.h:config.hin]) + + + -- Macro: AH_HEADER + This macro is defined as the name of the first declared config + header and undefined if no config headers have been declared up to + this point. A third-party macro may, for example, require use of + a config header without invoking AC_CONFIG_HEADERS twice, like + this: + + AC_CONFIG_COMMANDS_PRE( + [m4_ifndef([AH_HEADER], [AC_CONFIG_HEADERS([config.h])])]) + + + *Note Configuration Actions::, for more details on HEADER. + +* Menu: + +* Header Templates:: Input for the configuration headers +* autoheader Invocation:: How to create configuration templates +* Autoheader Macros:: How to specify CPP templates + + +File: autoconf.info, Node: Header Templates, Next: autoheader Invocation, Up: Configuration Headers + +4.9.1 Configuration Header Templates +------------------------------------ + +Your distribution should contain a template file that looks as you want +the final header file to look, including comments, with `#undef' +statements which are used as hooks. For example, suppose your +`configure.ac' makes these calls: + + AC_CONFIG_HEADERS([conf.h]) + AC_CHECK_HEADERS([unistd.h]) + +Then you could have code like the following in `conf.h.in'. The +`conf.h' created by `configure' defines `HAVE_UNISTD_H' to 1, if and +only if the system has `unistd.h'. + + /* Define as 1 if you have unistd.h. */ + #undef HAVE_UNISTD_H + + The format of the template file is stricter than what the C +preprocessor is required to accept. A directive line should contain +only whitespace, `#undef', and `HAVE_UNISTD_H'. The use of `#define' +instead of `#undef', or of comments on the same line as `#undef', is +strongly discouraged. Each hook should only be listed once. Other +preprocessor lines, such as `#ifdef' or `#include', are copied verbatim +from the template into the generated header. + + Since it is a tedious task to keep a template header up to date, you +may use `autoheader' to generate it, see *note autoheader Invocation::. + + During the instantiation of the header, each `#undef' line in the +template file for each symbol defined by `AC_DEFINE' is changed to an +appropriate `#define'. If the corresponding `AC_DEFINE' has not been +executed during the `configure' run, the `#undef' line is commented +out. (This is important, e.g., for `_POSIX_SOURCE': on many systems, +it can be implicitly defined by the compiler, and undefining it in the +header would then break compilation of subsequent headers.) + + Currently, _all_ remaining `#undef' lines in the header template are +commented out, whether or not there was a corresponding `AC_DEFINE' for +the macro name; but this behavior is not guaranteed for future releases +of Autoconf. + + Generally speaking, since you should not use `#define', and you +cannot guarantee whether a `#undef' directive in the header template +will be converted to a `#define' or commented out in the generated +header file, the template file cannot be used for conditional +definition effects. Consequently, if you need to use the construct + + #ifdef THIS + # define THAT + #endif + +you must place it outside of the template. If you absolutely need to +hook it to the config header itself, please put the directives to a +separate file, and `#include' that file from the config header +template. If you are using `autoheader', you would probably use +`AH_BOTTOM' to append the `#include' directive. + + +File: autoconf.info, Node: autoheader Invocation, Next: Autoheader Macros, Prev: Header Templates, Up: Configuration Headers + +4.9.2 Using `autoheader' to Create `config.h.in' +------------------------------------------------ + +The `autoheader' program can create a template file of C `#define' +statements for `configure' to use. It searches for the first +invocation of `AC_CONFIG_HEADERS' in `configure' sources to determine +the name of the template. (If the first call of `AC_CONFIG_HEADERS' +specifies more than one input file name, `autoheader' uses the first +one.) + + It is recommended that only one input file is used. If you want to +append a boilerplate code, it is preferable to use `AH_BOTTOM([#include +<conf_post.h>])'. File `conf_post.h' is not processed during the +configuration then, which make things clearer. Analogically, `AH_TOP' +can be used to prepend a boilerplate code. + + In order to do its job, `autoheader' needs you to document all of +the symbols that you might use. Typically this is done via an +`AC_DEFINE' or `AC_DEFINE_UNQUOTED' call whose first argument is a +literal symbol and whose third argument describes the symbol (*note +Defining Symbols::). Alternatively, you can use `AH_TEMPLATE' (*note +Autoheader Macros::), or you can supply a suitable input file for a +subsequent configuration header file. Symbols defined by Autoconf's +builtin tests are already documented properly; you need to document +only those that you define yourself. + + You might wonder why `autoheader' is needed: after all, why would +`configure' need to "patch" a `config.h.in' to produce a `config.h' +instead of just creating `config.h' from scratch? Well, when +everything rocks, the answer is just that we are wasting our time +maintaining `autoheader': generating `config.h' directly is all that is +needed. When things go wrong, however, you'll be thankful for the +existence of `autoheader'. + + The fact that the symbols are documented is important in order to +_check_ that `config.h' makes sense. The fact that there is a +well-defined list of symbols that should be defined (or not) is also +important for people who are porting packages to environments where +`configure' cannot be run: they just have to _fill in the blanks_. + + But let's come back to the point: the invocation of `autoheader'... + + If you give `autoheader' an argument, it uses that file instead of +`configure.ac' and writes the header file to the standard output +instead of to `config.h.in'. If you give `autoheader' an argument of +`-', it reads the standard input instead of `configure.ac' and writes +the header file to the standard output. + + `autoheader' accepts the following options: + +`--help' +`-h' + Print a summary of the command line options and exit. + +`--version' +`-V' + Print the version number of Autoconf and exit. + +`--verbose' +`-v' + Report processing steps. + +`--debug' +`-d' + Don't remove the temporary files. + +`--force' +`-f' + Remake the template file even if newer than its input files. + +`--include=DIR' +`-I DIR' + Append DIR to the include path. Multiple invocations accumulate. + +`--prepend-include=DIR' +`-B DIR' + Prepend DIR to the include path. Multiple invocations accumulate. + +`--warnings=CATEGORY' +`-W CATEGORY' + Report the warnings related to CATEGORY (which can actually be a + comma separated list). Current categories include: + + `obsolete' + report the uses of obsolete constructs + + `all' + report all the warnings + + `none' + report none + + `error' + treats warnings as errors + + `no-CATEGORY' + disable warnings falling into CATEGORY + + + +File: autoconf.info, Node: Autoheader Macros, Prev: autoheader Invocation, Up: Configuration Headers + +4.9.3 Autoheader Macros +----------------------- + +`autoheader' scans `configure.ac' and figures out which C preprocessor +symbols it might define. It knows how to generate templates for +symbols defined by `AC_CHECK_HEADERS', `AC_CHECK_FUNCS' etc., but if +you `AC_DEFINE' any additional symbol, you must define a template for +it. If there are missing templates, `autoheader' fails with an error +message. + + The template for a SYMBOL is created by `autoheader' from the +DESCRIPTION argument to an `AC_DEFINE'; see *note Defining Symbols::. + + For special needs, you can use the following macros. + + -- Macro: AH_TEMPLATE (KEY, DESCRIPTION) + Tell `autoheader' to generate a template for KEY. This macro + generates standard templates just like `AC_DEFINE' when a + DESCRIPTION is given. + + For example: + + AH_TEMPLATE([CRAY_STACKSEG_END], + [Define to one of _getb67, GETB67, getb67 + for Cray-2 and Cray-YMP systems. This + function is required for alloca.c support + on those systems.]) + + generates the following template, with the description properly + justified. + + /* Define to one of _getb67, GETB67, getb67 for Cray-2 and + Cray-YMP systems. This function is required for alloca.c + support on those systems. */ + #undef CRAY_STACKSEG_END + + -- Macro: AH_VERBATIM (KEY, TEMPLATE) + Tell `autoheader' to include the TEMPLATE as-is in the header + template file. This TEMPLATE is associated with the KEY, which is + used to sort all the different templates and guarantee their + uniqueness. It should be a symbol that can be defined via + `AC_DEFINE'. + + -- Macro: AH_TOP (TEXT) + Include TEXT at the top of the header template file. + + -- Macro: AH_BOTTOM (TEXT) + Include TEXT at the bottom of the header template file. + + Please note that TEXT gets included "verbatim" to the template file, +not to the resulting config header, so it can easily get mangled when +the template is processed. There is rarely a need for something other +than + + AH_BOTTOM([#include <custom.h>]) + + +File: autoconf.info, Node: Configuration Commands, Next: Configuration Links, Prev: Configuration Headers, Up: Setup + +4.10 Running Arbitrary Configuration Commands +============================================= + +You can execute arbitrary commands before, during, and after +`config.status' is run. The three following macros accumulate the +commands to run when they are called multiple times. +`AC_CONFIG_COMMANDS' replaces the obsolete macro `AC_OUTPUT_COMMANDS'; +see *note Obsolete Macros::, for details. + + -- Macro: AC_CONFIG_COMMANDS (TAG..., [CMDS], [INIT-CMDS]) + Specify additional shell commands to run at the end of + `config.status', and shell commands to initialize any variables + from `configure'. Associate the commands with TAG. Since + typically the CMDS create a file, TAG should naturally be the name + of that file. If needed, the directory hosting TAG is created. + This macro is one of the instantiating macros; see *note + Configuration Actions::. + + Here is an unrealistic example: + fubar=42 + AC_CONFIG_COMMANDS([fubar], + [echo this is extra $fubar, and so on.], + [fubar=$fubar]) + + Here is a better one: + AC_CONFIG_COMMANDS([timestamp], [date >timestamp]) + + The following two macros look similar, but in fact they are not of +the same breed: they are executed directly by `configure', so you +cannot use `config.status' to rerun them. + + -- Macro: AC_CONFIG_COMMANDS_PRE (CMDS) + Execute the CMDS right before creating `config.status'. + + This macro presents the last opportunity to call `AC_SUBST', + `AC_DEFINE', or `AC_CONFIG_ITEMS' macros. + + -- Macro: AC_CONFIG_COMMANDS_POST (CMDS) + Execute the CMDS right after creating `config.status'. + + +File: autoconf.info, Node: Configuration Links, Next: Subdirectories, Prev: Configuration Commands, Up: Setup + +4.11 Creating Configuration Links +================================= + +You may find it convenient to create links whose destinations depend +upon results of tests. One can use `AC_CONFIG_COMMANDS' but the +creation of relative symbolic links can be delicate when the package is +built in a directory different from the source directory. + + -- Macro: AC_CONFIG_LINKS (DEST:SOURCE..., [CMDS], [INIT-CMDS]) + Make `AC_OUTPUT' link each of the existing files SOURCE to the + corresponding link name DEST. Makes a symbolic link if possible, + otherwise a hard link if possible, otherwise a copy. The DEST and + SOURCE names should be relative to the top level source or build + directory. This macro is one of the instantiating macros; see + *note Configuration Actions::. + + For example, this call: + + AC_CONFIG_LINKS([host.h:config/$machine.h + object.h:config/$obj_format.h]) + + creates in the current directory `host.h' as a link to + `SRCDIR/config/$machine.h', and `object.h' as a link to + `SRCDIR/config/$obj_format.h'. + + The tempting value `.' for DEST is invalid: it makes it impossible + for `config.status' to guess the links to establish. + + One can then run: + ./config.status host.h object.h + to create the links. + + +File: autoconf.info, Node: Subdirectories, Next: Default Prefix, Prev: Configuration Links, Up: Setup + +4.12 Configuring Other Packages in Subdirectories +================================================= + +In most situations, calling `AC_OUTPUT' is sufficient to produce +makefiles in subdirectories. However, `configure' scripts that control +more than one independent package can use `AC_CONFIG_SUBDIRS' to run +`configure' scripts for other packages in subdirectories. + + -- Macro: AC_CONFIG_SUBDIRS (DIR ...) + Make `AC_OUTPUT' run `configure' in each subdirectory DIR in the + given blank-or-newline-separated list. Each DIR should be a + literal, i.e., please do not use: + + if test "x$package_foo_enabled" = xyes; then + my_subdirs="$my_subdirs foo" + fi + AC_CONFIG_SUBDIRS([$my_subdirs]) + + because this prevents `./configure --help=recursive' from + displaying the options of the package `foo'. Instead, you should + write: + + if test "x$package_foo_enabled" = xyes; then + AC_CONFIG_SUBDIRS([foo]) + fi + + If a given DIR is not found at `configure' run time, a warning is + reported; if the subdirectory is optional, write: + + if test -d "$srcdir/foo"; then + AC_CONFIG_SUBDIRS([foo]) + fi + + If a given DIR contains `configure.gnu', it is run instead of + `configure'. This is for packages that might use a non-Autoconf + script `Configure', which can't be called through a wrapper + `configure' since it would be the same file on case-insensitive + file systems. Likewise, if a DIR contains `configure.in' but no + `configure', the Cygnus `configure' script found by + `AC_CONFIG_AUX_DIR' is used. + + The subdirectory `configure' scripts are given the same command + line options that were given to this `configure' script, with minor + changes if needed, which include: + + - adjusting a relative name for the cache file; + + - adjusting a relative name for the source directory; + + - propagating the current value of `$prefix', including if it + was defaulted, and if the default values of the top level and + of the subdirectory `configure' differ. + + This macro also sets the output variable `subdirs' to the list of + directories `DIR ...'. Make rules can use this variable to + determine which subdirectories to recurse into. + + This macro may be called multiple times. + + +File: autoconf.info, Node: Default Prefix, Prev: Subdirectories, Up: Setup + +4.13 Default Prefix +=================== + +By default, `configure' sets the prefix for files it installs to +`/usr/local'. The user of `configure' can select a different prefix +using the `--prefix' and `--exec-prefix' options. There are two ways +to change the default: when creating `configure', and when running it. + + Some software packages might want to install in a directory other +than `/usr/local' by default. To accomplish that, use the +`AC_PREFIX_DEFAULT' macro. + + -- Macro: AC_PREFIX_DEFAULT (PREFIX) + Set the default installation prefix to PREFIX instead of + `/usr/local'. + + It may be convenient for users to have `configure' guess the +installation prefix from the location of a related program that they +have already installed. If you wish to do that, you can call +`AC_PREFIX_PROGRAM'. + + -- Macro: AC_PREFIX_PROGRAM (PROGRAM) + If the user did not specify an installation prefix (using the + `--prefix' option), guess a value for it by looking for PROGRAM in + `PATH', the way the shell does. If PROGRAM is found, set the + prefix to the parent of the directory containing PROGRAM, else + default the prefix as described above (`/usr/local' or + `AC_PREFIX_DEFAULT'). For example, if PROGRAM is `gcc' and the + `PATH' contains `/usr/local/gnu/bin/gcc', set the prefix to + `/usr/local/gnu'. + + +File: autoconf.info, Node: Existing Tests, Next: Writing Tests, Prev: Setup, Up: Top + +5 Existing Tests +**************** + +These macros test for particular system features that packages might +need or want to use. If you need to test for a kind of feature that +none of these macros check for, you can probably do it by calling +primitive test macros with appropriate arguments (*note Writing +Tests::). + + These tests print messages telling the user which feature they're +checking for, and what they find. They cache their results for future +`configure' runs (*note Caching Results::). + + Some of these macros set output variables. *Note Makefile +Substitutions::, for how to get their values. The phrase "define NAME" +is used below as a shorthand to mean "define the C preprocessor symbol +NAME to the value 1". *Note Defining Symbols::, for how to get those +symbol definitions into your program. + +* Menu: + +* Common Behavior:: Macros' standard schemes +* Alternative Programs:: Selecting between alternative programs +* Files:: Checking for the existence of files +* Libraries:: Library archives that might be missing +* Library Functions:: C library functions that might be missing +* Header Files:: Header files that might be missing +* Declarations:: Declarations that may be missing +* Structures:: Structures or members that might be missing +* Types:: Types that might be missing +* Compilers and Preprocessors:: Checking for compiling programs +* System Services:: Operating system services +* Posix Variants:: Special kludges for specific Posix variants +* Erlang Libraries:: Checking for the existence of Erlang libraries + + +File: autoconf.info, Node: Common Behavior, Next: Alternative Programs, Up: Existing Tests + +5.1 Common Behavior +=================== + +Much effort has been expended to make Autoconf easy to learn. The most +obvious way to reach this goal is simply to enforce standard interfaces +and behaviors, avoiding exceptions as much as possible. Because of +history and inertia, unfortunately, there are still too many exceptions +in Autoconf; nevertheless, this section describes some of the common +rules. + +* Menu: + +* Standard Symbols:: Symbols defined by the macros +* Default Includes:: Includes used by the generic macros + + +File: autoconf.info, Node: Standard Symbols, Next: Default Includes, Up: Common Behavior + +5.1.1 Standard Symbols +---------------------- + +All the generic macros that `AC_DEFINE' a symbol as a result of their +test transform their ARGUMENT values to a standard alphabet. First, +ARGUMENT is converted to upper case and any asterisks (`*') are each +converted to `P'. Any remaining characters that are not alphanumeric +are converted to underscores. + + For instance, + + AC_CHECK_TYPES([struct $Expensive*]) + +defines the symbol `HAVE_STRUCT__EXPENSIVEP' if the check succeeds. + + +File: autoconf.info, Node: Default Includes, Prev: Standard Symbols, Up: Common Behavior + +5.1.2 Default Includes +---------------------- + +Several tests depend upon a set of header files. Since these headers +are not universally available, tests actually have to provide a set of +protected includes, such as: + + #ifdef TIME_WITH_SYS_TIME + # include <sys/time.h> + # include <time.h> + #else + # ifdef HAVE_SYS_TIME_H + # include <sys/time.h> + # else + # include <time.h> + # endif + #endif + +Unless you know exactly what you are doing, you should avoid using +unconditional includes, and check the existence of the headers you +include beforehand (*note Header Files::). + + Most generic macros use the following macro to provide the default +set of includes: + + -- Macro: AC_INCLUDES_DEFAULT ([INCLUDE-DIRECTIVES]) + Expand to INCLUDE-DIRECTIVES if defined, otherwise to: + + #include <stdio.h> + #ifdef HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #ifdef HAVE_SYS_STAT_H + # include <sys/stat.h> + #endif + #ifdef STDC_HEADERS + # include <stdlib.h> + # include <stddef.h> + #else + # ifdef HAVE_STDLIB_H + # include <stdlib.h> + # endif + #endif + #ifdef HAVE_STRING_H + # if !defined STDC_HEADERS && defined HAVE_MEMORY_H + # include <memory.h> + # endif + # include <string.h> + #endif + #ifdef HAVE_STRINGS_H + # include <strings.h> + #endif + #ifdef HAVE_INTTYPES_H + # include <inttypes.h> + #endif + #ifdef HAVE_STDINT_H + # include <stdint.h> + #endif + #ifdef HAVE_UNISTD_H + # include <unistd.h> + #endif + + If the default includes are used, then check for the presence of + these headers and their compatibility, i.e., you don't need to run + `AC_HEADER_STDC', nor check for `stdlib.h' etc. + + These headers are checked for in the same order as they are + included. For instance, on some systems `string.h' and + `strings.h' both exist, but conflict. Then `HAVE_STRING_H' is + defined, not `HAVE_STRINGS_H'. + + +File: autoconf.info, Node: Alternative Programs, Next: Files, Prev: Common Behavior, Up: Existing Tests + +5.2 Alternative Programs +======================== + +These macros check for the presence or behavior of particular programs. +They are used to choose between several alternative programs and to +decide what to do once one has been chosen. If there is no macro +specifically defined to check for a program you need, and you don't need +to check for any special properties of it, then you can use one of the +general program-check macros. + +* Menu: + +* Particular Programs:: Special handling to find certain programs +* Generic Programs:: How to find other programs + + +File: autoconf.info, Node: Particular Programs, Next: Generic Programs, Up: Alternative Programs + +5.2.1 Particular Program Checks +------------------------------- + +These macros check for particular programs--whether they exist, and in +some cases whether they support certain features. + + -- Macro: AC_PROG_AWK + Check for `gawk', `mawk', `nawk', and `awk', in that order, and + set output variable `AWK' to the first one that is found. It + tries `gawk' first because that is reported to be the best + implementation. The result can be overridden by setting the + variable `AWK' or the cache variable `ac_cv_prog_AWK'. + + Using this macro is sufficient to avoid the pitfalls of traditional + `awk' (*note Limitations of Usual Tools: awk.). + + -- Macro: AC_PROG_GREP + Look for the best available `grep' or `ggrep' that accepts the + longest input lines possible, and that supports multiple `-e' + options. Set the output variable `GREP' to whatever is chosen. + *Note Limitations of Usual Tools: grep, for more information about + portability problems with the `grep' command family. The result + can be overridden by setting the `GREP' variable and is cached in + the `ac_cv_path_GREP' variable. + + -- Macro: AC_PROG_EGREP + Check whether `$GREP -E' works, or else look for the best available + `egrep' or `gegrep' that accepts the longest input lines possible. + Set the output variable `EGREP' to whatever is chosen. The result + can be overridden by setting the `EGREP' variable and is cached in + the `ac_cv_path_EGREP' variable. + + -- Macro: AC_PROG_FGREP + Check whether `$GREP -F' works, or else look for the best available + `fgrep' or `gfgrep' that accepts the longest input lines possible. + Set the output variable `FGREP' to whatever is chosen. The result + can be overridden by setting the `FGREP' variable and is cached in + the `ac_cv_path_FGREP' variable. + + -- Macro: AC_PROG_INSTALL + Set output variable `INSTALL' to the name of a BSD-compatible + `install' program, if one is found in the current `PATH'. + Otherwise, set `INSTALL' to `DIR/install-sh -c', checking the + directories specified to `AC_CONFIG_AUX_DIR' (or its default + directories) to determine DIR (*note Output::). Also set the + variables `INSTALL_PROGRAM' and `INSTALL_SCRIPT' to `${INSTALL}' + and `INSTALL_DATA' to `${INSTALL} -m 644'. + + `@INSTALL@' is special, as its value may vary for different + configuration files. + + This macro screens out various instances of `install' known not to + work. It prefers to find a C program rather than a shell script, + for speed. Instead of `install-sh', it can also use `install.sh', + but that name is obsolete because some `make' programs have a rule + that creates `install' from it if there is no makefile. Further, + this macro requires `install' to be able to install multiple files + into a target directory in a single invocation. + + Autoconf comes with a copy of `install-sh' that you can use. If + you use `AC_PROG_INSTALL', you must include either `install-sh' or + `install.sh' in your distribution; otherwise `configure' produces + an error message saying it can't find them--even if the system + you're on has a good `install' program. This check is a safety + measure to prevent you from accidentally leaving that file out, + which would prevent your package from installing on systems that + don't have a BSD-compatible `install' program. + + If you need to use your own installation program because it has + features not found in standard `install' programs, there is no + reason to use `AC_PROG_INSTALL'; just put the file name of your + program into your `Makefile.in' files. + + The result of the test can be overridden by setting the variable + `INSTALL' or the cache variable `ac_cv_path_install'. + + -- Macro: AC_PROG_MKDIR_P + Set output variable `MKDIR_P' to a program that ensures that for + each argument, a directory named by this argument exists, creating + it and its parent directories if needed, and without race + conditions when two instances of the program attempt to make the + same directory at nearly the same time. + + This macro uses the `mkdir -p' command if possible. Otherwise, it + falls back on invoking `install-sh' with the `-d' option, so your + package should contain `install-sh' as described under + `AC_PROG_INSTALL'. An `install-sh' file that predates Autoconf + 2.60 or Automake 1.10 is vulnerable to race conditions, so if you + want to support parallel installs from different packages into the + same directory you need to make sure you have an up-to-date + `install-sh'. In particular, be careful about using `autoreconf + -if' if your Automake predates Automake 1.10. + + This macro is related to the `AS_MKDIR_P' macro (*note Programming + in M4sh::), but it sets an output variable intended for use in + other files, whereas `AS_MKDIR_P' is intended for use in scripts + like `configure'. Also, `AS_MKDIR_P' does not accept options, but + `MKDIR_P' supports the `-m' option, e.g., a makefile might invoke + `$(MKDIR_P) -m 0 dir' to create an inaccessible directory, and + conversely a makefile should use `$(MKDIR_P) -- $(FOO)' if FOO + might yield a value that begins with `-'. Finally, `AS_MKDIR_P' + does not check for race condition vulnerability, whereas + `AC_PROG_MKDIR_P' does. + + `@MKDIR_P@' is special, as its value may vary for different + configuration files. + + The result of the test can be overridden by setting the variable + `MKDIR_P' or the cache variable `ac_cv_path_mkdir'. + + -- Macro: AC_PROG_LEX + If `flex' is found, set output variable `LEX' to `flex' and + `LEXLIB' to `-lfl', if that library is in a standard place. + Otherwise set `LEX' to `lex' and `LEXLIB' to `-ll', if found. If + neither variant is available, set `LEX' to `:'; for packages that + ship the generated `file.yy.c' alongside the source `file.l', this + default allows users without a lexer generator to still build the + package even if the timestamp for `file.l' is inadvertently + changed. + + Define `YYTEXT_POINTER' if `yytext' defaults to `char *' instead + of to `char []'. Also set output variable `LEX_OUTPUT_ROOT' to + the base of the file name that the lexer generates; usually + `lex.yy', but sometimes something else. These results vary + according to whether `lex' or `flex' is being used. + + You are encouraged to use Flex in your sources, since it is both + more pleasant to use than plain Lex and the C source it produces + is portable. In order to ensure portability, however, you must + either provide a function `yywrap' or, if you don't use it (e.g., + your scanner has no `#include'-like feature), simply include a + `%noyywrap' statement in the scanner's source. Once this done, + the scanner is portable (unless _you_ felt free to use nonportable + constructs) and does not depend on any library. In this case, and + in this case only, it is suggested that you use this Autoconf + snippet: + + AC_PROG_LEX + if test "x$LEX" != xflex; then + LEX="$SHELL $missing_dir/missing flex" + AC_SUBST([LEX_OUTPUT_ROOT], [lex.yy]) + AC_SUBST([LEXLIB], ['']) + fi + + The shell script `missing' can be found in the Automake + distribution. + + Remember that the user may have supplied an alternate location in + `LEX', so if Flex is required, it is better to check that the user + provided something sufficient by parsing the output of `$LEX + --version' than by simply relying on `test "x$LEX" = xflex'. + + To ensure backward compatibility, Automake's `AM_PROG_LEX' invokes + (indirectly) this macro twice, which causes an annoying but benign + "`AC_PROG_LEX' invoked multiple times" warning. Future versions + of Automake will fix this issue; meanwhile, just ignore this + message. + + As part of running the test, this macro may delete any file in the + configuration directory named `lex.yy.c' or `lexyy.c'. + + The result of this test can be influenced by setting the variable + `LEX' or the cache variable `ac_cv_prog_LEX'. + + -- Macro: AC_PROG_LN_S + If `ln -s' works on the current file system (the operating system + and file system support symbolic links), set the output variable + `LN_S' to `ln -s'; otherwise, if `ln' works, set `LN_S' to `ln', + and otherwise set it to `cp -pR'. + + If you make a link in a directory other than the current + directory, its meaning depends on whether `ln' or `ln -s' is used. + To safely create links using `$(LN_S)', either find out which form + is used and adjust the arguments, or always invoke `ln' in the + directory where the link is to be created. + + In other words, it does not work to do: + $(LN_S) foo /x/bar + + Instead, do: + + (cd /x && $(LN_S) foo bar) + + -- Macro: AC_PROG_RANLIB + Set output variable `RANLIB' to `ranlib' if `ranlib' is found, and + otherwise to `:' (do nothing). + + -- Macro: AC_PROG_SED + Set output variable `SED' to a Sed implementation that conforms to + Posix and does not have arbitrary length limits. Report an error + if no acceptable Sed is found. *Note Limitations of Usual Tools: + sed, for more information about portability problems with Sed. + + The result of this test can be overridden by setting the `SED' + variable and is cached in the `ac_cv_path_SED' variable. + + -- Macro: AC_PROG_YACC + If `bison' is found, set output variable `YACC' to `bison -y'. + Otherwise, if `byacc' is found, set `YACC' to `byacc'. Otherwise + set `YACC' to `yacc'. The result of this test can be influenced + by setting the variable `YACC' or the cache variable + `ac_cv_prog_YACC'. + + +File: autoconf.info, Node: Generic Programs, Prev: Particular Programs, Up: Alternative Programs + +5.2.2 Generic Program and File Checks +------------------------------------- + +These macros are used to find programs not covered by the "particular" +test macros. If you need to check the behavior of a program as well as +find out whether it is present, you have to write your own test for it +(*note Writing Tests::). By default, these macros use the environment +variable `PATH'. If you need to check for a program that might not be +in the user's `PATH', you can pass a modified path to use instead, like +this: + + AC_PATH_PROG([INETD], [inetd], [/usr/libexec/inetd], + [$PATH$PATH_SEPARATOR/usr/libexec$PATH_SEPARATOR]dnl + [/usr/sbin$PATH_SEPARATOR/usr/etc$PATH_SEPARATOR/etc]) + + You are strongly encouraged to declare the VARIABLE passed to +`AC_CHECK_PROG' etc. as precious. *Note Setting Output Variables::, +`AC_ARG_VAR', for more details. + + -- Macro: AC_CHECK_PROG (VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND, + [VALUE-IF-NOT-FOUND], [PATH = `$PATH'], [REJECT]) + Check whether program PROG-TO-CHECK-FOR exists in PATH. If it is + found, set VARIABLE to VALUE-IF-FOUND, otherwise to + VALUE-IF-NOT-FOUND, if given. Always pass over REJECT (an + absolute file name) even if it is the first found in the search + path; in that case, set VARIABLE using the absolute file name of + the PROG-TO-CHECK-FOR found that is not REJECT. If VARIABLE was + already set, do nothing. Calls `AC_SUBST' for VARIABLE. The + result of this test can be overridden by setting the VARIABLE + variable or the cache variable `ac_cv_prog_VARIABLE'. + + -- Macro: AC_CHECK_PROGS (VARIABLE, PROGS-TO-CHECK-FOR, + [VALUE-IF-NOT-FOUND], [PATH = `$PATH']) + Check for each program in the blank-separated list + PROGS-TO-CHECK-FOR existing in the PATH. If one is found, set + VARIABLE to the name of that program. Otherwise, continue + checking the next program in the list. If none of the programs in + the list are found, set VARIABLE to VALUE-IF-NOT-FOUND; if + VALUE-IF-NOT-FOUND is not specified, the value of VARIABLE is not + changed. Calls `AC_SUBST' for VARIABLE. The result of this test + can be overridden by setting the VARIABLE variable or the cache + variable `ac_cv_prog_VARIABLE'. + + -- Macro: AC_CHECK_TARGET_TOOL (VARIABLE, PROG-TO-CHECK-FOR, + [VALUE-IF-NOT-FOUND], [PATH = `$PATH']) + Like `AC_CHECK_PROG', but first looks for PROG-TO-CHECK-FOR with a + prefix of the target type as determined by `AC_CANONICAL_TARGET', + followed by a dash (*note Canonicalizing::). If the tool cannot + be found with a prefix, and if the build and target types are + equal, then it is also searched for without a prefix. + + As noted in *note Specifying Target Triplets::, the target is + rarely specified, because most of the time it is the same as the + host: it is the type of system for which any compiler tool in the + package produces code. What this macro looks for is, for example, + _a tool (assembler, linker, etc.) that the compiler driver (`gcc' + for the GNU C Compiler) uses to produce objects, archives or + executables_. + + -- Macro: AC_CHECK_TOOL (VARIABLE, PROG-TO-CHECK-FOR, + [VALUE-IF-NOT-FOUND], [PATH = `$PATH']) + Like `AC_CHECK_PROG', but first looks for PROG-TO-CHECK-FOR with a + prefix of the host type as specified by `--host', followed by a + dash. For example, if the user runs `configure --build=x86_64-gnu + --host=i386-gnu', then this call: + AC_CHECK_TOOL([RANLIB], [ranlib], [:]) + sets `RANLIB' to `i386-gnu-ranlib' if that program exists in PATH, + or otherwise to `ranlib' if that program exists in PATH, or to `:' + if neither program exists. + + When cross-compiling, this macro will issue a warning if no program + prefixed with the host type could be found. For more information, + see *note Specifying Target Triplets::. + + -- Macro: AC_CHECK_TARGET_TOOLS (VARIABLE, PROGS-TO-CHECK-FOR, + [VALUE-IF-NOT-FOUND], [PATH = `$PATH']) + Like `AC_CHECK_TARGET_TOOL', each of the tools in the list + PROGS-TO-CHECK-FOR are checked with a prefix of the target type as + determined by `AC_CANONICAL_TARGET', followed by a dash (*note + Canonicalizing::). If none of the tools can be found with a + prefix, and if the build and target types are equal, then the + first one without a prefix is used. If a tool is found, set + VARIABLE to the name of that program. If none of the tools in the + list are found, set VARIABLE to VALUE-IF-NOT-FOUND; if + VALUE-IF-NOT-FOUND is not specified, the value of VARIABLE is not + changed. Calls `AC_SUBST' for VARIABLE. + + -- Macro: AC_CHECK_TOOLS (VARIABLE, PROGS-TO-CHECK-FOR, + [VALUE-IF-NOT-FOUND], [PATH = `$PATH']) + Like `AC_CHECK_TOOL', each of the tools in the list + PROGS-TO-CHECK-FOR are checked with a prefix of the host type as + determined by `AC_CANONICAL_HOST', followed by a dash (*note + Canonicalizing::). If none of the tools can be found with a + prefix, then the first one without a prefix is used. If a tool is + found, set VARIABLE to the name of that program. If none of the + tools in the list are found, set VARIABLE to VALUE-IF-NOT-FOUND; if + VALUE-IF-NOT-FOUND is not specified, the value of VARIABLE is not + changed. Calls `AC_SUBST' for VARIABLE. + + When cross-compiling, this macro will issue a warning if no program + prefixed with the host type could be found. For more information, + see *note Specifying Target Triplets::. + + -- Macro: AC_PATH_PROG (VARIABLE, PROG-TO-CHECK-FOR, + [VALUE-IF-NOT-FOUND], [PATH = `$PATH']) + Like `AC_CHECK_PROG', but set VARIABLE to the absolute name of + PROG-TO-CHECK-FOR if found. The result of this test can be + overridden by setting the VARIABLE variable. A positive result of + this test is cached in the `ac_cv_path_VARIABLE' variable. + + -- Macro: AC_PATH_PROGS (VARIABLE, PROGS-TO-CHECK-FOR, + [VALUE-IF-NOT-FOUND], [PATH = `$PATH']) + Like `AC_CHECK_PROGS', but if any of PROGS-TO-CHECK-FOR are found, + set VARIABLE to the absolute name of the program found. The + result of this test can be overridden by setting the VARIABLE + variable. A positive result of this test is cached in the + `ac_cv_path_VARIABLE' variable. + + -- Macro: AC_PATH_PROGS_FEATURE_CHECK (VARIABLE, PROGS-TO-CHECK-FOR, + FEATURE-TEST, [ACTION-IF-NOT-FOUND], [PATH = `$PATH']) + This macro was introduced in Autoconf 2.62. If VARIABLE is not + empty, then set the cache variable `ac_cv_path_VARIABLE' to its + value. Otherwise, check for each program in the blank-separated + list PROGS-TO-CHECK-FOR existing in PATH. For each program found, + execute FEATURE-TEST with `ac_path_VARIABLE' set to the absolute + name of the candidate program. If no invocation of FEATURE-TEST + sets the shell variable `ac_cv_path_VARIABLE', then + ACTION-IF-NOT-FOUND is executed. FEATURE-TEST will be run even + when `ac_cv_path_VARIABLE' is set, to provide the ability to + choose a better candidate found later in PATH; to accept the + current setting and bypass all further checks, FEATURE-TEST can + execute `ac_path_VARIABLE_found=:'. + + Note that this macro has some subtle differences from + `AC_CHECK_PROGS'. It is designed to be run inside `AC_CACHE_VAL', + therefore, it should have no side effects. In particular, + VARIABLE is not set to the final value of `ac_cv_path_VARIABLE', + nor is `AC_SUBST' automatically run. Also, on failure, any action + can be performed, whereas `AC_CHECK_PROGS' only performs + `VARIABLE=VALUE-IF-NOT-FOUND'. + + Here is an example, similar to what Autoconf uses in its own + configure script. It will search for an implementation of `m4' + that supports the `indir' builtin, even if it goes by the name + `gm4' or is not the first implementation on `PATH'. + + AC_CACHE_CHECK([for m4 that supports indir], [ac_cv_path_M4], + [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], + [[m4out=`echo 'changequote([,])indir([divnum])' | $ac_path_M4` + test "x$m4out" = x0 \ + && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], + [AC_MSG_ERROR([could not find m4 that supports indir])])]) + AC_SUBST([M4], [$ac_cv_path_M4]) + + -- Macro: AC_PATH_TARGET_TOOL (VARIABLE, PROG-TO-CHECK-FOR, + [VALUE-IF-NOT-FOUND], [PATH = `$PATH']) + Like `AC_CHECK_TARGET_TOOL', but set VARIABLE to the absolute name + of the program if it is found. + + -- Macro: AC_PATH_TOOL (VARIABLE, PROG-TO-CHECK-FOR, + [VALUE-IF-NOT-FOUND], [PATH = `$PATH']) + Like `AC_CHECK_TOOL', but set VARIABLE to the absolute name of the + program if it is found. + + When cross-compiling, this macro will issue a warning if no program + prefixed with the host type could be found. For more information, + see *note Specifying Target Triplets::. + + +File: autoconf.info, Node: Files, Next: Libraries, Prev: Alternative Programs, Up: Existing Tests + +5.3 Files +========= + +You might also need to check for the existence of files. Before using +these macros, ask yourself whether a runtime test might not be a better +solution. Be aware that, like most Autoconf macros, they test a feature +of the host machine, and therefore, they die when cross-compiling. + + -- Macro: AC_CHECK_FILE (FILE, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND]) + Check whether file FILE exists on the native system. If it is + found, execute ACTION-IF-FOUND, otherwise do ACTION-IF-NOT-FOUND, + if given. The result of this test is cached in the + `ac_cv_file_FILE' variable, with characters not suitable for a + variable name mapped to underscores. + + -- Macro: AC_CHECK_FILES (FILES, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND]) + Executes `AC_CHECK_FILE' once for each file listed in FILES. + Additionally, defines `HAVE_FILE' (*note Standard Symbols::) for + each file found. The results of each test are cached in the + `ac_cv_file_FILE' variable, with characters not suitable for a + variable name mapped to underscores. + + +File: autoconf.info, Node: Libraries, Next: Library Functions, Prev: Files, Up: Existing Tests + +5.4 Library Files +================= + +The following macros check for the presence of certain C, C++, Fortran, +or Go library archive files. + + -- Macro: AC_CHECK_LIB (LIBRARY, FUNCTION, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND], [OTHER-LIBRARIES]) + Test whether the library LIBRARY is available by trying to link a + test program that calls function FUNCTION with the library. + FUNCTION should be a function provided by the library. Use the + base name of the library; e.g., to check for `-lmp', use `mp' as + the LIBRARY argument. + + ACTION-IF-FOUND is a list of shell commands to run if the link + with the library succeeds; ACTION-IF-NOT-FOUND is a list of shell + commands to run if the link fails. If ACTION-IF-FOUND is not + specified, the default action prepends `-lLIBRARY' to `LIBS' and + defines `HAVE_LIBLIBRARY' (in all capitals). This macro is + intended to support building `LIBS' in a right-to-left + (least-dependent to most-dependent) fashion such that library + dependencies are satisfied as a natural side effect of consecutive + tests. Linkers are sensitive to library ordering so the order in + which `LIBS' is generated is important to reliable detection of + libraries. + + If linking with LIBRARY results in unresolved symbols that would + be resolved by linking with additional libraries, give those + libraries as the OTHER-LIBRARIES argument, separated by spaces: + e.g., `-lXt -lX11'. Otherwise, this macro may fail to detect that + LIBRARY is present, because linking the test program can fail with + unresolved symbols. The OTHER-LIBRARIES argument should be + limited to cases where it is desirable to test for one library in + the presence of another that is not already in `LIBS'. + + `AC_CHECK_LIB' requires some care in usage, and should be avoided + in some common cases. Many standard functions like `gethostbyname' + appear in the standard C library on some hosts, and in special + libraries like `nsl' on other hosts. On some hosts the special + libraries contain variant implementations that you may not want to + use. These days it is normally better to use + `AC_SEARCH_LIBS([gethostbyname], [nsl])' instead of + `AC_CHECK_LIB([nsl], [gethostbyname])'. + + The result of this test is cached in the + `ac_cv_lib_LIBRARY_FUNCTION' variable. + + -- Macro: AC_SEARCH_LIBS (FUNCTION, SEARCH-LIBS, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND], [OTHER-LIBRARIES]) + Search for a library defining FUNCTION if it's not already + available. This equates to calling + `AC_LINK_IFELSE([AC_LANG_CALL([], [FUNCTION])])' first with no + libraries, then for each library listed in SEARCH-LIBS. + + Prepend `-lLIBRARY' to `LIBS' for the first library found to + contain FUNCTION, and run ACTION-IF-FOUND. If the function is not + found, run ACTION-IF-NOT-FOUND. + + If linking with LIBRARY results in unresolved symbols that would + be resolved by linking with additional libraries, give those + libraries as the OTHER-LIBRARIES argument, separated by spaces: + e.g., `-lXt -lX11'. Otherwise, this macro fails to detect that + FUNCTION is present, because linking the test program always fails + with unresolved symbols. + + The result of this test is cached in the `ac_cv_search_FUNCTION' + variable as `none required' if FUNCTION is already available, as + `no' if no library containing FUNCTION was found, otherwise as the + `-lLIBRARY' option that needs to be prepended to `LIBS'. + + +File: autoconf.info, Node: Library Functions, Next: Header Files, Prev: Libraries, Up: Existing Tests + +5.5 Library Functions +===================== + +The following macros check for particular C library functions. If +there is no macro specifically defined to check for a function you need, +and you don't need to check for any special properties of it, then you +can use one of the general function-check macros. + +* Menu: + +* Function Portability:: Pitfalls with usual functions +* Particular Functions:: Special handling to find certain functions +* Generic Functions:: How to find other functions + + +File: autoconf.info, Node: Function Portability, Next: Particular Functions, Up: Library Functions + +5.5.1 Portability of C Functions +-------------------------------- + +Most usual functions can either be missing, or be buggy, or be limited +on some architectures. This section tries to make an inventory of these +portability issues. By definition, this list always requires +additions. A much more complete list is maintained by the Gnulib +project (*note Gnulib::), covering *note Current Posix Functions: +(gnulib)Function Substitutes, *note Legacy Functions: (gnulib)Legacy +Function Substitutes, and *note Glibc Functions: (gnulib)Glibc Function +Substitutes. Please help us keep the gnulib list as complete as +possible. + +`exit' + On ancient hosts, `exit' returned `int'. This is because `exit' + predates `void', and there was a long tradition of it returning + `int'. + + On current hosts, the problem more likely is that `exit' is not + declared, due to C++ problems of some sort or another. For this + reason we suggest that test programs not invoke `exit', but return + from `main' instead. + +`free' + The C standard says a call `free (NULL)' does nothing, but some + old systems don't support this (e.g., NextStep). + +`isinf' +`isnan' + The C99 standard says that `isinf' and `isnan' are macros. On + some systems just macros are available (e.g., HP-UX and Solaris + 10), on some systems both macros and functions (e.g., glibc + 2.3.2), and on some systems only functions (e.g., IRIX 6 and + Solaris 9). In some cases these functions are declared in + nonstandard headers like `<sunmath.h>' and defined in non-default + libraries like `-lm' or `-lsunmath'. + + The C99 `isinf' and `isnan' macros work correctly with `long + double' arguments, but pre-C99 systems that use functions + typically assume `double' arguments. On such a system, `isinf' + incorrectly returns true for a finite `long double' argument that + is outside the range of `double'. + + The best workaround for these issues is to use gnulib modules + `isinf' and `isnan' (*note Gnulib::). But a lighter weight + solution involves code like the following. + + #include <math.h> + + #ifndef isnan + # define isnan(x) \ + (sizeof (x) == sizeof (long double) ? isnan_ld (x) \ + : sizeof (x) == sizeof (double) ? isnan_d (x) \ + : isnan_f (x)) + static inline int isnan_f (float x) { return x != x; } + static inline int isnan_d (double x) { return x != x; } + static inline int isnan_ld (long double x) { return x != x; } + #endif + + #ifndef isinf + # define isinf(x) \ + (sizeof (x) == sizeof (long double) ? isinf_ld (x) \ + : sizeof (x) == sizeof (double) ? isinf_d (x) \ + : isinf_f (x)) + static inline int isinf_f (float x) + { return !isnan (x) && isnan (x - x); } + static inline int isinf_d (double x) + { return !isnan (x) && isnan (x - x); } + static inline int isinf_ld (long double x) + { return !isnan (x) && isnan (x - x); } + #endif + + Use `AC_C_INLINE' (*note C Compiler::) so that this code works on + compilers that lack the `inline' keyword. Some optimizing + compilers mishandle these definitions, but systems with that bug + typically have many other floating point corner-case compliance + problems anyway, so it's probably not worth worrying about. + +`malloc' + The C standard says a call `malloc (0)' is implementation + dependent. It can return either `NULL' or a new non-null pointer. + The latter is more common (e.g., the GNU C Library) but is by no + means universal. `AC_FUNC_MALLOC' can be used to insist on + non-`NULL' (*note Particular Functions::). + +`putenv' + Posix prefers `setenv' to `putenv'; among other things, `putenv' + is not required of all Posix implementations, but `setenv' is. + + Posix specifies that `putenv' puts the given string directly in + `environ', but some systems make a copy of it instead (e.g., glibc + 2.0, or BSD). And when a copy is made, `unsetenv' might not free + it, causing a memory leak (e.g., FreeBSD 4). + + On some systems `putenv ("FOO")' removes `FOO' from the + environment, but this is not standard usage and it dumps core on + some systems (e.g., AIX). + + On MinGW, a call `putenv ("FOO=")' removes `FOO' from the + environment, rather than inserting it with an empty value. + +`realloc' + The C standard says a call `realloc (NULL, size)' is equivalent to + `malloc (size)', but some old systems don't support this (e.g., + NextStep). + +`signal' handler + Normally `signal' takes a handler function with a return type of + `void', but some old systems required `int' instead. Any actual + `int' value returned is not used; this is only a difference in the + function prototype demanded. + + All systems we know of in current use return `void'. The `int' + was to support K&R C, where of course `void' is not available. + The obsolete macro `AC_TYPE_SIGNAL' (*note AC_TYPE_SIGNAL::) can + be used to establish the correct type in all cases. + + In most cases, it is more robust to use `sigaction' when it is + available, rather than `signal'. + +`snprintf' + The C99 standard says that if the output array isn't big enough + and if no other errors occur, `snprintf' and `vsnprintf' truncate + the output and return the number of bytes that ought to have been + produced. Some older systems return the truncated length (e.g., + GNU C Library 2.0.x or IRIX 6.5), some a negative value (e.g., + earlier GNU C Library versions), and some the buffer length + without truncation (e.g., 32-bit Solaris 7). Also, some buggy + older systems ignore the length and overrun the buffer (e.g., + 64-bit Solaris 7). + +`sprintf' + The C standard says `sprintf' and `vsprintf' return the number of + bytes written. On some ancient systems (SunOS 4 for instance) + they return the buffer pointer instead, but these no longer need + to be worried about. + +`sscanf' + On various old systems, e.g., HP-UX 9, `sscanf' requires that its + input string be writable (though it doesn't actually change it). + This can be a problem when using `gcc' since it normally puts + constant strings in read-only memory (*note Incompatibilities of + GCC: (gcc)Incompatibilities.). Apparently in some cases even + having format strings read-only can be a problem. + +`strerror_r' + Posix specifies that `strerror_r' returns an `int', but many + systems (e.g., GNU C Library version 2.2.4) provide a different + version returning a `char *'. `AC_FUNC_STRERROR_R' can detect + which is in use (*note Particular Functions::). + +`strnlen' + AIX 4.3 provides a broken version which produces the following + results: + + strnlen ("foobar", 0) = 0 + strnlen ("foobar", 1) = 3 + strnlen ("foobar", 2) = 2 + strnlen ("foobar", 3) = 1 + strnlen ("foobar", 4) = 0 + strnlen ("foobar", 5) = 6 + strnlen ("foobar", 6) = 6 + strnlen ("foobar", 7) = 6 + strnlen ("foobar", 8) = 6 + strnlen ("foobar", 9) = 6 + +`sysconf' + `_SC_PAGESIZE' is standard, but some older systems (e.g., HP-UX 9) + have `_SC_PAGE_SIZE' instead. This can be tested with `#ifdef'. + +`unlink' + The Posix spec says that `unlink' causes the given file to be + removed only after there are no more open file handles for it. + Some non-Posix hosts have trouble with this requirement, though, + and some DOS variants even corrupt the file system. + +`unsetenv' + On MinGW, `unsetenv' is not available, but a variable `FOO' can be + removed with a call `putenv ("FOO=")', as described under `putenv' + above. + +`va_copy' + The C99 standard provides `va_copy' for copying `va_list' + variables. It may be available in older environments too, though + possibly as `__va_copy' (e.g., `gcc' in strict pre-C99 mode). + These can be tested with `#ifdef'. A fallback to `memcpy (&dst, + &src, sizeof (va_list))' gives maximum portability. + +`va_list' + `va_list' is not necessarily just a pointer. It can be a `struct' + (e.g., `gcc' on Alpha), which means `NULL' is not portable. Or it + can be an array (e.g., `gcc' in some PowerPC configurations), + which means as a function parameter it can be effectively + call-by-reference and library routines might modify the value back + in the caller (e.g., `vsnprintf' in the GNU C Library 2.1). + +Signed `>>' + Normally the C `>>' right shift of a signed type replicates the + high bit, giving a so-called "arithmetic" shift. But care should + be taken since Standard C doesn't require that behavior. On those + few processors without a native arithmetic shift (for instance Cray + vector systems) zero bits may be shifted in, the same as a shift + of an unsigned type. + +Integer `/' + C divides signed integers by truncating their quotient toward zero, + yielding the same result as Fortran. However, before C99 the + standard allowed C implementations to take the floor or ceiling of + the quotient in some cases. Hardly any implementations took + advantage of this freedom, though, and it's probably not worth + worrying about this issue nowadays. + + +File: autoconf.info, Node: Particular Functions, Next: Generic Functions, Prev: Function Portability, Up: Library Functions + +5.5.2 Particular Function Checks +-------------------------------- + +These macros check for particular C functions--whether they exist, and +in some cases how they respond when given certain arguments. + + -- Macro: AC_FUNC_ALLOCA + Check how to get `alloca'. Tries to get a builtin version by + checking for `alloca.h' or the predefined C preprocessor macros + `__GNUC__' and `_AIX'. If this macro finds `alloca.h', it defines + `HAVE_ALLOCA_H'. + + If those attempts fail, it looks for the function in the standard C + library. If any of those methods succeed, it defines + `HAVE_ALLOCA'. Otherwise, it sets the output variable `ALLOCA' to + `${LIBOBJDIR}alloca.o' and defines `C_ALLOCA' (so programs can + periodically call `alloca (0)' to garbage collect). This variable + is separate from `LIBOBJS' so multiple programs can share the + value of `ALLOCA' without needing to create an actual library, in + case only some of them use the code in `LIBOBJS'. The + `${LIBOBJDIR}' prefix serves the same purpose as in `LIBOBJS' + (*note AC_LIBOBJ vs LIBOBJS::). + + This macro does not try to get `alloca' from the System V R3 + `libPW' or the System V R4 `libucb' because those libraries + contain some incompatible functions that cause trouble. Some + versions do not even contain `alloca' or contain a buggy version. + If you still want to use their `alloca', use `ar' to extract + `alloca.o' from them instead of compiling `alloca.c'. + + Source files that use `alloca' should start with a piece of code + like the following, to declare it properly. + + #ifdef STDC_HEADERS + # include <stdlib.h> + # include <stddef.h> + #else + # ifdef HAVE_STDLIB_H + # include <stdlib.h> + # endif + #endif + #ifdef HAVE_ALLOCA_H + # include <alloca.h> + #elif !defined alloca + # ifdef __GNUC__ + # define alloca __builtin_alloca + # elif defined _AIX + # define alloca __alloca + # elif defined _MSC_VER + # include <malloc.h> + # define alloca _alloca + # elif !defined HAVE_ALLOCA + # ifdef __cplusplus + extern "C" + # endif + void *alloca (size_t); + # endif + #endif + + -- Macro: AC_FUNC_CHOWN + If the `chown' function is available and works (in particular, it + should accept `-1' for `uid' and `gid'), define `HAVE_CHOWN'. The + result of this macro is cached in the `ac_cv_func_chown_works' + variable. + + -- Macro: AC_FUNC_CLOSEDIR_VOID + If the `closedir' function does not return a meaningful value, + define `CLOSEDIR_VOID'. Otherwise, callers ought to check its + return value for an error indicator. + + Currently this test is implemented by running a test program. When + cross compiling the pessimistic assumption that `closedir' does not + return a meaningful value is made. + + The result of this macro is cached in the + `ac_cv_func_closedir_void' variable. + + This macro is obsolescent, as `closedir' returns a meaningful value + on current systems. New programs need not use this macro. + + -- Macro: AC_FUNC_ERROR_AT_LINE + If the `error_at_line' function is not found, require an + `AC_LIBOBJ' replacement of `error'. + + The result of this macro is cached in the `ac_cv_lib_error_at_line' + variable. + + The `AC_FUNC_ERROR_AT_LINE' macro is obsolescent. New programs + should use Gnulib's `error' module. *Note Gnulib::. + + -- Macro: AC_FUNC_FNMATCH + If the `fnmatch' function conforms to Posix, define + `HAVE_FNMATCH'. Detect common implementation bugs, for example, + the bugs in Solaris 2.4. + + Unlike the other specific `AC_FUNC' macros, `AC_FUNC_FNMATCH' does + not replace a broken/missing `fnmatch'. This is for historical + reasons. See `AC_REPLACE_FNMATCH' below. + + The result of this macro is cached in the + `ac_cv_func_fnmatch_works' variable. + + This macro is obsolescent. New programs should use Gnulib's + `fnmatch-posix' module. *Note Gnulib::. + + -- Macro: AC_FUNC_FNMATCH_GNU + Behave like `AC_REPLACE_FNMATCH' (_replace_) but also test whether + `fnmatch' supports GNU extensions. Detect common implementation + bugs, for example, the bugs in the GNU C Library 2.1. + + The result of this macro is cached in the `ac_cv_func_fnmatch_gnu' + variable. + + This macro is obsolescent. New programs should use Gnulib's + `fnmatch-gnu' module. *Note Gnulib::. + + -- Macro: AC_FUNC_FORK + This macro checks for the `fork' and `vfork' functions. If a + working `fork' is found, define `HAVE_WORKING_FORK'. This macro + checks whether `fork' is just a stub by trying to run it. + + If `vfork.h' is found, define `HAVE_VFORK_H'. If a working + `vfork' is found, define `HAVE_WORKING_VFORK'. Otherwise, define + `vfork' to be `fork' for backward compatibility with previous + versions of `autoconf'. This macro checks for several known + errors in implementations of `vfork' and considers the system to + not have a working `vfork' if it detects any of them. It is not + considered to be an implementation error if a child's invocation + of `signal' modifies the parent's signal handler, since child + processes rarely change their signal handlers. + + Since this macro defines `vfork' only for backward compatibility + with previous versions of `autoconf' you're encouraged to define it + yourself in new code: + #ifndef HAVE_WORKING_VFORK + # define vfork fork + #endif + + The results of this macro are cached in the `ac_cv_func_fork_works' + and `ac_cv_func_vfork_works' variables. In order to override the + test, you also need to set the `ac_cv_func_fork' and + `ac_cv_func_vfork' variables. + + -- Macro: AC_FUNC_FSEEKO + If the `fseeko' function is available, define `HAVE_FSEEKO'. + Define `_LARGEFILE_SOURCE' if necessary to make the prototype + visible on some systems (e.g., glibc 2.2). Otherwise linkage + problems may occur when compiling with `AC_SYS_LARGEFILE' on + largefile-sensitive systems where `off_t' does not default to a + 64bit entity. All systems with `fseeko' also supply `ftello'. + + -- Macro: AC_FUNC_GETGROUPS + If the `getgroups' function is available and works (unlike on + Ultrix 4.3, where `getgroups (0, 0)' always fails), define + `HAVE_GETGROUPS'. Set `GETGROUPS_LIBS' to any libraries needed to + get that function. This macro runs `AC_TYPE_GETGROUPS'. + + -- Macro: AC_FUNC_GETLOADAVG + Check how to get the system load averages. To perform its tests + properly, this macro needs the file `getloadavg.c'; therefore, be + sure to set the `AC_LIBOBJ' replacement directory properly (see + *note Generic Functions::, `AC_CONFIG_LIBOBJ_DIR'). + + If the system has the `getloadavg' function, define + `HAVE_GETLOADAVG', and set `GETLOADAVG_LIBS' to any libraries + necessary to get that function. Also add `GETLOADAVG_LIBS' to + `LIBS'. Otherwise, require an `AC_LIBOBJ' replacement for + `getloadavg' with source code in `DIR/getloadavg.c', and possibly + define several other C preprocessor macros and output variables: + + 1. Define `C_GETLOADAVG'. + + 2. Define `SVR4', `DGUX', `UMAX', or `UMAX4_3' if on those + systems. + + 3. If `nlist.h' is found, define `HAVE_NLIST_H'. + + 4. If `struct nlist' has an `n_un.n_name' member, define + `HAVE_STRUCT_NLIST_N_UN_N_NAME'. The obsolete symbol + `NLIST_NAME_UNION' is still defined, but do not depend upon + it. + + 5. Programs may need to be installed set-group-ID (or + set-user-ID) for `getloadavg' to work. In this case, define + `GETLOADAVG_PRIVILEGED', set the output variable `NEED_SETGID' + to `true' (and otherwise to `false'), and set `KMEM_GROUP' to + the name of the group that should own the installed program. + + The `AC_FUNC_GETLOADAVG' macro is obsolescent. New programs should + use Gnulib's `getloadavg' module. *Note Gnulib::. + + -- Macro: AC_FUNC_GETMNTENT + Check for `getmntent' in the standard C library, and then in the + `sun', `seq', and `gen' libraries, for UNICOS, IRIX 4, PTX, and + UnixWare, respectively. Then, if `getmntent' is available, define + `HAVE_GETMNTENT' and set `ac_cv_func_getmntent' to `yes'. + Otherwise set `ac_cv_func_getmntent' to `no'. + + The result of this macro can be overridden by setting the cache + variable `ac_cv_search_getmntent'. + + -- Macro: AC_FUNC_GETPGRP + Define `GETPGRP_VOID' if it is an error to pass 0 to `getpgrp'; + this is the Posix behavior. On older BSD systems, you must pass 0 + to `getpgrp', as it takes an argument and behaves like Posix's + `getpgid'. + + #ifdef GETPGRP_VOID + pid = getpgrp (); + #else + pid = getpgrp (0); + #endif + + This macro does not check whether `getpgrp' exists at all; if you + need to work in that situation, first call `AC_CHECK_FUNC' for + `getpgrp'. + + The result of this macro is cached in the `ac_cv_func_getpgrp_void' + variable. + + This macro is obsolescent, as current systems have a `getpgrp' + whose signature conforms to Posix. New programs need not use this + macro. + + -- Macro: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK + If `link' is a symbolic link, then `lstat' should treat `link/' + the same as `link/.'. However, many older `lstat' implementations + incorrectly ignore trailing slashes. + + It is safe to assume that if `lstat' incorrectly ignores trailing + slashes, then other symbolic-link-aware functions like `unlink' + also incorrectly ignore trailing slashes. + + If `lstat' behaves properly, define + `LSTAT_FOLLOWS_SLASHED_SYMLINK', otherwise require an `AC_LIBOBJ' + replacement of `lstat'. + + The result of this macro is cached in the + `ac_cv_func_lstat_dereferences_slashed_symlink' variable. + + The `AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' macro is obsolescent. + New programs should use Gnulib's `lstat' module. *Note Gnulib::. + + -- Macro: AC_FUNC_MALLOC + If the `malloc' function is compatible with the GNU C library + `malloc' (i.e., `malloc (0)' returns a valid pointer), define + `HAVE_MALLOC' to 1. Otherwise define `HAVE_MALLOC' to 0, ask for + an `AC_LIBOBJ' replacement for `malloc', and define `malloc' to + `rpl_malloc' so that the native `malloc' is not used in the main + project. + + Typically, the replacement file `malloc.c' should look like (note + the `#undef malloc'): + + #include <config.h> + #undef malloc + + #include <sys/types.h> + + void *malloc (); + + /* Allocate an N-byte block of memory from the heap. + If N is zero, allocate a 1-byte block. */ + + void * + rpl_malloc (size_t n) + { + if (n == 0) + n = 1; + return malloc (n); + } + + The result of this macro is cached in the + `ac_cv_func_malloc_0_nonnull' variable. + + -- Macro: AC_FUNC_MBRTOWC + Define `HAVE_MBRTOWC' to 1 if the function `mbrtowc' and the type + `mbstate_t' are properly declared. + + The result of this macro is cached in the `ac_cv_func_mbrtowc' + variable. + + -- Macro: AC_FUNC_MEMCMP + If the `memcmp' function is not available, or does not work on + 8-bit data (like the one on SunOS 4.1.3), or fails when comparing + 16 bytes or more and with at least one buffer not starting on a + 4-byte boundary (such as the one on NeXT x86 OpenStep), require an + `AC_LIBOBJ' replacement for `memcmp'. + + The result of this macro is cached in the + `ac_cv_func_memcmp_working' variable. + + This macro is obsolescent, as current systems have a working + `memcmp'. New programs need not use this macro. + + -- Macro: AC_FUNC_MKTIME + If the `mktime' function is not available, or does not work + correctly, require an `AC_LIBOBJ' replacement for `mktime'. For + the purposes of this test, `mktime' should conform to the Posix + standard and should be the inverse of `localtime'. + + The result of this macro is cached in the + `ac_cv_func_working_mktime' variable. + + The `AC_FUNC_MKTIME' macro is obsolescent. New programs should + use Gnulib's `mktime' module. *Note Gnulib::. + + -- Macro: AC_FUNC_MMAP + If the `mmap' function exists and works correctly, define + `HAVE_MMAP'. This checks only private fixed mapping of + already-mapped memory. + + The result of this macro is cached in the + `ac_cv_func_mmap_fixed_mapped' variable. + + -- Macro: AC_FUNC_OBSTACK + If the obstacks are found, define `HAVE_OBSTACK', else require an + `AC_LIBOBJ' replacement for `obstack'. + + The result of this macro is cached in the `ac_cv_func_obstack' + variable. + + -- Macro: AC_FUNC_REALLOC + If the `realloc' function is compatible with the GNU C library + `realloc' (i.e., `realloc (NULL, 0)' returns a valid pointer), + define `HAVE_REALLOC' to 1. Otherwise define `HAVE_REALLOC' to 0, + ask for an `AC_LIBOBJ' replacement for `realloc', and define + `realloc' to `rpl_realloc' so that the native `realloc' is not + used in the main project. See `AC_FUNC_MALLOC' for details. + + The result of this macro is cached in the + `ac_cv_func_realloc_0_nonnull' variable. + + -- Macro: AC_FUNC_SELECT_ARGTYPES + Determines the correct type to be passed for each of the `select' + function's arguments, and defines those types in + `SELECT_TYPE_ARG1', `SELECT_TYPE_ARG234', and `SELECT_TYPE_ARG5' + respectively. `SELECT_TYPE_ARG1' defaults to `int', + `SELECT_TYPE_ARG234' defaults to `int *', and `SELECT_TYPE_ARG5' + defaults to `struct timeval *'. + + This macro is obsolescent, as current systems have a `select' whose + signature conforms to Posix. New programs need not use this macro. + + -- Macro: AC_FUNC_SETPGRP + If `setpgrp' takes no argument (the Posix version), define + `SETPGRP_VOID'. Otherwise, it is the BSD version, which takes two + process IDs as arguments. This macro does not check whether + `setpgrp' exists at all; if you need to work in that situation, + first call `AC_CHECK_FUNC' for `setpgrp'. + + The result of this macro is cached in the `ac_cv_func_setpgrp_void' + variable. + + This macro is obsolescent, as current systems have a `setpgrp' + whose signature conforms to Posix. New programs need not use this + macro. + + -- Macro: AC_FUNC_STAT + -- Macro: AC_FUNC_LSTAT + Determine whether `stat' or `lstat' have the bug that it succeeds + when given the zero-length file name as argument. The `stat' and + `lstat' from SunOS 4.1.4 and the Hurd (as of 1998-11-01) do this. + + If it does, then define `HAVE_STAT_EMPTY_STRING_BUG' (or + `HAVE_LSTAT_EMPTY_STRING_BUG') and ask for an `AC_LIBOBJ' + replacement of it. + + The results of these macros are cached in the + `ac_cv_func_stat_empty_string_bug' and the + `ac_cv_func_lstat_empty_string_bug' variables, respectively. + + These macros are obsolescent, as no current systems have the bug. + New programs need not use these macros. + + -- Macro: AC_FUNC_STRCOLL + If the `strcoll' function exists and works correctly, define + `HAVE_STRCOLL'. This does a bit more than + `AC_CHECK_FUNCS(strcoll)', because some systems have incorrect + definitions of `strcoll' that should not be used. + + The result of this macro is cached in the + `ac_cv_func_strcoll_works' variable. + + -- Macro: AC_FUNC_STRERROR_R + If `strerror_r' is available, define `HAVE_STRERROR_R', and if it + is declared, define `HAVE_DECL_STRERROR_R'. If it returns a `char + *' message, define `STRERROR_R_CHAR_P'; otherwise it returns an + `int' error number. The Thread-Safe Functions option of Posix + requires `strerror_r' to return `int', but many systems + (including, for example, version 2.2.4 of the GNU C Library) + return a `char *' value that is not necessarily equal to the + buffer argument. + + The result of this macro is cached in the + `ac_cv_func_strerror_r_char_p' variable. + + -- Macro: AC_FUNC_STRFTIME + Check for `strftime' in the `intl' library, for SCO Unix. Then, + if `strftime' is available, define `HAVE_STRFTIME'. + + This macro is obsolescent, as no current systems require the `intl' + library for `strftime'. New programs need not use this macro. + + -- Macro: AC_FUNC_STRTOD + If the `strtod' function does not exist or doesn't work correctly, + ask for an `AC_LIBOBJ' replacement of `strtod'. In this case, + because `strtod.c' is likely to need `pow', set the output + variable `POW_LIB' to the extra library needed. + + This macro caches its result in the `ac_cv_func_strtod' variable + and depends upon the result in the `ac_cv_func_pow' variable. + + The `AC_FUNC_STRTOD' macro is obsolescent. New programs should + use Gnulib's `strtod' module. *Note Gnulib::. + + -- Macro: AC_FUNC_STRTOLD + If the `strtold' function exists and conforms to C99, define + `HAVE_STRTOLD'. + + This macro caches its result in the `ac_cv_func_strtold' variable. + + -- Macro: AC_FUNC_STRNLEN + If the `strnlen' function is not available, or is buggy (like the + one from AIX 4.3), require an `AC_LIBOBJ' replacement for it. + + This macro caches its result in the `ac_cv_func_strnlen_working' + variable. + + -- Macro: AC_FUNC_UTIME_NULL + If `utime (FILE, NULL)' sets FILE's timestamp to the present, + define `HAVE_UTIME_NULL'. + + This macro caches its result in the `ac_cv_func_utime_null' + variable. + + This macro is obsolescent, as all current systems have a `utime' + that behaves this way. New programs need not use this macro. + + -- Macro: AC_FUNC_VPRINTF + If `vprintf' is found, define `HAVE_VPRINTF'. Otherwise, if + `_doprnt' is found, define `HAVE_DOPRNT'. (If `vprintf' is + available, you may assume that `vfprintf' and `vsprintf' are also + available.) + + This macro is obsolescent, as all current systems have `vprintf'. + New programs need not use this macro. + + -- Macro: AC_REPLACE_FNMATCH + If the `fnmatch' function does not conform to Posix (see + `AC_FUNC_FNMATCH'), ask for its `AC_LIBOBJ' replacement. + + The files `fnmatch.c', `fnmatch_loop.c', and `fnmatch_.h' in the + `AC_LIBOBJ' replacement directory are assumed to contain a copy of + the source code of GNU `fnmatch'. If necessary, this source code + is compiled as an `AC_LIBOBJ' replacement, and the `fnmatch_.h' + file is linked to `fnmatch.h' so that it can be included in place + of the system `<fnmatch.h>'. + + This macro caches its result in the `ac_cv_func_fnmatch_works' + variable. + + This macro is obsolescent, as it assumes the use of particular + source files. New programs should use Gnulib's `fnmatch-posix' + module, which provides this macro along with the source files. + *Note Gnulib::. + + +File: autoconf.info, Node: Generic Functions, Prev: Particular Functions, Up: Library Functions + +5.5.3 Generic Function Checks +----------------------------- + +These macros are used to find functions not covered by the "particular" +test macros. If the functions might be in libraries other than the +default C library, first call `AC_CHECK_LIB' for those libraries. If +you need to check the behavior of a function as well as find out +whether it is present, you have to write your own test for it (*note +Writing Tests::). + + -- Macro: AC_CHECK_FUNC (FUNCTION, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND]) + If C function FUNCTION is available, run shell commands + ACTION-IF-FOUND, otherwise ACTION-IF-NOT-FOUND. If you just want + to define a symbol if the function is available, consider using + `AC_CHECK_FUNCS' instead. This macro checks for functions with C + linkage even when `AC_LANG(C++)' has been called, since C is more + standardized than C++. (*note Language Choice::, for more + information about selecting the language for checks.) + + This macro caches its result in the `ac_cv_func_FUNCTION' variable. + + -- Macro: AC_CHECK_FUNCS (FUNCTION..., [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND]) + For each FUNCTION enumerated in the blank-or-newline-separated + argument list, define `HAVE_FUNCTION' (in all capitals) if it is + available. If ACTION-IF-FOUND is given, it is additional shell + code to execute when one of the functions is found. You can give + it a value of `break' to break out of the loop on the first match. + If ACTION-IF-NOT-FOUND is given, it is executed when one of the + functions is not found. + + Results are cached for each FUNCTION as in `AC_CHECK_FUNC'. + + -- Macro: AC_CHECK_FUNCS_ONCE (FUNCTION...) + For each FUNCTION enumerated in the blank-or-newline-separated + argument list, define `HAVE_FUNCTION' (in all capitals) if it is + available. This is a once-only variant of `AC_CHECK_FUNCS'. It + generates the checking code at most once, so that `configure' is + smaller and faster; but the checks cannot be conditionalized and + are always done once, early during the `configure' run. + + + Autoconf follows a philosophy that was formed over the years by those +who have struggled for portability: isolate the portability issues in +specific files, and then program as if you were in a Posix environment. +Some functions may be missing or unfixable, and your package must be +ready to replace them. + + Suitable replacements for many such problem functions are available +from Gnulib (*note Gnulib::). + + -- Macro: AC_LIBOBJ (FUNCTION) + Specify that `FUNCTION.c' must be included in the executables to + replace a missing or broken implementation of FUNCTION. + + Technically, it adds `FUNCTION.$ac_objext' to the output variable + `LIBOBJS' if it is not already in, and calls `AC_LIBSOURCE' for + `FUNCTION.c'. You should not directly change `LIBOBJS', since + this is not traceable. + + -- Macro: AC_LIBSOURCE (FILE) + Specify that FILE might be needed to compile the project. If you + need to know what files might be needed by a `configure.ac', you + should trace `AC_LIBSOURCE'. FILE must be a literal. + + This macro is called automatically from `AC_LIBOBJ', but you must + call it explicitly if you pass a shell variable to `AC_LIBOBJ'. In + that case, since shell variables cannot be traced statically, you + must pass to `AC_LIBSOURCE' any possible files that the shell + variable might cause `AC_LIBOBJ' to need. For example, if you + want to pass a variable `$foo_or_bar' to `AC_LIBOBJ' that holds + either `"foo"' or `"bar"', you should do: + + AC_LIBSOURCE([foo.c]) + AC_LIBSOURCE([bar.c]) + AC_LIBOBJ([$foo_or_bar]) + + There is usually a way to avoid this, however, and you are + encouraged to simply call `AC_LIBOBJ' with literal arguments. + + Note that this macro replaces the obsolete `AC_LIBOBJ_DECL', with + slightly different semantics: the old macro took the function name, + e.g., `foo', as its argument rather than the file name. + + -- Macro: AC_LIBSOURCES (FILES) + Like `AC_LIBSOURCE', but accepts one or more FILES in a + comma-separated M4 list. Thus, the above example might be + rewritten: + + AC_LIBSOURCES([foo.c, bar.c]) + AC_LIBOBJ([$foo_or_bar]) + + -- Macro: AC_CONFIG_LIBOBJ_DIR (DIRECTORY) + Specify that `AC_LIBOBJ' replacement files are to be found in + DIRECTORY, a name relative to the top level of the source tree. + The replacement directory defaults to `.', the top level + directory, and the most typical value is `lib', corresponding to + `AC_CONFIG_LIBOBJ_DIR([lib])'. + + `configure' might need to know the replacement directory for the + following reasons: (i) some checks use the replacement files, (ii) + some macros bypass broken system headers by installing links to the + replacement headers (iii) when used in conjunction with Automake, + within each makefile, DIRECTORY is used as a relative path from + `$(top_srcdir)' to each object named in `LIBOBJS' and `LTLIBOBJS', + etc. + + + It is common to merely check for the existence of a function, and ask +for its `AC_LIBOBJ' replacement if missing. The following macro is a +convenient shorthand. + + -- Macro: AC_REPLACE_FUNCS (FUNCTION...) + Like `AC_CHECK_FUNCS', but uses `AC_LIBOBJ(FUNCTION)' as + ACTION-IF-NOT-FOUND. You can declare your replacement function by + enclosing the prototype in `#ifndef HAVE_FUNCTION'. If the system + has the function, it probably declares it in a header file you + should be including, so you shouldn't redeclare it lest your + declaration conflict. + + +File: autoconf.info, Node: Header Files, Next: Declarations, Prev: Library Functions, Up: Existing Tests + +5.6 Header Files +================ + +The following macros check for the presence of certain C header files. +If there is no macro specifically defined to check for a header file +you need, and you don't need to check for any special properties of it, +then you can use one of the general header-file check macros. + +* Menu: + +* Header Portability:: Collected knowledge on common headers +* Particular Headers:: Special handling to find certain headers +* Generic Headers:: How to find other headers + + +File: autoconf.info, Node: Header Portability, Next: Particular Headers, Up: Header Files + +5.6.1 Portability of Headers +---------------------------- + +This section documents some collected knowledge about common headers, +and the problems they cause. By definition, this list always requires +additions. A much more complete list is maintained by the Gnulib +project (*note Gnulib::), covering *note Posix Headers: (gnulib)Header +File Substitutes. and *note Glibc Headers: (gnulib)Glibc Header File +Substitutes. Please help us keep the gnulib list as complete as +possible. + +`limits.h' + C99 says that `limits.h' defines `LLONG_MIN', `LLONG_MAX', and + `ULLONG_MAX', but many almost-C99 environments (e.g., default GCC + 4.0.2 + glibc 2.4) do not define them. + +`inttypes.h' vs. `stdint.h' + The C99 standard says that `inttypes.h' includes `stdint.h', so + there's no need to include `stdint.h' separately in a standard + environment. Some implementations have `inttypes.h' but not + `stdint.h' (e.g., Solaris 7), but we don't know of any + implementation that has `stdint.h' but not `inttypes.h'. + +`linux/irda.h' + It requires `linux/types.h' and `sys/socket.h'. + +`linux/random.h' + It requires `linux/types.h'. + +`net/if.h' + On Darwin, this file requires that `sys/socket.h' be included + beforehand. One should run: + + AC_CHECK_HEADERS([sys/socket.h]) + AC_CHECK_HEADERS([net/if.h], [], [], + [#include <stdio.h> + #ifdef STDC_HEADERS + # include <stdlib.h> + # include <stddef.h> + #else + # ifdef HAVE_STDLIB_H + # include <stdlib.h> + # endif + #endif + #ifdef HAVE_SYS_SOCKET_H + # include <sys/socket.h> + #endif + ]) + +`netinet/if_ether.h' + On Darwin, this file requires that `stdio.h' and `sys/socket.h' be + included beforehand. One should run: + + AC_CHECK_HEADERS([sys/socket.h]) + AC_CHECK_HEADERS([netinet/if_ether.h], [], [], + [#include <stdio.h> + #ifdef STDC_HEADERS + # include <stdlib.h> + # include <stddef.h> + #else + # ifdef HAVE_STDLIB_H + # include <stdlib.h> + # endif + #endif + #ifdef HAVE_SYS_SOCKET_H + # include <sys/socket.h> + #endif + ]) + +`stdint.h' + See above, item `inttypes.h' vs. `stdint.h'. + +`stdlib.h' + On many systems (e.g., Darwin), `stdio.h' is a prerequisite. + +`sys/mount.h' + On FreeBSD 4.8 on ia32 and using gcc version 2.95.4, + `sys/params.h' is a prerequisite. + +`sys/ptem.h' + On Solaris 8, `sys/stream.h' is a prerequisite. + +`sys/socket.h' + On Darwin, `stdlib.h' is a prerequisite. + +`sys/ucred.h' + On Tru64 5.1, `sys/types.h' is a prerequisite. + +`X11/extensions/scrnsaver.h' + Using XFree86, this header requires `X11/Xlib.h', which is probably + so required that you might not even consider looking for it. + + AC_CHECK_HEADERS([X11/extensions/scrnsaver.h], [], [], + [[#include <X11/Xlib.h> + ]]) + + +File: autoconf.info, Node: Particular Headers, Next: Generic Headers, Prev: Header Portability, Up: Header Files + +5.6.2 Particular Header Checks +------------------------------ + +These macros check for particular system header files--whether they +exist, and in some cases whether they declare certain symbols. + + -- Macro: AC_CHECK_HEADER_STDBOOL + Check whether `stdbool.h' exists and conforms to C99, and cache the + result in the `ac_cv_header_stdbool_h' variable. If the type + `_Bool' is defined, define `HAVE__BOOL' to 1. + + This macro is intended for use by Gnulib (*note Gnulib::) and other + packages that supply a substitute `stdbool.h' on platforms lacking + a conforming one. The `AC_HEADER_STDBOOL' macro is better for code + that explicitly checks for `stdbool.h'. + + -- Macro: AC_HEADER_ASSERT + Check whether to enable assertions in the style of `assert.h'. + Assertions are enabled by default, but the user can override this + by invoking `configure' with the `--disable-assert' option. + + -- Macro: AC_HEADER_DIRENT + Check for the following header files. For the first one that is + found and defines `DIR', define the listed C preprocessor macro: + + `dirent.h' `HAVE_DIRENT_H' + `sys/ndir.h' `HAVE_SYS_NDIR_H' + `sys/dir.h' `HAVE_SYS_DIR_H' + `ndir.h' `HAVE_NDIR_H' + + The directory-library declarations in your source code should look + something like the following: + + #include <sys/types.h> + #ifdef HAVE_DIRENT_H + # include <dirent.h> + # define NAMLEN(dirent) strlen ((dirent)->d_name) + #else + # define dirent direct + # define NAMLEN(dirent) ((dirent)->d_namlen) + # ifdef HAVE_SYS_NDIR_H + # include <sys/ndir.h> + # endif + # ifdef HAVE_SYS_DIR_H + # include <sys/dir.h> + # endif + # ifdef HAVE_NDIR_H + # include <ndir.h> + # endif + #endif + + Using the above declarations, the program would declare variables + to be of type `struct dirent', not `struct direct', and would + access the length of a directory entry name by passing a pointer + to a `struct dirent' to the `NAMLEN' macro. + + This macro also checks for the SCO Xenix `dir' and `x' libraries. + + This macro is obsolescent, as all current systems with directory + libraries have `<dirent.h>'. New programs need not use this macro. + + Also see `AC_STRUCT_DIRENT_D_INO' and `AC_STRUCT_DIRENT_D_TYPE' + (*note Particular Structures::). + + -- Macro: AC_HEADER_MAJOR + If `sys/types.h' does not define `major', `minor', and `makedev', + but `sys/mkdev.h' does, define `MAJOR_IN_MKDEV'; otherwise, if + `sys/sysmacros.h' does, define `MAJOR_IN_SYSMACROS'. + + -- Macro: AC_HEADER_RESOLV + Checks for header `resolv.h', checking for prerequisites first. + To properly use `resolv.h', your code should contain something like + the following: + + #ifdef HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #ifdef HAVE_NETINET_IN_H + # include <netinet/in.h> /* inet_ functions / structs */ + #endif + #ifdef HAVE_ARPA_NAMESER_H + # include <arpa/nameser.h> /* DNS HEADER struct */ + #endif + #ifdef HAVE_NETDB_H + # include <netdb.h> + #endif + #include <resolv.h> + + -- Macro: AC_HEADER_STAT + If the macros `S_ISDIR', `S_ISREG', etc. defined in `sys/stat.h' + do not work properly (returning false positives), define + `STAT_MACROS_BROKEN'. This is the case on Tektronix UTekV, Amdahl + UTS and Motorola System V/88. + + This macro is obsolescent, as no current systems have the bug. + New programs need not use this macro. + + -- Macro: AC_HEADER_STDBOOL + If `stdbool.h' exists and conforms to C99, define `HAVE_STDBOOL_H' + to 1; if the type `_Bool' is defined, define `HAVE__BOOL' to 1. + To fulfill the C99 requirements, your program could contain the + following code: + + #ifdef HAVE_STDBOOL_H + # include <stdbool.h> + #else + # ifndef HAVE__BOOL + # ifdef __cplusplus + typedef bool _Bool; + # else + # define _Bool signed char + # endif + # endif + # define bool _Bool + # define false 0 + # define true 1 + # define __bool_true_false_are_defined 1 + #endif + + Alternatively you can use the `stdbool' package of Gnulib (*note + Gnulib::). It simplifies your code so that it can say just + `#include <stdbool.h>', and it adds support for less-common + platforms. + + This macro caches its result in the `ac_cv_header_stdbool_h' + variable. + + This macro differs from `AC_CHECK_HEADER_STDBOOL' only in that it + defines `HAVE_STDBOOL_H' whereas `AC_CHECK_HEADER_STDBOOL' does + not. + + -- Macro: AC_HEADER_STDC + Define `STDC_HEADERS' if the system has C header files conforming + to ANSI C89 (ISO C90). Specifically, this macro checks for + `stdlib.h', `stdarg.h', `string.h', and `float.h'; if the system + has those, it probably has the rest of the C89 header files. This + macro also checks whether `string.h' declares `memchr' (and thus + presumably the other `mem' functions), whether `stdlib.h' declare + `free' (and thus presumably `malloc' and other related functions), + and whether the `ctype.h' macros work on characters with the high + bit set, as the C standard requires. + + If you use this macro, your code can refer to `STDC_HEADERS' to + determine whether the system has conforming header files (and + probably C library functions). + + This macro caches its result in the `ac_cv_header_stdc' variable. + + This macro is obsolescent, as current systems have conforming + header files. New programs need not use this macro. + + Nowadays `string.h' is part of the C standard and declares + functions like `strcpy', and `strings.h' is standardized by Posix + and declares BSD functions like `bcopy'; but historically, string + functions were a major sticking point in this area. If you still + want to worry about portability to ancient systems without + standard headers, there is so much variation that it is probably + easier to declare the functions you use than to figure out exactly + what the system header files declare. Some ancient systems + contained a mix of functions from the C standard and from BSD; + some were mostly standard but lacked `memmove'; some defined the + BSD functions as macros in `string.h' or `strings.h'; some had + only the BSD functions but `string.h'; some declared the memory + functions in `memory.h', some in `string.h'; etc. It is probably + sufficient to check for one string function and one memory + function; if the library had the standard versions of those then + it probably had most of the others. If you put the following in + `configure.ac': + + # This example is obsolescent. + # Nowadays you can omit these macro calls. + AC_HEADER_STDC + AC_CHECK_FUNCS([strchr memcpy]) + + then, in your code, you can use declarations like this: + + /* This example is obsolescent. + Nowadays you can just #include <string.h>. */ + #ifdef STDC_HEADERS + # include <string.h> + #else + # ifndef HAVE_STRCHR + # define strchr index + # define strrchr rindex + # endif + char *strchr (), *strrchr (); + # ifndef HAVE_MEMCPY + # define memcpy(d, s, n) bcopy ((s), (d), (n)) + # define memmove(d, s, n) bcopy ((s), (d), (n)) + # endif + #endif + + If you use a function like `memchr', `memset', `strtok', or + `strspn', which have no BSD equivalent, then macros don't suffice + to port to ancient hosts; you must provide an implementation of + each function. An easy way to incorporate your implementations + only when needed (since the ones in system C libraries may be hand + optimized) is to, taking `memchr' for example, put it in + `memchr.c' and use `AC_REPLACE_FUNCS([memchr])'. + + -- Macro: AC_HEADER_SYS_WAIT + If `sys/wait.h' exists and is compatible with Posix, define + `HAVE_SYS_WAIT_H'. Incompatibility can occur if `sys/wait.h' does + not exist, or if it uses the old BSD `union wait' instead of `int' + to store a status value. If `sys/wait.h' is not Posix compatible, + then instead of including it, define the Posix macros with their + usual interpretations. Here is an example: + + #include <sys/types.h> + #ifdef HAVE_SYS_WAIT_H + # include <sys/wait.h> + #endif + #ifndef WEXITSTATUS + # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) + #endif + #ifndef WIFEXITED + # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) + #endif + + This macro caches its result in the `ac_cv_header_sys_wait_h' + variable. + + This macro is obsolescent, as current systems are compatible with + Posix. New programs need not use this macro. + + `_POSIX_VERSION' is defined when `unistd.h' is included on Posix +systems. If there is no `unistd.h', it is definitely not a Posix +system. However, some non-Posix systems do have `unistd.h'. + + The way to check whether the system supports Posix is: + + #ifdef HAVE_UNISTD_H + # include <sys/types.h> + # include <unistd.h> + #endif + + #ifdef _POSIX_VERSION + /* Code for Posix systems. */ + #endif + + -- Macro: AC_HEADER_TIME + If a program may include both `time.h' and `sys/time.h', define + `TIME_WITH_SYS_TIME'. On some ancient systems, `sys/time.h' + included `time.h', but `time.h' was not protected against multiple + inclusion, so programs could not explicitly include both files. + This macro is useful in programs that use, for example, `struct + timeval' as well as `struct tm'. It is best used in conjunction + with `HAVE_SYS_TIME_H', which can be checked for using + `AC_CHECK_HEADERS([sys/time.h])'. + + #ifdef TIME_WITH_SYS_TIME + # include <sys/time.h> + # include <time.h> + #else + # ifdef HAVE_SYS_TIME_H + # include <sys/time.h> + # else + # include <time.h> + # endif + #endif + + This macro caches its result in the `ac_cv_header_time' variable. + + This macro is obsolescent, as current systems can include both + files when they exist. New programs need not use this macro. + + -- Macro: AC_HEADER_TIOCGWINSZ + If the use of `TIOCGWINSZ' requires `<sys/ioctl.h>', then define + `GWINSZ_IN_SYS_IOCTL'. Otherwise `TIOCGWINSZ' can be found in + `<termios.h>'. + + Use: + + #ifdef HAVE_TERMIOS_H + # include <termios.h> + #endif + + #ifdef GWINSZ_IN_SYS_IOCTL + # include <sys/ioctl.h> + #endif + + +File: autoconf.info, Node: Generic Headers, Prev: Particular Headers, Up: Header Files + +5.6.3 Generic Header Checks +--------------------------- + +These macros are used to find system header files not covered by the +"particular" test macros. If you need to check the contents of a header +as well as find out whether it is present, you have to write your own +test for it (*note Writing Tests::). + + -- Macro: AC_CHECK_HEADER (HEADER-FILE, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND], [INCLUDES]) + If the system header file HEADER-FILE is compilable, execute shell + commands ACTION-IF-FOUND, otherwise execute ACTION-IF-NOT-FOUND. + If you just want to define a symbol if the header file is + available, consider using `AC_CHECK_HEADERS' instead. + + INCLUDES is decoded to determine the appropriate include + directives. If omitted or empty, `configure' will check for both + header existence (with the preprocessor) and usability (with the + compiler), using `AC_INCLUDES_DEFAULT' for the compile test. If + there is a discrepancy between the results, a warning is issued to + the user, and the compiler results are favored (*note Present But + Cannot Be Compiled::). In general, favoring the compiler results + means that a header will be treated as not found even though the + file exists, because you did not provide enough prerequisites. + + Providing a non-empty INCLUDES argument allows the code to provide + any prerequisites prior to including the header under test; it is + common to use the argument `AC_INCLUDES_DEFAULT' (*note Default + Includes::). With an explicit fourth argument, no preprocessor + test is needed. As a special case, an INCLUDES of exactly `-' + triggers the older preprocessor check, which merely determines + existence of the file in the preprocessor search path; this should + only be used as a last resort (it is safer to determine the actual + prerequisites and perform a compiler check, or else use + `AC_PREPROC_IFELSE' to make it obvious that only a preprocessor + check is desired). + + This macro caches its result in the `ac_cv_header_HEADER-FILE' + variable, with characters not suitable for a variable name mapped + to underscores. + + -- Macro: AC_CHECK_HEADERS (HEADER-FILE..., [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND], [INCLUDES]) + For each given system header file HEADER-FILE in the + blank-separated argument list that exists, define + `HAVE_HEADER-FILE' (in all capitals). If ACTION-IF-FOUND is + given, it is additional shell code to execute when one of the + header files is found. You can give it a value of `break' to + break out of the loop on the first match. If ACTION-IF-NOT-FOUND + is given, it is executed when one of the header files is not found. + + INCLUDES is interpreted as in `AC_CHECK_HEADER', in order to + choose the set of preprocessor directives supplied before the + header under test. + + This macro caches its result in the `ac_cv_header_HEADER-FILE' + variable, with characters not suitable for a variable name mapped + to underscores. + + Previous versions of Autoconf merely checked whether the header was +accepted by the preprocessor. This was changed because the old test was +inappropriate for typical uses. Headers are typically used to compile, +not merely to preprocess, and the old behavior sometimes accepted +headers that clashed at compile-time (*note Present But Cannot Be +Compiled::). If you need to check whether a header is preprocessable, +you can use `AC_PREPROC_IFELSE' (*note Running the Preprocessor::). + + Actually requiring a header to compile improves the robustness of the +test, but it also requires that you make sure that headers that must be +included before the HEADER-FILE be part of the INCLUDES, (*note Default +Includes::). If looking for `bar.h', which requires that `foo.h' be +included before if it exists, we suggest the following scheme: + +AC_CHECK_HEADERS([foo.h]) +AC_CHECK_HEADERS([bar.h], [], [], +[#ifdef HAVE_FOO_H +# include <foo.h> +#endif +]) + + The following variant generates smaller, faster `configure' files if +you do not need the full power of `AC_CHECK_HEADERS'. + + -- Macro: AC_CHECK_HEADERS_ONCE (HEADER-FILE...) + For each given system header file HEADER-FILE in the + blank-separated argument list that exists, define + `HAVE_HEADER-FILE' (in all capitals). This is a once-only variant + of `AC_CHECK_HEADERS'. It generates the checking code at most + once, so that `configure' is smaller and faster; but the checks + cannot be conditionalized and are always done once, early during + the `configure' run. Thus, this macro is only safe for checking + headers that do not have prerequisites beyond what + `AC_INCLUDES_DEFAULT' provides. + + +File: autoconf.info, Node: Declarations, Next: Structures, Prev: Header Files, Up: Existing Tests + +5.7 Declarations +================ + +The following macros check for the declaration of variables and +functions. If there is no macro specifically defined to check for a +symbol you need, then you can use the general macros (*note Generic +Declarations::) or, for more complex tests, you may use +`AC_COMPILE_IFELSE' (*note Running the Compiler::). + +* Menu: + +* Particular Declarations:: Macros to check for certain declarations +* Generic Declarations:: How to find other declarations + + +File: autoconf.info, Node: Particular Declarations, Next: Generic Declarations, Up: Declarations + +5.7.1 Particular Declaration Checks +----------------------------------- + +There are no specific macros for declarations. + + +File: autoconf.info, Node: Generic Declarations, Prev: Particular Declarations, Up: Declarations + +5.7.2 Generic Declaration Checks +-------------------------------- + +These macros are used to find declarations not covered by the +"particular" test macros. + + -- Macro: AC_CHECK_DECL (SYMBOL, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND], [INCLUDES = `AC_INCLUDES_DEFAULT']) + If SYMBOL (a function, variable, or constant) is not declared in + INCLUDES and a declaration is needed, run the shell commands + ACTION-IF-NOT-FOUND, otherwise ACTION-IF-FOUND. INCLUDES is a + series of include directives, defaulting to `AC_INCLUDES_DEFAULT' + (*note Default Includes::), which are used prior to the + declaration under test. + + This macro actually tests whether SYMBOL is defined as a macro or + can be used as an r-value, not whether it is really declared, + because it is much safer to avoid introducing extra declarations + when they are not needed. In order to facilitate use of C++ and + overloaded function declarations, it is possible to specify + function argument types in parentheses for types which can be + zero-initialized: + + AC_CHECK_DECL([basename(char *)]) + + This macro caches its result in the `ac_cv_have_decl_SYMBOL' + variable, with characters not suitable for a variable name mapped + to underscores. + + -- Macro: AC_CHECK_DECLS (SYMBOLS, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND], [INCLUDES = `AC_INCLUDES_DEFAULT']) + For each of the SYMBOLS (_comma_-separated list with optional + function argument types for C++ overloads), define + `HAVE_DECL_SYMBOL' (in all capitals) to `1' if SYMBOL is declared, + otherwise to `0'. If ACTION-IF-NOT-FOUND is given, it is + additional shell code to execute when one of the function + declarations is needed, otherwise ACTION-IF-FOUND is executed. + + INCLUDES is a series of include directives, defaulting to + `AC_INCLUDES_DEFAULT' (*note Default Includes::), which are used + prior to the declarations under test. + + This macro uses an M4 list as first argument: + AC_CHECK_DECLS([strdup]) + AC_CHECK_DECLS([strlen]) + AC_CHECK_DECLS([malloc, realloc, calloc, free]) + AC_CHECK_DECLS([j0], [], [], [[#include <math.h>]]) + AC_CHECK_DECLS([[basename(char *)], [dirname(char *)]]) + + Unlike the other `AC_CHECK_*S' macros, when a SYMBOL is not + declared, `HAVE_DECL_SYMBOL' is defined to `0' instead of leaving + `HAVE_DECL_SYMBOL' undeclared. When you are _sure_ that the check + was performed, use `HAVE_DECL_SYMBOL' in `#if': + + #if !HAVE_DECL_SYMBOL + extern char *symbol; + #endif + + If the test may have not been performed, however, because it is + safer _not_ to declare a symbol than to use a declaration that + conflicts with the system's one, you should use: + + #if defined HAVE_DECL_MALLOC && !HAVE_DECL_MALLOC + void *malloc (size_t *s); + #endif + + You fall into the second category only in extreme situations: + either your files may be used without being configured, or they + are used during the configuration. In most cases the traditional + approach is enough. + + This macro caches its results in `ac_cv_have_decl_SYMBOL' + variables, with characters not suitable for a variable name mapped + to underscores. + + -- Macro: AC_CHECK_DECLS_ONCE (SYMBOLS) + For each of the SYMBOLS (_comma_-separated list), define + `HAVE_DECL_SYMBOL' (in all capitals) to `1' if SYMBOL is declared + in the default include files, otherwise to `0'. This is a + once-only variant of `AC_CHECK_DECLS'. It generates the checking + code at most once, so that `configure' is smaller and faster; but + the checks cannot be conditionalized and are always done once, + early during the `configure' run. + + +File: autoconf.info, Node: Structures, Next: Types, Prev: Declarations, Up: Existing Tests + +5.8 Structures +============== + +The following macros check for the presence of certain members in C +structures. If there is no macro specifically defined to check for a +member you need, then you can use the general structure-member macros +(*note Generic Structures::) or, for more complex tests, you may use +`AC_COMPILE_IFELSE' (*note Running the Compiler::). + +* Menu: + +* Particular Structures:: Macros to check for certain structure members +* Generic Structures:: How to find other structure members + + +File: autoconf.info, Node: Particular Structures, Next: Generic Structures, Up: Structures + +5.8.1 Particular Structure Checks +--------------------------------- + +The following macros check for certain structures or structure members. + + -- Macro: AC_STRUCT_DIRENT_D_INO + Perform all the actions of `AC_HEADER_DIRENT' (*note Particular + Headers::). Then, if `struct dirent' contains a `d_ino' member, + define `HAVE_STRUCT_DIRENT_D_INO'. + + `HAVE_STRUCT_DIRENT_D_INO' indicates only the presence of `d_ino', + not whether its contents are always reliable. Traditionally, a + zero `d_ino' indicated a deleted directory entry, though current + systems hide this detail from the user and never return zero + `d_ino' values. Many current systems report an incorrect `d_ino' + for a directory entry that is a mount point. + + -- Macro: AC_STRUCT_DIRENT_D_TYPE + Perform all the actions of `AC_HEADER_DIRENT' (*note Particular + Headers::). Then, if `struct dirent' contains a `d_type' member, + define `HAVE_STRUCT_DIRENT_D_TYPE'. + + -- Macro: AC_STRUCT_ST_BLOCKS + If `struct stat' contains an `st_blocks' member, define + `HAVE_STRUCT_STAT_ST_BLOCKS'. Otherwise, require an `AC_LIBOBJ' + replacement of `fileblocks'. The former name, `HAVE_ST_BLOCKS' is + to be avoided, as its support will cease in the future. + + This macro caches its result in the + `ac_cv_member_struct_stat_st_blocks' variable. + + -- Macro: AC_STRUCT_TM + If `time.h' does not define `struct tm', define `TM_IN_SYS_TIME', + which means that including `sys/time.h' had better define `struct + tm'. + + This macro is obsolescent, as `time.h' defines `struct tm' in + current systems. New programs need not use this macro. + + -- Macro: AC_STRUCT_TIMEZONE + Figure out how to get the current timezone. If `struct tm' has a + `tm_zone' member, define `HAVE_STRUCT_TM_TM_ZONE' (and the + obsoleted `HAVE_TM_ZONE'). Otherwise, if the external array + `tzname' is found, define `HAVE_TZNAME'; if it is declared, define + `HAVE_DECL_TZNAME'. + + +File: autoconf.info, Node: Generic Structures, Prev: Particular Structures, Up: Structures + +5.8.2 Generic Structure Checks +------------------------------ + +These macros are used to find structure members not covered by the +"particular" test macros. + + -- Macro: AC_CHECK_MEMBER (AGGREGATE.MEMBER, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND], [INCLUDES = `AC_INCLUDES_DEFAULT']) + Check whether MEMBER is a member of the aggregate AGGREGATE. If + no INCLUDES are specified, the default includes are used (*note + Default Includes::). + + AC_CHECK_MEMBER([struct passwd.pw_gecos], [], + [AC_MSG_ERROR([we need `passwd.pw_gecos'])], + [[#include <pwd.h>]]) + + You can use this macro for submembers: + + AC_CHECK_MEMBER(struct top.middle.bot) + + This macro caches its result in the + `ac_cv_member_AGGREGATE_MEMBER' variable, with characters not + suitable for a variable name mapped to underscores. + + -- Macro: AC_CHECK_MEMBERS (MEMBERS, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND], [INCLUDES = `AC_INCLUDES_DEFAULT']) + Check for the existence of each `AGGREGATE.MEMBER' of MEMBERS + using the previous macro. When MEMBER belongs to AGGREGATE, + define `HAVE_AGGREGATE_MEMBER' (in all capitals, with spaces and + dots replaced by underscores). If ACTION-IF-FOUND is given, it is + executed for each of the found members. If ACTION-IF-NOT-FOUND is + given, it is executed for each of the members that could not be + found. + + INCLUDES is a series of include directives, defaulting to + `AC_INCLUDES_DEFAULT' (*note Default Includes::), which are used + prior to the members under test. + + This macro uses M4 lists: + AC_CHECK_MEMBERS([struct stat.st_rdev, struct stat.st_blksize]) + + +File: autoconf.info, Node: Types, Next: Compilers and Preprocessors, Prev: Structures, Up: Existing Tests + +5.9 Types +========= + +The following macros check for C types, either builtin or typedefs. If +there is no macro specifically defined to check for a type you need, and +you don't need to check for any special properties of it, then you can +use a general type-check macro. + +* Menu: + +* Particular Types:: Special handling to find certain types +* Generic Types:: How to find other types + + +File: autoconf.info, Node: Particular Types, Next: Generic Types, Up: Types + +5.9.1 Particular Type Checks +---------------------------- + +These macros check for particular C types in `sys/types.h', `stdlib.h', +`stdint.h', `inttypes.h' and others, if they exist. + + The Gnulib `stdint' module is an alternate way to define many of +these symbols; it is useful if you prefer your code to assume a +C99-or-better environment. *Note Gnulib::. + + -- Macro: AC_TYPE_GETGROUPS + Define `GETGROUPS_T' to be whichever of `gid_t' or `int' is the + base type of the array argument to `getgroups'. + + This macro caches the base type in the `ac_cv_type_getgroups' + variable. + + -- Macro: AC_TYPE_INT8_T + If `stdint.h' or `inttypes.h' does not define the type `int8_t', + define `int8_t' to a signed integer type that is exactly 8 bits + wide and that uses two's complement representation, if such a type + exists. If you are worried about porting to hosts that lack such + a type, you can use the results of this macro in C89-or-later code + as follows: + + #if HAVE_STDINT_H + # include <stdint.h> + #endif + #if defined INT8_MAX || defined int8_t + _code using int8_t_ + #else + _complicated alternative using >8-bit 'signed char'_ + #endif + + This macro caches the type in the `ac_cv_c_int8_t' variable. + + -- Macro: AC_TYPE_INT16_T + This is like `AC_TYPE_INT8_T', except for 16-bit integers. + + -- Macro: AC_TYPE_INT32_T + This is like `AC_TYPE_INT8_T', except for 32-bit integers. + + -- Macro: AC_TYPE_INT64_T + This is like `AC_TYPE_INT8_T', except for 64-bit integers. + + -- Macro: AC_TYPE_INTMAX_T + If `stdint.h' or `inttypes.h' defines the type `intmax_t', define + `HAVE_INTMAX_T'. Otherwise, define `intmax_t' to the widest + signed integer type. + + -- Macro: AC_TYPE_INTPTR_T + If `stdint.h' or `inttypes.h' defines the type `intptr_t', define + `HAVE_INTPTR_T'. Otherwise, define `intptr_t' to a signed integer + type wide enough to hold a pointer, if such a type exists. + + -- Macro: AC_TYPE_LONG_DOUBLE + If the C compiler supports a working `long double' type, define + `HAVE_LONG_DOUBLE'. The `long double' type might have the same + range and precision as `double'. + + This macro caches its result in the `ac_cv_type_long_double' + variable. + + This macro is obsolescent, as current C compilers support `long + double'. New programs need not use this macro. + + -- Macro: AC_TYPE_LONG_DOUBLE_WIDER + If the C compiler supports a working `long double' type with more + range or precision than the `double' type, define + `HAVE_LONG_DOUBLE_WIDER'. + + This macro caches its result in the `ac_cv_type_long_double_wider' + variable. + + -- Macro: AC_TYPE_LONG_LONG_INT + If the C compiler supports a working `long long int' type, define + `HAVE_LONG_LONG_INT'. However, this test does not test `long long + int' values in preprocessor `#if' expressions, because too many + compilers mishandle such expressions. *Note Preprocessor + Arithmetic::. + + This macro caches its result in the `ac_cv_type_long_long_int' + variable. + + -- Macro: AC_TYPE_MBSTATE_T + Define `HAVE_MBSTATE_T' if `<wchar.h>' declares the `mbstate_t' + type. Also, define `mbstate_t' to be a type if `<wchar.h>' does + not declare it. + + This macro caches its result in the `ac_cv_type_mbstate_t' + variable. + + -- Macro: AC_TYPE_MODE_T + Define `mode_t' to a suitable type, if standard headers do not + define it. + + This macro caches its result in the `ac_cv_type_mode_t' variable. + + -- Macro: AC_TYPE_OFF_T + Define `off_t' to a suitable type, if standard headers do not + define it. + + This macro caches its result in the `ac_cv_type_off_t' variable. + + -- Macro: AC_TYPE_PID_T + Define `pid_t' to a suitable type, if standard headers do not + define it. + + This macro caches its result in the `ac_cv_type_pid_t' variable. + + -- Macro: AC_TYPE_SIZE_T + Define `size_t' to a suitable type, if standard headers do not + define it. + + This macro caches its result in the `ac_cv_type_size_t' variable. + + -- Macro: AC_TYPE_SSIZE_T + Define `ssize_t' to a suitable type, if standard headers do not + define it. + + This macro caches its result in the `ac_cv_type_ssize_t' variable. + + -- Macro: AC_TYPE_UID_T + Define `uid_t' and `gid_t' to suitable types, if standard headers + do not define them. + + This macro caches its result in the `ac_cv_type_uid_t' variable. + + -- Macro: AC_TYPE_UINT8_T + If `stdint.h' or `inttypes.h' does not define the type `uint8_t', + define `uint8_t' to an unsigned integer type that is exactly 8 + bits wide, if such a type exists. This is like `AC_TYPE_INT8_T', + except for unsigned integers. + + -- Macro: AC_TYPE_UINT16_T + This is like `AC_TYPE_UINT8_T', except for 16-bit integers. + + -- Macro: AC_TYPE_UINT32_T + This is like `AC_TYPE_UINT8_T', except for 32-bit integers. + + -- Macro: AC_TYPE_UINT64_T + This is like `AC_TYPE_UINT8_T', except for 64-bit integers. + + -- Macro: AC_TYPE_UINTMAX_T + If `stdint.h' or `inttypes.h' defines the type `uintmax_t', define + `HAVE_UINTMAX_T'. Otherwise, define `uintmax_t' to the widest + unsigned integer type. + + -- Macro: AC_TYPE_UINTPTR_T + If `stdint.h' or `inttypes.h' defines the type `uintptr_t', define + `HAVE_UINTPTR_T'. Otherwise, define `uintptr_t' to an unsigned + integer type wide enough to hold a pointer, if such a type exists. + + -- Macro: AC_TYPE_UNSIGNED_LONG_LONG_INT + If the C compiler supports a working `unsigned long long int' type, + define `HAVE_UNSIGNED_LONG_LONG_INT'. However, this test does not + test `unsigned long long int' values in preprocessor `#if' + expressions, because too many compilers mishandle such expressions. + *Note Preprocessor Arithmetic::. + + This macro caches its result in the + `ac_cv_type_unsigned_long_long_int' variable. + + +File: autoconf.info, Node: Generic Types, Prev: Particular Types, Up: Types + +5.9.2 Generic Type Checks +------------------------- + +These macros are used to check for types not covered by the "particular" +test macros. + + -- Macro: AC_CHECK_TYPE (TYPE, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND], [INCLUDES = `AC_INCLUDES_DEFAULT']) + Check whether TYPE is defined. It may be a compiler builtin type + or defined by the INCLUDES. INCLUDES is a series of include + directives, defaulting to `AC_INCLUDES_DEFAULT' (*note Default + Includes::), which are used prior to the type under test. + + In C, TYPE must be a type-name, so that the expression `sizeof + (TYPE)' is valid (but `sizeof ((TYPE))' is not). The same test is + applied when compiling for C++, which means that in C++ TYPE + should be a type-id and should not be an anonymous `struct' or + `union'. + + This macro caches its result in the `ac_cv_type_TYPE' variable, + with `*' mapped to `p' and other characters not suitable for a + variable name mapped to underscores. + + -- Macro: AC_CHECK_TYPES (TYPES, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND], [INCLUDES = `AC_INCLUDES_DEFAULT']) + For each TYPE of the TYPES that is defined, define `HAVE_TYPE' (in + all capitals). Each TYPE must follow the rules of + `AC_CHECK_TYPE'. If no INCLUDES are specified, the default + includes are used (*note Default Includes::). If ACTION-IF-FOUND + is given, it is additional shell code to execute when one of the + types is found. If ACTION-IF-NOT-FOUND is given, it is executed + when one of the types is not found. + + This macro uses M4 lists: + AC_CHECK_TYPES([ptrdiff_t]) + AC_CHECK_TYPES([unsigned long long int, uintmax_t]) + AC_CHECK_TYPES([float_t], [], [], [[#include <math.h>]]) + + + Autoconf, up to 2.13, used to provide to another version of +`AC_CHECK_TYPE', broken by design. In order to keep backward +compatibility, a simple heuristic, quite safe but not totally, is +implemented. In case of doubt, read the documentation of the former +`AC_CHECK_TYPE', see *note Obsolete Macros::. + + +File: autoconf.info, Node: Compilers and Preprocessors, Next: System Services, Prev: Types, Up: Existing Tests + +5.10 Compilers and Preprocessors +================================ + +All the tests for compilers (`AC_PROG_CC', `AC_PROG_CXX', +`AC_PROG_F77') define the output variable `EXEEXT' based on the output +of the compiler, typically to the empty string if Posix and `.exe' if a +DOS variant. + + They also define the output variable `OBJEXT' based on the output of +the compiler, after `.c' files have been excluded, typically to `o' if +Posix, `obj' if a DOS variant. + + If the compiler being used does not produce executables, the tests +fail. If the executables can't be run, and cross-compilation is not +enabled, they fail too. *Note Manual Configuration::, for more on +support for cross compiling. + +* Menu: + +* Specific Compiler Characteristics:: Some portability issues +* Generic Compiler Characteristics:: Language independent tests and features +* C Compiler:: Checking its characteristics +* C++ Compiler:: Likewise +* Objective C Compiler:: Likewise +* Objective C++ Compiler:: Likewise +* Erlang Compiler and Interpreter:: Likewise +* Fortran Compiler:: Likewise +* Go Compiler:: Likewise + + +File: autoconf.info, Node: Specific Compiler Characteristics, Next: Generic Compiler Characteristics, Up: Compilers and Preprocessors + +5.10.1 Specific Compiler Characteristics +---------------------------------------- + +Some compilers exhibit different behaviors. + +Static/Dynamic Expressions + Autoconf relies on a trick to extract one bit of information from + the C compiler: using negative array sizes. For instance the + following excerpt of a C source demonstrates how to test whether + `int' objects are 4 bytes wide: + + static int test_array[sizeof (int) == 4 ? 1 : -1]; + + To our knowledge, there is a single compiler that does not support + this trick: the HP C compilers (the real ones, not only the + "bundled") on HP-UX 11.00. They incorrectly reject the above + program with the diagnostic "Variable-length arrays cannot have + static storage." This bug comes from HP compilers' mishandling of + `sizeof (int)', not from the `? 1 : -1', and Autoconf works around + this problem by casting `sizeof (int)' to `long int' before + comparing it. + + +File: autoconf.info, Node: Generic Compiler Characteristics, Next: C Compiler, Prev: Specific Compiler Characteristics, Up: Compilers and Preprocessors + +5.10.2 Generic Compiler Characteristics +--------------------------------------- + + -- Macro: AC_CHECK_SIZEOF (TYPE-OR-EXPR, [UNUSED], [INCLUDES = + `AC_INCLUDES_DEFAULT']) + Define `SIZEOF_TYPE-OR-EXPR' (*note Standard Symbols::) to be the + size in bytes of TYPE-OR-EXPR, which may be either a type or an + expression returning a value that has a size. If the expression + `sizeof (TYPE-OR-EXPR)' is invalid, the result is 0. INCLUDES is + a series of include directives, defaulting to + `AC_INCLUDES_DEFAULT' (*note Default Includes::), which are used + prior to the expression under test. + + This macro now works even when cross-compiling. The UNUSED + argument was used when cross-compiling. + + For example, the call + + AC_CHECK_SIZEOF([int *]) + + defines `SIZEOF_INT_P' to be 8 on DEC Alpha AXP systems. + + This macro caches its result in the `ac_cv_sizeof_TYPE-OR-EXPR' + variable, with `*' mapped to `p' and other characters not suitable + for a variable name mapped to underscores. + + -- Macro: AC_CHECK_ALIGNOF (TYPE, [INCLUDES = `AC_INCLUDES_DEFAULT']) + Define `ALIGNOF_TYPE' (*note Standard Symbols::) to be the + alignment in bytes of TYPE. `TYPE y;' must be valid as a + structure member declaration. If `type' is unknown, the result is + 0. If no INCLUDES are specified, the default includes are used + (*note Default Includes::). + + This macro caches its result in the `ac_cv_alignof_TYPE-OR-EXPR' + variable, with `*' mapped to `p' and other characters not suitable + for a variable name mapped to underscores. + + -- Macro: AC_COMPUTE_INT (VAR, EXPRESSION, [INCLUDES = + `AC_INCLUDES_DEFAULT'], [ACTION-IF-FAILS]) + Store into the shell variable VAR the value of the integer + EXPRESSION. The value should fit in an initializer in a C + variable of type `signed long'. To support cross compilation (in + which case, the macro only works on hosts that use twos-complement + arithmetic), it should be possible to evaluate the expression at + compile-time. If no INCLUDES are specified, the default includes + are used (*note Default Includes::). + + Execute ACTION-IF-FAILS if the value cannot be determined + correctly. + + -- Macro: AC_LANG_WERROR + Normally Autoconf ignores warnings generated by the compiler, + linker, and preprocessor. If this macro is used, warnings count + as fatal errors for the current language. This macro is useful + when the results of configuration are used where warnings are + unacceptable; for instance, if parts of a program are built with + the GCC `-Werror' option. If the whole program is built using + `-Werror' it is often simpler to put `-Werror' in the compiler + flags (`CFLAGS', etc.). + + -- Macro: AC_OPENMP + OpenMP (http://www.openmp.org/) specifies extensions of C, C++, + and Fortran that simplify optimization of shared memory + parallelism, which is a common problem on multicore CPUs. + + If the current language is C, the macro `AC_OPENMP' sets the + variable `OPENMP_CFLAGS' to the C compiler flags needed for + supporting OpenMP. `OPENMP_CFLAGS' is set to empty if the + compiler already supports OpenMP, if it has no way to activate + OpenMP support, or if the user rejects OpenMP support by invoking + `configure' with the `--disable-openmp' option. + + `OPENMP_CFLAGS' needs to be used when compiling programs, when + preprocessing program source, and when linking programs. + Therefore you need to add `$(OPENMP_CFLAGS)' to the `CFLAGS' of C + programs that use OpenMP. If you preprocess OpenMP-specific C + code, you also need to add `$(OPENMP_CFLAGS)' to `CPPFLAGS'. The + presence of OpenMP support is revealed at compile time by the + preprocessor macro `_OPENMP'. + + Linking a program with `OPENMP_CFLAGS' typically adds one more + shared library to the program's dependencies, so its use is + recommended only on programs that actually require OpenMP. + + If the current language is C++, `AC_OPENMP' sets the variable + `OPENMP_CXXFLAGS', suitably for the C++ compiler. The same remarks + hold as for C. + + If the current language is Fortran 77 or Fortran, `AC_OPENMP' sets + the variable `OPENMP_FFLAGS' or `OPENMP_FCFLAGS', respectively. + Similar remarks as for C hold, except that `CPPFLAGS' is not used + for Fortran, and no preprocessor macro signals OpenMP support. + + For portability, it is best to avoid spaces between `#' and + `pragma omp'. That is, write `#pragma omp', not `# pragma omp'. + The Sun WorkShop 6.2 C compiler chokes on the latter. + + This macro caches its result in the `ac_cv_prog_c_openmp', + `ac_cv_prog_cxx_openmp', `ac_cv_prog_f77_openmp', or + `ac_cv_prog_fc_openmp' variable, depending on the current language. + + +File: autoconf.info, Node: C Compiler, Next: C++ Compiler, Prev: Generic Compiler Characteristics, Up: Compilers and Preprocessors + +5.10.3 C Compiler Characteristics +--------------------------------- + +The following macros provide ways to find and exercise a C Compiler. +There are a few constructs that ought to be avoided, but do not deserve +being checked for, since they can easily be worked around. + +Don't use lines containing solitary backslashes + They tickle a bug in the HP-UX C compiler (checked on HP-UX 10.20, + 11.00, and 11i). When given the following source: + + #ifdef __STDC__ + /\ + * A comment with backslash-newlines in it. %{ %} *\ + \ + / + char str[] = "\\ + " A string with backslash-newlines in it %{ %} \\ + ""; + char apostrophe = '\\ + \ + '\ + '; + #endif + + the compiler incorrectly fails with the diagnostics + "Non-terminating comment at end of file" and "Missing `#endif' at + end of file." Removing the lines with solitary backslashes solves + the problem. + +Don't compile several files at once if output matters to you + Some compilers, such as HP's, report names of files being compiled + when given more than one file operand. For instance: + + $ cc a.c b.c + a.c: + b.c: + + This can cause problems if you observe the output of the compiler + to detect failures. Invoking `cc -c a.c && cc -c b.c && cc -o c + a.o b.o' solves the issue. + +Don't rely on `#error' failing + The IRIX C compiler does not fail when #error is preprocessed; it + simply emits a diagnostic and continues, exiting successfully. So, + instead of an error directive like `#error "Unsupported word size"' + it is more portable to use an invalid directive like `#Unsupported + word size' in Autoconf tests. In ordinary source code, `#error' is + OK, since installers with inadequate compilers like IRIX can simply + examine these compilers' diagnostic output. + +Don't rely on correct `#line' support + On Solaris, `c89' (at least Sun C 5.3 through 5.8) diagnoses + `#line' directives whose line numbers are greater than 32767. + Nothing in Posix makes this invalid. That is why Autoconf stopped + issuing `#line' directives. + + -- Macro: AC_PROG_CC ([COMPILER-SEARCH-LIST]) + Determine a C compiler to use. If `CC' is not already set in the + environment, check for `gcc' and `cc', then for other C compilers. + Set output variable `CC' to the name of the compiler found. + + This macro may, however, be invoked with an optional first argument + which, if specified, must be a blank-separated list of C compilers + to search for. This just gives the user an opportunity to specify + an alternative search list for the C compiler. For example, if + you didn't like the default order, then you could invoke + `AC_PROG_CC' like this: + + AC_PROG_CC([gcc cl cc]) + + If the C compiler does not handle function prototypes correctly by + default, try to add an option to output variable `CC' to make it + so. This macro tries various options that select + standard-conformance modes on various systems. + + After calling this macro you can check whether the C compiler has + been set to accept ANSI C89 (ISO C90); if not, the shell variable + `ac_cv_prog_cc_c89' is set to `no'. See also `AC_C_PROTOTYPES' + below. + + If using the GNU C compiler, set shell variable `GCC' to `yes'. + If output variable `CFLAGS' was not already set, set it to `-g + -O2' for the GNU C compiler (`-O2' on systems where GCC does not + accept `-g'), or `-g' for other compilers. If your package does + not like this default, then it is acceptable to insert the line `: + ${CFLAGS=""}' after `AC_INIT' and before `AC_PROG_CC' to select an + empty default instead. + + Many Autoconf macros use a compiler, and thus call + `AC_REQUIRE([AC_PROG_CC])' to ensure that the compiler has been + determined before the body of the outermost `AC_DEFUN' macro. + Although `AC_PROG_CC' is safe to directly expand multiple times, it + performs certain checks (such as the proper value of `EXEEXT') only + on the first invocation. Therefore, care must be used when + invoking this macro from within another macro rather than at the + top level (*note Expanded Before Required::). + + -- Macro: AC_PROG_CC_C_O + If the C compiler does not accept the `-c' and `-o' options + simultaneously, define `NO_MINUS_C_MINUS_O'. This macro actually + tests both the compiler found by `AC_PROG_CC', and, if different, + the first `cc' in the path. The test fails if one fails. This + macro was created for GNU Make to choose the default C compilation + rule. + + For the compiler COMPILER, this macro caches its result in the + `ac_cv_prog_cc_COMPILER_c_o' variable. + + -- Macro: AC_PROG_CPP + Set output variable `CPP' to a command that runs the C + preprocessor. If `$CC -E' doesn't work, `/lib/cpp' is used. It + is only portable to run `CPP' on files with a `.c' extension. + + Some preprocessors don't indicate missing include files by the + error status. For such preprocessors an internal variable is set + that causes other macros to check the standard error from the + preprocessor and consider the test failed if any warnings have + been reported. For most preprocessors, though, warnings do not + cause include-file tests to fail unless `AC_PROG_CPP_WERROR' is + also specified. + + -- Macro: AC_PROG_CPP_WERROR + This acts like `AC_PROG_CPP', except it treats warnings from the + preprocessor as errors even if the preprocessor exit status + indicates success. This is useful for avoiding headers that + generate mandatory warnings, such as deprecation notices. + + The following macros check for C compiler or machine architecture +features. To check for characteristics not listed here, use +`AC_COMPILE_IFELSE' (*note Running the Compiler::) or `AC_RUN_IFELSE' +(*note Runtime::). + + -- Macro: AC_PROG_CC_STDC + If the C compiler cannot compile ISO Standard C (currently C99), + try to add an option to output variable `CC' to make it work. If + the compiler does not support C99, fall back to supporting ANSI + C89 (ISO C90). + + After calling this macro you can check whether the C compiler has + been set to accept Standard C; if not, the shell variable + `ac_cv_prog_cc_stdc' is set to `no'. + + -- Macro: AC_PROG_CC_C89 + If the C compiler is not in ANSI C89 (ISO C90) mode by default, + try to add an option to output variable `CC' to make it so. This + macro tries various options that select ANSI C89 on some system or + another, preferring extended functionality modes over strict + conformance modes. It considers the compiler to be in ANSI C89 + mode if it handles function prototypes correctly. + + After calling this macro you can check whether the C compiler has + been set to accept ANSI C89; if not, the shell variable + `ac_cv_prog_cc_c89' is set to `no'. + + This macro is called automatically by `AC_PROG_CC'. + + -- Macro: AC_PROG_CC_C99 + If the C compiler is not in C99 mode by default, try to add an + option to output variable `CC' to make it so. This macro tries + various options that select C99 on some system or another, + preferring extended functionality modes over strict conformance + modes. It considers the compiler to be in C99 mode if it handles + `_Bool', `//' comments, flexible array members, `inline', signed + and unsigned `long long int', mixed code and declarations, named + initialization of structs, `restrict', `va_copy', varargs macros, + variable declarations in `for' loops, and variable length arrays. + + After calling this macro you can check whether the C compiler has + been set to accept C99; if not, the shell variable + `ac_cv_prog_cc_c99' is set to `no'. + + -- Macro: AC_C_BACKSLASH_A + Define `HAVE_C_BACKSLASH_A' to 1 if the C compiler understands + `\a'. + + This macro is obsolescent, as current C compilers understand `\a'. + New programs need not use this macro. + + -- Macro: AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], + [ACTION-IF-UNKNOWN], [ACTION-IF-UNIVERSAL]) + If words are stored with the most significant byte first (like + Motorola and SPARC CPUs), execute ACTION-IF-TRUE. If words are + stored with the least significant byte first (like Intel and VAX + CPUs), execute ACTION-IF-FALSE. + + This macro runs a test-case if endianness cannot be determined + from the system header files. When cross-compiling, the test-case + is not run but grep'ed for some magic values. ACTION-IF-UNKNOWN + is executed if the latter case fails to determine the byte sex of + the host system. + + In some cases a single run of a compiler can generate code for + multiple architectures. This can happen, for example, when + generating Mac OS X universal binary files, which work on both + PowerPC and Intel architectures. In this case, the different + variants might be for different architectures whose endiannesses + differ. If `configure' detects this, it executes + ACTION-IF-UNIVERSAL instead of ACTION-IF-UNKNOWN. + + The default for ACTION-IF-TRUE is to define `WORDS_BIGENDIAN'. + The default for ACTION-IF-FALSE is to do nothing. The default for + ACTION-IF-UNKNOWN is to abort configure and tell the installer how + to bypass this test. And finally, the default for + ACTION-IF-UNIVERSAL is to ensure that `WORDS_BIGENDIAN' is defined + if and only if a universal build is detected and the current code + is big-endian; this default works only if `autoheader' is used + (*note autoheader Invocation::). + + If you use this macro without specifying ACTION-IF-UNIVERSAL, you + should also use `AC_CONFIG_HEADERS'; otherwise `WORDS_BIGENDIAN' + may be set incorrectly for Mac OS X universal binary files. + + -- Macro: AC_C_CONST + If the C compiler does not fully support the `const' keyword, + define `const' to be empty. Some C compilers that do not define + `__STDC__' do support `const'; some compilers that define + `__STDC__' do not completely support `const'. Programs can simply + use `const' as if every C compiler supported it; for those that + don't, the makefile or configuration header file defines it as + empty. + + Occasionally installers use a C++ compiler to compile C code, + typically because they lack a C compiler. This causes problems + with `const', because C and C++ treat `const' differently. For + example: + + const int foo; + + is valid in C but not in C++. These differences unfortunately + cannot be papered over by defining `const' to be empty. + + If `autoconf' detects this situation, it leaves `const' alone, as + this generally yields better results in practice. However, using a + C++ compiler to compile C code is not recommended or supported, and + installers who run into trouble in this area should get a C + compiler like GCC to compile their C code. + + This macro caches its result in the `ac_cv_c_const' variable. + + This macro is obsolescent, as current C compilers support `const'. + New programs need not use this macro. + + -- Macro: AC_C_RESTRICT + If the C compiler recognizes a variant spelling for the `restrict' + keyword (`__restrict', `__restrict__', or `_Restrict'), then + define `restrict' to that; this is more likely to do the right + thing with compilers that support language variants where plain + `restrict' is not a keyword. Otherwise, if the C compiler + recognizes the `restrict' keyword, don't do anything. Otherwise, + define `restrict' to be empty. Thus, programs may simply use + `restrict' as if every C compiler supported it; for those that do + not, the makefile or configuration header defines it away. + + Although support in C++ for the `restrict' keyword is not + required, several C++ compilers do accept the keyword. This macro + works for them, too. + + This macro caches `no' in the `ac_cv_c_restrict' variable if + `restrict' is not supported, and a supported spelling otherwise. + + -- Macro: AC_C_VOLATILE + If the C compiler does not understand the keyword `volatile', + define `volatile' to be empty. Programs can simply use `volatile' + as if every C compiler supported it; for those that do not, the + makefile or configuration header defines it as empty. + + If the correctness of your program depends on the semantics of + `volatile', simply defining it to be empty does, in a sense, break + your code. However, given that the compiler does not support + `volatile', you are at its mercy anyway. At least your program + compiles, when it wouldn't before. *Note Volatile Objects::, for + more about `volatile'. + + In general, the `volatile' keyword is a standard C feature, so you + might expect that `volatile' is available only when `__STDC__' is + defined. However, Ultrix 4.3's native compiler does support + volatile, but does not define `__STDC__'. + + This macro is obsolescent, as current C compilers support + `volatile'. New programs need not use this macro. + + -- Macro: AC_C_INLINE + If the C compiler supports the keyword `inline', do nothing. + Otherwise define `inline' to `__inline__' or `__inline' if it + accepts one of those, otherwise define `inline' to be empty. + + -- Macro: AC_C_CHAR_UNSIGNED + If the C type `char' is unsigned, define `__CHAR_UNSIGNED__', + unless the C compiler predefines it. + + These days, using this macro is not necessary. The same + information can be determined by this portable alternative, thus + avoiding the use of preprocessor macros in the namespace reserved + for the implementation. + + #include <limits.h> + #if CHAR_MIN == 0 + # define CHAR_UNSIGNED 1 + #endif + + -- Macro: AC_C_STRINGIZE + If the C preprocessor supports the stringizing operator, define + `HAVE_STRINGIZE'. The stringizing operator is `#' and is found in + macros such as this: + + #define x(y) #y + + This macro is obsolescent, as current C compilers support the + stringizing operator. New programs need not use this macro. + + -- Macro: AC_C_FLEXIBLE_ARRAY_MEMBER + If the C compiler supports flexible array members, define + `FLEXIBLE_ARRAY_MEMBER' to nothing; otherwise define it to 1. + That way, a declaration like this: + + struct s + { + size_t n_vals; + double val[FLEXIBLE_ARRAY_MEMBER]; + }; + + will let applications use the "struct hack" even with compilers + that do not support flexible array members. To allocate and use + such an object, you can use code like this: + + size_t i; + size_t n = compute_value_count (); + struct s *p = + malloc (offsetof (struct s, val) + + n * sizeof (double)); + p->n_vals = n; + for (i = 0; i < n; i++) + p->val[i] = compute_value (i); + + -- Macro: AC_C_VARARRAYS + If the C compiler supports variable-length arrays, define + `HAVE_C_VARARRAYS'. A variable-length array is an array of + automatic storage duration whose length is determined at run time, + when the array is declared. + + -- Macro: AC_C_TYPEOF + If the C compiler supports GCC's `typeof' syntax either directly or + through a different spelling of the keyword (e.g., `__typeof__'), + define `HAVE_TYPEOF'. If the support is available only through a + different spelling, define `typeof' to that spelling. + + -- Macro: AC_C_PROTOTYPES + If function prototypes are understood by the compiler (as + determined by `AC_PROG_CC'), define `PROTOTYPES' and + `__PROTOTYPES'. Defining `__PROTOTYPES' is for the benefit of + header files that cannot use macros that infringe on user name + space. + + This macro is obsolescent, as current C compilers support + prototypes. New programs need not use this macro. + + -- Macro: AC_PROG_GCC_TRADITIONAL + Add `-traditional' to output variable `CC' if using the GNU C + compiler and `ioctl' does not work properly without + `-traditional'. That usually happens when the fixed header files + have not been installed on an old system. + + This macro is obsolescent, since current versions of the GNU C + compiler fix the header files automatically when installed. + + +File: autoconf.info, Node: C++ Compiler, Next: Objective C Compiler, Prev: C Compiler, Up: Compilers and Preprocessors + +5.10.4 C++ Compiler Characteristics +----------------------------------- + + -- Macro: AC_PROG_CXX ([COMPILER-SEARCH-LIST]) + Determine a C++ compiler to use. Check whether the environment + variable `CXX' or `CCC' (in that order) is set; if so, then set + output variable `CXX' to its value. + + Otherwise, if the macro is invoked without an argument, then + search for a C++ compiler under the likely names (first `g++' and + `c++' then other names). If none of those checks succeed, then as + a last resort set `CXX' to `g++'. + + This macro may, however, be invoked with an optional first argument + which, if specified, must be a blank-separated list of C++ + compilers to search for. This just gives the user an opportunity + to specify an alternative search list for the C++ compiler. For + example, if you didn't like the default order, then you could + invoke `AC_PROG_CXX' like this: + + AC_PROG_CXX([gcc cl KCC CC cxx cc++ xlC aCC c++ g++]) + + If using the GNU C++ compiler, set shell variable `GXX' to `yes'. + If output variable `CXXFLAGS' was not already set, set it to `-g + -O2' for the GNU C++ compiler (`-O2' on systems where G++ does not + accept `-g'), or `-g' for other compilers. If your package does + not like this default, then it is acceptable to insert the line `: + ${CXXFLAGS=""}' after `AC_INIT' and before `AC_PROG_CXX' to select + an empty default instead. + + + -- Macro: AC_PROG_CXXCPP + Set output variable `CXXCPP' to a command that runs the C++ + preprocessor. If `$CXX -E' doesn't work, `/lib/cpp' is used. It + is portable to run `CXXCPP' only on files with a `.c', `.C', + `.cc', or `.cpp' extension. + + Some preprocessors don't indicate missing include files by the + error status. For such preprocessors an internal variable is set + that causes other macros to check the standard error from the + preprocessor and consider the test failed if any warnings have + been reported. However, it is not known whether such broken + preprocessors exist for C++. + + -- Macro: AC_PROG_CXX_C_O + Test whether the C++ compiler accepts the options `-c' and `-o' + simultaneously, and define `CXX_NO_MINUS_C_MINUS_O', if it does + not. + + +File: autoconf.info, Node: Objective C Compiler, Next: Objective C++ Compiler, Prev: C++ Compiler, Up: Compilers and Preprocessors + +5.10.5 Objective C Compiler Characteristics +------------------------------------------- + + -- Macro: AC_PROG_OBJC ([COMPILER-SEARCH-LIST]) + Determine an Objective C compiler to use. If `OBJC' is not already + set in the environment, check for Objective C compilers. Set + output variable `OBJC' to the name of the compiler found. + + This macro may, however, be invoked with an optional first argument + which, if specified, must be a blank-separated list of Objective C + compilers to search for. This just gives the user an opportunity + to specify an alternative search list for the Objective C + compiler. For example, if you didn't like the default order, then + you could invoke `AC_PROG_OBJC' like this: + + AC_PROG_OBJC([gcc objcc objc]) + + If using the GNU Objective C compiler, set shell variable `GOBJC' + to `yes'. If output variable `OBJCFLAGS' was not already set, set + it to `-g -O2' for the GNU Objective C compiler (`-O2' on systems + where `gcc' does not accept `-g'), or `-g' for other compilers. + + -- Macro: AC_PROG_OBJCPP + Set output variable `OBJCPP' to a command that runs the Objective C + preprocessor. If `$OBJC -E' doesn't work, `/lib/cpp' is used. + + +File: autoconf.info, Node: Objective C++ Compiler, Next: Erlang Compiler and Interpreter, Prev: Objective C Compiler, Up: Compilers and Preprocessors + +5.10.6 Objective C++ Compiler Characteristics +--------------------------------------------- + + -- Macro: AC_PROG_OBJCXX ([COMPILER-SEARCH-LIST]) + Determine an Objective C++ compiler to use. If `OBJCXX' is not + already set in the environment, check for Objective C++ compilers. + Set output variable `OBJCXX' to the name of the compiler found. + + This macro may, however, be invoked with an optional first argument + which, if specified, must be a blank-separated list of Objective + C++ compilers to search for. This just gives the user an + opportunity to specify an alternative search list for the + Objective C++ compiler. For example, if you didn't like the + default order, then you could invoke `AC_PROG_OBJCXX' like this: + + AC_PROG_OBJCXX([gcc g++ objcc++ objcxx]) + + If using the GNU Objective C++ compiler, set shell variable + `GOBJCXX' to `yes'. If output variable `OBJCXXFLAGS' was not + already set, set it to `-g -O2' for the GNU Objective C++ compiler + (`-O2' on systems where `gcc' does not accept `-g'), or `-g' for + other compilers. + + -- Macro: AC_PROG_OBJCXXCPP + Set output variable `OBJCXXCPP' to a command that runs the + Objective C++ preprocessor. If `$OBJCXX -E' doesn't work, + `/lib/cpp' is used. + + +File: autoconf.info, Node: Erlang Compiler and Interpreter, Next: Fortran Compiler, Prev: Objective C++ Compiler, Up: Compilers and Preprocessors + +5.10.7 Erlang Compiler and Interpreter Characteristics +------------------------------------------------------ + +Autoconf defines the following macros for determining paths to the +essential Erlang/OTP programs: + + -- Macro: AC_ERLANG_PATH_ERLC ([VALUE-IF-NOT-FOUND], [PATH = `$PATH']) + Determine an Erlang compiler to use. If `ERLC' is not already set + in the environment, check for `erlc'. Set output variable `ERLC' + to the complete path of the compiler command found. In addition, + if `ERLCFLAGS' is not set in the environment, set it to an empty + value. + + The two optional arguments have the same meaning as the two last + arguments of macro `AC_PATH_PROG' for looking for the `erlc' + program. For example, to look for `erlc' only in the + `/usr/lib/erlang/bin' directory: + + AC_ERLANG_PATH_ERLC([not found], [/usr/lib/erlang/bin]) + + -- Macro: AC_ERLANG_NEED_ERLC ([PATH = `$PATH']) + A simplified variant of the `AC_ERLANG_PATH_ERLC' macro, that + prints an error message and exits the `configure' script if the + `erlc' program is not found. + + -- Macro: AC_ERLANG_PATH_ERL ([VALUE-IF-NOT-FOUND], [PATH = `$PATH']) + Determine an Erlang interpreter to use. If `ERL' is not already + set in the environment, check for `erl'. Set output variable + `ERL' to the complete path of the interpreter command found. + + The two optional arguments have the same meaning as the two last + arguments of macro `AC_PATH_PROG' for looking for the `erl' + program. For example, to look for `erl' only in the + `/usr/lib/erlang/bin' directory: + + AC_ERLANG_PATH_ERL([not found], [/usr/lib/erlang/bin]) + + -- Macro: AC_ERLANG_NEED_ERL ([PATH = `$PATH']) + A simplified variant of the `AC_ERLANG_PATH_ERL' macro, that + prints an error message and exits the `configure' script if the + `erl' program is not found. + + +File: autoconf.info, Node: Fortran Compiler, Next: Go Compiler, Prev: Erlang Compiler and Interpreter, Up: Compilers and Preprocessors + +5.10.8 Fortran Compiler Characteristics +--------------------------------------- + +The Autoconf Fortran support is divided into two categories: legacy +Fortran 77 macros (`F77'), and modern Fortran macros (`FC'). The +former are intended for traditional Fortran 77 code, and have output +variables like `F77', `FFLAGS', and `FLIBS'. The latter are for newer +programs that can (or must) compile under the newer Fortran standards, +and have output variables like `FC', `FCFLAGS', and `FCLIBS'. + + Except for the macros `AC_FC_SRCEXT', `AC_FC_FREEFORM', +`AC_FC_FIXEDFORM', and `AC_FC_LINE_LENGTH' (see below), the `FC' and +`F77' macros behave almost identically, and so they are documented +together in this section. + + -- Macro: AC_PROG_F77 ([COMPILER-SEARCH-LIST]) + Determine a Fortran 77 compiler to use. If `F77' is not already + set in the environment, then check for `g77' and `f77', and then + some other names. Set the output variable `F77' to the name of + the compiler found. + + This macro may, however, be invoked with an optional first argument + which, if specified, must be a blank-separated list of Fortran 77 + compilers to search for. This just gives the user an opportunity + to specify an alternative search list for the Fortran 77 compiler. + For example, if you didn't like the default order, then you could + invoke `AC_PROG_F77' like this: + + AC_PROG_F77([fl32 f77 fort77 xlf g77 f90 xlf90]) + + If using `g77' (the GNU Fortran 77 compiler), then set the shell + variable `G77' to `yes'. If the output variable `FFLAGS' was not + already set in the environment, then set it to `-g -02' for `g77' + (or `-O2' where `g77' does not accept `-g'). Otherwise, set + `FFLAGS' to `-g' for all other Fortran 77 compilers. + + The result of the GNU test is cached in the + `ac_cv_f77_compiler_gnu' variable, acceptance of `-g' in the + `ac_cv_prog_f77_g' variable. + + -- Macro: AC_PROG_FC ([COMPILER-SEARCH-LIST], [DIALECT]) + Determine a Fortran compiler to use. If `FC' is not already set in + the environment, then `dialect' is a hint to indicate what Fortran + dialect to search for; the default is to search for the newest + available dialect. Set the output variable `FC' to the name of + the compiler found. + + By default, newer dialects are preferred over older dialects, but + if `dialect' is specified then older dialects are preferred + starting with the specified dialect. `dialect' can currently be + one of Fortran 77, Fortran 90, or Fortran 95. However, this is + only a hint of which compiler _name_ to prefer (e.g., `f90' or + `f95'), and no attempt is made to guarantee that a particular + language standard is actually supported. Thus, it is preferable + that you avoid the `dialect' option, and use AC_PROG_FC only for + code compatible with the latest Fortran standard. + + This macro may, alternatively, be invoked with an optional first + argument which, if specified, must be a blank-separated list of + Fortran compilers to search for, just as in `AC_PROG_F77'. + + If using `gfortran' or `g77' (the GNU Fortran compilers), then set + the shell variable `GFC' to `yes'. If the output variable + `FCFLAGS' was not already set in the environment, then set it to + `-g -02' for GNU `g77' (or `-O2' where `g77' does not accept + `-g'). Otherwise, set `FCFLAGS' to `-g' for all other Fortran + compilers. + + The result of the GNU test is cached in the `ac_cv_fc_compiler_gnu' + variable, acceptance of `-g' in the `ac_cv_prog_fc_g' variable. + + -- Macro: AC_PROG_F77_C_O + -- Macro: AC_PROG_FC_C_O + Test whether the Fortran compiler accepts the options `-c' and + `-o' simultaneously, and define `F77_NO_MINUS_C_MINUS_O' or + `FC_NO_MINUS_C_MINUS_O', respectively, if it does not. + + The result of the test is cached in the `ac_cv_prog_f77_c_o' or + `ac_cv_prog_fc_c_o' variable, respectively. + + The following macros check for Fortran compiler characteristics. To +check for characteristics not listed here, use `AC_COMPILE_IFELSE' +(*note Running the Compiler::) or `AC_RUN_IFELSE' (*note Runtime::), +making sure to first set the current language to Fortran 77 or Fortran +via `AC_LANG([Fortran 77])' or `AC_LANG(Fortran)' (*note Language +Choice::). + + -- Macro: AC_F77_LIBRARY_LDFLAGS + -- Macro: AC_FC_LIBRARY_LDFLAGS + Determine the linker flags (e.g., `-L' and `-l') for the "Fortran + intrinsic and runtime libraries" that are required to successfully + link a Fortran program or shared library. The output variable + `FLIBS' or `FCLIBS' is set to these flags (which should be + included after `LIBS' when linking). + + This macro is intended to be used in those situations when it is + necessary to mix, e.g., C++ and Fortran source code in a single + program or shared library (*note Mixing Fortran 77 With C and C++: + (automake)Mixing Fortran 77 With C and C++.). + + For example, if object files from a C++ and Fortran compiler must + be linked together, then the C++ compiler/linker must be used for + linking (since special C++-ish things need to happen at link time + like calling global constructors, instantiating templates, + enabling exception support, etc.). + + However, the Fortran intrinsic and runtime libraries must be + linked in as well, but the C++ compiler/linker doesn't know by + default how to add these Fortran 77 libraries. Hence, this macro + was created to determine these Fortran libraries. + + The macros `AC_F77_DUMMY_MAIN' and `AC_FC_DUMMY_MAIN' or + `AC_F77_MAIN' and `AC_FC_MAIN' are probably also necessary to link + C/C++ with Fortran; see below. Further, it is highly recommended + that you use `AC_CONFIG_HEADERS' (*note Configuration Headers::) + because the complex defines that the function wrapper macros create + may not work with C/C++ compiler drivers. + + These macros internally compute the flag needed to verbose linking + output and cache it in `ac_cv_prog_f77_v' or `ac_cv_prog_fc_v' + variables, respectively. The computed linker flags are cached in + `ac_cv_f77_libs' or `ac_cv_fc_libs', respectively. + + -- Macro: AC_F77_DUMMY_MAIN ([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND = + `AC_MSG_FAILURE']) + -- Macro: AC_FC_DUMMY_MAIN ([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND = + `AC_MSG_FAILURE']) + With many compilers, the Fortran libraries detected by + `AC_F77_LIBRARY_LDFLAGS' or `AC_FC_LIBRARY_LDFLAGS' provide their + own `main' entry function that initializes things like Fortran + I/O, and which then calls a user-provided entry function named + (say) `MAIN__' to run the user's program. The `AC_F77_DUMMY_MAIN' + and `AC_FC_DUMMY_MAIN' or `AC_F77_MAIN' and `AC_FC_MAIN' macros + figure out how to deal with this interaction. + + When using Fortran for purely numerical functions (no I/O, etc.) + often one prefers to provide one's own `main' and skip the Fortran + library initializations. In this case, however, one may still + need to provide a dummy `MAIN__' routine in order to prevent + linking errors on some systems. `AC_F77_DUMMY_MAIN' or + `AC_FC_DUMMY_MAIN' detects whether any such routine is _required_ + for linking, and what its name is; the shell variable + `F77_DUMMY_MAIN' or `FC_DUMMY_MAIN' holds this name, `unknown' + when no solution was found, and `none' when no such dummy main is + needed. + + By default, ACTION-IF-FOUND defines `F77_DUMMY_MAIN' or + `FC_DUMMY_MAIN' to the name of this routine (e.g., `MAIN__') _if_ + it is required. ACTION-IF-NOT-FOUND defaults to exiting with an + error. + + In order to link with Fortran routines, the user's C/C++ program + should then include the following code to define the dummy main if + it is needed: + + #ifdef F77_DUMMY_MAIN + # ifdef __cplusplus + extern "C" + # endif + int F77_DUMMY_MAIN () { return 1; } + #endif + + (Replace `F77' with `FC' for Fortran instead of Fortran 77.) + + Note that this macro is called automatically from `AC_F77_WRAPPERS' + or `AC_FC_WRAPPERS'; there is generally no need to call it + explicitly unless one wants to change the default actions. + + The result of this macro is cached in the `ac_cv_f77_dummy_main' or + `ac_cv_fc_dummy_main' variable, respectively. + + -- Macro: AC_F77_MAIN + -- Macro: AC_FC_MAIN + As discussed above, many Fortran libraries allow you to provide an + entry point called (say) `MAIN__' instead of the usual `main', + which is then called by a `main' function in the Fortran libraries + that initializes things like Fortran I/O. The `AC_F77_MAIN' and + `AC_FC_MAIN' macros detect whether it is _possible_ to utilize + such an alternate main function, and defines `F77_MAIN' and + `FC_MAIN' to the name of the function. (If no alternate main + function name is found, `F77_MAIN' and `FC_MAIN' are simply + defined to `main'.) + + Thus, when calling Fortran routines from C that perform things + like I/O, one should use this macro and declare the "main" + function like so: + + #ifdef __cplusplus + extern "C" + #endif + int F77_MAIN (int argc, char *argv[]); + + (Again, replace `F77' with `FC' for Fortran instead of Fortran 77.) + + The result of this macro is cached in the `ac_cv_f77_main' or + `ac_cv_fc_main' variable, respectively. + + -- Macro: AC_F77_WRAPPERS + -- Macro: AC_FC_WRAPPERS + Defines C macros `F77_FUNC (name, NAME)', `FC_FUNC (name, NAME)', + `F77_FUNC_(name, NAME)', and `FC_FUNC_(name, NAME)' to properly + mangle the names of C/C++ identifiers, and identifiers with + underscores, respectively, so that they match the name-mangling + scheme used by the Fortran compiler. + + Fortran is case-insensitive, and in order to achieve this the + Fortran compiler converts all identifiers into a canonical case + and format. To call a Fortran subroutine from C or to write a C + function that is callable from Fortran, the C program must + explicitly use identifiers in the format expected by the Fortran + compiler. In order to do this, one simply wraps all C identifiers + in one of the macros provided by `AC_F77_WRAPPERS' or + `AC_FC_WRAPPERS'. For example, suppose you have the following + Fortran 77 subroutine: + + subroutine foobar (x, y) + double precision x, y + y = 3.14159 * x + return + end + + You would then declare its prototype in C or C++ as: + + #define FOOBAR_F77 F77_FUNC (foobar, FOOBAR) + #ifdef __cplusplus + extern "C" /* prevent C++ name mangling */ + #endif + void FOOBAR_F77 (double *x, double *y); + + Note that we pass both the lowercase and uppercase versions of the + function name to `F77_FUNC' so that it can select the right one. + Note also that all parameters to Fortran 77 routines are passed as + pointers (*note Mixing Fortran 77 With C and C++: (automake)Mixing + Fortran 77 With C and C++.). + + (Replace `F77' with `FC' for Fortran instead of Fortran 77.) + + Although Autoconf tries to be intelligent about detecting the + name-mangling scheme of the Fortran compiler, there may be Fortran + compilers that it doesn't support yet. In this case, the above + code generates a compile-time error, but some other behavior + (e.g., disabling Fortran-related features) can be induced by + checking whether `F77_FUNC' or `FC_FUNC' is defined. + + Now, to call that routine from a C program, we would do something + like: + + { + double x = 2.7183, y; + FOOBAR_F77 (&x, &y); + } + + If the Fortran identifier contains an underscore (e.g., `foo_bar'), + you should use `F77_FUNC_' or `FC_FUNC_' instead of `F77_FUNC' or + `FC_FUNC' (with the same arguments). This is because some Fortran + compilers mangle names differently if they contain an underscore. + + The name mangling scheme is encoded in the `ac_cv_f77_mangling' or + `ac_cv_fc_mangling' cache variable, respectively, and also used for + the `AC_F77_FUNC' and `AC_FC_FUNC' macros described below. + + -- Macro: AC_F77_FUNC (NAME, [SHELLVAR]) + -- Macro: AC_FC_FUNC (NAME, [SHELLVAR]) + Given an identifier NAME, set the shell variable SHELLVAR to hold + the mangled version NAME according to the rules of the Fortran + linker (see also `AC_F77_WRAPPERS' or `AC_FC_WRAPPERS'). SHELLVAR + is optional; if it is not supplied, the shell variable is simply + NAME. The purpose of this macro is to give the caller a way to + access the name-mangling information other than through the C + preprocessor as above, for example, to call Fortran routines from + some language other than C/C++. + + -- Macro: AC_FC_SRCEXT (EXT, [ACTION-IF-SUCCESS], [ACTION-IF-FAILURE = + `AC_MSG_FAILURE']) + -- Macro: AC_FC_PP_SRCEXT (EXT, [ACTION-IF-SUCCESS], + [ACTION-IF-FAILURE = `AC_MSG_FAILURE']) + By default, the `FC' macros perform their tests using a `.f' + extension for source-code files. Some compilers, however, only + enable newer language features for appropriately named files, + e.g., Fortran 90 features only for `.f90' files, or preprocessing + only with `.F' files or maybe other upper-case extensions. On the + other hand, some other compilers expect all source files to end in + `.f' and require special flags to support other file name + extensions. The `AC_FC_SRCEXT' and `AC_FC_PP_SRCEXT' macros deal + with these issues. + + The `AC_FC_SRCEXT' macro tries to get the `FC' compiler to accept + files ending with the extension `.EXT' (i.e., EXT does _not_ + contain the dot). If any special compiler flags are needed for + this, it stores them in the output variable `FCFLAGS_EXT'. This + extension and these flags are then used for all subsequent `FC' + tests (until `AC_FC_SRCEXT' or `AC_FC_PP_SRCEXT' is called another + time). + + For example, you would use `AC_FC_SRCEXT(f90)' to employ the + `.f90' extension in future tests, and it would set the + `FCFLAGS_f90' output variable with any extra flags that are needed + to compile such files. + + Similarly, the `AC_FC_PP_SRCEXT' macro tries to get the `FC' + compiler to preprocess and compile files with the extension + `.EXT'. When both `fpp' and `cpp' style preprocessing are + provided, the former is preferred, as the latter may treat + continuation lines, `//' tokens, and white space differently from + what some Fortran dialects expect. Conversely, if you do not want + files to be preprocessed, use only lower-case characters in the + file name extension. Like with `AC_FC_SRCEXT(f90)', any needed + flags are stored in the `FCFLAGS_EXT' variable. + + The `FCFLAGS_EXT' flags can _not_ be simply absorbed into + `FCFLAGS', for two reasons based on the limitations of some + compilers. First, only one `FCFLAGS_EXT' can be used at a time, + so files with different extensions must be compiled separately. + Second, `FCFLAGS_EXT' must appear _immediately_ before the + source-code file name when compiling. So, continuing the example + above, you might compile a `foo.f90' file in your makefile with the + command: + + foo.o: foo.f90 + $(FC) -c $(FCFLAGS) $(FCFLAGS_f90) '$(srcdir)/foo.f90' + + If `AC_FC_SRCEXT' or `AC_FC_PP_SRCEXT' succeeds in compiling files + with the EXT extension, it calls ACTION-IF-SUCCESS (defaults to + nothing). If it fails, and cannot find a way to make the `FC' + compiler accept such files, it calls ACTION-IF-FAILURE (defaults + to exiting with an error message). + + The `AC_FC_SRCEXT' and `AC_FC_PP_SRCEXT' macros cache their + results in `ac_cv_fc_srcext_EXT' and `ac_cv_fc_pp_srcext_EXT' + variables, respectively. + + -- Macro: AC_FC_PP_DEFINE ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE = + `AC_MSG_FAILURE']) + Find a flag to specify defines for preprocessed Fortran. Not all + Fortran compilers use `-D'. Substitute `FC_DEFINE' with the + result and call ACTION-IF-SUCCESS (defaults to nothing) if + successful, and ACTION-IF-FAILURE (defaults to failing with an + error message) if not. + + This macro calls `AC_FC_PP_SRCEXT([F])' in order to learn how to + preprocess a `conftest.F' file, but restores a previously used + Fortran source file extension afterwards again. + + The result of this test is cached in the `ac_cv_fc_pp_define' + variable. + + -- Macro: AC_FC_FREEFORM ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE = + `AC_MSG_FAILURE']) + Try to ensure that the Fortran compiler (`$FC') allows free-format + source code (as opposed to the older fixed-format style from + Fortran 77). If necessary, it may add some additional flags to + `FCFLAGS'. + + This macro is most important if you are using the default `.f' + extension, since many compilers interpret this extension as + indicating fixed-format source unless an additional flag is + supplied. If you specify a different extension with + `AC_FC_SRCEXT', such as `.f90', then `AC_FC_FREEFORM' ordinarily + succeeds without modifying `FCFLAGS'. For extensions which the + compiler does not know about, the flag set by the `AC_FC_SRCEXT' + macro might let the compiler assume Fortran 77 by default, however. + + If `AC_FC_FREEFORM' succeeds in compiling free-form source, it + calls ACTION-IF-SUCCESS (defaults to nothing). If it fails, it + calls ACTION-IF-FAILURE (defaults to exiting with an error + message). + + The result of this test, or `none' or `unknown', is cached in the + `ac_cv_fc_freeform' variable. + + -- Macro: AC_FC_FIXEDFORM ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE = + `AC_MSG_FAILURE']) + Try to ensure that the Fortran compiler (`$FC') allows the old + fixed-format source code (as opposed to free-format style). If + necessary, it may add some additional flags to `FCFLAGS'. + + This macro is needed for some compilers alias names like `xlf95' + which assume free-form source code by default, and in case you + want to use fixed-form source with an extension like `.f90' which + many compilers interpret as free-form by default. If you specify + a different extension with `AC_FC_SRCEXT', such as `.f', then + `AC_FC_FIXEDFORM' ordinarily succeeds without modifying `FCFLAGS'. + + If `AC_FC_FIXEDFORM' succeeds in compiling fixed-form source, it + calls ACTION-IF-SUCCESS (defaults to nothing). If it fails, it + calls ACTION-IF-FAILURE (defaults to exiting with an error + message). + + The result of this test, or `none' or `unknown', is cached in the + `ac_cv_fc_fixedform' variable. + + -- Macro: AC_FC_LINE_LENGTH ([LENGTH], [ACTION-IF-SUCCESS], + [ACTION-IF-FAILURE = `AC_MSG_FAILURE']) + Try to ensure that the Fortran compiler (`$FC') accepts long source + code lines. The LENGTH argument may be given as 80, 132, or + unlimited, and defaults to 132. Note that line lengths above 254 + columns are not portable, and some compilers do not accept more + than 132 columns at least for fixed format source. If necessary, + it may add some additional flags to `FCFLAGS'. + + If `AC_FC_LINE_LENGTH' succeeds in compiling fixed-form source, it + calls ACTION-IF-SUCCESS (defaults to nothing). If it fails, it + calls ACTION-IF-FAILURE (defaults to exiting with an error + message). + + The result of this test, or `none' or `unknown', is cached in the + `ac_cv_fc_line_length' variable. + + -- Macro: AC_FC_CHECK_BOUNDS ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE + = `AC_MSG_FAILURE']) + The `AC_FC_CHECK_BOUNDS' macro tries to enable array bounds + checking in the Fortran compiler. If successful, the + ACTION-IF-SUCCESS is called and any needed flags are added to + `FCFLAGS'. Otherwise, ACTION-IF-FAILURE is called, which defaults + to failing with an error message. The macro currently requires + Fortran 90 or a newer dialect. + + The result of the macro is cached in the `ac_cv_fc_check_bounds' + variable. + + -- Macro: AC_F77_IMPLICIT_NONE ([ACTION-IF-SUCCESS], + [ACTION-IF-FAILURE = `AC_MSG_FAILURE']) + -- Macro: AC_FC_IMPLICIT_NONE ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE + = `AC_MSG_FAILURE']) + Try to disallow implicit declarations in the Fortran compiler. If + successful, ACTION-IF-SUCCESS is called and any needed flags are + added to `FFLAGS' or `FCFLAGS', respectively. Otherwise, + ACTION-IF-FAILURE is called, which defaults to failing with an + error message. + + The result of these macros are cached in the + `ac_cv_f77_implicit_none' and `ac_cv_fc_implicit_none' variables, + respectively. + + -- Macro: AC_FC_MODULE_EXTENSION + Find the Fortran 90 module file name extension. Most Fortran 90 + compilers store module information in files separate from the + object files. The module files are usually named after the name + of the module rather than the source file name, with characters + possibly turned to upper case, plus an extension, often `.mod'. + + Not all compilers use module files at all, or by default. The Cray + Fortran compiler requires `-e m' in order to store and search + module information in `.mod' files rather than in object files. + Likewise, the Fujitsu Fortran compilers uses the `-Am' option to + indicate how module information is stored. + + The `AC_FC_MODULE_EXTENSION' macro computes the module extension + without the leading dot, and stores that in the `FC_MODEXT' + variable. If the compiler does not produce module files, or the + extension cannot be determined, `FC_MODEXT' is empty. Typically, + the result of this macro may be used in cleanup `make' rules as + follows: + + clean-modules: + -test -z "$(FC_MODEXT)" || rm -f *.$(FC_MODEXT) + + The extension, or `unknown', is cached in the + `ac_cv_fc_module_ext' variable. + + -- Macro: AC_FC_MODULE_FLAG ([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE = + `AC_MSG_FAILURE']) + Find the compiler flag to include Fortran 90 module information + from another directory, and store that in the `FC_MODINC' variable. + Call ACTION-IF-SUCCESS (defaults to nothing) if successful, and + set `FC_MODINC' to empty and call ACTION-IF-FAILURE (defaults to + exiting with an error message) if not. + + Most Fortran 90 compilers provide a way to specify module + directories. Some have separate flags for the directory to write + module files to, and directories to search them in, whereas others + only allow writing to the current directory or to the first + directory specified in the include path. Further, with some + compilers, the module search path and the preprocessor search path + can only be modified with the same flag. Thus, for portability, + write module files to the current directory only and list that as + first directory in the search path. + + There may be no whitespace between `FC_MODINC' and the following + directory name, but `FC_MODINC' may contain trailing white space. + For example, if you use Automake and would like to search `../lib' + for module files, you can use the following: + + AM_FCFLAGS = $(FC_MODINC). $(FC_MODINC)../lib + + Inside `configure' tests, you can use: + + if test -n "$FC_MODINC"; then + FCFLAGS="$FCFLAGS $FC_MODINC. $FC_MODINC../lib" + fi + + The flag is cached in the `ac_cv_fc_module_flag' variable. The + substituted value of `FC_MODINC' may refer to the `ac_empty' dummy + placeholder empty variable, to avoid losing the significant + trailing whitespace in a `Makefile'. + + -- Macro: AC_FC_MODULE_OUTPUT_FLAG ([ACTION-IF-SUCCESS], + [ACTION-IF-FAILURE = `AC_MSG_FAILURE']) + Find the compiler flag to write Fortran 90 module information to + another directory, and store that in the `FC_MODOUT' variable. + Call ACTION-IF-SUCCESS (defaults to nothing) if successful, and + set `FC_MODOUT' to empty and call ACTION-IF-FAILURE (defaults to + exiting with an error message) if not. + + Not all Fortran 90 compilers write module files, and of those that + do, not all allow writing to a directory other than the current + one, nor do all have separate flags for writing and reading; see + the description of `AC_FC_MODULE_FLAG' above. If you need to be + able to write to another directory, for maximum portability use + `FC_MODOUT' before any `FC_MODINC' and include both the current + directory and the one you write to in the search path: + + AM_FCFLAGS = $(FC_MODOUT)../mod $(FC_MODINC)../mod $(FC_MODINC). ... + + The flag is cached in the `ac_cv_fc_module_output_flag' variable. + The substituted value of `FC_MODOUT' may refer to the `ac_empty' + dummy placeholder empty variable, to avoid losing the significant + trailing whitespace in a `Makefile'. + + +File: autoconf.info, Node: Go Compiler, Prev: Fortran Compiler, Up: Compilers and Preprocessors + +5.10.9 Go Compiler Characteristics +---------------------------------- + +Autoconf provides basic support for the Go programming language when +using the `gccgo' compiler (there is currently no support for the `6g' +and `8g' compilers). + + -- Macro: AC_PROG_GO ([COMPILER-SEARCH-LIST]) + Find the Go compiler to use. Check whether the environment + variable `GOC' is set; if so, then set output variable `GOC' to its + value. + + Otherwise, if the macro is invoked without an argument, then + search for a Go compiler named `gccgo'. If it is not found, then + as a last resort set `GOC' to `gccgo'. + + This macro may be invoked with an optional first argument which, if + specified, must be a blank-separated list of Go compilers to + search for. + + If output variable `GOFLAGS' was not already set, set it to `-g + -O2'. If your package does not like this default, `GOFLAGS' may + be set before `AC_PROG_GO'. + + +File: autoconf.info, Node: System Services, Next: Posix Variants, Prev: Compilers and Preprocessors, Up: Existing Tests + +5.11 System Services +==================== + +The following macros check for operating system services or +capabilities. + + -- Macro: AC_PATH_X + Try to locate the X Window System include files and libraries. If + the user gave the command line options `--x-includes=DIR' and + `--x-libraries=DIR', use those directories. + + If either or both were not given, get the missing values by running + `xmkmf' (or an executable pointed to by the `XMKMF' environment + variable) on a trivial `Imakefile' and examining the makefile that + it produces. Setting `XMKMF' to `false' disables this method. + + If this method fails to find the X Window System, `configure' + looks for the files in several directories where they often reside. + If either method is successful, set the shell variables + `x_includes' and `x_libraries' to their locations, unless they are + in directories the compiler searches by default. + + If both methods fail, or the user gave the command line option + `--without-x', set the shell variable `no_x' to `yes'; otherwise + set it to the empty string. + + -- Macro: AC_PATH_XTRA + An enhanced version of `AC_PATH_X'. It adds the C compiler flags + that X needs to output variable `X_CFLAGS', and the X linker flags + to `X_LIBS'. Define `X_DISPLAY_MISSING' if X is not available. + + This macro also checks for special libraries that some systems + need in order to compile X programs. It adds any that the system + needs to output variable `X_EXTRA_LIBS'. And it checks for + special X11R6 libraries that need to be linked with before + `-lX11', and adds any found to the output variable `X_PRE_LIBS'. + + + -- Macro: AC_SYS_INTERPRETER + Check whether the system supports starting scripts with a line of + the form `#!/bin/sh' to select the interpreter to use for the + script. After running this macro, shell code in `configure.ac' + can check the shell variable `interpval'; it is set to `yes' if + the system supports `#!', `no' if not. + + -- Macro: AC_SYS_LARGEFILE + Arrange for 64-bit file offsets, known as large-file support + (http://www.unix-systems.org/version2/whatsnew/lfs20mar.html). On + some hosts, one must use special compiler options to build + programs that can access large files. Append any such options to + the output variable `CC'. Define `_FILE_OFFSET_BITS' and + `_LARGE_FILES' if necessary. + + Large-file support can be disabled by configuring with the + `--disable-largefile' option. + + If you use this macro, check that your program works even when + `off_t' is wider than `long int', since this is common when + large-file support is enabled. For example, it is not correct to + print an arbitrary `off_t' value `X' with `printf ("%ld", (long + int) X)'. + + The LFS introduced the `fseeko' and `ftello' functions to replace + their C counterparts `fseek' and `ftell' that do not use `off_t'. + Take care to use `AC_FUNC_FSEEKO' to make their prototypes + available when using them and large-file support is enabled. + + -- Macro: AC_SYS_LONG_FILE_NAMES + If the system supports file names longer than 14 characters, define + `HAVE_LONG_FILE_NAMES'. + + -- Macro: AC_SYS_POSIX_TERMIOS + Check to see if the Posix termios headers and functions are + available on the system. If so, set the shell variable + `ac_cv_sys_posix_termios' to `yes'. If not, set the variable to + `no'. + + +File: autoconf.info, Node: Posix Variants, Next: Erlang Libraries, Prev: System Services, Up: Existing Tests + +5.12 Posix Variants +=================== + +The following macro makes it possible to use features of Posix that are +extensions to C, as well as platform extensions not defined by Posix. + + -- Macro: AC_USE_SYSTEM_EXTENSIONS + This macro was introduced in Autoconf 2.60. If possible, enable + extensions to C or Posix on hosts that normally disable the + extensions, typically due to standards-conformance namespace + issues. This should be called before any macros that run the C + compiler. The following preprocessor macros are defined where + appropriate: + + `_GNU_SOURCE' + Enable extensions on GNU/Linux. + + `__EXTENSIONS__' + Enable general extensions on Solaris. + + `_POSIX_PTHREAD_SEMANTICS' + Enable threading extensions on Solaris. + + `_TANDEM_SOURCE' + Enable extensions for the HP NonStop platform. + + `_ALL_SOURCE' + Enable extensions for AIX 3, and for Interix. + + `_POSIX_SOURCE' + Enable Posix functions for Minix. + + `_POSIX_1_SOURCE' + Enable additional Posix functions for Minix. + + `_MINIX' + Identify Minix platform. This particular preprocessor macro + is obsolescent, and may be removed in a future release of + Autoconf. + + +File: autoconf.info, Node: Erlang Libraries, Prev: Posix Variants, Up: Existing Tests + +5.13 Erlang Libraries +===================== + +The following macros check for an installation of Erlang/OTP, and for +the presence of certain Erlang libraries. All those macros require the +configuration of an Erlang interpreter and an Erlang compiler (*note +Erlang Compiler and Interpreter::). + + -- Macro: AC_ERLANG_SUBST_ERTS_VER + Set the output variable `ERLANG_ERTS_VER' to the version of the + Erlang runtime system (as returned by Erlang's + `erlang:system_info(version)' function). The result of this test + is cached if caching is enabled when running `configure'. The + `ERLANG_ERTS_VER' variable is not intended to be used for testing + for features of specific ERTS versions, but to be used for + substituting the ERTS version in Erlang/OTP release resource files + (`.rel' files), as shown below. + + -- Macro: AC_ERLANG_SUBST_ROOT_DIR + Set the output variable `ERLANG_ROOT_DIR' to the path to the base + directory in which Erlang/OTP is installed (as returned by Erlang's + `code:root_dir/0' function). The result of this test is cached if + caching is enabled when running `configure'. + + -- Macro: AC_ERLANG_SUBST_LIB_DIR + Set the output variable `ERLANG_LIB_DIR' to the path of the library + directory of Erlang/OTP (as returned by Erlang's `code:lib_dir/0' + function), which subdirectories each contain an installed + Erlang/OTP library. The result of this test is cached if caching + is enabled when running `configure'. + + -- Macro: AC_ERLANG_CHECK_LIB (LIBRARY, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND]) + Test whether the Erlang/OTP library LIBRARY is installed by + calling Erlang's `code:lib_dir/1' function. The result of this + test is cached if caching is enabled when running `configure'. + ACTION-IF-FOUND is a list of shell commands to run if the library + is installed; ACTION-IF-NOT-FOUND is a list of shell commands to + run if it is not. Additionally, if the library is installed, the + output variable `ERLANG_LIB_DIR_LIBRARY' is set to the path to the + library installation directory, and the output variable + `ERLANG_LIB_VER_LIBRARY' is set to the version number that is part + of the subdirectory name, if it is in the standard form + (`LIBRARY-VERSION'). If the directory name does not have a + version part, `ERLANG_LIB_VER_LIBRARY' is set to the empty string. + If the library is not installed, `ERLANG_LIB_DIR_LIBRARY' and + `ERLANG_LIB_VER_LIBRARY' are set to `"not found"'. For example, + to check if library `stdlib' is installed: + + AC_ERLANG_CHECK_LIB([stdlib], + [echo "stdlib version \"$ERLANG_LIB_VER_stdlib\"" + echo "is installed in \"$ERLANG_LIB_DIR_stdlib\""], + [AC_MSG_ERROR([stdlib was not found!])]) + + The `ERLANG_LIB_VER_LIBRARY' variables (set by + `AC_ERLANG_CHECK_LIB') and the `ERLANG_ERTS_VER' variable (set by + `AC_ERLANG_SUBST_ERTS_VER') are not intended to be used for + testing for features of specific versions of libraries or of the + Erlang runtime system. Those variables are intended to be + substituted in Erlang release resource files (`.rel' files). For + instance, to generate a `example.rel' file for an application + depending on the `stdlib' library, `configure.ac' could contain: + + AC_ERLANG_SUBST_ERTS_VER + AC_ERLANG_CHECK_LIB([stdlib], + [], + [AC_MSG_ERROR([stdlib was not found!])]) + AC_CONFIG_FILES([example.rel]) + + The `example.rel.in' file used to generate `example.rel' should + contain: + + {release, + {"@PACKAGE@", "@VERSION@"}, + {erts, "@ERLANG_ERTS_VER@"}, + [{stdlib, "@ERLANG_LIB_VER_stdlib@"}, + {@PACKAGE@, "@VERSION@"}]}. + + In addition to the above macros, which test installed Erlang +libraries, the following macros determine the paths to the directories +into which newly built Erlang libraries are to be installed: + + -- Macro: AC_ERLANG_SUBST_INSTALL_LIB_DIR + Set the `ERLANG_INSTALL_LIB_DIR' output variable to the directory + into which every built Erlang library should be installed in a + separate subdirectory. If this variable is not set in the + environment when `configure' runs, its default value is + `${libdir}/erlang/lib'. + + -- Macro: AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR (LIBRARY, VERSION) + Set the `ERLANG_INSTALL_LIB_DIR_LIBRARY' output variable to the + directory into which the built Erlang library LIBRARY version + VERSION should be installed. If this variable is not set in the + environment when `configure' runs, its default value is + `$ERLANG_INSTALL_LIB_DIR/LIBRARY-VERSION', the value of the + `ERLANG_INSTALL_LIB_DIR' variable being set by the + `AC_ERLANG_SUBST_INSTALL_LIB_DIR' macro. + + +File: autoconf.info, Node: Writing Tests, Next: Results, Prev: Existing Tests, Up: Top + +6 Writing Tests +*************** + +If the existing feature tests don't do something you need, you have to +write new ones. These macros are the building blocks. They provide +ways for other macros to check whether various kinds of features are +available and report the results. + + This chapter contains some suggestions and some of the reasons why +the existing tests are written the way they are. You can also learn a +lot about how to write Autoconf tests by looking at the existing ones. +If something goes wrong in one or more of the Autoconf tests, this +information can help you understand the assumptions behind them, which +might help you figure out how to best solve the problem. + + These macros check the output of the compiler system of the current +language (*note Language Choice::). They do not cache the results of +their tests for future use (*note Caching Results::), because they don't +know enough about the information they are checking for to generate a +cache variable name. They also do not print any messages, for the same +reason. The checks for particular kinds of features call these macros +and do cache their results and print messages about what they're +checking for. + + When you write a feature test that could be applicable to more than +one software package, the best thing to do is encapsulate it in a new +macro. *Note Writing Autoconf Macros::, for how to do that. + +* Menu: + +* Language Choice:: Selecting which language to use for testing +* Writing Test Programs:: Forging source files for compilers +* Running the Preprocessor:: Detecting preprocessor symbols +* Running the Compiler:: Detecting language or header features +* Running the Linker:: Detecting library features +* Runtime:: Testing for runtime features +* Systemology:: A zoology of operating systems +* Multiple Cases:: Tests for several possible values + + +File: autoconf.info, Node: Language Choice, Next: Writing Test Programs, Up: Writing Tests + +6.1 Language Choice +=================== + +Autoconf-generated `configure' scripts check for the C compiler and its +features by default. Packages that use other programming languages +(maybe more than one, e.g., C and C++) need to test features of the +compilers for the respective languages. The following macros determine +which programming language is used in the subsequent tests in +`configure.ac'. + + -- Macro: AC_LANG (LANGUAGE) + Do compilation tests using the compiler, preprocessor, and file + extensions for the specified LANGUAGE. + + Supported languages are: + + `C' + Do compilation tests using `CC' and `CPP' and use extension + `.c' for test programs. Use compilation flags: `CPPFLAGS' + with `CPP', and both `CPPFLAGS' and `CFLAGS' with `CC'. + + `C++' + Do compilation tests using `CXX' and `CXXCPP' and use + extension `.C' for test programs. Use compilation flags: + `CPPFLAGS' with `CXXCPP', and both `CPPFLAGS' and `CXXFLAGS' + with `CXX'. + + `Fortran 77' + Do compilation tests using `F77' and use extension `.f' for + test programs. Use compilation flags: `FFLAGS'. + + `Fortran' + Do compilation tests using `FC' and use extension `.f' (or + whatever has been set by `AC_FC_SRCEXT') for test programs. + Use compilation flags: `FCFLAGS'. + + `Erlang' + Compile and execute tests using `ERLC' and `ERL' and use + extension `.erl' for test Erlang modules. Use compilation + flags: `ERLCFLAGS'. + + `Objective C' + Do compilation tests using `OBJC' and `OBJCPP' and use + extension `.m' for test programs. Use compilation flags: + `CPPFLAGS' with `OBJCPP', and both `CPPFLAGS' and `OBJCFLAGS' + with `OBJC'. + + `Objective C++' + Do compilation tests using `OBJCXX' and `OBJCXXCPP' and use + extension `.mm' for test programs. Use compilation flags: + `CPPFLAGS' with `OBJCXXCPP', and both `CPPFLAGS' and + `OBJCXXFLAGS' with `OBJCXX'. + + `Go' + Do compilation tests using `GOC' and use extension `.go' for + test programs. Use compilation flags `GOFLAGS'. + + -- Macro: AC_LANG_PUSH (LANGUAGE) + Remember the current language (as set by `AC_LANG') on a stack, and + then select the LANGUAGE. Use this macro and `AC_LANG_POP' in + macros that need to temporarily switch to a particular language. + + -- Macro: AC_LANG_POP ([LANGUAGE]) + Select the language that is saved on the top of the stack, as set + by `AC_LANG_PUSH', and remove it from the stack. + + If given, LANGUAGE specifies the language we just _quit_. It is a + good idea to specify it when it's known (which should be the + case...), since Autoconf detects inconsistencies. + + AC_LANG_PUSH([Fortran 77]) + # Perform some tests on Fortran 77. + # ... + AC_LANG_POP([Fortran 77]) + + -- Macro: AC_LANG_ASSERT (LANGUAGE) + Check statically that the current language is LANGUAGE. You + should use this in your language specific macros to avoid that + they be called with an inappropriate language. + + This macro runs only at `autoconf' time, and incurs no cost at + `configure' time. Sadly enough and because Autoconf is a two + layer language (1), the macros `AC_LANG_PUSH' and `AC_LANG_POP' + cannot be "optimizing", therefore as much as possible you ought to + avoid using them to wrap your code, rather, require from the user + to run the macro with a correct current language, and check it + with `AC_LANG_ASSERT'. And anyway, that may help the user + understand she is running a Fortran macro while expecting a result + about her Fortran 77 compiler... + + -- Macro: AC_REQUIRE_CPP + Ensure that whichever preprocessor would currently be used for + tests has been found. Calls `AC_REQUIRE' (*note Prerequisite + Macros::) with an argument of either `AC_PROG_CPP' or + `AC_PROG_CXXCPP', depending on which language is current. + + ---------- Footnotes ---------- + + (1) Because M4 is not aware of Sh code, especially conditionals, +some optimizations that look nice statically may produce incorrect +results at runtime. + + +File: autoconf.info, Node: Writing Test Programs, Next: Running the Preprocessor, Prev: Language Choice, Up: Writing Tests + +6.2 Writing Test Programs +========================= + +Autoconf tests follow a common scheme: feed some program with some +input, and most of the time, feed a compiler with some source file. +This section is dedicated to these source samples. + +* Menu: + +* Guidelines:: General rules for writing test programs +* Test Functions:: Avoiding pitfalls in test programs +* Generating Sources:: Source program boilerplate + + +File: autoconf.info, Node: Guidelines, Next: Test Functions, Up: Writing Test Programs + +6.2.1 Guidelines for Test Programs +---------------------------------- + +The most important rule to follow when writing testing samples is: + + _Look for realism._ + + This motto means that testing samples must be written with the same +strictness as real programs are written. In particular, you should +avoid "shortcuts" and simplifications. + + Don't just play with the preprocessor if you want to prepare a +compilation. For instance, using `cpp' to check whether a header is +functional might let your `configure' accept a header which causes some +_compiler_ error. Do not hesitate to check a header with other headers +included before, especially required headers. + + Make sure the symbols you use are properly defined, i.e., refrain +from simply declaring a function yourself instead of including the +proper header. + + Test programs should not write to standard output. They should exit +with status 0 if the test succeeds, and with status 1 otherwise, so +that success can be distinguished easily from a core dump or other +failure; segmentation violations and other failures produce a nonzero +exit status. Unless you arrange for `exit' to be declared, test +programs should `return', not `exit', from `main', because on many +systems `exit' is not declared by default. + + Test programs can use `#if' or `#ifdef' to check the values of +preprocessor macros defined by tests that have already run. For +example, if you call `AC_HEADER_STDBOOL', then later on in +`configure.ac' you can have a test program that includes `stdbool.h' +conditionally: + + #ifdef HAVE_STDBOOL_H + # include <stdbool.h> + #endif + + Both `#if HAVE_STDBOOL_H' and `#ifdef HAVE_STDBOOL_H' will work with +any standard C compiler. Some developers prefer `#if' because it is +easier to read, while others prefer `#ifdef' because it avoids +diagnostics with picky compilers like GCC with the `-Wundef' option. + + If a test program needs to use or create a data file, give it a name +that starts with `conftest', such as `conftest.data'. The `configure' +script cleans up by running `rm -f -r conftest*' after running test +programs and if the script is interrupted. + + +File: autoconf.info, Node: Test Functions, Next: Generating Sources, Prev: Guidelines, Up: Writing Test Programs + +6.2.2 Test Functions +-------------------- + +These days it's safe to assume support for function prototypes +(introduced in C89). + + Functions that test programs declare should also be conditionalized +for C++, which requires `extern "C"' prototypes. Make sure to not +include any header files containing clashing prototypes. + + #ifdef __cplusplus + extern "C" + #endif + void *valloc (size_t); + + If a test program calls a function with invalid parameters (just to +see whether it exists), organize the program to ensure that it never +invokes that function. You can do this by calling it in another +function that is never invoked. You can't do it by putting it after a +call to `exit', because GCC version 2 knows that `exit' never returns +and optimizes out any code that follows it in the same block. + + If you include any header files, be sure to call the functions +relevant to them with the correct number of arguments, even if they are +just 0, to avoid compilation errors due to prototypes. GCC version 2 +has internal prototypes for several functions that it automatically +inlines; for example, `memcpy'. To avoid errors when checking for +them, either pass them the correct number of arguments or redeclare them +with a different return type (such as `char'). + + +File: autoconf.info, Node: Generating Sources, Prev: Test Functions, Up: Writing Test Programs + +6.2.3 Generating Sources +------------------------ + +Autoconf provides a set of macros that can be used to generate test +source files. They are written to be language generic, i.e., they +actually depend on the current language (*note Language Choice::) to +"format" the output properly. + + -- Macro: AC_LANG_CONFTEST (SOURCE) + Save the SOURCE text in the current test source file: + `conftest.EXTENSION' where the EXTENSION depends on the current + language. As of Autoconf 2.63b, the source file also contains the + results of all of the `AC_DEFINE' performed so far. + + Note that the SOURCE is evaluated exactly once, like regular + Autoconf macro arguments, and therefore (i) you may pass a macro + invocation, (ii) if not, be sure to double quote if needed. + + This macro issues a warning during `autoconf' processing if SOURCE + does not include an expansion of the macro + `AC_LANG_DEFINES_PROVIDED' (note that both `AC_LANG_SOURCE' and + `AC_LANG_PROGRAM' call this macro, and thus avoid the warning). + + This macro is seldom called directly, but is used under the hood + by more common macros such as `AC_COMPILE_IFELSE' and + `AC_RUN_IFELSE'. + + -- Macro: AC_LANG_DEFINES_PROVIDED + This macro is called as a witness that the file + `conftest.EXTENSION' appropriate for the current language is + complete, including all previously determined results from + `AC_DEFINE'. This macro is seldom called directly, but exists if + you have a compelling reason to write a conftest file without using + `AC_LANG_SOURCE', yet still want to avoid a syntax warning from + `AC_LANG_CONFTEST'. + + -- Macro: AC_LANG_SOURCE (SOURCE) + Expands into the SOURCE, with the definition of all the + `AC_DEFINE' performed so far. This macro includes an expansion of + `AC_LANG_DEFINES_PROVIDED'. + + In many cases, you may find it more convenient to use the wrapper + `AC_LANG_PROGRAM'. + + For instance, executing (observe the double quotation!): + + AC_INIT([Hello], [1.0], [bug-hello@example.org], [], + [http://www.example.org/]) + AC_DEFINE([HELLO_WORLD], ["Hello, World\n"], + [Greetings string.]) + AC_LANG([C]) + AC_LANG_CONFTEST( + [AC_LANG_SOURCE([[const char hw[] = "Hello, World\n";]])]) + gcc -E -dD conftest.c + +on a system with `gcc' installed, results in: + + ... + # 1 "conftest.c" + + #define PACKAGE_NAME "Hello" + #define PACKAGE_TARNAME "hello" + #define PACKAGE_VERSION "1.0" + #define PACKAGE_STRING "Hello 1.0" + #define PACKAGE_BUGREPORT "bug-hello@example.org" + #define PACKAGE_URL "http://www.example.org/" + #define HELLO_WORLD "Hello, World\n" + + const char hw[] = "Hello, World\n"; + + When the test language is Fortran, Erlang, or Go, the `AC_DEFINE' +definitions are not automatically translated into constants in the +source code by this macro. + + -- Macro: AC_LANG_PROGRAM (PROLOGUE, BODY) + Expands into a source file which consists of the PROLOGUE, and + then BODY as body of the main function (e.g., `main' in C). Since + it uses `AC_LANG_SOURCE', the features of the latter are available. + + For instance: + + AC_INIT([Hello], [1.0], [bug-hello@example.org], [], + [http://www.example.org/]) + AC_DEFINE([HELLO_WORLD], ["Hello, World\n"], + [Greetings string.]) + AC_LANG_CONFTEST( + [AC_LANG_PROGRAM([[const char hw[] = "Hello, World\n";]], + [[fputs (hw, stdout);]])]) + gcc -E -dD conftest.c + +on a system with `gcc' installed, results in: + + ... + # 1 "conftest.c" + + #define PACKAGE_NAME "Hello" + #define PACKAGE_TARNAME "hello" + #define PACKAGE_VERSION "1.0" + #define PACKAGE_STRING "Hello 1.0" + #define PACKAGE_BUGREPORT "bug-hello@example.org" + #define PACKAGE_URL "http://www.example.org/" + #define HELLO_WORLD "Hello, World\n" + + const char hw[] = "Hello, World\n"; + int + main () + { + fputs (hw, stdout); + ; + return 0; + } + + In Erlang tests, the created source file is that of an Erlang module +called `conftest' (`conftest.erl'). This module defines and exports at +least one `start/0' function, which is called to perform the test. The +PROLOGUE is optional code that is inserted between the module header and +the `start/0' function definition. BODY is the body of the `start/0' +function without the final period (*note Runtime::, about constraints +on this function's behavior). + + For instance: + + AC_INIT([Hello], [1.0], [bug-hello@example.org]) + AC_LANG(Erlang) + AC_LANG_CONFTEST( + [AC_LANG_PROGRAM([[-define(HELLO_WORLD, "Hello, world!").]], + [[io:format("~s~n", [?HELLO_WORLD])]])]) + cat conftest.erl + +results in: + + -module(conftest). + -export([start/0]). + -define(HELLO_WORLD, "Hello, world!"). + start() -> + io:format("~s~n", [?HELLO_WORLD]) + . + + -- Macro: AC_LANG_CALL (PROLOGUE, FUNCTION) + Expands into a source file which consists of the PROLOGUE, and + then a call to the FUNCTION as body of the main function (e.g., + `main' in C). Since it uses `AC_LANG_PROGRAM', the feature of the + latter are available. + + This function will probably be replaced in the future by a version + which would enable specifying the arguments. The use of this + macro is not encouraged, as it violates strongly the typing system. + + This macro cannot be used for Erlang tests. + + -- Macro: AC_LANG_FUNC_LINK_TRY (FUNCTION) + Expands into a source file which uses the FUNCTION in the body of + the main function (e.g., `main' in C). Since it uses + `AC_LANG_PROGRAM', the features of the latter are available. + + As `AC_LANG_CALL', this macro is documented only for completeness. + It is considered to be severely broken, and in the future will be + removed in favor of actual function calls (with properly typed + arguments). + + This macro cannot be used for Erlang tests. + + +File: autoconf.info, Node: Running the Preprocessor, Next: Running the Compiler, Prev: Writing Test Programs, Up: Writing Tests + +6.3 Running the Preprocessor +============================ + +Sometimes one might need to run the preprocessor on some source file. +_Usually it is a bad idea_, as you typically need to _compile_ your +project, not merely run the preprocessor on it; therefore you certainly +want to run the compiler, not the preprocessor. Resist the temptation +of following the easiest path. + + Nevertheless, if you need to run the preprocessor, then use +`AC_PREPROC_IFELSE'. + + The macros described in this section cannot be used for tests in +Erlang, Fortran, or Go, since those languages require no preprocessor. + + -- Macro: AC_PREPROC_IFELSE (INPUT, [ACTION-IF-TRUE], + [ACTION-IF-FALSE]) + Run the preprocessor of the current language (*note Language + Choice::) on the INPUT, run the shell commands ACTION-IF-TRUE on + success, ACTION-IF-FALSE otherwise. The INPUT can be made by + `AC_LANG_PROGRAM' and friends. + + This macro uses `CPPFLAGS', but not `CFLAGS', because `-g', `-O', + etc. are not valid options to many C preprocessors. + + It is customary to report unexpected failures with + `AC_MSG_FAILURE'. If needed, ACTION-IF-TRUE can further access + the preprocessed output in the file `conftest.i'. + + For instance: + + AC_INIT([Hello], [1.0], [bug-hello@example.org]) + AC_DEFINE([HELLO_WORLD], ["Hello, World\n"], + [Greetings string.]) + AC_PREPROC_IFELSE( + [AC_LANG_PROGRAM([[const char hw[] = "Hello, World\n";]], + [[fputs (hw, stdout);]])], + [AC_MSG_RESULT([OK])], + [AC_MSG_FAILURE([unexpected preprocessor failure])]) + +results in: + + checking for gcc... gcc + checking for C compiler default output file name... a.out + checking whether the C compiler works... yes + checking whether we are cross compiling... no + checking for suffix of executables... + checking for suffix of object files... o + checking whether we are using the GNU C compiler... yes + checking whether gcc accepts -g... yes + checking for gcc option to accept ISO C89... none needed + checking how to run the C preprocessor... gcc -E + OK + + + The macro `AC_TRY_CPP' (*note Obsolete Macros::) used to play the +role of `AC_PREPROC_IFELSE', but double quotes its argument, making it +impossible to use it to elaborate sources. You are encouraged to get +rid of your old use of the macro `AC_TRY_CPP' in favor of +`AC_PREPROC_IFELSE', but, in the first place, are you sure you need to +run the _preprocessor_ and not the compiler? + + -- Macro: AC_EGREP_HEADER (PATTERN, HEADER-FILE, ACTION-IF-FOUND, + [ACTION-IF-NOT-FOUND]) + If the output of running the preprocessor on the system header file + HEADER-FILE matches the extended regular expression PATTERN, + execute shell commands ACTION-IF-FOUND, otherwise execute + ACTION-IF-NOT-FOUND. + + -- Macro: AC_EGREP_CPP (PATTERN, PROGRAM, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND]) + PROGRAM is the text of a C or C++ program, on which shell + variable, back quote, and backslash substitutions are performed. + If the output of running the preprocessor on PROGRAM matches the + extended regular expression PATTERN, execute shell commands + ACTION-IF-FOUND, otherwise execute ACTION-IF-NOT-FOUND. + + +File: autoconf.info, Node: Running the Compiler, Next: Running the Linker, Prev: Running the Preprocessor, Up: Writing Tests + +6.4 Running the Compiler +======================== + +To check for a syntax feature of the current language's (*note Language +Choice::) compiler, such as whether it recognizes a certain keyword, or +simply to try some library feature, use `AC_COMPILE_IFELSE' to try to +compile a small program that uses that feature. + + -- Macro: AC_COMPILE_IFELSE (INPUT, [ACTION-IF-TRUE], + [ACTION-IF-FALSE]) + Run the compiler and compilation flags of the current language + (*note Language Choice::) on the INPUT, run the shell commands + ACTION-IF-TRUE on success, ACTION-IF-FALSE otherwise. The INPUT + can be made by `AC_LANG_PROGRAM' and friends. + + It is customary to report unexpected failures with + `AC_MSG_FAILURE'. This macro does not try to link; use + `AC_LINK_IFELSE' if you need to do that (*note Running the + Linker::). If needed, ACTION-IF-TRUE can further access the + just-compiled object file `conftest.$OBJEXT'. + + This macro uses `AC_REQUIRE' for the compiler associated with the + current language, which means that if the compiler has not yet been + determined, the compiler determination will be made prior to the + body of the outermost `AC_DEFUN' macro that triggered this macro to + expand (*note Expanded Before Required::). + + For tests in Erlang, the INPUT must be the source code of a module +named `conftest'. `AC_COMPILE_IFELSE' generates a `conftest.beam' file +that can be interpreted by the Erlang virtual machine (`ERL'). It is +recommended to use `AC_LANG_PROGRAM' to specify the test program, to +ensure that the Erlang module has the right name. + + +File: autoconf.info, Node: Running the Linker, Next: Runtime, Prev: Running the Compiler, Up: Writing Tests + +6.5 Running the Linker +====================== + +To check for a library, a function, or a global variable, Autoconf +`configure' scripts try to compile and link a small program that uses +it. This is unlike Metaconfig, which by default uses `nm' or `ar' on +the C library to try to figure out which functions are available. +Trying to link with the function is usually a more reliable approach +because it avoids dealing with the variations in the options and output +formats of `nm' and `ar' and in the location of the standard libraries. +It also allows configuring for cross-compilation or checking a +function's runtime behavior if needed. On the other hand, it can be +slower than scanning the libraries once, but accuracy is more important +than speed. + + `AC_LINK_IFELSE' is used to compile test programs to test for +functions and global variables. It is also used by `AC_CHECK_LIB' to +check for libraries (*note Libraries::), by adding the library being +checked for to `LIBS' temporarily and trying to link a small program. + + -- Macro: AC_LINK_IFELSE (INPUT, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) + Run the compiler (and compilation flags) and the linker of the + current language (*note Language Choice::) on the INPUT, run the + shell commands ACTION-IF-TRUE on success, ACTION-IF-FALSE + otherwise. The INPUT can be made by `AC_LANG_PROGRAM' and + friends. If needed, ACTION-IF-TRUE can further access the + just-linked program file `conftest$EXEEXT'. + + `LDFLAGS' and `LIBS' are used for linking, in addition to the + current compilation flags. + + It is customary to report unexpected failures with + `AC_MSG_FAILURE'. This macro does not try to execute the program; + use `AC_RUN_IFELSE' if you need to do that (*note Runtime::). + + The `AC_LINK_IFELSE' macro cannot be used for Erlang tests, since +Erlang programs are interpreted and do not require linking. + + +File: autoconf.info, Node: Runtime, Next: Systemology, Prev: Running the Linker, Up: Writing Tests + +6.6 Checking Runtime Behavior +============================= + +Sometimes you need to find out how a system performs at runtime, such +as whether a given function has a certain capability or bug. If you +can, make such checks when your program runs instead of when it is +configured. You can check for things like the machine's endianness when +your program initializes itself. + + If you really need to test for a runtime behavior while configuring, +you can write a test program to determine the result, and compile and +run it using `AC_RUN_IFELSE'. Avoid running test programs if possible, +because this prevents people from configuring your package for +cross-compiling. + + -- Macro: AC_RUN_IFELSE (INPUT, [ACTION-IF-TRUE], [ACTION-IF-FALSE], + [ACTION-IF-CROSS-COMPILING = `AC_MSG_FAILURE']) + Run the compiler (and compilation flags) and the linker of the + current language (*note Language Choice::) on the INPUT, then + execute the resulting program. If the program returns an exit + status of 0 when executed, run shell commands ACTION-IF-TRUE. + Otherwise, run shell commands ACTION-IF-FALSE. + + The INPUT can be made by `AC_LANG_PROGRAM' and friends. `LDFLAGS' + and `LIBS' are used for linking, in addition to the compilation + flags of the current language (*note Language Choice::). + Additionally, ACTION-IF-TRUE can run `./conftest$EXEEXT' for + further testing. + + In the ACTION-IF-FALSE section, the failing exit status is + available in the shell variable `$?'. This exit status might be + that of a failed compilation, or it might be that of a failed + program execution. + + If cross-compilation mode is enabled (this is the case if either + the compiler being used does not produce executables that run on + the system where `configure' is being run, or if the options + `--build' and `--host' were both specified and their values are + different), then the test program is not run. If the optional + shell commands ACTION-IF-CROSS-COMPILING are given, those commands + are run instead; typically these commands provide pessimistic + defaults that allow cross-compilation to work even if the guess + was wrong. If the fourth argument is empty or omitted, but + cross-compilation is detected, then `configure' prints an error + message and exits. If you want your package to be useful in a + cross-compilation scenario, you _should_ provide a non-empty + ACTION-IF-CROSS-COMPILING clause, as well as wrap the + `AC_RUN_IFELSE' compilation inside an `AC_CACHE_CHECK' (*note + Caching Results::) which allows the user to override the + pessimistic default if needed. + + It is customary to report unexpected failures with + `AC_MSG_FAILURE'. + + `autoconf' prints a warning message when creating `configure' each +time it encounters a call to `AC_RUN_IFELSE' with no +ACTION-IF-CROSS-COMPILING argument given. If you are not concerned +about users configuring your package for cross-compilation, you may +ignore the warning. A few of the macros distributed with Autoconf +produce this warning message; but if this is a problem for you, please +report it as a bug, along with an appropriate pessimistic guess to use +instead. + + To configure for cross-compiling you can also choose a value for +those parameters based on the canonical system name (*note Manual +Configuration::). Alternatively, set up a test results cache file with +the correct values for the host system (*note Caching Results::). + + To provide a default for calls of `AC_RUN_IFELSE' that are embedded +in other macros, including a few of the ones that come with Autoconf, +you can test whether the shell variable `cross_compiling' is set to +`yes', and then use an alternate method to get the results instead of +calling the macros. + + It is also permissible to temporarily assign to `cross_compiling' in +order to force tests to behave as though they are in a +cross-compilation environment, particularly since this provides a way to +test your ACTION-IF-CROSS-COMPILING even when you are not using a +cross-compiler. + + # We temporarily set cross-compile mode to force AC_COMPUTE_INT + # to use the slow link-only method + save_cross_compiling=$cross_compiling + cross_compiling=yes + AC_COMPUTE_INT([...]) + cross_compiling=$save_cross_compiling + + A C or C++ runtime test should be portable. *Note Portable C and +C++::. + + Erlang tests must exit themselves the Erlang VM by calling the +`halt/1' function: the given status code is used to determine the +success of the test (status is `0') or its failure (status is different +than `0'), as explained above. It must be noted that data output +through the standard output (e.g., using `io:format/2') may be +truncated when halting the VM. Therefore, if a test must output +configuration information, it is recommended to create and to output +data into the temporary file named `conftest.out', using the functions +of module `file'. The `conftest.out' file is automatically deleted by +the `AC_RUN_IFELSE' macro. For instance, a simplified implementation +of Autoconf's `AC_ERLANG_SUBST_LIB_DIR' macro is: + + AC_INIT([LibdirTest], [1.0], [bug-libdirtest@example.org]) + AC_ERLANG_NEED_ERL + AC_LANG(Erlang) + AC_RUN_IFELSE( + [AC_LANG_PROGRAM([], [dnl + file:write_file("conftest.out", code:lib_dir()), + halt(0)])], + [echo "code:lib_dir() returned: `cat conftest.out`"], + [AC_MSG_FAILURE([test Erlang program execution failed])]) + + +File: autoconf.info, Node: Systemology, Next: Multiple Cases, Prev: Runtime, Up: Writing Tests + +6.7 Systemology +=============== + +This section aims at presenting some systems and pointers to +documentation. It may help you addressing particular problems reported +by users. + + Posix-conforming systems (http://www.opengroup.org/susv3) are +derived from the Unix operating system +(http://www.bell-labs.com/history/unix/). + + The Rosetta Stone for Unix (http://bhami.com/rosetta.html) contains +a table correlating the features of various Posix-conforming systems. +Unix History (http://www.levenez.com/unix/) is a simplified diagram of +how many Unix systems were derived from each other. + + The Heirloom Project (http://heirloom.sourceforge.net/) provides +some variants of traditional implementations of Unix utilities. + +Darwin + Darwin is also known as Mac OS X. Beware that the file system + _can_ be case-preserving, but case insensitive. This can cause + nasty problems, since for instance the installation attempt for a + package having an `INSTALL' file can result in `make install' + report that nothing was to be done! + + That's all dependent on whether the file system is a UFS (case + sensitive) or HFS+ (case preserving). By default Apple wants you + to install the OS on HFS+. Unfortunately, there are some pieces of + software which really need to be built on UFS. We may want to + rebuild Darwin to have both UFS and HFS+ available (and put the + /local/build tree on the UFS). + +QNX 4.25 + QNX is a realtime operating system running on Intel architecture + meant to be scalable from the small embedded systems to the hundred + processor super-computer. It claims to be Posix certified. More + information is available on the QNX home page + (http://www.qnx.com/). + +Tru64 + Documentation of several versions of Tru64 + (http://h30097.www3.hp.com/docs/) is available in different + formats. + +Unix version 7 + Officially this was called the "Seventh Edition" of "the UNIX + time-sharing system" but we use the more-common name "Unix version + 7". Documentation is available in the Unix Seventh Edition Manual + (http://plan9.bell-labs.com/7thEdMan/). Previous versions of Unix + are called "Unix version 6", etc., but they were not as widely + used. + + +File: autoconf.info, Node: Multiple Cases, Prev: Systemology, Up: Writing Tests + +6.8 Multiple Cases +================== + +Some operations are accomplished in several possible ways, depending on +the OS variant. Checking for them essentially requires a "case +statement". Autoconf does not directly provide one; however, it is +easy to simulate by using a shell variable to keep track of whether a +way to perform the operation has been found yet. + + Here is an example that uses the shell variable `fstype' to keep +track of whether the remaining cases need to be checked. Note that +since the value of `fstype' is under our control, we don't have to use +the longer `test "x$fstype" = xno'. + + AC_MSG_CHECKING([how to get file system type]) + fstype=no + # The order of these tests is important. + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statvfs.h> + #include <sys/fstyp.h>]])], + [AC_DEFINE([FSTYPE_STATVFS], [1], + [Define if statvfs exists.]) + fstype=SVR4]) + if test $fstype = no; then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statfs.h> + #include <sys/fstyp.h>]])], + [AC_DEFINE([FSTYPE_USG_STATFS], [1], + [Define if USG statfs.]) + fstype=SVR3]) + fi + if test $fstype = no; then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/statfs.h> + #include <sys/vmount.h>]])]), + [AC_DEFINE([FSTYPE_AIX_STATFS], [1], + [Define if AIX statfs.]) + fstype=AIX]) + fi + # (more cases omitted here) + AC_MSG_RESULT([$fstype]) + + +File: autoconf.info, Node: Results, Next: Programming in M4, Prev: Writing Tests, Up: Top + +7 Results of Tests +****************** + +Once `configure' has determined whether a feature exists, what can it +do to record that information? There are four sorts of things it can +do: define a C preprocessor symbol, set a variable in the output files, +save the result in a cache file for future `configure' runs, and print +a message letting the user know the result of the test. + +* Menu: + +* Defining Symbols:: Defining C preprocessor symbols +* Setting Output Variables:: Replacing variables in output files +* Special Chars in Variables:: Characters to beware of in variables +* Caching Results:: Speeding up subsequent `configure' runs +* Printing Messages:: Notifying `configure' users + + +File: autoconf.info, Node: Defining Symbols, Next: Setting Output Variables, Up: Results + +7.1 Defining C Preprocessor Symbols +=================================== + +A common action to take in response to a feature test is to define a C +preprocessor symbol indicating the results of the test. That is done by +calling `AC_DEFINE' or `AC_DEFINE_UNQUOTED'. + + By default, `AC_OUTPUT' places the symbols defined by these macros +into the output variable `DEFS', which contains an option +`-DSYMBOL=VALUE' for each symbol defined. Unlike in Autoconf version +1, there is no variable `DEFS' defined while `configure' is running. +To check whether Autoconf macros have already defined a certain C +preprocessor symbol, test the value of the appropriate cache variable, +as in this example: + + AC_CHECK_FUNC([vprintf], [AC_DEFINE([HAVE_VPRINTF], [1], + [Define if vprintf exists.])]) + if test "x$ac_cv_func_vprintf" != xyes; then + AC_CHECK_FUNC([_doprnt], [AC_DEFINE([HAVE_DOPRNT], [1], + [Define if _doprnt exists.])]) + fi + + If `AC_CONFIG_HEADERS' has been called, then instead of creating +`DEFS', `AC_OUTPUT' creates a header file by substituting the correct +values into `#define' statements in a template file. *Note +Configuration Headers::, for more information about this kind of output. + + -- Macro: AC_DEFINE (VARIABLE, VALUE, [DESCRIPTION]) + -- Macro: AC_DEFINE (VARIABLE) + Define VARIABLE to VALUE (verbatim), by defining a C preprocessor + macro for VARIABLE. VARIABLE should be a C identifier, optionally + suffixed by a parenthesized argument list to define a C + preprocessor macro with arguments. The macro argument list, if + present, should be a comma-separated list of C identifiers, + possibly terminated by an ellipsis `...' if C99 syntax is employed. + VARIABLE should not contain comments, white space, trigraphs, + backslash-newlines, universal character names, or non-ASCII + characters. + + VALUE may contain backslash-escaped newlines, which will be + preserved if you use `AC_CONFIG_HEADERS' but flattened if passed + via `@DEFS@' (with no effect on the compilation, since the + preprocessor sees only one line in the first place). VALUE should + not contain raw newlines. If you are not using + `AC_CONFIG_HEADERS', VALUE should not contain any `#' characters, + as `make' tends to eat them. To use a shell variable, use + `AC_DEFINE_UNQUOTED' instead. + + DESCRIPTION is only useful if you are using `AC_CONFIG_HEADERS'. + In this case, DESCRIPTION is put into the generated `config.h.in' + as the comment before the macro define. The following example + defines the C preprocessor variable `EQUATION' to be the string + constant `"$a > $b"': + + AC_DEFINE([EQUATION], ["$a > $b"], + [Equation string.]) + + If neither VALUE nor DESCRIPTION are given, then VALUE defaults to + 1 instead of to the empty string. This is for backwards + compatibility with older versions of Autoconf, but this usage is + obsolescent and may be withdrawn in future versions of Autoconf. + + If the VARIABLE is a literal string, it is passed to + `m4_pattern_allow' (*note Forbidden Patterns::). + + If multiple `AC_DEFINE' statements are executed for the same + VARIABLE name (not counting any parenthesized argument list), the + last one wins. + + -- Macro: AC_DEFINE_UNQUOTED (VARIABLE, VALUE, [DESCRIPTION]) + -- Macro: AC_DEFINE_UNQUOTED (VARIABLE) + Like `AC_DEFINE', but three shell expansions are + performed--once--on VARIABLE and VALUE: variable expansion (`$'), + command substitution (``'), and backslash escaping (`\'), as if in + an unquoted here-document. Single and double quote characters in + the value have no special meaning. Use this macro instead of + `AC_DEFINE' when VARIABLE or VALUE is a shell variable. Examples: + + AC_DEFINE_UNQUOTED([config_machfile], ["$machfile"], + [Configuration machine file.]) + AC_DEFINE_UNQUOTED([GETGROUPS_T], [$ac_cv_type_getgroups], + [getgroups return type.]) + AC_DEFINE_UNQUOTED([$ac_tr_hdr], [1], + [Translated header name.]) + + Due to a syntactical bizarreness of the Bourne shell, do not use +semicolons to separate `AC_DEFINE' or `AC_DEFINE_UNQUOTED' calls from +other macro calls or shell code; that can cause syntax errors in the +resulting `configure' script. Use either blanks or newlines. That is, +do this: + + AC_CHECK_HEADER([elf.h], + [AC_DEFINE([SVR4], [1], [System V Release 4]) LIBS="-lelf $LIBS"]) + +or this: + + AC_CHECK_HEADER([elf.h], + [AC_DEFINE([SVR4], [1], [System V Release 4]) + LIBS="-lelf $LIBS"]) + +instead of this: + + AC_CHECK_HEADER([elf.h], + [AC_DEFINE([SVR4], [1], [System V Release 4]); LIBS="-lelf $LIBS"]) + + +File: autoconf.info, Node: Setting Output Variables, Next: Special Chars in Variables, Prev: Defining Symbols, Up: Results + +7.2 Setting Output Variables +============================ + +Another way to record the results of tests is to set "output +variables", which are shell variables whose values are substituted into +files that `configure' outputs. The two macros below create new output +variables. *Note Preset Output Variables::, for a list of output +variables that are always available. + + -- Macro: AC_SUBST (VARIABLE, [VALUE]) + Create an output variable from a shell variable. Make `AC_OUTPUT' + substitute the variable VARIABLE into output files (typically one + or more makefiles). This means that `AC_OUTPUT' replaces + instances of `@VARIABLE@' in input files with the value that the + shell variable VARIABLE has when `AC_OUTPUT' is called. The value + can contain any non-`NUL' character, including newline. If you + are using Automake 1.11 or newer, for newlines in values you might + want to consider using `AM_SUBST_NOTMAKE' to prevent `automake' + from adding a line `VARIABLE = @VARIABLE@' to the `Makefile.in' + files (*note Automake: (automake)Optional.). + + Variable occurrences should not overlap: e.g., an input file should + not contain `@VAR1@VAR2@' if VAR1 and VAR2 are variable names. + The substituted value is not rescanned for more output variables; + occurrences of `@VARIABLE@' in the value are inserted literally + into the output file. (The algorithm uses the special marker + `|#_!!_#|' internally, so neither the substituted value nor the + output file may contain `|#_!!_#|'.) + + If VALUE is given, in addition assign it to VARIABLE. + + The string VARIABLE is passed to `m4_pattern_allow' (*note + Forbidden Patterns::). + + -- Macro: AC_SUBST_FILE (VARIABLE) + Another way to create an output variable from a shell variable. + Make `AC_OUTPUT' insert (without substitutions) the contents of + the file named by shell variable VARIABLE into output files. This + means that `AC_OUTPUT' replaces instances of `@VARIABLE@' in + output files (such as `Makefile.in') with the contents of the file + that the shell variable VARIABLE names when `AC_OUTPUT' is called. + Set the variable to `/dev/null' for cases that do not have a file + to insert. This substitution occurs only when the `@VARIABLE@' is + on a line by itself, optionally surrounded by spaces and tabs. The + substitution replaces the whole line, including the spaces, tabs, + and the terminating newline. + + This macro is useful for inserting makefile fragments containing + special dependencies or other `make' directives for particular host + or target types into makefiles. For example, `configure.ac' could + contain: + + AC_SUBST_FILE([host_frag]) + host_frag=$srcdir/conf/sun4.mh + + and then a `Makefile.in' could contain: + + @host_frag@ + + The string VARIABLE is passed to `m4_pattern_allow' (*note + Forbidden Patterns::). + + Running `configure' in varying environments can be extremely +dangerous. If for instance the user runs `CC=bizarre-cc ./configure', +then the cache, `config.h', and many other output files depend upon +`bizarre-cc' being the C compiler. If for some reason the user runs +`./configure' again, or if it is run via `./config.status --recheck', +(*Note Automatic Remaking::, and *note config.status Invocation::), +then the configuration can be inconsistent, composed of results +depending upon two different compilers. + + Environment variables that affect this situation, such as `CC' +above, are called "precious variables", and can be declared as such by +`AC_ARG_VAR'. + + -- Macro: AC_ARG_VAR (VARIABLE, DESCRIPTION) + Declare VARIABLE is a precious variable, and include its + DESCRIPTION in the variable section of `./configure --help'. + + Being precious means that + - VARIABLE is substituted via `AC_SUBST'. + + - The value of VARIABLE when `configure' was launched is saved + in the cache, including if it was not specified on the command + line but via the environment. Indeed, while `configure' can + notice the definition of `CC' in `./configure CC=bizarre-cc', + it is impossible to notice it in `CC=bizarre-cc ./configure', + which, unfortunately, is what most users do. + + We emphasize that it is the _initial_ value of VARIABLE which + is saved, not that found during the execution of `configure'. + Indeed, specifying `./configure FOO=foo' and letting + `./configure' guess that `FOO' is `foo' can be two different + things. + + - VARIABLE is checked for consistency between two `configure' + runs. For instance: + + $ ./configure --silent --config-cache + $ CC=cc ./configure --silent --config-cache + configure: error: `CC' was not set in the previous run + configure: error: changes in the environment can compromise \ + the build + configure: error: run `make distclean' and/or \ + `rm config.cache' and start over + + and similarly if the variable is unset, or if its content is + changed. If the content has white space changes only, then + the error is degraded to a warning only, but the old value is + reused. + + - VARIABLE is kept during automatic reconfiguration (*note + config.status Invocation::) as if it had been passed as a + command line argument, including when no cache is used: + + $ CC=/usr/bin/cc ./configure var=raboof --silent + $ ./config.status --recheck + running CONFIG_SHELL=/bin/sh /bin/sh ./configure var=raboof \ + CC=/usr/bin/cc --no-create --no-recursion + + +File: autoconf.info, Node: Special Chars in Variables, Next: Caching Results, Prev: Setting Output Variables, Up: Results + +7.3 Special Characters in Output Variables +========================================== + +Many output variables are intended to be evaluated both by `make' and +by the shell. Some characters are expanded differently in these two +contexts, so to avoid confusion these variables' values should not +contain any of the following characters: + + " # $ & ' ( ) * ; < > ? [ \ ^ ` | + + Also, these variables' values should neither contain newlines, nor +start with `~', nor contain white space or `:' immediately followed by +`~'. The values can contain nonempty sequences of white space +characters like tabs and spaces, but each such sequence might +arbitrarily be replaced by a single space during substitution. + + These restrictions apply both to the values that `configure' +computes, and to the values set directly by the user. For example, the +following invocations of `configure' are problematic, since they +attempt to use special characters within `CPPFLAGS' and white space +within `$(srcdir)': + + CPPFLAGS='-DOUCH="&\"#$*?"' '../My Source/ouch-1.0/configure' + + '../My Source/ouch-1.0/configure' CPPFLAGS='-DOUCH="&\"#$*?"' + + +File: autoconf.info, Node: Caching Results, Next: Printing Messages, Prev: Special Chars in Variables, Up: Results + +7.4 Caching Results +=================== + +To avoid checking for the same features repeatedly in various +`configure' scripts (or in repeated runs of one script), `configure' +can optionally save the results of many checks in a "cache file" (*note +Cache Files::). If a `configure' script runs with caching enabled and +finds a cache file, it reads the results of previous runs from the +cache and avoids rerunning those checks. As a result, `configure' can +then run much faster than if it had to perform all of the checks every +time. + + -- Macro: AC_CACHE_VAL (CACHE-ID, COMMANDS-TO-SET-IT) + Ensure that the results of the check identified by CACHE-ID are + available. If the results of the check were in the cache file + that was read, and `configure' was not given the `--quiet' or + `--silent' option, print a message saying that the result was + cached; otherwise, run the shell commands COMMANDS-TO-SET-IT. If + the shell commands are run to determine the value, the value is + saved in the cache file just before `configure' creates its output + files. *Note Cache Variable Names::, for how to choose the name + of the CACHE-ID variable. + + The COMMANDS-TO-SET-IT _must have no side effects_ except for + setting the variable CACHE-ID, see below. + + -- Macro: AC_CACHE_CHECK (MESSAGE, CACHE-ID, COMMANDS-TO-SET-IT) + A wrapper for `AC_CACHE_VAL' that takes care of printing the + messages. This macro provides a convenient shorthand for the most + common way to use these macros. It calls `AC_MSG_CHECKING' for + MESSAGE, then `AC_CACHE_VAL' with the CACHE-ID and COMMANDS + arguments, and `AC_MSG_RESULT' with CACHE-ID. + + The COMMANDS-TO-SET-IT _must have no side effects_ except for + setting the variable CACHE-ID, see below. + + It is common to find buggy macros using `AC_CACHE_VAL' or +`AC_CACHE_CHECK', because people are tempted to call `AC_DEFINE' in the +COMMANDS-TO-SET-IT. Instead, the code that _follows_ the call to +`AC_CACHE_VAL' should call `AC_DEFINE', by examining the value of the +cache variable. For instance, the following macro is broken: + + AC_DEFUN([AC_SHELL_TRUE], + [AC_CACHE_CHECK([whether true(1) works], [my_cv_shell_true_works], + [my_cv_shell_true_works=no + (true) 2>/dev/null && my_cv_shell_true_works=yes + if test "x$my_cv_shell_true_works" = xyes; then + AC_DEFINE([TRUE_WORKS], [1], + [Define if `true(1)' works properly.]) + fi]) + ]) + +This fails if the cache is enabled: the second time this macro is run, +`TRUE_WORKS' _will not be defined_. The proper implementation is: + + AC_DEFUN([AC_SHELL_TRUE], + [AC_CACHE_CHECK([whether true(1) works], [my_cv_shell_true_works], + [my_cv_shell_true_works=no + (true) 2>/dev/null && my_cv_shell_true_works=yes]) + if test "x$my_cv_shell_true_works" = xyes; then + AC_DEFINE([TRUE_WORKS], [1], + [Define if `true(1)' works properly.]) + fi + ]) + + Also, COMMANDS-TO-SET-IT should not print any messages, for example +with `AC_MSG_CHECKING'; do that before calling `AC_CACHE_VAL', so the +messages are printed regardless of whether the results of the check are +retrieved from the cache or determined by running the shell commands. + +* Menu: + +* Cache Variable Names:: Shell variables used in caches +* Cache Files:: Files `configure' uses for caching +* Cache Checkpointing:: Loading and saving the cache file + + +File: autoconf.info, Node: Cache Variable Names, Next: Cache Files, Up: Caching Results + +7.4.1 Cache Variable Names +-------------------------- + +The names of cache variables should have the following format: + + PACKAGE-PREFIX_cv_VALUE-TYPE_SPECIFIC-VALUE_[ADDITIONAL-OPTIONS] + +for example, `ac_cv_header_stat_broken' or +`ac_cv_prog_gcc_traditional'. The parts of the variable name are: + +PACKAGE-PREFIX + An abbreviation for your package or organization; the same prefix + you begin local Autoconf macros with, except lowercase by + convention. For cache values used by the distributed Autoconf + macros, this value is `ac'. + +`_cv_' + Indicates that this shell variable is a cache value. This string + _must_ be present in the variable name, including the leading + underscore. + +VALUE-TYPE + A convention for classifying cache values, to produce a rational + naming system. The values used in Autoconf are listed in *note + Macro Names::. + +SPECIFIC-VALUE + Which member of the class of cache values this test applies to. + For example, which function (`alloca'), program (`gcc'), or output + variable (`INSTALL'). + +ADDITIONAL-OPTIONS + Any particular behavior of the specific member that this test + applies to. For example, `broken' or `set'. This part of the + name may be omitted if it does not apply. + + The values assigned to cache variables may not contain newlines. +Usually, their values are Boolean (`yes' or `no') or the names of files +or functions; so this is not an important restriction. *note Cache +Variable Index:: for an index of cache variables with documented +semantics. + + +File: autoconf.info, Node: Cache Files, Next: Cache Checkpointing, Prev: Cache Variable Names, Up: Caching Results + +7.4.2 Cache Files +----------------- + +A cache file is a shell script that caches the results of configure +tests run on one system so they can be shared between configure scripts +and configure runs. It is not useful on other systems. If its contents +are invalid for some reason, the user may delete or edit it, or override +documented cache variables on the `configure' command line. + + By default, `configure' uses no cache file, to avoid problems caused +by accidental use of stale cache files. + + To enable caching, `configure' accepts `--config-cache' (or `-C') to +cache results in the file `config.cache'. Alternatively, +`--cache-file=FILE' specifies that FILE be the cache file. The cache +file is created if it does not exist already. When `configure' calls +`configure' scripts in subdirectories, it uses the `--cache-file' +argument so that they share the same cache. *Note Subdirectories::, +for information on configuring subdirectories with the +`AC_CONFIG_SUBDIRS' macro. + + `config.status' only pays attention to the cache file if it is given +the `--recheck' option, which makes it rerun `configure'. + + It is wrong to try to distribute cache files for particular system +types. There is too much room for error in doing that, and too much +administrative overhead in maintaining them. For any features that +can't be guessed automatically, use the standard method of the canonical +system type and linking files (*note Manual Configuration::). + + The site initialization script can specify a site-wide cache file to +use, instead of the usual per-program cache. In this case, the cache +file gradually accumulates information whenever someone runs a new +`configure' script. (Running `configure' merges the new cache results +with the existing cache file.) This may cause problems, however, if +the system configuration (e.g., the installed libraries or compilers) +changes and the stale cache file is not deleted. + + If `configure' is interrupted at the right time when it updates a +cache file outside of the build directory where the `configure' script +is run, it may leave behind a temporary file named after the cache file +with digits following it. You may safely delete such a file. + + +File: autoconf.info, Node: Cache Checkpointing, Prev: Cache Files, Up: Caching Results + +7.4.3 Cache Checkpointing +------------------------- + +If your configure script, or a macro called from `configure.ac', happens +to abort the configure process, it may be useful to checkpoint the cache +a few times at key points using `AC_CACHE_SAVE'. Doing so reduces the +amount of time it takes to rerun the configure script with (hopefully) +the error that caused the previous abort corrected. + + -- Macro: AC_CACHE_LOAD + Loads values from existing cache file, or creates a new cache file + if a cache file is not found. Called automatically from `AC_INIT'. + + -- Macro: AC_CACHE_SAVE + Flushes all cached values to the cache file. Called automatically + from `AC_OUTPUT', but it can be quite useful to call + `AC_CACHE_SAVE' at key points in `configure.ac'. + + For instance: + + ... AC_INIT, etc. ... + # Checks for programs. + AC_PROG_CC + AC_PROG_AWK + ... more program checks ... + AC_CACHE_SAVE + + # Checks for libraries. + AC_CHECK_LIB([nsl], [gethostbyname]) + AC_CHECK_LIB([socket], [connect]) + ... more lib checks ... + AC_CACHE_SAVE + + # Might abort... + AM_PATH_GTK([1.0.2], [], [AC_MSG_ERROR([GTK not in path])]) + AM_PATH_GTKMM([0.9.5], [], [AC_MSG_ERROR([GTK not in path])]) + ... AC_OUTPUT, etc. ... + + +File: autoconf.info, Node: Printing Messages, Prev: Caching Results, Up: Results + +7.5 Printing Messages +===================== + +`configure' scripts need to give users running them several kinds of +information. The following macros print messages in ways appropriate +for each kind. The arguments to all of them get enclosed in shell +double quotes, so the shell performs variable and back-quote +substitution on them. + + These macros are all wrappers around the `echo' shell command. They +direct output to the appropriate file descriptor (*note File Descriptor +Macros::). `configure' scripts should rarely need to run `echo' +directly to print messages for the user. Using these macros makes it +easy to change how and when each kind of message is printed; such +changes need only be made to the macro definitions and all the callers +change automatically. + + To diagnose static issues, i.e., when `autoconf' is run, see *note +Diagnostic Macros::. + + -- Macro: AC_MSG_CHECKING (FEATURE-DESCRIPTION) + Notify the user that `configure' is checking for a particular + feature. This macro prints a message that starts with `checking ' + and ends with `...' and no newline. It must be followed by a call + to `AC_MSG_RESULT' to print the result of the check and the + newline. The FEATURE-DESCRIPTION should be something like + `whether the Fortran compiler accepts C++ comments' or `for c89'. + + This macro prints nothing if `configure' is run with the `--quiet' + or `--silent' option. + + -- Macro: AC_MSG_RESULT (RESULT-DESCRIPTION) + Notify the user of the results of a check. RESULT-DESCRIPTION is + almost always the value of the cache variable for the check, + typically `yes', `no', or a file name. This macro should follow a + call to `AC_MSG_CHECKING', and the RESULT-DESCRIPTION should be + the completion of the message printed by the call to + `AC_MSG_CHECKING'. + + This macro prints nothing if `configure' is run with the `--quiet' + or `--silent' option. + + -- Macro: AC_MSG_NOTICE (MESSAGE) + Deliver the MESSAGE to the user. It is useful mainly to print a + general description of the overall purpose of a group of feature + checks, e.g., + + AC_MSG_NOTICE([checking if stack overflow is detectable]) + + This macro prints nothing if `configure' is run with the `--quiet' + or `--silent' option. + + -- Macro: AC_MSG_ERROR (ERROR-DESCRIPTION, [EXIT-STATUS = `$?/1']) + Notify the user of an error that prevents `configure' from + completing. This macro prints an error message to the standard + error output and exits `configure' with EXIT-STATUS (`$?' by + default, except that `0' is converted to `1'). ERROR-DESCRIPTION + should be something like `invalid value $HOME for \$HOME'. + + The ERROR-DESCRIPTION should start with a lower-case letter, and + "cannot" is preferred to "can't". + + -- Macro: AC_MSG_FAILURE (ERROR-DESCRIPTION, [EXIT-STATUS]) + This `AC_MSG_ERROR' wrapper notifies the user of an error that + prevents `configure' from completing _and_ that additional details + are provided in `config.log'. This is typically used when + abnormal results are found during a compilation. + + -- Macro: AC_MSG_WARN (PROBLEM-DESCRIPTION) + Notify the `configure' user of a possible problem. This macro + prints the message to the standard error output; `configure' + continues running afterward, so macros that call `AC_MSG_WARN' + should provide a default (back-up) behavior for the situations + they warn about. PROBLEM-DESCRIPTION should be something like `ln + -s seems to make hard links'. + + +File: autoconf.info, Node: Programming in M4, Next: Programming in M4sh, Prev: Results, Up: Top + +8 Programming in M4 +******************* + +Autoconf is written on top of two layers: "M4sugar", which provides +convenient macros for pure M4 programming, and "M4sh", which provides +macros dedicated to shell script generation. + + As of this version of Autoconf, these two layers still contain +experimental macros, whose interface might change in the future. As a +matter of fact, _anything that is not documented must not be used_. + +* Menu: + +* M4 Quotation:: Protecting macros from unwanted expansion +* Using autom4te:: The Autoconf executables backbone +* Programming in M4sugar:: Convenient pure M4 macros +* Debugging via autom4te:: Figuring out what M4 was doing + + +File: autoconf.info, Node: M4 Quotation, Next: Using autom4te, Up: Programming in M4 + +8.1 M4 Quotation +================ + +The most common problem with existing macros is an improper quotation. +This section, which users of Autoconf can skip, but which macro writers +_must_ read, first justifies the quotation scheme that was chosen for +Autoconf and then ends with a rule of thumb. Understanding the former +helps one to follow the latter. + +* Menu: + +* Active Characters:: Characters that change the behavior of M4 +* One Macro Call:: Quotation and one macro call +* Quoting and Parameters:: M4 vs. shell parameters +* Quotation and Nested Macros:: Macros calling macros +* Changequote is Evil:: Worse than INTERCAL: M4 + changequote +* Quadrigraphs:: Another way to escape special characters +* Balancing Parentheses:: Dealing with unbalanced parentheses +* Quotation Rule Of Thumb:: One parenthesis, one quote + + +File: autoconf.info, Node: Active Characters, Next: One Macro Call, Up: M4 Quotation + +8.1.1 Active Characters +----------------------- + +To fully understand where proper quotation is important, you first need +to know what the special characters are in Autoconf: `#' introduces a +comment inside which no macro expansion is performed, `,' separates +arguments, `[' and `]' are the quotes themselves(1), `(' and `)' (which +M4 tries to match by pairs), and finally `$' inside a macro definition. + + In order to understand the delicate case of macro calls, we first +have to present some obvious failures. Below they are "obvious-ified", +but when you find them in real life, they are usually in disguise. + + Comments, introduced by a hash and running up to the newline, are +opaque tokens to the top level: active characters are turned off, and +there is no macro expansion: + + # define([def], ine) + =># define([def], ine) + + Each time there can be a macro expansion, there is a quotation +expansion, i.e., one level of quotes is stripped: + + int tab[10]; + =>int tab10; + [int tab[10];] + =>int tab[10]; + + Without this in mind, the reader might try hopelessly to use her +macro `array': + + define([array], [int tab[10];]) + array + =>int tab10; + [array] + =>array + +How can you correctly output the intended results(2)? + + ---------- Footnotes ---------- + + (1) By itself, M4 uses ``' and `''; it is the M4sugar layer that +sets up the preferred quotes of `[' and `]'. + + (2) Using `defn'. + + +File: autoconf.info, Node: One Macro Call, Next: Quoting and Parameters, Prev: Active Characters, Up: M4 Quotation + +8.1.2 One Macro Call +-------------------- + +Let's proceed on the interaction between active characters and macros +with this small macro, which just returns its first argument: + + define([car], [$1]) + +The two pairs of quotes above are not part of the arguments of +`define'; rather, they are understood by the top level when it tries to +find the arguments of `define'. Therefore, assuming `car' is not +already defined, it is equivalent to write: + + define(car, $1) + +But, while it is acceptable for a `configure.ac' to avoid unnecessary +quotes, it is bad practice for Autoconf macros which must both be more +robust and also advocate perfect style. + + At the top level, there are only two possibilities: either you quote +or you don't: + + car(foo, bar, baz) + =>foo + [car(foo, bar, baz)] + =>car(foo, bar, baz) + + Let's pay attention to the special characters: + + car(#) + error-->EOF in argument list + + The closing parenthesis is hidden in the comment; with a hypothetical +quoting, the top level understood it this way: + + car([#)] + +Proper quotation, of course, fixes the problem: + + car([#]) + =># + + Here are more examples: + + car(foo, bar) + =>foo + car([foo, bar]) + =>foo, bar + car((foo, bar)) + =>(foo, bar) + car([(foo], [bar)]) + =>(foo + define([a], [b]) + => + car(a) + =>b + car([a]) + =>b + car([[a]]) + =>a + car([[[a]]]) + =>[a] + + +File: autoconf.info, Node: Quoting and Parameters, Next: Quotation and Nested Macros, Prev: One Macro Call, Up: M4 Quotation + +8.1.3 Quoting and Parameters +---------------------------- + +When M4 encounters `$' within a macro definition, followed immediately +by a character it recognizes (`0'...`9', `#', `@', or `*'), it will +perform M4 parameter expansion. This happens regardless of how many +layers of quotes the parameter expansion is nested within, or even if +it occurs in text that will be rescanned as a comment. + + define([none], [$1]) + => + define([one], [[$1]]) + => + define([two], [[[$1]]]) + => + define([comment], [# $1]) + => + define([active], [ACTIVE]) + => + none([active]) + =>ACTIVE + one([active]) + =>active + two([active]) + =>[active] + comment([active]) + =># active + + On the other hand, since autoconf generates shell code, you often +want to output shell variable expansion, rather than performing M4 +parameter expansion. To do this, you must use M4 quoting to separate +the `$' from the next character in the definition of your macro. If +the macro definition occurs in single-quoted text, then insert another +level of quoting; if the usage is already inside a double-quoted +string, then split it into concatenated strings. + + define([single], [a single-quoted $[]1 definition]) + => + define([double], [[a double-quoted $][1 definition]]) + => + single + =>a single-quoted $1 definition + double + =>a double-quoted $1 definition + + Posix states that M4 implementations are free to provide +implementation extensions when `${' is encountered in a macro +definition. Autoconf reserves the longer sequence `${{' for use with +planned extensions that will be available in the future GNU M4 2.0, but +guarantees that all other instances of `${' will be output literally. +Therefore, this idiom can also be used to output shell code parameter +references: + + define([first], [${1}])first + =>${1} + + Posix also states that `$11' should expand to the first parameter +concatenated with a literal `1', although some versions of GNU M4 +expand the eleventh parameter instead. For portability, you should +only use single-digit M4 parameter expansion. + + With this in mind, we can explore the cases where macros invoke +macros... + + +File: autoconf.info, Node: Quotation and Nested Macros, Next: Changequote is Evil, Prev: Quoting and Parameters, Up: M4 Quotation + +8.1.4 Quotation and Nested Macros +--------------------------------- + +The examples below use the following macros: + + define([car], [$1]) + define([active], [ACT, IVE]) + define([array], [int tab[10]]) + + Each additional embedded macro call introduces other possible +interesting quotations: + + car(active) + =>ACT + car([active]) + =>ACT, IVE + car([[active]]) + =>active + + In the first case, the top level looks for the arguments of `car', +and finds `active'. Because M4 evaluates its arguments before applying +the macro, `active' is expanded, which results in: + + car(ACT, IVE) + =>ACT + +In the second case, the top level gives `active' as first and only +argument of `car', which results in: + + active + =>ACT, IVE + +i.e., the argument is evaluated _after_ the macro that invokes it. In +the third case, `car' receives `[active]', which results in: + + [active] + =>active + +exactly as we already saw above. + + The example above, applied to a more realistic example, gives: + + car(int tab[10];) + =>int tab10; + car([int tab[10];]) + =>int tab10; + car([[int tab[10];]]) + =>int tab[10]; + +Huh? The first case is easily understood, but why is the second wrong, +and the third right? To understand that, you must know that after M4 +expands a macro, the resulting text is immediately subjected to macro +expansion and quote removal. This means that the quote removal occurs +twice--first before the argument is passed to the `car' macro, and +second after the `car' macro expands to the first argument. + + As the author of the Autoconf macro `car', you then consider it to +be incorrect that your users have to double-quote the arguments of +`car', so you "fix" your macro. Let's call it `qar' for quoted car: + + define([qar], [[$1]]) + +and check that `qar' is properly fixed: + + qar([int tab[10];]) + =>int tab[10]; + +Ahhh! That's much better. + + But note what you've done: now that the result of `qar' is always a +literal string, the only time a user can use nested macros is if she +relies on an _unquoted_ macro call: + + qar(active) + =>ACT + qar([active]) + =>active + +leaving no way for her to reproduce what she used to do with `car': + + car([active]) + =>ACT, IVE + +Worse yet: she wants to use a macro that produces a set of `cpp' macros: + + define([my_includes], [#include <stdio.h>]) + car([my_includes]) + =>#include <stdio.h> + qar(my_includes) + error-->EOF in argument list + + This macro, `qar', because it double quotes its arguments, forces +its users to leave their macro calls unquoted, which is dangerous. +Commas and other active symbols are interpreted by M4 before they are +given to the macro, often not in the way the users expect. Also, +because `qar' behaves differently from the other macros, it's an +exception that should be avoided in Autoconf. + + +File: autoconf.info, Node: Changequote is Evil, Next: Quadrigraphs, Prev: Quotation and Nested Macros, Up: M4 Quotation + +8.1.5 `changequote' is Evil +--------------------------- + +The temptation is often high to bypass proper quotation, in particular +when it's late at night. Then, many experienced Autoconf hackers +finally surrender to the dark side of the force and use the ultimate +weapon: `changequote'. + + The M4 builtin `changequote' belongs to a set of primitives that +allow one to adjust the syntax of the language to adjust it to one's +needs. For instance, by default M4 uses ``' and `'' as quotes, but in +the context of shell programming (and actually of most programming +languages), that's about the worst choice one can make: because of +strings and back-quoted expressions in shell code (such as `'this'' and +``that`'), and because of literal characters in usual programming +languages (as in `'0''), there are many unbalanced ``' and `''. Proper +M4 quotation then becomes a nightmare, if not impossible. In order to +make M4 useful in such a context, its designers have equipped it with +`changequote', which makes it possible to choose another pair of +quotes. M4sugar, M4sh, Autoconf, and Autotest all have chosen to use +`[' and `]'. Not especially because they are unlikely characters, but +_because they are characters unlikely to be unbalanced_. + + There are other magic primitives, such as `changecom' to specify +what syntactic forms are comments (it is common to see `changecom(<!--, +-->)' when M4 is used to produce HTML pages), `changeword' and +`changesyntax' to change other syntactic details (such as the character +to denote the Nth argument, `$' by default, the parentheses around +arguments, etc.). + + These primitives are really meant to make M4 more useful for specific +domains: they should be considered like command line options: +`--quotes', `--comments', `--words', and `--syntax'. Nevertheless, +they are implemented as M4 builtins, as it makes M4 libraries self +contained (no need for additional options). + + There lies the problem... + + + The problem is that it is then tempting to use them in the middle of +an M4 script, as opposed to its initialization. This, if not carefully +thought out, can lead to disastrous effects: _you are changing the +language in the middle of the execution_. Changing and restoring the +syntax is often not enough: if you happened to invoke macros in between, +these macros are lost, as the current syntax is probably not the one +they were implemented with. + + +File: autoconf.info, Node: Quadrigraphs, Next: Balancing Parentheses, Prev: Changequote is Evil, Up: M4 Quotation + +8.1.6 Quadrigraphs +------------------ + +When writing an Autoconf macro you may occasionally need to generate +special characters that are difficult to express with the standard +Autoconf quoting rules. For example, you may need to output the regular +expression `[^[]', which matches any character other than `['. This +expression contains unbalanced brackets so it cannot be put easily into +an M4 macro. + + Additionally, there are a few m4sugar macros (such as `m4_split' and +`m4_expand') which internally use special markers in addition to the +regular quoting characters. If the arguments to these macros contain +the literal strings `-=<{(' or `)}>=-', the macros might behave +incorrectly. + + You can work around these problems by using one of the following +"quadrigraphs": + +`@<:@' + `[' + +`@:>@' + `]' + +`@S|@' + `$' + +`@%:@' + `#' + +`@{:@' + `(' + +`@:}@' + `)' + +`@&t@' + Expands to nothing. + + Quadrigraphs are replaced at a late stage of the translation process, +after `m4' is run, so they do not get in the way of M4 quoting. For +example, the string `^@<:@', independently of its quotation, appears as +`^[' in the output. + + The empty quadrigraph can be used: + + - to mark trailing spaces explicitly + + Trailing spaces are smashed by `autom4te'. This is a feature. + + - to produce quadrigraphs and other strings reserved by m4sugar + + For instance `@<@&t@:@' produces `@<:@'. For a more contrived + example: + + m4_define([a], [A])m4_define([b], [B])m4_define([c], [C])dnl + m4_split([a )}>=- b -=<{( c]) + =>[a], [], [B], [], [c] + m4_split([a )}@&t@>=- b -=<@&t@{( c]) + =>[a], [)}>=-], [b], [-=<{(], [c] + + - to escape _occurrences_ of forbidden patterns + + For instance you might want to mention `AC_FOO' in a comment, while + still being sure that `autom4te' still catches unexpanded `AC_*'. + Then write `AC@&t@_FOO'. + + The name `@&t@' was suggested by Paul Eggert: + + I should give some credit to the `@&t@' pun. The `&' is my own + invention, but the `t' came from the source code of the ALGOL68C + compiler, written by Steve Bourne (of Bourne shell fame), and + which used `mt' to denote the empty string. In C, it would have + looked like something like: + + char const mt[] = ""; + + but of course the source code was written in Algol 68. + + I don't know where he got `mt' from: it could have been his own + invention, and I suppose it could have been a common pun around the + Cambridge University computer lab at the time. + + +File: autoconf.info, Node: Balancing Parentheses, Next: Quotation Rule Of Thumb, Prev: Quadrigraphs, Up: M4 Quotation + +8.1.7 Dealing with unbalanced parentheses +----------------------------------------- + +One of the pitfalls of portable shell programming is that `case' +statements require unbalanced parentheses (*note Limitations of Shell +Builtins: case.). With syntax highlighting editors, the presence of +unbalanced `)' can interfere with editors that perform syntax +highlighting of macro contents based on finding the matching `('. +Another concern is how much editing must be done when transferring code +snippets between shell scripts and macro definitions. But most +importantly, the presence of unbalanced parentheses can introduce +expansion bugs. + + For an example, here is an underquoted attempt to use the macro +`my_case', which happens to expand to a portable `case' statement: + + AC_DEFUN([my_case], + [case $file_name in + *.c) echo "C source code";; + esac]) + AS_IF(:, my_case) + +In the above example, the `AS_IF' call underquotes its arguments. As a +result, the unbalanced `)' generated by the premature expansion of +`my_case' results in expanding `AS_IF' with a truncated parameter, and +the expansion is syntactically invalid: + + if :; then + case $file_name in + *.c + fi echo "C source code";; + esac) + + If nothing else, this should emphasize the importance of the quoting +arguments to macro calls. On the other hand, there are several +variations for defining `my_case' to be more robust, even when used +without proper quoting, each with some benefits and some drawbacks. + + Creative literal shell comment + AC_DEFUN([my_case], + [case $file_name in #( + *.c) echo "C source code";; + esac]) + This version provides balanced parentheses to several editors, and + can be copied and pasted into a terminal as is. Unfortunately, it + is still unbalanced as an Autoconf argument, since `#(' is an M4 + comment that masks the normal properties of `('. + + Quadrigraph shell comment + AC_DEFUN([my_case], + [case $file_name in @%:@( + *.c) echo "C source code";; + esac]) + This version provides balanced parentheses to even more editors, + and can be used as a balanced Autoconf argument. Unfortunately, + it requires some editing before it can be copied and pasted into a + terminal, and the use of the quadrigraph `@%:@' for `#' reduces + readability. + + Quoting just the parenthesis + AC_DEFUN([my_case], + [case $file_name in + *.c[)] echo "C source code";; + esac]) + This version quotes the `)', so that it can be used as a balanced + Autoconf argument. As written, this is not balanced to an editor, + but it can be coupled with `[#(]' to meet that need, too. + However, it still requires some edits before it can be copied and + pasted into a terminal. + + Double-quoting the entire statement + AC_DEFUN([my_case], + [[case $file_name in #( + *.c) echo "C source code";; + esac]]) + Since the entire macro is double-quoted, there is no problem with + using this as an Autoconf argument; and since the double-quoting + is over the entire statement, this code can be easily copied and + pasted into a terminal. However, the double quoting prevents the + expansion of any macros inside the case statement, which may cause + its own set of problems. + + Using `AS_CASE' + AC_DEFUN([my_case], + [AS_CASE([$file_name], + [*.c], [echo "C source code"])]) + This version avoids the balancing issue altogether, by relying on + `AS_CASE' (*note Common Shell Constructs::); it also allows for the + expansion of `AC_REQUIRE' to occur prior to the entire case + statement, rather than within a branch of the case statement that + might not be taken. However, the abstraction comes with a penalty + that it is no longer a quick copy, paste, and edit to get back to + shell code. + + +File: autoconf.info, Node: Quotation Rule Of Thumb, Prev: Balancing Parentheses, Up: M4 Quotation + +8.1.8 Quotation Rule Of Thumb +----------------------------- + +To conclude, the quotation rule of thumb is: + + _One pair of quotes per pair of parentheses._ + + Never over-quote, never under-quote, in particular in the definition +of macros. In the few places where the macros need to use brackets +(usually in C program text or regular expressions), properly quote _the +arguments_! + + It is common to read Autoconf programs with snippets like: + + AC_TRY_LINK( + changequote(<<, >>)dnl + <<#include <time.h> + #ifndef tzname /* For SGI. */ + extern char *tzname[]; /* RS6000 and others reject char **tzname. */ + #endif>>, + changequote([, ])dnl + [atoi (*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no) + +which is incredibly useless since `AC_TRY_LINK' is _already_ double +quoting, so you just need: + + AC_TRY_LINK( + [#include <time.h> + #ifndef tzname /* For SGI. */ + extern char *tzname[]; /* RS6000 and others reject char **tzname. */ + #endif], + [atoi (*tzname);], + [ac_cv_var_tzname=yes], + [ac_cv_var_tzname=no]) + +The M4-fluent reader might note that these two examples are rigorously +equivalent, since M4 swallows both the `changequote(<<, >>)' and `<<' +`>>' when it "collects" the arguments: these quotes are not part of the +arguments! + + Simplified, the example above is just doing this: + + changequote(<<, >>)dnl + <<[]>> + changequote([, ])dnl + +instead of simply: + + [[]] + + With macros that do not double quote their arguments (which is the +rule), double-quote the (risky) literals: + + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[#include <time.h> + #ifndef tzname /* For SGI. */ + extern char *tzname[]; /* RS6000 and others reject char **tzname. */ + #endif]], + [atoi (*tzname);])], + [ac_cv_var_tzname=yes], + [ac_cv_var_tzname=no]) + + Please note that the macro `AC_TRY_LINK' is obsolete, so you really +should be using `AC_LINK_IFELSE' instead. + + *Note Quadrigraphs::, for what to do if you run into a hopeless case +where quoting does not suffice. + + When you create a `configure' script using newly written macros, +examine it carefully to check whether you need to add more quotes in +your macros. If one or more words have disappeared in the M4 output, +you need more quotes. When in doubt, quote. + + However, it's also possible to put on too many layers of quotes. If +this happens, the resulting `configure' script may contain unexpanded +macros. The `autoconf' program checks for this problem by looking for +the string `AC_' in `configure'. However, this heuristic does not work +in general: for example, it does not catch overquoting in `AC_DEFINE' +descriptions. + + +File: autoconf.info, Node: Using autom4te, Next: Programming in M4sugar, Prev: M4 Quotation, Up: Programming in M4 + +8.2 Using `autom4te' +==================== + +The Autoconf suite, including M4sugar, M4sh, and Autotest, in addition +to Autoconf per se, heavily rely on M4. All these different uses +revealed common needs factored into a layer over M4: `autom4te'(1). + + `autom4te' is a preprocessor that is like `m4'. It supports M4 +extensions designed for use in tools like Autoconf. + +* Menu: + +* autom4te Invocation:: A GNU M4 wrapper +* Customizing autom4te:: Customizing the Autoconf package + + ---------- Footnotes ---------- + + (1) Yet another great name from Lars J. Aas. + + +File: autoconf.info, Node: autom4te Invocation, Next: Customizing autom4te, Up: Using autom4te + +8.2.1 Invoking `autom4te' +------------------------- + +The command line arguments are modeled after M4's: + + autom4te OPTIONS FILES + +where the FILES are directly passed to `m4'. By default, GNU M4 is +found during configuration, but the environment variable `M4' can be +set to tell `autom4te' where to look. In addition to the regular +expansion, it handles the replacement of the quadrigraphs (*note +Quadrigraphs::), and of `__oline__', the current line in the output. +It supports an extended syntax for the FILES: + +`FILE.m4f' + This file is an M4 frozen file. Note that _all the previous files + are ignored_. See the option `--melt' for the rationale. + +`FILE?' + If found in the library path, the FILE is included for expansion, + otherwise it is ignored instead of triggering a failure. + + + Of course, it supports the Autoconf common subset of options: + +`--help' +`-h' + Print a summary of the command line options and exit. + +`--version' +`-V' + Print the version number of Autoconf and exit. + +`--verbose' +`-v' + Report processing steps. + +`--debug' +`-d' + Don't remove the temporary files and be even more verbose. + +`--include=DIR' +`-I DIR' + Also look for input files in DIR. Multiple invocations accumulate. + +`--output=FILE' +`-o FILE' + Save output (script or trace) to FILE. The file `-' stands for + the standard output. + + + As an extension of `m4', it includes the following options: + +`--warnings=CATEGORY' +`-W CATEGORY' + Report the warnings related to CATEGORY (which can actually be a + comma separated list). *Note Reporting Messages::, macro + `AC_DIAGNOSE', for a comprehensive list of categories. Special + values include: + + `all' + report all the warnings + + `none' + report none + + `error' + treats warnings as errors + + `no-CATEGORY' + disable warnings falling into CATEGORY + + Warnings about `syntax' are enabled by default, and the environment + variable `WARNINGS', a comma separated list of categories, is + honored. `autom4te -W CATEGORY' actually behaves as if you had + run: + + autom4te --warnings=syntax,$WARNINGS,CATEGORY + + For example, if you want to disable defaults and `WARNINGS' of + `autom4te', but enable the warnings about obsolete constructs, you + would use `-W none,obsolete'. + + `autom4te' displays a back trace for errors, but not for warnings; + if you want them, just pass `-W error'. + +`--melt' +`-M' + Do not use frozen files. Any argument `FILE.m4f' is replaced by + `FILE.m4'. This helps tracing the macros which are executed only + when the files are frozen, typically `m4_define'. For instance, + running: + + autom4te --melt 1.m4 2.m4f 3.m4 4.m4f input.m4 + + is roughly equivalent to running: + + m4 1.m4 2.m4 3.m4 4.m4 input.m4 + + while + + autom4te 1.m4 2.m4f 3.m4 4.m4f input.m4 + + is equivalent to: + + m4 --reload-state=4.m4f input.m4 + +`--freeze' +`-F' + Produce a frozen state file. `autom4te' freezing is stricter than + M4's: it must produce no warnings, and no output other than empty + lines (a line with white space is _not_ empty) and comments + (starting with `#'). Unlike `m4''s similarly-named option, this + option takes no argument: + + autom4te 1.m4 2.m4 3.m4 --freeze --output=3.m4f + + corresponds to + + m4 1.m4 2.m4 3.m4 --freeze-state=3.m4f + +`--mode=OCTAL-MODE' +`-m OCTAL-MODE' + Set the mode of the non-traces output to OCTAL-MODE; by default + `0666'. + + + As another additional feature over `m4', `autom4te' caches its +results. GNU M4 is able to produce a regular output and traces at the +same time. Traces are heavily used in the GNU Build System: +`autoheader' uses them to build `config.h.in', `autoreconf' to +determine what GNU Build System components are used, `automake' to +"parse" `configure.ac' etc. To avoid recomputation, traces are cached +while performing regular expansion, and conversely. This cache is +(actually, the caches are) stored in the directory `autom4te.cache'. +_It can safely be removed_ at any moment (especially if for some reason +`autom4te' considers it trashed). + +`--cache=DIRECTORY' +`-C DIRECTORY' + Specify the name of the directory where the result should be + cached. Passing an empty value disables caching. Be sure to pass + a relative file name, as for the time being, global caches are not + supported. + +`--no-cache' + Don't cache the results. + +`--force' +`-f' + If a cache is used, consider it obsolete (but update it anyway). + + + Because traces are so important to the GNU Build System, `autom4te' +provides high level tracing features as compared to M4, and helps +exploiting the cache: + +`--trace=MACRO[:FORMAT]' +`-t MACRO[:FORMAT]' + Trace the invocations of MACRO according to the FORMAT. Multiple + `--trace' arguments can be used to list several macros. Multiple + `--trace' arguments for a single macro are not cumulative; + instead, you should just make FORMAT as long as needed. + + The FORMAT is a regular string, with newlines if desired, and + several special escape codes. It defaults to `$f:$l:$n:$%'. It + can use the following special escapes: + + `$$' + The character `$'. + + `$f' + The file name from which MACRO is called. + + `$l' + The line number from which MACRO is called. + + `$d' + The depth of the MACRO call. This is an M4 technical detail + that you probably don't want to know about. + + `$n' + The name of the MACRO. + + `$NUM' + The NUMth argument of the call to MACRO. + + `$@' + `$SEP@' + `${SEPARATOR}@' + All the arguments passed to MACRO, separated by the character + SEP or the string SEPARATOR (`,' by default). Each argument + is quoted, i.e., enclosed in a pair of square brackets. + + `$*' + `$SEP*' + `${SEPARATOR}*' + As above, but the arguments are not quoted. + + `$%' + `$SEP%' + `${SEPARATOR}%' + As above, but the arguments are not quoted, all new line + characters in the arguments are smashed, and the default + separator is `:'. + + The escape `$%' produces single-line trace outputs (unless + you put newlines in the `separator'), while `$@' and `$*' do + not. + + *Note autoconf Invocation::, for examples of trace uses. + +`--preselect=MACRO' +`-p MACRO' + Cache the traces of MACRO, but do not enable traces. This is + especially important to save CPU cycles in the future. For + instance, when invoked, `autoconf' preselects all the macros that + `autoheader', `automake', `autoreconf', etc., trace, so that + running `m4' is not needed to trace them: the cache suffices. + This results in a huge speed-up. + + + Finally, `autom4te' introduces the concept of "Autom4te libraries". +They consists in a powerful yet extremely simple feature: sets of +combined command line arguments: + +`--language=LANGUAGE' +`-l LANGUAGE' + Use the LANGUAGE Autom4te library. Current languages include: + + `M4sugar' + create M4sugar output. + + `M4sh' + create M4sh executable shell scripts. + + `Autotest' + create Autotest executable test suites. + + `Autoconf-without-aclocal-m4' + create Autoconf executable configure scripts without reading + `aclocal.m4'. + + `Autoconf' + create Autoconf executable configure scripts. This language + inherits all the characteristics of + `Autoconf-without-aclocal-m4' and additionally reads + `aclocal.m4'. + +`--prepend-include=DIR' +`-B DIR' + Prepend directory DIR to the search path. This is used to include + the language-specific files before any third-party macros. + + + As an example, if Autoconf is installed in its default location, +`/usr/local', the command `autom4te -l m4sugar foo.m4' is strictly +equivalent to the command: + + autom4te --prepend-include /usr/local/share/autoconf \ + m4sugar/m4sugar.m4f --warnings syntax foo.m4 + +Recursive expansion applies here: the command `autom4te -l m4sh foo.m4' +is the same as `autom4te --language M4sugar m4sugar/m4sh.m4f foo.m4', +i.e.: + + autom4te --prepend-include /usr/local/share/autoconf \ + m4sugar/m4sugar.m4f m4sugar/m4sh.m4f --mode 777 foo.m4 + +The definition of the languages is stored in `autom4te.cfg'. + + +File: autoconf.info, Node: Customizing autom4te, Prev: autom4te Invocation, Up: Using autom4te + +8.2.2 Customizing `autom4te' +---------------------------- + +One can customize `autom4te' via `~/.autom4te.cfg' (i.e., as found in +the user home directory), and `./.autom4te.cfg' (i.e., as found in the +directory from which `autom4te' is run). The order is first reading +`autom4te.cfg', then `~/.autom4te.cfg', then `./.autom4te.cfg', and +finally the command line arguments. + + In these text files, comments are introduced with `#', and empty +lines are ignored. Customization is performed on a per-language basis, +wrapped in between a `begin-language: "LANGUAGE"', `end-language: +"LANGUAGE"' pair. + + Customizing a language stands for appending options (*note autom4te +Invocation::) to the current definition of the language. Options, and +more generally arguments, are introduced by `args: ARGUMENTS'. You may +use the traditional shell syntax to quote the ARGUMENTS. + + As an example, to disable Autoconf caches (`autom4te.cache') +globally, include the following lines in `~/.autom4te.cfg': + +## ------------------ ## +## User Preferences. ## +## ------------------ ## + +begin-language: "Autoconf-without-aclocal-m4" +args: --no-cache +end-language: "Autoconf-without-aclocal-m4" + + +File: autoconf.info, Node: Programming in M4sugar, Next: Debugging via autom4te, Prev: Using autom4te, Up: Programming in M4 + +8.3 Programming in M4sugar +========================== + +M4 by itself provides only a small, but sufficient, set of all-purpose +macros. M4sugar introduces additional generic macros. Its name was +coined by Lars J. Aas: "Readability And Greater Understanding Stands 4 +M4sugar". + + M4sugar reserves the macro namespace `^_m4_' for internal use, and +the macro namespace `^m4_' for M4sugar macros. You should not define +your own macros into these namespaces. + +* Menu: + +* Redefined M4 Macros:: M4 builtins changed in M4sugar +* Diagnostic Macros:: Diagnostic messages from M4sugar +* Diversion support:: Diversions in M4sugar +* Conditional constructs:: Conditions in M4 +* Looping constructs:: Iteration in M4 +* Evaluation Macros:: More quotation and evaluation control +* Text processing Macros:: String manipulation in M4 +* Number processing Macros:: Arithmetic computation in M4 +* Set manipulation Macros:: Set manipulation in M4 +* Forbidden Patterns:: Catching unexpanded macros + + +File: autoconf.info, Node: Redefined M4 Macros, Next: Diagnostic Macros, Up: Programming in M4sugar + +8.3.1 Redefined M4 Macros +------------------------- + +With a few exceptions, all the M4 native macros are moved in the `m4_' +pseudo-namespace, e.g., M4sugar renames `define' as `m4_define' etc. + + The list of macros unchanged from M4, except for their name, is: + - m4_builtin + + - m4_changecom + + - m4_changequote + + - m4_debugfile + + - m4_debugmode + + - m4_decr + + - m4_define + + - m4_divnum + + - m4_errprint + + - m4_esyscmd + + - m4_eval + + - m4_format + + - m4_ifdef + + - m4_incr + + - m4_index + + - m4_indir + + - m4_len + + - m4_pushdef + + - m4_shift + + - m4_substr + + - m4_syscmd + + - m4_sysval + + - m4_traceoff + + - m4_traceon + + - m4_translit + + Some M4 macros are redefined, and are slightly incompatible with +their native equivalent. + + -- Macro: __file__ + -- Macro: __line__ + All M4 macros starting with `__' retain their original name: for + example, no `m4__file__' is defined. + + -- Macro: __oline__ + This is not technically a macro, but a feature of Autom4te. The + sequence `__oline__' can be used similarly to the other m4sugar + location macros, but rather than expanding to the location of the + input file, it is translated to the line number where it appears + in the output file after all other M4 expansions. + + -- Macro: dnl + This macro kept its original name: no `m4_dnl' is defined. + + -- Macro: m4_bpatsubst (STRING, REGEXP, [REPLACEMENT]) + This macro corresponds to `patsubst'. The name `m4_patsubst' is + kept for future versions of M4sugar, once GNU M4 2.0 is released + and supports extended regular expression syntax. + + -- Macro: m4_bregexp (STRING, REGEXP, [REPLACEMENT]) + This macro corresponds to `regexp'. The name `m4_regexp' is kept + for future versions of M4sugar, once GNU M4 2.0 is released and + supports extended regular expression syntax. + + -- Macro: m4_copy (SOURCE, DEST) + -- Macro: m4_copy_force (SOURCE, DEST) + -- Macro: m4_rename (SOURCE, DEST) + -- Macro: m4_rename_force (SOURCE, DEST) + These macros aren't directly builtins, but are closely related to + `m4_pushdef' and `m4_defn'. `m4_copy' and `m4_rename' ensure that + DEST is undefined, while `m4_copy_force' and `m4_rename_force' + overwrite any existing definition. All four macros then proceed + to copy the entire pushdef stack of definitions of SOURCE over to + DEST. `m4_copy' and `m4_copy_force' preserve the source + (including in the special case where SOURCE is undefined), while + `m4_rename' and `m4_rename_force' undefine the original macro name + (making it an error to rename an undefined SOURCE). + + Note that attempting to invoke a renamed macro might not work, + since the macro may have a dependence on helper macros accessed + via composition of `$0' but that were not also renamed; likewise, + other macros may have a hard-coded dependence on SOURCE and could + break if SOURCE has been deleted. On the other hand, it is always + safe to rename a macro to temporarily move it out of the way, then + rename it back later to restore original semantics. + + -- Macro: m4_defn (MACRO...) + This macro fails if MACRO is not defined, even when using older + versions of M4 that did not warn. See `m4_undefine'. + Unfortunately, in order to support these older versions of M4, + there are some situations involving unbalanced quotes where + concatenating multiple macros together will work in newer M4 but + not in m4sugar; use quadrigraphs to work around this. + + -- Macro: m4_divert (DIVERSION) + M4sugar relies heavily on diversions, so rather than behaving as a + primitive, `m4_divert' behaves like: + m4_divert_pop()m4_divert_push([DIVERSION]) + *Note Diversion support::, for more details about the use of the + diversion stack. In particular, this implies that DIVERSION + should be a named diversion rather than a raw number. But be + aware that it is seldom necessary to explicitly change the + diversion stack, and that when done incorrectly, it can lead to + syntactically invalid scripts. + + -- Macro: m4_dumpdef (NAME...) + -- Macro: m4_dumpdefs (NAME...) + `m4_dumpdef' is like the M4 builtin, except that this version + requires at least one argument, output always goes to standard + error rather than the current debug file, no sorting is done on + multiple arguments, and an error is issued if any NAME is + undefined. `m4_dumpdefs' is a convenience macro that calls + `m4_dumpdef' for all of the `m4_pushdef' stack of definitions, + starting with the current, and silently does nothing if NAME is + undefined. + + Unfortunately, due to a limitation in M4 1.4.x, any macro defined + as a builtin is output as the empty string. This behavior is + rectified by using M4 1.6 or newer. However, this behavior + difference means that `m4_dumpdef' should only be used while + developing m4sugar macros, and never in the final published form + of a macro. + + -- Macro: m4_esyscmd_s (COMMAND) + Like `m4_esyscmd', this macro expands to the result of running + COMMAND in a shell. The difference is that any trailing newlines + are removed, so that the output behaves more like shell command + substitution. + + -- Macro: m4_exit (EXIT-STATUS) + This macro corresponds to `m4exit'. + + -- Macro: m4_if (COMMENT) + -- Macro: m4_if (STRING-1, STRING-2, EQUAL, [NOT-EQUAL]) + -- Macro: m4_if (STRING-1, STRING-2, EQUAL-1, STRING-3, STRING-4, + EQUAL-2, ..., [NOT-EQUAL]) + This macro corresponds to `ifelse'. STRING-1 and STRING-2 are + compared literally, so usually one of the two arguments is passed + unquoted. *Note Conditional constructs::, for more conditional + idioms. + + -- Macro: m4_include (FILE) + -- Macro: m4_sinclude (FILE) + Like the M4 builtins, but warn against multiple inclusions of FILE. + + -- Macro: m4_mkstemp (TEMPLATE) + -- Macro: m4_maketemp (TEMPLATE) + Posix requires `maketemp' to replace the trailing `X' characters + in TEMPLATE with the process id, without regards to the existence + of a file by that name, but this a security hole. When this was + pointed out to the Posix folks, they agreed to invent a new macro + `mkstemp' that always creates a uniquely named file, but not all + versions of GNU M4 support the new macro. In M4sugar, + `m4_maketemp' and `m4_mkstemp' are synonyms for each other, and + both have the secure semantics regardless of which macro the + underlying M4 provides. + + -- Macro: m4_popdef (MACRO...) + This macro fails if MACRO is not defined, even when using older + versions of M4 that did not warn. See `m4_undefine'. + + -- Macro: m4_undefine (MACRO...) + This macro fails if MACRO is not defined, even when using older + versions of M4 that did not warn. Use + + m4_ifdef([MACRO], [m4_undefine([MACRO])]) + + if you are not sure whether MACRO is defined. + + -- Macro: m4_undivert (DIVERSION...) + Unlike the M4 builtin, at least one DIVERSION must be specified. + Also, since the M4sugar diversion stack prefers named diversions, + the use of `m4_undivert' to include files is risky. *Note + Diversion support::, for more details about the use of the + diversion stack. But be aware that it is seldom necessary to + explicitly change the diversion stack, and that when done + incorrectly, it can lead to syntactically invalid scripts. + + -- Macro: m4_wrap (TEXT) + -- Macro: m4_wrap_lifo (TEXT) + These macros correspond to `m4wrap'. Posix requires arguments of + multiple wrap calls to be reprocessed at EOF in the same order as + the original calls (first-in, first-out). GNU M4 versions through + 1.4.10, however, reprocess them in reverse order (last-in, + first-out). Both orders are useful, therefore, you can rely on + `m4_wrap' to provide FIFO semantics and `m4_wrap_lifo' for LIFO + semantics, regardless of the underlying GNU M4 version. + + Unlike the GNU M4 builtin, these macros only recognize one + argument, and avoid token pasting between consecutive invocations. + On the other hand, nested calls to `m4_wrap' from within wrapped + text work just as in the builtin. + + +File: autoconf.info, Node: Diagnostic Macros, Next: Diversion support, Prev: Redefined M4 Macros, Up: Programming in M4sugar + +8.3.2 Diagnostic messages from M4sugar +-------------------------------------- + +When macros statically diagnose abnormal situations, benign or fatal, +they should report them using these macros. For issuing dynamic issues, +i.e., when `configure' is run, see *note Printing Messages::. + + -- Macro: m4_assert (EXPRESSION, [EXIT-STATUS = `1']) + Assert that the arithmetic EXPRESSION evaluates to non-zero. + Otherwise, issue a fatal error, and exit `autom4te' with + EXIT-STATUS. + + -- Macro: m4_errprintn (MESSAGE) + Similar to the builtin `m4_errprint', except that a newline is + guaranteed after MESSAGE. + + -- Macro: m4_fatal (MESSAGE) + Report a severe error MESSAGE prefixed with the current location, + and have `autom4te' die. + + -- Macro: m4_location + Useful as a prefix in a message line. Short for: + __file__:__line__ + + -- Macro: m4_warn (CATEGORY, MESSAGE) + Report MESSAGE as a warning (or as an error if requested by the + user) if warnings of the CATEGORY are turned on. If the message + is emitted, it is prefixed with the current location, and followed + by a call trace of all macros defined via `AC_DEFUN' used to get + to the current expansion. You are encouraged to use standard + categories, which currently include: + + `all' + messages that don't fall into one of the following + categories. Use of an empty CATEGORY is equivalent. + + `cross' + related to cross compilation issues. + + `obsolete' + use of an obsolete construct. + + `syntax' + dubious syntactic constructs, incorrectly ordered macro calls. + + +File: autoconf.info, Node: Diversion support, Next: Conditional constructs, Prev: Diagnostic Macros, Up: Programming in M4sugar + +8.3.3 Diversion support +----------------------- + +M4sugar makes heavy use of diversions under the hood, because it is +often the case that text that must appear early in the output is not +discovered until late in the input. Additionally, some of the +topological sorting algorithms used in resolving macro dependencies use +diversions. However, most macros should not need to change diversions +directly, but rather rely on higher-level M4sugar macros to manage +diversions transparently. If you change diversions improperly, you +risk generating a syntactically invalid script, because an incorrect +diversion will violate assumptions made by many macros about whether +prerequisite text has been previously output. In short, if you +manually change the diversion, you should not expect any macros +provided by the Autoconf package to work until you have restored the +diversion stack back to its original state. + + In the rare case that it is necessary to write a macro that +explicitly outputs text to a different diversion, it is important to be +aware of an M4 limitation regarding diversions: text only goes to a +diversion if it is not part of argument collection. Therefore, any +macro that changes the current diversion cannot be used as an unquoted +argument to another macro, but must be expanded at the top level. The +macro `m4_expand' will diagnose any attempt to change diversions, since +it is generally useful only as an argument to another macro. The +following example shows what happens when diversion manipulation is +attempted within macro arguments: + + m4_do([normal text] + m4_divert_push([KILL])unwanted[]m4_divert_pop([KILL]) + [m4_divert_push([KILL])discarded[]m4_divert_pop([KILL])])dnl + =>normal text + =>unwanted + +Notice that the unquoted text `unwanted' is output, even though it was +processed while the current diversion was `KILL', because it was +collected as part of the argument to `m4_do'. However, the text +`discarded' disappeared as desired, because the diversion changes were +single-quoted, and were not expanded until the top-level rescan of the +output of `m4_do'. + + To make diversion management easier, M4sugar uses the concept of +named diversions. Rather than using diversion numbers directly, it is +nicer to associate a name with each diversion. The diversion number +associated with a particular diversion name is an implementation +detail, and a syntax warning is issued if a diversion number is used +instead of a name. In general, you should not output text to a named +diversion until after calling the appropriate initialization routine +for your language (`m4_init', `AS_INIT', `AT_INIT', ...), although +there are some exceptions documented below. + + M4sugar defines two named diversions. +`KILL' + Text written to this diversion is discarded. This is the default + diversion once M4sugar is initialized. + +`GROW' + This diversion is used behind the scenes by topological sorting + macros, such as `AC_REQUIRE'. + + M4sh adds several more named diversions. +`BINSH' + This diversion is reserved for the `#!' interpreter line. + +`HEADER-REVISION' + This diversion holds text from `AC_REVISION'. + +`HEADER-COMMENT' + This diversion holds comments about the purpose of a file. + +`HEADER-COPYRIGHT' + This diversion is managed by `AC_COPYRIGHT'. + +`M4SH-SANITIZE' + This diversion contains M4sh sanitization code, used to ensure + M4sh is executing in a reasonable shell environment. + +`M4SH-INIT' + This diversion contains M4sh initialization code, initializing + variables that are required by other M4sh macros. + +`BODY' + This diversion contains the body of the shell code, and is the + default diversion once M4sh is initialized. + + Autotest inherits diversions from M4sh, and changes the default +diversion from `BODY' back to `KILL'. It also adds several more named +diversions, with the following subset designed for developer use. +`PREPARE_TESTS' + This diversion contains initialization sequences which are executed + after `atconfig' and `atlocal', and after all command line + arguments have been parsed, but prior to running any tests. It + can be used to set up state that is required across all tests. + This diversion will work even before `AT_INIT'. + + Autoconf inherits diversions from M4sh, and adds the following named +diversions which developers can utilize. +`DEFAULTS' + This diversion contains shell variable assignments to set defaults + that must be in place before arguments are parsed. This diversion + is placed early enough in `configure' that it is unsafe to expand + any autoconf macros into this diversion. + +`HELP_ENABLE' + If `AC_PRESERVE_HELP_ORDER' was used, then text placed in this + diversion will be included as part of a quoted here-doc providing + all of the `--help' output of `configure' related to options + created by `AC_ARG_WITH' and `AC_ARG_ENABLE'. + +`INIT_PREPARE' + This diversion occurs after all command line options have been + parsed, but prior to the main body of the `configure' script. This + diversion is the last chance to insert shell code such as variable + assignments or shell function declarations that will used by the + expansion of other macros. + + For now, the remaining named diversions of Autoconf, Autoheader, and +Autotest are not documented. In other words, intentionally outputting +text into an undocumented diversion is subject to breakage in a future +release of Autoconf. + + -- Macro: m4_cleardivert (DIVERSION...) + Permanently discard any text that has been diverted into DIVERSION. + + -- Macro: m4_divert_once (DIVERSION, [CONTENT]) + Similar to `m4_divert_text', except that CONTENT is only output to + DIVERSION if this is the first time that `m4_divert_once' has been + called with its particular arguments. + + -- Macro: m4_divert_pop ([DIVERSION]) + If provided, check that the current diversion is indeed DIVERSION. + Then change to the diversion located earlier on the stack, giving + an error if an attempt is made to pop beyond the initial m4sugar + diversion of `KILL'. + + -- Macro: m4_divert_push (DIVERSION) + Remember the former diversion on the diversion stack, and output + subsequent text into DIVERSION. M4sugar maintains a diversion + stack, and issues an error if there is not a matching pop for every + push. + + -- Macro: m4_divert_text (DIVERSION, [CONTENT]) + Output CONTENT and a newline into DIVERSION, without affecting the + current diversion. Shorthand for: + m4_divert_push([DIVERSION])CONTENT + m4_divert_pop([DIVERSION])dnl + + One use of `m4_divert_text' is to develop two related macros, where + macro `MY_A' does the work, but adjusts what work is performed + based on whether the optional macro `MY_B' has also been expanded. + Of course, it is possible to use `AC_BEFORE' within `MY_A' to + require that `MY_B' occurs first, if it occurs at all. But this + imposes an ordering restriction on the user; it would be nicer if + macros `MY_A' and `MY_B' can be invoked in either order. The trick + is to let `MY_B' leave a breadcrumb in an early diversion, which + `MY_A' can then use to determine whether `MY_B' has been expanded. + + AC_DEFUN([MY_A], + [# various actions + if test -n "$b_was_used"; then + # extra action + fi]) + AC_DEFUN([MY_B], + [AC_REQUIRE([MY_A])dnl + m4_divert_text([INIT_PREPARE], [b_was_used=true])]) + + + -- Macro: m4_init + Initialize the M4sugar environment, setting up the default named + diversion to be `KILL'. + + +File: autoconf.info, Node: Conditional constructs, Next: Looping constructs, Prev: Diversion support, Up: Programming in M4sugar + +8.3.4 Conditional constructs +---------------------------- + +The following macros provide additional conditional constructs as +convenience wrappers around `m4_if'. + + -- Macro: m4_bmatch (STRING, REGEX-1, VALUE-1, [REGEX-2], [VALUE-2], + ..., [DEFAULT]) + The string STRING is repeatedly compared against a series of REGEX + arguments; if a match is found, the expansion is the corresponding + VALUE, otherwise, the macro moves on to the next REGEX. If no + REGEX match, then the result is the optional DEFAULT, or nothing. + + -- Macro: m4_bpatsubsts (STRING, REGEX-1, SUBST-1, [REGEX-2], + [SUBST-2], ...) + The string STRING is altered by REGEX-1 and SUBST-1, as if by: + m4_bpatsubst([[STRING]], [REGEX], [SUBST]) + + The result of the substitution is then passed through the next set + of REGEX and SUBST, and so forth. An empty SUBST implies deletion + of any matched portions in the current string. Note that this + macro over-quotes STRING; this behavior is intentional, so that + the result of each step of the recursion remains as a quoted + string. However, it means that anchors (`^' and `$' in the REGEX + will line up with the extra quotations, and not the characters of + the original string. The overquoting is removed after the final + substitution. + + -- Macro: m4_case (STRING, VALUE-1, IF-VALUE-1, [VALUE-2], + [IF-VALUE-2], ..., [DEFAULT]) + Test STRING against multiple VALUE possibilities, resulting in the + first IF-VALUE for a match, or in the optional DEFAULT. This is + shorthand for: + m4_if([STRING], [VALUE-1], [IF-VALUE-1], + [STRING], [VALUE-2], [IF-VALUE-2], ..., + [DEFAULT]) + + -- Macro: m4_cond (TEST-1, VALUE-1, IF-VALUE-1, [TEST-2], [VALUE-2], + [IF-VALUE-2], ..., [DEFAULT]) + This macro was introduced in Autoconf 2.62. Similar to `m4_if', + except that each TEST is expanded only when it is encountered. + This is useful for short-circuiting expensive tests; while `m4_if' + requires all its strings to be expanded up front before doing + comparisons, `m4_cond' only expands a TEST when all earlier tests + have failed. + + For an example, these two sequences give the same result, but in + the case where `$1' does not contain a backslash, the `m4_cond' + version only expands `m4_index' once, instead of five times, for + faster computation if this is a common case for `$1'. Notice that + every third argument is unquoted for `m4_if', and quoted for + `m4_cond': + + m4_if(m4_index([$1], [\]), [-1], [$2], + m4_eval(m4_index([$1], [\\]) >= 0), [1], [$2], + m4_eval(m4_index([$1], [\$]) >= 0), [1], [$2], + m4_eval(m4_index([$1], [\`]) >= 0), [1], [$3], + m4_eval(m4_index([$1], [\"]) >= 0), [1], [$3], + [$2]) + m4_cond([m4_index([$1], [\])], [-1], [$2], + [m4_eval(m4_index([$1], [\\]) >= 0)], [1], [$2], + [m4_eval(m4_index([$1], [\$]) >= 0)], [1], [$2], + [m4_eval(m4_index([$1], [\`]) >= 0)], [1], [$3], + [m4_eval(m4_index([$1], [\"]) >= 0)], [1], [$3], + [$2]) + + -- Macro: m4_default (EXPR-1, EXPR-2) + -- Macro: m4_default_quoted (EXPR-1, EXPR-2) + -- Macro: m4_default_nblank (EXPR-1, [EXPR-2]) + -- Macro: m4_default_nblank_quoted (EXPR-1, [EXPR-2]) + If EXPR-1 contains text, use it. Otherwise, select EXPR-2. + `m4_default' expands the result, while `m4_default_quoted' does + not. Useful for providing a fixed default if the expression that + results in EXPR-1 would otherwise be empty. The difference + between `m4_default' and `m4_default_nblank' is whether an + argument consisting of just blanks (space, tab, newline) is + significant. When using the expanding versions, note that an + argument may contain text but still expand to an empty string. + + m4_define([active], [ACTIVE])dnl + m4_define([empty], [])dnl + m4_define([demo1], [m4_default([$1], [$2])])dnl + m4_define([demo2], [m4_default_quoted([$1], [$2])])dnl + m4_define([demo3], [m4_default_nblank([$1], [$2])])dnl + m4_define([demo4], [m4_default_nblank_quoted([$1], [$2])])dnl + demo1([active], [default]) + =>ACTIVE + demo1([], [active]) + =>ACTIVE + demo1([empty], [text]) + => + -demo1([ ], [active])- + =>- - + demo2([active], [default]) + =>active + demo2([], [active]) + =>active + demo2([empty], [text]) + =>empty + -demo2([ ], [active])- + =>- - + demo3([active], [default]) + =>ACTIVE + demo3([], [active]) + =>ACTIVE + demo3([empty], [text]) + => + -demo3([ ], [active])- + =>-ACTIVE- + demo4([active], [default]) + =>active + demo4([], [active]) + =>active + demo4([empty], [text]) + =>empty + -demo4([ ], [active])- + =>-active- + + -- Macro: m4_define_default (MACRO, [DEFAULT-DEFINITION]) + If MACRO does not already have a definition, then define it to + DEFAULT-DEFINITION. + + -- Macro: m4_ifblank (COND, [IF-BLANK], [IF-TEXT]) + -- Macro: m4_ifnblank (COND, [IF-TEXT], [IF-BLANK]) + If COND is empty or consists only of blanks (space, tab, newline), + then expand IF-BLANK; otherwise, expand IF-TEXT. Two variants + exist, in order to make it easier to select the correct logical + sense when using only two parameters. Note that this is more + efficient than the equivalent behavior of: + m4_ifval(m4_normalize([COND]), IF-TEXT, IF-BLANK) + + -- Macro: m4_ifndef (MACRO, IF-NOT-DEFINED, [IF-DEFINED]) + This is shorthand for: + m4_ifdef([MACRO], [IF-DEFINED], [IF-NOT-DEFINED]) + + -- Macro: m4_ifset (MACRO, [IF-TRUE], [IF-FALSE]) + If MACRO is undefined, or is defined as the empty string, expand + to IF-FALSE. Otherwise, expands to IF-TRUE. Similar to: + m4_ifval(m4_defn([MACRO]), [IF-TRUE], [IF-FALSE]) + except that it is not an error if MACRO is undefined. + + -- Macro: m4_ifval (COND, [IF-TRUE], [IF-FALSE]) + Expands to IF-TRUE if COND is not empty, otherwise to IF-FALSE. + This is shorthand for: + m4_if([COND], [], [IF-FALSE], [IF-TRUE]) + + -- Macro: m4_ifvaln (COND, [IF-TRUE], [IF-FALSE]) + Similar to `m4_ifval', except guarantee that a newline is present + after any non-empty expansion. Often followed by `dnl'. + + -- Macro: m4_n (TEXT) + Expand to TEXT, and add a newline if TEXT is not empty. Often + followed by `dnl'. + + +File: autoconf.info, Node: Looping constructs, Next: Evaluation Macros, Prev: Conditional constructs, Up: Programming in M4sugar + +8.3.5 Looping constructs +------------------------ + +The following macros are useful in implementing recursive algorithms in +M4, including loop operations. An M4 list is formed by quoting a list +of quoted elements; generally the lists are comma-separated, although +`m4_foreach_w' is whitespace-separated. For example, the list `[[a], +[b,c]]' contains two elements: `[a]' and `[b,c]'. It is common to see +lists with unquoted elements when those elements are not likely to be +macro names, as in `[fputc_unlocked, fgetc_unlocked]'. + + Although not generally recommended, it is possible for quoted lists +to have side effects; all side effects are expanded only once, and +prior to visiting any list element. On the other hand, the fact that +unquoted macros are expanded exactly once means that macros without +side effects can be used to generate lists. For example, + + m4_foreach([i], [[1], [2], [3]m4_errprintn([hi])], [i]) + error-->hi + =>123 + m4_define([list], [[1], [2], [3]]) + => + m4_foreach([i], [list], [i]) + =>123 + + -- Macro: m4_argn (N, [ARG]...) + Extracts argument N (larger than 0) from the remaining arguments. + If there are too few arguments, the empty string is used. For any + N besides 1, this is more efficient than the similar + `m4_car(m4_shiftn([N], [], [ARG...]))'. + + -- Macro: m4_car (ARG...) + Expands to the quoted first ARG. Can be used with `m4_cdr' to + recursively iterate through a list. Generally, when using quoted + lists of quoted elements, `m4_car' should be called without any + extra quotes. + + -- Macro: m4_cdr (ARG...) + Expands to a quoted list of all but the first ARG, or the empty + string if there was only one argument. Generally, when using + quoted lists of quoted elements, `m4_cdr' should be called without + any extra quotes. + + For example, this is a simple implementation of `m4_map'; note how + each iteration checks for the end of recursion, then merely + applies the first argument to the first element of the list, then + repeats with the rest of the list. (The actual implementation in + M4sugar is a bit more involved, to gain some speed and share code + with `m4_map_sep', and also to avoid expanding side effects in + `$2' twice). + m4_define([m4_map], [m4_ifval([$2], + [m4_apply([$1], m4_car($2))[]$0([$1], m4_cdr($2))])])dnl + m4_map([ m4_eval], [[[1]], [[1+1]], [[10],[16]]]) + => 1 2 a + + -- Macro: m4_for (VAR, FIRST, LAST, [STEP], EXPRESSION) + Loop over the numeric values between FIRST and LAST including + bounds by increments of STEP. For each iteration, expand + EXPRESSION with the numeric value assigned to VAR. If STEP is + omitted, it defaults to `1' or `-1' depending on the order of the + limits. If given, STEP has to match this order. The number of + iterations is determined independently from definition of VAR; + iteration cannot be short-circuited or lengthened by modifying VAR + from within EXPRESSION. + + -- Macro: m4_foreach (VAR, LIST, EXPRESSION) + Loop over the comma-separated M4 list LIST, assigning each value + to VAR, and expand EXPRESSION. The following example outputs two + lines: + + m4_foreach([myvar], [[foo], [bar, baz]], + [echo myvar + ])dnl + =>echo foo + =>echo bar, baz + + Note that for some forms of EXPRESSION, it may be faster to use + `m4_map_args'. + + -- Macro: m4_foreach_w (VAR, LIST, EXPRESSION) + Loop over the white-space-separated list LIST, assigning each value + to VAR, and expand EXPRESSION. If VAR is only referenced once in + EXPRESSION, it is more efficient to use `m4_map_args_w'. + + The deprecated macro `AC_FOREACH' is an alias of `m4_foreach_w'. + + -- Macro: m4_map (MACRO, LIST) + -- Macro: m4_mapall (MACRO, LIST) + -- Macro: m4_map_sep (MACRO, SEPARATOR, LIST) + -- Macro: m4_mapall_sep (MACRO, SEPARATOR, LIST) + Loop over the comma separated quoted list of argument descriptions + in LIST, and invoke MACRO with the arguments. An argument + description is in turn a comma-separated quoted list of quoted + elements, suitable for `m4_apply'. The macros `m4_map' and + `m4_map_sep' ignore empty argument descriptions, while `m4_mapall' + and `m4_mapall_sep' invoke MACRO with no arguments. The macros + `m4_map_sep' and `m4_mapall_sep' additionally expand SEPARATOR + between invocations of MACRO. + + Note that SEPARATOR is expanded, unlike in `m4_join'. When + separating output with commas, this means that the map result can + be used as a series of arguments, by using a single-quoted comma as + SEPARATOR, or as a single string, by using a double-quoted comma. + + m4_map([m4_count], []) + => + m4_map([ m4_count], [[], + [[1]], + [[1], [2]]]) + => 1 2 + m4_mapall([ m4_count], [[], + [[1]], + [[1], [2]]]) + => 0 1 2 + m4_map_sep([m4_eval], [,], [[[1+2]], + [[10], [16]]]) + =>3,a + m4_map_sep([m4_echo], [,], [[[a]], [[b]]]) + =>a,b + m4_count(m4_map_sep([m4_echo], [,], [[[a]], [[b]]])) + =>2 + m4_map_sep([m4_echo], [[,]], [[[a]], [[b]]]) + =>a,b + m4_count(m4_map_sep([m4_echo], [[,]], [[[a]], [[b]]])) + =>1 + + -- Macro: m4_map_args (MACRO, ARG...) + Repeatedly invoke MACRO with each successive ARG as its only + argument. In the following example, three solutions are presented + with the same expansion; the solution using `m4_map_args' is the + most efficient. + m4_define([active], [ACTIVE])dnl + m4_foreach([var], [[plain], [active]], [ m4_echo(m4_defn([var]))]) + => plain active + m4_map([ m4_echo], [[[plain]], [[active]]]) + => plain active + m4_map_args([ m4_echo], [plain], [active]) + => plain active + + In cases where it is useful to operate on additional parameters + besides the list elements, the macro `m4_curry' can be used in + MACRO to supply the argument currying necessary to generate the + desired argument list. In the following example, `list_add_n' is + more efficient than `list_add_x'. On the other hand, using + `m4_map_args_sep' can be even more efficient. + + m4_define([list], [[1], [2], [3]])dnl + m4_define([add], [m4_eval(([$1]) + ([$2]))])dnl + dnl list_add_n(N, ARG...) + dnl Output a list consisting of each ARG added to N + m4_define([list_add_n], + [m4_shift(m4_map_args([,m4_curry([add], [$1])], m4_shift($@)))])dnl + list_add_n([1], list) + =>2,3,4 + list_add_n([2], list) + =>3,4,5 + m4_define([list_add_x], + [m4_shift(m4_foreach([var], m4_dquote(m4_shift($@)), + [,add([$1],m4_defn([var]))]))])dnl + list_add_x([1], list) + =>2,3,4 + + -- Macro: m4_map_args_pair (MACRO, [MACRO-END = `macro'], ARG...) + For every pair of arguments ARG, invoke MACRO with two arguments. + If there is an odd number of arguments, invoke MACRO-END, which + defaults to MACRO, with the remaining argument. + + m4_map_args_pair([, m4_reverse], [], [1], [2], [3]) + =>, 2, 1, 3 + m4_map_args_pair([, m4_reverse], [, m4_dquote], [1], [2], [3]) + =>, 2, 1, [3] + m4_map_args_pair([, m4_reverse], [, m4_dquote], [1], [2], [3], [4]) + =>, 2, 1, 4, 3 + + -- Macro: m4_map_args_sep ([PRE], [POST], [SEP], ARG...) + Expand the sequence `PRE[ARG]POST' for each argument, additionally + expanding SEP between arguments. One common use of this macro is + constructing a macro call, where the opening and closing + parentheses are split between PRE and POST; in particular, + `m4_map_args([MACRO], [ARG])' is equivalent to + `m4_map_args_sep([MACRO(], [)], [], [ARG])'. This macro provides + the most efficient means for iterating over an arbitrary list of + arguments, particularly when repeatedly constructing a macro call + with more arguments than ARG. + + -- Macro: m4_map_args_w (STRING, [PRE], [POST], [SEP]) + Expand the sequence `PRE[word]POST' for each word in the + whitespace-separated STRING, additionally expanding SEP between + words. This macro provides the most efficient means for iterating + over a whitespace-separated string. In particular, + `m4_map_args_w([STRING], [ACTION(], [)])' is more efficient than + `m4_foreach_w([var], [STRING], [ACTION(m4_defn([var]))])'. + + -- Macro: m4_shiftn (COUNT, ...) + -- Macro: m4_shift2 (...) + -- Macro: m4_shift3 (...) + `m4_shiftn' performs COUNT iterations of `m4_shift', along with + validation that enough arguments were passed in to match the shift + count, and that the count is positive. `m4_shift2' and + `m4_shift3' are specializations of `m4_shiftn', introduced in + Autoconf 2.62, and are more efficient for two and three shifts, + respectively. + + -- Macro: m4_stack_foreach (MACRO, ACTION) + -- Macro: m4_stack_foreach_lifo (MACRO, ACTION) + For each of the `m4_pushdef' definitions of MACRO, expand ACTION + with the single argument of a definition of MACRO. + `m4_stack_foreach' starts with the oldest definition, while + `m4_stack_foreach_lifo' starts with the current definition. + ACTION should not push or pop definitions of MACRO, nor is there + any guarantee that the current definition of MACRO matches the + argument that was passed to ACTION. The macro `m4_curry' can be + used if ACTION needs more than one argument, although in that case + it is more efficient to use M4_STACK_FOREACH_SEP. + + Due to technical limitations, there are a few low-level m4sugar + functions, such as `m4_pushdef', that cannot be used as the MACRO + argument. + + m4_pushdef([a], [1])m4_pushdef([a], [2])dnl + m4_stack_foreach([a], [ m4_incr]) + => 2 3 + m4_stack_foreach_lifo([a], [ m4_curry([m4_substr], [abcd])]) + => cd bcd + + -- Macro: m4_stack_foreach_sep (MACRO, [PRE], [POST], [SEP]) + -- Macro: m4_stack_foreach_sep_lifo (MACRO, [PRE], [POST], [SEP]) + Expand the sequence `PRE[definition]POST' for each `m4_pushdef' + definition of MACRO, additionally expanding SEP between + definitions. `m4_stack_foreach_sep' visits the oldest definition + first, while `m4_stack_foreach_sep_lifo' visits the current + definition first. This macro provides the most efficient means + for iterating over a pushdef stack. In particular, + `m4_stack_foreach([MACRO], [ACTION])' is short for + `m4_stack_foreach_sep([MACRO], [ACTION(], [)])'. + + +File: autoconf.info, Node: Evaluation Macros, Next: Text processing Macros, Prev: Looping constructs, Up: Programming in M4sugar + +8.3.6 Evaluation Macros +----------------------- + +The following macros give some control over the order of the evaluation +by adding or removing levels of quotes. + + -- Macro: m4_apply (MACRO, LIST) + Apply the elements of the quoted, comma-separated LIST as the + arguments to MACRO. If LIST is empty, invoke MACRO without + arguments. Note the difference between `m4_indir', which expects + its first argument to be a macro name but can use names that are + otherwise invalid, and `m4_apply', where MACRO can contain other + text, but must end in a valid macro name. + m4_apply([m4_count], []) + =>0 + m4_apply([m4_count], [[]]) + =>1 + m4_apply([m4_count], [[1], [2]]) + =>2 + m4_apply([m4_join], [[|], [1], [2]]) + =>1|2 + + -- Macro: m4_count (ARG, ...) + This macro returns the decimal count of the number of arguments it + was passed. + + -- Macro: m4_curry (MACRO, ARG...) + This macro performs argument currying. The expansion of this + macro is another macro name that expects exactly one argument; + that argument is then appended to the ARG list, and then MACRO is + expanded with the resulting argument list. + + m4_curry([m4_curry], [m4_reverse], [1])([2])([3]) + =>3, 2, 1 + + Unfortunately, due to a limitation in M4 1.4.x, it is not possible + to pass the definition of a builtin macro as the argument to the + output of `m4_curry'; the empty string is used instead of the + builtin token. This behavior is rectified by using M4 1.6 or + newer. + + -- Macro: m4_do (ARG, ...) + This macro loops over its arguments and expands each ARG in + sequence. Its main use is for readability; it allows the use of + indentation and fewer `dnl' to result in the same expansion. This + macro guarantees that no expansion will be concatenated with + subsequent text; to achieve full concatenation, use + `m4_unquote(m4_join([], ARG...))'. + + m4_define([ab],[1])m4_define([bc],[2])m4_define([abc],[3])dnl + m4_do([a],[b])c + =>abc + m4_unquote(m4_join([],[a],[b]))c + =>3 + m4_define([a],[A])m4_define([b],[B])m4_define([c],[C])dnl + m4_define([AB],[4])m4_define([BC],[5])m4_define([ABC],[6])dnl + m4_do([a],[b])c + =>ABC + m4_unquote(m4_join([],[a],[b]))c + =>3 + + -- Macro: m4_dquote (ARG, ...) + Return the arguments as a quoted list of quoted arguments. + Conveniently, if there is just one ARG, this effectively adds a + level of quoting. + + -- Macro: m4_dquote_elt (ARG, ...) + Return the arguments as a series of double-quoted arguments. + Whereas `m4_dquote' returns a single argument, `m4_dquote_elt' + returns as many arguments as it was passed. + + -- Macro: m4_echo (ARG, ...) + Return the arguments, with the same level of quoting. Other than + discarding whitespace after unquoted commas, this macro is a no-op. + + -- Macro: m4_expand (ARG) + Return the expansion of ARG as a quoted string. Whereas + `m4_quote' is designed to collect expanded text into a single + argument, `m4_expand' is designed to perform one level of expansion + on quoted text. One distinction is in the treatment of whitespace + following a comma in the original ARG. Any time multiple + arguments are collected into one with `m4_quote', the M4 argument + collection rules discard the whitespace. However, with + `m4_expand', whitespace is preserved, even after the expansion of + macros contained in ARG. Additionally, `m4_expand' is able to + expand text that would involve an unterminated comment, whereas + expanding that same text as the argument to `m4_quote' runs into + difficulty in finding the end of the argument. Since manipulating + diversions during argument collection is inherently unsafe, + `m4_expand' issues an error if ARG attempts to change the current + diversion (*note Diversion support::). + + m4_define([active], [ACT, IVE])dnl + m4_define([active2], [[ACT, IVE]])dnl + m4_quote(active, active) + =>ACT,IVE,ACT,IVE + m4_expand([active, active]) + =>ACT, IVE, ACT, IVE + m4_quote(active2, active2) + =>ACT, IVE,ACT, IVE + m4_expand([active2, active2]) + =>ACT, IVE, ACT, IVE + m4_expand([# m4_echo]) + =># m4_echo + m4_quote(# m4_echo) + ) + =># m4_echo) + => + + Note that `m4_expand' cannot handle an ARG that expands to literal + unbalanced quotes, but that quadrigraphs can be used when + unbalanced output is necessary. Likewise, unbalanced parentheses + should be supplied with double quoting or a quadrigraph. + + m4_define([pattern], [[!@<:@]])dnl + m4_define([bar], [BAR])dnl + m4_expand([case $foo in + m4_defn([pattern])@:}@ bar ;; + *[)] blah ;; + esac]) + =>case $foo in + => [![]) BAR ;; + => *) blah ;; + =>esac + + -- Macro: m4_ignore (...) + This macro was introduced in Autoconf 2.62. Expands to nothing, + ignoring all of its arguments. By itself, this isn't very useful. + However, it can be used to conditionally ignore an arbitrary + number of arguments, by deciding which macro name to apply to a + list of arguments. + dnl foo outputs a message only if [debug] is defined. + m4_define([foo], + [m4_ifdef([debug],[AC_MSG_NOTICE],[m4_ignore])([debug message])]) + + Note that for earlier versions of Autoconf, the macro `__gnu__' can + serve the same purpose, although it is less readable. + + -- Macro: m4_make_list (ARG, ...) + This macro exists to aid debugging of M4sugar algorithms. Its net + effect is similar to `m4_dquote'--it produces a quoted list of + quoted arguments, for each ARG. The difference is that this + version uses a comma-newline separator instead of just comma, to + improve readability of the list; with the result that it is less + efficient than `m4_dquote'. + m4_define([zero],[0])m4_define([one],[1])m4_define([two],[2])dnl + m4_dquote(zero, [one], [[two]]) + =>[0],[one],[[two]] + m4_make_list(zero, [one], [[two]]) + =>[0], + =>[one], + =>[[two]] + m4_foreach([number], m4_dquote(zero, [one], [[two]]), [ number]) + => 0 1 two + m4_foreach([number], m4_make_list(zero, [one], [[two]]), [ number]) + => 0 1 two + + -- Macro: m4_quote (ARG, ...) + Return the arguments as a single entity, i.e., wrap them into a + pair of quotes. This effectively collapses multiple arguments + into one, although it loses whitespace after unquoted commas in + the process. + + -- Macro: m4_reverse (ARG, ...) + Outputs each argument with the same level of quoting, but in + reverse order, and with space following each comma for readability. + + m4_define([active], [ACT,IVE]) + => + m4_reverse(active, [active]) + =>active, IVE, ACT + + -- Macro: m4_unquote (ARG, ...) + This macro was introduced in Autoconf 2.62. Expand each argument, + separated by commas. For a single ARG, this effectively removes a + layer of quoting, and `m4_unquote([ARG])' is more efficient than + the equivalent `m4_do([ARG])'. For multiple arguments, this + results in an unquoted list of expansions. This is commonly used + with `m4_split', in order to convert a single quoted list into a + series of quoted elements. + + The following example aims at emphasizing the difference between +several scenarios: not using these macros, using `m4_defn', using +`m4_quote', using `m4_dquote', and using `m4_expand'. + + $ cat example.m4 + dnl Overquote, so that quotes are visible. + m4_define([show], [$[]1 = [$1], $[]@ = [$@]]) + m4_define([a], [A]) + m4_define([mkargs], [1, 2[,] 3]) + m4_define([arg1], [[$1]]) + m4_divert([0])dnl + show(a, b) + show([a, b]) + show(m4_quote(a, b)) + show(m4_dquote(a, b)) + show(m4_expand([a, b])) + + arg1(mkargs) + arg1([mkargs]) + arg1(m4_defn([mkargs])) + arg1(m4_quote(mkargs)) + arg1(m4_dquote(mkargs)) + arg1(m4_expand([mkargs])) + $ autom4te -l m4sugar example.m4 + $1 = A, $@ = [A],[b] + $1 = a, b, $@ = [a, b] + $1 = A,b, $@ = [A,b] + $1 = [A],[b], $@ = [[A],[b]] + $1 = A, b, $@ = [A, b] + + 1 + mkargs + 1, 2[,] 3 + 1,2, 3 + [1],[2, 3] + 1, 2, 3 + + +File: autoconf.info, Node: Text processing Macros, Next: Number processing Macros, Prev: Evaluation Macros, Up: Programming in M4sugar + +8.3.7 String manipulation in M4 +------------------------------- + +The following macros may be used to manipulate strings in M4. Many of +the macros in this section intentionally result in quoted strings as +output, rather than subjecting the arguments to further expansions. As +a result, if you are manipulating text that contains active M4 +characters, the arguments are passed with single quoting rather than +double. + + -- Macro: m4_append (MACRO-NAME, STRING, [SEPARATOR]) + -- Macro: m4_append_uniq (MACRO-NAME, STRING, [SEPARATOR] [IF-UNIQ], + [IF-DUPLICATE]) + Redefine MACRO-NAME to its former contents with SEPARATOR and + STRING added at the end. If MACRO-NAME was undefined before (but + not if it was defined but empty), then no SEPARATOR is added. As + of Autoconf 2.62, neither STRING nor SEPARATOR are expanded during + this macro; instead, they are expanded when MACRO-NAME is invoked. + + `m4_append' can be used to grow strings, and `m4_append_uniq' to + grow strings without duplicating substrings. Additionally, + `m4_append_uniq' takes two optional parameters as of Autoconf 2.62; + IF-UNIQ is expanded if STRING was appended, and IF-DUPLICATE is + expanded if STRING was already present. Also, `m4_append_uniq' + warns if SEPARATOR is not empty, but occurs within STRING, since + that can lead to duplicates. + + Note that `m4_append' can scale linearly in the length of the final + string, depending on the quality of the underlying M4 + implementation, while `m4_append_uniq' has an inherent quadratic + scaling factor. If an algorithm can tolerate duplicates in the + final string, use the former for speed. If duplicates must be + avoided, consider using `m4_set_add' instead (*note Set + manipulation Macros::). + + m4_define([active], [ACTIVE])dnl + m4_append([sentence], [This is an])dnl + m4_append([sentence], [ active ])dnl + m4_append([sentence], [symbol.])dnl + sentence + =>This is an ACTIVE symbol. + m4_undefine([active])dnl + =>This is an active symbol. + m4_append_uniq([list], [one], [, ], [new], [existing]) + =>new + m4_append_uniq([list], [one], [, ], [new], [existing]) + =>existing + m4_append_uniq([list], [two], [, ], [new], [existing]) + =>new + m4_append_uniq([list], [three], [, ], [new], [existing]) + =>new + m4_append_uniq([list], [two], [, ], [new], [existing]) + =>existing + list + =>one, two, three + m4_dquote(list) + =>[one],[two],[three] + m4_append([list2], [one], [[, ]])dnl + m4_append_uniq([list2], [two], [[, ]])dnl + m4_append([list2], [three], [[, ]])dnl + list2 + =>one, two, three + m4_dquote(list2) + =>[one, two, three] + + -- Macro: m4_append_uniq_w (MACRO-NAME, STRINGS) + This macro was introduced in Autoconf 2.62. It is similar to + `m4_append_uniq', but treats STRINGS as a whitespace separated + list of words to append, and only appends unique words. + MACRO-NAME is updated with a single space between new words. + m4_append_uniq_w([numbers], [1 1 2])dnl + m4_append_uniq_w([numbers], [ 2 3 ])dnl + numbers + =>1 2 3 + + -- Macro: m4_chomp (STRING) + -- Macro: m4_chomp_all (STRING) + Output STRING in quotes, but without a trailing newline. The + macro `m4_chomp' is slightly faster, and removes at most one + newline; the macro `m4_chomp_all' removes all consecutive trailing + newlines. Unlike `m4_flatten', embedded newlines are left intact, + and backslash does not influence the result. + + -- Macro: m4_combine ([SEPARATOR], PREFIX-LIST, [INFIX], SUFFIX-1, + [SUFFIX-2], ...) + This macro produces a quoted string containing the pairwise + combination of every element of the quoted, comma-separated + PREFIX-LIST, and every element from the SUFFIX arguments. Each + pairwise combination is joined with INFIX in the middle, and + successive pairs are joined by SEPARATOR. No expansion occurs on + any of the arguments. No output occurs if either the PREFIX or + SUFFIX list is empty, but the lists can contain empty elements. + m4_define([a], [oops])dnl + m4_combine([, ], [[a], [b], [c]], [-], [1], [2], [3]) + =>a-1, a-2, a-3, b-1, b-2, b-3, c-1, c-2, c-3 + m4_combine([, ], [[a], [b]], [-]) + => + m4_combine([, ], [[a], [b]], [-], []) + =>a-, b- + m4_combine([, ], [], [-], [1], [2]) + => + m4_combine([, ], [[]], [-], [1], [2]) + =>-1, -2 + + -- Macro: m4_escape (STRING) + Convert all instances of `[', `]', `#', and `$' within STRING into + their respective quadrigraphs. The result is still a quoted + string. + + -- Macro: m4_flatten (STRING) + Flatten STRING into a single line. Delete all backslash-newline + pairs, and replace all remaining newlines with a space. The + result is still a quoted string. + + -- Macro: m4_join ([SEPARATOR], ARGS...) + -- Macro: m4_joinall ([SEPARATOR], ARGS...) + Concatenate each ARG, separated by SEPARATOR. `joinall' uses + every argument, while `join' omits empty arguments so that there + are no back-to-back separators in the output. The result is a + quoted string. + m4_define([active], [ACTIVE])dnl + m4_join([|], [one], [], [active], [two]) + =>one|active|two + m4_joinall([|], [one], [], [active], [two]) + =>one||active|two + + Note that if all you intend to do is join ARGS with commas between + them, to form a quoted list suitable for `m4_foreach', it is more + efficient to use `m4_dquote'. + + -- Macro: m4_newline ([TEXT]) + This macro was introduced in Autoconf 2.62, and expands to a + newline, followed by any TEXT. It is primarily useful for + maintaining macro formatting, and ensuring that M4 does not + discard leading whitespace during argument collection. + + -- Macro: m4_normalize (STRING) + Remove leading and trailing spaces and tabs, sequences of + backslash-then-newline, and replace multiple spaces, tabs, and + newlines with a single space. This is a combination of + `m4_flatten' and `m4_strip'. To determine if STRING consists only + of bytes that would be removed by `m4_normalize', you can use + `m4_ifblank'. + + -- Macro: m4_re_escape (STRING) + Backslash-escape all characters in STRING that are active in + regexps. + + -- Macro: m4_split (STRING, [REGEXP = `[\t ]+']) + Split STRING into an M4 list of elements quoted by `[' and `]', + while keeping white space at the beginning and at the end. If + REGEXP is given, use it instead of `[\t ]+' for splitting. If + STRING is empty, the result is an empty list. + + -- Macro: m4_strip (STRING) + Strip whitespace from STRING. Sequences of spaces and tabs are + reduced to a single space, then leading and trailing spaces are + removed. The result is still a quoted string. Note that this + does not interfere with newlines; if you want newlines stripped as + well, consider `m4_flatten', or do it all at once with + `m4_normalize'. To quickly test if STRING has only whitespace, + use `m4_ifblank'. + + -- Macro: m4_text_box (MESSAGE, [FRAME = `-']) + Add a text box around MESSAGE, using FRAME as the border character + above and below the message. The FRAME argument must be a single + byte, and does not support quadrigraphs. The frame correctly + accounts for the subsequent expansion of MESSAGE. For example: + m4_define([macro], [abc])dnl + m4_text_box([macro]) + =>## --- ## + =>## abc ## + =>## --- ## + + The MESSAGE must contain balanced quotes and parentheses, although + quadrigraphs can be used to work around this. + + -- Macro: m4_text_wrap (STRING, [PREFIX], [PREFIX1 = `PREFIX'], [WIDTH + = `79']) + Break STRING into a series of whitespace-separated words, then + output those words separated by spaces, and wrapping lines any + time the output would exceed WIDTH columns. If given, PREFIX1 + begins the first line, and PREFIX begins all wrapped lines. If + PREFIX1 is longer than PREFIX, then the first line consists of + just PREFIX1. If PREFIX is longer than PREFIX1, padding is + inserted so that the first word of STRING begins at the same + indentation as all wrapped lines. Note that using literal tab + characters in any of the arguments will interfere with the + calculation of width. No expansions occur on PREFIX, PREFIX1, or + the words of STRING, although quadrigraphs are recognized. + + For some examples: + m4_text_wrap([Short string */], [ ], [/* ], [20]) + =>/* Short string */ + m4_text_wrap([Much longer string */], [ ], [/* ], [20]) + =>/* Much longer + => string */ + m4_text_wrap([Short doc.], [ ], [ --short ], [30]) + => --short Short doc. + m4_text_wrap([Short doc.], [ ], [ --too-wide ], [30]) + => --too-wide + => Short doc. + m4_text_wrap([Super long documentation.], [ ], + [ --too-wide ], 30) + => --too-wide + => Super long + => documentation. + + -- Macro: m4_tolower (STRING) + -- Macro: m4_toupper (STRING) + Return STRING with letters converted to upper or lower case, + respectively. + + +File: autoconf.info, Node: Number processing Macros, Next: Set manipulation Macros, Prev: Text processing Macros, Up: Programming in M4sugar + +8.3.8 Arithmetic computation in M4 +---------------------------------- + +The following macros facilitate integer arithmetic operations. Where a +parameter is documented as taking an arithmetic expression, you can use +anything that can be parsed by `m4_eval'. + + -- Macro: m4_cmp (EXPR-1, EXPR-2) + Compare the arithmetic expressions EXPR-1 and EXPR-2, and expand + to `-1' if EXPR-1 is smaller, `0' if they are equal, and `1' if + EXPR-1 is larger. + + -- Macro: m4_list_cmp (LIST-1, LIST-2) + Compare the two M4 lists consisting of comma-separated arithmetic + expressions, left to right. Expand to `-1' for the first element + pairing where the value from LIST-1 is smaller, `1' where the + value from LIST-2 is smaller, or `0' if both lists have the same + values. If one list is shorter than the other, the remaining + elements of the longer list are compared against zero. + m4_list_cmp([1, 0], [1]) + =>0 + m4_list_cmp([1, [1 * 0]], [1, 0]) + =>0 + m4_list_cmp([1, 2], [1, 0]) + =>1 + m4_list_cmp([1, [1+1], 3],[1, 2]) + =>1 + m4_list_cmp([1, 2, -3], [1, 2]) + =>-1 + m4_list_cmp([1, 0], [1, 2]) + =>-1 + m4_list_cmp([1], [1, 2]) + =>-1 + + -- Macro: m4_max (ARG, ...) + This macro was introduced in Autoconf 2.62. Expand to the decimal + value of the maximum arithmetic expression among all the arguments. + + -- Macro: m4_min (ARG, ...) + This macro was introduced in Autoconf 2.62. Expand to the decimal + value of the minimum arithmetic expression among all the arguments. + + -- Macro: m4_sign (EXPR) + Expand to `-1' if the arithmetic expression EXPR is negative, `1' + if it is positive, and `0' if it is zero. + + -- Macro: m4_version_compare (VERSION-1, VERSION-2) + This macro was introduced in Autoconf 2.53, but had a number of + usability limitations that were not lifted until Autoconf 2.62. + Compare the version strings VERSION-1 and VERSION-2, and expand to + `-1' if VERSION-1 is smaller, `0' if they are the same, or `1' + VERSION-2 is smaller. Version strings must be a list of elements + separated by `.', `,' or `-', where each element is a number along + with optional case-insensitive letters designating beta releases. + The comparison stops at the leftmost element that contains a + difference, although a 0 element compares equal to a missing + element. + + It is permissible to include commit identifiers in VERSION, such + as an abbreviated SHA1 of the commit, provided there is still a + monotonically increasing prefix to allow for accurate version-based + comparisons. For example, this paragraph was written when the + development snapshot of autoconf claimed to be at version + `2.61a-248-dc51', or 248 commits after the 2.61a release, with an + abbreviated commit identification of `dc51'. + + m4_version_compare([1.1], [2.0]) + =>-1 + m4_version_compare([2.0b], [2.0a]) + =>1 + m4_version_compare([1.1.1], [1.1.1a]) + =>-1 + m4_version_compare([1.2], [1.1.1a]) + =>1 + m4_version_compare([1.0], [1]) + =>0 + m4_version_compare([1.1pre], [1.1PRE]) + =>0 + m4_version_compare([1.1a], [1,10]) + =>-1 + m4_version_compare([2.61a], [2.61a-248-dc51]) + =>-1 + m4_version_compare([2.61b], [2.61a-248-dc51]) + =>1 + + -- Macro: m4_version_prereq (VERSION, [IF-NEW-ENOUGH], [IF-OLD = + `m4_fatal']) + Compares VERSION against the version of Autoconf currently + running. If the running version is at VERSION or newer, expand + IF-NEW-ENOUGH, but if VERSION is larger than the version currently + executing, expand IF-OLD, which defaults to printing an error + message and exiting m4sugar with status 63. When given only one + argument, this behaves like `AC_PREREQ' (*note Versioning::). + Remember that the autoconf philosophy favors feature checks over + version checks. + + +File: autoconf.info, Node: Set manipulation Macros, Next: Forbidden Patterns, Prev: Number processing Macros, Up: Programming in M4sugar + +8.3.9 Set manipulation in M4 +---------------------------- + +Sometimes, it is necessary to track a set of data, where the order does +not matter and where there are no duplicates in the set. The following +macros facilitate set manipulations. Each set is an opaque object, +which can only be accessed via these basic operations. The underlying +implementation guarantees linear scaling for set creation, which is more +efficient than using the quadratic `m4_append_uniq'. Both set names +and values can be arbitrary strings, except for unbalanced quotes. +This implementation ties up memory for removed elements until the next +operation that must traverse all the elements of a set; and although +that may slow down some operations until the memory for removed elements +is pruned, it still guarantees linear performance. + + -- Macro: m4_set_add (SET, VALUE, [IF-UNIQ], [IF-DUP]) + Adds the string VALUE as a member of set SET. Expand IF-UNIQ if + the element was added, or IF-DUP if it was previously in the set. + Operates in amortized constant time, so that set creation scales + linearly. + + -- Macro: m4_set_add_all (SET, VALUE...) + Adds each VALUE to the set SET. This is slightly more efficient + than repeatedly invoking `m4_set_add'. + + -- Macro: m4_set_contains (SET, VALUE, [IF-PRESENT], [IF-ABSENT]) + Expands IF-PRESENT if the string VALUE is a member of SET, + otherwise IF-ABSENT. + + m4_set_contains([a], [1], [yes], [no]) + =>no + m4_set_add([a], [1], [added], [dup]) + =>added + m4_set_add([a], [1], [added], [dup]) + =>dup + m4_set_contains([a], [1], [yes], [no]) + =>yes + m4_set_remove([a], [1], [removed], [missing]) + =>removed + m4_set_contains([a], [1], [yes], [no]) + =>no + m4_set_remove([a], [1], [removed], [missing]) + =>missing + + -- Macro: m4_set_contents (SET, [SEP]) + -- Macro: m4_set_dump (SET, [SEP]) + Expands to a single string consisting of all the members of the set + SET, each separated by SEP, which is not expanded. + `m4_set_contents' leaves the elements in SET but reclaims any + memory occupied by removed elements, while `m4_set_dump' is a + faster one-shot action that also deletes the set. No provision is + made for disambiguating members that contain a non-empty SEP as a + substring; use `m4_set_empty' to distinguish between an empty set + and the set containing only the empty string. The order of the + output is unspecified; in the current implementation, part of the + speed of `m4_set_dump' results from using a different output order + than `m4_set_contents'. These macros scale linearly in the size + of the set before memory pruning, and `m4_set_contents([SET], + [SEP])' is faster than `m4_joinall([SEP]m4_set_listc([SET]))'. + + m4_set_add_all([a], [1], [2], [3]) + => + m4_set_contents([a], [-]) + =>1-2-3 + m4_joinall([-]m4_set_listc([a])) + =>1-2-3 + m4_set_dump([a], [-]) + =>3-2-1 + m4_set_contents([a]) + => + m4_set_add([a], []) + => + m4_set_contents([a], [-]) + => + + -- Macro: m4_set_delete (SET) + Delete all elements and memory associated with SET. This is + linear in the set size, and faster than removing one element at a + time. + + -- Macro: m4_set_difference (SETA, SETB) + -- Macro: m4_set_intersection (SETA, SETB) + -- Macro: m4_set_union (SETA, SETB) + Compute the relation between SETA and SETB, and output the result + as a list of quoted arguments without duplicates and with a + leading comma. Set difference selects the elements in SETA but + not SETB, intersection selects only elements in both sets, and + union selects elements in either set. These actions are linear in + the sum of the set sizes. The leading comma is necessary to + distinguish between no elements and the empty string as the only + element. + + m4_set_add_all([a], [1], [2], [3]) + => + m4_set_add_all([b], [3], [], [4]) + => + m4_set_difference([a], [b]) + =>,1,2 + m4_set_difference([b], [a]) + =>,,4 + m4_set_intersection([a], [b]) + =>,3 + m4_set_union([a], [b]) + =>,1,2,3,,4 + + -- Macro: m4_set_empty (SET, [IF-EMPTY], [IF-ELEMENTS]) + Expand IF-EMPTY if the set SET has no elements, otherwise expand + IF-ELEMENTS. This macro operates in constant time. Using this + macro can help disambiguate output from `m4_set_contents' or + `m4_set_list'. + + -- Macro: m4_set_foreach (SET, VARIABLE, ACTION) + For each element in the set SET, expand ACTION with the macro + VARIABLE defined as the set element. Behavior is unspecified if + ACTION recursively lists the contents of SET (although listing + other sets is acceptable), or if it modifies the set in any way + other than removing the element currently contained in VARIABLE. + This macro is faster than the corresponding `m4_foreach([VARIABLE], + m4_indir([m4_dquote]m4_set_listc([SET])), [ACTION])', although + `m4_set_map' might be faster still. + + m4_set_add_all([a]m4_for([i], [1], [5], [], [,i])) + => + m4_set_contents([a]) + =>12345 + m4_set_foreach([a], [i], + [m4_if(m4_eval(i&1), [0], [m4_set_remove([a], i, [i])])]) + =>24 + m4_set_contents([a]) + =>135 + + -- Macro: m4_set_list (SET) + -- Macro: m4_set_listc (SET) + Produce a list of arguments, where each argument is a quoted + element from the set SET. The variant `m4_set_listc' is + unambiguous, by adding a leading comma if there are any set + elements, whereas the variant `m4_set_list' cannot distinguish + between an empty set and a set containing only the empty string. + These can be directly used in macros that take multiple arguments, + such as `m4_join' or `m4_set_add_all', or wrapped by `m4_dquote' + for macros that take a quoted list, such as `m4_map' or + `m4_foreach'. Any memory occupied by removed elements is + reclaimed during these macros. + + m4_set_add_all([a], [1], [2], [3]) + => + m4_set_list([a]) + =>1,2,3 + m4_set_list([b]) + => + m4_set_listc([b]) + => + m4_count(m4_set_list([b])) + =>1 + m4_set_empty([b], [0], [m4_count(m4_set_list([b]))]) + =>0 + m4_set_add([b], []) + => + m4_set_list([b]) + => + m4_set_listc([b]) + =>, + m4_count(m4_set_list([b])) + =>1 + m4_set_empty([b], [0], [m4_count(m4_set_list([b]))]) + =>1 + + -- Macro: m4_set_map (SET, ACTION) + For each element in the set SET, expand ACTION with a single + argument of the set element. Behavior is unspecified if ACTION + recursively lists the contents of SET (although listing other sets + is acceptable), or if it modifies the set in any way other than + removing the element passed as an argument. This macro is faster + than either corresponding counterpart of + `m4_map_args([ACTION]m4_set_listc([SET]))' or + `m4_set_foreach([SET], [var], [ACTION(m4_defn([var]))])'. It is + possible to use `m4_curry' if more than one argument is needed for + ACTION, although it is more efficient to use `m4_set_map_sep' in + that case. + + -- Macro: m4_set_map_sep (SET, [PRE], [POST], [SEP]) + For each element in the set SET, expand `PRE[element]POST', + additionally expanding SEP between elements. Behavior is + unspecified if the expansion recursively lists the contents of SET + (although listing other sets is acceptable), or if it modifies the + set in any way other than removing the element visited by the + expansion. This macro provides the most efficient means for + non-destructively visiting the elements of a set; in particular, + `m4_set_map([SET], [ACTION])' is equivalent to + `m4_set_map_sep([SET], [ACTION(], [)])'. + + -- Macro: m4_set_remove (SET, VALUE, [IF-PRESENT], [IF-ABSENT]) + If VALUE is an element in the set SET, then remove it and expand + IF-PRESENT. Otherwise expand IF-ABSENT. This macro operates in + constant time so that multiple removals will scale linearly rather + than quadratically; but when used outside of `m4_set_foreach' or + `m4_set_map', it leaves memory occupied until the set is later + compacted by `m4_set_contents' or `m4_set_list'. Several other + set operations are then less efficient between the time of element + removal and subsequent memory compaction, but still maintain their + guaranteed scaling performance. + + -- Macro: m4_set_size (SET) + Expand to the size of the set SET. This implementation operates + in constant time, and is thus more efficient than + `m4_eval(m4_count(m4_set_listc([set])) - 1)'. + + +File: autoconf.info, Node: Forbidden Patterns, Prev: Set manipulation Macros, Up: Programming in M4sugar + +8.3.10 Forbidden Patterns +------------------------- + +M4sugar provides a means to define suspicious patterns, patterns +describing tokens which should not be found in the output. For +instance, if an Autoconf `configure' script includes tokens such as +`AC_DEFINE', or `dnl', then most probably something went wrong +(typically a macro was not evaluated because of overquotation). + + M4sugar forbids all the tokens matching `^_?m4_' and `^dnl$'. +Additional layers, such as M4sh and Autoconf, add additional forbidden +patterns to the list. + + -- Macro: m4_pattern_forbid (PATTERN) + Declare that no token matching PATTERN must be found in the output. + Comments are not checked; this can be a problem if, for instance, + you have some macro left unexpanded after an `#include'. No + consensus is currently found in the Autoconf community, as some + people consider it should be valid to name macros in comments + (which doesn't make sense to the authors of this documentation: + input, such as macros, should be documented by `dnl' comments; + reserving `#'-comments to document the output). + + Of course, you might encounter exceptions to these generic rules, for +instance you might have to refer to `$m4_flags'. + + -- Macro: m4_pattern_allow (PATTERN) + Any token matching PATTERN is allowed, including if it matches an + `m4_pattern_forbid' pattern. + + +File: autoconf.info, Node: Debugging via autom4te, Prev: Programming in M4sugar, Up: Programming in M4 + +8.4 Debugging via autom4te +========================== + +At times, it is desirable to see what was happening inside m4, to see +why output was not matching expectations. However, post-processing done +by `autom4te' means that directly using the m4 builtin `m4_traceon' is +likely to interfere with operation. Also, frequent diversion changes +and the concept of forbidden tokens make it difficult to use `m4_defn' +to generate inline comments in the final output. + + There are a couple of tools to help with this. One is the use of the +`--trace' option provided by `autom4te' (as well as each of the +programs that wrap `autom4te', such as `autoconf'), in order to inspect +when a macro is called and with which arguments. For example, when +this paragraph was written, the autoconf version could be found by: + + $ autoconf --trace=AC_INIT + configure.ac:23:AC_INIT:GNU Autoconf:2.63b.95-3963:bug-autoconf@gnu.org + $ autoconf --trace='AC_INIT:version is $2' + version is 2.63b.95-3963 + + Another trick is to print out the expansion of various m4 +expressions to standard error or to an independent file, with no +further m4 expansion, and without interfering with diversion changes or +the post-processing done to standard output. `m4_errprintn' shows a +given expression on standard error. For example, if you want to see +the expansion of an autoconf primitive or of one of your autoconf +macros, you can do it like this: + + $ cat <<\EOF > configure.ac + AC_INIT + m4_errprintn([The definition of AC_DEFINE_UNQUOTED:]) + m4_errprintn(m4_defn([AC_DEFINE_UNQUOTED])) + AC_OUTPUT + EOF + $ autoconf + error-->The definition of AC_DEFINE_UNQUOTED: + error-->_AC_DEFINE_Q([], $@) + + +File: autoconf.info, Node: Programming in M4sh, Next: Writing Autoconf Macros, Prev: Programming in M4, Up: Top + +9 Programming in M4sh +********************* + +M4sh, pronounced "mash", is aiming at producing portable Bourne shell +scripts. This name was coined by Lars J. Aas, who notes that, +according to the Webster's Revised Unabridged Dictionary (1913): + + Mash \Mash\, n. [Akin to G. meisch, maisch, meische, maische, + mash, wash, and prob. to AS. miscian to mix. See "Mix".] + + 1. A mass of mixed ingredients reduced to a soft pulpy state by + beating or pressure... + + 2. A mixture of meal or bran and water fed to animals. + + 3. A mess; trouble. [Obs.] -Beau. & Fl. + + M4sh reserves the M4 macro namespace `^_AS_' for internal use, and +the namespace `^AS_' for M4sh macros. It also reserves the shell and +environment variable namespace `^as_', and the here-document delimiter +namespace `^_AS[A-Z]' in the output file. You should not define your +own macros or output shell code that conflicts with these namespaces. + +* Menu: + +* Common Shell Constructs:: Portability layer for common shell constructs +* Polymorphic Variables:: Support for indirect variable names +* Initialization Macros:: Macros to establish a sane shell environment +* File Descriptor Macros:: File descriptor macros for input and output + + +File: autoconf.info, Node: Common Shell Constructs, Next: Polymorphic Variables, Up: Programming in M4sh + +9.1 Common Shell Constructs +=========================== + +M4sh provides portable alternatives for some common shell constructs +that unfortunately are not portable in practice. + + -- Macro: AS_BOX (TEXT, [CHAR = `-']) + Expand into shell code that will output TEXT surrounded by a box + with CHAR in the top and bottom border. TEXT should not contain a + newline, but may contain shell expansions valid for unquoted + here-documents. CHAR defaults to `-', but can be any character + except `/', `'', `"', `\', `&', or ``'. This is useful for + outputting a comment box into log files to separate distinct + phases of script operation. + + -- Macro: AS_CASE (WORD, [PATTERN1], [IF-MATCHED1], ..., [DEFAULT]) + Expand into a shell `case' statement, where WORD is matched + against one or more patterns. IF-MATCHED is run if the + corresponding pattern matched WORD, else DEFAULT is run. Avoids + several portability issues (*note Limitations of Shell Builtins: + case.). + + -- Macro: AS_DIRNAME (FILE-NAME) + Output the directory portion of FILE-NAME. For example, if + `$file' is `/one/two/three', the command + `dir=`AS_DIRNAME(["$file"])`' sets `dir' to `/one/two'. + + This interface may be improved in the future to avoid forks and + losing trailing newlines. + + -- Macro: AS_ECHO (WORD) + Emits WORD to the standard output, followed by a newline. WORD + must be a single shell word (typically a quoted string). The + bytes of WORD are output as-is, even if it starts with "-" or + contains "\". Redirections can be placed outside the macro + invocation. This is much more portable than using `echo' (*note + Limitations of Shell Builtins: echo.). + + -- Macro: AS_ECHO_N (WORD) + Emits WORD to the standard output, without a following newline. + WORD must be a single shell word (typically a quoted string) and, + for portability, should not include more than one newline. The + bytes of WORD are output as-is, even if it starts with "-" or + contains "\". Redirections can be placed outside the macro + invocation. + + -- Macro: AS_ESCAPE (STRING, [CHARS = ``\"$']) + Expands to STRING, with any characters in CHARS escaped with a + backslash (`\'). CHARS should be at most four bytes long, and + only contain characters from the set ``\"$'; however, characters + may be safely listed more than once in CHARS for the sake of + syntax highlighting editors. The current implementation expands + STRING after adding escapes; if STRING contains macro calls that + in turn expand to text needing shell quoting, you can use + `AS_ESCAPE(m4_dquote(m4_expand([string])))'. + + The default for CHARS (`\"$`') is the set of characters needing + escapes when STRING will be used literally within double quotes. + One common variant is the set of characters to protect when STRING + will be used literally within back-ticks or an unquoted + here-document (`\$`'). Another common variant is `""', which can + be used to form a double-quoted string containing the same + expansions that would have occurred if STRING were expanded in an + unquoted here-document; however, when using this variant, care + must be taken that STRING does not use double quotes within + complex variable expansions (such as `${foo-`echo "hi"`}') that + would be broken with improper escapes. + + This macro is often used with `AS_ECHO'. For an example, observe + the output generated by the shell code generated from this snippet: + + foo=bar + AS_ECHO(["AS_ESCAPE(["$foo" = ])AS_ESCAPE(["$foo"], [""])"]) + =>"$foo" = "bar" + m4_define([macro], [a, [\b]]) + AS_ECHO(["AS_ESCAPE([[macro]])"]) + =>macro + AS_ECHO(["AS_ESCAPE([macro])"]) + =>a, b + AS_ECHO(["AS_ESCAPE(m4_dquote(m4_expand([macro])))"]) + =>a, \b + + To escape a string that will be placed within single quotes, use: + + m4_bpatsubst([[STRING]], ['], ['\\'']) + + -- Macro: AS_EXECUTABLE_P (FILE) + Emit code to probe whether FILE is a regular file with executable + permissions (and not a directory with search permissions). The + caller is responsible for quoting FILE. + + -- Macro: AS_EXIT ([STATUS = `$?']) + Emit code to exit the shell with STATUS, defaulting to `$?'. This + macro works around shells that see the exit status of the command + prior to `exit' inside a `trap 0' handler (*note Limitations of + Shell Builtins: trap.). + + -- Macro: AS_IF (TEST1, [RUN-IF-TRUE1], ..., [RUN-IF-FALSE]) + Run shell code TEST1. If TEST1 exits with a zero status then run + shell code RUN-IF-TRUE1, else examine further tests. If no test + exits with a zero status, run shell code RUN-IF-FALSE, with + simplifications if either RUN-IF-TRUE1 or RUN-IF-FALSE is empty. + For example, + + AS_IF([test "x$foo" = xyes], [HANDLE_FOO([yes])], + [test "x$foo" != xno], [HANDLE_FOO([maybe])], + [echo foo not specified]) + + ensures any required macros of `HANDLE_FOO' are expanded before + the first test. + + -- Macro: AS_MKDIR_P (FILE-NAME) + Make the directory FILE-NAME, including intervening directories as + necessary. This is equivalent to `mkdir -p -- FILE-NAME', except + that it is portable to older versions of `mkdir' that lack support + for the `-p' option or for the `--' delimiter (*note Limitations + of Usual Tools: mkdir.). Also, `AS_MKDIR_P' succeeds if FILE-NAME + is a symbolic link to an existing directory, even though Posix is + unclear whether `mkdir -p' should succeed in that case. If + creation of FILE-NAME fails, exit the script. + + Also see the `AC_PROG_MKDIR_P' macro (*note Particular Programs::). + + -- Macro: AS_SET_STATUS (STATUS) + Emit shell code to set the value of `$?' to STATUS, as efficiently + as possible. However, this is not guaranteed to abort a shell + running with `set -e' (*note Limitations of Shell Builtins: set.). + This should also be used at the end of a complex shell function + instead of `return' (*note Shell Functions::) to avoid a DJGPP + shell bug. + + -- Macro: AS_TR_CPP (EXPRESSION) + Transform EXPRESSION into a valid right-hand side for a C + `#define'. For example: + + # This outputs "#define HAVE_CHAR_P 1". + # Notice the m4 quoting around #, to prevent an m4 comment + type="char *" + echo "[#]define AS_TR_CPP([HAVE_$type]) 1" + + -- Macro: AS_TR_SH (EXPRESSION) + Transform EXPRESSION into shell code that generates a valid shell + variable name. The result is literal when possible at m4 time, + but must be used with `eval' if EXPRESSION causes shell + indirections. For example: + + # This outputs "Have it!". + header="sys/some file.h" + eval AS_TR_SH([HAVE_$header])=yes + if test "x$HAVE_sys_some_file_h" = xyes; then echo "Have it!"; fi + + -- Macro: AS_SET_CATFILE (VAR, DIR, FILE) + Set the polymorphic shell variable VAR to DIR/FILE, but optimizing + the common cases (DIR or FILE is `.', FILE is absolute, etc.). + + -- Macro: AS_UNSET (VAR) + Unsets the shell variable VAR, working around bugs in older shells + (*note Limitations of Shell Builtins: unset.). VAR can be a + literal or indirect variable name. + + -- Macro: AS_VERSION_COMPARE (VERSION-1, VERSION-2, [ACTION-IF-LESS], + [ACTION-IF-EQUAL], [ACTION-IF-GREATER]) + Compare two strings VERSION-1 and VERSION-2, possibly containing + shell variables, as version strings, and expand ACTION-IF-LESS, + ACTION-IF-EQUAL, or ACTION-IF-GREATER depending upon the result. + The algorithm to compare is similar to the one used by strverscmp + in glibc (*note String/Array Comparison: (libc)String/Array + Comparison.). + + +File: autoconf.info, Node: Polymorphic Variables, Next: Initialization Macros, Prev: Common Shell Constructs, Up: Programming in M4sh + +9.2 Support for indirect variable names +======================================= + +Often, it is convenient to write a macro that will emit shell code +operating on a shell variable. The simplest case is when the variable +name is known. But a more powerful idiom is writing shell code that can +work through an indirection, where another variable or command +substitution produces the name of the variable to actually manipulate. +M4sh supports the notion of polymorphic shell variables, making it easy +to write a macro that can deal with either literal or indirect variable +names and output shell code appropriate for both use cases. Behavior is +undefined if expansion of an indirect variable does not result in a +literal variable name. + + -- Macro: AS_LITERAL_IF (EXPRESSION, [IF-LITERAL], [IF-NOT], + [IF-SIMPLE-REF = `IF-NOT']) + -- Macro: AS_LITERAL_WORD_IF (EXPRESSION, [IF-LITERAL], [IF-NOT], + [IF-SIMPLE-REF = `IF-NOT']) + If the expansion of EXPRESSION is definitely a shell literal, + expand IF-LITERAL. If the expansion of EXPRESSION looks like it + might contain shell indirections (such as `$var' or ``expr`'), + then IF-NOT is expanded. Sometimes, it is possible to output + optimized code if EXPRESSION consists only of shell variable + expansions (such as `${var}'), in which case IF-SIMPLE-REF can be + provided; but defaulting to IF-NOT should always be safe. + `AS_LITERAL_WORD_IF' only expands IF-LITERAL if EXPRESSION looks + like a single shell word, containing no whitespace; while + `AS_LITERAL_IF' allows whitespace in EXPRESSION. + + In order to reduce the time spent recognizing whether an + EXPRESSION qualifies as a literal or a simple indirection, the + implementation is somewhat conservative: EXPRESSION must be a + single shell word (possibly after stripping whitespace), + consisting only of bytes that would have the same meaning whether + unquoted or enclosed in double quotes (for example, `a.b' results + in IF-LITERAL, even though it is not a valid shell variable name; + while both `'a'' and `[$]' result in IF-NOT, because they behave + differently than `"'a'"' and `"[$]"'). This macro can be used in + contexts for recognizing portable file names (such as in the + implementation of `AC_LIBSOURCE'), or coupled with some + transliterations for forming valid variable names (such as in the + implementation of `AS_TR_SH', which uses an additional + `m4_translit' to convert `.' to `_'). + + This example shows how to read the contents of the shell variable + `bar', exercising all three arguments to `AS_LITERAL_IF'. It + results in a script that will output the line `hello' three times. + + AC_DEFUN([MY_ACTION], + [AS_LITERAL_IF([$1], + [echo "$$1"], + [AS_VAR_COPY([var], [$1]) + echo "$var"], + [eval 'echo "$'"$1"\"])]) + foo=bar bar=hello + MY_ACTION([bar]) + MY_ACTION([`echo bar`]) + MY_ACTION([$foo]) + + -- Macro: AS_VAR_APPEND (VAR, TEXT) + Emit shell code to append the shell expansion of TEXT to the end + of the current contents of the polymorphic shell variable VAR, + taking advantage of shells that provide the `+=' extension for more + efficient scaling. + + For situations where the final contents of VAR are relatively + short (less than 256 bytes), it is more efficient to use the + simpler code sequence of `VAR=${VAR}TEXT' (or its polymorphic + equivalent of `AS_VAR_COPY([t], [VAR])' and `AS_VAR_SET([VAR], + ["$t"TEXT])'). But in the case when the script will be repeatedly + appending text into `var', issues of scaling start to become + apparent. A naive implementation requires execution time linear + to the length of the current contents of VAR as well as the length + of TEXT for a single append, for an overall quadratic scaling with + multiple appends. This macro takes advantage of shells which + provide the extension `VAR+=TEXT', which can provide amortized + constant time for a single append, for an overall linear scaling + with multiple appends. Note that unlike `AS_VAR_SET', this macro + requires that TEXT be quoted properly to avoid field splitting and + file name expansion. + + -- Macro: AS_VAR_ARITH (VAR, EXPRESSION) + Emit shell code to compute the arithmetic expansion of EXPRESSION, + assigning the result as the contents of the polymorphic shell + variable VAR. The code takes advantage of shells that provide + `$(())' for fewer forks, but uses `expr' as a fallback. + Therefore, the syntax for a valid EXPRESSION is rather limited: + all operators must occur as separate shell arguments and with + proper quoting, there is no portable equality operator, all + variables containing numeric values must be expanded prior to the + computation, all numeric values must be provided in decimal + without leading zeroes, and the first shell argument should not be + a negative number. In the following example, this snippet will + print `(2+3)*4 == 20'. + + bar=3 + AS_VAR_ARITH([foo], [\( 2 + $bar \) \* 4]) + echo "(2+$bar)*4 == $foo" + + -- Macro: AS_VAR_COPY (DEST, SOURCE) + Emit shell code to assign the contents of the polymorphic shell + variable SOURCE to the polymorphic shell variable DEST. For + example, executing this M4sh snippet will output `bar hi': + + foo=bar bar=hi + AS_VAR_COPY([a], [foo]) + AS_VAR_COPY([b], [$foo]) + echo "$a $b" + + When it is necessary to access the contents of an indirect variable + inside a shell double-quoted context, the recommended idiom is to + first copy the contents into a temporary literal shell variable. + + for header in stdint_h inttypes_h ; do + AS_VAR_COPY([var], [ac_cv_header_$header]) + echo "$header detected: $var" + done + + -- Macro: AS_VAR_IF (VAR, [WORD], [IF-EQUAL], [IF-NOT-EQUAL]) + Output a shell conditional statement. If the contents of the + polymorphic shell variable VAR match the string WORD, execute + IF-EQUAL; otherwise execute IF-NOT-EQUAL. WORD must be a single + shell word (typically a quoted string). Avoids shell bugs if an + interrupt signal arrives while a command substitution in VAR is + being expanded. + + -- Macro: AS_VAR_PUSHDEF (M4-NAME, VALUE) + -- Macro: AS_VAR_POPDEF (M4-NAME) + A common M4sh idiom involves composing shell variable names from + an m4 argument (for example, writing a macro that uses a cache + variable). VALUE can be an arbitrary string, which will be + transliterated into a valid shell name by `AS_TR_SH'. In order to + access the composed variable name based on VALUE, it is easier to + declare a temporary m4 macro M4-NAME with `AS_VAR_PUSHDEF', then + use that macro as the argument to subsequent `AS_VAR' macros as a + polymorphic variable name, and finally free the temporary macro + with `AS_VAR_POPDEF'. These macros are often followed with `dnl', + to avoid excess newlines in the output. + + Here is an involved example, that shows the power of writing + macros that can handle composed shell variable names: + + m4_define([MY_CHECK_HEADER], + [AS_VAR_PUSHDEF([my_Header], [ac_cv_header_$1])dnl + AS_VAR_IF([my_Header], [yes], [echo "header $1 detected"])dnl + AS_VAR_POPDEF([my_Header])dnl + ]) + MY_CHECK_HEADER([stdint.h]) + for header in inttypes.h stdlib.h ; do + MY_CHECK_HEADER([$header]) + done + + In the above example, `MY_CHECK_HEADER' can operate on polymorphic + variable names. In the first invocation, the m4 argument is + `stdint.h', which transliterates into a literal `stdint_h'. As a + result, the temporary macro `my_Header' expands to the literal + shell name `ac_cv_header_stdint_h'. In the second invocation, the + m4 argument to `MY_CHECK_HEADER' is `$header', and the temporary + macro `my_Header' expands to the indirect shell name + `$as_my_Header'. During the shell execution of the for loop, when + `$header' contains `inttypes.h', then `$as_my_Header' contains + `ac_cv_header_inttypes_h'. If this script is then run on a + platform where all three headers have been previously detected, the + output of the script will include: + + header stdint.h detected + header inttypes.h detected + header stdlib.h detected + + -- Macro: AS_VAR_SET (VAR, [VALUE]) + Emit shell code to assign the contents of the polymorphic shell + variable VAR to the shell expansion of VALUE. VALUE is not + subject to field splitting or file name expansion, so if command + substitution is used, it may be done with ``""`' rather than using + an intermediate variable (*note Shell Substitutions::). However, + VALUE does undergo rescanning for additional macro names; behavior + is unspecified if late expansion results in any shell + meta-characters. + + -- Macro: AS_VAR_SET_IF (VAR, [IF-SET], [IF-UNDEF]) + Emit a shell conditional statement, which executes IF-SET if the + polymorphic shell variable `var' is set to any value, and IF-UNDEF + otherwise. + + -- Macro: AS_VAR_TEST_SET (VAR) + Emit a shell statement that results in a successful exit status + only if the polymorphic shell variable `var' is set. + + +File: autoconf.info, Node: Initialization Macros, Next: File Descriptor Macros, Prev: Polymorphic Variables, Up: Programming in M4sh + +9.3 Initialization Macros +========================= + + -- Macro: AS_BOURNE_COMPATIBLE + Set up the shell to be more compatible with the Bourne shell as + standardized by Posix, if possible. This may involve setting + environment variables, or setting options, or similar + implementation-specific actions. This macro is deprecated, since + `AS_INIT' already invokes it. + + -- Macro: AS_INIT + Initialize the M4sh environment. This macro calls `m4_init', then + outputs the `#! /bin/sh' line, a notice about where the output was + generated from, and code to sanitize the environment for the rest + of the script. Among other initializations, this sets `SHELL' to + the shell chosen to run the script (*note CONFIG_SHELL::), and + `LC_ALL' to ensure the C locale. Finally, it changes the current + diversion to `BODY'. `AS_INIT' is called automatically by + `AC_INIT' and `AT_INIT', so shell code in `configure', + `config.status', and `testsuite' all benefit from a sanitized + shell environment. + + -- Macro: AS_INIT_GENERATED (FILE, [COMMENT]) + Emit shell code to start the creation of a subsidiary shell script + in FILE, including changing FILE to be executable. This macro + populates the child script with information learned from the parent + (thus, the emitted code is equivalent in effect, but more + efficient, than the code output by `AS_INIT', + `AS_BOURNE_COMPATIBLE', and `AS_SHELL_SANITIZE'). If present, + COMMENT is output near the beginning of the child, prior to the + shell initialization code, and is subject to parameter expansion, + command substitution, and backslash quote removal. The parent + script should check the exit status after this macro, in case FILE + could not be properly created (for example, if the disk was full). + If successfully created, the parent script can then proceed to + append additional M4sh constructs into the child script. + + Note that the child script starts life without a log file open, so + if the parent script uses logging (*note AS_MESSAGE_LOG_FD::), you + must temporarily disable any attempts to use the log file until + after emitting code to open a log within the child. On the other + hand, if the parent script has `AS_MESSAGE_FD' redirected + somewhere besides `1', then the child script already has code that + copies stdout to that descriptor. Currently, the suggested idiom + for writing a M4sh shell script from within another script is: + + AS_INIT_GENERATED([FILE], [[# My child script. + ]]) || { AS_ECHO(["Failed to create child script"]); AS_EXIT; } + m4_pushdef([AS_MESSAGE_LOG_FD])dnl + cat >> "FILE" <<\__EOF__ + # Code to initialize AS_MESSAGE_LOG_FD + m4_popdef([AS_MESSAGE_LOG_FD])dnl + # Additional code + __EOF__ + + This, however, may change in the future as the M4sh interface is + stabilized further. + + Also, be aware that use of `LINENO' within the child script may + report line numbers relative to their location in the parent + script, even when using `AS_LINENO_PREPARE', if the parent script + was unable to locate a shell with working `LINENO' support. + + -- Macro: AS_LINENO_PREPARE + Find a shell that supports the special variable `LINENO', which + contains the number of the currently executing line. This macro is + automatically invoked by `AC_INIT' in configure scripts. + + -- Macro: AS_ME_PREPARE + Set up variable `as_me' to be the basename of the currently + executing script. This macro is automatically invoked by + `AC_INIT' in configure scripts. + + -- Macro: AS_TMPDIR (PREFIX, [DIR = `${TMPDIR:=/tmp}']) + Create, as safely as possible, a temporary sub-directory within + DIR with a name starting with PREFIX. PREFIX should be 2-4 + characters, to make it slightly easier to identify the owner of + the directory. If DIR is omitted, then the value of `TMPDIR' will + be used (defaulting to `/tmp'). On success, the name of the newly + created directory is stored in the shell variable `tmp'. On + error, the script is aborted. + + Typically, this macro is coupled with some exit traps to delete + the created directory and its contents on exit or interrupt. + However, there is a slight window between when the directory is + created and when the name is actually known to the shell, so an + interrupt at the right moment might leave the temporary directory + behind. Hence it is important to use a PREFIX that makes it + easier to determine if a leftover temporary directory from an + interrupted script is safe to delete. + + The use of the output variable `$tmp' rather than something in the + `as_' namespace is historical; it has the unfortunate consequence + that reusing this otherwise common name for any other purpose + inside your script has the potential to break any cleanup traps + designed to remove the temporary directory. + + -- Macro: AS_SHELL_SANITIZE + Initialize the shell suitably for `configure' scripts. This has + the effect of `AS_BOURNE_COMPATIBLE', and sets some other + environment variables for predictable results from configuration + tests. For example, it sets `LC_ALL' to change to the default C + locale. *Note Special Shell Variables::. This macro is + deprecated, since `AS_INIT' already invokes it. + + +File: autoconf.info, Node: File Descriptor Macros, Prev: Initialization Macros, Up: Programming in M4sh + +9.4 File Descriptor Macros +========================== + +The following macros define file descriptors used to output messages +(or input values) from `configure' scripts. For example: + + echo "$wombats found" >&AS_MESSAGE_LOG_FD + echo 'Enter desired kangaroo count:' >&AS_MESSAGE_FD + read kangaroos <&AS_ORIGINAL_STDIN_FD` + +However doing so is seldom needed, because Autoconf provides higher +level macros as described below. + + -- Macro: AS_MESSAGE_FD + The file descriptor for `checking for...' messages and results. + By default, `AS_INIT' sets this to `1' for standalone M4sh + clients. However, `AC_INIT' shuffles things around to another file + descriptor, in order to allow the `-q' option of `configure' to + choose whether messages should go to the script's standard output + or be discarded. + + If you want to display some messages, consider using one of the + printing macros (*note Printing Messages::) instead. Copies of + messages output via these macros are also recorded in `config.log'. + + -- Macro: AS_MESSAGE_LOG_FD + This must either be empty, or expand to a file descriptor for log + messages. By default, `AS_INIT' sets this macro to the empty + string for standalone M4sh clients, thus disabling logging. + However, `AC_INIT' shuffles things around so that both `configure' + and `config.status' use `config.log' for log messages. Macros + that run tools, like `AC_COMPILE_IFELSE' (*note Running the + Compiler::), redirect all output to this descriptor. You may want + to do so if you develop such a low-level macro. + + -- Macro: AS_ORIGINAL_STDIN_FD + This must expand to a file descriptor for the original standard + input. By default, `AS_INIT' sets this macro to `0' for standalone + M4sh clients. However, `AC_INIT' shuffles things around for + safety. + + When `configure' runs, it may accidentally execute an interactive + command that has the same name as the non-interactive meant to be + used or checked. If the standard input was the terminal, such + interactive programs would cause `configure' to stop, pending some + user input. Therefore `configure' redirects its standard input + from `/dev/null' during its initialization. This is not normally + a problem, since `configure' normally does not need user input. + + In the extreme case where your `configure' script really needs to + obtain some values from the original standard input, you can read + them explicitly from `AS_ORIGINAL_STDIN_FD'. + + +File: autoconf.info, Node: Writing Autoconf Macros, Next: Portable Shell, Prev: Programming in M4sh, Up: Top + +10 Writing Autoconf Macros +************************** + +When you write a feature test that could be applicable to more than one +software package, the best thing to do is encapsulate it in a new macro. +Here are some instructions and guidelines for writing Autoconf macros. + +* Menu: + +* Macro Definitions:: Basic format of an Autoconf macro +* Macro Names:: What to call your new macros +* Reporting Messages:: Notifying `autoconf' users +* Dependencies Between Macros:: What to do when macros depend on other macros +* Obsoleting Macros:: Warning about old ways of doing things +* Coding Style:: Writing Autoconf macros a` la Autoconf + + +File: autoconf.info, Node: Macro Definitions, Next: Macro Names, Up: Writing Autoconf Macros + +10.1 Macro Definitions +====================== + + -- Macro: AC_DEFUN (NAME, [BODY]) + Autoconf macros are defined using the `AC_DEFUN' macro, which is + similar to the M4 builtin `m4_define' macro; this creates a macro + named NAME and with BODY as its expansion. In addition to + defining a macro, `AC_DEFUN' adds to it some code that is used to + constrain the order in which macros are called, while avoiding + redundant output (*note Prerequisite Macros::). + + An Autoconf macro definition looks like this: + + AC_DEFUN(MACRO-NAME, MACRO-BODY) + + You can refer to any arguments passed to the macro as `$1', `$2', +etc. *Note How to define new macros: (m4.info)Definitions, for more +complete information on writing M4 macros. + + Most macros fall in one of two general categories. The first +category includes macros which take arguments, in order to generate +output parameterized by those arguments. Macros in this category are +designed to be directly expanded, often multiple times, and should not +be used as the argument to `AC_REQUIRE'. The other category includes +macros which are shorthand for a fixed block of text, and therefore do +not take arguments. For this category of macros, directly expanding +the macro multiple times results in redundant output, so it is more +common to use the macro as the argument to `AC_REQUIRE', or to declare +the macro with `AC_DEFUN_ONCE' (*note One-Shot Macros::). + + Be sure to properly quote both the MACRO-BODY _and_ the MACRO-NAME +to avoid any problems if the macro happens to have been previously +defined. + + Each macro should have a header comment that gives its prototype, +and a brief description. When arguments have default values, display +them in the prototype. For example: + + # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1]) + # -------------------------------------- + m4_define([AC_MSG_ERROR], + [{ AS_MESSAGE([error: $1], [2]) + exit m4_default([$2], [1]); }]) + + Comments about the macro should be left in the header comment. Most +other comments make their way into `configure', so just keep using `#' +to introduce comments. + + If you have some special comments about pure M4 code, comments that +make no sense in `configure' and in the header comment, then use the +builtin `dnl': it causes M4 to discard the text through the next +newline. + + Keep in mind that `dnl' is rarely needed to introduce comments; +`dnl' is more useful to get rid of the newlines following macros that +produce no output, such as `AC_REQUIRE'. + + Public third-party macros need to use `AC_DEFUN', and not +`m4_define', in order to be found by `aclocal' (*note Extending +aclocal: (automake)Extending aclocal.). Additionally, if it is ever +determined that a macro should be made obsolete, it is easy to convert +from `AC_DEFUN' to `AU_DEFUN' in order to have `autoupdate' assist the +user in choosing a better alternative, but there is no corresponding +way to make `m4_define' issue an upgrade notice (*note AU_DEFUN::). + + There is another subtle, but important, difference between using +`m4_define' and `AC_DEFUN': only the former is unaffected by +`AC_REQUIRE'. When writing a file, it is always safe to replace a +block of text with a `m4_define' macro that will expand to the same +text. But replacing a block of text with an `AC_DEFUN' macro with the +same content does not necessarily give the same results, because it +changes the location where any embedded but unsatisfied `AC_REQUIRE' +invocations within the block will be expanded. For an example of this, +see *note Expanded Before Required::. + + +File: autoconf.info, Node: Macro Names, Next: Reporting Messages, Prev: Macro Definitions, Up: Writing Autoconf Macros + +10.2 Macro Names +================ + +All of the public Autoconf macros have all-uppercase names in the +namespace `^AC_' to prevent them from accidentally conflicting with +other text; Autoconf also reserves the namespace `^_AC_' for internal +macros. All shell variables that they use for internal purposes have +mostly-lowercase names starting with `ac_'. Autoconf also uses +here-document delimiters in the namespace `^_AC[A-Z]'. During +`configure', files produced by Autoconf make heavy use of the file +system namespace `^conf'. + + Since Autoconf is built on top of M4sugar (*note Programming in +M4sugar::) and M4sh (*note Programming in M4sh::), you must also be +aware of those namespaces (`^_?\(m4\|AS\)_'). And since `configure.ac' +is also designed to be scanned by Autoheader, Autoscan, Autoupdate, and +Automake, you should be aware of the `^_?A[HNUM]_' namespaces. In +general, you _should not use_ the namespace of a package that does not +own the macro or shell code you are writing. + + To ensure that your macros don't conflict with present or future +Autoconf macros, you should prefix your own macro names and any shell +variables they use with some other sequence. Possibilities include your +initials, or an abbreviation for the name of your organization or +software package. Historically, people have not always followed the +rule of using a namespace appropriate for their package, and this has +made it difficult for determining the origin of a macro (and where to +report bugs about that macro), as well as difficult for the true +namespace owner to add new macros without interference from pre-existing +uses of third-party macros. Perhaps the best example of this confusion +is the `AM_GNU_GETTEXT' macro, which belongs, not to Automake, but to +Gettext. + + Most of the Autoconf macros' names follow a structured naming +convention that indicates the kind of feature check by the name. The +macro names consist of several words, separated by underscores, going +from most general to most specific. The names of their cache variables +use the same convention (*note Cache Variable Names::, for more +information on them). + + The first word of the name after the namespace initials (such as +`AC_') usually tells the category of the feature being tested. Here +are the categories used in Autoconf for specific test macros, the kind +of macro that you are more likely to write. They are also used for +cache variables, in all-lowercase. Use them where applicable; where +they're not, invent your own categories. + +`C' + C language builtin features. + +`DECL' + Declarations of C variables in header files. + +`FUNC' + Functions in libraries. + +`GROUP' + Posix group owners of files. + +`HEADER' + Header files. + +`LIB' + C libraries. + +`PROG' + The base names of programs. + +`MEMBER' + Members of aggregates. + +`SYS' + Operating system features. + +`TYPE' + C builtin or declared types. + +`VAR' + C variables in libraries. + + After the category comes the name of the particular feature being +tested. Any further words in the macro name indicate particular aspects +of the feature. For example, `AC_PROG_CC_STDC' checks whether the C +compiler supports ISO Standard C. + + An internal macro should have a name that starts with an underscore; +Autoconf internals should therefore start with `_AC_'. Additionally, a +macro that is an internal subroutine of another macro should have a +name that starts with an underscore and the name of that other macro, +followed by one or more words saying what the internal macro does. For +example, `AC_PATH_X' has internal macros `_AC_PATH_X_XMKMF' and +`_AC_PATH_X_DIRECT'. + + +File: autoconf.info, Node: Reporting Messages, Next: Dependencies Between Macros, Prev: Macro Names, Up: Writing Autoconf Macros + +10.3 Reporting Messages +======================= + +When macros statically diagnose abnormal situations, benign or fatal, it +is possible to make `autoconf' detect the problem, and refuse to create +`configure' in the case of an error. The macros in this section are +considered obsolescent, and new code should use M4sugar macros for this +purpose, see *note Diagnostic Macros::. + + On the other hand, it is possible to want to detect errors when +`configure' is run, which are dependent on the environment of the user +rather than the maintainer. For dynamic diagnostics, see *note +Printing Messages::. + + -- Macro: AC_DIAGNOSE (CATEGORY, MESSAGE) + Report MESSAGE as a warning (or as an error if requested by the + user) if warnings of the CATEGORY are turned on. This macro is + obsolescent; you are encouraged to use: + m4_warn([CATEGORY], [MESSAGE]) + instead. *Note m4_warn::, for more details, including valid + CATEGORY names. + + -- Macro: AC_WARNING (MESSAGE) + Report MESSAGE as a syntax warning. This macro is obsolescent; + you are encouraged to use: + m4_warn([syntax], [MESSAGE]) + instead. *Note m4_warn::, for more details, as well as better + finer-grained categories of warnings (not all problems have to do + with syntax). + + -- Macro: AC_FATAL (MESSAGE) + Report a severe error MESSAGE, and have `autoconf' die. This + macro is obsolescent; you are encouraged to use: + m4_fatal([MESSAGE]) + instead. *Note m4_fatal::, for more details. + + When the user runs `autoconf -W error', warnings from `m4_warn' +(including those issued through `AC_DIAGNOSE' and `AC_WARNING') are +reported as errors, see *note autoconf Invocation::. + + +File: autoconf.info, Node: Dependencies Between Macros, Next: Obsoleting Macros, Prev: Reporting Messages, Up: Writing Autoconf Macros + +10.4 Dependencies Between Macros +================================ + +Some Autoconf macros depend on other macros having been called first in +order to work correctly. Autoconf provides a way to ensure that certain +macros are called if needed and a way to warn the user if macros are +called in an order that might cause incorrect operation. + +* Menu: + +* Prerequisite Macros:: Ensuring required information +* Suggested Ordering:: Warning about possible ordering problems +* One-Shot Macros:: Ensuring a macro is called only once + + +File: autoconf.info, Node: Prerequisite Macros, Next: Suggested Ordering, Up: Dependencies Between Macros + +10.4.1 Prerequisite Macros +-------------------------- + +A macro that you write might need to use values that have previously +been computed by other macros. For example, `AC_DECL_YYTEXT' examines +the output of `flex' or `lex', so it depends on `AC_PROG_LEX' having +been called first to set the shell variable `LEX'. + + Rather than forcing the user of the macros to keep track of the +dependencies between them, you can use the `AC_REQUIRE' macro to do it +automatically. `AC_REQUIRE' can ensure that a macro is only called if +it is needed, and only called once. + + -- Macro: AC_REQUIRE (MACRO-NAME) + If the M4 macro MACRO-NAME has not already been called, call it + (without any arguments). Make sure to quote MACRO-NAME with + square brackets. MACRO-NAME must have been defined using + `AC_DEFUN' or else contain a call to `AC_PROVIDE' to indicate that + it has been called. + + `AC_REQUIRE' must be used inside a macro defined by `AC_DEFUN'; it + must not be called from the top level. Also, it does not make + sense to require a macro that takes parameters. + + `AC_REQUIRE' is often misunderstood. It really implements +dependencies between macros in the sense that if one macro depends upon +another, the latter is expanded _before_ the body of the former. To be +more precise, the required macro is expanded before the outermost +defined macro in the current expansion stack. In particular, +`AC_REQUIRE([FOO])' is not replaced with the body of `FOO'. For +instance, this definition of macros: + + AC_DEFUN([TRAVOLTA], + [test "$body_temperature_in_celsius" -gt "38" && + dance_floor=occupied]) + AC_DEFUN([NEWTON_JOHN], + [test "x$hair_style" = xcurly && + dance_floor=occupied]) + + AC_DEFUN([RESERVE_DANCE_FLOOR], + [if date | grep '^Sat.*pm' >/dev/null 2>&1; then + AC_REQUIRE([TRAVOLTA]) + AC_REQUIRE([NEWTON_JOHN]) + fi]) + +with this `configure.ac' + + AC_INIT([Dance Manager], [1.0], [bug-dance@example.org]) + RESERVE_DANCE_FLOOR + if test "x$dance_floor" = xoccupied; then + AC_MSG_ERROR([cannot pick up here, let's move]) + fi + +does not leave you with a better chance to meet a kindred soul at other +times than Saturday night since it expands into: + + test "$body_temperature_in_Celsius" -gt "38" && + dance_floor=occupied + test "x$hair_style" = xcurly && + dance_floor=occupied + fi + if date | grep '^Sat.*pm' >/dev/null 2>&1; then + + + fi + + This behavior was chosen on purpose: (i) it prevents messages in +required macros from interrupting the messages in the requiring macros; +(ii) it avoids bad surprises when shell conditionals are used, as in: + + if ...; then + AC_REQUIRE([SOME_CHECK]) + fi + ... + SOME_CHECK + + However, this implementation can lead to another class of problems. +Consider the case where an outer macro first expands, then indirectly +requires, an inner macro: + + AC_DEFUN([TESTA], [[echo in A + if test -n "$SEEN_A" ; then echo duplicate ; fi + SEEN_A=:]]) + AC_DEFUN([TESTB], [AC_REQUIRE([TESTA])[echo in B + if test -z "$SEEN_A" ; then echo bug ; fi]]) + AC_DEFUN([TESTC], [AC_REQUIRE([TESTB])[echo in C]]) + AC_DEFUN([OUTER], [[echo in OUTER] + TESTA + TESTC]) + OUTER + +Prior to Autoconf 2.64, the implementation of `AC_REQUIRE' recognized +that `TESTB' needed to be hoisted prior to the expansion of `OUTER', +but because `TESTA' had already been directly expanded, it failed to +hoist `TESTA'. Therefore, the expansion of `TESTB' occurs prior to its +prerequisites, leading to the following output: + + in B + bug + in OUTER + in A + in C + +Newer Autoconf is smart enough to recognize this situation, and hoists +`TESTA' even though it has already been expanded, but issues a syntax +warning in the process. This is because the hoisted expansion of +`TESTA' defeats the purpose of using `AC_REQUIRE' to avoid redundant +code, and causes its own set of problems if the hoisted macro is not +idempotent: + + in A + in B + in OUTER + in A + duplicate + in C + + The bug is not in Autoconf, but in the macro definitions. If you +ever pass a particular macro name to `AC_REQUIRE', then you are implying +that the macro only needs to be expanded once. But to enforce this, +either the macro must be declared with `AC_DEFUN_ONCE' (although this +only helps in Autoconf 2.64 or newer), or all uses of that macro should +be through `AC_REQUIRE'; directly expanding the macro defeats the point +of using `AC_REQUIRE' to eliminate redundant expansion. In the +example, this rule of thumb was violated because `TESTB' requires +`TESTA' while `OUTER' directly expands it. One way of fixing the bug +is to factor `TESTA' into two macros, the portion designed for direct +and repeated use (here, named `TESTA'), and the portion designed for +one-shot output and used only inside `AC_REQUIRE' (here, named +`TESTA_PREREQ'). Then, by fixing all clients to use the correct +calling convention according to their needs: + + AC_DEFUN([TESTA], [AC_REQUIRE([TESTA_PREREQ])[echo in A]]) + AC_DEFUN([TESTA_PREREQ], [[echo in A_PREREQ + if test -n "$SEEN_A" ; then echo duplicate ; fi + SEEN_A=:]]) + AC_DEFUN([TESTB], [AC_REQUIRE([TESTA_PREREQ])[echo in B + if test -z "$SEEN_A" ; then echo bug ; fi]]) + AC_DEFUN([TESTC], [AC_REQUIRE([TESTB])[echo in C]]) + AC_DEFUN([OUTER], [[echo in OUTER] + TESTA + TESTC]) + OUTER + +the resulting output will then obey all dependency rules and avoid any +syntax warnings, whether the script is built with old or new Autoconf +versions: + + in A_PREREQ + in B + in OUTER + in A + in C + + The helper macros `AS_IF' and `AS_CASE' may be used to enforce +expansion of required macros outside of shell conditional constructs. +You are furthermore encouraged, although not required, to put all +`AC_REQUIRE' calls at the beginning of a macro. You can use `dnl' to +avoid the empty lines they leave. + + +File: autoconf.info, Node: Suggested Ordering, Next: One-Shot Macros, Prev: Prerequisite Macros, Up: Dependencies Between Macros + +10.4.2 Suggested Ordering +------------------------- + +Some macros should be run before another macro if both are called, but +neither _requires_ that the other be called. For example, a macro that +changes the behavior of the C compiler should be called before any +macros that run the C compiler. Many of these dependencies are noted in +the documentation. + + Autoconf provides the `AC_BEFORE' macro to warn users when macros +with this kind of dependency appear out of order in a `configure.ac' +file. The warning occurs when creating `configure' from +`configure.ac', not when running `configure'. + + For example, `AC_PROG_CPP' checks whether the C compiler can run the +C preprocessor when given the `-E' option. It should therefore be +called after any macros that change which C compiler is being used, +such as `AC_PROG_CC'. So `AC_PROG_CC' contains: + + AC_BEFORE([$0], [AC_PROG_CPP])dnl + +This warns the user if a call to `AC_PROG_CPP' has already occurred +when `AC_PROG_CC' is called. + + -- Macro: AC_BEFORE (THIS-MACRO-NAME, CALLED-MACRO-NAME) + Make M4 print a warning message to the standard error output if + CALLED-MACRO-NAME has already been called. THIS-MACRO-NAME should + be the name of the macro that is calling `AC_BEFORE'. The macro + CALLED-MACRO-NAME must have been defined using `AC_DEFUN' or else + contain a call to `AC_PROVIDE' to indicate that it has been called. + + +File: autoconf.info, Node: One-Shot Macros, Prev: Suggested Ordering, Up: Dependencies Between Macros + +10.4.3 One-Shot Macros +---------------------- + +Some macros should be called only once, either because calling them +multiple time is unsafe, or because it is bad style. For instance +Autoconf ensures that `AC_CANONICAL_BUILD' and cousins (*note +Canonicalizing::) are evaluated only once, because it makes no sense to +run these expensive checks more than once. Such one-shot macros can be +defined using `AC_DEFUN_ONCE'. + + -- Macro: AC_DEFUN_ONCE (MACRO-NAME, MACRO-BODY) + Declare macro MACRO-NAME like `AC_DEFUN' would (*note Macro + Definitions::), but add additional logic that guarantees that only + the first use of the macro (whether by direct expansion or + `AC_REQUIRE') causes an expansion of MACRO-BODY; the expansion + will occur before the start of any enclosing macro defined by + `AC_DEFUN'. Subsequent expansions are silently ignored. + Generally, it does not make sense for MACRO-BODY to use parameters + such as `$1'. + + Prior to Autoconf 2.64, a macro defined by `AC_DEFUN_ONCE' would +emit a warning if it was directly expanded a second time, so for +portability, it is better to use `AC_REQUIRE' than direct invocation of +MACRO-NAME inside a macro defined by `AC_DEFUN' (*note Prerequisite +Macros::). + + +File: autoconf.info, Node: Obsoleting Macros, Next: Coding Style, Prev: Dependencies Between Macros, Up: Writing Autoconf Macros + +10.5 Obsoleting Macros +====================== + +Configuration and portability technology has evolved over the years. +Often better ways of solving a particular problem are developed, or +ad-hoc approaches are systematized. This process has occurred in many +parts of Autoconf. One result is that some of the macros are now +considered "obsolete"; they still work, but are no longer considered +the best thing to do, hence they should be replaced with more modern +macros. Ideally, `autoupdate' should replace the old macro calls with +their modern implementation. + + Autoconf provides a simple means to obsolete a macro. + + -- Macro: AU_DEFUN (OLD-MACRO, IMPLEMENTATION, [MESSAGE]) + Define OLD-MACRO as IMPLEMENTATION. The only difference with + `AC_DEFUN' is that the user is warned that OLD-MACRO is now + obsolete. + + If she then uses `autoupdate', the call to OLD-MACRO is replaced + by the modern IMPLEMENTATION. MESSAGE should include information + on what to do after running `autoupdate'; `autoupdate' prints it + as a warning, and includes it in the updated `configure.ac' file. + + The details of this macro are hairy: if `autoconf' encounters an + `AU_DEFUN'ed macro, all macros inside its second argument are + expanded as usual. However, when `autoupdate' is run, only M4 and + M4sugar macros are expanded here, while all other macros are + disabled and appear literally in the updated `configure.ac'. + + -- Macro: AU_ALIAS (OLD-NAME, NEW-NAME) + Used if the OLD-NAME is to be replaced by a call to NEW-MACRO with + the same parameters. This happens for example if the macro was + renamed. + + +File: autoconf.info, Node: Coding Style, Prev: Obsoleting Macros, Up: Writing Autoconf Macros + +10.6 Coding Style +================= + +The Autoconf macros follow a strict coding style. You are encouraged to +follow this style, especially if you intend to distribute your macro, +either by contributing it to Autoconf itself or the Autoconf Macro +Archive (http://www.gnu.org/software/autoconf-archive/), or by other +means. + + The first requirement is to pay great attention to the quotation. +For more details, see *note Autoconf Language::, and *note M4 +Quotation::. + + Do not try to invent new interfaces. It is likely that there is a +macro in Autoconf that resembles the macro you are defining: try to +stick to this existing interface (order of arguments, default values, +etc.). We _are_ conscious that some of these interfaces are not +perfect; nevertheless, when harmless, homogeneity should be preferred +over creativity. + + Be careful about clashes both between M4 symbols and between shell +variables. + + If you stick to the suggested M4 naming scheme (*note Macro Names::), +you are unlikely to generate conflicts. Nevertheless, when you need to +set a special value, _avoid using a regular macro name_; rather, use an +"impossible" name. For instance, up to version 2.13, the macro +`AC_SUBST' used to remember what SYMBOL macros were already defined by +setting `AC_SUBST_SYMBOL', which is a regular macro name. But since +there is a macro named `AC_SUBST_FILE', it was just impossible to +`AC_SUBST(FILE)'! In this case, `AC_SUBST(SYMBOL)' or +`_AC_SUBST(SYMBOL)' should have been used (yes, with the parentheses). + + No Autoconf macro should ever enter the user-variable name space; +i.e., except for the variables that are the actual result of running the +macro, all shell variables should start with `ac_'. In addition, small +macros or any macro that is likely to be embedded in other macros +should be careful not to use obvious names. + + Do not use `dnl' to introduce comments: most of the comments you are +likely to write are either header comments which are not output anyway, +or comments that should make their way into `configure'. There are +exceptional cases where you do want to comment special M4 constructs, +in which case `dnl' is right, but keep in mind that it is unlikely. + + M4 ignores the leading blanks and newlines before each argument. +Use this feature to indent in such a way that arguments are (more or +less) aligned with the opening parenthesis of the macro being called. +For instance, instead of + + AC_CACHE_CHECK(for EMX OS/2 environment, + ac_cv_emxos2, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __EMX__;])], + [ac_cv_emxos2=yes], [ac_cv_emxos2=no])]) + +write + + AC_CACHE_CHECK([for EMX OS/2 environment], [ac_cv_emxos2], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])], + [ac_cv_emxos2=yes], + [ac_cv_emxos2=no])]) + +or even + + AC_CACHE_CHECK([for EMX OS/2 environment], + [ac_cv_emxos2], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], + [return __EMX__;])], + [ac_cv_emxos2=yes], + [ac_cv_emxos2=no])]) + + When using `AC_RUN_IFELSE' or any macro that cannot work when +cross-compiling, provide a pessimistic value (typically `no'). + + Feel free to use various tricks to prevent auxiliary tools, such as +syntax-highlighting editors, from behaving improperly. For instance, +instead of: + + m4_bpatsubst([$1], [$"]) + +use + + m4_bpatsubst([$1], [$""]) + +so that Emacsen do not open an endless "string" at the first quote. +For the same reasons, avoid: + + test $[#] != 0 + +and use: + + test $[@%:@] != 0 + +Otherwise, the closing bracket would be hidden inside a `#'-comment, +breaking the bracket-matching highlighting from Emacsen. Note the +preferred style to escape from M4: `$[1]', `$[@]', etc. Do not escape +when it is unnecessary. Common examples of useless quotation are +`[$]$1' (write `$$1'), `[$]var' (use `$var'), etc. If you add +portability issues to the picture, you'll prefer `${1+"$[@]"}' to +`"[$]@"', and you'll prefer do something better than hacking Autoconf +`:-)'. + + When using `sed', don't use `-e' except for indenting purposes. +With the `s' and `y' commands, the preferred separator is `/' unless +`/' itself might appear in the pattern or replacement, in which case +you should use `|', or optionally `,' if you know the pattern and +replacement cannot contain a file name. If none of these characters +will do, choose a printable character that cannot appear in the pattern +or replacement. Characters from the set `"#$&'()*;<=>?`|~' are good +choices if the pattern or replacement might contain a file name, since +they have special meaning to the shell and are less likely to occur in +file names. + + *Note Macro Definitions::, for details on how to define a macro. If +a macro doesn't use `AC_REQUIRE', is expected to never be the object of +an `AC_REQUIRE' directive, and macros required by other macros inside +arguments do not need to be expanded before this macro, then use +`m4_define'. In case of doubt, use `AC_DEFUN'. Also take into account +that public third-party macros need to use `AC_DEFUN' in order to be +found by `aclocal' (*note Extending aclocal: (automake)Extending +aclocal.). All the `AC_REQUIRE' statements should be at the beginning +of the macro, and each statement should be followed by `dnl'. + + You should not rely on the number of arguments: instead of checking +whether an argument is missing, test that it is not empty. It provides +both a simpler and a more predictable interface to the user, and saves +room for further arguments. + + Unless the macro is short, try to leave the closing `])' at the +beginning of a line, followed by a comment that repeats the name of the +macro being defined. This introduces an additional newline in +`configure'; normally, that is not a problem, but if you want to remove +it you can use `[]dnl' on the last line. You can similarly use `[]dnl' +after a macro call to remove its newline. `[]dnl' is recommended +instead of `dnl' to ensure that M4 does not interpret the `dnl' as +being attached to the preceding text or macro output. For example, +instead of: + + AC_DEFUN([AC_PATH_X], + [AC_MSG_CHECKING([for X]) + AC_REQUIRE_CPP() + # ...omitted... + AC_MSG_RESULT([libraries $x_libraries, headers $x_includes]) + fi]) + +you would write: + + AC_DEFUN([AC_PATH_X], + [AC_REQUIRE_CPP()[]dnl + AC_MSG_CHECKING([for X]) + # ...omitted... + AC_MSG_RESULT([libraries $x_libraries, headers $x_includes]) + fi[]dnl + ])# AC_PATH_X + + If the macro is long, try to split it into logical chunks. +Typically, macros that check for a bug in a function and prepare its +`AC_LIBOBJ' replacement should have an auxiliary macro to perform this +setup. Do not hesitate to introduce auxiliary macros to factor your +code. + + In order to highlight the recommended coding style, here is a macro +written the old way: + + dnl Check for EMX on OS/2. + dnl _AC_EMXOS2 + AC_DEFUN(_AC_EMXOS2, + [AC_CACHE_CHECK(for EMX OS/2 environment, ac_cv_emxos2, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, return __EMX__;)], + ac_cv_emxos2=yes, ac_cv_emxos2=no)]) + test "x$ac_cv_emxos2" = xyes && EMXOS2=yes]) + +and the new way: + + # _AC_EMXOS2 + # ---------- + # Check for EMX on OS/2. + m4_define([_AC_EMXOS2], + [AC_CACHE_CHECK([for EMX OS/2 environment], [ac_cv_emxos2], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])], + [ac_cv_emxos2=yes], + [ac_cv_emxos2=no])]) + test "x$ac_cv_emxos2" = xyes && EMXOS2=yes[]dnl + ])# _AC_EMXOS2 + + +File: autoconf.info, Node: Portable Shell, Next: Portable Make, Prev: Writing Autoconf Macros, Up: Top + +11 Portable Shell Programming +***************************** + +When writing your own checks, there are some shell-script programming +techniques you should avoid in order to make your code portable. The +Bourne shell and upward-compatible shells like the Korn shell and Bash +have evolved over the years, and many features added to the original +System7 shell are now supported on all interesting porting targets. +However, the following discussion between Russ Allbery and Robert Lipe +is worth reading: + +Russ Allbery: + + The GNU assumption that `/bin/sh' is the one and only shell leads + to a permanent deadlock. Vendors don't want to break users' + existing shell scripts, and there are some corner cases in the + Bourne shell that are not completely compatible with a Posix + shell. Thus, vendors who have taken this route will _never_ + (OK..."never say never") replace the Bourne shell (as `/bin/sh') + with a Posix shell. + +Robert Lipe: + + This is exactly the problem. While most (at least most System + V's) do have a Bourne shell that accepts shell functions most + vendor `/bin/sh' programs are not the Posix shell. + + So while most modern systems do have a shell _somewhere_ that + meets the Posix standard, the challenge is to find it. + + For this reason, part of the job of M4sh (*note Programming in +M4sh::) is to find such a shell. But to prevent trouble, if you're not +using M4sh you should not take advantage of features that were added +after Unix version 7, circa 1977 (*note Systemology::); you should not +use aliases, negated character classes, or even `unset'. `#' comments, +while not in Unix version 7, were retrofitted in the original Bourne +shell and can be assumed to be part of the least common denominator. + + On the other hand, if you're using M4sh you can assume that the shell +has the features that were added in SVR2 (circa 1984), including shell +functions, `return', `unset', and I/O redirection for builtins. For +more information, refer to `http://www.in-ulm.de/~mascheck/bourne/'. +However, some pitfalls have to be avoided for portable use of these +constructs; these will be documented in the rest of this chapter. See +in particular *note Shell Functions:: and *note Limitations of Shell +Builtins: Limitations of Builtins. + + Some ancient systems have quite small limits on the length of the +`#!' line; for instance, 32 bytes (not including the newline) on SunOS +4. However, these ancient systems are no longer of practical concern. + + The set of external programs you should run in a `configure' script +is fairly small. *Note Utilities in Makefiles: (standards)Utilities in +Makefiles, for the list. This restriction allows users to start out +with a fairly small set of programs and build the rest, avoiding too +many interdependencies between packages. + + Some of these external utilities have a portable subset of features; +see *note Limitations of Usual Tools::. + + There are other sources of documentation about shells. The +specification for the Posix Shell Command Language +(http://www.opengroup.org/susv3/utilities/xcu_chap02.html), though more +generous than the restrictive shell subset described above, is fairly +portable nowadays. Also please see the Shell FAQs +(http://www.faqs.org/faqs/unix-faq/shell/). + +* Menu: + +* Shellology:: A zoology of shells +* Invoking the Shell:: Invoking the shell as a command +* Here-Documents:: Quirks and tricks +* File Descriptors:: FDs and redirections +* Signal Handling:: Shells, signals, and headaches +* File System Conventions:: File names +* Shell Pattern Matching:: Pattern matching +* Shell Substitutions:: Variable and command expansions +* Assignments:: Varying side effects of assignments +* Parentheses:: Parentheses in shell scripts +* Slashes:: Slashes in shell scripts +* Special Shell Variables:: Variables you should not change +* Shell Functions:: What to look out for if you use them +* Limitations of Builtins:: Portable use of not so portable /bin/sh +* Limitations of Usual Tools:: Portable use of portable tools + + +File: autoconf.info, Node: Shellology, Next: Invoking the Shell, Up: Portable Shell + +11.1 Shellology +=============== + +There are several families of shells, most prominently the Bourne family +and the C shell family which are deeply incompatible. If you want to +write portable shell scripts, avoid members of the C shell family. The +the Shell difference FAQ +(http://www.faqs.org/faqs/unix-faq/shell/shell-differences/) includes a +small history of Posix shells, and a comparison between several of them. + + Below we describe some of the members of the Bourne shell family. + +Ash + Ash is often used on GNU/Linux and BSD systems as a light-weight + Bourne-compatible shell. Ash 0.2 has some bugs that are fixed in + the 0.3.x series, but portable shell scripts should work around + them, since version 0.2 is still shipped with many GNU/Linux + distributions. + + To be compatible with Ash 0.2: + + - don't use `$?' after expanding empty or unset variables, or + at the start of an `eval': + + foo= + false + $foo + echo "Do not use it: $?" + false + eval 'echo "Do not use it: $?"' + + - don't use command substitution within variable expansion: + + cat ${FOO=`bar`} + + - beware that single builtin substitutions are not performed by + a subshell, hence their effect applies to the current shell! + *Note Shell Substitutions::, item "Command Substitution". + +Bash + To detect whether you are running Bash, test whether + `BASH_VERSION' is set. To require Posix compatibility, run `set + -o posix'. *Note Bash Posix Mode: (bash)Bash POSIX Mode, for + details. + +Bash 2.05 and later + Versions 2.05 and later of Bash use a different format for the + output of the `set' builtin, designed to make evaluating its + output easier. However, this output is not compatible with earlier + versions of Bash (or with many other shells, probably). So if you + use Bash 2.05 or higher to execute `configure', you'll need to use + Bash 2.05 for all other build tasks as well. + +Ksh + The Korn shell is compatible with the Bourne family and it mostly + conforms to Posix. It has two major variants commonly called + `ksh88' and `ksh93', named after the years of initial release. It + is usually called `ksh', but is called `sh' on some hosts if you + set your path appropriately. + + Solaris systems have three variants: `/usr/bin/ksh' is `ksh88'; it + is standard on Solaris 2.0 and later. `/usr/xpg4/bin/sh' is a + Posix-compliant variant of `ksh88'; it is standard on Solaris 9 + and later. `/usr/dt/bin/dtksh' is `ksh93'. Variants that are not + standard may be parts of optional packages. There is no extra + charge for these packages, but they are not part of a minimal OS + install and therefore some installations may not have it. + + Starting with Tru64 Version 4.0, the Korn shell `/usr/bin/ksh' is + also available as `/usr/bin/posix/sh'. If the environment + variable `BIN_SH' is set to `xpg4', subsidiary invocations of the + standard shell conform to Posix. + +Pdksh + A public-domain clone of the Korn shell called `pdksh' is widely + available: it has most of the `ksh88' features along with a few of + its own. It usually sets `KSH_VERSION', except if invoked as + `/bin/sh' on OpenBSD, and similarly to Bash you can require Posix + compatibility by running `set -o posix'. Unfortunately, with + `pdksh' 5.2.14 (the latest stable version as of January 2007) + Posix mode is buggy and causes `pdksh' to depart from Posix in at + least one respect, see *note Shell Substitutions::. + +Zsh + To detect whether you are running `zsh', test whether + `ZSH_VERSION' is set. By default `zsh' is _not_ compatible with + the Bourne shell: you must execute `emulate sh', and for `zsh' + versions before 3.1.6-dev-18 you must also set `NULLCMD' to `:'. + *Note Compatibility: (zsh)Compatibility, for details. + + The default Mac OS X `sh' was originally Zsh; it was changed to + Bash in Mac OS X 10.2. + + +File: autoconf.info, Node: Invoking the Shell, Next: Here-Documents, Prev: Shellology, Up: Portable Shell + +11.2 Invoking the Shell +======================= + +The Korn shell (up to at least version M-12/28/93d) has a bug when +invoked on a file whose name does not contain a slash. It first +searches for the file's name in `PATH', and if found it executes that +rather than the original file. For example, assuming there is a binary +executable `/usr/bin/script' in your `PATH', the last command in the +following example fails because the Korn shell finds `/usr/bin/script' +and refuses to execute it as a shell script: + + $ touch xxyzzyz script + $ ksh xxyzzyz + $ ksh ./script + $ ksh script + ksh: script: cannot execute + + Bash 2.03 has a bug when invoked with the `-c' option: if the +option-argument ends in backslash-newline, Bash incorrectly reports a +syntax error. The problem does not occur if a character follows the +backslash: + + $ $ bash -c 'echo foo \ + > ' + bash: -c: line 2: syntax error: unexpected end of file + $ bash -c 'echo foo \ + > ' + foo + +*Note Backslash-Newline-Empty::, for how this can cause problems in +makefiles. + + +File: autoconf.info, Node: Here-Documents, Next: File Descriptors, Prev: Invoking the Shell, Up: Portable Shell + +11.3 Here-Documents +=================== + +Don't rely on `\' being preserved just because it has no special +meaning together with the next symbol. In the native `sh' on OpenBSD +2.7 `\"' expands to `"' in here-documents with unquoted delimiter. As +a general rule, if `\\' expands to `\' use `\\' to get `\'. + + With OpenBSD 2.7's `sh' + + $ cat <<EOF + > \" \\ + > EOF + " \ + +and with Bash: + + bash-2.04$ cat <<EOF + > \" \\ + > EOF + \" \ + + Using command substitutions in a here-document that is fed to a shell +function is not portable. For example, with Solaris 10 `/bin/sh': + + $ kitty () { cat; } + $ kitty <<EOF + > `echo ok` + > EOF + /tmp/sh199886: cannot open + $ echo $? + 1 + + Some shells mishandle large here-documents: for example, Solaris 10 +`dtksh' and the UnixWare 7.1.1 Posix shell, which are derived from Korn +shell version M-12/28/93d, mishandle braced variable expansion that +crosses a 1024- or 4096-byte buffer boundary within a here-document. +Only the part of the variable name after the boundary is used. For +example, `${variable}' could be replaced by the expansion of `${ble}'. +If the end of the variable name is aligned with the block boundary, the +shell reports an error, as if you used `${}'. Instead of +`${variable-default}', the shell may expand `${riable-default}', or +even `${fault}'. This bug can often be worked around by omitting the +braces: `$variable'. The bug was fixed in `ksh93g' (1998-04-30) but as +of 2006 many operating systems were still shipping older versions with +the bug. + + Empty here-documents are not portable either; with the following +code, `zsh' up to at least version 4.3.10 creates a file with a single +newline, whereas other shells create an empty file: + + cat >file <<EOF + EOF + + Many shells (including the Bourne shell) implement here-documents +inefficiently. In particular, some shells can be extremely inefficient +when a single statement contains many here-documents. For instance if +your `configure.ac' includes something like: + + if <cross_compiling>; then + assume this and that + else + check this + check that + check something else + ... + on and on forever + ... + fi + + A shell parses the whole `if'/`fi' construct, creating temporary +files for each here-document in it. Some shells create links for such +here-documents on every `fork', so that the clean-up code they had +installed correctly removes them. It is creating the links that can +take the shell forever. + + Moving the tests out of the `if'/`fi', or creating multiple +`if'/`fi' constructs, would improve the performance significantly. +Anyway, this kind of construct is not exactly the typical use of +Autoconf. In fact, it's even not recommended, because M4 macros can't +look into shell conditionals, so we may fail to expand a macro when it +was expanded before in a conditional path, and the condition turned out +to be false at runtime, and we end up not executing the macro at all. + + Be careful with the use of `<<-' to unindent here-documents. The +behavior is only portable for stripping leading <TAB>s, and things can +silently break if an overzealous editor converts to using leading +spaces (not all shells are nice enough to warn about unterminated +here-documents). + + $ printf 'cat <<-x\n\t1\n\t 2\n\tx\n' | bash && echo done + 1 + 2 + done + $ printf 'cat <<-x\n 1\n 2\n x\n' | bash-3.2 && echo done + 1 + 2 + x + done + + +File: autoconf.info, Node: File Descriptors, Next: Signal Handling, Prev: Here-Documents, Up: Portable Shell + +11.4 File Descriptors +===================== + +Most shells, if not all (including Bash, Zsh, Ash), output traces on +stderr, even for subshells. This might result in undesirable content +if you meant to capture the standard-error output of the inner command: + + $ ash -x -c '(eval "echo foo >&2") 2>stderr' + $ cat stderr + + eval echo foo >&2 + + echo foo + foo + $ bash -x -c '(eval "echo foo >&2") 2>stderr' + $ cat stderr + + eval 'echo foo >&2' + ++ echo foo + foo + $ zsh -x -c '(eval "echo foo >&2") 2>stderr' + # Traces on startup files deleted here. + $ cat stderr + +zsh:1> eval echo foo >&2 + +zsh:1> echo foo + foo + +One workaround is to grep out uninteresting lines, hoping not to remove +good ones. + + If you intend to redirect both standard error and standard output, +redirect standard output first. This works better with HP-UX, since +its shell mishandles tracing if standard error is redirected first: + + $ sh -x -c ': 2>err >out' + + : + + 2> err $ cat err + 1> out + + Don't try to redirect the standard error of a command substitution. +It must be done _inside_ the command substitution. When running `: `cd +/zorglub` 2>/dev/null' expect the error message to escape, while `: `cd +/zorglub 2>/dev/null`' works properly. + + On the other hand, some shells, such as Solaris or FreeBSD +`/bin/sh', warn about missing programs before performing redirections. +Therefore, to silently check whether a program exists, it is necessary +to perform redirections on a subshell or brace group: + $ /bin/sh -c 'nosuch 2>/dev/null' + nosuch: not found + $ /bin/sh -c '(nosuch) 2>/dev/null' + $ /bin/sh -c '{ nosuch; } 2>/dev/null' + $ bash -c 'nosuch 2>/dev/null' + + FreeBSD 6.2 sh may mix the trace output lines from the statements in +a shell pipeline. + + It is worth noting that Zsh (but not Ash nor Bash) makes it possible +in assignments though: `foo=`cd /zorglub` 2>/dev/null'. + + Some shells, like `ash', don't recognize bi-directional redirection +(`<>'). And even on shells that recognize it, it is not portable to +use on fifos: Posix does not require read-write support for named +pipes, and Cygwin does not support it: + + $ mkfifo fifo + $ exec 5<>fifo + $ echo hi >&5 + bash: echo: write error: Communication error on send + +Furthermore, versions of `dash' before 0.5.6 mistakenly truncate +regular files when using `<>': + + $ echo a > file + $ bash -c ': 1<>file'; cat file + a + $ dash -c ': 1<>file'; cat file + $ rm a + + When catering to old systems, don't redirect the same file descriptor +several times, as you are doomed to failure under Ultrix. + + ULTRIX V4.4 (Rev. 69) System #31: Thu Aug 10 19:42:23 GMT 1995 + UWS V4.4 (Rev. 11) + $ eval 'echo matter >fullness' >void + illegal io + $ eval '(echo matter >fullness)' >void + illegal io + $ (eval '(echo matter >fullness)') >void + Ambiguous output redirect. + +In each case the expected result is of course `fullness' containing +`matter' and `void' being empty. However, this bug is probably not of +practical concern to modern platforms. + + Solaris 10 `sh' will try to optimize away a `:' command (even if it +is redirected) in a loop after the first iteration, or in a shell +function after the first call: + + $ for i in 1 2 3 ; do : >x$i; done + $ ls x* + x1 + $ f () { : >$1; }; f y1; f y2; f y3; + $ ls y* + y1 + +As a workaround, `echo' or `eval' can be used. + + Don't rely on file descriptors 0, 1, and 2 remaining closed in a +subsidiary program. If any of these descriptors is closed, the +operating system may open an unspecified file for the descriptor in the +new process image. Posix 2008 says this may be done only if the +subsidiary program is set-user-ID or set-group-ID, but HP-UX 11.23 does +it even for ordinary programs, and the next version of Posix will allow +HP-UX behavior. + + If you want a file descriptor above 2 to be inherited into a child +process, then you must use redirections specific to that command or a +containing subshell or command group, rather than relying on `exec' in +the shell. In `ksh' as well as HP-UX `sh', file descriptors above 2 +which are opened using `exec N>file' are closed by a subsequent `exec' +(such as that involved in the fork-and-exec which runs a program or +script): + + $ echo 'echo hello >&5' >k + $ /bin/sh -c 'exec 5>t; ksh ./k; exec 5>&-; cat t + hello + $ bash -c 'exec 5>t; ksh ./k; exec 5>&-; cat t + hello + $ ksh -c 'exec 5>t; ksh ./k; exec 5>&-; cat t + ./k[1]: 5: cannot open [Bad file number] + $ ksh -c '(ksh ./k) 5>t; cat t' + hello + $ ksh -c '{ ksh ./k; } 5>t; cat t' + hello + $ ksh -c '5>t ksh ./k; cat t + hello + + Don't rely on duplicating a closed file descriptor to cause an +error. With Solaris `/bin/sh', failed duplication is silently ignored, +which can cause unintended leaks to the original file descriptor. In +this example, observe the leak to standard output: + + $ bash -c 'echo hi >&3' 3>&-; echo $? + bash: 3: Bad file descriptor + 1 + $ /bin/sh -c 'echo hi >&3' 3>&-; echo $? + hi + 0 + + Fortunately, an attempt to close an already closed file descriptor +will portably succeed. Likewise, it is safe to use either style of +`N<&-' or `N>&-' for closing a file descriptor, even if it doesn't +match the read/write mode that the file descriptor was opened with. + + DOS variants cannot rename or remove open files, such as in `mv foo +bar >foo' or `rm foo >foo', even though this is perfectly portable +among Posix hosts. + + A few ancient systems reserved some file descriptors. By convention, +file descriptor 3 was opened to `/dev/tty' when you logged into Eighth +Edition (1985) through Tenth Edition Unix (1989). File descriptor 4 +had a special use on the Stardent/Kubota Titan (circa 1990), though we +don't now remember what it was. Both these systems are obsolete, so +it's now safe to treat file descriptors 3 and 4 like any other file +descriptors. + + On the other hand, you can't portably use multi-digit file +descriptors. Solaris `ksh' doesn't understand any file descriptor +larger than `9': + + $ bash -c 'exec 10>&-'; echo $? + 0 + $ ksh -c 'exec 9>&-'; echo $? + 0 + $ ksh -c 'exec 10>&-'; echo $? + ksh[1]: exec: 10: not found + 127 + + +File: autoconf.info, Node: Signal Handling, Next: File System Conventions, Prev: File Descriptors, Up: Portable Shell + +11.5 Signal Handling +==================== + +Portable handling of signals within the shell is another major source of +headaches. This is worsened by the fact that various different, +mutually incompatible approaches are possible in this area, each with +its distinctive merits and demerits. A detailed description of these +possible approaches, as well as of their pros and cons, can be found in +this article (http://www.cons.org/cracauer/sigint.html). + + Solaris 10 `/bin/sh' automatically traps most signals by default; +the shell still exits with error upon termination by one of those +signals, but in such a case the exit status might be somewhat +unexpected (even if allowed by POSIX, strictly speaking): + + $ bash -c 'kill -1 $$'; echo $? # Will exit 128 + (signal number). + Hangup + 129 + $ /bin/ksh -c 'kill -15 $$'; echo $? # Likewise. + Terminated + 143 + $ for sig in 1 2 3 15; do + > echo $sig: + > /bin/sh -c "kill -$s \$\$"; echo $? + > done + signal 1: + Hangup + 129 + signal 2: + 208 + signal 3: + 208 + signal 15: + 208 + + This gets even worse if one is using the POSIX `wait' interface to +get details about the shell process terminations: it will result in the +shell having exited normally, rather than by receiving a signal. + + $ cat > foo.c <<'END' + #include <stdio.h> /* for printf */ + #include <stdlib.h> /* for system */ + #include <sys/wait.h> /* for WIF* macros */ + int main(void) + { + int status = system ("kill -15 $$"); + printf ("Terminated by signal: %s\n", + WIFSIGNALED (status) ? "yes" : "no"); + printf ("Exited normally: %s\n", + WIFEXITED (status) ? "yes" : "no"); + return 0; + } + END + $ cc -o foo foo.c + $ ./a.out # On GNU/Linux + Terminated by signal: no + Exited normally: yes + $ ./a.out # On Solaris 10 + Terminated by signal: yes + Exited normally: no + + Various shells seem to handle `SIGQUIT' specially: they ignore it +even if it is not blocked, and even if the shell is not running +interactively (in fact, even if the shell has no attached tty); among +these shells are at least Bash (from version 2 onwards), Zsh 4.3.12, +Solaris 10 `/bin/ksh' and `/usr/xpg4/bin/sh', and AT&T `ksh93' (2011). +Still, `SIGQUIT' seems to be trappable quite portably within all these +shells. OTOH, some other shells doesn't special-case the handling of +`SIGQUIT'; among these shells are at least `pdksh' 5.2.14, Solaris 10 +and NetBSD 5.1 `/bin/sh', and the Almquist Shell 0.5.5.1. + + Some shells (especially Korn shells and derivatives) might try to +propagate to themselves a signal that has killed a child process; this +is not a bug, but a conscious design choice (although its overall value +might be debatable). The exact details of how this is attained vary +from shell to shell. For example, upon running `perl -e 'kill 2, $$'', +after the perl process has been interrupted AT&T `ksh93' (2011) will +proceed to send itself a `SIGINT', while Solaris 10 `/bin/ksh' and +`/usr/xpg4/bin/sh' will proceed to exit with status 130 (i.e., 128 + +2). In any case, if there is an active trap associated with `SIGINT', +those shells will correctly execute it. + + Some Korn shells, when a child process die due receiving a signal +with signal number N, can leave in `$?' an exit status of 256+N instead +of the more common 128+N. Observe the difference between AT&T `ksh93' +(2011) and `bash' 4.1.5 on Debian: + + $ /bin/ksh -c 'sh -c "kill -1 \$\$"; echo $?' + /bin/ksh: line 1: 7837: Hangup + 257 + $ /bin/bash -c 'sh -c "kill -1 \$\$"; echo $?' + /bin/bash: line 1: 7861 Hangup (sh -c "kill -1 \$\$") + 129 + +This `ksh' behavior is allowed by POSIX, if implemented with due care; +see this Austin Group discussion +(http://www.austingroupbugs.net/view.php?id=51) for more background. +However, if it is not implemented with proper care, such a behavior +might cause problems in some corner cases. To see why, assume we have +a "wrapper" script like this: + + #!/bin/sh + # Ignore some signals in the shell only, not in its child processes. + trap : 1 2 13 15 + wrapped_command "$@" + ret=$? + other_command + exit $ret + +If `wrapped_command' is interrupted by a `SIGHUP' (which has signal +number 1), `ret' will be set to 257. Unless the `exit' shell builtin +is smart enough to understand that such a value can only have +originated from a signal, and adjust the final wait status of the shell +appropriately, the value 257 will just get truncated to 1 by the +closing `exit' call, so that a caller of the script will have no way to +determine that termination by a signal was involved. Observe the +different behavior of AT&T `ksh93' (2011) and `bash' 4.1.5 on Debian: + + $ cat foo.sh + #!/bin/sh + sh -c 'kill -1 $$' + ret=$? + echo $ret + exit $ret + $ /bin/ksh foo.sh; echo $? + foo.sh: line 2: 12479: Hangup + 257 + 1 + $ /bin/bash foo.sh; echo $? + foo.sh: line 2: 12487 Hangup (sh -c 'kill -1 $$') + 129 + 129 + + +File: autoconf.info, Node: File System Conventions, Next: Shell Pattern Matching, Prev: Signal Handling, Up: Portable Shell + +11.6 File System Conventions +============================ + +Autoconf uses shell-script processing extensively, so the file names +that it processes should not contain characters that are special to the +shell. Special characters include space, tab, newline, NUL, and the +following: + + " # $ & ' ( ) * ; < = > ? [ \ ` | + + Also, file names should not begin with `~' or `-', and should +contain neither `-' immediately after `/' nor `~' immediately after +`:'. On Posix-like platforms, directory names should not contain `:', +as this runs afoul of `:' used as the path separator. + + These restrictions apply not only to the files that you distribute, +but also to the absolute file names of your source, build, and +destination directories. + + On some Posix-like platforms, `!' and `^' are special too, so they +should be avoided. + + Posix lets implementations treat leading `//' specially, but +requires leading `///' and beyond to be equivalent to `/'. Most Unix +variants treat `//' like `/'. However, some treat `//' as a +"super-root" that can provide access to files that are not otherwise +reachable from `/'. The super-root tradition began with Apollo +Domain/OS, which died out long ago, but unfortunately Cygwin has +revived it. + + While `autoconf' and friends are usually run on some Posix variety, +they can be used on other systems, most notably DOS variants. This +impacts several assumptions regarding file names. + +For example, the following code: + + case $foo_dir in + /*) # Absolute + ;; + *) + foo_dir=$dots$foo_dir ;; + esac + +fails to properly detect absolute file names on those systems, because +they can use a drivespec, and usually use a backslash as directory +separator. If you want to be portable to DOS variants (at the price of +rejecting valid but oddball Posix file names like `a:\b'), you can +check for absolute file names like this: + + case $foo_dir in + [\\/]* | ?:[\\/]* ) # Absolute + ;; + *) + foo_dir=$dots$foo_dir ;; + esac + +Make sure you quote the brackets if appropriate and keep the backslash +as first character (*note Limitations of Shell Builtins: case.). + + Also, because the colon is used as part of a drivespec, these +systems don't use it as path separator. When creating or accessing +paths, you can use the `PATH_SEPARATOR' output variable instead. +`configure' sets this to the appropriate value for the build system +(`:' or `;') when it starts up. + + File names need extra care as well. While DOS variants that are +Posixy enough to run `autoconf' (such as DJGPP) are usually able to +handle long file names properly, there are still limitations that can +seriously break packages. Several of these issues can be easily +detected by the doschk +(ftp://ftp.gnu.org/gnu/non-gnu/doschk/doschk-1.1.tar.gz) package. + + A short overview follows; problems are marked with SFN/LFN to +indicate where they apply: SFN means the issues are only relevant to +plain DOS, not to DOS under Microsoft Windows variants, while LFN +identifies problems that exist even under Microsoft Windows variants. + +No multiple dots (SFN) + DOS cannot handle multiple dots in file names. This is an + especially important thing to remember when building a portable + configure script, as `autoconf' uses a .in suffix for template + files. + + This is perfectly OK on Posix variants: + + AC_CONFIG_HEADERS([config.h]) + AC_CONFIG_FILES([source.c foo.bar]) + AC_OUTPUT + + but it causes problems on DOS, as it requires `config.h.in', + `source.c.in' and `foo.bar.in'. To make your package more portable + to DOS-based environments, you should use this instead: + + AC_CONFIG_HEADERS([config.h:config.hin]) + AC_CONFIG_FILES([source.c:source.cin foo.bar:foobar.in]) + AC_OUTPUT + +No leading dot (SFN) + DOS cannot handle file names that start with a dot. This is + usually not important for `autoconf'. + +Case insensitivity (LFN) + DOS is case insensitive, so you cannot, for example, have both a + file called `INSTALL' and a directory called `install'. This also + affects `make'; if there's a file called `INSTALL' in the + directory, `make install' does nothing (unless the `install' + target is marked as PHONY). + +The 8+3 limit (SFN) + Because the DOS file system only stores the first 8 characters of + the file name and the first 3 of the extension, those must be + unique. That means that `foobar-part1.c', `foobar-part2.c' and + `foobar-prettybird.c' all resolve to the same file name + (`FOOBAR-P.C'). The same goes for `foo.bar' and `foo.bartender'. + + The 8+3 limit is not usually a problem under Microsoft Windows, as + it uses numeric tails in the short version of file names to make + them unique. However, a registry setting can turn this behavior + off. While this makes it possible to share file trees containing + long file names between SFN and LFN environments, it also means + the above problem applies there as well. + +Invalid characters (LFN) + Some characters are invalid in DOS file names, and should therefore + be avoided. In a LFN environment, these are `/', `\', `?', `*', + `:', `<', `>', `|' and `"'. In a SFN environment, other + characters are also invalid. These include `+', `,', `[' and `]'. + +Invalid names (LFN) + Some DOS file names are reserved, and cause problems if you try to + use files with those names. These names include `CON', `AUX', + `COM1', `COM2', `COM3', `COM4', `LPT1', `LPT2', `LPT3', `NUL', and + `PRN'. File names are case insensitive, so even names like + `aux/config.guess' are disallowed. + + + +File: autoconf.info, Node: Shell Pattern Matching, Next: Shell Substitutions, Prev: File System Conventions, Up: Portable Shell + +11.7 Shell Pattern Matching +=========================== + +Nowadays portable patterns can use negated character classes like +`[!-aeiou]'. The older syntax `[^-aeiou]' is supported by some shells +but not others; hence portable scripts should never use `^' as the +first character of a bracket pattern. + + Outside the C locale, patterns like `[a-z]' are problematic since +they may match characters that are not lower-case letters. + + +File: autoconf.info, Node: Shell Substitutions, Next: Assignments, Prev: Shell Pattern Matching, Up: Portable Shell + +11.8 Shell Substitutions +======================== + +Contrary to a persistent urban legend, the Bourne shell does not +systematically split variables and back-quoted expressions, in +particular on the right-hand side of assignments and in the argument of +`case'. For instance, the following code: + + case "$given_srcdir" in + .) top_srcdir="`echo "$dots" | sed 's|/$||'`" ;; + *) top_srcdir="$dots$given_srcdir" ;; + esac + +is more readable when written as: + + case $given_srcdir in + .) top_srcdir=`echo "$dots" | sed 's|/$||'` ;; + *) top_srcdir=$dots$given_srcdir ;; + esac + +and in fact it is even _more_ portable: in the first case of the first +attempt, the computation of `top_srcdir' is not portable, since not all +shells properly understand `"`..."..."...`"', for example Solaris 10 +ksh: + + $ foo="`echo " bar" | sed 's, ,,'`" + ksh: : cannot execute + ksh: bar | sed 's, ,,': cannot execute + +Posix does not specify behavior for this sequence. On the other hand, +behavior for `"`...\"...\"...`"' is specified by Posix, but in +practice, not all shells understand it the same way: pdksh 5.2.14 +prints spurious quotes when in Posix mode: + + $ echo "`echo \"hello\"`" + hello + $ set -o posix + $ echo "`echo \"hello\"`" + "hello" + +There is just no portable way to use double-quoted strings inside +double-quoted back-quoted expressions (pfew!). + + Bash 4.1 has a bug where quoted empty strings adjacent to unquoted +parameter expansions are elided during word splitting. Meanwhile, zsh +does not perform word splitting except when in Bourne compatibility +mode. In the example below, the correct behavior is to have five +arguments to the function, and exactly two spaces on either side of the +middle `-', since word splitting collapses multiple spaces in `$f' but +leaves empty arguments intact. + + $ bash -c 'n() { echo "$#$@"; }; f=" - "; n - ""$f"" -' + 3- - - + $ ksh -c 'n() { echo "$#$@"; }; f=" - "; n - ""$f"" -' + 5- - - + $ zsh -c 'n() { echo "$#$@"; }; f=" - "; n - ""$f"" -' + 3- - - + $ zsh -c 'emulate sh; + > n() { echo "$#$@"; }; f=" - "; n - ""$f"" -' + 5- - - + +You can work around this by doing manual word splitting, such as using +`"$str" $list' rather than `"$str"$list'. + + There are also portability pitfalls with particular expansions: + +`$@' + One of the most famous shell-portability issues is related to + `"$@"'. When there are no positional arguments, Posix says that + `"$@"' is supposed to be equivalent to nothing, but the original + Unix version 7 Bourne shell treated it as equivalent to `""' + instead, and this behavior survives in later implementations like + Digital Unix 5.0. + + The traditional way to work around this portability problem is to + use `${1+"$@"}'. Unfortunately this method does not work with Zsh + (3.x and 4.x), which is used on Mac OS X. When emulating the + Bourne shell, Zsh performs word splitting on `${1+"$@"}': + + zsh $ emulate sh + zsh $ for i in "$@"; do echo $i; done + Hello World + ! + zsh $ for i in ${1+"$@"}; do echo $i; done + Hello + World + ! + + Zsh handles plain `"$@"' properly, but we can't use plain `"$@"' + because of the portability problems mentioned above. One + workaround relies on Zsh's "global aliases" to convert `${1+"$@"}' + into `"$@"' by itself: + + test "${ZSH_VERSION+set}" = set && alias -g '${1+"$@"}'='"$@"' + + Zsh only recognizes this alias when a shell word matches it + exactly; `"foo"${1+"$@"}' remains subject to word splitting. + Since this case always yields at least one shell word, use plain + `"$@"'. + + A more conservative workaround is to avoid `"$@"' if it is + possible that there may be no positional arguments. For example, + instead of: + + cat conftest.c "$@" + + you can use this instead: + + case $# in + 0) cat conftest.c;; + *) cat conftest.c "$@";; + esac + + Autoconf macros often use the `set' command to update `$@', so if + you are writing shell code intended for `configure' you should not + assume that the value of `$@' persists for any length of time. + +`${10}' + The 10th, 11th, ... positional parameters can be accessed only + after a `shift'. The 7th Edition shell reported an error if given + `${10}', and Solaris 10 `/bin/sh' still acts that way: + + $ set 1 2 3 4 5 6 7 8 9 10 + $ echo ${10} + bad substitution + + Conversely, not all shells obey the Posix rule that when braces are + omitted, multiple digits beyond a `$' imply the single-digit + positional parameter expansion concatenated with the remaining + literal digits. To work around the issue, you must use braces. + + $ bash -c 'set a b c d e f g h i j; echo $10 ${1}0' + a0 a0 + $ dash -c 'set a b c d e f g h i j; echo $10 ${1}0' + j a0 + +`${VAR:-VALUE}' + Old BSD shells, including the Ultrix `sh', don't accept the colon + for any shell substitution, and complain and die. Similarly for + ${VAR:=VALUE}, ${VAR:?VALUE}, etc. However, all shells that + support functions allow the use of colon in shell substitution, + and since m4sh requires functions, you can portably use null + variable substitution patterns in configure scripts. + +`${VAR+VALUE}' + When using `${VAR-VALUE}' or `${VAR-VALUE}' for providing + alternate substitutions, VALUE must either be a single shell word, + quoted, or in the context of an unquoted here-document. Solaris + `/bin/sh' complains otherwise. + + $ /bin/sh -c 'echo ${a-b c}' + /bin/sh: bad substitution + $ /bin/sh -c 'echo ${a-'\''b c'\''}' + b c + $ /bin/sh -c 'echo "${a-b c}"' + b c + $ /bin/sh -c 'cat <<EOF + ${a-b c} + EOF + b c + + According to Posix, if an expansion occurs inside double quotes, + then the use of unquoted double quotes within VALUE is + unspecified, and any single quotes become literal characters; in + that case, escaping must be done with backslash. Likewise, the + use of unquoted here-documents is a case where double quotes have + unspecified results: + + $ /bin/sh -c 'echo "${a-"b c"}"' + /bin/sh: bad substitution + $ ksh -c 'echo "${a-"b c"}"' + b c + $ bash -c 'echo "${a-"b c"}"' + b c + $ /bin/sh -c 'a=; echo ${a+'\''b c'\''}' + b c + $ /bin/sh -c 'a=; echo "${a+'\''b c'\''}"' + 'b c' + $ /bin/sh -c 'a=; echo "${a+\"b c\"}"' + "b c" + $ /bin/sh -c 'a=; echo "${a+b c}"' + b c + $ /bin/sh -c 'cat <<EOF + ${a-"b c"} + EOF' + "b c" + $ /bin/sh -c 'cat <<EOF + ${a-'b c'} + EOF' + 'b c' + $ bash -c 'cat <<EOF + ${a-"b c"} + EOF' + b c + $ bash -c 'cat <<EOF + ${a-'b c'} + EOF' + 'b c' + + Perhaps the easiest way to work around quoting issues in a manner + portable to all shells is to place the results in a temporary + variable, then use `$t' as the VALUE, rather than trying to inline + the expression needing quoting. + + $ /bin/sh -c 't="b c\"'\''}\\"; echo "${a-$t}"' + b c"'}\ + $ ksh -c 't="b c\"'\''}\\"; echo "${a-$t}"' + b c"'}\ + $ bash -c 't="b c\"'\''}\\"; echo "${a-$t}"' + b c"'}\ + +`${VAR=VALUE}' + When using `${VAR=VALUE}' to assign a default value to VAR, + remember that even though the assignment to VAR does not undergo + file name expansion, the result of the variable expansion does + unless the expansion occurred within double quotes. In particular, + when using `:' followed by unquoted variable expansion for the + side effect of setting a default value, if the final value of + `$var' contains any globbing characters (either from VALUE or from + prior contents), the shell has to spend time performing file name + expansion and field splitting even though those results will not be + used. Therefore, it is a good idea to consider double quotes when + performing default initialization; while remembering how this + impacts any quoting characters appearing in VALUE. + + $ time bash -c ': "${a=/usr/bin/*}"; echo "$a"' + /usr/bin/* + + real 0m0.005s + user 0m0.002s + sys 0m0.003s + $ time bash -c ': ${a=/usr/bin/*}; echo "$a"' + /usr/bin/* + + real 0m0.039s + user 0m0.026s + sys 0m0.009s + $ time bash -c 'a=/usr/bin/*; : ${a=noglob}; echo "$a"' + /usr/bin/* + + real 0m0.031s + user 0m0.020s + sys 0m0.010s + + $ time bash -c 'a=/usr/bin/*; : "${a=noglob}"; echo "$a"' + /usr/bin/* + + real 0m0.006s + user 0m0.002s + sys 0m0.003s + + As with `+' and `-', you must use quotes when using `=' if the + VALUE contains more than one shell word; either single quotes for + just the VALUE, or double quotes around the entire expansion: + + $ : ${var1='Some words'} + $ : "${var2=like this}" + $ echo $var1 $var2 + Some words like this + + otherwise some shells, such as Solaris `/bin/sh' or on Digital + Unix V 5.0, die because of a "bad substitution". Meanwhile, Posix + requires that with `=', quote removal happens prior to the + assignment, and the expansion be the final contents of VAR without + quoting (and thus subject to field splitting), in contrast to the + behavior with `-' passing the quoting through to the final + expansion. However, `bash' 4.1 does not obey this rule. + + $ ksh -c 'echo ${var-a\ \ b}' + a b + $ ksh -c 'echo ${var=a\ \ b}' + a b + $ bash -c 'echo ${var=a\ \ b}' + a b + + Finally, Posix states that when mixing `${a=b}' with regular + commands, it is unspecified whether the assignments affect the + parent shell environment. It is best to perform assignments + independently from commands, to avoid the problems demonstrated in + this example: + + $ bash -c 'x= y=${x:=b} sh -c "echo +\$x+\$y+";echo -$x-' + +b+b+ + -b- + $ /bin/sh -c 'x= y=${x:=b} sh -c "echo +\$x+\$y+";echo -$x-' + ++b+ + -- + $ ksh -c 'x= y=${x:=b} sh -c "echo +\$x+\$y+";echo -$x-' + +b+b+ + -- + +`${VAR=VALUE}' + Solaris `/bin/sh' has a frightening bug in its handling of literal + assignments. Imagine you need set a variable to a string + containing `}'. This `}' character confuses Solaris `/bin/sh' + when the affected variable was already set. This bug can be + exercised by running: + + $ unset foo + $ foo=${foo='}'} + $ echo $foo + } + $ foo=${foo='}' # no error; this hints to what the bug is + $ echo $foo + } + $ foo=${foo='}'} + $ echo $foo + }} + ^ ugh! + + It seems that `}' is interpreted as matching `${', even though it + is enclosed in single quotes. The problem doesn't happen using + double quotes, or when using a temporary variable holding the + problematic string. + +`${VAR=EXPANDED-VALUE}' + On Ultrix, running + + default="yu,yaa" + : ${var="$default"} + + sets VAR to `M-yM-uM-,M-yM-aM-a', i.e., the 8th bit of each char + is set. You don't observe the phenomenon using a simple `echo + $var' since apparently the shell resets the 8th bit when it + expands $var. Here are two means to make this shell confess its + sins: + + $ cat -v <<EOF + $var + EOF + + and + + $ set | grep '^var=' | cat -v + + One classic incarnation of this bug is: + + default="a b c" + : ${list="$default"} + for c in $list; do + echo $c + done + + You'll get `a b c' on a single line. Why? Because there are no + spaces in `$list': there are `M- ', i.e., spaces with the 8th bit + set, hence no IFS splitting is performed!!! + + One piece of good news is that Ultrix works fine with `: + ${list=$default}'; i.e., if you _don't_ quote. The bad news is + then that QNX 4.25 then sets LIST to the _last_ item of DEFAULT! + + The portable way out consists in using a double assignment, to + switch the 8th bit twice on Ultrix: + + list=${list="$default"} + + ...but beware of the `}' bug from Solaris (see above). For safety, + use: + + test "${var+set}" = set || var={VALUE} + +`${#VAR}' +`${VAR%WORD}' +`${VAR%%WORD}' +`${VAR#WORD}' +`${VAR##WORD}' + Posix requires support for these usages, but they do not work with + many traditional shells, e.g., Solaris 10 `/bin/sh'. + + Also, `pdksh' 5.2.14 mishandles some WORD forms. For example if + `$1' is `a/b' and `$2' is `a', then `${1#$2}' should yield `/b', + but with `pdksh' it yields the empty string. + +``COMMANDS`' + Posix requires shells to trim all trailing newlines from command + output before substituting it, so assignments like `dir=`echo + "$file" | tr a A`' do not work as expected if `$file' ends in a + newline. + + While in general it makes no sense, do not substitute a single + builtin with side effects, because Ash 0.2, trying to optimize, + does not fork a subshell to perform the command. + + For instance, if you wanted to check that `cd' is silent, do not + use `test -z "`cd /`"' because the following can happen: + + $ pwd + /tmp + $ test -z "`cd /`" && pwd + / + + The result of `foo=`exit 1`' is left as an exercise to the reader. + + The MSYS shell leaves a stray byte in the expansion of a + double-quoted command substitution of a native program, if the end + of the substitution is not aligned with the end of the double + quote. This may be worked around by inserting another pair of + quotes: + + $ echo "`printf 'foo\r\n'` bar" > broken + $ echo "`printf 'foo\r\n'`"" bar" | cmp - broken + - broken differ: char 4, line 1 + + Upon interrupt or SIGTERM, some shells may abort a command + substitution, replace it with a null string, and wrongly evaluate + the enclosing command before entering the trap or ending the + script. This can lead to spurious errors: + + $ sh -c 'if test `sleep 5; echo hi` = hi; then echo yes; fi' + $ ^C + sh: test: hi: unexpected operator/operand + + You can avoid this by assigning the command substitution to a + temporary variable: + + $ sh -c 'res=`sleep 5; echo hi` + if test "x$res" = xhi; then echo yes; fi' + $ ^C + +`$(COMMANDS)' + This construct is meant to replace ``COMMANDS`', and it has most + of the problems listed under ``COMMANDS`'. + + This construct can be nested while this is impossible to do + portably with back quotes. Unfortunately it is not yet + universally supported. Most notably, even recent releases of + Solaris don't support it: + + $ showrev -c /bin/sh | grep version + Command version: SunOS 5.10 Generic 121005-03 Oct 2006 + $ echo $(echo blah) + syntax error: `(' unexpected + + nor does IRIX 6.5's Bourne shell: + $ uname -a + IRIX firebird-image 6.5 07151432 IP22 + $ echo $(echo blah) + $(echo blah) + + If you do use `$(COMMANDS)', make sure that the commands do not + start with a parenthesis, as that would cause confusion with a + different notation `$((EXPRESSION))' that in modern shells is an + arithmetic expression not a command. To avoid the confusion, + insert a space between the two opening parentheses. + + Avoid COMMANDS that contain unbalanced parentheses in + here-documents, comments, or case statement patterns, as many + shells mishandle them. For example, Bash 3.1, `ksh88', `pdksh' + 5.2.14, and Zsh 4.2.6 all mishandle the following valid command: + + echo $(case x in x) echo hello;; esac) + +`$((EXPRESSION))' + Arithmetic expansion is not portable as some shells (most notably + Solaris 10 `/bin/sh') don't support it. + + Among shells that do support `$(( ))', not all of them obey the + Posix rule that octal and hexadecimal constants must be recognized: + + $ bash -c 'echo $(( 010 + 0x10 ))' + 24 + $ zsh -c 'echo $(( 010 + 0x10 ))' + 26 + $ zsh -c 'emulate sh; echo $(( 010 + 0x10 ))' + 24 + $ pdksh -c 'echo $(( 010 + 0x10 ))' + pdksh: 010 + 0x10 : bad number `0x10' + $ pdksh -c 'echo $(( 010 ))' + 10 + + When it is available, using arithmetic expansion provides a + noticeable speedup in script execution; but testing for support + requires `eval' to avoid syntax errors. The following construct + is used by `AS_VAR_ARITH' to provide arithmetic computation when + all arguments are provided in decimal and without a leading zero, + and all operators are properly quoted and appear as distinct + arguments: + + if ( eval 'test $(( 1 + 1 )) = 2' ) 2>/dev/null; then + eval 'func_arith () + { + func_arith_result=$(( $* )) + }' + else + func_arith () + { + func_arith_result=`expr "$@"` + } + fi + func_arith 1 + 1 + foo=$func_arith_result + +`^' + Always quote `^', otherwise traditional shells such as `/bin/sh' + on Solaris 10 treat this like `|'. + + + +File: autoconf.info, Node: Assignments, Next: Parentheses, Prev: Shell Substitutions, Up: Portable Shell + +11.9 Assignments +================ + +When setting several variables in a row, be aware that the order of the +evaluation is undefined. For instance `foo=1 foo=2; echo $foo' gives +`1' with Solaris `/bin/sh', but `2' with Bash. You must use `;' to +enforce the order: `foo=1; foo=2; echo $foo'. + + Don't rely on the following to find `subdir/program': + + PATH=subdir$PATH_SEPARATOR$PATH program + +as this does not work with Zsh 3.0.6. Use something like this instead: + + (PATH=subdir$PATH_SEPARATOR$PATH; export PATH; exec program) + + Don't rely on the exit status of an assignment: Ash 0.2 does not +change the status and propagates that of the last statement: + + $ false || foo=bar; echo $? + 1 + $ false || foo=`:`; echo $? + 0 + +and to make things even worse, QNX 4.25 just sets the exit status to 0 +in any case: + + $ foo=`exit 1`; echo $? + 0 + + To assign default values, follow this algorithm: + + 1. If the default value is a literal and does not contain any closing + brace, use: + + : "${var='my literal'}" + + 2. If the default value contains no closing brace, has to be + expanded, and the variable being initialized is not intended to be + IFS-split (i.e., it's not a list), then use: + + : ${var="$default"} + + 3. If the default value contains no closing brace, has to be + expanded, and the variable being initialized is intended to be + IFS-split (i.e., it's a list), then use: + + var=${var="$default"} + + 4. If the default value contains a closing brace, then use: + + test "${var+set}" = set || var="has a '}'" + + In most cases `var=${var="$default"}' is fine, but in case of doubt, +just use the last form. *Note Shell Substitutions::, items +`${VAR:-VALUE}' and `${VAR=VALUE}' for the rationale. + + +File: autoconf.info, Node: Parentheses, Next: Slashes, Prev: Assignments, Up: Portable Shell + +11.10 Parentheses in Shell Scripts +================================== + +Beware of two opening parentheses in a row, as many shell +implementations treat them specially, and Posix says that a portable +script cannot use `((' outside the `$((' form used for shell +arithmetic. In traditional shells, `((cat))' behaves like `(cat)'; but +many shells, including Bash and the Korn shell, treat `((cat))' as an +arithmetic expression equivalent to `let "cat"', and may or may not +report an error when they detect that `cat' is not a number. As another +example, `pdksh' 5.2.14 does not treat the following code as a +traditional shell would: + + if ((true) || false); then + echo ok + fi + +To work around this problem, insert a space between the two opening +parentheses. There is a similar problem and workaround with `$(('; see +*note Shell Substitutions::. + + +File: autoconf.info, Node: Slashes, Next: Special Shell Variables, Prev: Parentheses, Up: Portable Shell + +11.11 Slashes in Shell Scripts +============================== + +Unpatched Tru64 5.1 `sh' omits the last slash of command-line arguments +that contain two trailing slashes: + + $ echo / // /// //// .// //. + / / // /// ./ //. + $ x=// + $ eval "echo \$x" + / + $ set -x + $ echo abc | tr -t ab // + + echo abc + + tr -t ab / + /bc + + Unpatched Tru64 4.0 `sh' adds a slash after `"$var"' if the variable +is empty and the second double-quote is followed by a word that begins +and ends with slash: + + $ sh -xc 'p=; echo "$p"/ouch/' + p= + + echo //ouch/ + //ouch/ + + However, our understanding is that patches are available, so perhaps +it's not worth worrying about working around these horrendous bugs. + + +File: autoconf.info, Node: Special Shell Variables, Next: Shell Functions, Prev: Slashes, Up: Portable Shell + +11.12 Special Shell Variables +============================= + +Some shell variables should not be used, since they can have a deep +influence on the behavior of the shell. In order to recover a sane +behavior from the shell, some variables should be unset; M4sh takes +care of this and provides fallback values, whenever needed, to cater +for a very old `/bin/sh' that does not support `unset'. (*note +Portable Shell Programming: Portable Shell.). + + As a general rule, shell variable names containing a lower-case +letter are safe; you can define and use these variables without +worrying about their effect on the underlying system, and without +worrying about whether the shell changes them unexpectedly. (The +exception is the shell variable `status', as described below.) + + Here is a list of names that are known to cause trouble. This list +is not exhaustive, but you should be safe if you avoid the name +`status' and names containing only upper-case letters and underscores. + +`?' + Not all shells correctly reset `$?' after conditionals (*note + Limitations of Shell Builtins: if.). Not all shells manage `$?' + correctly in shell functions (*note Shell Functions::) or in traps + (*note Limitations of Shell Builtins: trap.). Not all shells reset + `$?' to zero after an empty command. + + $ bash -c 'false; $empty; echo $?' + 0 + $ zsh -c 'false; $empty; echo $?' + 1 + +`_' + Many shells reserve `$_' for various purposes, e.g., the name of + the last command executed. + +`BIN_SH' + In Tru64, if `BIN_SH' is set to `xpg4', subsidiary invocations of + the standard shell conform to Posix. + +`CDPATH' + When this variable is set it specifies a list of directories to + search when invoking `cd' with a relative file name that did not + start with `./' or `../'. Posix 1003.1-2001 says that if a + nonempty directory name from `CDPATH' is used successfully, `cd' + prints the resulting absolute file name. Unfortunately this + output can break idioms like `abs=`cd src && pwd`' because `abs' + receives the name twice. Also, many shells do not conform to this + part of Posix; for example, `zsh' prints the result only if a + directory name other than `.' was chosen from `CDPATH'. + + In practice the shells that have this problem also support + `unset', so you can work around the problem as follows: + + (unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + You can also avoid output by ensuring that your directory name is + absolute or anchored at `./', as in `abs=`cd ./src && pwd`'. + + Configure scripts use M4sh, which automatically unsets `CDPATH' if + possible, so you need not worry about this problem in those + scripts. + +`CLICOLOR_FORCE' + When this variable is set, some implementations of tools like `ls' + attempt to add color to their output via terminal escape + sequences, even when the output is not directed to a terminal, and + can thus cause spurious failures in scripts. Configure scripts + use M4sh, which automatically unsets this variable. + +`DUALCASE' + In the MKS shell, case statements and file name generation are + case-insensitive unless `DUALCASE' is nonzero. Autoconf-generated + scripts export this variable when they start up. + +`ENV' +`MAIL' +`MAILPATH' +`PS1' +`PS2' +`PS4' + These variables should not matter for shell scripts, since they are + supposed to affect only interactive shells. However, at least one + shell (the pre-3.0 UWIN Korn shell) gets confused about whether it + is interactive, which means that (for example) a `PS1' with a side + effect can unexpectedly modify `$?'. To work around this bug, + M4sh scripts (including `configure' scripts) do something like + this: + + (unset ENV) >/dev/null 2>&1 && unset ENV MAIL MAILPATH + PS1='$ ' + PS2='> ' + PS4='+ ' + + (actually, there is some complication due to bugs in `unset'; + *note Limitations of Shell Builtins: unset.). + +`FPATH' + The Korn shell uses `FPATH' to find shell functions, so avoid + `FPATH' in portable scripts. `FPATH' is consulted after `PATH', + but you still need to be wary of tests that use `PATH' to find + whether a command exists, since they might report the wrong result + if `FPATH' is also set. + +`GREP_OPTIONS' + When this variable is set, some implementations of `grep' honor + these options, even if the options include direction to enable + colored output via terminal escape sequences, and the result can + cause spurious failures when the output is not directed to a + terminal. Configure scripts use M4sh, which automatically unsets + this variable. + +`IFS' + Long ago, shell scripts inherited `IFS' from the environment, but + this caused many problems so modern shells ignore any environment + settings for `IFS'. + + Don't set the first character of `IFS' to backslash. Indeed, + Bourne shells use the first character (backslash) when joining the + components in `"$@"' and some shells then reinterpret (!) the + backslash escapes, so you can end up with backspace and other + strange characters. + + The proper value for `IFS' (in regular code, not when performing + splits) is `<SPC><TAB><RET>'. The first character is especially + important, as it is used to join the arguments in `$*'; however, + note that traditional shells, but also bash-2.04, fail to adhere + to this and join with a space anyway. + + M4sh guarantees that `IFS' will have the default value at the + beginning of a script, and many macros within autoconf rely on this + setting. It is okay to use blocks of shell code that temporarily + change the value of `IFS' in order to split on another character, + but remember to restore it before expanding further macros. + + Unsetting `IFS' instead of resetting it to the default sequence is + not suggested, since code that tries to save and restore the + variable's value will incorrectly reset it to an empty value, thus + disabling field splitting: + + unset IFS + # default separators used for field splitting + + save_IFS=$IFS + IFS=: + # ... + IFS=$save_IFS + # no field splitting performed + +`LANG' +`LC_ALL' +`LC_COLLATE' +`LC_CTYPE' +`LC_MESSAGES' +`LC_MONETARY' +`LC_NUMERIC' +`LC_TIME' + You should set all these variables to `C' because so much + configuration code assumes the C locale and Posix requires that + locale environment variables be set to `C' if the C locale is + desired; `configure' scripts and M4sh do that for you. Export + these variables after setting them. + +`LANGUAGE' + `LANGUAGE' is not specified by Posix, but it is a GNU extension + that overrides `LC_ALL' in some cases, so you (or M4sh) should set + it too. + +`LC_ADDRESS' +`LC_IDENTIFICATION' +`LC_MEASUREMENT' +`LC_NAME' +`LC_PAPER' +`LC_TELEPHONE' + These locale environment variables are GNU extensions. They are + treated like their Posix brethren (`LC_COLLATE', etc.) as + described above. + +`LINENO' + Most modern shells provide the current line number in `LINENO'. + Its value is the line number of the beginning of the current + command. M4sh, and hence Autoconf, attempts to execute + `configure' with a shell that supports `LINENO'. If no such shell + is available, it attempts to implement `LINENO' with a Sed prepass + that replaces each instance of the string `$LINENO' (not followed + by an alphanumeric character) with the line's number. In M4sh + scripts you should execute `AS_LINENO_PREPARE' so that these + workarounds are included in your script; configure scripts do this + automatically in `AC_INIT'. + + You should not rely on `LINENO' within `eval' or shell functions, + as the behavior differs in practice. The presence of a quoted + newline within simple commands can alter which line number is used + as the starting point for `$LINENO' substitutions within that + command. Also, the possibility of the Sed prepass means that you + should not rely on `$LINENO' when quoted, when in here-documents, + or when line continuations are used. Subshells should be OK, + though. In the following example, lines 1, 9, and 14 are + portable, but the other instances of `$LINENO' do not have + deterministic values: + + $ cat lineno + echo 1. $LINENO + echo "2. $LINENO + 3. $LINENO" + cat <<EOF + 5. $LINENO + 6. $LINENO + 7. \$LINENO + EOF + ( echo 9. $LINENO ) + eval 'echo 10. $LINENO' + eval 'echo 11. $LINENO + echo 12. $LINENO' + echo 13. '$LINENO' + echo 14. $LINENO ' + 15.' $LINENO + f () { echo $1 $LINENO; + echo $1 $LINENO } + f 18. + echo 19. \ + $LINENO + $ bash-3.2 ./lineno + 1. 1 + 2. 3 + 3. 3 + 5. 4 + 6. 4 + 7. $LINENO + 9. 9 + 10. 10 + 11. 12 + 12. 13 + 13. $LINENO + 14. 14 + 15. 14 + 18. 16 + 18. 17 + 19. 19 + $ zsh-4.3.4 ./lineno + 1. 1 + 2. 2 + 3. 2 + 5. 4 + 6. 4 + 7. $LINENO + 9. 9 + 10. 1 + 11. 1 + 12. 2 + 13. $LINENO + 14. 14 + 15. 14 + 18. 0 + 18. 1 + 19. 19 + $ pdksh-5.2.14 ./lineno + 1. 1 + 2. 2 + 3. 2 + 5. 4 + 6. 4 + 7. $LINENO + 9. 9 + 10. 0 + 11. 0 + 12. 0 + 13. $LINENO + 14. 14 + 15. 14 + 18. 16 + 18. 17 + 19. 19 + $ sed '=' <lineno | + > sed ' + > N + > s,$,-, + > t loop + > :loop + > s,^\([0-9]*\)\(.*\)[$]LINENO\([^a-zA-Z0-9_]\),\1\2\1\3, + > t loop + > s,-$,, + > s,^[0-9]*\n,, + > ' | + > sh + 1. 1 + 2. 2 + 3. 3 + 5. 5 + 6. 6 + 7. \7 + 9. 9 + 10. 10 + 11. 11 + 12. 12 + 13. 13 + 14. 14 + 15. 15 + 18. 16 + 18. 17 + 19. 20 + + In particular, note that `config.status' (and any other subsidiary + script created by `AS_INIT_GENERATED') might report line numbers + relative to the parent script as a result of the potential Sed + pass. + +`NULLCMD' + When executing the command `>foo', `zsh' executes `$NULLCMD >foo' + unless it is operating in Bourne shell compatibility mode and the + `zsh' version is newer than 3.1.6-dev-18. If you are using an + older `zsh' and forget to set `NULLCMD', your script might be + suspended waiting for data on its standard input. + +`options' + For `zsh' 4.3.10, `options' is treated as an associative array + even after `emulate sh', so it should not be used. + +`PATH_SEPARATOR' + On DJGPP systems, the `PATH_SEPARATOR' environment variable can be + set to either `:' or `;' to control the path separator Bash uses + to set up certain environment variables (such as `PATH'). You can + set this variable to `;' if you want `configure' to use `;' as a + separator; this might be useful if you plan to use non-Posix + shells to execute files. *Note File System Conventions::, for + more information about `PATH_SEPARATOR'. + +`POSIXLY_CORRECT' + In the GNU environment, exporting `POSIXLY_CORRECT' with any value + (even empty) causes programs to try harder to conform to Posix. + Autoconf does not directly manipulate this variable, but `bash' + ties the shell variable `POSIXLY_CORRECT' to whether the script is + running in Posix mode. Therefore, take care when exporting or + unsetting this variable, so as not to change whether `bash' is in + Posix mode. + + $ bash --posix -c 'set -o | grep posix + > unset POSIXLY_CORRECT + > set -o | grep posix' + posix on + posix off + +`PWD' + Posix 1003.1-2001 requires that `cd' and `pwd' must update the + `PWD' environment variable to point to the logical name of the + current directory, but traditional shells do not support this. + This can cause confusion if one shell instance maintains `PWD' but + a subsidiary and different shell does not know about `PWD' and + executes `cd'; in this case `PWD' points to the wrong directory. + Use ``pwd`' rather than `$PWD'. + +`RANDOM' + Many shells provide `RANDOM', a variable that returns a different + integer each time it is used. Most of the time, its value does not + change when it is not used, but on IRIX 6.5 the value changes all + the time. This can be observed by using `set'. It is common + practice to use `$RANDOM' as part of a file name, but code + shouldn't rely on `$RANDOM' expanding to a nonempty string. + +`status' + This variable is an alias to `$?' for `zsh' (at least 3.1.6), + hence read-only. Do not use it. + + +File: autoconf.info, Node: Shell Functions, Next: Limitations of Builtins, Prev: Special Shell Variables, Up: Portable Shell + +11.13 Shell Functions +===================== + +Nowadays, it is difficult to find a shell that does not support shell +functions at all. However, some differences should be expected. + + When declaring a shell function, you must include whitespace between +the `)' after the function name and the start of the compound +expression, to avoid upsetting `ksh'. While it is possible to use any +compound command, most scripts use `{...}'. + + $ /bin/sh -c 'a(){ echo hi;}; a' + hi + $ ksh -c 'a(){ echo hi;}; a' + ksh: syntax error at line 1: `}' unexpected + $ ksh -c 'a() { echo hi;}; a' + hi + + Inside a shell function, you should not rely on the error status of a +subshell if the last command of that subshell was `exit' or `trap', as +this triggers bugs in zsh 4.x; while Autoconf tries to find a shell +that does not exhibit the bug, zsh might be the only shell present on +the user's machine. + + Likewise, the state of `$?' is not reliable when entering a shell +function. This has the effect that using a function as the first +command in a `trap' handler can cause problems. + + $ bash -c 'foo() { echo $?; }; trap foo 0; (exit 2); exit 2'; echo $? + 2 + 2 + $ ash -c 'foo() { echo $?; }; trap foo 0; (exit 2); exit 2'; echo $? + 0 + 2 + + DJGPP bash 2.04 has a bug in that `return' from a shell function +which also used a command substitution causes a segmentation fault. To +work around the issue, you can use `return' from a subshell, or +`AS_SET_STATUS' as last command in the execution flow of the function +(*note Common Shell Constructs::). + + Not all shells treat shell functions as simple commands impacted by +`set -e', for example with Solaris 10 `/bin/sh': + + $ bash -c 'f() { return 1; }; set -e; f; echo oops' + $ /bin/sh -c 'f() { return 1; }; set -e; f; echo oops' + oops + + Shell variables and functions may share the same namespace, for +example with Solaris 10 `/bin/sh': + + $ f () { :; }; f=; f + f: not found + +For this reason, Autoconf (actually M4sh, *note Programming in M4sh::) +uses the prefix `as_fn_' for its functions. + + Handling of positional parameters and shell options varies among +shells. For example, Korn shells reset and restore trace output (`set +-x') and other options upon function entry and exit. Inside a function, +IRIX sh sets `$0' to the function name. + + It is not portable to pass temporary environment variables to shell +functions. Solaris `/bin/sh' does not see the variable. Meanwhile, +not all shells follow the Posix rule that the assignment must affect +the current environment in the same manner as special built-ins. + + $ /bin/sh -c 'func() { echo $a;}; a=1 func; echo $a' + => + => + $ ash -c 'func() { echo $a;}; a=1 func; echo $a' + =>1 + => + $ bash -c 'set -o posix; func() { echo $a;}; a=1 func; echo $a' + =>1 + =>1 + + Some ancient Bourne shell variants with function support did not +reset `$I, I >= 0', upon function exit, so effectively the arguments of +the script were lost after the first function invocation. It is +probably not worth worrying about these shells any more. + + With AIX sh, a `trap' on 0 installed in a shell function triggers at +function exit rather than at script exit. *Note Limitations of Shell +Builtins: trap. + + +File: autoconf.info, Node: Limitations of Builtins, Next: Limitations of Usual Tools, Prev: Shell Functions, Up: Portable Shell + +11.14 Limitations of Shell Builtins +=================================== + +No, no, we are serious: some shells do have limitations! :) + + You should always keep in mind that any builtin or command may +support options, and therefore differ in behavior with arguments +starting with a dash. For instance, even the innocent `echo "$word"' +can give unexpected results when `word' starts with a dash. It is +often possible to avoid this problem using `echo "x$word"', taking the +`x' into account later in the pipe. Many of these limitations can be +worked around using M4sh (*note Programming in M4sh::). + +`.' + Use `.' only with regular files (use `test -f'). Bash 2.03, for + instance, chokes on `. /dev/null'. Remember that `.' uses `PATH' + if its argument contains no slashes. Also, some shells, including + bash 3.2, implicitly append the current directory to this `PATH' + search, even though Posix forbids it. So if you want to use `.' + on a file `foo' in the current directory, you must use `. ./foo'. + + Not all shells gracefully handle syntax errors within a sourced + file. On one extreme, some non-interactive shells abort the + entire script. On the other, `zsh' 4.3.10 has a bug where it + fails to react to the syntax error. + + $ echo 'fi' > syntax + $ bash -c '. ./syntax; echo $?' + ./syntax: line 1: syntax error near unexpected token `fi' + ./syntax: line 1: `fi' + 1 + $ ash -c '. ./syntax; echo $?' + ./syntax: 1: Syntax error: "fi" unexpected + $ zsh -c '. ./syntax; echo $?' + ./syntax:1: parse error near `fi' + 0 + +`!' + The Unix version 7 shell did not support negating the exit status + of commands with `!', and this feature is still absent from some + shells (e.g., Solaris `/bin/sh'). Other shells, such as FreeBSD + `/bin/sh' or `ash', have bugs when using `!': + + $ sh -c '! : | :'; echo $? + 1 + $ ash -c '! : | :'; echo $? + 0 + $ sh -c '! { :; }'; echo $? + 1 + $ ash -c '! { :; }'; echo $? + {: not found + Syntax error: "}" unexpected + 2 + + Shell code like this: + + if ! cmp file1 file2 >/dev/null 2>&1; then + echo files differ or trouble + fi + + is therefore not portable in practice. Typically it is easy to + rewrite such code, e.g.: + + cmp file1 file2 >/dev/null 2>&1 || + echo files differ or trouble + + More generally, one can always rewrite `! COMMAND' as: + + if COMMAND; then (exit 1); else :; fi + +`{...}' + Bash 3.2 (and earlier versions) sometimes does not properly set + `$?' when failing to write redirected output of a compound command. + This problem is most commonly observed with `{...}'; it does not + occur with `(...)'. For example: + + $ bash -c '{ echo foo; } >/bad; echo $?' + bash: line 1: /bad: Permission denied + 0 + $ bash -c 'while :; do echo; done >/bad; echo $?' + bash: line 1: /bad: Permission denied + 0 + + To work around the bug, prepend `:;': + + $ bash -c ':;{ echo foo; } >/bad; echo $?' + bash: line 1: /bad: Permission denied + 1 + + Posix requires a syntax error if a brace list has no contents. + However, not all shells obey this rule; and on shells where empty + lists are permitted, the effect on `$?' is inconsistent. To avoid + problems, ensure that a brace list is never empty. + + $ bash -c 'false; { }; echo $?' || echo $? + bash: line 1: syntax error near unexpected token `}' + bash: line 1: `false; { }; echo $?' + 2 + $ zsh -c 'false; { }; echo $?' || echo $? + 1 + $ pdksh -c 'false; { }; echo $?' || echo $? + 0 + +`break' + The use of `break 2' etc. is safe. + +`case' + You don't need to quote the argument; no splitting is performed. + + You don't need the final `;;', but you should use it. + + Posix requires support for `case' patterns with opening + parentheses like this: + + case $file_name in + (*.c) echo "C source code";; + esac + + but the `(' in this example is not portable to many Bourne shell + implementations, which is a pity for those of us using tools that + rely on balanced parentheses. For instance, with Solaris + `/bin/sh': + + $ case foo in (foo) echo foo;; esac + error-->syntax error: `(' unexpected + + The leading `(' can be omitted safely. Unfortunately, there are + contexts where unbalanced parentheses cause other problems, such + as when using a syntax-highlighting editor that searches for the + balancing counterpart, or more importantly, when using a case + statement as an underquoted argument to an Autoconf macro. *Note + Balancing Parentheses::, for tradeoffs involved in various styles + of dealing with unbalanced `)'. + + Zsh handles pattern fragments derived from parameter expansions or + command substitutions as though quoted: + + $ pat=\?; case aa in ?$pat) echo match;; esac + $ pat=\?; case a? in ?$pat) echo match;; esac + match + + Because of a bug in its `fnmatch', Bash fails to properly handle + backslashes in character classes: + + bash-2.02$ case /tmp in [/\\]*) echo OK;; esac + bash-2.02$ + + This is extremely unfortunate, since you are likely to use this + code to handle Posix or MS-DOS absolute file names. To work + around this bug, always put the backslash first: + + bash-2.02$ case '\TMP' in [\\/]*) echo OK;; esac + OK + bash-2.02$ case /tmp in [\\/]*) echo OK;; esac + OK + + Many Bourne shells cannot handle closing brackets in character + classes correctly. + + Some shells also have problems with backslash escaping in case you + do not want to match the backslash: both a backslash and the + escaped character match this pattern. To work around this, + specify the character class in a variable, so that quote removal + does not apply afterwards, and the special characters don't have + to be backslash-escaped: + + $ case '\' in [\<]) echo OK;; esac + OK + $ scanset='[<]'; case '\' in $scanset) echo OK;; esac + $ + + Even with this, Solaris `ksh' matches a backslash if the set + contains any of the characters `|', `&', `(', or `)'. + + Conversely, Tru64 `ksh' (circa 2003) erroneously always matches a + closing parenthesis if not specified in a character class: + + $ case foo in *\)*) echo fail ;; esac + fail + $ case foo in *')'*) echo fail ;; esac + fail + + Some shells, such as Ash 0.3.8, are confused by an empty + `case'/`esac': + + ash-0.3.8 $ case foo in esac; + error-->Syntax error: ";" unexpected (expecting ")") + + Posix requires `case' to give an exit status of 0 if no cases + match. However, `/bin/sh' in Solaris 10 does not obey this rule. + Meanwhile, it is unclear whether a case that matches, but contains + no statements, must also change the exit status to 0. The M4sh + macro `AS_CASE' works around these inconsistencies. + + $ bash -c 'case `false` in ?) ;; esac; echo $?' + 0 + $ /bin/sh -c 'case `false` in ?) ;; esac; echo $?' + 255 + +`cd' + Posix 1003.1-2001 requires that `cd' must support the `-L' + ("logical") and `-P' ("physical") options, with `-L' being the + default. However, traditional shells do not support these + options, and their `cd' command has the `-P' behavior. + + Portable scripts should assume neither option is supported, and + should assume neither behavior is the default. This can be a bit + tricky, since the Posix default behavior means that, for example, + `ls ..' and `cd ..' may refer to different directories if the + current logical directory is a symbolic link. It is safe to use + `cd DIR' if DIR contains no `..' components. Also, + Autoconf-generated scripts check for this problem when computing + variables like `ac_top_srcdir' (*note Configuration Actions::), so + it is safe to `cd' to these variables. + + Posix states that behavior is undefined if `cd' is given an + explicit empty argument. Some shells do nothing, some change to + the first entry in `CDPATH', some change to `HOME', and some exit + the shell rather than returning an error. Unfortunately, this + means that if `$var' is empty, then `cd "$var"' is less predictable + than `cd $var' (at least the latter is well-behaved in all shells + at changing to `HOME', although this is probably not what you + wanted in a script). You should check that a directory name was + supplied before trying to change locations. + + *Note Special Shell Variables::, for portability problems involving + `cd' and the `CDPATH' environment variable. Also please see the + discussion of the `pwd' command. + +`echo' + The simple `echo' is probably the most surprising source of + portability troubles. It is not possible to use `echo' portably + unless both options and escape sequences are omitted. Don't + expect any option. + + Do not use backslashes in the arguments, as there is no consensus + on their handling. For `echo '\n' | wc -l', the `sh' of Solaris + outputs 2, but Bash and Zsh (in `sh' emulation mode) output 1. + The problem is truly `echo': all the shells understand `'\n'' as + the string composed of a backslash and an `n'. Within a command + substitution, `echo 'string\c'' will mess up the internal state of + ksh88 on AIX 6.1 so that it will print the first character `s' + only, followed by a newline, and then entirely drop the output of + the next echo in a command substitution. + + Because of these problems, do not pass a string containing + arbitrary characters to `echo'. For example, `echo "$foo"' is safe + only if you know that FOO's value cannot contain backslashes and + cannot start with `-'. + + If this may not be true, `printf' is in general safer and easier + to use than `echo' and `echo -n'. Thus, scripts where portability + is not a major concern should use `printf '%s\n'' whenever `echo' + could fail, and similarly use `printf %s' instead of `echo -n'. + For portable shell scripts, instead, it is suggested to use a + here-document like this: + + cat <<EOF + $foo + EOF + + Alternatively, M4sh provides `AS_ECHO' and `AS_ECHO_N' macros + which choose between various portable implementations: `echo' or + `print' where they work, `printf' if it is available, or else + other creative tricks in order to work around the above problems. + +`eval' + The `eval' command is useful in limited circumstances, e.g., using + commands like `eval table_$key=\$value' and `eval + value=table_$key' to simulate a hash table when the key is known + to be alphanumeric. + + You should also be wary of common bugs in `eval' implementations. + In some shell implementations (e.g., older `ash', OpenBSD 3.8 + `sh', `pdksh' v5.2.14 99/07/13.2, and `zsh' 4.2.5), the arguments + of `eval' are evaluated in a context where `$?' is 0, so they + exhibit behavior like this: + + $ false; eval 'echo $?' + 0 + + The correct behavior here is to output a nonzero value, but + portable scripts should not rely on this. + + You should not rely on `LINENO' within `eval'. *Note Special + Shell Variables::. + + Note that, even though these bugs are easily avoided, `eval' is + tricky to use on arbitrary arguments. It is obviously unwise to + use `eval $cmd' if the string value of `cmd' was derived from an + untrustworthy source. But even if the string value is valid, + `eval $cmd' might not work as intended, since it causes field + splitting and file name expansion to occur twice, once for the + `eval' and once for the command itself. It is therefore safer to + use `eval "$cmd"'. For example, if CMD has the value `cat + test?.c', `eval $cmd' might expand to the equivalent of `cat + test;.c' if there happens to be a file named `test;.c' in the + current directory; and this in turn mistakenly attempts to invoke + `cat' on the file `test' and then execute the command `.c'. To + avoid this problem, use `eval "$cmd"' rather than `eval $cmd'. + + However, suppose that you want to output the text of the evaluated + command just before executing it. Assuming the previous example, + `echo "Executing: $cmd"' outputs `Executing: cat test?.c', but + this output doesn't show the user that `test;.c' is the actual name + of the copied file. Conversely, `eval "echo Executing: $cmd"' + works on this example, but it fails with `cmd='cat foo >bar'', + since it mistakenly replaces the contents of `bar' by the string + `cat foo'. No simple, general, and portable solution to this + problem is known. + +`exec' + Posix describes several categories of shell built-ins. Special + built-ins (such as `exit') must impact the environment of the + current shell, and need not be available through `exec'. All + other built-ins are regular, and must not propagate variable + assignments to the environment of the current shell. However, the + group of regular built-ins is further distinguished by commands + that do not require a `PATH' search (such as `cd'), in contrast to + built-ins that are offered as a more efficient version of + something that must still be found in a `PATH' search (such as + `echo'). Posix is not clear on whether `exec' must work with the + list of 17 utilities that are invoked without a `PATH' search, and + many platforms lack an executable for some of those built-ins: + + $ sh -c 'exec cd /tmp' + sh: line 0: exec: cd: not found + + All other built-ins that provide utilities specified by Posix must + have a counterpart executable that exists on `PATH', although Posix + allows `exec' to use the built-in instead of the executable. For + example, contrast `bash' 3.2 and `pdksh' 5.2.14: + + $ bash -c 'pwd --version' | head -n1 + bash: line 0: pwd: --: invalid option + pwd: usage: pwd [-LP] + $ bash -c 'exec pwd --version' | head -n1 + pwd (GNU coreutils) 6.10 + $ pdksh -c 'exec pwd --version' | head -n1 + pdksh: pwd: --: unknown option + + When it is desired to avoid a regular shell built-in, the + workaround is to use some other forwarding command, such as `env' + or `nice', that will ensure a path search: + + $ pdksh -c 'exec true --version' | head -n1 + $ pdksh -c 'nice true --version' | head -n1 + true (GNU coreutils) 6.10 + $ pdksh -c 'env true --version' | head -n1 + true (GNU coreutils) 6.10 + +`exit' + The default value of `exit' is supposed to be `$?'; unfortunately, + some shells, such as the DJGPP port of Bash 2.04, just perform + `exit 0'. + + bash-2.04$ foo=`exit 1` || echo fail + fail + bash-2.04$ foo=`(exit 1)` || echo fail + fail + bash-2.04$ foo=`(exit 1); exit` || echo fail + bash-2.04$ + + Using `exit $?' restores the expected behavior. + + Some shell scripts, such as those generated by `autoconf', use a + trap to clean up before exiting. If the last shell command exited + with nonzero status, the trap also exits with nonzero status so + that the invoker can tell that an error occurred. + + Unfortunately, in some shells, such as Solaris `/bin/sh', an exit + trap ignores the `exit' command's argument. In these shells, a + trap cannot determine whether it was invoked by plain `exit' or by + `exit 1'. Instead of calling `exit' directly, use the + `AC_MSG_ERROR' macro that has a workaround for this problem. + +`export' + The builtin `export' dubs a shell variable "environment variable". + Each update of exported variables corresponds to an update of the + environment variables. Conversely, each environment variable + received by the shell when it is launched should be imported as a + shell variable marked as exported. + + Alas, many shells, such as Solaris `/bin/sh', IRIX 6.3, IRIX 5.2, + AIX 4.1.5, and Digital Unix 4.0, forget to `export' the + environment variables they receive. As a result, two variables + coexist: the environment variable and the shell variable. The + following code demonstrates this failure: + + #!/bin/sh + echo $FOO + FOO=bar + echo $FOO + exec /bin/sh $0 + + when run with `FOO=foo' in the environment, these shells print + alternately `foo' and `bar', although they should print only `foo' + and then a sequence of `bar's. + + Therefore you should `export' again each environment variable that + you update; the export can occur before or after the assignment. + + Posix is not clear on whether the `export' of an undefined + variable causes the variable to be defined with the value of an + empty string, or merely marks any future definition of a variable + by that name for export. Various shells behave differently in + this regard: + + $ sh -c 'export foo; env | grep foo' + $ ash -c 'export foo; env | grep foo' + foo= + + Posix requires `export' to honor assignments made as arguments, + but older shells do not support this, including `/bin/sh' in + Solaris 10. Portable scripts should separate assignments and + exports into different statements. + + $ bash -c 'export foo=bar; echo $foo' + bar + $ /bin/sh -c 'export foo=bar; echo $foo' + /bin/sh: foo=bar: is not an identifier + $ /bin/sh -c 'export foo; foo=bar; echo $foo' + bar + +`false' + Don't expect `false' to exit with status 1: in native Solaris + `/bin/false' exits with status 255. + +`for' + To loop over positional arguments, use: + + for arg + do + echo "$arg" + done + + You may _not_ leave the `do' on the same line as `for', since some + shells improperly grok: + + for arg; do + echo "$arg" + done + + If you want to explicitly refer to the positional arguments, given + the `$@' bug (*note Shell Substitutions::), use: + + for arg in ${1+"$@"}; do + echo "$arg" + done + + But keep in mind that Zsh, even in Bourne shell emulation mode, + performs word splitting on `${1+"$@"}'; see *note Shell + Substitutions::, item `$@', for more. + + In Solaris `/bin/sh', when the list of arguments of a `for' loop + starts with _unquoted_ tokens looking like variable assignments, + the loop is not executed on those tokens: + + $ /bin/sh -c 'for v in a=b c=d x e=f; do echo $v; done' + x + e=f + + Thankfully, quoting the assignment-like tokens, or starting the + list with other tokens (including unquoted variable expansion that + results in an assignment-like result), avoids the problem, so it + is easy to work around: + + $ /bin/sh -c 'for v in "a=b"; do echo $v; done' + a=b + $ /bin/sh -c 'x=a=b; for v in $x c=d; do echo $v; done' + a=b + c=d + +`if' + Using `!' is not portable. Instead of: + + if ! cmp -s file file.new; then + mv file.new file + fi + + use: + + if cmp -s file file.new; then :; else + mv file.new file + fi + + Or, especially if the "else" branch is short, you can use `||'. + In M4sh, the `AS_IF' macro provides an easy way to write these + kinds of conditionals: + + AS_IF([cmp -s file file.new], [], [mv file.new file]) + + This is especially useful in other M4 macros, where the "then" and + "else" branches might be macro arguments. + + Some very old shells did not reset the exit status from an `if' + with no `else': + + $ if (exit 42); then true; fi; echo $? + 42 + + whereas a proper shell should have printed `0'. But this is no + longer a portability problem; any shell that supports functions + gets it correct. However, it explains why some makefiles have + lengthy constructs: + + if test -f "$file"; then + install "$file" "$dest" + else + : + fi + +`printf' + A format string starting with a `-' can cause problems. Bash + interprets it as an option and gives an error. And `--' to mark + the end of options is not good in the NetBSD Almquist shell (e.g., + 0.4.6) which takes that literally as the format string. Putting + the `-' in a `%c' or `%s' is probably easiest: + + printf %s -foo + + Bash 2.03 mishandles an escape sequence that happens to evaluate + to `%': + + $ printf '\045' + bash: printf: `%': missing format character + + Large outputs may cause trouble. On Solaris 2.5.1 through 10, for + example, `/usr/bin/printf' is buggy, so when using `/bin/sh' the + command `printf %010000x 123' normally dumps core. + + Since `printf' is not always a shell builtin, there is a potential + speed penalty for using `printf '%s\n'' as a replacement for an + `echo' that does not interpret `\' or leading `-'. With Solaris + `ksh', it is possible to use `print -r --' for this role instead. + + *Note Limitations of Shell Builtins: echo for a discussion of + portable alternatives to both `printf' and `echo'. + +`pwd' + With modern shells, plain `pwd' outputs a "logical" directory + name, some of whose components may be symbolic links. These + directory names are in contrast to "physical" directory names, + whose components are all directories. + + Posix 1003.1-2001 requires that `pwd' must support the `-L' + ("logical") and `-P' ("physical") options, with `-L' being the + default. However, traditional shells do not support these + options, and their `pwd' command has the `-P' behavior. + + Portable scripts should assume neither option is supported, and + should assume neither behavior is the default. Also, on many hosts + `/bin/pwd' is equivalent to `pwd -P', but Posix does not require + this behavior and portable scripts should not rely on it. + + Typically it's best to use plain `pwd'. On modern hosts this + outputs logical directory names, which have the following + advantages: + + * Logical names are what the user specified. + + * Physical names may not be portable from one installation host + to another due to network file system gymnastics. + + * On modern hosts `pwd -P' may fail due to lack of permissions + to some parent directory, but plain `pwd' cannot fail for this + reason. + + Also please see the discussion of the `cd' command. + +`read' + No options are portable, not even support `-r' (Solaris `/bin/sh' + for example). Tru64/OSF 5.1 `sh' treats `read' as a special + built-in, so it may exit if input is redirected from a + non-existent or unreadable file. + +`set' + With the FreeBSD 6.0 shell, the `set' command (without any + options) does not sort its output. + + The `set' builtin faces the usual problem with arguments starting + with a dash. Modern shells such as Bash or Zsh understand `--' to + specify the end of the options (any argument after `--' is a + parameter, even `-x' for instance), but many traditional shells + (e.g., Solaris 10 `/bin/sh') simply stop option processing as soon + as a non-option argument is found. Therefore, use `dummy' or + simply `x' to end the option processing, and use `shift' to pop it + out: + + set x $my_list; shift + + Avoid `set -', e.g., `set - $my_list'. Posix no longer requires + support for this command, and in traditional shells `set - + $my_list' resets the `-v' and `-x' options, which makes scripts + harder to debug. + + Some nonstandard shells do not recognize more than one option + (e.g., `set -e -x' assigns `-x' to the command line). It is + better to combine them: + + set -ex + + The option `-e' has historically been underspecified, with enough + ambiguities to cause numerous differences across various shell + implementations; see for example this overview + (http://www.in-ulm.de/~mascheck/various/set-e/), or this link + (http://www.austingroupbugs.net/view.php?id=52), documenting a + change to Posix 2008 to match `ksh88' behavior. Note that mixing + `set -e' and shell functions is asking for surprises: + + set -e + doit() + { + rm file + echo one + } + doit || echo two + + According to the recommendation, `one' should always be output + regardless of whether the `rm' failed, because it occurs within + the body of the shell function `doit' invoked on the left side of + `||', where the effects of `set -e' are not enforced. Likewise, + `two' should never be printed, since the failure of `rm' does not + abort the function, such that the status of `doit' is 0. + + The BSD shell has had several problems with the `-e' option. + Older versions of the BSD shell (circa 1990) mishandled `&&', + `||', `if', and `case' when `-e' was in effect, causing the shell + to exit unexpectedly in some cases. This was particularly a + problem with makefiles, and led to circumlocutions like `sh -c + 'test -f file || touch file'', where the seemingly-unnecessary `sh + -c '...'' wrapper works around the bug (*note Failure in Make + Rules::). + + Even relatively-recent versions of the BSD shell (e.g., OpenBSD + 3.4) wrongly exit with `-e' if the last command within a compound + statement fails and is guarded by an `&&' only. For example: + + #! /bin/sh + set -e + foo='' + test -n "$foo" && exit 1 + echo one + if :; then + test -n "$foo" && exit 1 + echo two + test -n "$foo" && exit 1 + fi + echo three + + does not print `three'. One workaround is to change the last + instance of `test -n "$foo" && exit 1' to be `if test -n "$foo"; + then exit 1; fi' instead. Another possibility is to warn BSD + users not to use `sh -e'. + + When `set -e' is in effect, a failed command substitution in + Solaris `/bin/sh' cannot be ignored, even with `||'. + + $ /bin/sh -c 'set -e; foo=`false` || echo foo; echo bar' + $ bash -c 'set -e; foo=`false` || echo foo; echo bar' + foo + bar + + Moreover, a command substitution, successful or not, causes this + shell to exit from a failing outer command even in presence of an + `&&' list: + + $ bash -c 'set -e; false `true` && echo notreached; echo ok' + ok + $ sh -c 'set -e; false `true` && echo notreached; echo ok' + $ + + Portable scripts should not use `set -e' if `trap' is used to + install an exit handler. This is because Tru64/OSF 5.1 `sh' + sometimes enters the trap handler with the exit status of the + command prior to the one that triggered the errexit handler: + + $ sh -ec 'trap '\''echo $?'\'' 0; false' + 0 + $ sh -c 'set -e; trap '\''echo $?'\'' 0; false' + 1 + + Thus, when writing a script in M4sh, rather than trying to rely on + `set -e', it is better to append `|| AS_EXIT' to any statement + where it is desirable to abort on failure. + + Job control is not provided by all shells, so the use of `set -m' + or `set -b' must be done with care. When using `zsh' in native + mode, asynchronous notification (`set -b') is enabled by default, + and using `emulate sh' to switch to Posix mode does not clear this + setting (although asynchronous notification has no impact unless + job monitoring is also enabled). Also, `zsh' 4.3.10 and earlier + have a bug where job control can be manipulated in interactive + shells, but not in subshells or scripts. Furthermore, some + shells, like `pdksh', fail to treat subshells as interactive, even + though the parent shell was. + + $ echo $ZSH_VERSION + 4.3.10 + $ set -m; echo $? + 0 + $ zsh -c 'set -m; echo $?' + set: can't change option: -m + $ (set -m); echo $? + set: can't change option: -m + 1 + $ pdksh -ci 'echo $-; (echo $-)' + cim + c + + Use of `set -n' (typically via `sh -n script') to validate a + script is not foolproof. Modern `ksh93' tries to be helpful by + informing you about better syntax, but switching the script to use + the suggested syntax in order to silence the warnings would render + the script no longer portable to older shells: + + $ ksh -nc '``' + ksh: warning: line 1: `...` obsolete, use $(...) + 0 + + Furthermore, on ancient hosts, such as SunOS 4, `sh -n' could go + into an infinite loop; even with that bug fixed, Solaris 8 + `/bin/sh' takes extremely long to parse large scripts. Autoconf + itself uses `sh -n' within its testsuite to check that correct + scripts were generated, but only after first probing for other + shell features (such as `test -n "${BASH_VERSION+set}"') that + indicate a reasonably fast and working implementation. + +`shift' + Not only is `shift'ing a bad idea when there is nothing left to + shift, but in addition it is not portable: the shell of MIPS + RISC/OS 4.52 refuses to do it. + + Don't use `shift 2' etc.; while it in the SVR1 shell (1983), it is + also absent in many pre-Posix shells. + +`source' + This command is not portable, as Posix does not require it; use + `.' instead. + +`test' + The `test' program is the way to perform many file and string + tests. It is often invoked by the alternate name `[', but using + that name in Autoconf code is asking for trouble since it is an M4 + quote character. + + The `-a', `-o', `(', and `)' operands are not present in all + implementations, and have been marked obsolete by Posix 2008. + This is because there are inherent ambiguities in using them. For + example, `test "$1" -a "$2"' looks like a binary operator to check + whether two strings are both non-empty, but if `$1' is the literal + `!', then some implementations of `test' treat it as a negation of + the unary operator `-a'. + + Thus, portable uses of `test' should never have more than four + arguments, and scripts should use shell constructs like `&&' and + `||' instead. If you combine `&&' and `||' in the same statement, + keep in mind that they have equal precedence, so it is often + better to parenthesize even when this is redundant. For example: + + # Not portable: + test "X$a" = "X$b" -a \ + '(' "X$c" != "X$d" -o "X$e" = "X$f" ')' + + # Portable: + test "X$a" = "X$b" && + { test "X$c" != "X$d" || test "X$e" = "X$f"; } + + `test' does not process options like most other commands do; for + example, it does not recognize the `--' argument as marking the + end of options. + + It is safe to use `!' as a `test' operator. For example, `if test + ! -d foo; ...' is portable even though `if ! test -d foo; ...' is + not. + +`test' (files) + To enable `configure' scripts to support cross-compilation, they + shouldn't do anything that tests features of the build system + instead of the host system. But occasionally you may find it + necessary to check whether some arbitrary file exists. To do so, + use `test -f', `test -r', or `test -x'. Do not use `test -e', + because Solaris 10 `/bin/sh' lacks it. To test for symbolic links + on systems that have them, use `test -h' rather than `test -L'; + either form conforms to Posix 1003.1-2001, but older shells like + Solaris 8 `/bin/sh' support only `-h'. + + For historical reasons, Posix reluctantly allows implementations of + `test -x' that will succeed for the root user, even if no execute + permissions are present. Furthermore, shells do not all agree on + whether Access Control Lists should affect `test -r', `test -w', + and `test -x'; some shells base test results strictly on the + current user id compared to file owner and mode, as if by + `stat(2)'; while other shells base test results on whether the + current user has the given right, even if that right is only + granted by an ACL, as if by `faccessat(2)'. Furthermore, there is + a classic time of check to time of use race between any use of + `test' followed by operating on the just-checked file. Therefore, + it is a good idea to write scripts that actually attempt an + operation, and are prepared for the resulting failure if + permission is denied, rather than trying to avoid an operation + based solely on whether `test' guessed that it might not be + permitted. + +`test' (strings) + Posix says that `test "STRING"' succeeds if STRING is not null, + but this usage is not portable to traditional platforms like + Solaris 10 `/bin/sh', which mishandle strings like `!' and `-n'. + + Posix also says that `test ! "STRING"', `test -n "STRING"' and + `test -z "STRING"' work with any string, but many shells (such as + Solaris, AIX 3.2, UNICOS 10.0.0.6, Digital Unix 4, etc.) get + confused if STRING looks like an operator: + + $ test -n = + test: argument expected + $ test ! -n + test: argument expected + $ test -z ")"; echo $? + 0 + + Similarly, Posix says that both `test "STRING1" = "STRING2"' and + `test "STRING1" != "STRING2"' work for any pairs of strings, but + in practice this is not true for troublesome strings that look + like operators or parentheses, or that begin with `-'. + + It is best to protect such strings with a leading `X', e.g., `test + "XSTRING" != X' rather than `test -n "STRING"' or `test ! + "STRING"'. + + It is common to find variations of the following idiom: + + test -n "`echo $ac_feature | sed 's/[-a-zA-Z0-9_]//g'`" && + ACTION + + to take an action when a token matches a given pattern. Such + constructs should be avoided by using: + + case $ac_feature in + *[!-a-zA-Z0-9_]*) ACTION;; + esac + + If the pattern is a complicated regular expression that cannot be + expressed as a shell pattern, use something like this instead: + + expr "X$ac_feature" : 'X.*[^-a-zA-Z0-9_]' >/dev/null && + ACTION + + `expr "XFOO" : "XBAR"' is more robust than `echo "XFOO" | grep + "^XBAR"', because it avoids problems when `FOO' contains + backslashes. + +`trap' + It is safe to trap at least the signals 1, 2, 13, and 15. You can + also trap 0, i.e., have the `trap' run when the script ends + (either via an explicit `exit', or the end of the script). The + trap for 0 should be installed outside of a shell function, or AIX + 5.3 `/bin/sh' will invoke the trap at the end of this function. + + Posix says that `trap - 1 2 13 15' resets the traps for the + specified signals to their default values, but many common shells + (e.g., Solaris `/bin/sh') misinterpret this and attempt to execute + a "command" named `-' when the specified conditions arise. Posix + 2008 also added a requirement to support `trap 1 2 13 15' to reset + traps, as this is supported by a larger set of shells, but there + are still shells like `dash' that mistakenly try to execute `1' + instead of resetting the traps. Therefore, there is no portable + workaround, except for `trap - 0', for which `trap '' 0' is a + portable substitute. + + Although Posix is not absolutely clear on this point, it is widely + admitted that when entering the trap `$?' should be set to the exit + status of the last command run before the trap. The ambiguity can + be summarized as: "when the trap is launched by an `exit', what is + the _last_ command run: that before `exit', or `exit' itself?" + + Bash considers `exit' to be the last command, while Zsh and + Solaris `/bin/sh' consider that when the trap is run it is _still_ + in the `exit', hence it is the previous exit status that the trap + receives: + + $ cat trap.sh + trap 'echo $?' 0 + (exit 42); exit 0 + $ zsh trap.sh + 42 + $ bash trap.sh + 0 + + The portable solution is then simple: when you want to `exit 42', + run `(exit 42); exit 42', the first `exit' being used to set the + exit status to 42 for Zsh, and the second to trigger the trap and + pass 42 as exit status for Bash. In M4sh, this is covered by using + `AS_EXIT'. + + The shell in FreeBSD 4.0 has the following bug: `$?' is reset to 0 + by empty lines if the code is inside `trap'. + + $ trap 'false + + echo $?' 0 + $ exit + 0 + + Fortunately, this bug only affects `trap'. + + Several shells fail to execute an exit trap that is defined inside + a subshell, when the last command of that subshell is not a + builtin. A workaround is to use `exit $?' as the shell builtin. + + $ bash -c '(trap "echo hi" 0; /bin/true)' + hi + $ /bin/sh -c '(trap "echo hi" 0; /bin/true)' + $ /bin/sh -c '(trap "echo hi" 0; /bin/true; exit $?)' + hi + + Likewise, older implementations of `bash' failed to preserve `$?' + across an exit trap consisting of a single cleanup command. + + $ bash -c 'trap "/bin/true" 0; exit 2'; echo $? + 2 + $ bash-2.05b -c 'trap "/bin/true" 0; exit 2'; echo $? + 0 + $ bash-2.05b -c 'trap ":; /bin/true" 0; exit 2'; echo $? + 2 + +`true' + Don't worry: as far as we know `true' is portable. Nevertheless, + it's not always a builtin (e.g., Bash 1.x), and the portable shell + community tends to prefer using `:'. This has a funny side + effect: when asked whether `false' is more portable than `true' + Alexandre Oliva answered: + + In a sense, yes, because if it doesn't exist, the shell will + produce an exit status of failure, which is correct for + `false', but not for `true'. + + Remember that even though `:' ignores its arguments, it still takes + time to compute those arguments. It is a good idea to use double + quotes around any arguments to `:' to avoid time spent in field + splitting and file name expansion. + +`unset' + In some nonconforming shells (e.g., Solaris 10 `/bin/ksh' and + `/usr/xpg4/bin/sh', NetBSD 5.99.43 sh, or Bash 2.05a), `unset FOO' + fails when `FOO' is not set. This can interfere with `set -e' + operation. You can use + + FOO=; unset FOO + + if you are not sure that `FOO' is set. + + A few ancient shells lack `unset' entirely. For some variables + such as `PS1', you can use a neutralizing value instead: + + PS1='$ ' + + Usually, shells that do not support `unset' need less effort to + make the environment sane, so for example is not a problem if you + cannot unset `CDPATH' on those shells. However, Bash 2.01 + mishandles `unset MAIL' and `unset MAILPATH' in some cases and + dumps core. So, you should do something like + + ( (unset MAIL) || exit 1) >/dev/null 2>&1 && unset MAIL || : + + *Note Special Shell Variables::, for some neutralizing values. + Also, see *note Limitations of Builtins: export, for the case of + environment variables. + +`wait' + The exit status of `wait' is not always reliable. + + +File: autoconf.info, Node: Limitations of Usual Tools, Prev: Limitations of Builtins, Up: Portable Shell + +11.15 Limitations of Usual Tools +================================ + +The small set of tools you can expect to find on any machine can still +include some limitations you should be aware of. + +`awk' + Don't leave white space before the opening parenthesis in a user + function call. Posix does not allow this and GNU Awk rejects it: + + $ gawk 'function die () { print "Aaaaarg!" } + BEGIN { die () }' + gawk: cmd. line:2: BEGIN { die () } + gawk: cmd. line:2: ^ parse error + $ gawk 'function die () { print "Aaaaarg!" } + BEGIN { die() }' + Aaaaarg! + + Posix says that if a program contains only `BEGIN' actions, and + contains no instances of `getline', then the program merely + executes the actions without reading input. However, traditional + Awk implementations (such as Solaris 10 `awk') read and discard + input in this case. Portable scripts can redirect input from + `/dev/null' to work around the problem. For example: + + awk 'BEGIN {print "hello world"}' </dev/null + + Posix says that in an `END' action, `$NF' (and presumably, `$1') + retain their value from the last record read, if no intervening + `getline' occurred. However, some implementations (such as + Solaris 10 `/usr/bin/awk', `nawk', or Darwin `awk') reset these + variables. A workaround is to use an intermediate variable prior + to the `END' block. For example: + + $ cat end.awk + { tmp = $1 } + END { print "a", $1, $NF, "b", tmp } + $ echo 1 | awk -f end.awk + a b 1 + $ echo 1 | gawk -f end.awk + a 1 1 b 1 + + If you want your program to be deterministic, don't depend on `for' + on arrays: + + $ cat for.awk + END { + arr["foo"] = 1 + arr["bar"] = 1 + for (i in arr) + print i + } + $ gawk -f for.awk </dev/null + foo + bar + $ nawk -f for.awk </dev/null + bar + foo + + Some Awk implementations, such as HP-UX 11.0's native one, + mishandle anchors: + + $ echo xfoo | $AWK '/foo|^bar/ { print }' + $ echo bar | $AWK '/foo|^bar/ { print }' + bar + $ echo xfoo | $AWK '/^bar|foo/ { print }' + xfoo + $ echo bar | $AWK '/^bar|foo/ { print }' + bar + + Either do not depend on such patterns (i.e., use `/^(.*foo|bar)/', + or use a simple test to reject such implementations. + + On `ia64-hp-hpux11.23', Awk mishandles `printf' conversions after + `%u': + + $ awk 'BEGIN { printf "%u %d\n", 0, -1 }' + 0 0 + + AIX version 5.2 has an arbitrary limit of 399 on the length of + regular expressions and literal strings in an Awk program. + + Traditional Awk implementations derived from Unix version 7, such + as Solaris `/bin/awk', have many limitations and do not conform to + Posix. Nowadays `AC_PROG_AWK' (*note Particular Programs::) finds + you an Awk that doesn't have these problems, but if for some + reason you prefer not to use `AC_PROG_AWK' you may need to address + them. For more detailed descriptions, see *note `awk' language + history: (gawk)Language History. + + Traditional Awk does not support multidimensional arrays or + user-defined functions. + + Traditional Awk does not support the `-v' option. You can use + assignments after the program instead, e.g., `$AWK '{print v $1}' + v=x'; however, don't forget that such assignments are not + evaluated until they are encountered (e.g., after any `BEGIN' + action). + + Traditional Awk does not support the keywords `delete' or `do'. + + Traditional Awk does not support the expressions `A?B:C', `!A', + `A^B', or `A^=B'. + + Traditional Awk does not support the predefined `CONVFMT' or + `ENVIRON' variables. + + Traditional Awk supports only the predefined functions `exp', + `index', `int', `length', `log', `split', `sprintf', `sqrt', and + `substr'. + + Traditional Awk `getline' is not at all compatible with Posix; + avoid it. + + Traditional Awk has `for (i in a) ...' but no other uses of the + `in' keyword. For example, it lacks `if (i in a) ...'. + + In code portable to both traditional and modern Awk, `FS' must be a + string containing just one ordinary character, and similarly for + the field-separator argument to `split'. + + Traditional Awk has a limit of 99 fields in a record. Since some + Awk implementations, like Tru64's, split the input even if you + don't refer to any field in the script, to circumvent this + problem, set `FS' to an unusual character and use `split'. + + Traditional Awk has a limit of at most 99 bytes in a number + formatted by `OFMT'; for example, `OFMT="%.300e"; print 0.1;' + typically dumps core. + + The original version of Awk had a limit of at most 99 bytes per + `split' field, 99 bytes per `substr' substring, and 99 bytes per + run of non-special characters in a `printf' format, but these bugs + have been fixed on all practical hosts that we know of. + + HP-UX 11.00 and IRIX 6.5 Awk require that input files have a line + length of at most 3070 bytes. + +`basename' + Not all hosts have a working `basename'. You can use `expr' + instead. + +`cat' + Don't rely on any option. + +`cc' + The command `cc -c foo.c' traditionally produces an object file + named `foo.o'. Most compilers allow `-c' to be combined with `-o' + to specify a different object file name, but Posix does not + require this combination and a few compilers lack support for it. + *Note C Compiler::, for how GNU Make tests for this feature with + `AC_PROG_CC_C_O'. + + When a compilation such as `cc -o foo foo.c' fails, some compilers + (such as CDS on Reliant Unix) leave a `foo.o'. + + HP-UX `cc' doesn't accept `.S' files to preprocess and assemble. + `cc -c foo.S' appears to succeed, but in fact does nothing. + + The default executable, produced by `cc foo.c', can be + + * `a.out' -- usual Posix convention. + + * `b.out' -- i960 compilers (including `gcc'). + + * `a.exe' -- DJGPP port of `gcc'. + + * `a_out.exe' -- GNV `cc' wrapper for DEC C on OpenVMS. + + * `foo.exe' -- various MS-DOS compilers. + + The C compiler's traditional name is `cc', but other names like + `gcc' are common. Posix 1003.1-2001 specifies the name `c99', but + older Posix editions specified `c89' and anyway these standard + names are rarely used in practice. Typically the C compiler is + invoked from makefiles that use `$(CC)', so the value of the `CC' + make variable selects the compiler name. + +`chgrp' +`chown' + It is not portable to change a file's group to a group that the + owner does not belong to. + +`chmod' + Avoid usages like `chmod -w file'; use `chmod a-w file' instead, + for two reasons. First, plain `-w' does not necessarily make the + file unwritable, since it does not affect mode bits that + correspond to bits in the file mode creation mask. Second, Posix + says that the `-w' might be interpreted as an + implementation-specific option, not as a mode; Posix suggests + using `chmod -- -w file' to avoid this confusion, but unfortunately + `--' does not work on some older hosts. + +`cmp' + `cmp' performs a raw data comparison of two files, while `diff' + compares two text files. Therefore, if you might compare DOS + files, even if only checking whether two files are different, use + `diff' to avoid spurious differences due to differences of newline + encoding. + +`cp' + Avoid the `-r' option, since Posix 1003.1-2004 marks it as + obsolescent and its behavior on special files is + implementation-defined. Use `-R' instead. On GNU hosts the two + options are equivalent, but on Solaris hosts (for example) `cp -r' + reads from pipes instead of replicating them. AIX 5.3 `cp -R' may + corrupt its own memory with some directory hierarchies and error + out or dump core: + + mkdir -p 12345678/12345678/12345678/12345678 + touch 12345678/12345678/x + cp -R 12345678 t + cp: 0653-440 12345678/12345678/: name too long. + + Some `cp' implementations (e.g., BSD/OS 4.2) do not allow trailing + slashes at the end of nonexistent destination directories. To + avoid this problem, omit the trailing slashes. For example, use + `cp -R source /tmp/newdir' rather than `cp -R source /tmp/newdir/' + if `/tmp/newdir' does not exist. + + The ancient SunOS 4 `cp' does not support `-f', although its `mv' + does. + + Traditionally, file timestamps had 1-second resolution, and `cp + -p' copied the timestamps exactly. However, many modern file + systems have timestamps with 1-nanosecond resolution. + Unfortunately, some older `cp -p' implementations truncate + timestamps when copying files, which can cause the destination + file to appear to be older than the source. The exact amount of + truncation depends on the resolution of the system calls that `cp' + uses. Traditionally this was `utime', which has 1-second + resolution. Less-ancient `cp' implementations such as GNU Core + Utilities 5.0.91 (2003) use `utimes', which has 1-microsecond + resolution. Modern implementations such as GNU Core Utilities + 6.12 (2008) can set timestamps to the full nanosecond resolution, + using the modern system calls `futimens' and `utimensat' when they + are available. As of 2011, though, many platforms do not yet + fully support these new system calls. + + Bob Proulx notes that `cp -p' always _tries_ to copy ownerships. + But whether it actually does copy ownerships or not is a system + dependent policy decision implemented by the kernel. If the + kernel allows it then it happens. If the kernel does not allow it + then it does not happen. It is not something `cp' itself has + control over. + + In Unix System V any user can chown files to any other user, and + System V also has a non-sticky `/tmp'. That probably derives from + the heritage of System V in a business environment without hostile + users. BSD changed this to be a more secure model where only root + can `chown' files and a sticky `/tmp' is used. That undoubtedly + derives from the heritage of BSD in a campus environment. + + GNU/Linux and Solaris by default follow BSD, but can be configured + to allow a System V style `chown'. On the other hand, HP-UX + follows System V, but can be configured to use the modern security + model and disallow `chown'. Since it is an + administrator-configurable parameter you can't use the name of the + kernel as an indicator of the behavior. + +`date' + Some versions of `date' do not recognize special `%' directives, + and unfortunately, instead of complaining, they just pass them + through, and exit with success: + + $ uname -a + OSF1 medusa.sis.pasteur.fr V5.1 732 alpha + $ date "+%s" + %s + +`diff' + Option `-u' is nonportable. + + Some implementations, such as Tru64's, fail when comparing to + `/dev/null'. Use an empty file instead. + +`dirname' + Not all hosts have a working `dirname', and you should instead use + `AS_DIRNAME' (*note Programming in M4sh::). For example: + + dir=`dirname "$file"` # This is not portable. + dir=`AS_DIRNAME(["$file"])` # This is more portable. + +`egrep' + Posix 1003.1-2001 no longer requires `egrep', but many hosts do + not yet support the Posix replacement `grep -E'. Also, some + traditional implementations do not work on long input lines. To + work around these problems, invoke `AC_PROG_EGREP' and then use + `$EGREP'. + + Portable extended regular expressions should use `\' only to escape + characters in the string `$()*+.?[\^{|'. For example, `\}' is not + portable, even though it typically matches `}'. + + The empty alternative is not portable. Use `?' instead. For + instance with Digital Unix v5.0: + + > printf "foo\n|foo\n" | $EGREP '^(|foo|bar)$' + |foo + > printf "bar\nbar|\n" | $EGREP '^(foo|bar|)$' + bar| + > printf "foo\nfoo|\n|bar\nbar\n" | $EGREP '^(foo||bar)$' + foo + |bar + + `$EGREP' also suffers the limitations of `grep' (*note Limitations + of Usual Tools: grep.). + +`expr' + Not all implementations obey the Posix rule that `--' separates + options from arguments; likewise, not all implementations provide + the extension to Posix that the first argument can be treated as + part of a valid expression rather than an invalid option if it + begins with `-'. When performing arithmetic, use `expr 0 + $var' + if `$var' might be a negative number, to keep `expr' from + interpreting it as an option. + + No `expr' keyword starts with `X', so use `expr X"WORD" : + 'XREGEX'' to keep `expr' from misinterpreting WORD. + + Don't use `length', `substr', `match' and `index'. + +`expr' (`|') + You can use `|'. Although Posix does require that `expr ''' + return the empty string, it does not specify the result when you + `|' together the empty string (or zero) with the empty string. For + example: + + expr '' \| '' + + Posix 1003.2-1992 returns the empty string for this case, but + traditional Unix returns `0' (Solaris is one such example). In + Posix 1003.1-2001, the specification was changed to match + traditional Unix's behavior (which is bizarre, but it's too late + to fix this). Please note that the same problem does arise when + the empty string results from a computation, as in: + + expr bar : foo \| foo : bar + + Avoid this portability problem by avoiding the empty string. + +`expr' (`:') + Portable `expr' regular expressions should use `\' to escape only + characters in the string `$()*.0123456789[\^n{}'. For example, + alternation, `\|', is common but Posix does not require its + support, so it should be avoided in portable scripts. Similarly, + `\+' and `\?' should be avoided. + + Portable `expr' regular expressions should not begin with `^'. + Patterns are automatically anchored so leading `^' is not needed + anyway. + + On the other hand, the behavior of the `$' anchor is not portable + on multi-line strings. Posix is ambiguous whether the anchor + applies to each line, as was done in older versions of the GNU + Core Utilities, or whether it applies only to the end of the + overall string, as in Coreutils 6.0 and most other implementations. + + $ baz='foo + > bar' + $ expr "X$baz" : 'X\(foo\)$' + + $ expr-5.97 "X$baz" : 'X\(foo\)$' + foo + + The Posix standard is ambiguous as to whether `expr 'a' : '\(b\)'' + outputs `0' or the empty string. In practice, it outputs the + empty string on most platforms, but portable scripts should not + assume this. For instance, the QNX 4.25 native `expr' returns `0'. + + One might think that a way to get a uniform behavior would be to + use the empty string as a default value: + + expr a : '\(b\)' \| '' + + Unfortunately this behaves exactly as the original expression; see + the `expr' (`|') entry for more information. + + Some ancient `expr' implementations (e.g., SunOS 4 `expr' and + Solaris 8 `/usr/ucb/expr') have a silly length limit that causes + `expr' to fail if the matched substring is longer than 120 bytes. + In this case, you might want to fall back on `echo|sed' if `expr' + fails. Nowadays this is of practical importance only for the rare + installer who mistakenly puts `/usr/ucb' before `/usr/bin' in + `PATH'. + + On Mac OS X 10.4, `expr' mishandles the pattern `[^-]' in some + cases. For example, the command + expr Xpowerpc-apple-darwin8.1.0 : 'X[^-]*-[^-]*-\(.*\)' + + outputs `apple-darwin8.1.0' rather than the correct `darwin8.1.0'. + This particular case can be worked around by substituting `[^--]' + for `[^-]'. + + Don't leave, there is some more! + + The QNX 4.25 `expr', in addition of preferring `0' to the empty + string, has a funny behavior in its exit status: it's always 1 + when parentheses are used! + + $ val=`expr 'a' : 'a'`; echo "$?: $val" + 0: 1 + $ val=`expr 'a' : 'b'`; echo "$?: $val" + 1: 0 + + $ val=`expr 'a' : '\(a\)'`; echo "?: $val" + 1: a + $ val=`expr 'a' : '\(b\)'`; echo "?: $val" + 1: 0 + + In practice this can be a big problem if you are ready to catch + failures of `expr' programs with some other method (such as using + `sed'), since you may get twice the result. For instance + + $ expr 'a' : '\(a\)' || echo 'a' | sed 's/^\(a\)$/\1/' + + outputs `a' on most hosts, but `aa' on QNX 4.25. A simple + workaround consists of testing `expr' and using a variable set to + `expr' or to `false' according to the result. + + Tru64 `expr' incorrectly treats the result as a number, if it can + be interpreted that way: + + $ expr 00001 : '.*\(...\)' + 1 + + On HP-UX 11, `expr' only supports a single sub-expression. + + $ expr 'Xfoo' : 'X\(f\(oo\)*\)$' + expr: More than one '\(' was used. + +`fgrep' + Posix 1003.1-2001 no longer requires `fgrep', but many hosts do + not yet support the Posix replacement `grep -F'. Also, some + traditional implementations do not work on long input lines. To + work around these problems, invoke `AC_PROG_FGREP' and then use + `$FGREP'. + + Tru64/OSF 5.1 `fgrep' does not match an empty pattern. + +`find' + The option `-maxdepth' seems to be GNU specific. Tru64 v5.1, + NetBSD 1.5 and Solaris `find' commands do not understand it. + + The replacement of `{}' is guaranteed only if the argument is + exactly _{}_, not if it's only a part of an argument. For + instance on DU, and HP-UX 10.20 and HP-UX 11: + + $ touch foo + $ find . -name foo -exec echo "{}-{}" \; + {}-{} + + while GNU `find' reports `./foo-./foo'. + +`grep' + Portable scripts can rely on the `grep' options `-c', `-l', `-n', + and `-v', but should avoid other options. For example, don't use + `-w', as Posix does not require it and Irix 6.5.16m's `grep' does + not support it. Also, portable scripts should not combine `-c' + with `-l', as Posix does not allow this. + + Some of the options required by Posix are not portable in practice. + Don't use `grep -q' to suppress output, because many `grep' + implementations (e.g., Solaris) do not support `-q'. Don't use + `grep -s' to suppress output either, because Posix says `-s' does + not suppress output, only some error messages; also, the `-s' + option of traditional `grep' behaved like `-q' does in most modern + implementations. Instead, redirect the standard output and + standard error (in case the file doesn't exist) of `grep' to + `/dev/null'. Check the exit status of `grep' to determine whether + it found a match. + + The QNX4 implementation fails to count lines with `grep -c '$'', + but works with `grep -c '^''. Other alternatives for counting + lines are to use `sed -n '$='' or `wc -l'. + + Some traditional `grep' implementations do not work on long input + lines. On AIX the default `grep' silently truncates long lines on + the input before matching. + + Also, many implementations do not support multiple regexps with + `-e': they either reject `-e' entirely (e.g., Solaris) or honor + only the last pattern (e.g., IRIX 6.5 and NeXT). To work around + these problems, invoke `AC_PROG_GREP' and then use `$GREP'. + + Another possible workaround for the multiple `-e' problem is to + separate the patterns by newlines, for example: + + grep 'foo + bar' in.txt + + except that this fails with traditional `grep' implementations and + with OpenBSD 3.8 `grep'. + + Traditional `grep' implementations (e.g., Solaris) do not support + the `-E' or `-F' options. To work around these problems, invoke + `AC_PROG_EGREP' and then use `$EGREP', and similarly for + `AC_PROG_FGREP' and `$FGREP'. Even if you are willing to require + support for Posix `grep', your script should not use both `-E' and + `-F', since Posix does not allow this combination. + + Portable `grep' regular expressions should use `\' only to escape + characters in the string `$()*.0123456789[\^{}'. For example, + alternation, `\|', is common but Posix does not require its + support in basic regular expressions, so it should be avoided in + portable scripts. Solaris and HP-UX `grep' do not support it. + Similarly, the following escape sequences should also be avoided: + `\<', `\>', `\+', `\?', `\`', `\'', `\B', `\b', `\S', `\s', `\W', + and `\w'. + + Posix does not specify the behavior of `grep' on binary files. An + example where this matters is using BSD `grep' to search text that + includes embedded ANSI escape sequences for colored output to + terminals (`\033[m' is the sequence to restore normal output); the + behavior depends on whether input is seekable: + + $ printf 'esc\033[mape\n' > sample + $ grep . sample + Binary file sample matches + $ cat sample | grep . + escape + +`join' + Solaris 8 `join' has bugs when the second operand is standard + input, and when standard input is a pipe. For example, the + following shell script causes Solaris 8 `join' to loop forever: + + cat >file <<'EOF' + 1 x + 2 y + EOF + cat file | join file - + + Use `join - file' instead. + + On NetBSD, `join -a 1 file1 file2' mistakenly behaves like `join + -a 1 -a 2 1 file1 file2', resulting in a usage warning; the + workaround is to use `join -a1 file1 file2' instead. + +`ln' + Don't rely on `ln' having a `-f' option. Symbolic links are not + available on old systems; use `$(LN_S)' as a portable substitute. + + For versions of the DJGPP before 2.04, `ln' emulates symbolic links + to executables by generating a stub that in turn calls the real + program. This feature also works with nonexistent files like in + the Posix spec. So `ln -s file link' generates `link.exe', which + attempts to call `file.exe' if run. But this feature only works + for executables, so `cp -p' is used instead for these systems. + DJGPP versions 2.04 and later have full support for symbolic links. + +`ls' + The portable options are `-acdilrtu'. Current practice is for + `-l' to output both owner and group, even though ancient versions + of `ls' omitted the group. + + On ancient hosts, `ls foo' sent the diagnostic `foo not found' to + standard output if `foo' did not exist. Hence a shell command + like `sources=`ls *.c 2>/dev/null`' did not always work, since it + was equivalent to `sources='*.c not found'' in the absence of `.c' + files. This is no longer a practical problem, since current `ls' + implementations send diagnostics to standard error. + + The behavior of `ls' on a directory that is being concurrently + modified is not always predictable, because of a data race where + cached information returned by `readdir' does not match the current + directory state. In fact, MacOS 10.5 has an intermittent bug where + `readdir', and thus `ls', sometimes lists a file more than once if + other files were added or removed from the directory immediately + prior to the `ls' call. Since `ls' already sorts its output, the + duplicate entries can be avoided by piping the results through + `uniq'. + +`mkdir' + No `mkdir' option is portable to older systems. Instead of `mkdir + -p FILE-NAME', you should use `AS_MKDIR_P(FILE-NAME)' (*note + Programming in M4sh::) or `AC_PROG_MKDIR_P' (*note Particular + Programs::). + + Combining the `-m' and `-p' options, as in `mkdir -m go-w -p DIR', + often leads to trouble. FreeBSD `mkdir' incorrectly attempts to + change the permissions of DIR even if it already exists. HP-UX + 11.23 and IRIX 6.5 `mkdir' often assign the wrong permissions to + any newly-created parents of DIR. + + Posix does not clearly specify whether `mkdir -p foo' should + succeed when `foo' is a symbolic link to an already-existing + directory. The GNU Core Utilities 5.1.0 `mkdir' succeeds, but + Solaris `mkdir' fails. + + Traditional `mkdir -p' implementations suffer from race conditions. + For example, if you invoke `mkdir -p a/b' and `mkdir -p a/c' at + the same time, both processes might detect that `a' is missing, + one might create `a', then the other might try to create `a' and + fail with a `File exists' diagnostic. The GNU Core Utilities + (`fileutils' version 4.1), FreeBSD 5.0, NetBSD 2.0.2, and OpenBSD + 2.4 are known to be race-free when two processes invoke `mkdir -p' + simultaneously, but earlier versions are vulnerable. Solaris + `mkdir' is still vulnerable as of Solaris 10, and other + traditional Unix systems are probably vulnerable too. This + possible race is harmful in parallel builds when several Make + rules call `mkdir -p' to construct directories. You may use + `install-sh -d' as a safe replacement, provided this script is + recent enough; the copy shipped with Autoconf 2.60 and Automake + 1.10 is OK, but copies from older versions are vulnerable. + +`mkfifo' +`mknod' + The GNU Coding Standards state that `mknod' is safe to use on + platforms where it has been tested to exist; but it is generally + portable only for creating named FIFOs, since device numbers are + platform-specific. Autotest uses `mkfifo' to implement parallel + testsuites. Posix states that behavior is unspecified when + opening a named FIFO for both reading and writing; on at least + Cygwin, this results in failure on any attempt to read or write to + that file descriptor. + +`mktemp' + Shell scripts can use temporary files safely with `mktemp', but it + does not exist on all systems. A portable way to create a safe + temporary file name is to create a temporary directory with mode + 700 and use a file inside this directory. Both methods prevent + attackers from gaining control, though `mktemp' is far less likely + to fail gratuitously under attack. + + Here is sample code to create a new temporary directory `$dir' + safely: + + # Create a temporary directory $dir in $TMPDIR (default /tmp). + # Use mktemp if possible; otherwise fall back on mkdir, + # with $RANDOM to make collisions less likely. + : "${TMPDIR:=/tmp}" + { + dir=` + (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null + ` && + test -d "$dir" + } || { + dir=$TMPDIR/foo$$-$RANDOM + (umask 077 && mkdir "$dir") + } || exit $? + +`mv' + The only portable options are `-f' and `-i'. + + Moving individual files between file systems is portable (it was + in Unix version 6), but it is not always atomic: when doing `mv + new existing', there's a critical section where neither the old + nor the new version of `existing' actually exists. + + On some systems moving files from `/tmp' can sometimes cause + undesirable (but perfectly valid) warnings, even if you created + these files. This is because `/tmp' belongs to a group that + ordinary users are not members of, and files created in `/tmp' + inherit the group of `/tmp'. When the file is copied, `mv' issues + a diagnostic without failing: + + $ touch /tmp/foo + $ mv /tmp/foo . + error-->mv: ./foo: set owner/group (was: 100/0): Operation not permitted + $ echo $? + 0 + $ ls foo + foo + + This annoying behavior conforms to Posix, unfortunately. + + Moving directories across mount points is not portable, use `cp' + and `rm'. + + DOS variants cannot rename or remove open files, and do not + support commands like `mv foo bar >foo', even though this is + perfectly portable among Posix hosts. + +`od' + In Mac OS X 10.3, `od' does not support the standard Posix options + `-A', `-j', `-N', or `-t', or the XSI option `-s'. The only + supported Posix option is `-v', and the only supported XSI options + are those in `-bcdox'. The BSD `hexdump' program can be used + instead. + + This problem no longer exists in Mac OS X 10.4.3. + +`rm' + The `-f' and `-r' options are portable. + + It is not portable to invoke `rm' without options or operands. On + the other hand, Posix now requires `rm -f' to silently succeed + when there are no operands (useful for constructs like `rm -rf + $filelist' without first checking if `$filelist' was empty). But + this was not always portable; at least NetBSD `rm' built before + 2008 would fail with a diagnostic. + + A file might not be removed even if its parent directory is + writable and searchable. Many Posix hosts cannot remove a mount + point, a named stream, a working directory, or a last link to a + file that is being executed. + + DOS variants cannot rename or remove open files, and do not + support commands like `rm foo >foo', even though this is perfectly + portable among Posix hosts. + +`rmdir' + Just as with `rm', some platforms refuse to remove a working + directory. + +`sed' + Patterns should not include the separator (unless escaped), even + as part of a character class. In conformance with Posix, the Cray + `sed' rejects `s/[^/]*$//': use `s%[^/]*$%%'. Even when escaped, + patterns should not include separators that are also used as `sed' + metacharacters. For example, GNU sed 4.0.9 rejects + `s,x\{1\,\},,', while sed 4.1 strips the backslash before the comma + before evaluating the basic regular expression. + + Avoid empty patterns within parentheses (i.e., `\(\)'). Posix does + not require support for empty patterns, and Unicos 9 `sed' rejects + them. + + Unicos 9 `sed' loops endlessly on patterns like `.*\n.*'. + + Sed scripts should not use branch labels longer than 7 characters + and should not contain comments; AIX 5.3 `sed' rejects indented + comments. HP-UX sed has a limit of 99 commands (not counting `:' + commands) and 48 labels, which cannot be circumvented by using + more than one script file. It can execute up to 19 reads with the + `r' command per cycle. Solaris `/usr/ucb/sed' rejects usages that + exceed a limit of about 6000 bytes for the internal representation + of commands. + + Avoid redundant `;', as some `sed' implementations, such as NetBSD + 1.4.2's, incorrectly try to interpret the second `;' as a command: + + $ echo a | sed 's/x/x/;;s/x/x/' + sed: 1: "s/x/x/;;s/x/x/": invalid command code ; + + Some `sed' implementations have a buffer limited to 4000 bytes, + and this limits the size of input lines, output lines, and internal + buffers that can be processed portably. Likewise, not all `sed' + implementations can handle embedded `NUL' or a missing trailing + newline. + + Remember that ranges within a bracket expression of a regular + expression are only well-defined in the `C' (or `POSIX') locale. + Meanwhile, support for character classes like `[[:upper:]]' is not + yet universal, so if you cannot guarantee the setting of `LC_ALL', + it is better to spell out a range `[ABCDEFGHIJKLMNOPQRSTUVWXYZ]' + than to rely on `[A-Z]'. + + Additionally, Posix states that regular expressions are only + well-defined on characters. Unfortunately, there exist platforms + such as MacOS X 10.5 where not all 8-bit byte values are valid + characters, even though that platform has a single-byte `C' + locale. And Posix allows the existence of a multi-byte `C' + locale, although that does not yet appear to be a common + implementation. At any rate, it means that not all bytes will be + matched by the regular expression `.': + + $ printf '\200\n' | LC_ALL=C sed -n /./p | wc -l + 0 + $ printf '\200\n' | LC_ALL=en_US.ISO8859-1 sed -n /./p | wc -l + 1 + + Portable `sed' regular expressions should use `\' only to escape + characters in the string `$()*.0123456789[\^n{}'. For example, + alternation, `\|', is common but Posix does not require its + support, so it should be avoided in portable scripts. Solaris + `sed' does not support alternation; e.g., `sed '/a\|b/d'' deletes + only lines that contain the literal string `a|b'. Similarly, `\+' + and `\?' should be avoided. + + Anchors (`^' and `$') inside groups are not portable. + + Nested parentheses in patterns (e.g., `\(\(a*\)b*)\)') are quite + portable to current hosts, but was not supported by some ancient + `sed' implementations like SVR3. + + Some `sed' implementations, e.g., Solaris, restrict the special + role of the asterisk `*' to one-character regular expressions and + back-references, and the special role of interval expressions + `\{M\}', `\{M,\}', or `\{M,N\}' to one-character regular + expressions. This may lead to unexpected behavior: + + $ echo '1*23*4' | /usr/bin/sed 's/\(.\)*/x/g' + x2x4 + $ echo '1*23*4' | /usr/xpg4/bin/sed 's/\(.\)*/x/g' + x + + The `-e' option is mostly portable. However, its argument cannot + start with `a', `c', or `i', as this runs afoul of a Tru64 5.1 bug. + Also, its argument cannot be empty, as this fails on AIX 5.3. + Some people prefer to use `-e': + + sed -e 'COMMAND-1' \ + -e 'COMMAND-2' + + as opposed to the equivalent: + + sed ' + COMMAND-1 + COMMAND-2 + ' + + The following usage is sometimes equivalent: + + sed 'COMMAND-1;COMMAND-2' + + but Posix says that this use of a semicolon has undefined effect if + COMMAND-1's verb is `{', `a', `b', `c', `i', `r', `t', `w', `:', + or `#', so you should use semicolon only with simple scripts that + do not use these verbs. + + Posix up to the 2008 revision requires the argument of the `-e' + option to be a syntactically complete script. GNU `sed' allows to + pass multiple script fragments, each as argument of a separate + `-e' option, that are then combined, with newlines between the + fragments, and a future Posix revision may allow this as well. + This approach is not portable with script fragments ending in + backslash; for example, the `sed' programs on Solaris 10, HP-UX + 11, and AIX don't allow splitting in this case: + + $ echo a | sed -n -e 'i\ + 0' + 0 + $ echo a | sed -n -e 'i\' -e 0 + Unrecognized command: 0 + + In practice, however, this technique of joining fragments through + `-e' works for multiple `sed' functions within `{' and `}', even + if that is not specified by Posix: + + $ echo a | sed -n -e '/a/{' -e s/a/b/ -e p -e '}' + b + + Commands inside { } brackets are further restricted. Posix 2008 + says that they cannot be preceded by addresses, `!', or `;', and + that each command must be followed immediately by a newline, + without any intervening blanks or semicolons. The closing bracket + must be alone on a line, other than white space preceding or + following it. However, a future version of Posix may standardize + the use of addresses within brackets. + + Contrary to yet another urban legend, you may portably use `&' in + the replacement part of the `s' command to mean "what was + matched". All descendants of Unix version 7 `sed' (at least; we + don't have first hand experience with older `sed' implementations) + have supported it. + + Posix requires that you must not have any white space between `!' + and the following command. It is OK to have blanks between the + address and the `!'. For instance, on Solaris: + + $ echo "foo" | sed -n '/bar/ ! p' + error-->Unrecognized command: /bar/ ! p + $ echo "foo" | sed -n '/bar/! p' + error-->Unrecognized command: /bar/! p + $ echo "foo" | sed -n '/bar/ !p' + foo + + Posix also says that you should not combine `!' and `;'. If you + use `!', it is best to put it on a command that is delimited by + newlines rather than `;'. + + Also note that Posix requires that the `b', `t', `r', and `w' + commands be followed by exactly one space before their argument. + On the other hand, no white space is allowed between `:' and the + subsequent label name. + + If a sed script is specified on the command line and ends in an + `a', `c', or `i' command, the last line of inserted text should be + followed by a newline. Otherwise some `sed' implementations + (e.g., OpenBSD 3.9) do not append a newline to the inserted text. + + Many `sed' implementations (e.g., MacOS X 10.4, OpenBSD 3.9, + Solaris 10 `/usr/ucb/sed') strip leading white space from the text + of `a', `c', and `i' commands. Prepend a backslash to work around + this incompatibility with Posix: + + $ echo flushleft | sed 'a\ + > indented + > ' + flushleft + indented + $ echo foo | sed 'a\ + > \ indented + > ' + flushleft + indented + + Posix requires that with an empty regular expression, the last + non-empty regular expression from either an address specification + or substitution command is applied. However, busybox 1.6.1 + complains when using a substitution command with a replacement + containing a back-reference to an empty regular expression; the + workaround is repeating the regular expression. + + $ echo abc | busybox sed '/a\(b\)c/ s//\1/' + sed: No previous regexp. + $ echo abc | busybox sed '/a\(b\)c/ s/a\(b\)c/\1/' + b + +`sed' (`t') + Some old systems have `sed' that "forget" to reset their `t' flag + when starting a new cycle. For instance on MIPS RISC/OS, and on + IRIX 5.3, if you run the following `sed' script (the line numbers + are not actual part of the texts): + + s/keep me/kept/g # a + t end # b + s/.*/deleted/g # c + :end # d + + on + + delete me # 1 + delete me # 2 + keep me # 3 + delete me # 4 + + you get + + deleted + delete me + kept + deleted + + instead of + + deleted + deleted + kept + deleted + + Why? When processing line 1, (c) matches, therefore sets the `t' + flag, and the output is produced. When processing line 2, the `t' + flag is still set (this is the bug). Command (a) fails to match, + but `sed' is not supposed to clear the `t' flag when a + substitution fails. Command (b) sees that the flag is set, + therefore it clears it, and jumps to (d), hence you get `delete me' + instead of `deleted'. When processing line (3), `t' is clear, (a) + matches, so the flag is set, hence (b) clears the flags and jumps. + Finally, since the flag is clear, line 4 is processed properly. + + There are two things one should remember about `t' in `sed'. + Firstly, always remember that `t' jumps if _some_ substitution + succeeded, not only the immediately preceding substitution. + Therefore, always use a fake `t clear' followed by a `:clear' on + the next line, to reset the `t' flag where needed. + + Secondly, you cannot rely on `sed' to clear the flag at each new + cycle. + + One portable implementation of the script above is: + + t clear + :clear + s/keep me/kept/g + t end + s/.*/deleted/g + :end + +`sleep' + Using `sleep' is generally portable. However, remember that + adding a `sleep' to work around timestamp issues, with a minimum + granularity of one second, doesn't scale well for parallel builds + on modern machines with sub-second process completion. + +`sort' + Remember that sort order is influenced by the current locale. + Inside `configure', the C locale is in effect, but in Makefile + snippets, you may need to specify `LC_ALL=C sort'. + +`tar' + There are multiple file formats for `tar'; if you use Automake, + the macro `AM_INIT_AUTOMAKE' has some options controlling which + level of portability to use. + +`touch' + If you specify the desired timestamp (e.g., with the `-r' option), + older `touch' implementations use the `utime' or `utimes' system + call, which can result in the same kind of timestamp truncation + problems that `cp -p' has. + + On ancient BSD systems, `touch' or any command that results in an + empty file does not update the timestamps, so use a command like + `echo' as a workaround. Also, GNU `touch' 3.16r (and presumably + all before that) fails to work on SunOS 4.1.3 when the empty file + is on an NFS-mounted 4.2 volume. However, these problems are no + longer of practical concern. + +`tr' + Not all versions of `tr' handle all backslash character escapes. + For example, Solaris 10 `/usr/ucb/tr' falls over, even though + Solaris contains more modern `tr' in other locations. Using octal + escapes is more portable for carriage returns, since `\015' is the + same for both ASCII and EBCDIC, and since use of literal carriage + returns in scripts causes a number of other problems. But for + other characters, like newline, using octal escapes ties the + operation to ASCII, so it is better to use literal characters. + + $ { echo moon; echo light; } | /usr/ucb/tr -d '\n' ; echo + moo + light + $ { echo moon; echo light; } | /usr/bin/tr -d '\n' ; echo + moonlight + $ { echo moon; echo light; } | /usr/ucb/tr -d '\012' ; echo + moonlight + $ nl=' + '; { echo moon; echo light; } | /usr/ucb/tr -d "$nl" ; echo + moonlight + + Not all versions of `tr' recognize direct ranges of characters: at + least Solaris `/usr/bin/tr' still fails to do so. But you can use + `/usr/xpg4/bin/tr' instead, or add brackets (which in Posix + transliterate to themselves). + + $ echo "Hazy Fantazy" | LC_ALL=C /usr/bin/tr a-z A-Z + HAZy FAntAZy + $ echo "Hazy Fantazy" | LC_ALL=C /usr/bin/tr '[a-z]' '[A-Z]' + HAZY FANTAZY + $ echo "Hazy Fantazy" | LC_ALL=C /usr/xpg4/bin/tr a-z A-Z + HAZY FANTAZY + + When providing two arguments, be sure the second string is at + least as long as the first. + + $ echo abc | /usr/xpg4/bin/tr bc d + adc + $ echo abc | coreutils/tr bc d + add + + Posix requires `tr' to operate on binary files. But at least + Solaris `/usr/ucb/tr' and `/usr/bin/tr' silently discard `NUL' in + the input prior to doing any translation. When using `tr' to + process a binary file that may contain `NUL' bytes, it is + necessary to use `/usr/xpg4/bin/tr' instead, or `/usr/xpg6/bin/tr' + if that is available. + + $ printf 'a\0b' | /usr/ucb/tr x x | od -An -tx1 + 61 62 + $ printf 'a\0b' | /usr/bin/tr x x | od -An -tx1 + 61 62 + $ printf 'a\0b' | /usr/xpg4/bin/tr x x | od -An -tx1 + 61 00 62 + + Solaris `/usr/ucb/tr' additionally fails to handle `\0' as the + octal escape for `NUL'. + + $ printf 'abc' | /usr/ucb/tr 'bc' '\0d' | od -An -tx1 + 61 62 63 + $ printf 'abc' | /usr/bin/tr 'bc' '\0d' | od -An -tx1 + 61 00 64 + $ printf 'abc' | /usr/xpg4/bin/tr 'bc' '\0d' | od -An -tx1 + 61 00 64 + + + +File: autoconf.info, Node: Portable Make, Next: Portable C and C++, Prev: Portable Shell, Up: Top + +12 Portable Make Programming +**************************** + +Writing portable makefiles is an art. Since a makefile's commands are +executed by the shell, you must consider the shell portability issues +already mentioned. However, other issues are specific to `make' itself. + +* Menu: + +* $< in Ordinary Make Rules:: $< in ordinary rules +* Failure in Make Rules:: Failing portably in rules +* Special Chars in Names:: Special Characters in Macro Names +* Backslash-Newline-Empty:: Empty lines after backslash-newline +* Backslash-Newline Comments:: Spanning comments across line boundaries +* Long Lines in Makefiles:: Line length limitations +* Macros and Submakes:: `make macro=value' and submakes +* The Make Macro MAKEFLAGS:: `$(MAKEFLAGS)' portability issues +* The Make Macro SHELL:: `$(SHELL)' portability issues +* Parallel Make:: Parallel `make' quirks +* Comments in Make Rules:: Other problems with Make comments +* Newlines in Make Rules:: Using literal newlines in rules +* Comments in Make Macros:: Other problems with Make comments in macros +* Trailing whitespace in Make Macros:: Macro substitution problems +* Command-line Macros and whitespace:: Whitespace trimming of values +* obj/ and Make:: Don't name a subdirectory `obj' +* make -k Status:: Exit status of `make -k' +* VPATH and Make:: `VPATH' woes +* Single Suffix Rules:: Single suffix rules and separated dependencies +* Timestamps and Make:: Subsecond timestamp resolution + + +File: autoconf.info, Node: $< in Ordinary Make Rules, Next: Failure in Make Rules, Up: Portable Make + +12.1 `$<' in Ordinary Make Rules +================================ + +Posix says that the `$<' construct in makefiles can be used only in +inference rules and in the `.DEFAULT' rule; its meaning in ordinary +rules is unspecified. Solaris `make' for instance replaces it with the +empty string. OpenBSD (3.0 and later) `make' diagnoses these uses and +errors out. + + +File: autoconf.info, Node: Failure in Make Rules, Next: Special Chars in Names, Prev: $< in Ordinary Make Rules, Up: Portable Make + +12.2 Failure in Make Rules +========================== + +Posix 2008 requires that `make' must invoke each command with the +equivalent of a `sh -e -c' subshell, which causes the subshell to exit +immediately if a subsidiary simple-command fails, although not all +`make' implementations have historically followed this rule. For +example, the command `touch T; rm -f U' may attempt to remove `U' even +if the `touch' fails, although this is not permitted with Posix make. +One way to work around failures in simple commands is to reword them so +that they always succeed, e.g., `touch T || :; rm -f U'. However, even +this approach can run into common bugs in BSD implementations of the +`-e' option of `sh' and `set' (*note Limitations of Shell Builtins: +set.), so if you are worried about porting to buggy BSD shells it may +be simpler to migrate complicated `make' actions into separate scripts. + + +File: autoconf.info, Node: Special Chars in Names, Next: Backslash-Newline-Empty, Prev: Failure in Make Rules, Up: Portable Make + +12.3 Special Characters in Make Macro Names +=========================================== + +Posix limits macro names to nonempty strings containing only ASCII +letters and digits, `.', and `_'. Many `make' implementations allow a +wider variety of characters, but portable makefiles should avoid them. +It is portable to start a name with a special character, e.g., +`$(.FOO)'. + + Some ancient `make' implementations don't support leading +underscores in macro names. An example is NEWS-OS 4.2R. + + $ cat Makefile + _am_include = # + _am_quote = + all:; @echo this is test + $ make + Make: Must be a separator on rules line 2. Stop. + $ cat Makefile2 + am_include = # + am_quote = + all:; @echo this is test + $ make -f Makefile2 + this is test + +However, this problem is no longer of practical concern. + + +File: autoconf.info, Node: Backslash-Newline-Empty, Next: Backslash-Newline Comments, Prev: Special Chars in Names, Up: Portable Make + +12.4 Backslash-Newline Before Empty Lines +========================================= + +A bug in Bash 2.03 can cause problems if a Make rule contains a +backslash-newline followed by line that expands to nothing. For +example, on Solaris 8: + + SHELL = /bin/bash + EMPTY = + foo: + touch foo \ + $(EMPTY) + +executes + + /bin/bash -c 'touch foo \ + ' + +which fails with a syntax error, due to the Bash bug. To avoid this +problem, avoid nullable macros in the last line of a multiline command. + + On some versions of HP-UX, `make' reads multiple newlines following +a backslash, continuing to the next non-empty line. For example, + + FOO = one \ + + BAR = two + + test: + : FOO is "$(FOO)" + : BAR is "$(BAR)" + +shows `FOO' equal to `one BAR = two'. Other implementations sensibly +let a backslash continue only to the immediately following line. + + +File: autoconf.info, Node: Backslash-Newline Comments, Next: Long Lines in Makefiles, Prev: Backslash-Newline-Empty, Up: Portable Make + +12.5 Backslash-Newline in Make Comments +======================================= + +According to Posix, Make comments start with `#' and continue until an +unescaped newline is reached. + + $ cat Makefile + # A = foo \ + bar \ + baz + + all: + @echo ok + $ make # GNU make + ok + +However this is not always the case. Some implementations discard +everything from `#' through the end of the line, ignoring any trailing +backslash. + + $ pmake # BSD make + "Makefile", line 3: Need an operator + Fatal errors encountered -- cannot continue + +Therefore, if you want to comment out a multi-line definition, prefix +each line with `#', not only the first. + + # A = foo \ + # bar \ + # baz + + +File: autoconf.info, Node: Long Lines in Makefiles, Next: Macros and Submakes, Prev: Backslash-Newline Comments, Up: Portable Make + +12.6 Long Lines in Makefiles +============================ + +Tru64 5.1's `make' has been reported to crash when given a makefile +with lines longer than around 20 kB. Earlier versions are reported to +exit with `Line too long' diagnostics. + + +File: autoconf.info, Node: Macros and Submakes, Next: The Make Macro MAKEFLAGS, Prev: Long Lines in Makefiles, Up: Portable Make + +12.7 `make macro=value' and Submakes +==================================== + +A command-line variable definition such as `foo=bar' overrides any +definition of `foo' in a makefile. Some `make' implementations (such +as GNU `make') propagate this override to subsidiary invocations of +`make'. Some other implementations do not pass the substitution along +to submakes. + + $ cat Makefile + foo = foo + one: + @echo $(foo) + $(MAKE) two + two: + @echo $(foo) + $ make foo=bar # GNU make 3.79.1 + bar + make two + make[1]: Entering directory `/home/adl' + bar + make[1]: Leaving directory `/home/adl' + $ pmake foo=bar # BSD make + bar + pmake two + foo + + You have a few possibilities if you do want the `foo=bar' override +to propagate to submakes. One is to use the `-e' option, which causes +all environment variables to have precedence over the makefile macro +definitions, and declare foo as an environment variable: + + $ env foo=bar make -e + + The `-e' option is propagated to submakes automatically, and since +the environment is inherited between `make' invocations, the `foo' +macro is overridden in submakes as expected. + + This syntax (`foo=bar make -e') is portable only when used outside +of a makefile, for instance from a script or from the command line. +When run inside a `make' rule, GNU `make' 3.80 and prior versions +forget to propagate the `-e' option to submakes. + + Moreover, using `-e' could have unexpected side effects if your +environment contains some other macros usually defined by the makefile. +(See also the note about `make -e' and `SHELL' below.) + + If you can foresee all macros that a user might want to override, +then you can propagate them to submakes manually, from your makefile: + + foo = foo + one: + @echo $(foo) + $(MAKE) foo=$(foo) two + two: + @echo $(foo) + + Another way to propagate a variable to submakes in a portable way is +to expand an extra variable in every invocation of `$(MAKE)' within +your makefile: + + foo = foo + one: + @echo $(foo) + $(MAKE) $(SUBMAKEFLAGS) two + two: + @echo $(foo) + + Users must be aware that this technique is in use to take advantage +of it, e.g. with `make foo=bar SUBMAKEFLAGS='foo=bar'', but it allows +any macro to be overridden. Makefiles generated by `automake' use this +technique, expanding `$(AM_MAKEFLAGS)' on the command lines of submakes +(*note Automake: (automake)Subdirectories.). + + +File: autoconf.info, Node: The Make Macro MAKEFLAGS, Next: The Make Macro SHELL, Prev: Macros and Submakes, Up: Portable Make + +12.8 The Make Macro MAKEFLAGS +============================= + +Posix requires `make' to use `MAKEFLAGS' to affect the current and +recursive invocations of make, but allows implementations several +formats for the variable. It is tricky to parse `$MAKEFLAGS' to +determine whether `-s' for silent execution or `-k' for continued +execution are in effect. For example, you cannot assume that the first +space-separated word in `$MAKEFLAGS' contains single-letter options, +since in the Cygwin version of GNU `make' it is either `--unix' or +`--win32' with the second word containing single-letter options. + + $ cat Makefile + all: + @echo MAKEFLAGS = $(MAKEFLAGS) + $ make + MAKEFLAGS = --unix + $ make -k + MAKEFLAGS = --unix -k + + +File: autoconf.info, Node: The Make Macro SHELL, Next: Parallel Make, Prev: The Make Macro MAKEFLAGS, Up: Portable Make + +12.9 The Make Macro `SHELL' +=========================== + +Posix-compliant `make' internally uses the `$(SHELL)' macro to spawn +shell processes and execute Make rules. This is a builtin macro +supplied by `make', but it can be modified by a makefile or by a +command-line argument. + + Not all `make' implementations define this `SHELL' macro. Tru64 +`make' is an example; this implementation always uses `/bin/sh'. So +it's a good idea to always define `SHELL' in your makefiles. If you +use Autoconf, do + + SHELL = @SHELL@ + +If you use Automake, this is done for you. + + Do not force `SHELL = /bin/sh' because that is not correct +everywhere. Remember, `/bin/sh' is not Posix compliant on many +systems, such as FreeBSD 4, NetBSD 3, AIX 3, Solaris 10, or Tru64. +Additionally, DJGPP lacks `/bin/sh', and when its GNU `make' port sees +such a setting it enters a special emulation mode where features like +pipes and redirections are emulated on top of DOS's `command.com'. +Unfortunately this emulation is incomplete; for instance it does not +handle command substitutions. Using `@SHELL@' means that your makefile +will benefit from the same improved shell, such as `bash' or `ksh', +that was discovered during `configure', so that you aren't fighting two +different sets of shell bugs between the two contexts. + + Posix-compliant `make' should never acquire the value of $(SHELL) +from the environment, even when `make -e' is used (otherwise, think +about what would happen to your rules if `SHELL=/bin/tcsh'). + + However not all `make' implementations have this exception. For +instance it's not surprising that Tru64 `make' doesn't protect `SHELL', +since it doesn't use it. + + $ cat Makefile + SHELL = /bin/sh + FOO = foo + all: + @echo $(SHELL) + @echo $(FOO) + $ env SHELL=/bin/tcsh FOO=bar make -e # Tru64 Make + /bin/tcsh + bar + $ env SHELL=/bin/tcsh FOO=bar gmake -e # GNU make + /bin/sh + bar + + Conversely, `make' is not supposed to export any changes to the +macro `SHELL' to child processes. Again, many implementations break +this rule: + + $ cat Makefile + all: + @echo $(SHELL) + @printenv SHELL + $ env SHELL=sh make -e SHELL=/bin/ksh # BSD Make, GNU make 3.80 + /bin/ksh + /bin/ksh + $ env SHELL=sh gmake -e SHELL=/bin/ksh # GNU make 3.81 + /bin/ksh + sh + + +File: autoconf.info, Node: Parallel Make, Next: Comments in Make Rules, Prev: The Make Macro SHELL, Up: Portable Make + +12.10 Parallel Make +=================== + +Support for parallel execution in `make' implementation varies. +Generally, using GNU make is your best bet. + + When NetBSD or FreeBSD `make' are run in parallel mode, they will +reuse the same shell for multiple commands within one recipe. This can +have various unexpected consequences. For example, changes of +directories or variables persist between recipes, so that: + + all: + @var=value; cd /; pwd; echo $$var; echo $$$$ + @pwd; echo $$var; echo $$$$ + +may output the following with `make -j1', at least on NetBSD up to 5.1 +and FreeBSD up to 8.2: + + / + value + 32235 + / + value + 32235 + +while without `-j1', or with `-B', the output looks less surprising: + + / + value + 32238 + /tmp + + 32239 + +Another consequence is that, if one command in a recipe uses `exit 0' +to indicate a successful exit, the shell will be gone and the remaining +commands of this recipe will not be executed. + + The BSD `make' implementations, when run in parallel mode, will also +pass the `Makefile' recipes to the shell through its standard input, +thus making it unusable from the recipes: + + $ cat Makefile + read: + @read line; echo LINE: $$line + $ echo foo | make read + LINE: foo + $ echo foo | make -j1 read # NetBSD 5.1 and FreeBSD 8.2 + LINE: + +Moreover, when FreeBSD `make' (up at least to 8.2) is run in parallel +mode, it implements the `@' and `-' "recipe modifiers" by dynamically +modifying the active shell flags. This behavior has the effects of +potentially clobbering the exit status of recipes silenced with the `@' +modifier if they also unset the `errexit' shell flag, and of mangling +the output in unexpected ways: + + $ cat Makefile + a: + @echo $$-; set +e; false + b: + -echo $$-; false; echo set - + $ make a; echo status: $? + ehBc + *** Error code 1 + status: 1 + $ make -j1 a; echo status: $? + ehB + status: 0 + $ make b + echo $-; echo set - + hBc + set - + $ make -j1 b + echo $-; echo hvB + +You can avoid all these issues by using the `-B' option to enable +compatibility semantics. However, that will effectively also disable +all parallelism as that will cause prerequisites to be updated in the +order they are listed in a rule. + + Some make implementations (among them, FreeBSD `make', NetBSD +`make', and Solaris `dmake'), when invoked with a `-jN' option, connect +the standard output and standard error of all their child processes to +pipes or temporary regular files. This can lead to subtly different +semantics in the behavior of the spawned processes. For example, even +if the `make' standard output is connected to a tty, the recipe command +will not be: + + $ cat Makefile + all: + @test -t 1 && echo "Is a tty" || echo "Is not a tty" + $ make -j 2 # FreeBSD 8.2 make + Is not a tty + $ make -j 2 # NetBSD 5.1 make + --- all --- + Is not a tty + $ dmake -j 2 # Solaris 10 dmake + HOSTNAME --> 1 job + HOSTNAME --> Job output + Is not a tty + +On the other hand: + + $ make -j 2 # GNU make, Heirloom make + Is a tty + +The above examples also show additional status output produced in +parallel mode for targets being updated by Solaris `dmake' and NetBSD +`make' (but _not_ by FreeBSD `make'). + + Furthermore, parallel runs of those `make' implementations will +route standard error from commands that they spawn into their own +standard output, and may remove leading whitespace from output lines. + + +File: autoconf.info, Node: Comments in Make Rules, Next: Newlines in Make Rules, Prev: Parallel Make, Up: Portable Make + +12.11 Comments in Make Rules +============================ + +Never put comments in a rule. + + Some `make' treat anything starting with a tab as a command for the +current rule, even if the tab is immediately followed by a `#'. The +`make' from Tru64 Unix V5.1 is one of them. The following makefile +runs `# foo' through the shell. + + all: + # foo + + As a workaround, you can use the `:' no-op command with a string +argument that gets ignored: + + all: + : "foo" + + Conversely, if you want to use the `#' character in some command, +you can only do so by expanding it inside a rule (*note Comments in +Make Macros::). So for example, if `COMMENT_CHAR' is substituted by +`config.status' as `#', then the following substitutes `@COMMENT_CHAR@' +in a generated header: + + foo.h: foo.h.in + sed -e 's|@''COMMENT_CHAR''@|@COMMENT_CHAR@|g' \ + $(srcdir)/foo.h.in > $@ + + The funny shell quoting avoids a substitution at `config.status' run +time of the left-hand side of the `sed' `s' command. + + +File: autoconf.info, Node: Newlines in Make Rules, Next: Comments in Make Macros, Prev: Comments in Make Rules, Up: Portable Make + +12.12 Newlines in Make Rules +============================ + +In shell scripts, newlines can be used inside string literals. But in +the shell statements of `Makefile' rules, this is not possible: A +newline not preceded by a backslash is a separator between shell +statements. Whereas a newline that is preceded by a backslash becomes +part of the shell statement according to POSIX, but gets replaced, +together with the backslash that precedes it, by a space in GNU `make' +3.80 and older. So, how can a newline be used in a string literal? + + The trick is to set up a shell variable that contains a newline: + + nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit" + + For example, in order to create a multiline `sed' expression that +inserts a blank line after every line of a file, this code can be used: + + nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \ + sed -e "s/\$$/\\$${nl}/" < input > output + + +File: autoconf.info, Node: Comments in Make Macros, Next: Trailing whitespace in Make Macros, Prev: Newlines in Make Rules, Up: Portable Make + +12.13 Comments in Make Macros +============================= + +Avoid putting comments in macro values as far as possible. Posix +specifies that the text starting from the `#' sign until the end of the +line is to be ignored, which has the unfortunate effect of disallowing +them even within quotes. Thus, the following might lead to a syntax +error at compile time: + + CPPFLAGS = "-DCOMMENT_CHAR='#'" + +as `CPPFLAGS' may be expanded to `"-DCOMMENT_CHAR=''. + + Most `make' implementations disregard this and treat single and +double quotes specially here. Also, GNU `make' lets you put `#' into a +macro value by escaping it with a backslash, i.e., `\#'. However, +neither of these usages are portable. *Note Comments in Make Rules::, +for a portable alternative. + + Even without quoting involved, comments can have surprising effects, +because the whitespace before them is part of the variable value: + + foo = bar # trailing comment + print: ; @echo "$(foo)." + +prints `bar .', which is usually not intended, and can expose `make' +bugs as described below. + + +File: autoconf.info, Node: Trailing whitespace in Make Macros, Next: Command-line Macros and whitespace, Prev: Comments in Make Macros, Up: Portable Make + +12.14 Trailing whitespace in Make Macros +======================================== + +GNU `make' 3.80 mistreats trailing whitespace in macro substitutions +and appends another spurious suffix: + + empty = + foo = bar $(empty) + print: ; @echo $(foo:=.test) + +prints `bar.test .test'. + + BSD and Solaris `make' implementations do not honor trailing +whitespace in macro definitions as Posix requires: + + foo = bar # Note the space after "bar". + print: ; @echo $(foo)t + +prints `bart' instead of `bar t'. To work around this, you can use a +helper macro as in the previous example. + + +File: autoconf.info, Node: Command-line Macros and whitespace, Next: obj/ and Make, Prev: Trailing whitespace in Make Macros, Up: Portable Make + +12.15 Command-line Macros and whitespace +======================================== + +Some `make' implementations may strip trailing whitespace off of macros +set on the command line in addition to leading whitespace. Further, +some may strip leading whitespace off of macros set from environment +variables: + + $ echo 'print: ; @echo "x$(foo)x$(bar)x"' | + foo=' f f ' make -f - bar=' b b ' + x f f xb b x # AIX, BSD, GNU make + xf f xb b x # HP-UX, IRIX, Tru64/OSF make + x f f xb bx # Solaris make + + +File: autoconf.info, Node: obj/ and Make, Next: make -k Status, Prev: Command-line Macros and whitespace, Up: Portable Make + +12.16 The `obj/' Subdirectory and Make +====================================== + +Never name one of your subdirectories `obj/' if you don't like +surprises. + + If an `obj/' directory exists, BSD `make' enters it before reading +the makefile. Hence the makefile in the current directory is not read. + + $ cat Makefile + all: + echo Hello + $ cat obj/Makefile + all: + echo World + $ make # GNU make + echo Hello + Hello + $ pmake # BSD make + echo World + World + + +File: autoconf.info, Node: make -k Status, Next: VPATH and Make, Prev: obj/ and Make, Up: Portable Make + +12.17 Exit Status of `make -k' +============================== + +Do not rely on the exit status of `make -k'. Some implementations +reflect whether they encountered an error in their exit status; other +implementations always succeed. + + $ cat Makefile + all: + false + $ make -k; echo exit status: $? # GNU make + false + make: *** [all] Error 1 + exit status: 2 + $ pmake -k; echo exit status: $? # BSD make + false + *** Error code 1 (continuing) + exit status: 0 + + +File: autoconf.info, Node: VPATH and Make, Next: Single Suffix Rules, Prev: make -k Status, Up: Portable Make + +12.18 `VPATH' and Make +====================== + +Posix does not specify the semantics of `VPATH'. Typically, `make' +supports `VPATH', but its implementation is not consistent. + + Autoconf and Automake support makefiles whose usages of `VPATH' are +portable to recent-enough popular implementations of `make', but to +keep the resulting makefiles portable, a package's makefile prototypes +must take the following issues into account. These issues are +complicated and are often poorly understood, and installers who use +`VPATH' should expect to find many bugs in this area. If you use +`VPATH', the simplest way to avoid these portability bugs is to stick +with GNU `make', since it is the most commonly-used `make' among +Autoconf users. + + Here are some known issues with some `VPATH' implementations. + +* Menu: + +* Variables listed in VPATH:: `VPATH' must be literal on ancient hosts +* VPATH and Double-colon:: Problems with `::' on ancient hosts +* $< in Explicit Rules:: `$<' does not work in ordinary rules +* Automatic Rule Rewriting:: `VPATH' goes wild on Solaris +* Tru64 Directory Magic:: `mkdir' goes wild on Tru64 +* Make Target Lookup:: More details about `VPATH' lookup + + +File: autoconf.info, Node: Variables listed in VPATH, Next: VPATH and Double-colon, Up: VPATH and Make + +12.18.1 Variables listed in `VPATH' +----------------------------------- + +Do not set `VPATH' to the value of another variable, for example `VPATH += $(srcdir)', because some ancient versions of `make' do not do +variable substitutions on the value of `VPATH'. For example, use this + + srcdir = @srcdir@ + VPATH = @srcdir@ + +rather than `VPATH = $(srcdir)'. Note that with GNU Automake, there is +no need to set this yourself. + + +File: autoconf.info, Node: VPATH and Double-colon, Next: $< in Explicit Rules, Prev: Variables listed in VPATH, Up: VPATH and Make + +12.18.2 `VPATH' and Double-colon Rules +-------------------------------------- + +With ancient versions of Sun `make', any assignment to `VPATH' causes +`make' to execute only the first set of double-colon rules. However, +this problem is no longer of practical concern. + + +File: autoconf.info, Node: $< in Explicit Rules, Next: Automatic Rule Rewriting, Prev: VPATH and Double-colon, Up: VPATH and Make + +12.18.3 `$<' Not Supported in Explicit Rules +-------------------------------------------- + +Using `$<' in explicit rules is not portable. The prerequisite file +must be named explicitly in the rule. If you want to find the +prerequisite via a `VPATH' search, you have to code the whole thing +manually. *Note Build Directories::. + + +File: autoconf.info, Node: Automatic Rule Rewriting, Next: Tru64 Directory Magic, Prev: $< in Explicit Rules, Up: VPATH and Make + +12.18.4 Automatic Rule Rewriting +-------------------------------- + +Some `make' implementations, such as Solaris and Tru64, search for +prerequisites in `VPATH' and then rewrite each occurrence as a plain +word in the rule. For instance: + + # This isn't portable to GNU make. + VPATH = ../pkg/src + f.c: if.c + cp if.c f.c + +executes `cp ../pkg/src/if.c f.c' if `if.c' is found in `../pkg/src'. + + However, this rule leads to real problems in practice. For example, +if the source directory contains an ordinary file named `test' that is +used in a dependency, Solaris `make' rewrites commands like `if test -r +foo; ...' to `if ../pkg/src/test -r foo; ...', which is typically +undesirable. In fact, `make' is completely unaware of shell syntax +used in the rules, so the VPATH rewrite can potentially apply to _any_ +whitespace-separated word in a rule, including shell variables, +functions, and keywords. + + $ mkdir build + $ cd build + $ cat > Makefile <<'END' + VPATH = .. + all: arg func for echo + func () { for arg in "$$@"; do echo $$arg; done; }; \ + func "hello world" + END + $ touch ../arg ../func ../for ../echo + $ make + ../func () { ../for ../arg in "$@"; do ../echo $arg; done; }; \ + ../func "hello world" + sh: syntax error at line 1: `do' unexpected + *** Error code 2 + +To avoid this problem, portable makefiles should never mention a source +file or dependency whose name is that of a shell keyword like `for' or +`until', a shell command like `cat' or `gcc' or `test', or a shell +function or variable used in the corresponding `Makefile' recipe. + + Because of these problems GNU `make' and many other `make' +implementations do not rewrite commands, so portable makefiles should +search `VPATH' manually. It is tempting to write this: + + # This isn't portable to Solaris make. + VPATH = ../pkg/src + f.c: if.c + cp `test -f if.c || echo $(VPATH)/`if.c f.c + +However, the "prerequisite rewriting" still applies here. So if `if.c' +is in `../pkg/src', Solaris and Tru64 `make' execute + + cp `test -f ../pkg/src/if.c || echo ../pkg/src/`if.c f.c + +which reduces to + + cp if.c f.c + +and thus fails. Oops. + + A simple workaround, and good practice anyway, is to use `$?' and +`$@' when possible: + + VPATH = ../pkg/src + f.c: if.c + cp $? $@ + +but this does not generalize well to commands with multiple +prerequisites. A more general workaround is to rewrite the rule so that +the prerequisite `if.c' never appears as a plain word. For example, +these three rules would be safe, assuming `if.c' is in `../pkg/src' and +the other files are in the working directory: + + VPATH = ../pkg/src + f.c: if.c f1.c + cat `test -f ./if.c || echo $(VPATH)/`if.c f1.c >$@ + g.c: if.c g1.c + cat `test -f 'if.c' || echo $(VPATH)/`if.c g1.c >$@ + h.c: if.c h1.c + cat `test -f "if.c" || echo $(VPATH)/`if.c h1.c >$@ + + Things get worse when your prerequisites are in a macro. + + VPATH = ../pkg/src + HEADERS = f.h g.h h.h + install-HEADERS: $(HEADERS) + for i in $(HEADERS); do \ + $(INSTALL) -m 644 \ + `test -f $$i || echo $(VPATH)/`$$i \ + $(DESTDIR)$(includedir)/$$i; \ + done + + The above `install-HEADERS' rule is not Solaris-proof because `for i +in $(HEADERS);' is expanded to `for i in f.h g.h h.h;' where `f.h' and +`g.h' are plain words and are hence subject to `VPATH' adjustments. + + If the three files are in `../pkg/src', the rule is run as: + + for i in ../pkg/src/f.h ../pkg/src/g.h h.h; do \ + install -m 644 \ + `test -f $i || echo ../pkg/src/`$i \ + /usr/local/include/$i; \ + done + + where the two first `install' calls fail. For instance, consider +the `f.h' installation: + + install -m 644 \ + `test -f ../pkg/src/f.h || \ + echo ../pkg/src/ \ + `../pkg/src/f.h \ + /usr/local/include/../pkg/src/f.h; + +It reduces to: + + install -m 644 \ + ../pkg/src/f.h \ + /usr/local/include/../pkg/src/f.h; + + Note that the manual `VPATH' search did not cause any problems here; +however this command installs `f.h' in an incorrect directory. + + Trying to quote `$(HEADERS)' in some way, as we did for `foo.c' a +few makefiles ago, does not help: + + install-HEADERS: $(HEADERS) + headers='$(HEADERS)'; \ + for i in $$headers; do \ + $(INSTALL) -m 644 \ + `test -f $$i || echo $(VPATH)/`$$i \ + $(DESTDIR)$(includedir)/$$i; \ + done + + Now, `headers='$(HEADERS)'' macro-expands to: + + headers='f.h g.h h.h' + +but `g.h' is still a plain word. (As an aside, the idiom +`headers='$(HEADERS)'; for i in $$headers;' is a good idea if +`$(HEADERS)' can be empty, because some shells diagnose a syntax error +on `for i in;'.) + + One workaround is to strip this unwanted `../pkg/src/' prefix +manually: + + VPATH = ../pkg/src + HEADERS = f.h g.h h.h + install-HEADERS: $(HEADERS) + headers='$(HEADERS)'; \ + for i in $$headers; do \ + i=`expr "$$i" : '$(VPATH)/\(.*\)'`; + $(INSTALL) -m 644 \ + `test -f $$i || echo $(VPATH)/`$$i \ + $(DESTDIR)$(includedir)/$$i; \ + done + + Automake does something similar. However the above hack works only +if the files listed in `HEADERS' are in the current directory or a +subdirectory; they should not be in an enclosing directory. If we had +`HEADERS = ../f.h', the above fragment would fail in a VPATH build with +Tru64 `make'. The reason is that not only does Tru64 `make' rewrite +dependencies, but it also simplifies them. Hence `../f.h' becomes +`../pkg/f.h' instead of `../pkg/src/../f.h'. This obviously defeats +any attempt to strip a leading `../pkg/src/' component. + + The following example makes the behavior of Tru64 `make' more +apparent. + + $ cat Makefile + VPATH = sub + all: ../foo + echo ../foo + $ ls + Makefile foo + $ make + echo foo + foo + +Dependency `../foo' was found in `sub/../foo', but Tru64 `make' +simplified it as `foo'. (Note that the `sub/' directory does not even +exist, this just means that the simplification occurred before the file +was checked for.) + + For the record here is how SunOS 4 `make' behaves on this example. + + $ make + make: Fatal error: Don't know how to make target `../foo' + $ mkdir sub + $ make + echo sub/../foo + sub/../foo + + +File: autoconf.info, Node: Tru64 Directory Magic, Next: Make Target Lookup, Prev: Automatic Rule Rewriting, Up: VPATH and Make + +12.18.5 Tru64 `make' Creates Prerequisite Directories Magically +--------------------------------------------------------------- + +When a prerequisite is a subdirectory of `VPATH', Tru64 `make' creates +it in the current directory. + + $ mkdir -p foo/bar build + $ cd build + $ cat >Makefile <<END + VPATH = .. + all: foo/bar + END + $ make + mkdir foo + mkdir foo/bar + + This can yield unexpected results if a rule uses a manual `VPATH' +search as presented before. + + VPATH = .. + all : foo/bar + command `test -d foo/bar || echo ../`foo/bar + + The above `command' is run on the empty `foo/bar' directory that was +created in the current directory. + + +File: autoconf.info, Node: Make Target Lookup, Prev: Tru64 Directory Magic, Up: VPATH and Make + +12.18.6 Make Target Lookup +-------------------------- + +GNU `make' uses a complex algorithm to decide when it should use files +found via a `VPATH' search. *Note How Directory Searches are +Performed: (make)Search Algorithm. + + If a target needs to be rebuilt, GNU `make' discards the file name +found during the `VPATH' search for this target, and builds the file +locally using the file name given in the makefile. If a target does +not need to be rebuilt, GNU `make' uses the file name found during the +`VPATH' search. + + Other `make' implementations, like NetBSD `make', are easier to +describe: the file name found during the `VPATH' search is used whether +the target needs to be rebuilt or not. Therefore new files are created +locally, but existing files are updated at their `VPATH' location. + + OpenBSD and FreeBSD `make', however, never perform a `VPATH' search +for a dependency that has an explicit rule. This is extremely annoying. + + When attempting a `VPATH' build for an autoconfiscated package +(e.g., `mkdir build && cd build && ../configure'), this means GNU +`make' builds everything locally in the `build' directory, while BSD +`make' builds new files locally and updates existing files in the +source directory. + + $ cat Makefile + VPATH = .. + all: foo.x bar.x + foo.x bar.x: newer.x + @echo Building $@ + $ touch ../bar.x + $ touch ../newer.x + $ make # GNU make + Building foo.x + Building bar.x + $ pmake # NetBSD make + Building foo.x + Building ../bar.x + $ fmake # FreeBSD make, OpenBSD make + Building foo.x + Building bar.x + $ tmake # Tru64 make + Building foo.x + Building bar.x + $ touch ../bar.x + $ make # GNU make + Building foo.x + $ pmake # NetBSD make + Building foo.x + $ fmake # FreeBSD make, OpenBSD make + Building foo.x + Building bar.x + $ tmake # Tru64 make + Building foo.x + Building bar.x + + Note how NetBSD `make' updates `../bar.x' in its VPATH location, and +how FreeBSD, OpenBSD, and Tru64 `make' always update `bar.x', even when +`../bar.x' is up to date. + + Another point worth mentioning is that once GNU `make' has decided +to ignore a `VPATH' file name (e.g., it ignored `../bar.x' in the above +example) it continues to ignore it when the target occurs as a +prerequisite of another rule. + + The following example shows that GNU `make' does not look up `bar.x' +in `VPATH' before performing the `.x.y' rule, because it ignored the +`VPATH' result of `bar.x' while running the `bar.x: newer.x' rule. + + $ cat Makefile + VPATH = .. + all: bar.y + bar.x: newer.x + @echo Building $@ + .SUFFIXES: .x .y + .x.y: + cp $< $@ + $ touch ../bar.x + $ touch ../newer.x + $ make # GNU make + Building bar.x + cp bar.x bar.y + cp: cannot stat `bar.x': No such file or directory + make: *** [bar.y] Error 1 + $ pmake # NetBSD make + Building ../bar.x + cp ../bar.x bar.y + $ rm bar.y + $ fmake # FreeBSD make, OpenBSD make + echo Building bar.x + cp bar.x bar.y + cp: cannot stat `bar.x': No such file or directory + *** Error code 1 + $ tmake # Tru64 make + Building bar.x + cp: bar.x: No such file or directory + *** Exit 1 + + Note that if you drop away the command from the `bar.x: newer.x' +rule, GNU `make' magically starts to work: it knows that `bar.x' hasn't +been updated, therefore it doesn't discard the result from `VPATH' +(`../bar.x') in succeeding uses. Tru64 also works, but FreeBSD and +OpenBSD still don't. + + $ cat Makefile + VPATH = .. + all: bar.y + bar.x: newer.x + .SUFFIXES: .x .y + .x.y: + cp $< $@ + $ touch ../bar.x + $ touch ../newer.x + $ make # GNU make + cp ../bar.x bar.y + $ rm bar.y + $ pmake # NetBSD make + cp ../bar.x bar.y + $ rm bar.y + $ fmake # FreeBSD make, OpenBSD make + cp bar.x bar.y + cp: cannot stat `bar.x': No such file or directory + *** Error code 1 + $ tmake # Tru64 make + cp ../bar.x bar.y + + It seems the sole solution that would please every `make' +implementation is to never rely on `VPATH' searches for targets. In +other words, `VPATH' should be reserved to unbuilt sources. + + +File: autoconf.info, Node: Single Suffix Rules, Next: Timestamps and Make, Prev: VPATH and Make, Up: Portable Make + +12.19 Single Suffix Rules and Separated Dependencies +==================================================== + +A "Single Suffix Rule" is basically a usual suffix (inference) rule +(`.from.to:'), but which _destination_ suffix is empty (`.from:'). + + "Separated dependencies" simply refers to listing the prerequisite +of a target, without defining a rule. Usually one can list on the one +hand side, the rules, and on the other hand side, the dependencies. + + Solaris `make' does not support separated dependencies for targets +defined by single suffix rules: + + $ cat Makefile + .SUFFIXES: .in + foo: foo.in + .in: + cp $< $@ + $ touch foo.in + $ make + $ ls + Makefile foo.in + +while GNU Make does: + + $ gmake + cp foo.in foo + $ ls + Makefile foo foo.in + + Note it works without the `foo: foo.in' dependency. + + $ cat Makefile + .SUFFIXES: .in + .in: + cp $< $@ + $ make foo + cp foo.in foo + +and it works with double suffix inference rules: + + $ cat Makefile + foo.out: foo.in + .SUFFIXES: .in .out + .in.out: + cp $< $@ + $ make + cp foo.in foo.out + + As a result, in such a case, you have to write target rules. + + +File: autoconf.info, Node: Timestamps and Make, Prev: Single Suffix Rules, Up: Portable Make + +12.20 Timestamp Resolution and Make +=================================== + +Traditionally, file timestamps had 1-second resolution, and `make' used +those timestamps to determine whether one file was newer than the +other. However, many modern file systems have timestamps with +1-nanosecond resolution. Some `make' implementations look at the +entire timestamp; others ignore the fractional part, which can lead to +incorrect results. Normally this is not a problem, but in some extreme +cases you may need to use tricks like `sleep 1' to work around +timestamp truncation bugs. + + Commands like `cp -p' and `touch -r' typically do not copy file +timestamps to their full resolutions (*note Limitations of Usual Tools: +touch.). Hence you should be wary of rules like this: + + dest: src + cp -p src dest + + as `dest' often appears to be older than `src' after the timestamp +is truncated, and this can cause `make' to do needless rework the next +time it is invoked. To work around this problem, you can use a +timestamp file, e.g.: + + dest-stamp: src + cp -p src dest + date >dest-stamp + + Apart from timestamp resolution, there are also differences in +handling equal timestamps. HP-UX `make' updates targets if it has the +same time stamp as one of its prerequisites, in violation of Posix +rules. + + This can cause spurious rebuilds for repeated runs of `make'. This +in turn can cause `make' to fail if it tries to rebuild generated files +in a possibly read-only source tree with tools not present on the +end-user machine. Use GNU `make' instead. + + +File: autoconf.info, Node: Portable C and C++, Next: Manual Configuration, Prev: Portable Make, Up: Top + +13 Portable C and C++ Programming +********************************* + +C and C++ programs often use low-level features of the underlying +system, and therefore are often more difficult to make portable to other +platforms. + + Several standards have been developed to help make your programs more +portable. If you write programs with these standards in mind, you can +have greater confidence that your programs work on a wide variety of +systems. *Note Language Standards Supported by GCC: (gcc)Standards, +for a list of C-related standards. Many programs also assume the Posix +standard (http://www.opengroup.org/susv3). + + Some old code is written to be portable to K&R C, which predates any +C standard. K&R C compilers are no longer of practical interest, +though, and the rest of section assumes at least C89, the first C +standard. + + Program portability is a huge topic, and this section can only +briefly introduce common pitfalls. *Note Portability between System +Types: (standards)System Portability, for more information. + +* Menu: + +* Varieties of Unportability:: How to make your programs unportable +* Integer Overflow:: When integers get too large +* Preprocessor Arithmetic:: `#if' expression problems +* Null Pointers:: Properties of null pointers +* Buffer Overruns:: Subscript errors and the like +* Volatile Objects:: `volatile' and signals +* Floating Point Portability:: Portable floating-point arithmetic +* Exiting Portably:: Exiting and the exit status + + +File: autoconf.info, Node: Varieties of Unportability, Next: Integer Overflow, Up: Portable C and C++ + +13.1 Varieties of Unportability +=============================== + +Autoconf tests and ordinary programs often need to test what is allowed +on a system, and therefore they may need to deliberately exceed the +boundaries of what the standards allow, if only to see whether an +optional feature is present. When you write such a program, you should +keep in mind the difference between constraints, unspecified behavior, +and undefined behavior. + + In C, a "constraint" is a rule that the compiler must enforce. An +example constraint is that C programs must not declare a bit-field with +negative width. Tests can therefore reliably assume that programs with +negative-width bit-fields are rejected by a compiler that conforms to +the standard. + + "Unspecified behavior" is valid behavior, where the standard allows +multiple possibilities. For example, the order of evaluation of +function arguments is unspecified. Some unspecified behavior is +"implementation-defined", i.e., documented by the implementation, but +since Autoconf tests cannot read the documentation they cannot +distinguish between implementation-defined and other unspecified +behavior. It is common for Autoconf tests to probe implementations to +determine otherwise-unspecified behavior. + + "Undefined behavior" is invalid behavior, where the standard allows +the implementation to do anything it pleases. For example, +dereferencing a null pointer leads to undefined behavior. If possible, +test programs should avoid undefined behavior, since a program with +undefined behavior might succeed on a test that should fail. + + The above rules apply to programs that are intended to conform to the +standard. However, strictly-conforming programs are quite rare, since +the standards are so limiting. A major goal of Autoconf is to support +programs that use implementation features not described by the standard, +and it is fairly common for test programs to violate the above rules, if +the programs work well enough in practice. + + +File: autoconf.info, Node: Integer Overflow, Next: Preprocessor Arithmetic, Prev: Varieties of Unportability, Up: Portable C and C++ + +13.2 Integer Overflow +===================== + +In practice many portable C programs assume that signed integer +overflow wraps around reliably using two's complement arithmetic. Yet +the C standard says that program behavior is undefined on overflow, and +in a few cases C programs do not work on some modern implementations +because their overflows do not wrap around as their authors expected. +Conversely, in signed integer remainder, the C standard requires +overflow behavior that is commonly not implemented. + +* Menu: + +* Integer Overflow Basics:: Why integer overflow is a problem +* Signed Overflow Examples:: Examples of code assuming wraparound +* Optimization and Wraparound:: Optimizations that break uses of wraparound +* Signed Overflow Advice:: Practical advice for signed overflow issues +* Signed Integer Division:: `INT_MIN / -1' and `INT_MIN % -1' + + +File: autoconf.info, Node: Integer Overflow Basics, Next: Signed Overflow Examples, Up: Integer Overflow + +13.2.1 Basics of Integer Overflow +--------------------------------- + +In languages like C, unsigned integer overflow reliably wraps around; +e.g., `UINT_MAX + 1' yields zero. This is guaranteed by the C standard +and is portable in practice, unless you specify aggressive, nonstandard +optimization options suitable only for special applications. + + In contrast, the C standard says that signed integer overflow leads +to undefined behavior where a program can do anything, including dumping +core or overrunning a buffer. The misbehavior can even precede the +overflow. Such an overflow can occur during addition, subtraction, +multiplication, division, and left shift. + + Despite this requirement of the standard, many C programs and +Autoconf tests assume that signed integer overflow silently wraps +around modulo a power of two, using two's complement arithmetic, so +long as you cast the resulting value to a signed integer type or store +it into a signed integer variable. If you use conservative +optimization flags, such programs are generally portable to the vast +majority of modern platforms, with a few exceptions discussed later. + + For historical reasons the C standard also allows implementations +with ones' complement or signed magnitude arithmetic, but it is safe to +assume two's complement nowadays. + + Also, overflow can occur when converting an out-of-range value to a +signed integer type. Here a standard implementation must define what +happens, but this might include raising an exception. In practice all +known implementations support silent wraparound in this case, so you +need not worry about other possibilities. + + +File: autoconf.info, Node: Signed Overflow Examples, Next: Optimization and Wraparound, Prev: Integer Overflow Basics, Up: Integer Overflow + +13.2.2 Examples of Code Assuming Wraparound Overflow +---------------------------------------------------- + +There has long been a tension between what the C standard requires for +signed integer overflow, and what C programs commonly assume. The +standard allows aggressive optimizations based on assumptions that +overflow never occurs, but many practical C programs rely on overflow +wrapping around. These programs do not conform to the standard, but +they commonly work in practice because compiler writers are +understandably reluctant to implement optimizations that would break +many programs, unless perhaps a user specifies aggressive optimization. + + The C Standard says that if a program has signed integer overflow its +behavior is undefined, and the undefined behavior can even precede the +overflow. To take an extreme example: + + if (password == expected_password) + allow_superuser_privileges (); + else if (counter++ == INT_MAX) + abort (); + else + printf ("%d password mismatches\n", counter); + +If the `int' variable `counter' equals `INT_MAX', `counter++' must +overflow and the behavior is undefined, so the C standard allows the +compiler to optimize away the test against `INT_MAX' and the `abort' +call. Worse, if an earlier bug in the program lets the compiler deduce +that `counter == INT_MAX' or that `counter' previously overflowed, the +C standard allows the compiler to optimize away the password test and +generate code that allows superuser privileges unconditionally. + + Despite this requirement by the standard, it has long been common +for C code to assume wraparound arithmetic after signed overflow, and +all known practical C implementations support some C idioms that assume +wraparound signed arithmetic, even if the idioms do not conform +strictly to the standard. If your code looks like the following +examples it will almost surely work with real-world compilers. + + Here is an example derived from the 7th Edition Unix implementation +of `atoi' (1979-01-10): + + char *p; + int f, n; + ... + while (*p >= '0' && *p <= '9') + n = n * 10 + *p++ - '0'; + return (f ? -n : n); + +Even if the input string is in range, on most modern machines this has +signed overflow when computing the most negative integer (the `-n' +overflows) or a value near an extreme integer (the first `+' overflows). + + Here is another example, derived from the 7th Edition implementation +of `rand' (1979-01-10). Here the programmer expects both +multiplication and addition to wrap on overflow: + + static long int randx = 1; + ... + randx = randx * 1103515245 + 12345; + return (randx >> 16) & 077777; + + In the following example, derived from the GNU C Library 2.5 +implementation of `mktime' (2006-09-09), the code assumes wraparound +arithmetic in `+' to detect signed overflow: + + time_t t, t1, t2; + int sec_requested, sec_adjustment; + ... + t1 = t + sec_requested; + t2 = t1 + sec_adjustment; + if (((t1 < t) != (sec_requested < 0)) + | ((t2 < t1) != (sec_adjustment < 0))) + return -1; + + If your code looks like these examples, it is probably safe even +though it does not strictly conform to the C standard. This might lead +one to believe that one can generally assume wraparound on overflow, +but that is not always true, as can be seen in the next section. + + +File: autoconf.info, Node: Optimization and Wraparound, Next: Signed Overflow Advice, Prev: Signed Overflow Examples, Up: Integer Overflow + +13.2.3 Optimizations That Break Wraparound Arithmetic +----------------------------------------------------- + +Compilers sometimes generate code that is incompatible with wraparound +integer arithmetic. A simple example is an algebraic simplification: a +compiler might translate `(i * 2000) / 1000' to `i * 2' because it +assumes that `i * 2000' does not overflow. The translation is not +equivalent to the original when overflow occurs: e.g., in the typical +case of 32-bit signed two's complement wraparound `int', if `i' has +type `int' and value `1073742', the original expression returns +-2147483 but the optimized version returns the mathematically correct +value 2147484. + + More subtly, loop induction optimizations often exploit the undefined +behavior of signed overflow. Consider the following contrived function +`sumc': + + int + sumc (int lo, int hi) + { + int sum = 0; + int i; + for (i = lo; i <= hi; i++) + sum ^= i * 53; + return sum; + } + +To avoid multiplying by 53 each time through the loop, an optimizing +compiler might internally transform `sumc' to the equivalent of the +following: + + int + transformed_sumc (int lo, int hi) + { + int sum = 0; + int hic = hi * 53; + int ic; + for (ic = lo * 53; ic <= hic; ic += 53) + sum ^= ic; + return sum; + } + +This transformation is allowed by the C standard, but it is invalid for +wraparound arithmetic when `INT_MAX / 53 < hi', because then the +overflow in computing expressions like `hi * 53' can cause the +expression `i <= hi' to yield a different value from the transformed +expression `ic <= hic'. + + For this reason, compilers that use loop induction and similar +techniques often do not support reliable wraparound arithmetic when a +loop induction variable like `ic' is involved. Since loop induction +variables are generated by the compiler, and are not visible in the +source code, it is not always trivial to say whether the problem +affects your code. + + Hardly any code actually depends on wraparound arithmetic in cases +like these, so in practice these loop induction optimizations are almost +always useful. However, edge cases in this area can cause problems. +For example: + + int j; + for (j = 1; 0 < j; j *= 2) + test (j); + +Here, the loop attempts to iterate through all powers of 2 that `int' +can represent, but the C standard allows a compiler to optimize away +the comparison and generate an infinite loop, under the argument that +behavior is undefined on overflow. As of this writing this +optimization is not done by any production version of GCC with `-O2', +but it might be performed by other compilers, or by more aggressive GCC +optimization options, and the GCC developers have not decided whether +it will continue to work with GCC and `-O2'. + + +File: autoconf.info, Node: Signed Overflow Advice, Next: Signed Integer Division, Prev: Optimization and Wraparound, Up: Integer Overflow + +13.2.4 Practical Advice for Signed Overflow Issues +-------------------------------------------------- + +Ideally the safest approach is to avoid signed integer overflow +entirely. For example, instead of multiplying two signed integers, you +can convert them to unsigned integers, multiply the unsigned values, +then test whether the result is in signed range. + + Rewriting code in this way will be inconvenient, though, +particularly if the signed values might be negative. Also, it may hurt +performance. Using unsigned arithmetic to check for overflow is +particularly painful to do portably and efficiently when dealing with an +integer type like `uid_t' whose width and signedness vary from platform +to platform. + + Furthermore, many C applications pervasively assume wraparound +behavior and typically it is not easy to find and remove all these +assumptions. Hence it is often useful to maintain nonstandard code +that assumes wraparound on overflow, instead of rewriting the code. +The rest of this section attempts to give practical advice for this +situation. + + If your code wants to detect signed integer overflow in `sum = a + +b', it is generally safe to use an expression like `(sum < a) != (b < +0)'. + + If your code uses a signed loop index, make sure that the index +cannot overflow, along with all signed expressions derived from the +index. Here is a contrived example of problematic code with two +instances of overflow. + + for (i = INT_MAX - 10; i <= INT_MAX; i++) + if (i + 1 < 0) + { + report_overflow (); + break; + } + +Because of the two overflows, a compiler might optimize away or +transform the two comparisons in a way that is incompatible with the +wraparound assumption. + + If your code uses an expression like `(i * 2000) / 1000' and you +actually want the multiplication to wrap around on overflow, use +unsigned arithmetic to do it, e.g., `((int) (i * 2000u)) / 1000'. + + If your code assumes wraparound behavior and you want to insulate it +against any GCC optimizations that would fail to support that behavior, +you should use GCC's `-fwrapv' option, which causes signed overflow to +wrap around reliably (except for division and remainder, as discussed +in the next section). + + If you need to port to platforms where signed integer overflow does +not reliably wrap around (e.g., due to hardware overflow checking, or to +highly aggressive optimizations), you should consider debugging with +GCC's `-ftrapv' option, which causes signed overflow to raise an +exception. + + +File: autoconf.info, Node: Signed Integer Division, Prev: Signed Overflow Advice, Up: Integer Overflow + +13.2.5 Signed Integer Division and Integer Overflow +--------------------------------------------------- + +Overflow in signed integer division is not always harmless: for +example, on CPUs of the i386 family, dividing `INT_MIN' by `-1' yields +a SIGFPE signal which by default terminates the program. Worse, taking +the remainder of these two values typically yields the same signal on +these CPUs, even though the C standard requires `INT_MIN % -1' to yield +zero because the expression does not overflow. + + +File: autoconf.info, Node: Preprocessor Arithmetic, Next: Null Pointers, Prev: Integer Overflow, Up: Portable C and C++ + +13.3 Preprocessor Arithmetic +============================ + +In C99, preprocessor arithmetic, used for `#if' expressions, must be +evaluated as if all signed values are of type `intmax_t' and all +unsigned values of type `uintmax_t'. Many compilers are buggy in this +area, though. For example, as of 2007, Sun C mishandles `#if LLONG_MIN +< 0' on a platform with 32-bit `long int' and 64-bit `long long int'. +Also, some older preprocessors mishandle constants ending in `LL'. To +work around these problems, you can compute the value of expressions +like `LONG_MAX < LLONG_MAX' at `configure'-time rather than at +`#if'-time. + + +File: autoconf.info, Node: Null Pointers, Next: Buffer Overruns, Prev: Preprocessor Arithmetic, Up: Portable C and C++ + +13.4 Properties of Null Pointers +================================ + +Most modern hosts reliably fail when you attempt to dereference a null +pointer. + + On almost all modern hosts, null pointers use an all-bits-zero +internal representation, so you can reliably use `memset' with 0 to set +all the pointers in an array to null values. + + If `p' is a null pointer to an object type, the C expression `p + 0' +always evaluates to `p' on modern hosts, even though the standard says +that it has undefined behavior. + + +File: autoconf.info, Node: Buffer Overruns, Next: Volatile Objects, Prev: Null Pointers, Up: Portable C and C++ + +13.5 Buffer Overruns and Subscript Errors +========================================= + +Buffer overruns and subscript errors are the most common dangerous +errors in C programs. They result in undefined behavior because storing +outside an array typically modifies storage that is used by some other +object, and most modern systems lack runtime checks to catch these +errors. Programs should not rely on buffer overruns being caught. + + There is one exception to the usual rule that a portable program +cannot address outside an array. In C, it is valid to compute the +address just past an object, e.g., `&a[N]' where `a' has `N' elements, +so long as you do not dereference the resulting pointer. But it is not +valid to compute the address just before an object, e.g., `&a[-1]'; nor +is it valid to compute two past the end, e.g., `&a[N+1]'. On most +platforms `&a[-1] < &a[0] && &a[N] < &a[N+1]', but this is not reliable +in general, and it is usually easy enough to avoid the potential +portability problem, e.g., by allocating an extra unused array element +at the start or end. + + Valgrind (http://valgrind.org/) can catch many overruns. GCC users +might also consider using the `-fmudflap' option to catch overruns. + + Buffer overruns are usually caused by off-by-one errors, but there +are more subtle ways to get them. + + Using `int' values to index into an array or compute array sizes +causes problems on typical 64-bit hosts where an array index might be +2^31 or larger. Index values of type `size_t' avoid this problem, but +cannot be negative. Index values of type `ptrdiff_t' are signed, and +are wide enough in practice. + + If you add or multiply two numbers to calculate an array size, e.g., +`malloc (x * sizeof y + z)', havoc ensues if the addition or +multiplication overflows. + + Many implementations of the `alloca' function silently misbehave and +can generate buffer overflows if given sizes that are too large. The +size limits are implementation dependent, but are at least 4000 bytes +on all platforms that we know about. + + The standard functions `asctime', `asctime_r', `ctime', `ctime_r', +and `gets' are prone to buffer overflows, and portable code should not +use them unless the inputs are known to be within certain limits. The +time-related functions can overflow their buffers if given timestamps +out of range (e.g., a year less than -999 or greater than 9999). +Time-related buffer overflows cannot happen with recent-enough versions +of the GNU C library, but are possible with other implementations. The +`gets' function is the worst, since it almost invariably overflows its +buffer when presented with an input line larger than the buffer. + + +File: autoconf.info, Node: Volatile Objects, Next: Floating Point Portability, Prev: Buffer Overruns, Up: Portable C and C++ + +13.6 Volatile Objects +===================== + +The keyword `volatile' is often misunderstood in portable code. Its +use inhibits some memory-access optimizations, but programmers often +wish that it had a different meaning than it actually does. + + `volatile' was designed for code that accesses special objects like +memory-mapped device registers whose contents spontaneously change. +Such code is inherently low-level, and it is difficult to specify +portably what `volatile' means in these cases. The C standard says, +"What constitutes an access to an object that has volatile-qualified +type is implementation-defined," so in theory each implementation is +supposed to fill in the gap by documenting what `volatile' means for +that implementation. In practice, though, this documentation is +usually absent or incomplete. + + One area of confusion is the distinction between objects defined with +volatile types, and volatile lvalues. From the C standard's point of +view, an object defined with a volatile type has externally visible +behavior. You can think of such objects as having little oscilloscope +probes attached to them, so that the user can observe some properties of +accesses to them, just as the user can observe data written to output +files. However, the standard does not make it clear whether users can +observe accesses by volatile lvalues to ordinary objects. For example: + + /* Declare and access a volatile object. + Accesses to X are "visible" to users. */ + static int volatile x; + x = 1; + + /* Access two ordinary objects via a volatile lvalue. + It's not clear whether accesses to *P are "visible". */ + int y; + int *z = malloc (sizeof (int)); + int volatile *p; + p = &y; + *p = 1; + p = z; + *p = 1; + + Programmers often wish that `volatile' meant "Perform the memory +access here and now, without merging several memory accesses, without +changing the memory word size, and without reordering." But the C +standard does not require this. For objects defined with a volatile +type, accesses must be done before the next sequence point; but +otherwise merging, reordering, and word-size change is allowed. Worse, +it is not clear from the standard whether volatile lvalues provide more +guarantees in general than nonvolatile lvalues, if the underlying +objects are ordinary. + + Even when accessing objects defined with a volatile type, the C +standard allows only extremely limited signal handlers: the behavior is +undefined if a signal handler reads any nonlocal object, or writes to +any nonlocal object whose type is not `sig_atomic_t volatile', or calls +any standard library function other than `abort', `signal', and (if C99) +`_Exit'. Hence C compilers need not worry about a signal handler +disturbing ordinary computation, unless the computation accesses a +`sig_atomic_t volatile' lvalue that is not a local variable. (There is +an obscure exception for accesses via a pointer to a volatile +character, since it may point into part of a `sig_atomic_t volatile' +object.) Posix adds to the list of library functions callable from a +portable signal handler, but otherwise is like the C standard in this +area. + + Some C implementations allow memory-access optimizations within each +translation unit, such that actual behavior agrees with the behavior +required by the standard only when calling a function in some other +translation unit, and a signal handler acts like it was called from a +different translation unit. The C standard hints that in these +implementations, objects referred to by signal handlers "would require +explicit specification of `volatile' storage, as well as other +implementation-defined restrictions." But unfortunately even for this +special case these other restrictions are often not documented well. +*Note When is a Volatile Object Accessed?: (gcc)Volatiles, for some +restrictions imposed by GCC. *Note Defining Signal Handlers: +(libc)Defining Handlers, for some restrictions imposed by the GNU C +library. Restrictions differ on other platforms. + + If possible, it is best to use a signal handler that fits within the +limits imposed by the C and Posix standards. + + If this is not practical, you can try the following rules of thumb. +A signal handler should access only volatile lvalues, preferably lvalues +that refer to objects defined with a volatile type, and should not +assume that the accessed objects have an internally consistent state if +they are larger than a machine word. Furthermore, installers should +employ compilers and compiler options that are commonly used for +building operating system kernels, because kernels often need more from +`volatile' than the C Standard requires, and installers who compile an +application in a similar environment can sometimes benefit from the +extra constraints imposed by kernels on compilers. Admittedly we are +handwaving somewhat here, as there are few guarantees in this area; the +rules of thumb may help to fix some bugs but there is a good chance +that they will not fix them all. + + For `volatile', C++ has the same problems that C does. +Multithreaded applications have even more problems with `volatile', but +they are beyond the scope of this section. + + The bottom line is that using `volatile' typically hurts performance +but should not hurt correctness. In some cases its use does help +correctness, but these cases are often so poorly understood that all +too often adding `volatile' to a data structure merely alleviates some +symptoms of a bug while not fixing the bug in general. + + +File: autoconf.info, Node: Floating Point Portability, Next: Exiting Portably, Prev: Volatile Objects, Up: Portable C and C++ + +13.7 Floating Point Portability +=============================== + +Almost all modern systems use IEEE-754 floating point, and it is safe to +assume IEEE-754 in most portable code these days. For more information, +please see David Goldberg's classic paper What Every Computer Scientist +Should Know About Floating-Point Arithmetic +(http://www.validlab.com/goldberg/paper.pdf). + + +File: autoconf.info, Node: Exiting Portably, Prev: Floating Point Portability, Up: Portable C and C++ + +13.8 Exiting Portably +===================== + +A C or C++ program can exit with status N by returning N from the +`main' function. Portable programs are supposed to exit either with +status 0 or `EXIT_SUCCESS' to succeed, or with status `EXIT_FAILURE' to +fail, but in practice it is portable to fail by exiting with status 1, +and test programs that assume Posix can fail by exiting with status +values from 1 through 255. Programs on SunOS 2.0 (1985) through 3.5.2 +(1988) incorrectly exited with zero status when `main' returned +nonzero, but ancient systems like these are no longer of practical +concern. + + A program can also exit with status N by passing N to the `exit' +function, and a program can fail by calling the `abort' function. If a +program is specialized to just some platforms, it can fail by calling +functions specific to those platforms, e.g., `_exit' (Posix) and +`_Exit' (C99). However, like other functions, an exit function should +be declared, typically by including a header. For example, if a C +program calls `exit', it should include `stdlib.h' either directly or +via the default includes (*note Default Includes::). + + A program can fail due to undefined behavior such as dereferencing a +null pointer, but this is not recommended as undefined behavior allows +an implementation to do whatever it pleases and this includes exiting +successfully. + + +File: autoconf.info, Node: Manual Configuration, Next: Site Configuration, Prev: Portable C and C++, Up: Top + +14 Manual Configuration +*********************** + +A few kinds of features can't be guessed automatically by running test +programs. For example, the details of the object-file format, or +special options that need to be passed to the compiler or linker. You +can check for such features using ad-hoc means, such as having +`configure' check the output of the `uname' program, or looking for +libraries that are unique to particular systems. However, Autoconf +provides a uniform method for handling unguessable features. + +* Menu: + +* Specifying Target Triplets:: Specifying target triplets +* Canonicalizing:: Getting the canonical system type +* Using System Type:: What to do with the system type + + +File: autoconf.info, Node: Specifying Target Triplets, Next: Canonicalizing, Up: Manual Configuration + +14.1 Specifying target triplets +=============================== + +Autoconf-generated `configure' scripts can make decisions based on a +canonical name for the system type, or "target triplet", which has the +form: `CPU-VENDOR-OS', where OS can be `SYSTEM' or `KERNEL-SYSTEM' + + `configure' can usually guess the canonical name for the type of +system it's running on. To do so it runs a script called +`config.guess', which infers the name using the `uname' command or +symbols predefined by the C preprocessor. + + Alternately, the user can specify the system type with command line +arguments to `configure' (*note System Type::. Doing so is necessary +when cross-compiling. In the most complex case of cross-compiling, +three system types are involved. The options to specify them are: + +`--build=BUILD-TYPE' + the type of system on which the package is being configured and + compiled. It defaults to the result of running `config.guess'. + Specifying a BUILD-TYPE that differs from HOST-TYPE enables + cross-compilation mode. + +`--host=HOST-TYPE' + the type of system on which the package runs. By default it is the + same as the build machine. Specifying a HOST-TYPE that differs + from BUILD-TYPE, when BUILD-TYPE was also explicitly specified, + enables cross-compilation mode. + +`--target=TARGET-TYPE' + the type of system for which any compiler tools in the package + produce code (rarely needed). By default, it is the same as host. + + If you mean to override the result of `config.guess', use `--build', +not `--host', since the latter enables cross-compilation. For +historical reasons, whenever you specify `--host', be sure to specify +`--build' too; this will be fixed in the future. So, to enter +cross-compilation mode, use a command like this + + ./configure --build=i686-pc-linux-gnu --host=m68k-coff + +Note that if you do not specify `--host', `configure' fails if it can't +run the code generated by the specified compiler. For example, +configuring as follows fails: + + ./configure CC=m68k-coff-gcc + + When cross-compiling, `configure' will warn about any tools +(compilers, linkers, assemblers) whose name is not prefixed with the +host type. This is an aid to users performing cross-compilation. +Continuing the example above, if a cross-compiler named `cc' is used +with a native `pkg-config', then libraries found by `pkg-config' will +likely cause subtle build failures; but using the names `m68k-coff-cc' +and `m68k-coff-pkg-config' avoids any confusion. Avoiding the warning +is as simple as creating the correct symlinks naming the cross tools. + + `configure' recognizes short aliases for many system types; for +example, `decstation' can be used instead of `mips-dec-ultrix4.2'. +`configure' runs a script called `config.sub' to canonicalize system +type aliases. + + This section deliberately omits the description of the obsolete +interface; see *note Hosts and Cross-Compilation::. + + +File: autoconf.info, Node: Canonicalizing, Next: Using System Type, Prev: Specifying Target Triplets, Up: Manual Configuration + +14.2 Getting the Canonical System Type +====================================== + +The following macros make the system type available to `configure' +scripts. + + The variables `build_alias', `host_alias', and `target_alias' are +always exactly the arguments of `--build', `--host', and `--target'; in +particular, they are left empty if the user did not use them, even if +the corresponding `AC_CANONICAL' macro was run. Any configure script +may use these variables anywhere. These are the variables that should +be used when in interaction with the user. + + If you need to recognize some special environments based on their +system type, run the following macros to get canonical system names. +These variables are not set before the macro call. + + If you use these macros, you must distribute `config.guess' and +`config.sub' along with your source code. *Note Output::, for +information about the `AC_CONFIG_AUX_DIR' macro which you can use to +control in which directory `configure' looks for those scripts. + + -- Macro: AC_CANONICAL_BUILD + Compute the canonical build-system type variable, `build', and its + three individual parts `build_cpu', `build_vendor', and `build_os'. + + If `--build' was specified, then `build' is the canonicalization + of `build_alias' by `config.sub', otherwise it is determined by + the shell script `config.guess'. + + -- Macro: AC_CANONICAL_HOST + Compute the canonical host-system type variable, `host', and its + three individual parts `host_cpu', `host_vendor', and `host_os'. + + If `--host' was specified, then `host' is the canonicalization of + `host_alias' by `config.sub', otherwise it defaults to `build'. + + -- Macro: AC_CANONICAL_TARGET + Compute the canonical target-system type variable, `target', and + its three individual parts `target_cpu', `target_vendor', and + `target_os'. + + If `--target' was specified, then `target' is the canonicalization + of `target_alias' by `config.sub', otherwise it defaults to `host'. + + Note that there can be artifacts due to the backward compatibility +code. *Note Hosts and Cross-Compilation::, for more. + + +File: autoconf.info, Node: Using System Type, Prev: Canonicalizing, Up: Manual Configuration + +14.3 Using the System Type +========================== + +In `configure.ac' the system type is generally used by one or more +`case' statements to select system-specifics. Shell wildcards can be +used to match a group of system types. + + For example, an extra assembler code object file could be chosen, +giving access to a CPU cycle counter register. `$(CYCLE_OBJ)' in the +following would be used in a makefile to add the object to a program or +library. + + AS_CASE([$host], + [alpha*-*-*], [CYCLE_OBJ=rpcc.o], + [i?86-*-*], [CYCLE_OBJ=rdtsc.o], + [CYCLE_OBJ=""] + ) + AC_SUBST([CYCLE_OBJ]) + + `AC_CONFIG_LINKS' (*note Configuration Links::) is another good way +to select variant source files, for example optimized code for some +CPUs. The configured CPU type doesn't always indicate exact CPU types, +so some runtime capability checks may be necessary too. + + case $host in + alpha*-*-*) AC_CONFIG_LINKS([dither.c:alpha/dither.c]) ;; + powerpc*-*-*) AC_CONFIG_LINKS([dither.c:powerpc/dither.c]) ;; + *-*-*) AC_CONFIG_LINKS([dither.c:generic/dither.c]) ;; + esac + + The host system type can also be used to find cross-compilation tools +with `AC_CHECK_TOOL' (*note Generic Programs::). + + The above examples all show `$host', since this is where the code is +going to run. Only rarely is it necessary to test `$build' (which is +where the build is being done). + + Whenever you're tempted to use `$host' it's worth considering +whether some sort of probe would be better. New system types come along +periodically or previously missing features are added. Well-written +probes can adapt themselves to such things, but hard-coded lists of +names can't. Here are some guidelines, + + * Availability of libraries and library functions should always be + checked by probing. + + * Variant behavior of system calls is best identified with runtime + tests if possible, but bug workarounds or obscure difficulties + might have to be driven from `$host'. + + * Assembler code is inevitably highly CPU-specific and is best + selected according to `$host_cpu'. + + * Assembler variations like underscore prefix on globals or ELF + versus COFF type directives are however best determined by + probing, perhaps even examining the compiler output. + + `$target' is for use by a package creating a compiler or similar. +For ordinary packages it's meaningless and should not be used. It +indicates what the created compiler should generate code for, if it can +cross-compile. `$target' generally selects various hard-coded CPU and +system conventions, since usually the compiler or tools under +construction themselves determine how the target works. + + +File: autoconf.info, Node: Site Configuration, Next: Running configure Scripts, Prev: Manual Configuration, Up: Top + +15 Site Configuration +********************* + +`configure' scripts support several kinds of local configuration +decisions. There are ways for users to specify where external software +packages are, include or exclude optional features, install programs +under modified names, and set default values for `configure' options. + +* Menu: + +* Help Formatting:: Customizing `configure --help' +* External Software:: Working with other optional software +* Package Options:: Selecting optional features +* Pretty Help Strings:: Formatting help string +* Option Checking:: Controlling checking of `configure' options +* Site Details:: Configuring site details +* Transforming Names:: Changing program names when installing +* Site Defaults:: Giving `configure' local defaults + + +File: autoconf.info, Node: Help Formatting, Next: External Software, Up: Site Configuration + +15.1 Controlling Help Output +============================ + +Users consult `configure --help' to learn of configuration decisions +specific to your package. By default, `configure' breaks this output +into sections for each type of option; within each section, help +strings appear in the order `configure.ac' defines them: + + Optional Features: + ... + --enable-bar include bar + + Optional Packages: + ... + --with-foo use foo + + -- Macro: AC_PRESERVE_HELP_ORDER + Request an alternate `--help' format, in which options of all + types appear together, in the order defined. Call this macro + before any `AC_ARG_ENABLE' or `AC_ARG_WITH'. + + Optional Features and Packages: + ... + --enable-bar include bar + --with-foo use foo + + + +File: autoconf.info, Node: External Software, Next: Package Options, Prev: Help Formatting, Up: Site Configuration + +15.2 Working With External Software +=================================== + +Some packages require, or can optionally use, other software packages +that are already installed. The user can give `configure' command line +options to specify which such external software to use. The options +have one of these forms: + + --with-PACKAGE[=ARG] + --without-PACKAGE + + For example, `--with-gnu-ld' means work with the GNU linker instead +of some other linker. `--with-x' means work with The X Window System. + + The user can give an argument by following the package name with `=' +and the argument. Giving an argument of `no' is for packages that are +used by default; it says to _not_ use the package. An argument that is +neither `yes' nor `no' could include a name or number of a version of +the other package, to specify more precisely which other package this +program is supposed to work with. If no argument is given, it defaults +to `yes'. `--without-PACKAGE' is equivalent to `--with-PACKAGE=no'. + + Normally `configure' scripts complain about `--with-PACKAGE' options +that they do not support. *Note Option Checking::, for details, and +for how to override the defaults. + + For each external software package that may be used, `configure.ac' +should call `AC_ARG_WITH' to detect whether the `configure' user asked +to use it. Whether each package is used or not by default, and which +arguments are valid, is up to you. + + -- Macro: AC_ARG_WITH (PACKAGE, HELP-STRING, [ACTION-IF-GIVEN], + [ACTION-IF-NOT-GIVEN]) + If the user gave `configure' the option `--with-PACKAGE' or + `--without-PACKAGE', run shell commands ACTION-IF-GIVEN. If + neither option was given, run shell commands ACTION-IF-NOT-GIVEN. + The name PACKAGE indicates another software package that this + program should work with. It should consist only of alphanumeric + characters, dashes, plus signs, and dots. + + The option's argument is available to the shell commands + ACTION-IF-GIVEN in the shell variable `withval', which is actually + just the value of the shell variable named `with_PACKAGE', with + any non-alphanumeric characters in PACKAGE changed into `_'. You + may use that variable instead, if you wish. + + The argument HELP-STRING is a description of the option that looks + like this: + --with-readline support fancy command line editing + + HELP-STRING may be more than one line long, if more detail is + needed. Just make sure the columns line up in `configure --help'. + Avoid tabs in the help string. The easiest way to provide the + proper leading whitespace is to format your HELP-STRING with the + macro `AS_HELP_STRING' (*note Pretty Help Strings::). + + The following example shows how to use the `AC_ARG_WITH' macro in + a common situation. You want to let the user decide whether to + enable support for an external library (e.g., the readline + library); if the user specified neither `--with-readline' nor + `--without-readline', you want to enable support for readline only + if the library is available on the system. + + AC_ARG_WITH([readline], + [AS_HELP_STRING([--with-readline], + [support fancy command line editing @<:@default=check@:>@])], + [], + [with_readline=check]) + + LIBREADLINE= + AS_IF([test "x$with_readline" != xno], + [AC_CHECK_LIB([readline], [main], + [AC_SUBST([LIBREADLINE], ["-lreadline -lncurses"]) + AC_DEFINE([HAVE_LIBREADLINE], [1], + [Define if you have libreadline]) + ], + [if test "x$with_readline" != xcheck; then + AC_MSG_FAILURE( + [--with-readline was given, but test for readline failed]) + fi + ], -lncurses)]) + + The next example shows how to use `AC_ARG_WITH' to give the user + the possibility to enable support for the readline library, in + case it is still experimental and not well tested, and is + therefore disabled by default. + + AC_ARG_WITH([readline], + [AS_HELP_STRING([--with-readline], + [enable experimental support for readline])], + [], + [with_readline=no]) + + LIBREADLINE= + AS_IF([test "x$with_readline" != xno], + [AC_CHECK_LIB([readline], [main], + [AC_SUBST([LIBREADLINE], ["-lreadline -lncurses"]) + AC_DEFINE([HAVE_LIBREADLINE], [1], + [Define if you have libreadline]) + ], + [AC_MSG_FAILURE( + [--with-readline was given, but test for readline failed])], + [-lncurses])]) + + The last example shows how to use `AC_ARG_WITH' to give the user + the possibility to disable support for the readline library, given + that it is an important feature and that it should be enabled by + default. + + AC_ARG_WITH([readline], + [AS_HELP_STRING([--without-readline], + [disable support for readline])], + [], + [with_readline=yes]) + + LIBREADLINE= + AS_IF([test "x$with_readline" != xno], + [AC_CHECK_LIB([readline], [main], + [AC_SUBST([LIBREADLINE], ["-lreadline -lncurses"]) + AC_DEFINE([HAVE_LIBREADLINE], [1], + [Define if you have libreadline]) + ], + [AC_MSG_FAILURE( + [readline test failed (--without-readline to disable)])], + [-lncurses])]) + + These three examples can be easily adapted to the case where + `AC_ARG_ENABLE' should be preferred to `AC_ARG_WITH' (see *note + Package Options::). + + +File: autoconf.info, Node: Package Options, Next: Pretty Help Strings, Prev: External Software, Up: Site Configuration + +15.3 Choosing Package Options +============================= + +If a software package has optional compile-time features, the user can +give `configure' command line options to specify whether to compile +them. The options have one of these forms: + + --enable-FEATURE[=ARG] + --disable-FEATURE + + These options allow users to choose which optional features to build +and install. `--enable-FEATURE' options should never make a feature +behave differently or cause one feature to replace another. They +should only cause parts of the program to be built rather than left out. + + The user can give an argument by following the feature name with `=' +and the argument. Giving an argument of `no' requests that the feature +_not_ be made available. A feature with an argument looks like +`--enable-debug=stabs'. If no argument is given, it defaults to `yes'. +`--disable-FEATURE' is equivalent to `--enable-FEATURE=no'. + + Normally `configure' scripts complain about `--enable-PACKAGE' +options that they do not support. *Note Option Checking::, for +details, and for how to override the defaults. + + For each optional feature, `configure.ac' should call +`AC_ARG_ENABLE' to detect whether the `configure' user asked to include +it. Whether each feature is included or not by default, and which +arguments are valid, is up to you. + + -- Macro: AC_ARG_ENABLE (FEATURE, HELP-STRING, [ACTION-IF-GIVEN], + [ACTION-IF-NOT-GIVEN]) + If the user gave `configure' the option `--enable-FEATURE' or + `--disable-FEATURE', run shell commands ACTION-IF-GIVEN. If + neither option was given, run shell commands ACTION-IF-NOT-GIVEN. + The name FEATURE indicates an optional user-level facility. It + should consist only of alphanumeric characters, dashes, plus + signs, and dots. + + The option's argument is available to the shell commands + ACTION-IF-GIVEN in the shell variable `enableval', which is + actually just the value of the shell variable named + `enable_FEATURE', with any non-alphanumeric characters in FEATURE + changed into `_'. You may use that variable instead, if you wish. + The HELP-STRING argument is like that of `AC_ARG_WITH' (*note + External Software::). + + You should format your HELP-STRING with the macro `AS_HELP_STRING' + (*note Pretty Help Strings::). + + See the examples suggested with the definition of `AC_ARG_WITH' + (*note External Software::) to get an idea of possible + applications of `AC_ARG_ENABLE'. + + +File: autoconf.info, Node: Pretty Help Strings, Next: Option Checking, Prev: Package Options, Up: Site Configuration + +15.4 Making Your Help Strings Look Pretty +========================================= + +Properly formatting the `help strings' which are used in `AC_ARG_WITH' +(*note External Software::) and `AC_ARG_ENABLE' (*note Package +Options::) can be challenging. Specifically, you want your own `help +strings' to line up in the appropriate columns of `configure --help' +just like the standard Autoconf `help strings' do. This is the purpose +of the `AS_HELP_STRING' macro. + + -- Macro: AS_HELP_STRING (LEFT-HAND-SIDE, RIGHT-HAND-SIDE + [INDENT-COLUMN = `26'], [WRAP-COLUMN = `79']) + Expands into a help string that looks pretty when the user executes + `configure --help'. It is typically used in `AC_ARG_WITH' (*note + External Software::) or `AC_ARG_ENABLE' (*note Package Options::). + The following example makes this clearer. + + AC_ARG_WITH([foo], + [AS_HELP_STRING([--with-foo], + [use foo (default is no)])], + [use_foo=$withval], + [use_foo=no]) + + Then the last few lines of `configure --help' appear like this: + + --enable and --with options recognized: + --with-foo use foo (default is no) + + Macro expansion is performed on the first argument. However, the + second argument of `AS_HELP_STRING' is treated as a whitespace + separated list of text to be reformatted, and is not subject to + macro expansion. Since it is not expanded, it should not be + double quoted. *Note Autoconf Language::, for a more detailed + explanation. + + The `AS_HELP_STRING' macro is particularly helpful when the + LEFT-HAND-SIDE and/or RIGHT-HAND-SIDE are composed of macro + arguments, as shown in the following example. Be aware that + LEFT-HAND-SIDE may not expand to unbalanced quotes, although + quadrigraphs can be used. + + AC_DEFUN([MY_ARG_WITH], + [AC_ARG_WITH(m4_translit([[$1]], [_], [-]), + [AS_HELP_STRING([--with-m4_translit([$1], [_], [-])], + [use $1 (default is $2)])], + [use_[]$1=$withval], + [use_[]$1=$2])]) + MY_ARG_WITH([a_b], [no]) + Here, the last few lines of `configure --help' will include: + + --enable and --with options recognized: + --with-a-b use a_b (default is no) + + The parameters INDENT-COLUMN and WRAP-COLUMN were introduced in + Autoconf 2.62. Generally, they should not be specified; they exist + for fine-tuning of the wrapping. + AS_HELP_STRING([--option], [description of option]) + => --option description of option + AS_HELP_STRING([--option], [description of option], [15], [30]) + => --option description of + => option + + +File: autoconf.info, Node: Option Checking, Next: Site Details, Prev: Pretty Help Strings, Up: Site Configuration + +15.5 Controlling Checking of `configure' Options +================================================ + +The `configure' script checks its command-line options against a list +of known options, like `--help' or `--config-cache'. An unknown option +ordinarily indicates a mistake by the user and `configure' halts with +an error. However, by default unknown `--with-PACKAGE' and +`--enable-FEATURE' options elicit only a warning, to support +configuring entire source trees. + + Source trees often contain multiple packages with a top-level +`configure' script that uses the `AC_CONFIG_SUBDIRS' macro (*note +Subdirectories::). Because the packages generally support different +`--with-PACKAGE' and `--enable-FEATURE' options, the GNU Coding +Standards say they must accept unrecognized options without halting. +Even a warning message is undesirable here, so `AC_CONFIG_SUBDIRS' +automatically disables the warnings. + + This default behavior may be modified in two ways. First, the +installer can invoke `configure --disable-option-checking' to disable +these warnings, or invoke `configure --enable-option-checking=fatal' +options to turn them into fatal errors, respectively. Second, the +maintainer can use `AC_DISABLE_OPTION_CHECKING'. + + -- Macro: AC_DISABLE_OPTION_CHECKING + By default, disable warnings related to any unrecognized + `--with-PACKAGE' or `--enable-FEATURE' options. This is implied + by `AC_CONFIG_SUBDIRS'. + + The installer can override this behavior by passing + `--enable-option-checking' (enable warnings) or + `--enable-option-checking=fatal' (enable errors) to `configure'. + + +File: autoconf.info, Node: Site Details, Next: Transforming Names, Prev: Option Checking, Up: Site Configuration + +15.6 Configuring Site Details +============================= + +Some software packages require complex site-specific information. Some +examples are host names to use for certain services, company names, and +email addresses to contact. Since some configuration scripts generated +by Metaconfig ask for such information interactively, people sometimes +wonder how to get that information in Autoconf-generated configuration +scripts, which aren't interactive. + + Such site configuration information should be put in a file that is +edited _only by users_, not by programs. The location of the file can +either be based on the `prefix' variable, or be a standard location +such as the user's home directory. It could even be specified by an +environment variable. The programs should examine that file at +runtime, rather than at compile time. Runtime configuration is more +convenient for users and makes the configuration process simpler than +getting the information while configuring. *Note Variables for +Installation Directories: (standards)Directory Variables, for more +information on where to put data files. + + +File: autoconf.info, Node: Transforming Names, Next: Site Defaults, Prev: Site Details, Up: Site Configuration + +15.7 Transforming Program Names When Installing +=============================================== + +Autoconf supports changing the names of programs when installing them. +In order to use these transformations, `configure.ac' must call the +macro `AC_ARG_PROGRAM'. + + -- Macro: AC_ARG_PROGRAM + Place in output variable `program_transform_name' a sequence of + `sed' commands for changing the names of installed programs. + + If any of the options described below are given to `configure', + program names are transformed accordingly. Otherwise, if + `AC_CANONICAL_TARGET' has been called and a `--target' value is + given, the target type followed by a dash is used as a prefix. + Otherwise, no program name transformation is done. + +* Menu: + +* Transformation Options:: `configure' options to transform names +* Transformation Examples:: Sample uses of transforming names +* Transformation Rules:: Makefile uses of transforming names + + +File: autoconf.info, Node: Transformation Options, Next: Transformation Examples, Up: Transforming Names + +15.7.1 Transformation Options +----------------------------- + +You can specify name transformations by giving `configure' these +command line options: + +`--program-prefix=PREFIX' + prepend PREFIX to the names; + +`--program-suffix=SUFFIX' + append SUFFIX to the names; + +`--program-transform-name=EXPRESSION' + perform `sed' substitution EXPRESSION on the names. + + +File: autoconf.info, Node: Transformation Examples, Next: Transformation Rules, Prev: Transformation Options, Up: Transforming Names + +15.7.2 Transformation Examples +------------------------------ + +These transformations are useful with programs that can be part of a +cross-compilation development environment. For example, a +cross-assembler running on a Sun 4 configured with +`--target=i960-vxworks' is normally installed as `i960-vxworks-as', +rather than `as', which could be confused with a native Sun 4 assembler. + + You can force a program name to begin with `g', if you don't want +GNU programs installed on your system to shadow other programs with the +same name. For example, if you configure GNU `diff' with +`--program-prefix=g', then when you run `make install' it is installed +as `/usr/local/bin/gdiff'. + + As a more sophisticated example, you could use + + --program-transform-name='s/^/g/; s/^gg/g/; s/^gless/less/' + to prepend `g' to most of the program names in a source tree, +excepting those like `gdb' that already have one and those like `less' +and `lesskey' that aren't GNU programs. (That is assuming that you +have a source tree containing those programs that is set up to use this +feature.) + + One way to install multiple versions of some programs simultaneously +is to append a version number to the name of one or both. For example, +if you want to keep Autoconf version 1 around for awhile, you can +configure Autoconf version 2 using `--program-suffix=2' to install the +programs as `/usr/local/bin/autoconf2', `/usr/local/bin/autoheader2', +etc. Nevertheless, pay attention that only the binaries are renamed, +therefore you'd have problems with the library files which might +overlap. + + +File: autoconf.info, Node: Transformation Rules, Prev: Transformation Examples, Up: Transforming Names + +15.7.3 Transformation Rules +--------------------------- + +Here is how to use the variable `program_transform_name' in a +`Makefile.in': + + PROGRAMS = cp ls rm + transform = @program_transform_name@ + install: + for p in $(PROGRAMS); do \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p | \ + sed '$(transform)'`; \ + done + + uninstall: + for p in $(PROGRAMS); do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p | sed '$(transform)'`; \ + done + + It is guaranteed that `program_transform_name' is never empty, and +that there are no useless separators. Therefore you may safely embed +`program_transform_name' within a sed program using `;': + + transform = @program_transform_name@ + transform_exe = s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/ + + Whether to do the transformations on documentation files (Texinfo or +`man') is a tricky question; there seems to be no perfect answer, due +to the several reasons for name transforming. Documentation is not +usually particular to a specific architecture, and Texinfo files do not +conflict with system documentation. But they might conflict with +earlier versions of the same files, and `man' pages sometimes do +conflict with system documentation. As a compromise, it is probably +best to do name transformations on `man' pages but not on Texinfo +manuals. + + +File: autoconf.info, Node: Site Defaults, Prev: Transforming Names, Up: Site Configuration + +15.8 Setting Site Defaults +========================== + +Autoconf-generated `configure' scripts allow your site to provide +default values for some configuration values. You do this by creating +site- and system-wide initialization files. + + If the environment variable `CONFIG_SITE' is set, `configure' uses +its value as the name of a shell script to read; it is recommended that +this be an absolute file name. Otherwise, it reads the shell script +`PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' +if it exists. Thus, settings in machine-specific files override those +in machine-independent ones in case of conflict. + + Site files can be arbitrary shell scripts, but only certain kinds of +code are really appropriate to be in them. Because `configure' reads +any cache file after it has read any site files, a site file can define +a default cache file to be shared between all Autoconf-generated +`configure' scripts run on that system (*note Cache Files::). If you +set a default cache file in a site file, it is a good idea to also set +the output variable `CC' in that site file, because the cache file is +only valid for a particular compiler, but many systems have several +available. + + You can examine or override the value set by a command line option to +`configure' in a site file; options set shell variables that have the +same names as the options, with any dashes turned into underscores. +The exceptions are that `--without-' and `--disable-' options are like +giving the corresponding `--with-' or `--enable-' option and the value +`no'. Thus, `--cache-file=localcache' sets the variable `cache_file' +to the value `localcache'; `--enable-warnings=no' or +`--disable-warnings' sets the variable `enable_warnings' to the value +`no'; `--prefix=/usr' sets the variable `prefix' to the value `/usr'; +etc. + + Site files are also good places to set default values for other +output variables, such as `CFLAGS', if you need to give them non-default +values: anything you would normally do, repetitively, on the command +line. If you use non-default values for PREFIX or EXEC_PREFIX +(wherever you locate the site file), you can set them in the site file +if you specify it with the `CONFIG_SITE' environment variable. + + You can set some cache values in the site file itself. Doing this is +useful if you are cross-compiling, where it is impossible to check +features that require running a test program. You could "prime the +cache" by setting those values correctly for that system in +`PREFIX/etc/config.site'. To find out the names of the cache variables +you need to set, see the documentation of the respective Autoconf +macro. If the variables or their semantics are undocumented, you may +need to look for shell variables with `_cv_' in their names in the +affected `configure' scripts, or in the Autoconf M4 source code for +those macros; but in that case, their name or semantics may change in a +future Autoconf version. + + The cache file is careful to not override any variables set in the +site files. Similarly, you should not override command-line options in +the site files. Your code should check that variables such as `prefix' +and `cache_file' have their default values (as set near the top of +`configure') before changing them. + + Here is a sample file `/usr/share/local/gnu/share/config.site'. The +command `configure --prefix=/usr/share/local/gnu' would read this file +(if `CONFIG_SITE' is not set to a different file). + + # /usr/share/local/gnu/share/config.site for configure + # + # Change some defaults. + test "$prefix" = NONE && prefix=/usr/share/local/gnu + test "$exec_prefix" = NONE && exec_prefix=/usr/local/gnu + test "$sharedstatedir" = '${prefix}/com' && sharedstatedir=/var + test "$localstatedir" = '${prefix}/var' && localstatedir=/var + + # Give Autoconf 2.x generated configure scripts a shared default + # cache file for feature test results, architecture-specific. + if test "$cache_file" = /dev/null; then + cache_file="$prefix/var/config.cache" + # A cache file is only valid for one C compiler. + CC=gcc + fi + + Another use of `config.site' is for priming the directory variables +in a manner consistent with the Filesystem Hierarchy Standard (FHS). +Once the following file is installed at `/usr/share/config.site', a +user can execute simply `./configure --prefix=/usr' to get all the +directories chosen in the locations recommended by FHS. + + # /usr/share/config.site for FHS defaults when installing below /usr, + # and the respective settings were not changed on the command line. + if test "$prefix" = /usr; then + test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc + test "$sharedstatedir" = '${prefix}/com' && sharedstatedir=/var + test "$localstatedir" = '${prefix}/var' && localstatedir=/var + fi + + Likewise, on platforms where 64-bit libraries are built by default, +then installed in `/usr/local/lib64' instead of `/usr/local/lib', it is +appropriate to install `/usr/local/share/config.site': + + # /usr/local/share/config.site for platforms that prefer + # the directory /usr/local/lib64 over /usr/local/lib. + test "$libdir" = '${exec_prefix}/lib' && libdir='${exec_prefix}/lib64' + + +File: autoconf.info, Node: Running configure Scripts, Next: config.status Invocation, Prev: Site Configuration, Up: Top + +16 Running `configure' Scripts +****************************** + +Below are instructions on how to configure a package that uses a +`configure' script, suitable for inclusion as an `INSTALL' file in the +package. A plain-text version of `INSTALL' which you may use comes +with Autoconf. + +* Menu: + +* Basic Installation:: Instructions for typical cases +* Compilers and Options:: Selecting compilers and optimization +* Multiple Architectures:: Compiling for multiple architectures at once +* Installation Names:: Installing in different directories +* Optional Features:: Selecting optional features +* Particular Systems:: Particular systems +* System Type:: Specifying the system type +* Sharing Defaults:: Setting site-wide defaults for `configure' +* Defining Variables:: Specifying the compiler etc. +* configure Invocation:: Changing how `configure' runs + + +File: autoconf.info, Node: Basic Installation, Next: Compilers and Options, Up: Running configure Scripts + +16.1 Basic Installation +======================= + +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. More recommendations for GNU +packages can be found in *note Makefile Conventions: +(standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + + The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + + +File: autoconf.info, Node: Compilers and Options, Next: Multiple Architectures, Prev: Basic Installation, Up: Running configure Scripts + +16.2 Compilers and Options +========================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + + +File: autoconf.info, Node: Multiple Architectures, Next: Installation Names, Prev: Compilers and Options, Up: Running configure Scripts + +16.3 Compiling For Multiple Architectures +========================================= + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + + +File: autoconf.info, Node: Installation Names, Next: Optional Features, Prev: Multiple Architectures, Up: Running configure Scripts + +16.4 Installation Names +======================= + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + + +File: autoconf.info, Node: Optional Features, Next: Particular Systems, Prev: Installation Names, Up: Running configure Scripts + +16.5 Optional Features +====================== + +If the package supports it, you can cause programs to be installed with +an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + + +File: autoconf.info, Node: Particular Systems, Next: System Type, Prev: Optional Features, Up: Running configure Scripts + +16.6 Particular systems +======================= + +On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is +not installed, it is recommended to use the following options in order +to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `<wchar.h>' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + + +File: autoconf.info, Node: System Type, Next: Sharing Defaults, Prev: Particular Systems, Up: Running configure Scripts + +16.7 Specifying the System Type +=============================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + + +File: autoconf.info, Node: Sharing Defaults, Next: Defining Variables, Prev: System Type, Up: Running configure Scripts + +16.8 Sharing Defaults +===================== + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + + +File: autoconf.info, Node: Defining Variables, Next: configure Invocation, Prev: Sharing Defaults, Up: Running configure Scripts + +16.9 Defining Variables +======================= + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash + + +File: autoconf.info, Node: configure Invocation, Prev: Defining Variables, Up: Running configure Scripts + +16.10 `configure' Invocation +============================ + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + + +File: autoconf.info, Node: config.status Invocation, Next: Obsolete Constructs, Prev: Running configure Scripts, Up: Top + +17 config.status Invocation +*************************** + +The `configure' script creates a file named `config.status', which +actually configures, "instantiates", the template files. It also +records the configuration options that were specified when the package +was last configured in case reconfiguring is needed. + + Synopsis: + ./config.status [OPTION]... [TAG]... + + It configures each TAG; if none are specified, all the templates are +instantiated. A TAG refers to a file or other tag associated with a +configuration action, as specified by an `AC_CONFIG_ITEMS' macro (*note +Configuration Actions::). The files must be specified without their +dependencies, as in + + ./config.status foobar + +not + + ./config.status foobar:foo.in:bar.in + + The supported options are: + +`--help' +`-h' + Print a summary of the command line options, the list of the + template files, and exit. + +`--version' +`-V' + Print the version number of Autoconf and the configuration + settings, and exit. + +`--config' + Print the configuration settings in reusable way, quoted for the + shell, and exit. For example, for a debugging build that + otherwise reuses the configuration from a different build + directory BUILD-DIR of a package in SRC-DIR, you could use the + following: + + args=`BUILD-DIR/config.status --config` + eval SRC-DIR/configure "$args" CFLAGS=-g --srcdir=SRC-DIR + + Note that it may be necessary to override a `--srcdir' setting + that was saved in the configuration, if the arguments are used in a + different build directory. + +`--silent' +`--quiet' +`-q' + Do not print progress messages. + +`--debug' +`-d' + Don't remove the temporary files. + +`--file=FILE[:TEMPLATE]' + Require that FILE be instantiated as if + `AC_CONFIG_FILES(FILE:TEMPLATE)' was used. Both FILE and TEMPLATE + may be `-' in which case the standard output and/or standard + input, respectively, is used. If a TEMPLATE file name is + relative, it is first looked for in the build tree, and then in + the source tree. *Note Configuration Actions::, for more details. + + This option and the following ones provide one way for separately + distributed packages to share the values computed by `configure'. + Doing so can be useful if some of the packages need a superset of + the features that one of them, perhaps a common library, does. + These options allow a `config.status' file to create files other + than the ones that its `configure.ac' specifies, so it can be used + for a different package, or for extracting a subset of values. + For example, + + echo '@CC@' | ./config.status --file=- + + provides the value of `@CC@' on standard output. + +`--header=FILE[:TEMPLATE]' + Same as `--file' above, but with `AC_CONFIG_HEADERS'. + +`--recheck' + Ask `config.status' to update itself and exit (no instantiation). + This option is useful if you change `configure', so that the + results of some tests might be different from the previous run. + The `--recheck' option reruns `configure' with the same arguments + you used before, plus the `--no-create' option, which prevents + `configure' from running `config.status' and creating `Makefile' + and other files, and the `--no-recursion' option, which prevents + `configure' from running other `configure' scripts in + subdirectories. (This is so other Make rules can run + `config.status' when it changes; *note Automatic Remaking::, for + an example). + + `config.status' checks several optional environment variables that +can alter its behavior: + + -- Variable: CONFIG_SHELL + The shell with which to run `configure'. It must be + Bourne-compatible, and the absolute name of the shell should be + passed. The default is a shell that supports `LINENO' if + available, and `/bin/sh' otherwise. + + -- Variable: CONFIG_STATUS + The file name to use for the shell script that records the + configuration. The default is `./config.status'. This variable is + useful when one package uses parts of another and the `configure' + scripts shouldn't be merged because they are maintained separately. + + You can use `./config.status' in your makefiles. For example, in +the dependencies given above (*note Automatic Remaking::), +`config.status' is run twice when `configure.ac' has changed. If that +bothers you, you can make each run only regenerate the files for that +rule: + config.h: stamp-h + stamp-h: config.h.in config.status + ./config.status config.h + echo > stamp-h + + Makefile: Makefile.in config.status + ./config.status Makefile + + The calling convention of `config.status' has changed; see *note +Obsolete config.status Use::, for details. + + +File: autoconf.info, Node: Obsolete Constructs, Next: Using Autotest, Prev: config.status Invocation, Up: Top + +18 Obsolete Constructs +********************** + +Autoconf changes, and throughout the years some constructs have been +obsoleted. Most of the changes involve the macros, but in some cases +the tools themselves, or even some concepts, are now considered +obsolete. + + You may completely skip this chapter if you are new to Autoconf. Its +intention is mainly to help maintainers updating their packages by +understanding how to move to more modern constructs. + +* Menu: + +* Obsolete config.status Use:: Obsolete convention for `config.status' +* acconfig Header:: Additional entries in `config.h.in' +* autoupdate Invocation:: Automatic update of `configure.ac' +* Obsolete Macros:: Backward compatibility macros +* Autoconf 1:: Tips for upgrading your files +* Autoconf 2.13:: Some fresher tips + + +File: autoconf.info, Node: Obsolete config.status Use, Next: acconfig Header, Up: Obsolete Constructs + +18.1 Obsolete `config.status' Invocation +======================================== + +`config.status' now supports arguments to specify the files to +instantiate; see *note config.status Invocation::, for more details. +Before, environment variables had to be used. + + -- Variable: CONFIG_COMMANDS + The tags of the commands to execute. The default is the arguments + given to `AC_OUTPUT' and `AC_CONFIG_COMMANDS' in `configure.ac'. + + -- Variable: CONFIG_FILES + The files in which to perform `@VARIABLE@' substitutions. The + default is the arguments given to `AC_OUTPUT' and + `AC_CONFIG_FILES' in `configure.ac'. + + -- Variable: CONFIG_HEADERS + The files in which to substitute C `#define' statements. The + default is the arguments given to `AC_CONFIG_HEADERS'; if that + macro was not called, `config.status' ignores this variable. + + -- Variable: CONFIG_LINKS + The symbolic links to establish. The default is the arguments + given to `AC_CONFIG_LINKS'; if that macro was not called, + `config.status' ignores this variable. + + In *note config.status Invocation::, using this old interface, the +example would be: + + config.h: stamp-h + stamp-h: config.h.in config.status + CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_FILES= \ + CONFIG_HEADERS=config.h ./config.status + echo > stamp-h + + Makefile: Makefile.in config.status + CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_HEADERS= \ + CONFIG_FILES=Makefile ./config.status + +(If `configure.ac' does not call `AC_CONFIG_HEADERS', there is no need +to set `CONFIG_HEADERS' in the `make' rules. Equally for +`CONFIG_COMMANDS', etc.) + + +File: autoconf.info, Node: acconfig Header, Next: autoupdate Invocation, Prev: Obsolete config.status Use, Up: Obsolete Constructs + +18.2 `acconfig.h' +================= + +In order to produce `config.h.in', `autoheader' needs to build or to +find templates for each symbol. Modern releases of Autoconf use +`AH_VERBATIM' and `AH_TEMPLATE' (*note Autoheader Macros::), but in +older releases a file, `acconfig.h', contained the list of needed +templates. `autoheader' copied comments and `#define' and `#undef' +statements from `acconfig.h' in the current directory, if present. +This file used to be mandatory if you `AC_DEFINE' any additional +symbols. + + Modern releases of Autoconf also provide `AH_TOP' and `AH_BOTTOM' if +you need to prepend/append some information to `config.h.in'. Ancient +versions of Autoconf had a similar feature: if `./acconfig.h' contains +the string `@TOP@', `autoheader' copies the lines before the line +containing `@TOP@' into the top of the file that it generates. +Similarly, if `./acconfig.h' contains the string `@BOTTOM@', +`autoheader' copies the lines after that line to the end of the file it +generates. Either or both of those strings may be omitted. An even +older alternate way to produce the same effect in ancient versions of +Autoconf is to create the files `FILE.top' (typically `config.h.top') +and/or `FILE.bot' in the current directory. If they exist, +`autoheader' copies them to the beginning and end, respectively, of its +output. + + In former versions of Autoconf, the files used in preparing a +software package for distribution were: + configure.ac --. .------> autoconf* -----> configure + +---+ + [aclocal.m4] --+ `---. + [acsite.m4] ---' | + +--> [autoheader*] -> [config.h.in] + [acconfig.h] ----. | + +-----' + [config.h.top] --+ + [config.h.bot] --' + + Using only the `AH_' macros, `configure.ac' should be +self-contained, and should not depend upon `acconfig.h' etc. + + +File: autoconf.info, Node: autoupdate Invocation, Next: Obsolete Macros, Prev: acconfig Header, Up: Obsolete Constructs + +18.3 Using `autoupdate' to Modernize `configure.ac' +=================================================== + +The `autoupdate' program updates a `configure.ac' file that calls +Autoconf macros by their old names to use the current macro names. In +version 2 of Autoconf, most of the macros were renamed to use a more +uniform and descriptive naming scheme. *Note Macro Names::, for a +description of the new scheme. Although the old names still work +(*note Obsolete Macros::, for a list of the old macros and the +corresponding new names), you can make your `configure.ac' files more +readable and make it easier to use the current Autoconf documentation +if you update them to use the new macro names. + + If given no arguments, `autoupdate' updates `configure.ac', backing +up the original version with the suffix `~' (or the value of the +environment variable `SIMPLE_BACKUP_SUFFIX', if that is set). If you +give `autoupdate' an argument, it reads that file instead of +`configure.ac' and writes the updated file to the standard output. + +`autoupdate' accepts the following options: + +`--help' +`-h' + Print a summary of the command line options and exit. + +`--version' +`-V' + Print the version number of Autoconf and exit. + +`--verbose' +`-v' + Report processing steps. + +`--debug' +`-d' + Don't remove the temporary files. + +`--force' +`-f' + Force the update even if the file has not changed. Disregard the + cache. + +`--include=DIR' +`-I DIR' + Also look for input files in DIR. Multiple invocations accumulate. + Directories are browsed from last to first. + +`--prepend-include=DIR' +`-B DIR' + Prepend directory DIR to the search path. This is used to include + the language-specific files before any third-party macros. + + +File: autoconf.info, Node: Obsolete Macros, Next: Autoconf 1, Prev: autoupdate Invocation, Up: Obsolete Constructs + +18.4 Obsolete Macros +==================== + +Several macros are obsoleted in Autoconf, for various reasons (typically +they failed to quote properly, couldn't be extended for more recent +issues, etc.). They are still supported, but deprecated: their use +should be avoided. + + During the jump from Autoconf version 1 to version 2, most of the +macros were renamed to use a more uniform and descriptive naming scheme, +but their signature did not change. *Note Macro Names::, for a +description of the new naming scheme. Below, if there is just the +mapping from old names to new names for these macros, the reader is +invited to refer to the definition of the new macro for the signature +and the description. + + -- Macro: AC_AIX + This macro is a platform-specific subset of + `AC_USE_SYSTEM_EXTENSIONS' (*note AC_USE_SYSTEM_EXTENSIONS::). + + -- Macro: AC_ALLOCA + Replaced by `AC_FUNC_ALLOCA' (*note AC_FUNC_ALLOCA::). + + -- Macro: AC_ARG_ARRAY + Removed because of limited usefulness. + + -- Macro: AC_C_CROSS + This macro is obsolete; it does nothing. + + -- Macro: AC_C_LONG_DOUBLE + If the C compiler supports a working `long double' type with more + range or precision than the `double' type, define + `HAVE_LONG_DOUBLE'. + + You should use `AC_TYPE_LONG_DOUBLE' or + `AC_TYPE_LONG_DOUBLE_WIDER' instead. *Note Particular Types::. + + -- Macro: AC_CANONICAL_SYSTEM + Determine the system type and set output variables to the names of + the canonical system types. *Note Canonicalizing::, for details + about the variables this macro sets. + + The user is encouraged to use either `AC_CANONICAL_BUILD', or + `AC_CANONICAL_HOST', or `AC_CANONICAL_TARGET', depending on the + needs. Using `AC_CANONICAL_TARGET' is enough to run the two other + macros (*note Canonicalizing::). + + -- Macro: AC_CHAR_UNSIGNED + Replaced by `AC_C_CHAR_UNSIGNED' (*note AC_C_CHAR_UNSIGNED::). + + -- Macro: AC_CHECK_TYPE (TYPE, DEFAULT) + Autoconf, up to 2.13, used to provide this version of + `AC_CHECK_TYPE', deprecated because of its flaws. First, although + it is a member of the `CHECK' clan, it does more than just + checking. Secondly, missing types are defined using `#define', + not `typedef', and this can lead to problems in the case of + pointer types. + + This use of `AC_CHECK_TYPE' is obsolete and discouraged; see *note + Generic Types::, for the description of the current macro. + + If the type TYPE is not defined, define it to be the C (or C++) + builtin type DEFAULT, e.g., `short int' or `unsigned int'. + + This macro is equivalent to: + + AC_CHECK_TYPE([TYPE], [], + [AC_DEFINE_UNQUOTED([TYPE], [DEFAULT], + [Define to `DEFAULT' + if <sys/types.h> does not define.])]) + + In order to keep backward compatibility, the two versions of + `AC_CHECK_TYPE' are implemented, selected using these heuristics: + + 1. If there are three or four arguments, the modern version is + used. + + 2. If the second argument appears to be a C or C++ type, then the + obsolete version is used. This happens if the argument is a + C or C++ _builtin_ type or a C identifier ending in `_t', + optionally followed by one of `[(* ' and then by a string of + zero or more characters taken from the set `[]()* _a-zA-Z0-9'. + + 3. If the second argument is spelled with the alphabet of valid + C and C++ types, the user is warned and the modern version is + used. + + 4. Otherwise, the modern version is used. + + You are encouraged either to use a valid builtin type, or to use + the equivalent modern code (see above), or better yet, to use + `AC_CHECK_TYPES' together with + + #ifndef HAVE_LOFF_T + typedef loff_t off_t; + #endif + + -- Macro: AC_CHECKING (FEATURE-DESCRIPTION) + Same as + + AC_MSG_NOTICE([checking FEATURE-DESCRIPTION...] + + *Note AC_MSG_NOTICE::. + + -- Macro: AC_COMPILE_CHECK (ECHO-TEXT, INCLUDES, FUNCTION-BODY, + ACTION-IF-TRUE, [ACTION-IF-FALSE]) + This is an obsolete version of `AC_TRY_COMPILE' itself replaced by + `AC_COMPILE_IFELSE' (*note Running the Compiler::), with the + addition that it prints `checking for ECHO-TEXT' to the standard + output first, if ECHO-TEXT is non-empty. Use `AC_MSG_CHECKING' + and `AC_MSG_RESULT' instead to print messages (*note Printing + Messages::). + + -- Macro: AC_CONST + Replaced by `AC_C_CONST' (*note AC_C_CONST::). + + -- Macro: AC_CROSS_CHECK + Same as `AC_C_CROSS', which is obsolete too, and does nothing + `:-)'. + + -- Macro: AC_CYGWIN + Check for the Cygwin environment in which case the shell variable + `CYGWIN' is set to `yes'. Don't use this macro, the dignified + means to check the nature of the host is using `AC_CANONICAL_HOST' + (*note Canonicalizing::). As a matter of fact this macro is + defined as: + + AC_REQUIRE([AC_CANONICAL_HOST])[]dnl + case $host_os in + *cygwin* ) CYGWIN=yes;; + * ) CYGWIN=no;; + esac + + Beware that the variable `CYGWIN' has a special meaning when + running Cygwin, and should not be changed. That's yet another + reason not to use this macro. + + -- Macro: AC_DECL_SYS_SIGLIST + Same as: + + AC_CHECK_DECLS([sys_siglist], [], [], + [#include <signal.h> + /* NetBSD declares sys_siglist in unistd.h. */ + #ifdef HAVE_UNISTD_H + # include <unistd.h> + #endif + ]) + + *Note AC_CHECK_DECLS::. + + -- Macro: AC_DECL_YYTEXT + Does nothing, now integrated in `AC_PROG_LEX' (*note + AC_PROG_LEX::). + + -- Macro: AC_DIR_HEADER + Like calling `AC_FUNC_CLOSEDIR_VOID' (*note + AC_FUNC_CLOSEDIR_VOID::) and `AC_HEADER_DIRENT' (*note + AC_HEADER_DIRENT::), but defines a different set of C preprocessor + macros to indicate which header file is found: + + Header Old Symbol New Symbol + `dirent.h' `DIRENT' `HAVE_DIRENT_H' + `sys/ndir.h' `SYSNDIR' `HAVE_SYS_NDIR_H' + `sys/dir.h' `SYSDIR' `HAVE_SYS_DIR_H' + `ndir.h' `NDIR' `HAVE_NDIR_H' + + -- Macro: AC_DYNIX_SEQ + If on DYNIX/ptx, add `-lseq' to output variable `LIBS'. This + macro used to be defined as + + AC_CHECK_LIB([seq], [getmntent], [LIBS="-lseq $LIBS"]) + + now it is just `AC_FUNC_GETMNTENT' (*note AC_FUNC_GETMNTENT::). + + -- Macro: AC_EXEEXT + Defined the output variable `EXEEXT' based on the output of the + compiler, which is now done automatically. Typically set to empty + string if Posix and `.exe' if a DOS variant. + + -- Macro: AC_EMXOS2 + Similar to `AC_CYGWIN' but checks for the EMX environment on OS/2 + and sets `EMXOS2'. Don't use this macro, the dignified means to + check the nature of the host is using `AC_CANONICAL_HOST' (*note + Canonicalizing::). + + -- Macro: AC_ENABLE (FEATURE, ACTION-IF-GIVEN, [ACTION-IF-NOT-GIVEN]) + This is an obsolete version of `AC_ARG_ENABLE' that does not + support providing a help string (*note AC_ARG_ENABLE::). + + -- Macro: AC_ERROR + Replaced by `AC_MSG_ERROR' (*note AC_MSG_ERROR::). + + -- Macro: AC_FIND_X + Replaced by `AC_PATH_X' (*note AC_PATH_X::). + + -- Macro: AC_FIND_XTRA + Replaced by `AC_PATH_XTRA' (*note AC_PATH_XTRA::). + + -- Macro: AC_FOREACH + Replaced by `m4_foreach_w' (*note m4_foreach_w::). + + -- Macro: AC_FUNC_CHECK + Replaced by `AC_CHECK_FUNC' (*note AC_CHECK_FUNC::). + + -- Macro: AC_FUNC_SETVBUF_REVERSED + Do nothing. Formerly, this macro checked whether `setvbuf' takes + the buffering type as its second argument and the buffer pointer + as the third, instead of the other way around, and defined + `SETVBUF_REVERSED'. However, the last systems to have the problem + were those based on SVR2, which became obsolete in 1987, and the + macro is no longer needed. + + -- Macro: AC_FUNC_WAIT3 + If `wait3' is found and fills in the contents of its third argument + (a `struct rusage *'), which HP-UX does not do, define + `HAVE_WAIT3'. + + These days portable programs should use `waitpid', not `wait3', as + `wait3' has been removed from Posix. + + -- Macro: AC_GCC_TRADITIONAL + Replaced by `AC_PROG_GCC_TRADITIONAL' (*note + AC_PROG_GCC_TRADITIONAL::). + + -- Macro: AC_GETGROUPS_T + Replaced by `AC_TYPE_GETGROUPS' (*note AC_TYPE_GETGROUPS::). + + -- Macro: AC_GETLOADAVG + Replaced by `AC_FUNC_GETLOADAVG' (*note AC_FUNC_GETLOADAVG::). + + -- Macro: AC_GNU_SOURCE + This macro is a platform-specific subset of + `AC_USE_SYSTEM_EXTENSIONS' (*note AC_USE_SYSTEM_EXTENSIONS::). + + -- Macro: AC_HAVE_FUNCS + Replaced by `AC_CHECK_FUNCS' (*note AC_CHECK_FUNCS::). + + -- Macro: AC_HAVE_HEADERS + Replaced by `AC_CHECK_HEADERS' (*note AC_CHECK_HEADERS::). + + -- Macro: AC_HAVE_LIBRARY (LIBRARY, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND], [OTHER-LIBRARIES]) + This macro is equivalent to calling `AC_CHECK_LIB' with a FUNCTION + argument of `main'. In addition, LIBRARY can be written as any of + `foo', `-lfoo', or `libfoo.a'. In all of those cases, the + compiler is passed `-lfoo'. However, LIBRARY cannot be a shell + variable; it must be a literal name. *Note AC_CHECK_LIB::. + + -- Macro: AC_HAVE_POUNDBANG + Replaced by `AC_SYS_INTERPRETER' (*note AC_SYS_INTERPRETER::). + + -- Macro: AC_HEADER_CHECK + Replaced by `AC_CHECK_HEADER' (*note AC_CHECK_HEADER::). + + -- Macro: AC_HEADER_EGREP + Replaced by `AC_EGREP_HEADER' (*note AC_EGREP_HEADER::). + + -- Macro: AC_HELP_STRING + Replaced by `AS_HELP_STRING' (*note AS_HELP_STRING::). + + -- Macro: AC_INIT (UNIQUE-FILE-IN-SOURCE-DIR) + Formerly `AC_INIT' used to have a single argument, and was + equivalent to: + + AC_INIT + AC_CONFIG_SRCDIR(UNIQUE-FILE-IN-SOURCE-DIR) + See *note AC_INIT:: and *note AC_CONFIG_SRCDIR::. + + -- Macro: AC_INLINE + Replaced by `AC_C_INLINE' (*note AC_C_INLINE::). + + -- Macro: AC_INT_16_BITS + If the C type `int' is 16 bits wide, define `INT_16_BITS'. Use + `AC_CHECK_SIZEOF(int)' instead (*note AC_CHECK_SIZEOF::). + + -- Macro: AC_IRIX_SUN + If on IRIX (Silicon Graphics Unix), add `-lsun' to output `LIBS'. + If you were using it to get `getmntent', use `AC_FUNC_GETMNTENT' + instead. If you used it for the NIS versions of the password and + group functions, use `AC_CHECK_LIB(sun, getpwnam)'. Up to + Autoconf 2.13, it used to be + + AC_CHECK_LIB([sun], [getmntent], [LIBS="-lsun $LIBS"]) + + now it is defined as + + AC_FUNC_GETMNTENT + AC_CHECK_LIB([sun], [getpwnam]) + + See *note AC_FUNC_GETMNTENT:: and *note AC_CHECK_LIB::. + + -- Macro: AC_ISC_POSIX + This macro adds `-lcposix' to output variable `LIBS' if necessary + for Posix facilities. Sun dropped support for the obsolete + INTERACTIVE Systems Corporation Unix on 2006-07-23. New programs + need not use this macro. It is implemented as + `AC_SEARCH_LIBS([strerror], [cposix])' (*note AC_SEARCH_LIBS::). + + -- Macro: AC_LANG_C + Same as `AC_LANG([C])' (*note AC_LANG::). + + -- Macro: AC_LANG_CPLUSPLUS + Same as `AC_LANG([C++])' (*note AC_LANG::). + + -- Macro: AC_LANG_FORTRAN77 + Same as `AC_LANG([Fortran 77])' (*note AC_LANG::). + + -- Macro: AC_LANG_RESTORE + Select the LANGUAGE that is saved on the top of the stack, as set + by `AC_LANG_SAVE', remove it from the stack, and call + `AC_LANG(LANGUAGE)'. *Note Language Choice::, for the preferred + way to change languages. + + -- Macro: AC_LANG_SAVE + Remember the current language (as set by `AC_LANG') on a stack. + The current language does not change. `AC_LANG_PUSH' is preferred + (*note AC_LANG_PUSH::). + + -- Macro: AC_LINK_FILES (SOURCE..., DEST...) + This is an obsolete version of `AC_CONFIG_LINKS' (*note + AC_CONFIG_LINKS::. An updated version of: + + AC_LINK_FILES(config/$machine.h config/$obj_format.h, + host.h object.h) + + is: + + AC_CONFIG_LINKS([host.h:config/$machine.h + object.h:config/$obj_format.h]) + + -- Macro: AC_LN_S + Replaced by `AC_PROG_LN_S' (*note AC_PROG_LN_S::). + + -- Macro: AC_LONG_64_BITS + Define `LONG_64_BITS' if the C type `long int' is 64 bits wide. + Use the generic macro `AC_CHECK_SIZEOF([long int])' instead (*note + AC_CHECK_SIZEOF::). + + -- Macro: AC_LONG_DOUBLE + If the C compiler supports a working `long double' type with more + range or precision than the `double' type, define + `HAVE_LONG_DOUBLE'. + + You should use `AC_TYPE_LONG_DOUBLE' or + `AC_TYPE_LONG_DOUBLE_WIDER' instead. *Note Particular Types::. + + -- Macro: AC_LONG_FILE_NAMES + Replaced by + AC_SYS_LONG_FILE_NAMES + *Note AC_SYS_LONG_FILE_NAMES::. + + -- Macro: AC_MAJOR_HEADER + Replaced by `AC_HEADER_MAJOR' (*note AC_HEADER_MAJOR::). + + -- Macro: AC_MEMORY_H + Used to define `NEED_MEMORY_H' if the `mem' functions were defined + in `memory.h'. Today it is equivalent to + `AC_CHECK_HEADERS([memory.h])' (*note AC_CHECK_HEADERS::). Adjust + your code to depend upon `HAVE_MEMORY_H', not `NEED_MEMORY_H'; see + *note Standard Symbols::. + + -- Macro: AC_MINGW32 + Similar to `AC_CYGWIN' but checks for the MinGW compiler + environment and sets `MINGW32'. Don't use this macro, the + dignified means to check the nature of the host is using + `AC_CANONICAL_HOST' (*note Canonicalizing::). + + -- Macro: AC_MINIX + This macro is a platform-specific subset of + `AC_USE_SYSTEM_EXTENSIONS' (*note AC_USE_SYSTEM_EXTENSIONS::). + + -- Macro: AC_MINUS_C_MINUS_O + Replaced by `AC_PROG_CC_C_O' (*note AC_PROG_CC_C_O::). + + -- Macro: AC_MMAP + Replaced by `AC_FUNC_MMAP' (*note AC_FUNC_MMAP::). + + -- Macro: AC_MODE_T + Replaced by `AC_TYPE_MODE_T' (*note AC_TYPE_MODE_T::). + + -- Macro: AC_OBJEXT + Defined the output variable `OBJEXT' based on the output of the + compiler, after .c files have been excluded. Typically set to `o' + if Posix, `obj' if a DOS variant. Now the compiler checking + macros handle this automatically. + + -- Macro: AC_OBSOLETE (THIS-MACRO-NAME, [SUGGESTION]) + Make M4 print a message to the standard error output warning that + THIS-MACRO-NAME is obsolete, and giving the file and line number + where it was called. THIS-MACRO-NAME should be the name of the + macro that is calling `AC_OBSOLETE'. If SUGGESTION is given, it + is printed at the end of the warning message; for example, it can + be a suggestion for what to use instead of THIS-MACRO-NAME. + + For instance + + AC_OBSOLETE([$0], [; use AC_CHECK_HEADERS(unistd.h) instead])dnl + + You are encouraged to use `AU_DEFUN' instead, since it gives better + services to the user (*note AU_DEFUN::). + + -- Macro: AC_OFF_T + Replaced by `AC_TYPE_OFF_T' (*note AC_TYPE_OFF_T::). + + -- Macro: AC_OUTPUT ([FILE]..., [EXTRA-CMDS], [INIT-CMDS]) + The use of `AC_OUTPUT' with arguments is deprecated. This + obsoleted interface is equivalent to: + + AC_CONFIG_FILES(FILE...) + AC_CONFIG_COMMANDS([default], + EXTRA-CMDS, INIT-CMDS) + AC_OUTPUT + + See *note AC_CONFIG_FILES::, *note AC_CONFIG_COMMANDS::, and *note + AC_OUTPUT::. + + -- Macro: AC_OUTPUT_COMMANDS (EXTRA-CMDS, [INIT-CMDS]) + Specify additional shell commands to run at the end of + `config.status', and shell commands to initialize any variables + from `configure'. This macro may be called multiple times. It is + obsolete, replaced by `AC_CONFIG_COMMANDS' (*note + AC_CONFIG_COMMANDS::). + + Here is an unrealistic example: + + fubar=27 + AC_OUTPUT_COMMANDS([echo this is extra $fubar, and so on.], + [fubar=$fubar]) + AC_OUTPUT_COMMANDS([echo this is another, extra, bit], + [echo init bit]) + + Aside from the fact that `AC_CONFIG_COMMANDS' requires an + additional key, an important difference is that + `AC_OUTPUT_COMMANDS' is quoting its arguments twice, unlike + `AC_CONFIG_COMMANDS'. This means that `AC_CONFIG_COMMANDS' can + safely be given macro calls as arguments: + + AC_CONFIG_COMMANDS(foo, [my_FOO()]) + + Conversely, where one level of quoting was enough for literal + strings with `AC_OUTPUT_COMMANDS', you need two with + `AC_CONFIG_COMMANDS'. The following lines are equivalent: + + AC_OUTPUT_COMMANDS([echo "Square brackets: []"]) + AC_CONFIG_COMMANDS([default], [[echo "Square brackets: []"]]) + + -- Macro: AC_PID_T + Replaced by `AC_TYPE_PID_T' (*note AC_TYPE_PID_T::). + + -- Macro: AC_PREFIX + Replaced by `AC_PREFIX_PROGRAM' (*note AC_PREFIX_PROGRAM::). + + -- Macro: AC_PROGRAMS_CHECK + Replaced by `AC_CHECK_PROGS' (*note AC_CHECK_PROGS::). + + -- Macro: AC_PROGRAMS_PATH + Replaced by `AC_PATH_PROGS' (*note AC_PATH_PROGS::). + + -- Macro: AC_PROGRAM_CHECK + Replaced by `AC_CHECK_PROG' (*note AC_CHECK_PROG::). + + -- Macro: AC_PROGRAM_EGREP + Replaced by `AC_EGREP_CPP' (*note AC_EGREP_CPP::). + + -- Macro: AC_PROGRAM_PATH + Replaced by `AC_PATH_PROG' (*note AC_PATH_PROG::). + + -- Macro: AC_REMOTE_TAPE + Removed because of limited usefulness. + + -- Macro: AC_RESTARTABLE_SYSCALLS + This macro was renamed `AC_SYS_RESTARTABLE_SYSCALLS'. However, + these days portable programs should use `sigaction' with + `SA_RESTART' if they want restartable system calls. They should + not rely on `HAVE_RESTARTABLE_SYSCALLS', since nowadays whether a + system call is restartable is a dynamic issue, not a + configuration-time issue. + + -- Macro: AC_RETSIGTYPE + Replaced by `AC_TYPE_SIGNAL' (*note AC_TYPE_SIGNAL::), which itself + is obsolete when assuming C89 or better. + + -- Macro: AC_RSH + Removed because of limited usefulness. + + -- Macro: AC_SCO_INTL + If on SCO Unix, add `-lintl' to output variable `LIBS'. This + macro used to do this: + + AC_CHECK_LIB([intl], [strftime], [LIBS="-lintl $LIBS"]) + + Now it just calls `AC_FUNC_STRFTIME' instead (*note + AC_FUNC_STRFTIME::). + + -- Macro: AC_SETVBUF_REVERSED + Replaced by + AC_FUNC_SETVBUF_REVERSED + *Note AC_FUNC_SETVBUF_REVERSED::. + + -- Macro: AC_SET_MAKE + Replaced by `AC_PROG_MAKE_SET' (*note AC_PROG_MAKE_SET::). + + -- Macro: AC_SIZEOF_TYPE + Replaced by `AC_CHECK_SIZEOF' (*note AC_CHECK_SIZEOF::). + + -- Macro: AC_SIZE_T + Replaced by `AC_TYPE_SIZE_T' (*note AC_TYPE_SIZE_T::). + + -- Macro: AC_STAT_MACROS_BROKEN + Replaced by `AC_HEADER_STAT' (*note AC_HEADER_STAT::). + + -- Macro: AC_STDC_HEADERS + Replaced by `AC_HEADER_STDC' (*note AC_HEADER_STDC::). + + -- Macro: AC_STRCOLL + Replaced by `AC_FUNC_STRCOLL' (*note AC_FUNC_STRCOLL::). + + -- Macro: AC_STRUCT_ST_BLKSIZE + If `struct stat' contains an `st_blksize' member, define + `HAVE_STRUCT_STAT_ST_BLKSIZE'. The former name, `HAVE_ST_BLKSIZE' + is to be avoided, as its support will cease in the future. This + macro is obsoleted, and should be replaced by + + AC_CHECK_MEMBERS([struct stat.st_blksize]) + *Note AC_CHECK_MEMBERS::. + + -- Macro: AC_STRUCT_ST_RDEV + If `struct stat' contains an `st_rdev' member, define + `HAVE_STRUCT_STAT_ST_RDEV'. The former name for this macro, + `HAVE_ST_RDEV', is to be avoided as it will cease to be supported + in the future. Actually, even the new macro is obsolete and + should be replaced by: + AC_CHECK_MEMBERS([struct stat.st_rdev]) + *Note AC_CHECK_MEMBERS::. + + -- Macro: AC_ST_BLKSIZE + Replaced by `AC_CHECK_MEMBERS' (*note AC_CHECK_MEMBERS::). + + -- Macro: AC_ST_BLOCKS + Replaced by `AC_STRUCT_ST_BLOCKS' (*note AC_STRUCT_ST_BLOCKS::). + + -- Macro: AC_ST_RDEV + Replaced by `AC_CHECK_MEMBERS' (*note AC_CHECK_MEMBERS::). + + -- Macro: AC_SYS_RESTARTABLE_SYSCALLS + If the system automatically restarts a system call that is + interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'. This + macro does not check whether system calls are restarted in + general--it checks whether a signal handler installed with + `signal' (but not `sigaction') causes system calls to be + restarted. It does not check whether system calls can be + restarted when interrupted by signals that have no handler. + + These days portable programs should use `sigaction' with + `SA_RESTART' if they want restartable system calls. They should + not rely on `HAVE_RESTARTABLE_SYSCALLS', since nowadays whether a + system call is restartable is a dynamic issue, not a + configuration-time issue. + + -- Macro: AC_SYS_SIGLIST_DECLARED + This macro was renamed `AC_DECL_SYS_SIGLIST'. However, even that + name is obsolete, as the same functionality is now achieved via + `AC_CHECK_DECLS' (*note AC_CHECK_DECLS::). + + -- Macro: AC_TEST_CPP + This macro was renamed `AC_TRY_CPP', which in turn was replaced by + `AC_PREPROC_IFELSE' (*note AC_PREPROC_IFELSE::). + + -- Macro: AC_TEST_PROGRAM + This macro was renamed `AC_TRY_RUN', which in turn was replaced by + `AC_RUN_IFELSE' (*note AC_RUN_IFELSE::). + + -- Macro: AC_TIMEZONE + Replaced by `AC_STRUCT_TIMEZONE' (*note AC_STRUCT_TIMEZONE::). + + -- Macro: AC_TIME_WITH_SYS_TIME + Replaced by `AC_HEADER_TIME' (*note AC_HEADER_TIME::). + + -- Macro: AC_TRY_COMPILE (INCLUDES, FUNCTION-BODY, [ACTION-IF-TRUE], + [ACTION-IF-FALSE]) + Same as: + + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[INCLUDES]], + [[FUNCTION-BODY]])], + [ACTION-IF-TRUE], + [ACTION-IF-FALSE]) + + *Note Running the Compiler::. + + This macro double quotes both INCLUDES and FUNCTION-BODY. + + For C and C++, INCLUDES is any `#include' statements needed by the + code in FUNCTION-BODY (INCLUDES is ignored if the currently + selected language is Fortran or Fortran 77). The compiler and + compilation flags are determined by the current language (*note + Language Choice::). + + -- Macro: AC_TRY_CPP (INPUT, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) + Same as: + + AC_PREPROC_IFELSE( + [AC_LANG_SOURCE([[INPUT]])], + [ACTION-IF-TRUE], + [ACTION-IF-FALSE]) + + *Note Running the Preprocessor::. + + This macro double quotes the INPUT. + + -- Macro: AC_TRY_LINK (INCLUDES, FUNCTION-BODY, [ACTION-IF-TRUE], + [ACTION-IF-FALSE]) + Same as: + + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[INCLUDES]], + [[FUNCTION-BODY]])], + [ACTION-IF-TRUE], + [ACTION-IF-FALSE]) + + *Note Running the Compiler::. + + This macro double quotes both INCLUDES and FUNCTION-BODY. + + Depending on the current language (*note Language Choice::), + create a test program to see whether a function whose body + consists of FUNCTION-BODY can be compiled and linked. If the file + compiles and links successfully, run shell commands + ACTION-IF-FOUND, otherwise run ACTION-IF-NOT-FOUND. + + This macro double quotes both INCLUDES and FUNCTION-BODY. + + For C and C++, INCLUDES is any `#include' statements needed by the + code in FUNCTION-BODY (INCLUDES is ignored if the currently + selected language is Fortran or Fortran 77). The compiler and + compilation flags are determined by the current language (*note + Language Choice::), and in addition `LDFLAGS' and `LIBS' are used + for linking. + + -- Macro: AC_TRY_LINK_FUNC (FUNCTION, [ACTION-IF-FOUND], + [ACTION-IF-NOT-FOUND]) + This macro is equivalent to + AC_LINK_IFELSE([AC_LANG_CALL([], [FUNCTION])], + [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) + *Note AC_LINK_IFELSE::. + + -- Macro: AC_TRY_RUN (PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE], + [ACTION-IF-CROSS-COMPILING = `AC_MSG_FAILURE']) + Same as: + + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[PROGRAM]])], + [ACTION-IF-TRUE], + [ACTION-IF-FALSE], + [ACTION-IF-CROSS-COMPILING]) + + *Note Runtime::. + + -- Macro: AC_TYPE_SIGNAL + If `signal.h' declares `signal' as returning a pointer to a + function returning `void', define `RETSIGTYPE' to be `void'; + otherwise, define it to be `int'. These days, it is portable to + assume C89, and that signal handlers return `void', without + needing to use this macro or `RETSIGTYPE'. + + When targeting older K&R C, it is possible to define signal + handlers as returning type `RETSIGTYPE', and omit a return + statement: + + RETSIGTYPE + hup_handler () + { + ... + } + + -- Macro: AC_UID_T + Replaced by `AC_TYPE_UID_T' (*note AC_TYPE_UID_T::). + + -- Macro: AC_UNISTD_H + Same as `AC_CHECK_HEADERS([unistd.h])' (*note AC_CHECK_HEADERS::). + + -- Macro: AC_USG + Define `USG' if the BSD string functions are defined in + `strings.h'. You should no longer depend upon `USG', but on + `HAVE_STRING_H'; see *note Standard Symbols::. + + -- Macro: AC_UTIME_NULL + Replaced by `AC_FUNC_UTIME_NULL' (*note AC_FUNC_UTIME_NULL::). + + -- Macro: AC_VALIDATE_CACHED_SYSTEM_TUPLE ([CMD]) + If the cache file is inconsistent with the current host, target and + build system types, it used to execute CMD or print a default + error message. This is now handled by default. + + -- Macro: AC_VERBOSE (RESULT-DESCRIPTION) + Replaced by `AC_MSG_RESULT' (*note AC_MSG_RESULT::). + + -- Macro: AC_VFORK + Replaced by `AC_FUNC_FORK' (*note AC_FUNC_FORK::). + + -- Macro: AC_VPRINTF + Replaced by `AC_FUNC_VPRINTF' (*note AC_FUNC_VPRINTF::). + + -- Macro: AC_WAIT3 + This macro was renamed `AC_FUNC_WAIT3'. However, these days + portable programs should use `waitpid', not `wait3', as `wait3' + has been removed from Posix. + + -- Macro: AC_WARN + Replaced by `AC_MSG_WARN' (*note AC_MSG_WARN::). + + -- Macro: AC_WITH (PACKAGE, ACTION-IF-GIVEN, [ACTION-IF-NOT-GIVEN]) + This is an obsolete version of `AC_ARG_WITH' that does not support + providing a help string (*note AC_ARG_WITH::). + + -- Macro: AC_WORDS_BIGENDIAN + Replaced by `AC_C_BIGENDIAN' (*note AC_C_BIGENDIAN::). + + -- Macro: AC_XENIX_DIR + This macro used to add `-lx' to output variable `LIBS' if on + Xenix. Also, if `dirent.h' is being checked for, added `-ldir' to + `LIBS'. Now it is merely an alias of `AC_HEADER_DIRENT' instead, + plus some code to detect whether running XENIX on which you should + not depend: + + AC_MSG_CHECKING([for Xenix]) + AC_EGREP_CPP([yes], + [#if defined M_XENIX && !defined M_UNIX + yes + #endif], + [AC_MSG_RESULT([yes]); XENIX=yes], + [AC_MSG_RESULT([no]); XENIX=]) + Don't use this macro, the dignified means to check the nature of + the host is using `AC_CANONICAL_HOST' (*note Canonicalizing::). + + -- Macro: AC_YYTEXT_POINTER + This macro was renamed `AC_DECL_YYTEXT', which in turn was + integrated into `AC_PROG_LEX' (*note AC_PROG_LEX::). + + +File: autoconf.info, Node: Autoconf 1, Next: Autoconf 2.13, Prev: Obsolete Macros, Up: Obsolete Constructs + +18.5 Upgrading From Version 1 +============================= + +Autoconf version 2 is mostly backward compatible with version 1. +However, it introduces better ways to do some things, and doesn't +support some of the ugly things in version 1. So, depending on how +sophisticated your `configure.ac' files are, you might have to do some +manual work in order to upgrade to version 2. This chapter points out +some problems to watch for when upgrading. Also, perhaps your +`configure' scripts could benefit from some of the new features in +version 2; the changes are summarized in the file `NEWS' in the +Autoconf distribution. + +* Menu: + +* Changed File Names:: Files you might rename +* Changed Makefiles:: New things to put in `Makefile.in' +* Changed Macros:: Macro calls you might replace +* Changed Results:: Changes in how to check test results +* Changed Macro Writing:: Better ways to write your own macros + + +File: autoconf.info, Node: Changed File Names, Next: Changed Makefiles, Up: Autoconf 1 + +18.5.1 Changed File Names +------------------------- + +If you have an `aclocal.m4' installed with Autoconf (as opposed to in a +particular package's source directory), you must rename it to +`acsite.m4'. *Note autoconf Invocation::. + + If you distribute `install.sh' with your package, rename it to +`install-sh' so `make' builtin rules don't inadvertently create a file +called `install' from it. `AC_PROG_INSTALL' looks for the script under +both names, but it is best to use the new name. + + If you were using `config.h.top', `config.h.bot', or `acconfig.h', +you still can, but you have less clutter if you use the `AH_' macros. +*Note Autoheader Macros::. + + +File: autoconf.info, Node: Changed Makefiles, Next: Changed Macros, Prev: Changed File Names, Up: Autoconf 1 + +18.5.2 Changed Makefiles +------------------------ + +Add `@CFLAGS@', `@CPPFLAGS@', and `@LDFLAGS@' in your `Makefile.in' +files, so they can take advantage of the values of those variables in +the environment when `configure' is run. Doing this isn't necessary, +but it's a convenience for users. + + Also add `@configure_input@' in a comment to each input file for +`AC_OUTPUT', so that the output files contain a comment saying they +were produced by `configure'. Automatically selecting the right +comment syntax for all the kinds of files that people call `AC_OUTPUT' +on became too much work. + + Add `config.log' and `config.cache' to the list of files you remove +in `distclean' targets. + + If you have the following in `Makefile.in': + + prefix = /usr/local + exec_prefix = $(prefix) + +you must change it to: + + prefix = @prefix@ + exec_prefix = @exec_prefix@ + +The old behavior of replacing those variables without `@' characters +around them has been removed. + + +File: autoconf.info, Node: Changed Macros, Next: Changed Results, Prev: Changed Makefiles, Up: Autoconf 1 + +18.5.3 Changed Macros +--------------------- + +Many of the macros were renamed in Autoconf version 2. You can still +use the old names, but the new ones are clearer, and it's easier to find +the documentation for them. *Note Obsolete Macros::, for a table +showing the new names for the old macros. Use the `autoupdate' program +to convert your `configure.ac' to using the new macro names. *Note +autoupdate Invocation::. + + Some macros have been superseded by similar ones that do the job +better, but are not call-compatible. If you get warnings about calling +obsolete macros while running `autoconf', you may safely ignore them, +but your `configure' script generally works better if you follow the +advice that is printed about what to replace the obsolete macros with. +In particular, the mechanism for reporting the results of tests has +changed. If you were using `echo' or `AC_VERBOSE' (perhaps via +`AC_COMPILE_CHECK'), your `configure' script's output looks better if +you switch to `AC_MSG_CHECKING' and `AC_MSG_RESULT'. *Note Printing +Messages::. Those macros work best in conjunction with cache +variables. *Note Caching Results::. + + +File: autoconf.info, Node: Changed Results, Next: Changed Macro Writing, Prev: Changed Macros, Up: Autoconf 1 + +18.5.4 Changed Results +---------------------- + +If you were checking the results of previous tests by examining the +shell variable `DEFS', you need to switch to checking the values of the +cache variables for those tests. `DEFS' no longer exists while +`configure' is running; it is only created when generating output +files. This difference from version 1 is because properly quoting the +contents of that variable turned out to be too cumbersome and +inefficient to do every time `AC_DEFINE' is called. *Note Cache +Variable Names::. + + For example, here is a `configure.ac' fragment written for Autoconf +version 1: + + AC_HAVE_FUNCS(syslog) + case "$DEFS" in + *-DHAVE_SYSLOG*) ;; + *) # syslog is not in the default libraries. See if it's in some other. + saved_LIBS="$LIBS" + for lib in bsd socket inet; do + AC_CHECKING(for syslog in -l$lib) + LIBS="-l$lib $saved_LIBS" + AC_HAVE_FUNCS(syslog) + case "$DEFS" in + *-DHAVE_SYSLOG*) break ;; + *) ;; + esac + LIBS="$saved_LIBS" + done ;; + esac + + Here is a way to write it for version 2: + + AC_CHECK_FUNCS([syslog]) + if test "x$ac_cv_func_syslog" = xno; then + # syslog is not in the default libraries. See if it's in some other. + for lib in bsd socket inet; do + AC_CHECK_LIB([$lib], [syslog], [AC_DEFINE([HAVE_SYSLOG]) + LIBS="-l$lib $LIBS"; break]) + done + fi + + If you were working around bugs in `AC_DEFINE_UNQUOTED' by adding +backslashes before quotes, you need to remove them. It now works +predictably, and does not treat quotes (except back quotes) specially. +*Note Setting Output Variables::. + + All of the Boolean shell variables set by Autoconf macros now use +`yes' for the true value. Most of them use `no' for false, though for +backward compatibility some use the empty string instead. If you were +relying on a shell variable being set to something like 1 or `t' for +true, you need to change your tests. + + +File: autoconf.info, Node: Changed Macro Writing, Prev: Changed Results, Up: Autoconf 1 + +18.5.5 Changed Macro Writing +---------------------------- + +When defining your own macros, you should now use `AC_DEFUN' instead of +`define'. `AC_DEFUN' automatically calls `AC_PROVIDE' and ensures that +macros called via `AC_REQUIRE' do not interrupt other macros, to +prevent nested `checking...' messages on the screen. There's no actual +harm in continuing to use the older way, but it's less convenient and +attractive. *Note Macro Definitions::. + + You probably looked at the macros that came with Autoconf as a guide +for how to do things. It would be a good idea to take a look at the new +versions of them, as the style is somewhat improved and they take +advantage of some new features. + + If you were doing tricky things with undocumented Autoconf internals +(macros, variables, diversions), check whether you need to change +anything to account for changes that have been made. Perhaps you can +even use an officially supported technique in version 2 instead of +kludging. Or perhaps not. + + To speed up your locally written feature tests, add caching to them. +See whether any of your tests are of general enough usefulness to +encapsulate them into macros that you can share. + + +File: autoconf.info, Node: Autoconf 2.13, Prev: Autoconf 1, Up: Obsolete Constructs + +18.6 Upgrading From Version 2.13 +================================ + +The introduction of the previous section (*note Autoconf 1::) perfectly +suits this section... + + Autoconf version 2.50 is mostly backward compatible with version + 2.13. However, it introduces better ways to do some things, and + doesn't support some of the ugly things in version 2.13. So, + depending on how sophisticated your `configure.ac' files are, you + might have to do some manual work in order to upgrade to version + 2.50. This chapter points out some problems to watch for when + upgrading. Also, perhaps your `configure' scripts could benefit + from some of the new features in version 2.50; the changes are + summarized in the file `NEWS' in the Autoconf distribution. + +* Menu: + +* Changed Quotation:: Broken code which used to work +* New Macros:: Interaction with foreign macros +* Hosts and Cross-Compilation:: Bugward compatibility kludges +* AC_LIBOBJ vs LIBOBJS:: LIBOBJS is a forbidden token +* AC_ACT_IFELSE vs AC_TRY_ACT:: A more generic scheme for testing sources + + +File: autoconf.info, Node: Changed Quotation, Next: New Macros, Up: Autoconf 2.13 + +18.6.1 Changed Quotation +------------------------ + +The most important changes are invisible to you: the implementation of +most macros have completely changed. This allowed more factorization of +the code, better error messages, a higher uniformity of the user's +interface etc. Unfortunately, as a side effect, some construct which +used to (miraculously) work might break starting with Autoconf 2.50. +The most common culprit is bad quotation. + + For instance, in the following example, the message is not properly +quoted: + + AC_INIT + AC_CHECK_HEADERS(foo.h, , + AC_MSG_ERROR(cannot find foo.h, bailing out)) + AC_OUTPUT + +Autoconf 2.13 simply ignores it: + + $ autoconf-2.13; ./configure --silent + creating cache ./config.cache + configure: error: cannot find foo.h + $ + +while Autoconf 2.50 produces a broken `configure': + + $ autoconf-2.50; ./configure --silent + configure: error: cannot find foo.h + ./configure: exit: bad non-numeric arg `bailing' + ./configure: exit: bad non-numeric arg `bailing' + $ + + The message needs to be quoted, and the `AC_MSG_ERROR' invocation +too! + + AC_INIT([Example], [1.0], [bug-example@example.org]) + AC_CHECK_HEADERS([foo.h], [], + [AC_MSG_ERROR([cannot find foo.h, bailing out])]) + AC_OUTPUT + + Many many (and many more) Autoconf macros were lacking proper +quotation, including no less than... `AC_DEFUN' itself! + + $ cat configure.in + AC_DEFUN([AC_PROG_INSTALL], + [# My own much better version + ]) + AC_INIT + AC_PROG_INSTALL + AC_OUTPUT + $ autoconf-2.13 + autoconf: Undefined macros: + ***BUG in Autoconf--please report*** AC_FD_MSG + ***BUG in Autoconf--please report*** AC_EPI + configure.in:1:AC_DEFUN([AC_PROG_INSTALL], + configure.in:5:AC_PROG_INSTALL + $ autoconf-2.50 + $ + + +File: autoconf.info, Node: New Macros, Next: Hosts and Cross-Compilation, Prev: Changed Quotation, Up: Autoconf 2.13 + +18.6.2 New Macros +----------------- + +While Autoconf was relatively dormant in the late 1990s, Automake +provided Autoconf-like macros for a while. Starting with Autoconf 2.50 +in 2001, Autoconf provided versions of these macros, integrated in the +`AC_' namespace, instead of `AM_'. But in order to ease the upgrading +via `autoupdate', bindings to such `AM_' macros are provided. + + Unfortunately older versions of Automake (e.g., Automake 1.4) did +not quote the names of these macros. Therefore, when `m4' finds +something like `AC_DEFUN(AM_TYPE_PTRDIFF_T, ...)' in `aclocal.m4', +`AM_TYPE_PTRDIFF_T' is expanded, replaced with its Autoconf definition. + + Fortunately Autoconf catches pre-`AC_INIT' expansions, and +complains, in its own words: + + $ cat configure.ac + AC_INIT([Example], [1.0], [bug-example@example.org]) + AM_TYPE_PTRDIFF_T + $ aclocal-1.4 + $ autoconf + aclocal.m4:17: error: m4_defn: undefined macro: _m4_divert_diversion + aclocal.m4:17: the top level + autom4te: m4 failed with exit status: 1 + $ + + Modern versions of Automake no longer define most of these macros, +and properly quote the names of the remaining macros. If you must use +an old Automake, do not depend upon macros from Automake as it is +simply not its job to provide macros (but the one it requires itself): + + $ cat configure.ac + AC_INIT([Example], [1.0], [bug-example@example.org]) + AM_TYPE_PTRDIFF_T + $ rm aclocal.m4 + $ autoupdate + autoupdate: `configure.ac' is updated + $ cat configure.ac + AC_INIT([Example], [1.0], [bug-example@example.org]) + AC_CHECK_TYPES([ptrdiff_t]) + $ aclocal-1.4 + $ autoconf + $ + + +File: autoconf.info, Node: Hosts and Cross-Compilation, Next: AC_LIBOBJ vs LIBOBJS, Prev: New Macros, Up: Autoconf 2.13 + +18.6.3 Hosts and Cross-Compilation +---------------------------------- + +Based on the experience of compiler writers, and after long public +debates, many aspects of the cross-compilation chain have changed: + + - the relationship between the build, host, and target architecture + types, + + - the command line interface for specifying them to `configure', + + - the variables defined in `configure', + + - the enabling of cross-compilation mode. + + + The relationship between build, host, and target have been cleaned +up: the chain of default is now simply: target defaults to host, host to +build, and build to the result of `config.guess'. Nevertheless, in +order to ease the transition from 2.13 to 2.50, the following +transition scheme is implemented. _Do not rely on it_, as it will be +completely disabled in a couple of releases (we cannot keep it, as it +proves to cause more problems than it cures). + + They all default to the result of running `config.guess', unless you +specify either `--build' or `--host'. In this case, the default +becomes the system type you specified. If you specify both, and +they're different, `configure' enters cross compilation mode, so it +doesn't run any tests that require execution. + + Hint: if you mean to override the result of `config.guess', prefer +`--build' over `--host'. + + + For backward compatibility, `configure' accepts a system type as an +option by itself. Such an option overrides the defaults for build, +host, and target system types. The following configure statement +configures a cross toolchain that runs on NetBSD/alpha but generates +code for GNU Hurd/sparc, which is also the build platform. + + ./configure --host=alpha-netbsd sparc-gnu + + + In Autoconf 2.13 and before, the variables `build', `host', and +`target' had a different semantics before and after the invocation of +`AC_CANONICAL_BUILD' etc. Now, the argument of `--build' is strictly +copied into `build_alias', and is left empty otherwise. After the +`AC_CANONICAL_BUILD', `build' is set to the canonicalized build type. +To ease the transition, before, its contents is the same as that of +`build_alias'. Do _not_ rely on this broken feature. + + For consistency with the backward compatibility scheme exposed above, +when `--host' is specified but `--build' isn't, the build system is +assumed to be the same as `--host', and `build_alias' is set to that +value. Eventually, this historically incorrect behavior will go away. + + + The former scheme to enable cross-compilation proved to cause more +harm than good, in particular, it used to be triggered too easily, +leaving regular end users puzzled in front of cryptic error messages. +`configure' could even enter cross-compilation mode only because the +compiler was not functional. This is mainly because `configure' used +to try to detect cross-compilation, instead of waiting for an explicit +flag from the user. + + Now, `configure' enters cross-compilation mode if and only if +`--host' is passed. + + That's the short documentation. To ease the transition between 2.13 +and its successors, a more complicated scheme is implemented. _Do not +rely on the following_, as it will be removed in the near future. + + If you specify `--host', but not `--build', when `configure' +performs the first compiler test it tries to run an executable produced +by the compiler. If the execution fails, it enters cross-compilation +mode. This is fragile. Moreover, by the time the compiler test is +performed, it may be too late to modify the build-system type: other +tests may have already been performed. Therefore, whenever you specify +`--host', be sure to specify `--build' too. + + ./configure --build=i686-pc-linux-gnu --host=m68k-coff + +enters cross-compilation mode. The former interface, which consisted +in setting the compiler to a cross-compiler without informing +`configure' is obsolete. For instance, `configure' fails if it can't +run the code generated by the specified compiler if you configure as +follows: + + ./configure CC=m68k-coff-gcc + + +File: autoconf.info, Node: AC_LIBOBJ vs LIBOBJS, Next: AC_ACT_IFELSE vs AC_TRY_ACT, Prev: Hosts and Cross-Compilation, Up: Autoconf 2.13 + +18.6.4 `AC_LIBOBJ' vs. `LIBOBJS' +-------------------------------- + +Up to Autoconf 2.13, the replacement of functions was triggered via the +variable `LIBOBJS'. Since Autoconf 2.50, the macro `AC_LIBOBJ' should +be used instead (*note Generic Functions::). Starting at Autoconf +2.53, the use of `LIBOBJS' is an error. + + This change is mandated by the unification of the GNU Build System +components. In particular, the various fragile techniques used to parse +a `configure.ac' are all replaced with the use of traces. As a +consequence, any action must be traceable, which obsoletes critical +variable assignments. Fortunately, `LIBOBJS' was the only problem, and +it can even be handled gracefully (read, "without your having to change +something"). + + There were two typical uses of `LIBOBJS': asking for a replacement +function, and adjusting `LIBOBJS' for Automake and/or Libtool. + + + As for function replacement, the fix is immediate: use `AC_LIBOBJ'. +For instance: + + LIBOBJS="$LIBOBJS fnmatch.o" + LIBOBJS="$LIBOBJS malloc.$ac_objext" + +should be replaced with: + + AC_LIBOBJ([fnmatch]) + AC_LIBOBJ([malloc]) + + + When used with Automake 1.10 or newer, a suitable value for +`LIBOBJDIR' is set so that the `LIBOBJS' and `LTLIBOBJS' can be +referenced from any `Makefile.am'. Even without Automake, arranging +for `LIBOBJDIR' to be set correctly enables referencing `LIBOBJS' and +`LTLIBOBJS' in another directory. The `LIBOBJDIR' feature is +experimental. + + +File: autoconf.info, Node: AC_ACT_IFELSE vs AC_TRY_ACT, Prev: AC_LIBOBJ vs LIBOBJS, Up: Autoconf 2.13 + +18.6.5 `AC_ACT_IFELSE' vs. `AC_TRY_ACT' +--------------------------------------- + +Since Autoconf 2.50, internal codes uses `AC_PREPROC_IFELSE', +`AC_COMPILE_IFELSE', `AC_LINK_IFELSE', and `AC_RUN_IFELSE' on one hand +and `AC_LANG_SOURCE', and `AC_LANG_PROGRAM' on the other hand instead +of the deprecated `AC_TRY_CPP', `AC_TRY_COMPILE', `AC_TRY_LINK', and +`AC_TRY_RUN'. The motivations where: + - a more consistent interface: `AC_TRY_COMPILE' etc. were double + quoting their arguments; + + - the combinatoric explosion is solved by decomposing on the one + hand the generation of sources, and on the other hand executing + the program; + + - this scheme helps supporting more languages than plain C and C++. + + In addition to the change of syntax, the philosophy has changed too: +while emphasis was put on speed at the expense of accuracy, today's +Autoconf promotes accuracy of the testing framework at, ahem..., the +expense of speed. + + As a perfect example of what is _not_ to be done, here is how to +find out whether a header file contains a particular declaration, such +as a typedef, a structure, a structure member, or a function. Use +`AC_EGREP_HEADER' instead of running `grep' directly on the header +file; on some systems the symbol might be defined in another header +file that the file you are checking includes. + + As a (bad) example, here is how you should not check for C +preprocessor symbols, either defined by header files or predefined by +the C preprocessor: using `AC_EGREP_CPP': + + AC_EGREP_CPP(yes, + [#ifdef _AIX + yes + #endif + ], is_aix=yes, is_aix=no) + + The above example, properly written would (i) use `AC_LANG_PROGRAM', +and (ii) run the compiler: + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#ifndef _AIX + error: This isn't AIX! + #endif + ]])], + [is_aix=yes], + [is_aix=no]) + + +File: autoconf.info, Node: Using Autotest, Next: FAQ, Prev: Obsolete Constructs, Up: Top + +19 Generating Test Suites with Autotest +*************************************** + + *N.B.: This section describes a feature which is still + stabilizing. Although we believe that Autotest is useful as-is, this + documentation describes an interface which might change in the future: + do not depend upon Autotest without subscribing to the Autoconf mailing + lists.* + + It is paradoxical that portable projects depend on nonportable tools +to run their test suite. Autoconf by itself is the paragon of this +problem: although it aims at perfectly portability, up to 2.13 its test +suite was using DejaGNU, a rich and complex testing framework, but +which is far from being standard on Posix systems. Worse yet, it was +likely to be missing on the most fragile platforms, the very platforms +that are most likely to torture Autoconf and exhibit deficiencies. + + To circumvent this problem, many package maintainers have developed +their own testing framework, based on simple shell scripts whose sole +outputs are exit status values describing whether the test succeeded. +Most of these tests share common patterns, and this can result in lots +of duplicated code and tedious maintenance. + + Following exactly the same reasoning that yielded to the inception of +Autoconf, Autotest provides a test suite generation framework, based on +M4 macros building a portable shell script. The suite itself is +equipped with automatic logging and tracing facilities which greatly +diminish the interaction with bug reporters, and simple timing reports. + + Autoconf itself has been using Autotest for years, and we do attest +that it has considerably improved the strength of the test suite and the +quality of bug reports. Other projects are known to use some generation +of Autotest, such as Bison, Free Recode, Free Wdiff, GNU Tar, each of +them with different needs, and this usage has validated Autotest as a +general testing framework. + + Nonetheless, compared to DejaGNU, Autotest is inadequate for +interactive tool testing, which is probably its main limitation. + +* Menu: + +* Using an Autotest Test Suite:: Autotest and the user +* Writing Testsuites:: Autotest macros +* testsuite Invocation:: Running `testsuite' scripts +* Making testsuite Scripts:: Using autom4te to create `testsuite' + + +File: autoconf.info, Node: Using an Autotest Test Suite, Next: Writing Testsuites, Up: Using Autotest + +19.1 Using an Autotest Test Suite +================================= + +* Menu: + +* testsuite Scripts:: The concepts of Autotest +* Autotest Logs:: Their contents + + +File: autoconf.info, Node: testsuite Scripts, Next: Autotest Logs, Up: Using an Autotest Test Suite + +19.1.1 `testsuite' Scripts +-------------------------- + +Generating testing or validation suites using Autotest is rather easy. +The whole validation suite is held in a file to be processed through +`autom4te', itself using GNU M4 under the hood, to produce a +stand-alone Bourne shell script which then gets distributed. Neither +`autom4te' nor GNU M4 are needed at the installer's end. + + Each test of the validation suite should be part of some test group. +A "test group" is a sequence of interwoven tests that ought to be +executed together, usually because one test in the group creates data +files that a later test in the same group needs to read. Complex test +groups make later debugging more tedious. It is much better to keep +only a few tests per test group. Ideally there is only one test per +test group. + + For all but the simplest packages, some file such as `testsuite.at' +does not fully hold all test sources, as these are often easier to +maintain in separate files. Each of these separate files holds a single +test group, or a sequence of test groups all addressing some common +functionality in the package. In such cases, `testsuite.at' merely +initializes the validation suite, and sometimes does elementary health +checking, before listing include statements for all other test files. +The special file `package.m4', containing the identification of the +package, is automatically included if found. + + A convenient alternative consists in moving all the global issues +(local Autotest macros, elementary health checking, and `AT_INIT' +invocation) into the file `local.at', and making `testsuite.at' be a +simple list of `m4_include's of sub test suites. In such case, +generating the whole test suite or pieces of it is only a matter of +choosing the `autom4te' command line arguments. + + The validation scripts that Autotest produces are by convention +called `testsuite'. When run, `testsuite' executes each test group in +turn, producing only one summary line per test to say if that +particular test succeeded or failed. At end of all tests, summarizing +counters get printed. One debugging directory is left for each test +group which failed, if any: such directories are named +`testsuite.dir/NN', where NN is the sequence number of the test group, +and they include: + + * a debugging script named `run' which reruns the test in "debug + mode" (*note testsuite Invocation::). The automatic generation of + debugging scripts has the purpose of easing the chase for bugs. + + * all the files created with `AT_DATA' + + * all the Erlang source code files created with `AT_CHECK_EUNIT' + + * a log of the run, named `testsuite.log' + + In the ideal situation, none of the tests fail, and consequently no +debugging directory is left behind for validation. + + It often happens in practice that individual tests in the validation +suite need to get information coming out of the configuration process. +Some of this information, common for all validation suites, is provided +through the file `atconfig', automatically created by +`AC_CONFIG_TESTDIR'. For configuration information which your testing +environment specifically needs, you might prepare an optional file +named `atlocal.in', instantiated by `AC_CONFIG_FILES'. The +configuration process produces `atconfig' and `atlocal' out of these +two input files, and these two produced files are automatically read by +the `testsuite' script. + + Here is a diagram showing the relationship between files. + +Files used in preparing a software package for distribution: + + [package.m4] -->. + \ + subfile-1.at ->. [local.at] ---->+ + ... \ \ + subfile-i.at ---->-- testsuite.at -->-- autom4te* -->testsuite + ... / + subfile-n.at ->' + +Files used in configuring a software package: + + .--> atconfig + / + [atlocal.in] --> config.status* --< + \ + `--> [atlocal] + +Files created during test suite execution: + + atconfig -->. .--> testsuite.log + \ / + >-- testsuite* --< + / \ + [atlocal] ->' `--> [testsuite.dir] + + +File: autoconf.info, Node: Autotest Logs, Prev: testsuite Scripts, Up: Using an Autotest Test Suite + +19.1.2 Autotest Logs +-------------------- + +When run, the test suite creates a log file named after itself, e.g., a +test suite named `testsuite' creates `testsuite.log'. It contains a +lot of information, usually more than maintainers actually need, but +therefore most of the time it contains all that is needed: + +command line arguments + A bad but unfortunately widespread habit consists of setting + environment variables before the command, such as in + `CC=my-home-grown-cc ./testsuite'. The test suite does not know + this change, hence (i) it cannot report it to you, and (ii) it + cannot preserve the value of `CC' for subsequent runs. Autoconf + faced exactly the same problem, and solved it by asking users to + pass the variable definitions as command line arguments. Autotest + requires this rule, too, but has no means to enforce it; the log + then contains a trace of the variables that were changed by the + user. + +`ChangeLog' excerpts + The topmost lines of all the `ChangeLog' files found in the source + hierarchy. This is especially useful when bugs are reported + against development versions of the package, since the version + string does not provide sufficient information to know the exact + state of the sources the user compiled. Of course, this relies on + the use of a `ChangeLog'. + +build machine + Running a test suite in a cross-compile environment is not an easy + task, since it would mean having the test suite run on a machine + BUILD, while running programs on a machine HOST. It is much + simpler to run both the test suite and the programs on HOST, but + then, from the point of view of the test suite, there remains a + single environment, HOST = BUILD. The log contains relevant + information on the state of the BUILD machine, including some + important environment variables. + +tested programs + The absolute file name and answers to `--version' of the tested + programs (see *note Writing Testsuites::, `AT_TESTED'). + +configuration log + The contents of `config.log', as created by `configure', are + appended. It contains the configuration flags and a detailed + report on the configuration itself. + + +File: autoconf.info, Node: Writing Testsuites, Next: testsuite Invocation, Prev: Using an Autotest Test Suite, Up: Using Autotest + +19.2 Writing `testsuite.at' +=========================== + +The `testsuite.at' is a Bourne shell script making use of special +Autotest M4 macros. It often contains a call to `AT_INIT' near its +beginning followed by one call to `m4_include' per source file for +tests. Each such included file, or the remainder of `testsuite.at' if +include files are not used, contain a sequence of test groups. Each +test group begins with a call to `AT_SETUP', then an arbitrary number +of shell commands or calls to `AT_CHECK', and then completes with a +call to `AT_CLEANUP'. Multiple test groups can be categorized by a +call to `AT_BANNER'. + + All of the public Autotest macros have all-uppercase names in the +namespace `^AT_' to prevent them from accidentally conflicting with +other text; Autoconf also reserves the namespace `^_AT_' for internal +macros. All shell variables used in the testsuite for internal +purposes have mostly-lowercase names starting with `at_'. Autotest +also uses here-document delimiters in the namespace `^_AT[A-Z]', and +makes use of the file system namespace `^at-'. + + Since Autoconf is built on top of M4sugar (*note Programming in +M4sugar::) and M4sh (*note Programming in M4sh::), you must also be +aware of those namespaces (`^_?\(m4\|AS\)_'). In general, you _should +not use_ the namespace of a package that does not own the macro or +shell code you are writing. + + -- Macro: AT_INIT ([NAME]) + Initialize Autotest. Giving a NAME to the test suite is + encouraged if your package includes several test suites. Before + this macro is called, `AT_PACKAGE_STRING' and + `AT_PACKAGE_BUGREPORT' must be defined, which are used to display + information about the testsuite to the user. Typically, these + macros are provided by a file `package.m4' built by `make' (*note + Making testsuite Scripts::), in order to inherit the package name, + version, and bug reporting address from `configure.ac'. + + -- Macro: AT_COPYRIGHT (COPYRIGHT-NOTICE) + State that, in addition to the Free Software Foundation's + copyright on the Autotest macros, parts of your test suite are + covered by COPYRIGHT-NOTICE. + + The COPYRIGHT-NOTICE shows up in both the head of `testsuite' and + in `testsuite --version'. + + -- Macro: AT_ARG_OPTION (OPTIONS, HELP-TEXT, [ACTION-IF-GIVEN], + [ACTION-IF-NOT-GIVEN]) + Accept options from the space-separated list OPTIONS, a list that + has leading dashes removed from the options. Long options will be + prefixed with `--', single-character options with `-'. The first + word in this list is the primary OPTION, any others are assumed to + be short-hand aliases. The variable associated with it is + `at_arg_OPTION', with any dashes in OPTION replaced with + underscores. + + If the user passes `--OPTION' to the `testsuite', the variable + will be set to `:'. If the user does not pass the option, or + passes `--no-OPTION', then the variable will be set to `false'. + + ACTION-IF-GIVEN is run each time the option is encountered; here, + the variable `at_optarg' will be set to `:' or `false' as + appropriate. `at_optarg' is actually just a copy of + `at_arg_OPTION'. + + ACTION-IF-NOT-GIVEN will be run once after option parsing is + complete and if no option from OPTIONS was used. + + HELP-TEXT is added to the end of the list of options shown in + `testsuite --help' (*note AS_HELP_STRING::). + + It is recommended that you use a package-specific prefix to OPTIONS + names in order to avoid clashes with future Autotest built-in + options. + + -- Macro: AT_ARG_OPTION_ARG (OPTIONS, HELP-TEXT, [ACTION-IF-GIVEN], + [ACTION-IF-NOT-GIVEN]) + Accept options with arguments from the space-separated list + OPTIONS, a list that has leading dashes removed from the options. + Long options will be prefixed with `--', single-character options + with `-'. The first word in this list is the primary OPTION, any + others are assumed to be short-hand aliases. The variable + associated with it is `at_arg_OPTION', with any dashes in OPTION + replaced with underscores. + + If the user passes `--OPTION=ARG' or `--OPTION ARG' to the + `testsuite', the variable will be set to `ARG'. + + ACTION-IF-GIVEN is run each time the option is encountered; here, + the variable `at_optarg' will be set to `ARG'. `at_optarg' is + actually just a copy of `at_arg_OPTION'. + + ACTION-IF-NOT-GIVEN will be run once after option parsing is + complete and if no option from OPTIONS was used. + + HELP-TEXT is added to the end of the list of options shown in + `testsuite --help' (*note AS_HELP_STRING::). + + It is recommended that you use a package-specific prefix to OPTIONS + names in order to avoid clashes with future Autotest built-in + options. + + -- Macro: AT_COLOR_TESTS + Enable colored test results by default when the output is + connected to a terminal. + + -- Macro: AT_TESTED (EXECUTABLES) + Log the file name and answer to `--version' of each program in + space-separated list EXECUTABLES. Several invocations register + new executables, in other words, don't fear registering one program + several times. + + Autotest test suites rely on `PATH' to find the tested program. + This avoids the need to generate absolute names of the various + tools, and makes it possible to test installed programs. + Therefore, knowing which programs are being exercised is crucial + to understanding problems in the test suite itself, or its + occasional misuses. It is a good idea to also subscribe foreign + programs you depend upon, to avoid incompatible diagnostics. + + + -- Macro: AT_BANNER (TEST-CATEGORY-NAME) + This macro identifies the start of a category of related test + groups. When the resulting `testsuite' is invoked with more than + one test group to run, its output will include a banner containing + TEST-CATEGORY-NAME prior to any tests run from that category. The + banner should be no more than about 40 or 50 characters. A blank + banner indicates uncategorized tests; an empty line will be + inserted after tests from an earlier category, effectively ending + that category. + + -- Macro: AT_SETUP (TEST-GROUP-NAME) + This macro starts a group of related tests, all to be executed in + the same subshell. It accepts a single argument, which holds a + few words (no more than about 30 or 40 characters) quickly + describing the purpose of the test group being started. + TEST-GROUP-NAME must not expand to unbalanced quotes, although + quadrigraphs can be used. + + -- Macro: AT_KEYWORDS (KEYWORDS) + Associate the space-separated list of KEYWORDS to the enclosing + test group. This makes it possible to run "slices" of the test + suite. For instance, if some of your test groups exercise some + `foo' feature, then using `AT_KEYWORDS(foo)' lets you run + `./testsuite -k foo' to run exclusively these test groups. The + TEST-GROUP-NAME of the test group is automatically recorded to + `AT_KEYWORDS'. + + Several invocations within a test group accumulate new keywords. + In other words, don't fear registering the same keyword several + times in a test group. + + -- Macro: AT_CAPTURE_FILE (FILE) + If the current test group fails, log the contents of FILE. + Several identical calls within one test group have no additional + effect. + + -- Macro: AT_FAIL_IF (SHELL-CONDITION) + Make the test group fail and skip the rest of its execution, if + SHELL-CONDITION is true. SHELL-CONDITION is a shell expression + such as a `test' command. Tests before `AT_FAIL_IF' will be + executed and may still cause the test group to be skipped. You + can instantiate this macro many times from within the same test + group. + + You should use this macro only for very simple failure conditions. + If the SHELL-CONDITION could emit any kind of output you should + instead use `AT_CHECK' like + AT_CHECK([if SHELL-CONDITION; then exit 99; fi]) + so that such output is properly recorded in the `testsuite.log' + file. + + -- Macro: AT_SKIP_IF (SHELL-CONDITION) + Determine whether the test should be skipped because it requires + features that are unsupported on the machine under test. + SHELL-CONDITION is a shell expression such as a `test' command. + Tests before `AT_SKIP_IF' will be executed and may still cause the + test group to fail. You can instantiate this macro many times + from within the same test group. + + You should use this macro only for very simple skip conditions. + If the SHELL-CONDITION could emit any kind of output you should + instead use `AT_CHECK' like + AT_CHECK([if SHELL-CONDITION; then exit 77; fi]) + so that such output is properly recorded in the `testsuite.log' + file. + + -- Macro: AT_XFAIL_IF (SHELL-CONDITION) + Determine whether the test is expected to fail because it is a + known bug (for unsupported features, you should skip the test). + SHELL-CONDITION is a shell expression such as a `test' command; + you can instantiate this macro many times from within the same + test group, and one of the conditions is enough to turn the test + into an expected failure. + + -- Macro: AT_CLEANUP + End the current test group. + + + -- Macro: AT_DATA (FILE, CONTENTS) + Initialize an input data FILE with given CONTENTS. Of course, the + CONTENTS have to be properly quoted between square brackets to + protect against included commas or spurious M4 expansion. + CONTENTS must be empty or end with a newline. FILE must be a + single shell word that expands into a single file name. + + -- Macro: AT_CHECK (COMMANDS, [STATUS = `0'], [STDOUT], [STDERR], + [RUN-IF-FAIL], [RUN-IF-PASS]) + -- Macro: AT_CHECK_UNQUOTED (COMMANDS, [STATUS = `0'], [STDOUT], + [STDERR], [RUN-IF-FAIL], [RUN-IF-PASS]) + Execute a test by performing given shell COMMANDS in a subshell. + COMMANDS is output as-is, so shell expansions are honored. These + commands should normally exit with STATUS, while producing expected + STDOUT and STDERR contents. If COMMANDS exit with unexpected + status 77, then the rest of the test group is skipped. If + COMMANDS exit with unexpected status 99, then the test group is + immediately failed. Otherwise, if this test fails, run shell + commands RUN-IF-FAIL or, if this test passes, run shell commands + RUN-IF-PASS, both inside the current shell execution environment. + At the beginning of RUN-IF-FAIL and RUN-IF-PASS, the status of + COMMANDS is available in the `at_status' shell variable. + + This macro must be invoked in between `AT_SETUP' and `AT_CLEANUP'. + + If STATUS is the literal `ignore', then the corresponding exit + status is not checked, except for the special cases of 77 (skip) + and 99 (hard failure). The existence of hard failures allows one + to mark a test as an expected failure with `AT_XFAIL_IF' because a + feature has not yet been implemented, but to still distinguish + between gracefully handling the missing feature and dumping core. + A hard failure also inhibits post-test actions in RUN-IF-FAIL. + + If the value of the STDOUT or STDERR parameter is one of the + literals in the following table, then the test treats the output + according to the rules of that literal. Otherwise, the value of + the parameter is treated as text that must exactly match the + output given by COMMANDS on standard output and standard error + (including an empty parameter for no output); any differences are + captured in the testsuite log and the test is failed (unless an + unexpected exit status of 77 skipped the test instead). The + difference between `AT_CHECK' and `AT_CHECK_UNQUOTED' is that only + the latter performs shell variable expansion (`$'), command + substitution (``'), and backslash escaping (`\') on comparison + text given in the STDOUT and STDERR arguments; if the text + includes a trailing newline, this would be the same as if it were + specified via an unquoted here-document. (However, there is no + difference in the interpretation of COMMANDS). + + `ignore' + The content of the output is ignored, but still captured in + the test group log (if the testsuite is run with option `-v', + the test group log is displayed as the test is run; if the + test group later fails, the test group log is also copied + into the overall testsuite log). This action is valid for + both STDOUT and STDERR. + + `ignore-nolog' + The content of the output is ignored, and nothing is captured + in the log files. If COMMANDS are likely to produce binary + output (including long lines) or large amounts of output, + then logging the output can make it harder to locate details + related to subsequent tests within the group, and could + potentially corrupt terminal display of a user running + `testsuite -v'. + + `stdout' + For the STDOUT parameter, capture the content of standard + output to both the file `stdout' and the test group log. + Subsequent commands in the test group can then post-process + the file. This action is often used when it is desired to + use `grep' to look for a substring in the output, or when the + output must be post-processed to normalize error messages + into a common form. + + `stderr' + Like `stdout', except that it only works for the STDERR + parameter, and the standard error capture file will be named + `stderr'. + + `stdout-nolog' + `stderr-nolog' + Like `stdout' or `stderr', except that the captured output is + not duplicated into the test group log. This action is + particularly useful for an intermediate check that produces + large amounts of data, which will be followed by another + check that filters down to the relevant data, as it makes it + easier to locate details in the log. + + `expout' + For the STDOUT parameter, compare standard output contents + with the previously created file `expout', and list any + differences in the testsuite log. + + `experr' + Like `expout', except that it only works for the STDERR + parameter, and the standard error contents are compared with + `experr'. + + -- Macro: AT_CHECK_EUNIT (MODULE, TEST-SPEC, [ERLFLAGS], + [RUN-IF-FAIL], [RUN-IF-PASS]) + Initialize and execute an Erlang module named MODULE that performs + tests following the TEST-SPEC EUnit test specification. TEST-SPEC + must be a valid EUnit test specification, as defined in the EUnit + Reference Manual (http://erlang.org/doc/apps/eunit/index.html). + ERLFLAGS are optional command-line options passed to the Erlang + interpreter to execute the test Erlang module. Typically, + ERLFLAGS defines at least the paths to directories containing the + compiled Erlang modules under test, as `-pa path1 path2 ...'. + + For example, the unit tests associated with Erlang module `testme', + which compiled code is in subdirectory `src', can be performed + with: + + AT_CHECK_EUNIT([testme_testsuite], [{module, testme}], + [-pa "${abs_top_builddir}/src"]) + + This macro must be invoked in between `AT_SETUP' and `AT_CLEANUP'. + + Variables `ERL', `ERLC', and (optionally) `ERLCFLAGS' must be + defined as the path of the Erlang interpreter, the path of the + Erlang compiler, and the command-line flags to pass to the + compiler, respectively. Those variables should be configured in + `configure.ac' using the `AC_ERLANG_PATH_ERL' and + `AC_ERLANG_PATH_ERLC' macros, and the configured values of those + variables are automatically defined in the testsuite. If `ERL' or + `ERLC' is not defined, the test group is skipped. + + If the EUnit library cannot be found, i.e. if module `eunit' cannot + be loaded, the test group is skipped. Otherwise, if TEST-SPEC is + an invalid EUnit test specification, the test group fails. + Otherwise, if the EUnit test passes, shell commands RUN-IF-PASS + are executed or, if the EUnit test fails, shell commands + RUN-IF-FAIL are executed and the test group fails. + + Only the generated test Erlang module is automatically compiled and + executed. If TEST-SPEC involves testing other Erlang modules, + e.g. module `testme' in the example above, those modules must be + already compiled. + + If the testsuite is run in verbose mode, with option `--verbose', + EUnit is also run in verbose mode to output more details about + individual unit tests. + + +File: autoconf.info, Node: testsuite Invocation, Next: Making testsuite Scripts, Prev: Writing Testsuites, Up: Using Autotest + +19.3 Running `testsuite' Scripts +================================ + +Autotest test suites support the following options: + +`--help' +`-h' + Display the list of options and exit successfully. + +`--version' +`-V' + Display the version of the test suite and exit successfully. + +`--directory=DIR' +`-C DIR' + Change the current directory to DIR before creating any files. + Useful for running the testsuite in a subdirectory from a top-level + Makefile. + +`--jobs[=N]' +`-j[N]' + Run N tests in parallel, if possible. If N is not given, run all + given tests in parallel. Note that there should be no space + before the argument to `-j', as `-j NUMBER' denotes the separate + arguments `-j' and `NUMBER', see below. + + In parallel mode, the standard input device of the testsuite + script is not available to commands inside a test group. + Furthermore, banner lines are not printed, and the summary line + for each test group is output after the test group completes. + Summary lines may appear unordered. If verbose and trace output + are enabled (see below), they may appear intermixed from + concurrently running tests. + + Parallel mode requires the `mkfifo' command to work, and will be + silently disabled otherwise. + +`--clean' +`-c' + Remove all the files the test suite might have created and exit. + Meant for `clean' Make targets. + +`--list' +`-l' + List all the tests (or only the selection), including their + possible keywords. + + + By default all tests are performed (or described with `--list') +silently in the default environment, but the environment, set of tests, +and verbosity level can be tuned: + +`VARIABLE=VALUE' + Set the environment VARIABLE to VALUE. Use this rather than + `FOO=foo ./testsuite' as debugging scripts would then run in a + different environment. + + The variable `AUTOTEST_PATH' specifies the testing path to prepend + to `PATH'. Relative directory names (not starting with `/') are + considered to be relative to the top level of the package being + built. All directories are made absolute, first starting from the + top level _build_ tree, then from the _source_ tree. For instance + `./testsuite AUTOTEST_PATH=tests:bin' for a `/src/foo-1.0' source + package built in `/tmp/foo' results in + `/tmp/foo/tests:/tmp/foo/bin' and then + `/src/foo-1.0/tests:/src/foo-1.0/bin' being prepended to `PATH'. + +`NUMBER' +`NUMBER-NUMBER' +`NUMBER-' +`-NUMBER' + Add the corresponding test groups, with obvious semantics, to the + selection. + +`--keywords=KEYWORDS' +`-k KEYWORDS' + Add to the selection the test groups with title or keywords + (arguments to `AT_SETUP' or `AT_KEYWORDS') that match _all_ + keywords of the comma separated list KEYWORDS, case-insensitively. + Use `!' immediately before the keyword to invert the selection for + this keyword. By default, the keywords match whole words; enclose + them in `.*' to also match parts of words. + + For example, running + + ./testsuite -k 'autoupdate,.*FUNC.*' + + selects all tests tagged `autoupdate' _and_ with tags containing + `FUNC' (as in `AC_CHECK_FUNC', `AC_FUNC_ALLOCA', etc.), while + + ./testsuite -k '!autoupdate' -k '.*FUNC.*' + + selects all tests not tagged `autoupdate' _or_ with tags + containing `FUNC'. + +`--errexit' +`-e' + If any test fails, immediately abort testing. This implies + `--debug': post test group clean up, and top-level logging are + inhibited. This option is meant for the full test suite, it is + not really useful for generated debugging scripts. If the + testsuite is run in parallel mode using `--jobs', then + concurrently running tests will finish before exiting. + +`--verbose' +`-v' + Force more verbosity in the detailed output of what is being done. + This is the default for debugging scripts. + +`--color' +`--color[=never|auto|always]' + Enable colored test results. Without an argument, or with + `always', test results will be colored. With `never', color mode + is turned off. Otherwise, if either the macro `AT_COLOR_TESTS' is + used by the testsuite author, or the argument `auto' is given, + then test results are colored if standard output is connected to a + terminal. + +`--debug' +`-d' + Do not remove the files after a test group was performed--but they + are still removed _before_, therefore using this option is sane + when running several test groups. Create debugging scripts. Do + not overwrite the top-level log (in order to preserve a supposedly + existing full log file). This is the default for debugging + scripts, but it can also be useful to debug the testsuite itself. + +`--recheck' + Add to the selection all test groups that failed or passed + unexpectedly during the last non-debugging test run. + +`--trace' +`-x' + Trigger shell tracing of the test groups. + + Besides these options accepted by every Autotest testsuite, the +testsuite author might have added package-specific options via the +`AT_ARG_OPTION' and `AT_ARG_OPTION_ARG' macros (*note Writing +Testsuites::); refer to `testsuite --help' and the package +documentation for details. + + +File: autoconf.info, Node: Making testsuite Scripts, Prev: testsuite Invocation, Up: Using Autotest + +19.4 Making `testsuite' Scripts +=============================== + +For putting Autotest into movement, you need some configuration and +makefile machinery. We recommend, at least if your package uses deep or +shallow hierarchies, that you use `tests/' as the name of the directory +holding all your tests and their makefile. Here is a check list of +things to do. + + - Make sure to create the file `package.m4', which defines the + identity of the package. It must define `AT_PACKAGE_STRING', the + full signature of the package, and `AT_PACKAGE_BUGREPORT', the + address to which bug reports should be sent. For sake of + completeness, we suggest that you also define `AT_PACKAGE_NAME', + `AT_PACKAGE_TARNAME', `AT_PACKAGE_VERSION', and `AT_PACKAGE_URL'. + *Note Initializing configure::, for a description of these + variables. Be sure to distribute `package.m4' and to put it into + the source hierarchy: the test suite ought to be shipped! See + below for an example `Makefile' excerpt. + + - Invoke `AC_CONFIG_TESTDIR'. + + -- Macro: AC_CONFIG_TESTDIR (DIRECTORY, [TEST-PATH = `directory']) + An Autotest test suite is to be configured in DIRECTORY. This + macro causes `DIRECTORY/atconfig' to be created by + `config.status' and sets the default `AUTOTEST_PATH' to + TEST-PATH (*note testsuite Invocation::). + + - Still within `configure.ac', as appropriate, ensure that some + `AC_CONFIG_FILES' command includes substitution for + `tests/atlocal'. + + - The appropriate `Makefile' should be modified so the validation in + your package is triggered by `make check'. An example is provided + below. + + With Automake, here is a minimal example for inclusion in +`tests/Makefile.am', in order to link `make check' with a validation +suite. + + # The `:;' works around a Bash 3.2 bug when the output is not writable. + $(srcdir)/package.m4: $(top_srcdir)/configure.ac + :;{ \ + echo '# Signature of the current package.' && \ + echo 'm4_define([AT_PACKAGE_NAME],' && \ + echo ' [$(PACKAGE_NAME)])' && \ + echo 'm4_define([AT_PACKAGE_TARNAME],' && \ + echo ' [$(PACKAGE_TARNAME)])' && \ + echo 'm4_define([AT_PACKAGE_VERSION],' && \ + echo ' [$(PACKAGE_VERSION)])' && \ + echo 'm4_define([AT_PACKAGE_STRING],' && \ + echo ' [$(PACKAGE_STRING)])' && \ + echo 'm4_define([AT_PACKAGE_BUGREPORT],' && \ + echo ' [$(PACKAGE_BUGREPORT)])'; \ + echo 'm4_define([AT_PACKAGE_URL],' && \ + echo ' [$(PACKAGE_URL)])'; \ + } >'$(srcdir)/package.m4' + + EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) atlocal.in + TESTSUITE = $(srcdir)/testsuite + + check-local: atconfig atlocal $(TESTSUITE) + $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) + + installcheck-local: atconfig atlocal $(TESTSUITE) + $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \ + $(TESTSUITEFLAGS) + + clean-local: + test ! -f '$(TESTSUITE)' || \ + $(SHELL) '$(TESTSUITE)' --clean + + AUTOM4TE = $(SHELL) $(srcdir)/build-aux/missing --run autom4te + AUTOTEST = $(AUTOM4TE) --language=autotest + $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 + $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at + mv $@.tmp $@ + + Note that the built testsuite is distributed; this is necessary +because users might not have Autoconf installed, and thus would not be +able to rebuild it. Likewise, the use of `missing' provides the user +with a nicer error message if they modify a source file to the +testsuite, and accidentally trigger the rebuild rules. + + You might want to list explicitly the dependencies, i.e., the list of +the files `testsuite.at' includes. + + If you don't use Automake, you should include the above example in +`tests/Makefile.in', along with additional lines inspired from the +following: + + subdir = tests + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_URL = @PACKAGE_URL@ + + atconfig: $(top_builddir)/config.status + cd $(top_builddir) && \ + $(SHELL) ./config.status $(subdir)/$@ + + atlocal: $(srcdir)/atlocal.in $(top_builddir)/config.status + cd $(top_builddir) && \ + $(SHELL) ./config.status $(subdir)/$@ + +and manage to have `$(EXTRA_DIST)' distributed. You will also want to +distribute the file `build-aux/missing' from the Automake project; a +copy of this file resides in the Autoconf source tree. + + With all this in place, and if you have not initialized +`TESTSUITEFLAGS' within your makefile, you can fine-tune test suite +execution with this variable, for example: + + make check TESTSUITEFLAGS='-v -d -x 75 -k AC_PROG_CC CFLAGS=-g' + + +File: autoconf.info, Node: FAQ, Next: History, Prev: Using Autotest, Up: Top + +20 Frequent Autoconf Questions, with answers +******************************************** + +Several questions about Autoconf come up occasionally. Here some of +them are addressed. + +* Menu: + +* Distributing:: Distributing `configure' scripts +* Why GNU M4:: Why not use the standard M4? +* Bootstrapping:: Autoconf and GNU M4 require each other? +* Why Not Imake:: Why GNU uses `configure' instead of Imake +* Defining Directories:: Passing `datadir' to program +* Autom4te Cache:: What is it? Can I remove it? +* Present But Cannot Be Compiled:: Compiler and Preprocessor Disagree +* Expanded Before Required:: Expanded Before Required +* Debugging:: Debugging `configure' scripts + + +File: autoconf.info, Node: Distributing, Next: Why GNU M4, Up: FAQ + +20.1 Distributing `configure' Scripts +===================================== + + What are the restrictions on distributing `configure' + scripts that Autoconf generates? How does that affect my + programs that use them? + + There are no restrictions on how the configuration scripts that +Autoconf produces may be distributed or used. In Autoconf version 1, +they were covered by the GNU General Public License. We still encourage +software authors to distribute their work under terms like those of the +GPL, but doing so is not required to use Autoconf. + + Of the other files that might be used with `configure', +`config.h.in' is under whatever copyright you use for your +`configure.ac'. `config.sub' and `config.guess' have an exception to +the GPL when they are used with an Autoconf-generated `configure' +script, which permits you to distribute them under the same terms as +the rest of your package. `install-sh' is from the X Consortium and is +not copyrighted. + + +File: autoconf.info, Node: Why GNU M4, Next: Bootstrapping, Prev: Distributing, Up: FAQ + +20.2 Why Require GNU M4? +======================== + + Why does Autoconf require GNU M4? + + Many M4 implementations have hard-coded limitations on the size and +number of macros that Autoconf exceeds. They also lack several builtin +macros that it would be difficult to get along without in a +sophisticated application like Autoconf, including: + + m4_builtin + m4_indir + m4_bpatsubst + __file__ + __line__ + + Autoconf requires version 1.4.6 or later of GNU M4. + + Since only software maintainers need to use Autoconf, and since GNU +M4 is simple to configure and install, it seems reasonable to require +GNU M4 to be installed also. Many maintainers of GNU and other free +software already have most of the GNU utilities installed, since they +prefer them. + + +File: autoconf.info, Node: Bootstrapping, Next: Why Not Imake, Prev: Why GNU M4, Up: FAQ + +20.3 How Can I Bootstrap? +========================= + + If Autoconf requires GNU M4 and GNU M4 has an Autoconf + `configure' script, how do I bootstrap? It seems like a chicken + and egg problem! + + This is a misunderstanding. Although GNU M4 does come with a +`configure' script produced by Autoconf, Autoconf is not required in +order to run the script and install GNU M4. Autoconf is only required +if you want to change the M4 `configure' script, which few people have +to do (mainly its maintainer). + + +File: autoconf.info, Node: Why Not Imake, Next: Defining Directories, Prev: Bootstrapping, Up: FAQ + +20.4 Why Not Imake? +=================== + + Why not use Imake instead of `configure' scripts? + + Several people have written addressing this question, so adaptations +of their explanations are included here. + + The following answer is based on one written by Richard Pixley: + + Autoconf generated scripts frequently work on machines that it has + never been set up to handle before. That is, it does a good job of + inferring a configuration for a new system. Imake cannot do this. + + Imake uses a common database of host specific data. For X11, this + makes sense because the distribution is made as a collection of + tools, by one central authority who has control over the database. + + GNU tools are not released this way. Each GNU tool has a + maintainer; these maintainers are scattered across the world. + Using a common database would be a maintenance nightmare. + Autoconf may appear to be this kind of database, but in fact it is + not. Instead of listing host dependencies, it lists program + requirements. + + If you view the GNU suite as a collection of native tools, then the + problems are similar. But the GNU development tools can be + configured as cross tools in almost any host+target permutation. + All of these configurations can be installed concurrently. They + can even be configured to share host independent files across + hosts. Imake doesn't address these issues. + + Imake templates are a form of standardization. The GNU coding + standards address the same issues without necessarily imposing the + same restrictions. + + Here is some further explanation, written by Per Bothner: + + One of the advantages of Imake is that it is easy to generate large + makefiles using the `#include' and macro mechanisms of `cpp'. + However, `cpp' is not programmable: it has limited conditional + facilities, and no looping. And `cpp' cannot inspect its + environment. + + All of these problems are solved by using `sh' instead of `cpp'. + The shell is fully programmable, has macro substitution, can + execute (or source) other shell scripts, and can inspect its + environment. + + Paul Eggert elaborates more: + + With Autoconf, installers need not assume that Imake itself is + already installed and working well. This may not seem like much + of an advantage to people who are accustomed to Imake. But on + many hosts Imake is not installed or the default installation is + not working well, and requiring Imake to install a package hinders + the acceptance of that package on those hosts. For example, the + Imake template and configuration files might not be installed + properly on a host, or the Imake build procedure might wrongly + assume that all source files are in one big directory tree, or the + Imake configuration might assume one compiler whereas the package + or the installer needs to use another, or there might be a version + mismatch between the Imake expected by the package and the Imake + supported by the host. These problems are much rarer with + Autoconf, where each package comes with its own independent + configuration processor. + + Also, Imake often suffers from unexpected interactions between + `make' and the installer's C preprocessor. The fundamental problem + here is that the C preprocessor was designed to preprocess C + programs, not makefiles. This is much less of a problem with + Autoconf, which uses the general-purpose preprocessor M4, and + where the package's author (rather than the installer) does the + preprocessing in a standard way. + + Finally, Mark Eichin notes: + + Imake isn't all that extensible, either. In order to add new + features to Imake, you need to provide your own project template, + and duplicate most of the features of the existing one. This + means that for a sophisticated project, using the vendor-provided + Imake templates fails to provide any leverage--since they don't + cover anything that your own project needs (unless it is an X11 + program). + + On the other side, though: + + The one advantage that Imake has over `configure': `Imakefile' + files tend to be much shorter (likewise, less redundant) than + `Makefile.in' files. There is a fix to this, however--at least + for the Kerberos V5 tree, we've modified things to call in common + `post.in' and `pre.in' makefile fragments for the entire tree. + This means that a lot of common things don't have to be + duplicated, even though they normally are in `configure' setups. + + +File: autoconf.info, Node: Defining Directories, Next: Autom4te Cache, Prev: Why Not Imake, Up: FAQ + +20.5 How Do I `#define' Installation Directories? +================================================= + + My program needs library files, installed in `datadir' and + similar. If I use + AC_DEFINE_UNQUOTED([DATADIR], [$datadir], + [Define to the read-only architecture-independent + data directory.]) + + I get + #define DATADIR "${prefix}/share" + +As already explained, this behavior is on purpose, mandated by the GNU +Coding Standards, see *note Installation Directory Variables::. There +are several means to achieve a similar goal: + + - Do not use `AC_DEFINE' but use your makefile to pass the actual + value of `datadir' via compilation flags. *Note Installation + Directory Variables::, for the details. + + - This solution can be simplified when compiling a program: you may + either extend the `CPPFLAGS': + + CPPFLAGS = -DDATADIR='"$(datadir)"' @CPPFLAGS@ + + If you are using Automake, you should use `AM_CPPFLAGS' instead: + + AM_CPPFLAGS = -DDATADIR='"$(datadir)"' + + Alternatively, create a dedicated header file: + + DISTCLEANFILES = myprog-paths.h + myprog-paths.h: Makefile + echo '#define DATADIR "$(datadir)"' >$@ + + The gnulib module `configmake' provides such a header with all the + standard directory variables defined, *note configmake: + (gnulib)configmake. + + - Use `AC_DEFINE' but have `configure' compute the literal value of + `datadir' and others. Many people have wrapped macros to automate + this task; for an example, see the macro `AC_DEFINE_DIR' from the + Autoconf Macro Archive + (http://www.gnu.org/software/autoconf-archive/). + + This solution does not conform to the GNU Coding Standards. + + - Note that all the previous solutions hard wire the absolute name of + these directories in the executables, which is not a good + property. You may try to compute the names relative to `prefix', + and try to find `prefix' at runtime, this way your package is + relocatable. + + +File: autoconf.info, Node: Autom4te Cache, Next: Present But Cannot Be Compiled, Prev: Defining Directories, Up: FAQ + +20.6 What is `autom4te.cache'? +============================== + + What is this directory `autom4te.cache'? Can I safely remove it? + + In the GNU Build System, `configure.ac' plays a central role and is +read by many tools: `autoconf' to create `configure', `autoheader' to +create `config.h.in', `automake' to create `Makefile.in', `autoscan' to +check the completeness of `configure.ac', `autoreconf' to check the GNU +Build System components that are used. To "read `configure.ac'" +actually means to compile it with M4, which can be a long process for +complex `configure.ac'. + + This is why all these tools, instead of running directly M4, invoke +`autom4te' (*note autom4te Invocation::) which, while answering to a +specific demand, stores additional information in `autom4te.cache' for +future runs. For instance, if you run `autoconf', behind the scenes, +`autom4te' also stores information for the other tools, so that when +you invoke `autoheader' or `automake' etc., reprocessing `configure.ac' +is not needed. The speed up is frequently 30%, and is increasing with +the size of `configure.ac'. + + But it is and remains being simply a cache: you can safely remove it. + + + Can I permanently get rid of it? + + The creation of this cache can be disabled from `~/.autom4te.cfg', +see *note Customizing autom4te::, for more details. You should be +aware that disabling the cache slows down the Autoconf test suite by +40%. The more GNU Build System components are used, the more the cache +is useful; for instance running `autoreconf -f' on the Core Utilities +is twice slower without the cache _although `--force' implies that the +cache is not fully exploited_, and eight times slower than without +`--force'. + + +File: autoconf.info, Node: Present But Cannot Be Compiled, Next: Expanded Before Required, Prev: Autom4te Cache, Up: FAQ + +20.7 Header Present But Cannot Be Compiled +========================================== + +The most important guideline to bear in mind when checking for features +is to mimic as much as possible the intended use. Unfortunately, old +versions of `AC_CHECK_HEADER' and `AC_CHECK_HEADERS' failed to follow +this idea, and called the preprocessor, instead of the compiler, to +check for headers. As a result, incompatibilities between headers went +unnoticed during configuration, and maintainers finally had to deal +with this issue elsewhere. + + The transition began with Autoconf 2.56. As of Autoconf 2.64 both +checks are performed, and `configure' complains loudly if the compiler +and the preprocessor do not agree. However, only the compiler result +is considered. + + Consider the following example: + + $ cat number.h + typedef int number; + $ cat pi.h + const number pi = 3; + $ cat configure.ac + AC_INIT([Example], [1.0], [bug-example@example.org]) + AC_CHECK_HEADERS([pi.h]) + $ autoconf -Wall + $ ./configure + checking for gcc... gcc + checking for C compiler default output file name... a.out + checking whether the C compiler works... yes + checking whether we are cross compiling... no + checking for suffix of executables... + checking for suffix of object files... o + checking whether we are using the GNU C compiler... yes + checking whether gcc accepts -g... yes + checking for gcc option to accept ISO C89... none needed + checking how to run the C preprocessor... gcc -E + checking for grep that handles long lines and -e... grep + checking for egrep... grep -E + checking for ANSI C header files... yes + checking for sys/types.h... yes + checking for sys/stat.h... yes + checking for stdlib.h... yes + checking for string.h... yes + checking for memory.h... yes + checking for strings.h... yes + checking for inttypes.h... yes + checking for stdint.h... yes + checking for unistd.h... yes + checking pi.h usability... no + checking pi.h presence... yes + configure: WARNING: pi.h: present but cannot be compiled + configure: WARNING: pi.h: check for missing prerequisite headers? + configure: WARNING: pi.h: see the Autoconf documentation + configure: WARNING: pi.h: section "Present But Cannot Be Compiled" + configure: WARNING: pi.h: proceeding with the compiler's result + configure: WARNING: ## -------------------------------------- ## + configure: WARNING: ## Report this to bug-example@example.org ## + configure: WARNING: ## -------------------------------------- ## + checking for pi.h... yes + +The proper way the handle this case is using the fourth argument (*note +Generic Headers::): + + $ cat configure.ac + AC_INIT([Example], [1.0], [bug-example@example.org]) + AC_CHECK_HEADERS([number.h pi.h], [], [], + [[#ifdef HAVE_NUMBER_H + # include <number.h> + #endif + ]]) + $ autoconf -Wall + $ ./configure + checking for gcc... gcc + checking for C compiler default output... a.out + checking whether the C compiler works... yes + checking whether we are cross compiling... no + checking for suffix of executables... + checking for suffix of object files... o + checking whether we are using the GNU C compiler... yes + checking whether gcc accepts -g... yes + checking for gcc option to accept ANSI C... none needed + checking for number.h... yes + checking for pi.h... yes + + See *note Particular Headers::, for a list of headers with their +prerequisites. + + +File: autoconf.info, Node: Expanded Before Required, Next: Debugging, Prev: Present But Cannot Be Compiled, Up: FAQ + +20.8 Expanded Before Required +============================= + +Older versions of Autoconf silently built files with incorrect ordering +between dependent macros if an outer macro first expanded, then later +indirectly required, an inner macro. Starting with Autoconf 2.64, this +situation no longer generates out-of-order code, but results in +duplicate output and a syntax warning: + + $ cat configure.ac + =>AC_DEFUN([TESTA], [[echo in A + =>if test -n "$SEEN_A" ; then echo duplicate ; fi + =>SEEN_A=:]]) + =>AC_DEFUN([TESTB], [AC_REQUIRE([TESTA])[echo in B + =>if test -z "$SEEN_A" ; then echo bug ; fi]]) + =>AC_DEFUN([TESTC], [AC_REQUIRE([TESTB])[echo in C]]) + =>AC_DEFUN([OUTER], [[echo in OUTER] + =>TESTA + =>TESTC]) + =>AC_INIT + =>OUTER + =>AC_OUTPUT + $ autoconf + =>configure.ac:11: warning: AC_REQUIRE: + => `TESTA' was expanded before it was required + =>configure.ac:4: TESTB is expanded from... + =>configure.ac:6: TESTC is expanded from... + =>configure.ac:7: OUTER is expanded from... + =>configure.ac:11: the top level + +To avoid this warning, decide what purpose the macro in question serves. +If it only needs to be expanded once (for example, if it provides +initialization text used by later macros), then the simplest fix is to +change the macro to be declared with `AC_DEFUN_ONCE' (*note One-Shot +Macros::), although this only works in Autoconf 2.64 and newer. A more +portable fix is to change all instances of direct calls to instead go +through `AC_REQUIRE' (*note Prerequisite Macros::). If, instead, the +macro is parameterized by arguments or by the current definition of +other macros in the m4 environment, then the macro should always be +directly expanded instead of required. + + For another case study, consider this example trimmed down from an +actual package. Originally, the package contained shell code and +multiple macro invocations at the top level of `configure.ac': + + AC_DEFUN([FOO], [AC_COMPILE_IFELSE([...])]) + foobar= + AC_PROG_CC + FOO + +but that was getting complex, so the author wanted to offload some of +the text into a new macro in another file included via `aclocal.m4'. +The nai"ve approach merely wraps the text in a new macro: + + AC_DEFUN([FOO], [AC_COMPILE_IFELSE([...])]) + AC_DEFUN([BAR], [ + foobar= + AC_PROG_CC + FOO + ]) + BAR + +With older versions of Autoconf, the setting of `foobar=' occurs before +the single compiler check, as the author intended. But with Autoconf +2.64, this issues the "expanded before it was required" warning for +`AC_PROG_CC', and outputs two copies of the compiler check, one before +`foobar=', and one after. To understand why this is happening, +remember that the use of `AC_COMPILE_IFELSE' includes a call to +`AC_REQUIRE([AC_PROG_CC])' under the hood. According to the documented +semantics of `AC_REQUIRE', this means that `AC_PROG_CC' _must_ occur +before the body of the outermost `AC_DEFUN', which in this case is +`BAR', thus preceding the use of `foobar='. The older versions of +Autoconf were broken with regards to the rules of `AC_REQUIRE', which +explains why the code changed from one over to two copies of +`AC_PROG_CC' when upgrading autoconf. In other words, the author was +unknowingly relying on a bug exploit to get the desired results, and +that exploit broke once the bug was fixed. + + So, what recourse does the author have, to restore their intended +semantics of setting `foobar=' prior to a single compiler check, +regardless of whether Autoconf 2.63 or 2.64 is used? One idea is to +remember that only `AC_DEFUN' is impacted by `AC_REQUIRE'; there is +always the possibility of using the lower-level `m4_define': + + AC_DEFUN([FOO], [AC_COMPILE_IFELSE([...])]) + m4_define([BAR], [ + foobar= + AC_PROG_CC + FOO + ]) + BAR + +This works great if everything is in the same file. However, it does +not help in the case where the author wants to have `aclocal' find the +definition of `BAR' from its own file, since `aclocal' requires the use +of `AC_DEFUN'. In this case, a better fix is to recognize that if +`BAR' also uses `AC_REQUIRE', then there will no longer be direct +expansion prior to a subsequent require. Then, by creating yet another +helper macro, the author can once again guarantee a single invocation of +`AC_PROG_CC', which will still occur after `foobar='. The author can +also use `AC_BEFORE' to make sure no other macro appearing before `BAR' +has triggered an unwanted expansion of `AC_PROG_CC'. + + AC_DEFUN([FOO], [AC_COMPILE_IFELSE([...])]) + AC_DEFUN([BEFORE_CC], [ + foobar= + ]) + AC_DEFUN([BAR], [ + AC_BEFORE([$0], [AC_PROG_CC])dnl + AC_REQUIRE([BEFORE_CC])dnl + AC_REQUIRE([AC_PROG_CC])dnl + FOO + ]) + BAR + + +File: autoconf.info, Node: Debugging, Prev: Expanded Before Required, Up: FAQ + +20.9 Debugging `configure' scripts +================================== + +While in general, `configure' scripts generated by Autoconf strive to +be fairly portable to various systems, compilers, shells, and other +tools, it may still be necessary to debug a failing test, broken script +or makefile, or fix or override an incomplete, faulty, or erroneous +test, especially during macro development. Failures can occur at all +levels, in M4 syntax or semantics, shell script issues, or due to bugs +in the test or the tools invoked by `configure'. Together with the +rather arcane error message that `m4' and `make' may produce when their +input contains syntax errors, this can make debugging rather painful. + + Nevertheless, here is a list of hints and strategies that may help: + + * When `autoconf' fails, common causes for error include: + + * mismatched or unbalanced parentheses or braces (*note + Balancing Parentheses::), + + * under- or overquoted macro arguments (*note Autoconf + Language::, *note Quoting and Parameters::, *note Quotation + and Nested Macros::), + + * spaces between macro name and opening parenthesis (*note + Autoconf Language::). + + Typically, it helps to go back to the last working version of the + input and compare the differences for each of these errors. + Another possibility is to sprinkle pairs of `m4_traceon' and + `m4_traceoff' judiciously in the code, either without a parameter + or listing some macro names and watch `m4' expand its input + verbosely (*note Debugging via autom4te::). + + * Sometimes `autoconf' succeeds but the generated `configure' script + has invalid shell syntax. You can detect this case by running + `bash -n configure' or `sh -n configure'. If this command fails, + the same tips apply, as if `autoconf' had failed. + + * Debugging `configure' script execution may be done by sprinkling + pairs of `set -x' and `set +x' into the shell script before and + after the region that contains a bug. Running the whole script + with `SHELL -vx ./configure 2>&1 | tee LOG-FILE' with a decent + SHELL may work, but produces lots of output. Here, it can help to + search for markers like `checking for' a particular test in the + LOG-FILE. + + * Alternatively, you might use a shell with debugging capabilities + like bashdb (http://bashdb.sourceforge.net/). + + * When `configure' tests produce invalid results for your system, it + may be necessary to override them: + + * For programs, tools or libraries variables, preprocessor, + compiler, or linker flags, it is often sufficient to override + them at `make' run time with some care (*note Macros and + Submakes::). Since this normally won't cause `configure' to + be run again with these changed settings, it may fail if the + changed variable would have caused different test results + from `configure', so this may work only for simple + differences. + + * Most tests which produce their result in a substituted + variable allow to override the test by setting the variable + on the `configure' command line (*note Compilers and + Options::, *note Defining Variables::, *note Particular + Systems::). + + * Many tests store their result in a cache variable (*note + Caching Results::). This lets you override them either on the + `configure' command line as above, or through a primed cache + or site file (*note Cache Files::, *note Site Defaults::). + The name of a cache variable is documented with a test macro + or may be inferred from *note Cache Variable Names::; the + precise semantics of undocumented variables are often + internal details, subject to change. + + * Alternatively, `configure' may produce invalid results because of + uncaught programming errors, in your package or in an upstream + library package. For example, when `AC_CHECK_LIB' fails to find a + library with a specified function, always check `config.log'. This + will reveal the exact error that produced the failing result: the + library linked by `AC_CHECK_LIB' probably has a fatal bug. + + Conversely, as macro author, you can make it easier for users of your +macro: + + * by minimizing dependencies between tests and between test results + as far as possible, + + * by using `make' variables to factorize and allow override of + settings at `make' run time, + + * by honoring the GNU Coding Standards and not overriding flags + reserved for the user except temporarily during `configure' tests, + + * by not requiring users of your macro to use the cache variables. + Instead, expose the result of the test via RUN-IF-TRUE and + RUN-IF-FALSE parameters. If the result is not a boolean, then + provide it through documented shell variables. + + +File: autoconf.info, Node: History, Next: GNU Free Documentation License, Prev: FAQ, Up: Top + +21 History of Autoconf +********************** + +_This chapter was written by the original author, David MacKenzie._ + + You may be wondering, Why was Autoconf originally written? How did +it get into its present form? (Why does it look like gorilla spit?) If +you're not wondering, then this chapter contains no information useful +to you, and you might as well skip it. If you _are_ wondering, then +let there be light... + +* Menu: + +* Genesis:: Prehistory and naming of `configure' +* Exodus:: The plagues of M4 and Perl +* Leviticus:: The priestly code of portability arrives +* Numbers:: Growth and contributors +* Deuteronomy:: Approaching the promises of easy configuration + + +File: autoconf.info, Node: Genesis, Next: Exodus, Up: History + +21.1 Genesis +============ + +In June 1991 I was maintaining many of the GNU utilities for the Free +Software Foundation. As they were ported to more platforms and more +programs were added, the number of `-D' options that users had to +select in the makefile (around 20) became burdensome. Especially for +me--I had to test each new release on a bunch of different systems. So +I wrote a little shell script to guess some of the correct settings for +the fileutils package, and released it as part of fileutils 2.0. That +`configure' script worked well enough that the next month I adapted it +(by hand) to create similar `configure' scripts for several other GNU +utilities packages. Brian Berliner also adapted one of my scripts for +his CVS revision control system. + + Later that summer, I learned that Richard Stallman and Richard Pixley +were developing similar scripts to use in the GNU compiler tools; so I +adapted my `configure' scripts to support their evolving interface: +using the file name `Makefile.in' as the templates; adding `+srcdir', +the first option (of many); and creating `config.status' files. + + +File: autoconf.info, Node: Exodus, Next: Leviticus, Prev: Genesis, Up: History + +21.2 Exodus +=========== + +As I got feedback from users, I incorporated many improvements, using +Emacs to search and replace, cut and paste, similar changes in each of +the scripts. As I adapted more GNU utilities packages to use +`configure' scripts, updating them all by hand became impractical. +Rich Murphey, the maintainer of the GNU graphics utilities, sent me +mail saying that the `configure' scripts were great, and asking if I +had a tool for generating them that I could send him. No, I thought, +but I should! So I started to work out how to generate them. And the +journey from the slavery of hand-written `configure' scripts to the +abundance and ease of Autoconf began. + + Cygnus `configure', which was being developed at around that time, +is table driven; it is meant to deal mainly with a discrete number of +system types with a small number of mainly unguessable features (such as +details of the object file format). The automatic configuration system +that Brian Fox had developed for Bash takes a similar approach. For +general use, it seems to me a hopeless cause to try to maintain an +up-to-date database of which features each variant of each operating +system has. It's easier and more reliable to check for most features on +the fly--especially on hybrid systems that people have hacked on +locally or that have patches from vendors installed. + + I considered using an architecture similar to that of Cygnus +`configure', where there is a single `configure' script that reads +pieces of `configure.in' when run. But I didn't want to have to +distribute all of the feature tests with every package, so I settled on +having a different `configure' made from each `configure.in' by a +preprocessor. That approach also offered more control and flexibility. + + I looked briefly into using the Metaconfig package, by Larry Wall, +Harlan Stenn, and Raphael Manfredi, but I decided not to for several +reasons. The `Configure' scripts it produces are interactive, which I +find quite inconvenient; I didn't like the ways it checked for some +features (such as library functions); I didn't know that it was still +being maintained, and the `Configure' scripts I had seen didn't work on +many modern systems (such as System V R4 and NeXT); it wasn't flexible +in what it could do in response to a feature's presence or absence; I +found it confusing to learn; and it was too big and complex for my +needs (I didn't realize then how much Autoconf would eventually have to +grow). + + I considered using Perl to generate my style of `configure' scripts, +but decided that M4 was better suited to the job of simple textual +substitutions: it gets in the way less, because output is implicit. +Plus, everyone already has it. (Initially I didn't rely on the GNU +extensions to M4.) Also, some of my friends at the University of +Maryland had recently been putting M4 front ends on several programs, +including `tvtwm', and I was interested in trying out a new language. + + +File: autoconf.info, Node: Leviticus, Next: Numbers, Prev: Exodus, Up: History + +21.3 Leviticus +============== + +Since my `configure' scripts determine the system's capabilities +automatically, with no interactive user intervention, I decided to call +the program that generates them Autoconfig. But with a version number +tacked on, that name would be too long for old Unix file systems, so I +shortened it to Autoconf. + + In the fall of 1991 I called together a group of fellow questers +after the Holy Grail of portability (er, that is, alpha testers) to +give me feedback as I encapsulated pieces of my handwritten scripts in +M4 macros and continued to add features and improve the techniques used +in the checks. Prominent among the testers were Franc,ois Pinard, who +came up with the idea of making an Autoconf shell script to run M4 and +check for unresolved macro calls; Richard Pixley, who suggested running +the compiler instead of searching the file system to find include files +and symbols, for more accurate results; Karl Berry, who got Autoconf to +configure TeX and added the macro index to the documentation; and Ian +Lance Taylor, who added support for creating a C header file as an +alternative to putting `-D' options in a makefile, so he could use +Autoconf for his UUCP package. The alpha testers cheerfully adjusted +their files again and again as the names and calling conventions of the +Autoconf macros changed from release to release. They all contributed +many specific checks, great ideas, and bug fixes. + + +File: autoconf.info, Node: Numbers, Next: Deuteronomy, Prev: Leviticus, Up: History + +21.4 Numbers +============ + +In July 1992, after months of alpha testing, I released Autoconf 1.0, +and converted many GNU packages to use it. I was surprised by how +positive the reaction to it was. More people started using it than I +could keep track of, including people working on software that wasn't +part of the GNU Project (such as TCL, FSP, and Kerberos V5). Autoconf +continued to improve rapidly, as many people using the `configure' +scripts reported problems they encountered. + + Autoconf turned out to be a good torture test for M4 implementations. +Unix M4 started to dump core because of the length of the macros that +Autoconf defined, and several bugs showed up in GNU M4 as well. +Eventually, we realized that we needed to use some features that only +GNU M4 has. 4.3BSD M4, in particular, has an impoverished set of +builtin macros; the System V version is better, but still doesn't +provide everything we need. + + More development occurred as people put Autoconf under more stresses +(and to uses I hadn't anticipated). Karl Berry added checks for X11. +david zuhn contributed C++ support. Franc,ois Pinard made it diagnose +invalid arguments. Jim Blandy bravely coerced it into configuring GNU +Emacs, laying the groundwork for several later improvements. Roland +McGrath got it to configure the GNU C Library, wrote the `autoheader' +script to automate the creation of C header file templates, and added a +`--verbose' option to `configure'. Noah Friedman added the +`--autoconf-dir' option and `AC_MACRODIR' environment variable. (He +also coined the term "autoconfiscate" to mean "adapt a software package +to use Autoconf".) Roland and Noah improved the quoting protection in +`AC_DEFINE' and fixed many bugs, especially when I got sick of dealing +with portability problems from February through June, 1993. + + +File: autoconf.info, Node: Deuteronomy, Prev: Numbers, Up: History + +21.5 Deuteronomy +================ + +A long wish list for major features had accumulated, and the effect of +several years of patching by various people had left some residual +cruft. In April 1994, while working for Cygnus Support, I began a major +revision of Autoconf. I added most of the features of the Cygnus +`configure' that Autoconf had lacked, largely by adapting the relevant +parts of Cygnus `configure' with the help of david zuhn and Ken +Raeburn. These features include support for using `config.sub', +`config.guess', `--host', and `--target'; making links to files; and +running `configure' scripts in subdirectories. Adding these features +enabled Ken to convert GNU `as', and Rob Savoye to convert DejaGNU, to +using Autoconf. + + I added more features in response to other peoples' requests. Many +people had asked for `configure' scripts to share the results of the +checks between runs, because (particularly when configuring a large +source tree, like Cygnus does) they were frustratingly slow. Mike +Haertel suggested adding site-specific initialization scripts. People +distributing software that had to unpack on MS-DOS asked for a way to +override the `.in' extension on the file names, which produced file +names like `config.h.in' containing two dots. Jim Avera did an +extensive examination of the problems with quoting in `AC_DEFINE' and +`AC_SUBST'; his insights led to significant improvements. Richard +Stallman asked that compiler output be sent to `config.log' instead of +`/dev/null', to help people debug the Emacs `configure' script. + + I made some other changes because of my dissatisfaction with the +quality of the program. I made the messages showing results of the +checks less ambiguous, always printing a result. I regularized the +names of the macros and cleaned up coding style inconsistencies. I +added some auxiliary utilities that I had developed to help convert +source code packages to use Autoconf. With the help of Franc,ois +Pinard, I made the macros not interrupt each others' messages. (That +feature revealed some performance bottlenecks in GNU M4, which he +hastily corrected!) I reorganized the documentation around problems +people want to solve. And I began a test suite, because experience had +shown that Autoconf has a pronounced tendency to regress when we change +it. + + Again, several alpha testers gave invaluable feedback, especially +Franc,ois Pinard, Jim Meyering, Karl Berry, Rob Savoye, Ken Raeburn, +and Mark Eichin. + + Finally, version 2.0 was ready. And there was much rejoicing. (And +I have free time again. I think. Yeah, right.) + + +File: autoconf.info, Node: GNU Free Documentation License, Next: Indices, Prev: History, Up: Top + +Appendix A GNU Free Documentation License +***************************************** + + Version 1.3, 3 November 2008 + + Copyright (C) 2000, 2001, 2002, 2007, 2008 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. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. + We recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it + can be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + "Document", below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as "you". You + accept the license if you copy, modify or distribute the work in a + way requiring permission under copyright law. + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in + the notice that says that the Document is released under this + License. If a section does not fit the above definition of + Secondary then it is not allowed to be designated as Invariant. + The Document may contain zero Invariant Sections. If the Document + does not identify any Invariant Sections then there are none. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images + composed of pixels) generic paint programs or (for drawings) some + widely available drawing editor, and that is suitable for input to + text formatters or for automatic translation to a variety of + formats suitable for input to text formatters. A copy made in an + otherwise Transparent file format whose markup, or absence of + markup, has been arranged to thwart or discourage subsequent + modification by readers is not Transparent. An image format is + not Transparent if used for any substantial amount of text. A + copy that is not "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and + standard-conforming simple HTML, PostScript or PDF designed for + human modification. Examples of transparent image formats include + PNG, XCF and JPG. Opaque formats include proprietary formats that + can be read and edited only by proprietary word processors, SGML or + XML for which the DTD and/or processing tools are not generally + available, and the machine-generated HTML, PostScript or PDF + produced by some word processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + The "publisher" means any person or entity that distributes copies + of the Document to the public. + + A section "Entitled XYZ" means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + "Acknowledgements", "Dedications", "Endorsements", or "History".) + To "Preserve the Title" of such a section when you modify the + Document means that it remains a section "Entitled XYZ" according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow + the conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document's license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the + title equally prominent and visible. You may add other material + on the covers in addition. Copying with changes limited to the + covers, as long as they preserve the title of the Document and + satisfy these conditions, can be treated as verbatim copying in + other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a + machine-readable Transparent copy along with each Opaque copy, or + state in or with each Opaque copy a computer-network location from + which the general network-using public has access to download + using public-standard network protocols a complete Transparent + copy of the Document, free of added material. If you use the + latter option, you must take reasonably prudent steps, when you + begin distribution of Opaque copies in quantity, to ensure that + this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you + distribute an Opaque copy (directly or through your agents or + retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of + copies, to give them a chance to provide you with an updated + version of the Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with + the Modified Version filling the role of the Document, thus + licensing distribution and modification of the Modified Version to + whoever possesses a copy of it. In addition, you must do these + things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of + previous versions (which should, if there were any, be listed + in the History section of the Document). You may use the + same title as a previous version if the original publisher of + that version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled "History", Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on + the Title Page. If there is no section Entitled "History" in + the Document, create one stating the title, year, authors, + and publisher of the Document as given on its Title Page, + then add an item describing the Modified Version as stated in + the previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in + the "History" section. You may omit a network location for a + work that was published at least four years before the + Document itself, or if the original publisher of the version + it refers to gives permission. + + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the + section all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section + titles. + + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + "Endorsements" or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option + designate some or all of these sections as invariant. To do this, + add their titles to the list of Invariant Sections in the Modified + Version's license notice. These titles must be distinct from any + other section titles. + + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end + of the list of Cover Texts in the Modified Version. Only one + passage of Front-Cover Text and one of Back-Cover Text may be + added by (or through arrangements made by) any one entity. If the + Document already includes a cover text for the same cover, + previously added by you or by arrangement made by the same entity + you are acting on behalf of, you may not add another; but you may + replace the old one, on explicit permission from the previous + publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination + all of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + "History" in the various original documents, forming one section + Entitled "History"; likewise combine any sections Entitled + "Acknowledgements", and any sections Entitled "Dedications". You + must delete all sections Entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the + documents in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow + this License in all other respects regarding verbatim copying of + that document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of + a storage or distribution medium, is called an "aggregate" if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation's users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document's Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + 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, receipt of a copy of some or all of + the same material does not give you any rights to use it. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + `http://www.gnu.org/copyleft/'. + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If + the Document does not specify a version number of this License, + you may choose any version ever published (not as a draft) by the + Free Software Foundation. If the Document specifies that a proxy + can decide which future versions of this License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A "Massive Multiauthor Collaboration" (or "MMC") contained in the + site means any set of copyrightable works thus published on the MMC + site. + + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + "Incorporate" means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + + +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + + If you have Invariant Sections, Front-Cover Texts and Back-Cover +Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + + If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + + If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, to +permit their use in free software. + + +File: autoconf.info, Node: Indices, Prev: GNU Free Documentation License, Up: Top + +Appendix B Indices +****************** + +* Menu: + +* Environment Variable Index:: Index of environment variables used +* Output Variable Index:: Index of variables set in output files +* Preprocessor Symbol Index:: Index of C preprocessor symbols defined +* Cache Variable Index:: Index of documented cache variables +* Autoconf Macro Index:: Index of Autoconf macros +* M4 Macro Index:: Index of M4, M4sugar, and M4sh macros +* Autotest Macro Index:: Index of Autotest macros +* Program & Function Index:: Index of those with portability problems +* Concept Index:: General index + + +File: autoconf.info, Node: Environment Variable Index, Next: Output Variable Index, Up: Indices + +B.1 Environment Variable Index +============================== + +This is an alphabetical list of the environment variables that might +influence Autoconf checks. + +