Copying autoconf 2.13 into the legacy part of the trunk.

git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@15332 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2005-12-05 13:23:14 +00:00
parent 77f19290fd
commit c62c4a49d7
47 changed files with 42248 additions and 0 deletions

3
legacy/autoconf/AUTHORS Normal file
View File

@ -0,0 +1,3 @@
Written by David MacKenzie, with help from
Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
Roland McGrath, Noah Friedman, david d zuhn, and many others.

340
legacy/autoconf/COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

2377
legacy/autoconf/ChangeLog Normal file

File diff suppressed because it is too large Load Diff

343
legacy/autoconf/ChangeLog.0 Normal file
View File

@ -0,0 +1,343 @@
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.

1920
legacy/autoconf/ChangeLog.1 Normal file

File diff suppressed because it is too large Load Diff

183
legacy/autoconf/INSTALL Normal file
View File

@ -0,0 +1,183 @@
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

228
legacy/autoconf/Makefile.in Normal file
View File

@ -0,0 +1,228 @@
# Makefile for Autoconf.
# Copyright (C) 1992, 1993, 1994, 1998 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#### Start of system configuration section. ####
srcdir = @srcdir@
VPATH = @srcdir@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
M4 = @M4@
AWK = @AWK@
PERL = @PERL@
# Programs that are ALWAYS installed (and are created in the build dir).
ASCRIPTS = autoconf autoheader autoreconf autoupdate ifnames
# M4 input that is frozen.
M4FROZEN = autoconf.m4f autoheader.m4f
# All programs, including those only installed if you have perl.
SCRIPTS = $(ASCRIPTS) @SCRIPTS@
transform=@program_transform_name@
prefix = @prefix@
exec_prefix = @exec_prefix@
# Directory in which to install scripts.
bindir = @bindir@
# Directory in which to install library files.
datadir = @datadir@
acdatadir = $(datadir)/autoconf
# Directory in which to install documentation info files.
infodir = @infodir@
#### End of system configuration section. ####
SHELL = @SHELL@
SUBDIRS = testsuite
M4FILES = autoconf.m4 acgeneral.m4 acoldnames.m4 acspecific.m4 autoheader.m4
# Files that can be generated, but should be up to date for a distribution.
DISTDEP = info Makefile
# Files to distribute.
DISTFILES = AUTHORS COPYING ChangeLog ChangeLog.1 INSTALL \
Makefile.in NEWS README TODO $(M4FILES) \
acconfig.h acfunctions acheaders acidentifiers \
acmakevars acprograms autoconf.info* \
autoconf.sh autoconf.texi install.texi \
autoheader.sh autoscan.pl autoreconf.sh autoupdate.sh ifnames.sh \
config.guess config.sub configure configure.in \
install-sh mkinstalldirs texinfo.tex \
testsuite/Makefile.in testsuite/config/*.exp \
testsuite/lib/*.exp testsuite/autoconf.[gs]/*.exp \
standards.texi make-stds.texi standards.info*
editsh = sed -e 's,@''datadir''@,$(acdatadir),g' -e \
's,@''M4''@,$(M4),g' -e 's,@''AWK''@,$(AWK),g' \
-e 's,@''SHELL''@,$(SHELL),g'
editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g'
all: ${SCRIPTS} ${M4FROZEN} info
.SUFFIXES:
.SUFFIXES: .sh .pl .m4 .m4f
.sh:
rm -f $@ $@.tmp
$(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
.pl:
rm -f $@ $@.tmp
$(editpl) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
.m4.m4f:
@case `$(M4) --help </dev/null 2>&1` in \
*reload-state*) echo freezing $*.m4; \
$(M4) -F $*.m4f -I${srcdir} ${srcdir}/$*.m4 ;; \
*traditional*) ;; \
*) echo Error: Autoconf requires GNU m4 1.1 or later; exit 1 ;; \
esac
autoconf.m4f: autoconf.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
autoheader.m4f: autoheader.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
info: autoconf.info @standards_info@ INSTALL
# Use --no-split to avoid creating filenames > 14 chars.
autoconf.info: autoconf.texi install.texi
$(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
INSTALL: install.texi
$(MAKEINFO) -I$(srcdir) $(srcdir)/install.texi --output=$@ \
--no-headers --no-validate
standards.info: standards.texi make-stds.texi
$(MAKEINFO) -I$(srcdir) $(srcdir)/standards.texi --no-split --output=$@
dvi: autoconf.dvi @standards_dvi@
autoconf.dvi: autoconf.texi
$(TEXI2DVI) $(srcdir)/autoconf.texi
standards.dvi: standards.texi make-stds.texi
$(TEXI2DVI) $(srcdir)/standards.texi
check: all
rootme=`pwd`; srcrootme=`cd $(srcdir); pwd`; \
test -r install-sh || cp $(srcdir)/install-sh .; \
cd testsuite && ${MAKE} $@ AUTOCONF=$$rootme/autoconf \
AUTOCONFFLAGS="-m $$srcrootme"
installcheck: all install
cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@
installdirs:
$(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir)
install: all $(M4FILES) acconfig.h installdirs install-info
for p in $(ASCRIPTS); do \
$(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
done
for i in $(M4FROZEN); do \
$(INSTALL_DATA) $$i $(acdatadir)/$$i; \
done
for i in $(M4FILES) acconfig.h; do \
$(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
done
-if test -f autoscan; then \
$(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \
for i in acfunctions acheaders acidentifiers acprograms \
acmakevars; do \
$(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
done; \
else :; fi
# Don't cd, to avoid breaking install-sh references.
install-info: info installdirs
if test -f autoconf.info; then \
for i in *.info*; do \
$(INSTALL_DATA) $$i $(infodir)/$$i; \
done; \
else \
for i in $(srcdir)/*.info*; do \
$(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
done; \
fi
uninstall:
for p in $(SCRIPTS); do \
rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
done
rm -fr $(acdatadir)
cd $(infodir) && rm -f autoconf.info*
if test -f standards.info || test -f $(srcdir)/standards.info; \
then cd $(infodir) && rm -f standards.info*; fi
${srcdir}/configure: configure.in $(M4FILES)
cd $(srcdir) && \
rm -f configure configure.tmp && \
$(M4) autoconf.m4 configure.in > configure.tmp && \
chmod +x configure.tmp && mv configure.tmp configure
Makefile: Makefile.in config.status
$(SHELL) ./config.status
config.status: configure
$(SHELL) ./config.status --recheck
maintainer-clean::
@echo "This command is intended for maintainers to use;"
@echo "rebuilding the deleted files requires makeinfo."
rm -f TAGS *.info* INSTALL
clean mostlyclean distclean maintainer-clean::
for dir in $(SUBDIRS); do \
echo making $@ in $$dir ; \
(cd $$dir && $(MAKE) $@) ; \
done
clean mostlyclean distclean maintainer-clean::
rm -f $(SCRIPTS) *.tmp
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
rm -f *.ev *.evs *.ov *.ovs *.cv *.cvs *.ma *.mas
distclean maintainer-clean::
rm -f Makefile config.status config.cache config.log
TAGS:
etags ${srcdir}/*.m4 ${srcdir}/*.sh ${srcdir}/[a-z]*.in ${srcdir}/*.texi
# Don't depend on DISTFILES because there's no rule for "standards.info*".
dist: $(DISTDEP)
distname=`sed -e '/define(AC_ACVERSION,/!d' \
-e 's/[^0-9.]*\([0-9.]*\).*/autoconf-\1/' -e q acgeneral.m4`; \
rm -fr $$distname; \
mkdir $$distname $$distname/testsuite $$distname/testsuite/config \
$$distname/testsuite/lib $$distname/testsuite/autoconf.g \
$$distname/testsuite/autoconf.s; \
for file in $(DISTFILES); do \
ln $$file $$distname/$$file \
|| { echo copying $$file instead; cp -p $$file $$distname/$$file;}; \
done; \
chmod -R a+rX $$distname; \
tar -chz -f $$distname.tar.gz $$distname; \
rm -fr $$distname

368
legacy/autoconf/NEWS Normal file
View File

@ -0,0 +1,368 @@
Major changes in release 2.13:
* Support for building on Win32 systems where the only available C or
C++ compiler is the Microsoft Visual C++ command line compiler
(`cl'). Additional support for building on Win32 systems which are
using the Cygwin or Mingw32 environments.
* Support for alternative object file and executable file extensions.
On Win32, 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 modernise
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 release 2.12:
* 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 release 2.11:
* 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 release 2.10:
* 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 releases 2.6 through 2.9:
* Bug fixes.
Major changes in release 2.5:
* 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 path to 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 release 2.4:
* Fix a few bugs found by Emacs testers.
Major changes in release 2.3:
* 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 release 2.2:
* 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 release 2.1:
* 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 release 2.0:
** 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 release 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 release 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 release 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 release 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.
** Paths 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 release 1.7:
* New macro AC_OBSOLETE.
* Bugs in Makefile.in fixed.
* AC_LONG_FILE_NAMES improved.
Major changes in release 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 release 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 release 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
path 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 filenames it outputs. Instead, you can
set the shell variables `gen_files' and `gen_config' to the list of
filenames 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 release 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 release 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 release 1.1:
Added AC_STRCOLL macro.
Made AC_GETLOADAVG check for more things.
AC_OUTPUT argument is now optional.
Various bug fixes.

39
legacy/autoconf/README Normal file
View File

@ -0,0 +1,39 @@
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. You
must install GNU m4 (version 1.1 or later, preferably 1.3 or later
for better performance) before configuring Autoconf, so that
Autoconf's configure script can find it. The configuration scripts
produced by Autoconf are self-contained, so their users do not need to
have Autoconf (or GNU m4).
Also, some optional utilities that come with Autoconf use Perl, TCL,
and the TCL packages Expect and DejaGNU. However, none of those
are required in order to use the main Autoconf program. If they are
not present, the affected Autoconf utilities will not be installed.
The file INSTALL can 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.
The file `acconfig.h' contains short descriptions of the C preprocessor
variables that Autoconf can define, suitable for copying into other
packages' configuration headers or Makefile.in files. You can use the
program `autoheader' to automatically create a configuration header
from a `configure.in', based on the information in `acconfig.h'.
Mail suggestions and bug reports for Autoconf to autoconf@gnu.org.
Please include the Autoconf version number, which you can get by running
"autoconf --version". The current autoconf maintainer is Ben Elliston
<bje@cygnus.com>.

580
legacy/autoconf/TODO Normal file
View File

@ -0,0 +1,580 @@
-*- 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
------------------------------------------------------------------------------
* 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.
------------------------------------------------------------------------------
* Add AC_PROG_CC_POSIX to replace the current ad-hoc macros for AIX,
Minix, ISC, etc.
------------------------------------------------------------------------------
* Use AC_EGREP_CPP instead of AC_TRY_LINK to detect structures and members.
------------------------------------------------------------------------------
* Make AC_CHECK_FUNC[S] automatically use any particular macros for the
listed functions.
------------------------------------------------------------------------------
* Support creating both config.h and DEFS in the same configure.
------------------------------------------------------------------------------
* Select the right CONFIG_SHELL automatically (for Ultrix, Lynx especially.)
------------------------------------------------------------------------------
* Doc: Add a concept index.
------------------------------------------------------------------------------
* Doc: Centralize information on POSIX, MS-DOS, cross-compiling, and
other important topics.
------------------------------------------------------------------------------
* Split up AC_SUBST substitutions using a loop to accomodate shells
with severely limited here document sizes, if it turns out to be a problem.
I'm not sure whether the limit is on lines or bytes; if bytes, it
will be less of a problem than it was with the long lines used for
creating a header file.
------------------------------------------------------------------------------
* Allow [ and ] in AC_DEFINE args.
------------------------------------------------------------------------------
* Mike Haertel's suggestions:
** Provide header files containing decls for alloca, strings, etc.
** 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.
------------------------------------------------------------------------------
* autoscan: Tell the files that caused inclusion of each macro,
in a dnl comment. (Seems to be hard.)
------------------------------------------------------------------------------
* Look at user contributed macros:
prototypes
IEEE double precision math
more
------------------------------------------------------------------------------
For AC_TYPE_SIGNAL signal handlers, provide a way for code to know
whether to do "return 0" or "return" (int vs void) to avoid compiler
warnings. (Roland McGrath)
------------------------------------------------------------------------------
In config.status comment, put the host/target/build types, if used.
------------------------------------------------------------------------------
Have AC_CANONICAL_* cache the host/build/target types.
They have to be overridden by the command line arguments,
just as for X includes and libraries. Should they be cached
all in one variable, or three? In that case, what if only one
or two of the cache variables are set?
------------------------------------------------------------------------------
The argument HELP-STRING is a description of the option which
...
Avoid tabs in the help string. You'll need to enclose it in `['
and `]' in order to produce the leading spaces.
Except that [...] is the convention for telling the user the default,
So I guess a changequote(`,') or something would be in order in some cases.
From: "K. Berry" <kb@cs.umb.edu>
------------------------------------------------------------------------------
The default of unlimited permission is fine, but there should be some easy
way for configure to have copyright terms passed through from configure.in.
Maybe AC_LICENSE([...]).
From: roland@gnu.ai.mit.edu (Roland McGrath)
------------------------------------------------------------------------------
AC_MSG_CHECKING([checking for ANSI #stringize])
AC_REVISION([ #(@) revision 2.1 ])
causes bogus code to be generated for whatever immediately follows. The
problem goes away if the '#' is removed. Probably the macros are not
disabling the m4 "comment" feature when processing user-supplied strings.
-Jim Avera jima@netcom.com
------------------------------------------------------------------------------
on hal.gnu.ai.mit.edu, configure is getting the wrong answer for
AC_CHECK_FUNCS(select).
The problem here is that there's severe namespace pollution: when
conftest.c includes <ctype.h> to pick up any __stub macro definitions,
it's getting a prototype declaration for select(), which collides
with the dummy declaration in conftest.c. (The chain of includes
is conftest.c -> <ctype.h> -> <sys/localedef.h> -> <sys/lc_core.h>
-> <sys/types.h> -> <sys/select.h>.)
#define $ac_func __dummy_$ac_func
#include <ctype.h>
#undef $ac_func
From: kwzh@gnu.ai.mit.edu (Karl Heuer)
The test for the isascii function was failing because that function is
also a macro. He proposed that the test file look like this:
/* Remove any macro definition. */
#undef isascii
/* Override any gcc2 internal prototype to avoid an error. */
char isascii(); isascii();
Andreas Schwab
------------------------------------------------------------------------------
put all the config.* stuff somewhere like config/?
All these extraneous files sure clutter up a toplevel directory.
From: "Randall S. Winchester" <rsw@eng.umd.edu>
------------------------------------------------------------------------------
It would be nice if I could (in the Makefile.in files) set
the path to 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" <rsw@eng.umd.edu>
------------------------------------------------------------------------------
In libc and make in aclocal.m4 I have AC_CHECK_SYMBOL, which checks for
sys_siglist et al. Using AC_CHECK_FUNC doesn't work on some system that
winds up caring that you reference it as a function and it is really a
variable. My version always declares the symbol as a char *[]; if that
ends up a bad idea, we can have it take an arg with the C decl, but that is
a bit verbose to write if it's actually superfluous.
From Roland McGrath.
[I'd call it AC_CHECK_VAR, I think. -djm]
------------------------------------------------------------------------------
In a future version (after 2.2), make AC_PROG_{CC,RANLIB,anything else}
use AC_CHECK_TOOL.
From Roland McGrath.
------------------------------------------------------------------------------
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_ <eichin@cygnus.com>
------------------------------------------------------------------------------
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 apropriate checks, the existance of the paths, 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 paths 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_PROGRAMS_CHECK(AR_FOR_TARGET, $target-ar, $target-ar, ar)
AC_PROGRAMS_CHECK(RANLIB_FOR_TARGET, $target-ranlib, $target-ranlib, ranlib)
AC_PROGRAMS_CHECK(GCC_FOR_TARGET, $target-gcc, $target-gcc, gcc)
fi
This could be improved to also look for gcc in PATH, but require the
prefix to contain the target e.g.:
target=m68k-coff -->GCC_FOR_TARGET = /usr/gnu/m68k-coff/bin/gcc
From: nennker@cs.tu-berlin.DE (Axel Nennker)
------------------------------------------------------------------------------
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.
------------------------------------------------------------------------------
* Test suite: more things to test:
** That the shell scripts produce correct output on some simple data.
** Configuration header files. That autoheader does the right thing,
and so does AC_CONFIG_HEADER when autoconf is run.
------------------------------------------------------------------------------
Autoheader in autoconf-2.4 doesn't produce entries for:
AC_CHECK_TYPE(ssize_t, int)
and it seems like it could easily do so.
In general, it seems to me like autoconf isn't set up to
let me periodically run autoheader, and then include my
"local" tests -- autoheader gets most stuff right, I'd like
to rerun it periodically without losing my local changes
to config.h.in.
One of the things that I need is to know is the type to use
for a fixed size on disk, e.g., what is the system's name
for an unsigned-32-bit integer?
I can use:
AC_CHECK_SIZEOF(unsigned int)
and, in fact, that's what I do. But I still have to build
sets of #if tests to get from there to the name of the type.
From: bostic@bsdi.com (Keith Bostic)
------------------------------------------------------------------------------
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 <rsalz@osf.org>
------------------------------------------------------------------------------
It is IMHO a bug that `config.status' cannot handle multiple
simultaneous invocations. It should include the process id (`$$' in sh)
as part of the name of any temporary files it creates.
From: fjh@kryten.cs.mu.oz.au (Fergus Henderson)
------------------------------------------------------------------------------
Timezone calculations checks.
------------------------------------------------------------------------------
Support different default filesystem layouts, e.g. SVR4, Linux.
Of course, this can be done locally with config.site.
------------------------------------------------------------------------------
Mention automake, libtool, etc. in the autoconf manual.
------------------------------------------------------------------------------
I wonder if it is possible to get the path for 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 <eserte@cabulja.herceg.de>
------------------------------------------------------------------------------
Question: at least one common UNIX variant has a "cc" that is old K&R
and "c89" for ANSI C. Is there any reason why AC_PROG_CC couldn't
check for c89 before cc if it can't find gcc?
hpa@yggdrasil.com (H. Peter Anvin)
------------------------------------------------------------------------------
Cache consistency checking: ignore cache if environment
(CC or PATH) differs.
From Mike Haertel
So we need a general mechanism for storing variables' values in the cache,
and checking if they are the same after reading the cache. Then we can add
to the list of variables as we come across the need. So far we want
LD_LIBRARY_PATH and the internal variables for some of (all?) the args.
From: roland@gnu.ai.mit.edu (Roland McGrath)
Hmm. That list might include LD_LIBRARY_PATH, LD_RUN_PATH (for solaris),
and PATH. I can't think of any others so far.
From: friedman@splode.com (Noah Friedman)
------------------------------------------------------------------------------
So how about an option to configure --reset-cache, that says to ignore all
existing cached values for tests that configure runs, and then update the
cache normally. This should be utterly trivial to do in AC_CACHE_VAL;
check the flag variable and always compute the value if it's set.
------------------------------------------------------------------------------
A number of people have tried to fix configuration problems by editing
acconfig.h. (Despite comments at the top of the file.) I think they're
confused because anything.h looks like a regular source file name.
Maybe acconfig.h could be called acconfig.extra or something?
From: kb@cs.umb.edu (K. Berry)
------------------------------------------------------------------------------
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)
------------------------------------------------------------------------------
When using CONFIG_FILES= and CONFIG_HEADERS= for controlling
partial configuration, any AC_LINK_FILES is repeated in each case
(that is, usually, once for config.h and once per subdirectory).
This is not elegant.
Maybe Autoconf could use some kind of CONFIG_LINKS=<file-list>,
having all such AC_LINK(ed)_FILES by default, but usable by each
Makefile.in in rules for updating the particular links they need.
From: pinard@iro.umontreal.ca
------------------------------------------------------------------------------
Perhaps autoconf could have a single @magic@ frob that gets replaced with
assignments for all the *dir variables? There is quite a plethora for each
Makefile.in to have foodir = @foodir@.
From: Roland McGrath <roland@gnu.ai.mit.edu>
------------------------------------------------------------------------------
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 <rboykin@cscsun3.larc.nasa.gov>
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 supresses the "checking for...result"
messages, not the "creating FOO" messages.
I think the default should be to suppress both.
From: Richard Stallman <rms@gnu.ai.mit.edu>
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 <roland@gnu.ai.mit.edu>
------------------------------------------------------------------------------
Use automake to generate autoconf's Makefile.in's?
------------------------------------------------------------------------------
about the idea of using small configure.in/aclocal.m4 snippets:
this is the one idea in metaconfig (the autoconf-like program used by
Perl) that I like. metaconfig looks for a "U" directory, and includes
each ".U" file into the generated Configure script (according to
various complicated rules).
From: Tom Tromey <tromey@creche.cygnus.com>
------------------------------------------------------------------------------
I'd much prefer to see the absolute paths substituted for all the
standard "dir" variables. It would be nice to have variables in
configure that held the absolute paths. And it is nice to be able to
substitute them into other files without relying on the destination
file supporting ${...} syntax. (It works in Perl, sh, and make --
but not guile)
From: Tom Tromey <tromey@creche.cygnus.com>
------------------------------------------------------------------------------
Another thing I wish for is a macro which figures out which libraries are
needed for BSD-sytle sockets. AC_PATH_X already detects this
correctly...so it's just a matter of seperating out the socket-related code.
From: "Joel N. Weber II" <nemo@koa.iolani.honolulu.hi.us>
------------------------------------------------------------------------------
Merge the two lex macros, AC_PROG_LEX and AC_DECL_YYTEXT?
------------------------------------------------------------------------------
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.
------------------------------------------------------------------------------
there is absolutely no guarantee that 'a' to 'z' are
contiguous, and the ISLOWER macro is not guaranteed to correctly
reproduce the result of islower. In all variants of ASCII however, it
will work correctly in the C locale.
There is also no guarantee that toupper(i) - i is the same constant if
non-zero. TOUPPER, hence, is not correct either. But, in all variants
of ASCII in the C locale, it works.
Tanmoy Bhattacharya (tanmoy@qcd.lanl.gov>
------------------------------------------------------------------------------
autoreconf doesn't support having (in the same tree) both directories
that are parts of a larger package (sharing aclocal.m4 and acconfig.h),
and directories that are independent packages (each with their own ac*).
It assumes that they are all part of the same package, if you use --localdir,
or that each directory is a separate package, if you don't use it.
autoreconf should automatically figure out which ac* files to use--the
closest ones up the tree from each directory, probably, unless
overridden by --localdir.
Also, autoreconf recurses on all subdirectories containing a
configure.in, not just those given by an AC_CONFIG_SUBDIRS directive.
This may not be a problem in practice.
------------------------------------------------------------------------------

277
legacy/autoconf/acconfig.h Normal file
View File

@ -0,0 +1,277 @@
/* acconfig.h
This file is in the public domain.
Descriptive text for the C preprocessor macros that
the distributed Autoconf macros can define.
No software package will use all of them; autoheader copies the ones
your configure.in uses into your configuration header file templates.
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). Although this order
can split up related entries, it makes it easier to check whether
a given entry is in the file.
Leave the following blank line there!! Autoheader needs it. */
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
#undef _ALL_SOURCE
#endif
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define if type char is unsigned and you are not using gcc. */
#ifndef __CHAR_UNSIGNED__
#undef __CHAR_UNSIGNED__
#endif
/* Define if the closedir function returns void instead of int. */
#undef CLOSEDIR_VOID
/* Define to empty if the keyword does not work. */
#undef const
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define for DGUX with <sys/dg_sys_info.h>. */
#undef DGUX
/* Define if you have <dirent.h>. */
#undef DIRENT
/* Define to the type of elements in the array set by `getgroups'.
Usually this is either `int' or `gid_t'. */
#undef GETGROUPS_T
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
#undef GETLOADAVG_PRIVILEGED
/* Define if the `getpgrp' function takes no argument. */
#undef GETPGRP_VOID
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if your system has a working fnmatch function. */
#undef HAVE_FNMATCH
/* Define if your system has its own `getloadavg' function. */
#undef HAVE_GETLOADAVG
/* Define if you have the getmntent function. */
#undef HAVE_GETMNTENT
/* Define if the `long double' type works. */
#undef HAVE_LONG_DOUBLE
/* Define if you support file names longer than 14 characters. */
#undef HAVE_LONG_FILE_NAMES
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if system calls automatically restart after interruption
by a signal. */
#undef HAVE_RESTARTABLE_SYSCALLS
/* Define if your struct stat has st_blksize. */
#undef HAVE_ST_BLKSIZE
/* Define if your struct stat has st_blocks. */
#undef HAVE_ST_BLOCKS
/* Define if you have the strcoll function and it is properly defined. */
#undef HAVE_STRCOLL
/* Define if your struct stat has st_rdev. */
#undef HAVE_ST_RDEV
/* Define if you have the strftime function. */
#undef HAVE_STRFTIME
/* Define if you have the ANSI # stringizing operator in cpp. */
#undef HAVE_STRINGIZE
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define if your struct tm has tm_zone. */
#undef HAVE_TM_ZONE
/* Define if you don't have tm_zone but do have the external array
tzname. */
#undef HAVE_TZNAME
/* Define if you have <unistd.h>. */
#undef HAVE_UNISTD_H
/* Define if utime(file, NULL) sets file's timestamp to the present. */
#undef HAVE_UTIME_NULL
/* Define if you have <vfork.h>. */
#undef HAVE_VFORK_H
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
/* Define if you have the wait3 system call. */
#undef HAVE_WAIT3
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define if int is 16 bits instead of 32. */
#undef INT_16_BITS
/* Define if long int is 64 bits. */
#undef LONG_64_BITS
/* Define if major, minor, and makedev are declared in <mkdev.h>. */
#undef MAJOR_IN_MKDEV
/* Define if major, minor, and makedev are declared in <sysmacros.h>. */
#undef MAJOR_IN_SYSMACROS
/* Define if on MINIX. */
#undef _MINIX
/* Define to `int' if <sys/types.h> doesn't define. */
#undef mode_t
/* Define if you don't have <dirent.h>, but have <ndir.h>. */
#undef NDIR
/* Define if you have <memory.h>, and <string.h> doesn't declare the
mem* functions. */
#undef NEED_MEMORY_H
/* Define if your struct nlist has an n_un member. */
#undef NLIST_NAME_UNION
/* Define if you have <nlist.h>. */
#undef NLIST_STRUCT
/* Define if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Define if your Fortran 77 compiler doesn't accept -c and -o together. */
#undef F77_NO_MINUS_C_MINUS_O
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
/* Define if the system does not provide POSIX.1 features except
with this defined. */
#undef _POSIX_1_SOURCE
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
/* Define to the type of arg1 for select(). */
#undef SELECT_TYPE_ARG1
/* Define to the type of args 2, 3 and 4 for select(). */
#undef SELECT_TYPE_ARG234
/* Define to the type of arg5 for select(). */
#undef SELECT_TYPE_ARG5
/* Define if the `setpgrp' function takes no argument. */
#undef SETPGRP_VOID
/* Define if the setvbuf function takes the buffering type as its second
argument and the buffer pointer as the third, as on System V
before release 3. */
#undef SETVBUF_REVERSED
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define on System V Release 4. */
#undef SVR4
/* Define if you don't have <dirent.h>, but have <sys/dir.h>. */
#undef SYSDIR
/* Define if you don't have <dirent.h>, but have <sys/ndir.h>. */
#undef SYSNDIR
/* Define if `sys_siglist' is declared by <signal.h>. */
#undef SYS_SIGLIST_DECLARED
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define if your <sys/time.h> declares struct tm. */
#undef TM_IN_SYS_TIME
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
/* Define for Encore UMAX. */
#undef UMAX
/* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
instead of <sys/cpustats.h>. */
#undef UMAX4_3
/* Define if you do not have <strings.h>, index, bzero, etc.. */
#undef USG
/* Define vfork as fork if vfork does not work. */
#undef vfork
/* Define if the closedir function returns void instead of int. */
#undef VOID_CLOSEDIR
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
/* Define if lex declares yytext as a char * by default, not a char[]. */
#undef YYTEXT_POINTER
/* Leave that blank line there!! Autoheader needs it.
If you're adding to this file, keep in mind:
The entries are in sort -df order: alphabetical, case insensitive,
ignoring punctuation (such as underscores). */

View File

@ -0,0 +1,60 @@
# Ones that have their own macros.
major AC_HEADER_MAJOR
minor AC_HEADER_MAJOR
makedev AC_HEADER_MAJOR
bcopy AC_HEADER_STDC
bcmp AC_HEADER_STDC
bzero AC_HEADER_STDC
ioctl AC_PROG_GCC_TRADITIONAL
memchr AC_HEADER_STDC
memcpy AC_HEADER_STDC
memcmp AC_FUNC_MEMCMP
memmove AC_HEADER_STDC
memset AC_HEADER_STDC
index AC_HEADER_STDC
rindex AC_HEADER_STDC
getgroups AC_TYPE_GETGROUPS
getpgrp AC_FUNC_GETPGRP
setpgrp AC_FUNC_SETPGRP
signal AC_TYPE_SIGNAL
alloca AC_FUNC_ALLOCA
fnmatch AC_FUNC_FNMATCH
getloadavg AC_FUNC_GETLOADAVG
mmap AC_FUNC_MMAP
setvbuf AC_FUNC_SETVBUF_REVERSED
strcoll AC_FUNC_STRCOLL
strftime AC_FUNC_STRFTIME
utime AC_FUNC_UTIME_NULL
vfork AC_FUNC_VFORK
vprintf AC_FUNC_VPRINTF
vfprintf AC_FUNC_VPRINTF
vsprintf AC_FUNC_VPRINTF
wait3 AC_FUNC_WAIT3
# Others.
ftime AC_CHECK_FUNCS
gethostname AC_CHECK_FUNCS
gettimeofday AC_CHECK_FUNCS
getusershell AC_CHECK_FUNCS
getcwd AC_CHECK_FUNCS
getwd AC_CHECK_FUNCS
mkdir AC_CHECK_FUNCS
mkfifo AC_CHECK_FUNCS
mktime AC_CHECK_FUNCS
putenv AC_CHECK_FUNCS
re_comp AC_CHECK_FUNCS
regcmp AC_CHECK_FUNCS
regcomp AC_CHECK_FUNCS
rmdir AC_CHECK_FUNCS
select AC_CHECK_FUNCS
socket AC_CHECK_FUNCS
stime AC_CHECK_FUNCS
strcspn AC_CHECK_FUNCS
strdup AC_CHECK_FUNCS
strerror AC_CHECK_FUNCS
strspn AC_CHECK_FUNCS
strstr AC_CHECK_FUNCS
strtod AC_CHECK_FUNCS
strtol AC_CHECK_FUNCS
strtoul AC_CHECK_FUNCS
uname AC_CHECK_FUNCS

2607
legacy/autoconf/acgeneral.m4 Normal file

File diff suppressed because it is too large Load Diff

28
legacy/autoconf/acheaders Normal file
View File

@ -0,0 +1,28 @@
# Ones that have their own macros.
dirent.h AC_HEADER_DIRENT
sys/ndir.h AC_HEADER_DIRENT
sys/dir.h AC_HEADER_DIRENT
ndir.h AC_HEADER_DIRENT
sys/mkdev.h AC_HEADER_MAJOR
string.h AC_HEADER_STDC
stdlib.h AC_HEADER_STDC
stddef.h AC_HEADER_STDC
stdarg.h AC_HEADER_STDC
float.h AC_HEADER_STDC
sys/wait.h AC_HEADER_SYS_WAIT
X11/Xlib.h AC_PATH_X
# Others.
fcntl.h AC_CHECK_HEADERS
limits.h AC_CHECK_HEADERS
malloc.h AC_CHECK_HEADERS
paths.h AC_CHECK_HEADERS
sgtty.h AC_CHECK_HEADERS
strings.h AC_CHECK_HEADERS
sys/file.h AC_CHECK_HEADERS
sys/ioctl.h AC_CHECK_HEADERS
sys/time.h AC_CHECK_HEADERS
sys/window.h AC_CHECK_HEADERS
syslog.h AC_CHECK_HEADERS
termio.h AC_CHECK_HEADERS
unistd.h AC_CHECK_HEADERS

View File

@ -0,0 +1,22 @@
sys_siglist AC_DECL_SYS_SIGLIST
mode_t AC_TYPE_MODE_T
off_t AC_TYPE_OFF_T
pid_t AC_TYPE_PID_T
size_t AC_TYPE_SIZE_T
uid_t AC_TYPE_UID_T
gid_t AC_TYPE_UID_T
S_ISDIR AC_HEADER_STAT
S_ISREG AC_HEADER_STAT
S_ISCHR AC_HEADER_STAT
S_ISBLK AC_HEADER_STAT
S_ISFIFO AC_HEADER_STAT
S_ISLNK AC_HEADER_STAT
S_ISSOCK AC_HEADER_STAT
st_blksize AC_STRUCT_ST_BLKSIZE
st_blocks AC_STRUCT_ST_BLOCKS
st_rdev AC_STRUCT_ST_RDEV
timeval AC_HEADER_TIME
tm AC_STRUCT_TM
tm_zone AC_STRUCT_TIMEZONE
const AC_C_CONST
inline AC_C_INLINE

View File

@ -0,0 +1,11 @@
LN AC_PROG_LN_S
AWK AC_PROG_AWK
CC AC_PROG_CC
CPP AC_PROG_CPP
CXX AC_PROG_CXX
INSTALL AC_PROG_INSTALL
LEX AC_PROG_LEX
RANLIB AC_PROG_RANLIB
YACC AC_PROG_YACC
BISON AC_PROG_YACC
MAKE AC_PROG_MAKE_SET

View File

@ -0,0 +1,80 @@
dnl Map old names of Autoconf macros to new regularized names.
dnl This file is part of Autoconf.
dnl Copyright (C) 1994 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl General macros.
dnl
define(AC_WARN, [indir([AC_MSG_WARN], $@)])dnl
define(AC_ERROR, [indir([AC_MSG_ERROR], $@)])dnl
AC_DEFUN(AC_PROGRAM_CHECK, [indir([AC_CHECK_PROG], $@)])dnl
AC_DEFUN(AC_PROGRAM_PATH, [indir([AC_PATH_PROG], $@)])dnl
AC_DEFUN(AC_PROGRAMS_CHECK, [indir([AC_CHECK_PROGS], $@)])dnl
AC_DEFUN(AC_PROGRAMS_PATH, [indir([AC_PATH_PROGS], $@)])dnl
AC_DEFUN(AC_PREFIX, [indir([AC_PREFIX_PROGRAM], $@)])dnl
AC_DEFUN(AC_HEADER_EGREP, [indir([AC_EGREP_HEADER], $@)])dnl
AC_DEFUN(AC_PROGRAM_EGREP, [indir([AC_EGREP_CPP], $@)])dnl
AC_DEFUN(AC_TEST_PROGRAM, [indir([AC_TRY_RUN], $@)])dnl
AC_DEFUN(AC_TEST_CPP, [indir([AC_TRY_CPP], $@)])dnl
AC_DEFUN(AC_HEADER_CHECK, [indir([AC_CHECK_HEADER], $@)])dnl
AC_DEFUN(AC_FUNC_CHECK, [indir([AC_CHECK_FUNC], $@)])dnl
AC_DEFUN(AC_HAVE_FUNCS, [indir([AC_CHECK_FUNCS], $@)])dnl
AC_DEFUN(AC_HAVE_HEADERS, [indir([AC_CHECK_HEADERS], $@)])dnl
AC_DEFUN(AC_SIZEOF_TYPE, [indir([AC_CHECK_SIZEOF], $@)])dnl
dnl
dnl Specific macros.
dnl
AC_DEFUN(AC_GCC_TRADITIONAL, [indir([AC_PROG_GCC_TRADITIONAL])])dnl
AC_DEFUN(AC_MINUS_C_MINUS_O, [indir([AC_PROG_CC_C_O])])dnl
AC_DEFUN(AC_SET_MAKE, [indir([AC_PROG_MAKE_SET])])dnl
AC_DEFUN(AC_YYTEXT_POINTER, [indir([AC_DECL_YYTEXT])])dnl
AC_DEFUN(AC_LN_S, [indir([AC_PROG_LN_S])])dnl
AC_DEFUN(AC_STDC_HEADERS, [indir([AC_HEADER_STDC])])dnl
AC_DEFUN(AC_MAJOR_HEADER, [indir([AC_HEADER_MAJOR])])dnl
AC_DEFUN(AC_STAT_MACROS_BROKEN, [indir([AC_HEADER_STAT])])dnl
AC_DEFUN(AC_SYS_SIGLIST_DECLARED, [indir([AC_DECL_SYS_SIGLIST])])dnl
AC_DEFUN(AC_GETGROUPS_T, [indir([AC_TYPE_GETGROUPS])])dnl
AC_DEFUN(AC_UID_T, [indir([AC_TYPE_UID_T])])dnl
AC_DEFUN(AC_SIZE_T, [indir([AC_TYPE_SIZE_T])])dnl
AC_DEFUN(AC_PID_T, [indir([AC_TYPE_PID_T])])dnl
AC_DEFUN(AC_OFF_T, [indir([AC_TYPE_OFF_T])])dnl
AC_DEFUN(AC_MODE_T, [indir([AC_TYPE_MODE_T])])dnl
AC_DEFUN(AC_RETSIGTYPE, [indir([AC_TYPE_SIGNAL])])dnl
AC_DEFUN(AC_MMAP, [indir([AC_FUNC_MMAP])])dnl
AC_DEFUN(AC_VPRINTF, [indir([AC_FUNC_VPRINTF])])dnl
AC_DEFUN(AC_VFORK, [indir([AC_FUNC_VFORK])])dnl
AC_DEFUN(AC_WAIT3, [indir([AC_FUNC_WAIT3])])dnl
AC_DEFUN(AC_ALLOCA, [indir([AC_FUNC_ALLOCA])])dnl
AC_DEFUN(AC_GETLOADAVG, [indir([AC_FUNC_GETLOADAVG])])dnl
AC_DEFUN(AC_UTIME_NULL, [indir([AC_FUNC_UTIME_NULL])])dnl
AC_DEFUN(AC_STRCOLL, [indir([AC_FUNC_STRCOLL])])dnl
AC_DEFUN(AC_SETVBUF_REVERSED, [indir([AC_FUNC_SETVBUF_REVERSED])])dnl
AC_DEFUN(AC_TIME_WITH_SYS_TIME, [indir([AC_HEADER_TIME])])dnl
AC_DEFUN(AC_TIMEZONE, [indir([AC_STRUCT_TIMEZONE])])dnl
AC_DEFUN(AC_ST_BLOCKS, [indir([AC_STRUCT_ST_BLOCKS])])dnl
AC_DEFUN(AC_ST_BLKSIZE, [indir([AC_STRUCT_ST_BLKSIZE])])dnl
AC_DEFUN(AC_ST_RDEV, [indir([AC_STRUCT_ST_RDEV])])dnl
AC_DEFUN(AC_CROSS_CHECK, [indir([AC_C_CROSS])])dnl
AC_DEFUN(AC_CHAR_UNSIGNED, [indir([AC_C_CHAR_UNSIGNED])])dnl
AC_DEFUN(AC_LONG_DOUBLE, [indir([AC_C_LONG_DOUBLE])])dnl
AC_DEFUN(AC_WORDS_BIGENDIAN, [indir([AC_C_BIGENDIAN])])dnl
AC_DEFUN(AC_INLINE, [indir([AC_C_INLINE])])dnl
AC_DEFUN(AC_CONST, [indir([AC_C_CONST])])dnl
AC_DEFUN(AC_LONG_FILE_NAMES, [indir([AC_SYS_LONG_FILE_NAMES])])dnl
AC_DEFUN(AC_RESTARTABLE_SYSCALLS, [indir([AC_SYS_RESTARTABLE_SYSCALLS])])dnl
AC_DEFUN(AC_FIND_X, [indir([AC_PATH_X])])dnl
AC_DEFUN(AC_FIND_XTRA, [indir([AC_PATH_XTRA])])dnl

View File

@ -0,0 +1,18 @@
ln AC_PROG_LN_S
awk AC_PROG_AWK
nawk AC_PROG_AWK
gawk AC_PROG_AWK
mawk AC_PROG_AWK
cc AC_PROG_CC
gcc AC_PROG_CC
cpp AC_PROG_CPP
CC AC_PROG_CXX
g++ AC_PROG_CXX
install AC_PROG_INSTALL
lex AC_PROG_LEX
flex AC_PROG_LEX
ranlib AC_PROG_RANLIB
yacc AC_PROG_YACC
byacc AC_PROG_YACC
bison AC_PROG_YACC
make AC_PROG_MAKE_SET

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
dnl Driver that loads the Autoconf macro files.
dnl Requires GNU m4.
dnl This file is part of Autoconf.
dnl Copyright (C) 1994 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl Written by David MacKenzie.
dnl
include(acgeneral.m4)dnl
builtin(include, acspecific.m4)dnl
builtin(include, acoldnames.m4)dnl
dnl Do not sinclude acsite.m4 here, because it may not be installed
dnl yet when Autoconf is frozen.
dnl Do not sinclude ./aclocal.m4 here, to prevent it from being frozen.

159
legacy/autoconf/autoconf.sh Normal file
View File

@ -0,0 +1,159 @@
#! @SHELL@
# autoconf -- create `configure' using m4 macros
# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# If given no args, create `configure' from template file `configure.in'.
# With one arg, create a configure script on standard output from
# the given template file.
usage="\
Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir]
[-l dir] [--localdir=dir] [--version] [template-file]"
# NLS nuisances.
# Only set these to C if already set. These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
: ${AC_MACRODIR=@datadir@}
: ${M4=@M4@}
: ${AWK=@AWK@}
case "${M4}" in
/*) # Handle the case that m4 has moved since we were configured.
# It may have been found originally in a build directory.
test -f "${M4}" || M4=m4 ;;
esac
: ${TMPDIR=/tmp}
tmpout=${TMPDIR}/acout.$$
localdir=
show_version=no
while test $# -gt 0 ; do
case "${1}" in
-h | --help | --h* )
echo "${usage}" 1>&2; exit 0 ;;
--localdir=* | --l*=* )
localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
shift ;;
-l | --localdir | --l*)
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
localdir="${1}"
shift ;;
--macrodir=* | --m*=* )
AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
shift ;;
-m | --macrodir | --m* )
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
AC_MACRODIR="${1}"
shift ;;
--version | --v* )
show_version=yes; shift ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "${usage}" 1>&2; exit 1 ;;
* )
break ;;
esac
done
if test $show_version = yes; then
version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
$AC_MACRODIR/acgeneral.m4`
echo "Autoconf version $version"
exit 0
fi
case $# in
0) infile=configure.in ;;
1) infile="$1" ;;
*) echo "$usage" >&2; exit 1 ;;
esac
trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
if test z$infile = z-; then
infile=$tmpin
cat > $infile
elif test ! -r "$infile"; then
echo "autoconf: ${infile}: No such file or directory" >&2
exit 1
fi
if test -n "$localdir"; then
use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
else
use_localdir=
fi
# Use the frozen version of Autoconf if available.
r= f=
# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
case `$M4 --help < /dev/null 2>&1` in
*reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
*traditional*) ;;
*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
esac
$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
{ rm -f $tmpin $tmpout; exit 2; }
# You could add your own prefixes to pattern if you wanted to check for
# them too, e.g. pattern='\(AC_\|ILT_\)', except that UNIX sed doesn't do
# alternation.
pattern="AC_"
status=0
if grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then
echo "autoconf: Undefined macros:" >&2
sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
while read macro; do
grep -n "^[^#]*$macro" $infile /dev/null
test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro"
done | sort -u >&2
status=1
fi
if test $# -eq 0; then
exec 4> configure; chmod +x configure
else
exec 4>&1
fi
# Put the real line numbers into configure to make config.log more helpful.
$AWK '
/__oline__/ { printf "%d:", NR + 1 }
{ print }
' $tmpout | sed '
/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
' >&4
rm -f $tmpout
exit $status

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,110 @@
dnl Driver and redefinitions of some Autoconf macros for autoheader.
dnl This file is part of Autoconf.
dnl Copyright (C) 1994, 1995 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl Written by Roland McGrath.
dnl
include(acgeneral.m4)dnl
builtin(include, acspecific.m4)dnl
builtin(include, acoldnames.m4)dnl
dnl These are alternate definitions of some macros, which produce
dnl strings in the output marked with "@@@" so we can easily extract
dnl the information we want. The `#' at the end of the first line of
dnl each definition seems to be necessary to prevent m4 from eating
dnl the newline, which makes the @@@ not always be at the beginning of
dnl a line.
define([AC_CHECK_FUNCS], [#
@@@funcs="$funcs $1"@@@
ifelse([$2], , , [
# If it was found, we do:
$2
# If it was not found, we do:
$3
])
])
define([AC_CHECK_HEADERS], [#
@@@headers="$headers $1"@@@
ifelse([$2], , , [
# If it was found, we do:
$2
# If it was not found, we do:
$3
])
])
define([AC_CHECK_HEADERS_DIRENT], [#
@@@headers="$headers $1"@@@
])
define([AC_CHECK_LIB], [#
ifelse([$3], , [
@@@libs="$libs $1"@@@
], [
# If it was found, we do:
$3
# If it was not found, we do:
$4
])
])
define([AC_HAVE_LIBRARY], [#
changequote(<<, >>)dnl
define(<<AC_LIB_NAME>>, dnl
patsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
changequote([, ])dnl
ifelse([$2], , [
@@@libs="$libs AC_LIB_NAME"@@@
], [
# If it was found, we do:
$2
# If it was not found, we do:
$3
])
])
define([AC_CHECK_SIZEOF], [#
@@@types="$types,$1"@@@
])
define([AC_CONFIG_HEADER], [#
define([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl
@@@config_h=AC_CONFIG_H@@@
])
define([AC_DEFINE], [#
ifelse([$3],,[#
@@@syms="$syms $1"@@@
], [#
@@@verbatim="$verbatim
/* $3 */
#undef $1
"@@@
])])
define([AC_DEFINE_UNQUOTED], [#
ifelse([$3],,[#
@@@syms="$syms $1"@@@
], [#
@@@verbatim="$verbatim
/* $3 */
#undef $1
"@@@
])])

View File

@ -0,0 +1,279 @@
#! @SHELL@
# autoheader -- create `config.h.in' from `configure.in'
# Copyright (C) 1992, 1993, 1994, 1996, 1998 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Written by Roland McGrath.
# If given no args, create `config.h.in' from template file `configure.in'.
# With one arg, create a header file on standard output from
# the given template file.
usage="\
Usage: autoheader [-h] [--help] [-m dir] [--macrodir=dir]
[-l dir] [--localdir=dir] [--version] [template-file]"
# NLS nuisances.
# Only set these to C if already set. These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
test -z "${AC_MACRODIR}" && AC_MACRODIR=@datadir@
test -z "${M4}" && M4=@M4@
case "${M4}" in
/*) # Handle the case that m4 has moved since we were configured.
# It may have been found originally in a build directory.
test -f "${M4}" || M4=m4 ;;
esac
localdir=.
show_version=no
while test $# -gt 0 ; do
case "${1}" in
-h | --help | --h* )
echo "${usage}"; exit 0 ;;
--localdir=* | --l*=* )
localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
shift ;;
-l | --localdir | --l*)
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
localdir="${1}"
shift ;;
--macrodir=* | --m*=* )
AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
shift ;;
-m | --macrodir | --m* )
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
AC_MACRODIR="${1}"
shift ;;
--version | --v* )
show_version=yes; shift ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "${usage}" 1>&2; exit 1 ;;
* )
break ;;
esac
done
if test $show_version = yes; then
version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
$AC_MACRODIR/acgeneral.m4`
echo "Autoconf version $version"
exit 0
fi
TEMPLATES="${AC_MACRODIR}/acconfig.h"
test -r $localdir/acconfig.h && TEMPLATES="${TEMPLATES} $localdir/acconfig.h"
case $# in
0) infile=configure.in ;;
1) infile=$1 ;;
*) echo "$usage" >&2; exit 1 ;;
esac
config_h=config.h
syms=
types=
funcs=
headers=
libs=
if test "$localdir" != .; then
use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
else
use_localdir=
fi
# Use the frozen version of Autoconf if available.
r= f=
# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
case `$M4 --help < /dev/null 2>&1` in
*reload-state*) test -r $AC_MACRODIR/autoheader.m4f && { r=--reload f=f; } ;;
*traditional*) ;;
*) echo Autoconf requires GNU m4 1.1 or later >&2; exit 1 ;;
esac
# Extract assignments of SYMS, TYPES, FUNCS, HEADERS, and LIBS from the
# modified autoconf processing of the input file. The sed hair is
# necessary to win for multi-line macro invocations.
eval "`$M4 -I$AC_MACRODIR $use_localdir $r autoheader.m4$f $infile |
sed -n -e '
: again
/^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p
/^@@@/{
s/^@@@//p
n
s/^/@@@/
b again
}'`"
# Make SYMS newline-separated rather than blank-separated, and remove dups.
# Start each symbol with a blank (to match the blank after "#undef")
# to reduce the possibility of mistakenly matching another symbol that
# is a substring of it.
syms="`for sym in $syms; do echo $sym; done | sort | uniq | sed 's@^@ @'`"
if test $# -eq 0; then
tmpout=autoh$$
trap "rm -f $tmpout; exit 1" 1 2 15
exec > $tmpout
fi
# Support "outfile[:infile]", defaulting infile="outfile.in".
case "$config_h" in
*:*) config_h_in=`echo "$config_h"|sed 's%.*:%%'`
config_h=`echo "$config_h"|sed 's%:.*%%'` ;;
*) config_h_in="${config_h}.in" ;;
esac
# Don't write "do not edit" -- it will get copied into the
# config.h, which it's ok to edit.
cat <<EOF
/* ${config_h_in}. Generated automatically from $infile by autoheader. */
EOF
test -r ${config_h}.top && cat ${config_h}.top
test -r $localdir/acconfig.h &&
grep @TOP@ $localdir/acconfig.h >/dev/null &&
sed '/@TOP@/,$d' $localdir/acconfig.h
# This puts each template paragraph on its own line, separated by @s.
if test -n "$syms"; then
# Make sure the boundary of template files is also the boundary
# of the paragraph. Extra newlines don't hurt since they will
# be removed.
# Undocumented useless feature: stuff outside of @TOP@ and @BOTTOM@
# is ignored in the systemwide acconfig.h too.
for t in $TEMPLATES; do
sedscript=""
grep @TOP@ $t >/dev/null && sedscript="1,/@TOP@/d;"
grep @BOTTOM@ $t >/dev/null && sedscript="$sedscript /@BOTTOM@/,\$d;"
# This substitution makes "#undef<TAB>FOO" in acconfig.h work.
sed -n -e "$sedscript s/ / /g; p" $t
echo; echo
done |
# The sed script is suboptimal because it has to take care of
# some broken seds (e.g. AIX) that remove '\n' from the
# pattern/hold space if the line is empty. (junio@twinsun.com).
sed -n -e '
/^[ ]*$/{
x
s/\n/@/g
p
s/.*/@/
x
}
H' | sed -e 's/@@*/@/g' |
# Select each paragraph that refers to a symbol we picked out above.
# Some fgrep's have limits on the number of lines that can be in the
# pattern on the command line, so use a temporary file containing the
# pattern.
(fgrep_tmp=${TMPDIR-/tmp}/autoh$$
trap "rm -f $fgrep_tmp; exit 1" 1 2 15
cat > $fgrep_tmp <<EOF
$syms
EOF
fgrep -f $fgrep_tmp
rm -f $fgrep_tmp) |
tr @ \\012
fi
echo "$types" | tr , \\012 | sort | uniq | while read ctype; do
test -z "$ctype" && continue
sym="`echo "${ctype}" | tr 'abcdefghijklmnopqrstuvwxyz *' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_P'`"
echo "
/* The number of bytes in a ${ctype}. */
#undef SIZEOF_${sym}"
done
# /bin/sh on the Alpha gives `for' a random value if $funcs is empty.
if test -n "$funcs"; then
for func in `for x in $funcs; do echo $x; done | sort | uniq`; do
sym="`echo ${func} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the ${func} function. */
#undef HAVE_${sym}"
done
fi
if test -n "$headers"; then
for header in `for x in $headers; do echo $x; done | sort | uniq`; do
sym="`echo ${header} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the <${header}> header file. */
#undef HAVE_${sym}"
done
fi
if test -n "$libs"; then
for lib in `for x in $libs; do echo $x; done | sort | uniq`; do
sym="`echo ${lib} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the ${lib} library (-l${lib}). */
#undef HAVE_LIB${sym}"
done
fi
if test -n "$verbatim"; then
echo "$verbatim"
fi
# Handle the case where @BOTTOM@ is the first line of acconfig.h.
test -r $localdir/acconfig.h &&
grep @BOTTOM@ $localdir/acconfig.h >/dev/null &&
sed -n '/@BOTTOM@/,${/@BOTTOM@/!p;}' $localdir/acconfig.h
test -f ${config_h}.bot && cat ${config_h}.bot
status=0
if test -n "$syms"; then
for sym in $syms; do
if fgrep $sym $TEMPLATES >/dev/null; then
: # All is well.
else
echo "$0: Symbol \`${sym}' is not covered by $TEMPLATES" >&2
status=1
fi
done
fi
if test $# -eq 0; then
if test $status -eq 0; then
if test -f ${config_h_in} && cmp -s $tmpout ${config_h_in}; then
rm -f $tmpout # File didn't change, so don't update its mod time.
else
mv -f $tmpout ${config_h_in}
fi
else
rm -f $tmpout
fi
fi
exit $status

View File

@ -0,0 +1,204 @@
#! @SHELL@
# autoreconf - remake all Autoconf configure scripts in a directory tree
# Copyright (C) 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 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
usage="\
Usage: autoreconf [-f] [-h] [--help] [-m dir] [--macrodir=dir]
[-l dir] [--localdir=dir] [--force] [--verbose] [--version]
[--cygnus] [--foreign] [--gnits] [--gnu] [-i] [--include-deps]"
localdir=
verbose=no
show_version=no
force=no
automake_mode=--gnu
automake_deps=
test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@
while test $# -gt 0; do
case "$1" in
-h | --help | --h*)
echo "$usage"; exit 0 ;;
--localdir=* | --l*=* )
localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
shift ;;
-l | --localdir | --l*)
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
localdir="${1}"
shift ;;
--macrodir=* | --m*=* )
AC_MACRODIR="`echo \"$1\" | sed -e 's/^[^=]*=//'`"
shift ;;
-m | --macrodir | --m*)
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
AC_MACRODIR="$1"
shift ;;
--verbose | --verb*)
verbose=yes; shift ;;
-f | --force)
force=yes; shift ;;
--version | --vers*)
show_version=yes; shift ;;
--cygnus | --foreign | --gnits | --gnu)
automake_mode=$1; shift ;;
--include-deps | -i)
automake_deps=$1; shift ;;
--) # Stop option processing.
shift; break ;;
-*) echo "$usage" 1>&2; exit 1 ;;
*) break ;;
esac
done
if test $show_version = yes; then
version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
$AC_MACRODIR/acgeneral.m4`
echo "Autoconf version $version"
exit 0
fi
if test $# -ne 0; then
echo "$usage" 1>&2; exit 1
fi
# The paths to the autoconf and autoheader scripts, at the top of the tree.
top_autoconf=`echo $0|sed s%autoreconf%autoconf%`
top_autoheader=`echo $0|sed s%autoreconf%autoheader%`
# Make a list of directories to process.
# The xargs grep filters out Cygnus configure.in files.
find . -name configure.in -print |
xargs grep -l AC_OUTPUT |
sed 's%/configure\.in$%%; s%^./%%' |
while read dir; do
(
cd $dir || continue
case "$dir" in
.) dots= ;;
*) # A "../" for each directory in /$dir.
dots=`echo /$dir|sed 's%/[^/]*%../%g'` ;;
esac
case "$0" in
/*) autoconf=$top_autoconf; autoheader=$top_autoheader ;;
*/*) autoconf=$dots$top_autoconf; autoheader=$dots$top_autoheader ;;
*) autoconf=$top_autoconf; autoheader=$top_autoheader ;;
esac
case "$AC_MACRODIR" in
/*) macrodir_opt="--macrodir=$AC_MACRODIR" ;;
*) macrodir_opt="--macrodir=$dots$AC_MACRODIR" ;;
esac
case "$localdir" in
"") localdir_opt=
aclocal=aclocal.m4 ;;
/*) localdir_opt="--localdir=$localdir"
aclocal=$localdir/aclocal.m4 ;;
*) localdir_opt="--localdir=$dots$localdir"
aclocal=$dots$localdir/aclocal.m4 ;;
esac
# Regenerate aclocal.m4 if necessary. FIXME: if aclocal searches
# nonstandard directories, we need to deal with that here. The
# easiest way is to move this info into configure.in.
run_aclocal=no
if test -f "$aclocal" &&
grep 'generated automatically by aclocal' $aclocal > /dev/null
then
run_aclocal=yes
else
if test -f `echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'`/acinclude.m4
then
run_aclocal=yes
fi
fi
if test $run_aclocal = yes
then
if test $force = no &&
ls -lt configure.in $aclocal \
`echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'`/acinclude.m4 |
sed 1q |
grep 'aclocal\.m4$' > /dev/null
then
:
else
test $verbose = yes && echo running aclocal in $dir, creating $aclocal
aclocal --output=$aclocal -I `echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'`
fi
fi
# Re-run automake if required. Assumes that there is a Makefile.am
# in the topmost directory.
if test -f Makefile.am
then
amforce=
test $force = no && amforce=--no-force
test $verbose = yes && echo running automake`test x"$amforce" = x || echo " ($amforce)"` in $dir
automake $amforce $automake_mode $automake_deps
fi
test ! -f $aclocal && aclocal=
if test $force = no && test -f configure &&
ls -lt configure configure.in $aclocal | sed 1q |
grep 'configure$' > /dev/null
then
:
else
test $verbose = yes && echo running autoconf in $dir
$autoconf $macrodir_opt $localdir_opt
fi
if grep 'A[CM]_CONFIG_HEADER' configure.in >/dev/null; then
templates=`sed -n '/A[CM]_CONFIG_HEADER/ {
s%[^#]*A[CM]_CONFIG_HEADER[ ]*(\([^)]*\).*%\1%
p
q
}' configure.in`
tcount=`set -- $templates; echo $#`
template=`set -- $templates; echo $1 | sed '
s/.*://
t colon
s/$/.in/
: colon
s/:.*//
'`
stamp=`echo $template | sed 's,/*[^/]*$,,;s,^$,.,'`/stamp-h`test "$tcount" -gt 1 && echo "$tcount"`.in
if test ! -f "$template" || grep autoheader "$template" >/dev/null; then
if test $force = no && test -f $template &&
ls -lt $template configure.in $aclocal $stamp 2>/dev/null \
`echo $localdir_opt | sed -e 's/--localdir=//' \
-e '/./ s%$%/%'`acconfig.h |
sed 1q | egrep "$template$|$stamp$" > /dev/null
then
:
else
test $verbose = yes && echo running autoheader in $dir
$autoheader $macrodir_opt $localdir_opt &&
{ test $verbose != yes || echo touching $stamp; } &&
touch $stamp
fi
fi
fi
)
done

395
legacy/autoconf/autoscan.pl Normal file
View File

@ -0,0 +1,395 @@
#! @PERL@
# autoscan - Create configure.scan (a preliminary configure.in) for a package.
# Copyright (C) 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 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Written by David MacKenzie <djm@gnu.ai.mit.edu>.
require "find.pl";
$datadir = $ENV{"AC_MACRODIR"} || "@datadir@";
$verbose = 0;
# Reference these variables to pacify perl -w.
undef %identifiers_macros;
undef %makevars_macros;
undef %programs_macros;
&parse_args;
&init_tables;
&find('.');
&scan_files;
&output;
exit 0;
# Process any command line arguments.
sub parse_args
{
local ($usage) =
"Usage: autoscan [--macrodir=dir] [--help] [--verbose] [--version] [srcdir]\n";
foreach $_ (@ARGV) {
if (/^--m[a-z]*=(.*)/) {
$datadir = $1;
} elsif (/^--h/) {
print "$usage";
exit 0;
} elsif (/^--verb/) {
$verbose = 1;
} elsif (/^--vers/) {
&version;
} elsif (/^[^-]/) {
die "$usage" if defined($srcdir);
# Top level directory of the package being autoscanned.
$srcdir = $_;
} else {
die "$usage";
}
}
$srcdir="." if !defined($srcdir);
print "srcdir=$srcdir\n" if $verbose;
chdir $srcdir || die "$0: cannot cd to $srcdir: $!\n";
open(CONF, ">configure.scan") ||
die "$0: cannot create configure.scan: $!\n";
}
# Print the version number and exit.
sub version
{
open(ACG, "<$datadir/acgeneral.m4") ||
die "$0: cannot open $datadir/acgeneral.m4: $!\n";
while (<ACG>) {
if (/define.AC_ACVERSION.\s*([0-9.]+)/) {
print "Autoconf version $1\n";
exit 0;
}
}
die "Autoconf version unknown\n";
}
# Put values in the tables of what to do with each token.
sub init_tables
{
local($kind, $word, $macro);
# Initialize a table of C keywords (to ignore).
# Taken from K&R 1st edition p. 180.
# ANSI C, GNU C, and C++ keywords can introduce portability problems,
# so don't ignore them.
foreach $word ('int', 'char', 'float', 'double', 'struct', 'union',
'long', 'short', 'unsigned', 'auto', 'extern', 'register',
'typedef', 'static', 'goto', 'return', 'sizeof', 'break',
'continue', 'if', 'else', 'for', 'do', 'while', 'switch',
'case', 'default') {
$c_keywords{$word} = 0;
}
# 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.in files.
foreach $kind ('functions', 'headers', 'identifiers', 'programs',
'makevars') {
open(TABLE, "<$datadir/ac$kind") ||
die "$0: cannot open $datadir/ac$kind: $!\n";
while (<TABLE>) {
next if /^\s*$/ || /^\s*#/; # Ignore blank lines and comments.
($word, $macro) = split;
eval "\$$kind" . "_macros{\$word} = \$macro";
}
close(TABLE);
}
}
# Collect names of various kinds of files in the package.
# Called by &find on each file.
sub wanted
{
if (/^.*\.[chlymC]$/ || /^.*\.cc$/) {
$name =~ s?^\./??; push(@cfiles, $name);
}
elsif (/^[Mm]akefile$/ || /^[Mm]akefile\.in$/ || /^GNUmakefile$/) {
$name =~ s?^\./??; push(@makefiles, $name);
}
elsif (/^.*\.sh$/) {
$name =~ s?^\./??; push(@shfiles, $name);
}
}
# Read through the files and collect lists of tokens in them
# that might create nonportabilities.
sub scan_files
{
$initfile = $cfiles[0]; # Pick one at random.
if ($verbose) {
print "cfiles:", join(" ", @cfiles), "\n";
print "makefiles:", join(" ", @makefiles), "\n";
print "shfiles:", join(" ", @shfiles), "\n";
}
foreach $file (@cfiles) {
&scan_c_file($file);
}
foreach $file (@makefiles) {
&scan_makefile($file);
}
foreach $file (@shfiles) {
&scan_sh_file($file);
}
}
sub scan_c_file
{
local($file) = @_;
local($in_comment) = 0; # Nonzero if in a multiline comment.
open(CFILE, "<$file") || die "$0: cannot open $file: $!\n";
while (<CFILE>) {
# Strip out comments, approximately.
# Ending on this line.
if ($in_comment && m,\*/,) {
s,.*\*/,,;
$in_comment = 0;
}
# All on one line.
s,/\*.*\*/,,g;
# Starting on this line.
if (m,/\*,) {
$in_comment = 1;
}
# Continuing on this line.
next if $in_comment;
# Preprocessor directives.
if (/^\s*#\s*include\s*<([^>]*)>/) {
$headers{$1}++;
}
# Ignore other preprocessor directives.
next if /^\s*#/;
# Remove string and character constants.
s,\"[^\"]*\",,g;
s,\'[^\']*\',,g;
# Tokens in the code.
# Maybe we should ignore function definitions (in column 0)?
while (s/\W([a-zA-Z_]\w*)\s*\(/ /) {
$functions{$1}++ if !defined($c_keywords{$1});
}
while (s/\W([a-zA-Z_]\w*)\W/ /) {
$identifiers{$1}++ if !defined($c_keywords{$1});
}
}
close(CFILE);
if ($verbose) {
local($word);
print "\n$file functions:\n";
foreach $word (sort keys %functions) {
print "$word $functions{$word}\n";
}
print "\n$file identifiers:\n";
foreach $word (sort keys %identifiers) {
print "$word $identifiers{$word}\n";
}
print "\n$file headers:\n";
foreach $word (sort keys %headers) {
print "$word $headers{$word}\n";
}
}
}
sub scan_makefile
{
local($file) = @_;
open(MFILE, "<$file") || die "$0: cannot open $file: $!\n";
while (<MFILE>) {
# Strip out comments and variable references.
s/#.*//;
s/\$\([^\)]*\)//g;
s/\${[^\}]*}//g;
s/@[^@]*@//g;
# Variable assignments.
while (s/\W([a-zA-Z_]\w*)\s*=/ /) {
$makevars{$1}++;
}
# Libraries.
while (s/\W-l([a-zA-Z_]\w*)\W/ /) {
$libraries{$1}++;
}
# Tokens in the code.
while (s/\W([a-zA-Z_]\w*)\W/ /) {
$programs{$1}++;
}
}
close(MFILE);
if ($verbose) {
local($word);
print "\n$file makevars:\n";
foreach $word (sort keys %makevars) {
print "$word $makevars{$word}\n";
}
print "\n$file libraries:\n";
foreach $word (sort keys %libraries) {
print "$word $libraries{$word}\n";
}
print "\n$file programs:\n";
foreach $word (sort keys %programs) {
print "$word $programs{$word}\n";
}
}
}
sub scan_sh_file
{
local($file) = @_;
open(MFILE, "<$file") || die "$0: cannot open $file: $!\n";
while (<MFILE>) {
# Strip out comments and variable references.
s/#.*//;
s/\${[^\}]*}//g;
s/@[^@]*@//g;
# Tokens in the code.
while (s/\W([a-zA-Z_]\w*)\W/ /) {
$programs{$1}++;
}
}
close(MFILE);
if ($verbose) {
local($word);
print "\n$file programs:\n";
foreach $word (sort keys %programs) {
print "$word $programs{$word}\n";
}
}
}
# Print a configure.in.
sub output
{
local (%unique_makefiles);
print CONF "dnl Process this file with autoconf to produce a configure script.\n";
print CONF "AC_INIT($initfile)\n";
&output_programs;
&output_headers;
&output_identifiers;
&output_functions;
# Change DIR/Makefile.in to DIR/Makefile.
foreach $_ (@makefiles) {
s/\.in$//;
$unique_makefiles{$_}++;
}
print CONF "\nAC_OUTPUT(", join(" ", keys(%unique_makefiles)), ")\n";
close CONF;
}
# Print Autoconf macro $1 if it's not undef and hasn't been printed already.
sub print_unique
{
local($macro) = @_;
if (defined($macro) && !defined($printed{$macro})) {
print CONF "$macro\n";
$printed{$macro} = 1;
}
}
sub output_programs
{
local ($word);
print CONF "\ndnl Checks for programs.\n";
foreach $word (sort keys %programs) {
&print_unique($programs_macros{$word});
}
foreach $word (sort keys %makevars) {
&print_unique($makevars_macros{$word});
}
print CONF "\ndnl Checks for libraries.\n";
foreach $word (sort keys %libraries) {
print CONF "dnl Replace `\main\' with a function in -l$word:\n";
print CONF "AC_CHECK_LIB($word, main)\n";
}
}
sub output_headers
{
local ($word);
print CONF "\ndnl Checks for header files.\n";
foreach $word (sort keys %headers) {
if (defined($headers_macros{$word}) &&
$headers_macros{$word} eq 'AC_CHECK_HEADERS') {
push(@have_headers, $word);
} else {
&print_unique($headers_macros{$word});
}
}
print CONF "AC_CHECK_HEADERS(" . join(' ', sort(@have_headers)) . ")\n"
if defined(@have_headers);
}
sub output_identifiers
{
local ($word);
print CONF "\ndnl Checks for typedefs, structures, and compiler characteristics.\n";
foreach $word (sort keys %identifiers) {
&print_unique($identifiers_macros{$word});
}
}
sub output_functions
{
local ($word);
print CONF "\ndnl Checks for library functions.\n";
foreach $word (sort keys %functions) {
if (defined($functions_macros{$word}) &&
$functions_macros{$word} eq 'AC_CHECK_FUNCS') {
push(@have_funcs, $word);
} else {
&print_unique($functions_macros{$word});
}
}
print CONF "AC_CHECK_FUNCS(" . join(' ', sort(@have_funcs)) . ")\n"
if defined(@have_funcs);
}

View File

@ -0,0 +1,113 @@
#! @SHELL@
# autoupdate - modernize a configure.in
# Copyright (C) 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 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# If given no args, update `configure.in';
# With one arg, write on the standard output from the given template file.
#
# Written by David MacKenzie <djm@gnu.ai.mit.edu>
usage="\
Usage: autoupdate [-h] [--help] [-m dir] [--macrodir=dir]
[--version] [template-file]"
sedtmp=/tmp/acups.$$
# For debugging.
#sedtmp=/tmp/acups
show_version=no
test -z "${AC_MACRODIR}" && AC_MACRODIR=@datadir@
while test $# -gt 0 ; do
case "${1}" in
-h | --help | --h* )
echo "${usage}" 1>&2; exit 0 ;;
--macrodir=* | --m*=* )
AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
shift ;;
-m | --macrodir | --m* )
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
AC_MACRODIR="${1}"
shift ;;
--version | --versio | --versi | --vers)
show_version=yes; shift ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "${usage}" 1>&2; exit 1 ;;
* )
break ;;
esac
done
if test $show_version = yes; then
version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
$AC_MACRODIR/acgeneral.m4`
echo "Autoconf version $version"
exit 0
fi
: ${SIMPLE_BACKUP_SUFFIX='~'}
tmpout=acupo.$$
trap 'rm -f $sedtmp $tmpout; exit 1' 1 2 15
case $# in
0) infile=configure.in; out="> $tmpout"
# Make sure $infile can be read, and $tmpout has the same permissions.
cp $infile $tmpout || exit
# Make sure $infile can be written.
if test ! -w $infile; then
rm -f $tmpout
echo "$0: $infile: cannot write" >&2
exit 1
fi
;;
1) infile="$1"; out= ;;
*) echo "$usage" >&2; exit 1 ;;
esac
# Turn the m4 macro file into a sed script.
# For each old macro name, make one substitution command to replace it
# at the end of a line, and one when followed by ( or whitespace.
# That is easier than splitting the macros up into those that take
# arguments and those that don't.
sed -n -e '
/^AC_DEFUN(/ {
s//s%/
s/, *\[indir(\[/$%/
s/\].*/%/
p
s/\$//
s/%/^/
s/%/\\([( ]\\)^/
s/%/\\1^/
s/\^/%/g
p
}' ${AC_MACRODIR}/acoldnames.m4 > $sedtmp
eval sed -f $sedtmp $infile $out
case $# in
0) mv configure.in configure.in${SIMPLE_BACKUP_SUFFIX} &&
mv $tmpout configure.in ;;
esac
rm -f $sedtmp $tmpout
exit 0

951
legacy/autoconf/config.guess vendored Executable file
View File

@ -0,0 +1,951 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# The master version of this file is at the FSF in /home/gd/gnu/lib.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
# don't specify an explicit system type (host/target name).
#
# Only a few systems have been added to this list; please add others
# (but try to keep the structure clean).
#
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
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
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-cbm-sysv4
exit 0;;
amiga:NetBSD:*:*)
echo m68k-cbm-netbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;;
arc64:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hkmips:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
arm32:NetBSD:*:*)
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
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 0 ;;
NILE:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit 0 ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(head -1 /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 0 ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
atari*:NetBSD:*:*)
echo m68k-atari-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:NetBSD:*:*)
echo m68k-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
macppc:NetBSD:*:*)
echo powerpc-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit 0 ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
2020:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
sed 's/^ //' << EOF >dummy.c
int main (argc, argv) int argc; char **argv; {
#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-cc} dummy.c -o dummy \
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit 0 ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit 0 ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit 0 ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit 0 ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-o ${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 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit 0 ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit 0 ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit 0 ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit 0 ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit 0 ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >dummy.c
#include <sys/systemcfg.h>
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit 0 ;;
*:AIX:*:4)
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
if /usr/sbin/lsattr -EHl ${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=4.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit 0 ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit 0 ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit 0 ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit 0 ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit 0 ;;
9000/[34678]??:HP-UX:*:*)
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 )
sed 's/^ //' << EOF >dummy.c
#include <stdlib.h>
#include <unistd.h>
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
(${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
rm -f dummy.c dummy
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
sed 's/^ //' << EOF >dummy.c
#include <unistd.h>
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-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
exit 0 ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit 0 ;;
i?86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
exit 0 ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit 0 ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit 0 ;;
CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
F300:UNIX_System_V:*:*)
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
F301:UNIX_System_V:*:*)
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
exit 0 ;;
hp3[0-9][05]:NetBSD:*:*)
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
# uname on the ARM produces all sorts of strangeness, and we need to
# filter it out.
case "$UNAME_MACHINE" in
arm* | sa110*) UNAME_MACHINE="arm" ;;
esac
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
ld_supported_emulations=`echo $ld_help_string \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
s/.*supported emulations: *//
s/ .*//
p'`
case "$ld_supported_emulations" in
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
sed 's/^ //' <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
EOF
LIBC=""
${CC-cc} dummy.s -o dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
;;
15)
UNAME_MACHINE="alphaev5"
;;
14)
UNAME_MACHINE="alphaev56"
;;
10)
UNAME_MACHINE="alphapca56"
;;
16)
UNAME_MACHINE="alphaev6"
;;
esac
objdump --private-headers dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >dummy.c <<EOF
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
#ifdef __MIPSEL__
printf ("%sel-unknown-linux-gnu\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
# If ld does not provide *any* "supported emulations:"
# that means it is gnuoldld.
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
case "${UNAME_MACHINE}" in
i?86)
VENDOR=pc;
;;
*)
VENDOR=unknown;
;;
esac
# Determine whether the default compiler is a.out or elf
cat >dummy.c <<EOF
#include <features.h>
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
# endif
#else
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
fi ;;
# 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.
i?86:DYNIX/ptx:4*:*)
echo i386-sequent-sysv4
exit 0 ;;
i?86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
i?86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
i?86:UnixWare:*:*)
if /bin/uname -X 2>/dev/null >/dev/null ; then
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
fi
echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION}
exit 0 ;;
pc:*:*:*)
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
exit 0 ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit 0 ;;
paragon:*:*:*)
echo i860-intel-osf1
exit 0 ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit 0 ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*: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 0
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4 && exit 0 ;;
m68*:LynxOS:2.*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i?86:LynxOS:2.*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
*: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 0 ;;
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
exit 0 ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit 0 ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit 0 ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
exit 0 ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
cat >dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
#else
""
#endif
); exit (0);
#endif
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
printf ("arm-acorn-riscix"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
printf ("m68k-hp-bsd\n"); exit (0);
#endif
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
printf ("%s-next-nextstep%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)
printf ("vax-dec-bsd\n"); exit (0);
#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-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
# Apollos put the system type in the environment.
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
# Convex versions that predate uname can use getsysinfo(1)
if [ -x /usr/convex/getsysinfo ]
then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
exit 0 ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit 0 ;;
c34*)
echo c34-convex-bsd
exit 0 ;;
c38*)
echo c38-convex-bsd
exit 0 ;;
c4*)
echo c4-convex-bsd
exit 0 ;;
esac
fi
#echo '(Unable to guess system type)' 1>&2
exit 1

955
legacy/autoconf/config.sub vendored Executable file
View File

@ -0,0 +1,955 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
if [ x$1 = x ]
then
echo Configuration name missing. 1>&2
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
echo "or $0 ALIAS" 1>&2
echo where ALIAS is a recognized configuration type. 1>&2
exit 1
fi
# First pass through any local machine types.
case $1 in
*local*)
echo $1
exit 0
;;
*)
;;
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
linux-gnu*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple)
os=
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-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/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
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.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
| mipstx39 | mipstx39el \
| sparc | sparclet | sparclite | sparc64 | v850)
basic_machine=$basic_machine-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[34567]86)
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.
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mipstx39-* | mipstx39el-* \
| f301-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-cbm
;;
amigaos | amigados)
basic_machine=m68k-cbm
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-cbm
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
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 | ymp)
basic_machine=ymp-cray
os=-unicos
;;
cray2)
basic_machine=cray2-cray
os=-unicos
;;
[ctj]90-cray)
basic_machine=c90-cray
os=-unicos
;;
crds | unos)
basic_machine=m68k-crds
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
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
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-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
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppa-next)
os=-nextstep3
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[34567]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i[34567]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i[34567]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i[34567]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
miniframe)
basic_machine=m68000-convergent
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
;;
mips*-linux*)
basic_machine=mips-unknown
os=-linux-gnu
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
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
;;
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
;;
np1)
basic_machine=np1-gould
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | nexen)
basic_machine=i586-pc
;;
pentiumpro | p6 | k6 | 6x86)
basic_machine=i686-pc
;;
pentiumii | pentium2)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | k6-* | 6x86-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=rs6000-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
sequent)
basic_machine=i386-sequent
;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
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
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
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
;;
xmp)
basic_machine=xmp-cray
os=-unicos
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
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.
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
fi
;;
romp)
basic_machine=romp-ibm
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sparc)
basic_machine=sparc-sun
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-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|'`
;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-ctix* | -uts*)
os=-sysv
;;
-ns2 )
os=-nextstep2
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-xenix)
os=-xenix
;;
-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
*-acorn)
os=-riscix1.2
;;
arm*-semi)
os=-aout
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-be)
os=-beos
;;
*-ibm)
os=-aix
;;
*-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
;;
f301-fujitsu)
os=-uxpv
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-aix*)
vendor=ibm
;;
-hpux*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-vxsim* | -vxworks*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os

1017
legacy/autoconf/configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(acgeneral.m4)
AC_ARG_PROGRAM
dnl We use a path for GNU m4 so even if users have another m4 first in
dnl their path, the installer can configure with a path that has GNU m4
dnl first and get that path embedded in the installed autoconf and
dnl autoheader scripts.
AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
AC_PROG_AWK
dnl We use a path for perl so the #! line in autoscan will work.
AC_PATH_PROG(PERL, perl, no)
AC_SUBST(PERL)dnl
AC_SUBST(SCRIPTS)dnl
if test "$PERL" != no; then
SCRIPTS=autoscan
else
AC_MSG_WARN(autoscan will not be built since perl is not found)
fi
AC_PROG_INSTALL
# Work with the GNU or Cygnus source tree layout.
if test -f $srcdir/standards.texi; then
standards_info=standards.info standards_dvi=standards.dvi
fi
AC_SUBST(standards_info)dnl
AC_SUBST(standards_dvi)dnl
AC_OUTPUT(Makefile testsuite/Makefile)

101
legacy/autoconf/ifnames.sh Normal file
View File

@ -0,0 +1,101 @@
#! @SHELL@
# ifnames - print the identifiers used in C preprocessor conditionals
# Copyright (C) 1994, 1995 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Reads from stdin if no files are given.
# Writes to stdout.
# Written by David MacKenzie <djm@gnu.ai.mit.edu>
# and Paul Eggert <eggert@twinsun.com>.
usage="\
Usage: ifnames [-h] [--help] [-m dir] [--macrodir=dir] [--version] [file...]"
show_version=no
: ${AC_MACRODIR=@datadir@}
while test $# -gt 0; do
case "$1" in
-h | --help | --h* )
echo "$usage"; exit 0 ;;
--macrodir=* | --m*=* )
AC_MACRODIR="`echo \"$1\" | sed -e 's/^[^=]*=//'`"
shift ;;
-m | --macrodir | --m* )
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
AC_MACRODIR="$1"
shift ;;
--version | --versio | --versi | --vers)
show_version=yes; shift ;;
--) # Stop option processing.
shift; break ;;
-*) echo "$usage" 1>&2; exit 1 ;;
*) break ;;
esac
done
if test $show_version = yes; then
version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
$AC_MACRODIR/acgeneral.m4`
echo "Autoconf version $version"
exit 0
fi
@AWK@ '
# Record that sym was found in FILENAME.
function file_sym(sym, i, fs) {
if (sym ~ /^[A-Za-z_]/) {
if (!found[sym,FILENAME]) {
found[sym,FILENAME] = 1
# Insert FILENAME into files[sym], keeping the list sorted.
i = 1
fs = files[sym]
while (match(substr(fs, i), /^ [^ ]*/) \
&& substr(fs, i + 1, RLENGTH - 1) < FILENAME) {
i += RLENGTH
}
files[sym] = substr(fs, 1, i - 1) " " FILENAME substr(fs, i)
}
}
}
/^[\t ]*#/ {
if (sub(/^[\t ]*#[\t ]*ifn?def[\t ]+/, "", $0)) {
sub(/[^A-Za-z_0-9].*/, "", $0)
file_sym($0)
}
if (sub(/^[\t ]*#[\t ]*(el)?if[\t ]+/, "", $0)) {
# Remove comments. Not perfect, but close enough.
gsub(/\/\*[^\/]*(\*\/)?/, "", $0)
for (i = split($0, field, /[^A-Za-z_0-9]+/); 1 <= i; i--) {
if (field[i] != "defined") {
file_sym(field[i])
}
}
}
}
END {
for (sym in files) {
print sym files[sym]
}
}
' ${1+"$@"} | sort

251
legacy/autoconf/install-sh Executable file
View File

@ -0,0 +1,251 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to 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. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

View File

@ -0,0 +1,209 @@
@c This file is included by autoconf.texi and is used to produce
@c the INSTALL file.
@node Basic Installation
@section Basic Installation
These are generic installation instructions.
The @code{configure} shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a @file{Makefile} in each directory of the
package. It may also create one or more @file{.h} files containing
system-dependent definitions. Finally, it creates a shell script
@file{config.status} that you can run in the future to recreate the
current configuration, a file @file{config.cache} that saves the results
of its tests to speed up reconfiguring, and a file @file{config.log}
containing compiler output (useful mainly for debugging
@code{configure}).
If you need to do unusual things to compile the package, please try to
figure out how @code{configure} could check whether to do them, and mail
diffs or instructions to the address given in the @file{README} so they
can be considered for the next release. If at some point
@file{config.cache} contains results you don't want to keep, you may
remove or edit it.
The file @file{configure.in} is used to create @file{configure} by a
program called @code{autoconf}. You only need @file{configure.in} if
you want to change it or regenerate @file{configure} using a newer
version of @code{autoconf}.
@noindent
The simplest way to compile this package is:
@enumerate
@item
@code{cd} to the directory containing the package's source code and type
@samp{./configure} to configure the package for your system. If you're
using @code{csh} on an old version of System V, you might need to type
@samp{sh ./configure} instead to prevent @code{csh} from trying to
execute @code{configure} itself.
Running @code{configure} takes awhile. While running, it prints some
messages telling which features it is checking for.
@item
Type @samp{make} to compile the package.
@item
Optionally, type @samp{make check} to run any self-tests that come with
the package.
@item
Type @samp{make install} to install the programs and any data files and
documentation.
@item
You can remove the program binaries and object files from the source code
directory by typing @samp{make clean}. To also remove the files that
@code{configure} created (so you can compile the package for a different
kind of computer), type @samp{make distclean}. There is also a
@samp{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.
@end enumerate
@node Compilers and Options
@section Compilers and Options
Some systems require unusual options for compilation or linking that
the @code{configure} script does not know about. You can give
@code{configure} initial values for variables by setting them in the
environment. Using a Bourne-compatible shell, you can do that on the
command line like this:
@example
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
@end example
@noindent
Or on systems that have the @code{env} program, you can do it like this:
@example
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
@end example
@node Multiple Architectures
@section Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of @code{make} that
supports the @code{VPATH} variable, such as GNU @code{make}. @code{cd}
to the directory where you want the object files and executables to go
and run the @code{configure} script. @code{configure} automatically
checks for the source code in the directory that @code{configure} is in
and in @file{..}.
If you have to use a @code{make} that does not supports the @code{VPATH}
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use @samp{make distclean} before reconfiguring for
another architecture.
@node Installation Names
@section Installation Names
By default, @samp{make install} will install the package's files in
@file{/usr/local/bin}, @file{/usr/local/man}, etc. You can specify an
installation prefix other than @file{/usr/local} by giving
@code{configure} the option @samp{--prefix=@var{path}}.
You can specify separate installation prefixes for architecture-specific
files and architecture-independent files. If you give @code{configure}
the option @samp{--exec-prefix=@var{path}}, the package will use
@var{path} as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give options
like @samp{--bindir=@var{path}} to specify different values for
particular kinds of files. Run @samp{configure --help} for a list of
the directories you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed with
an extra prefix or suffix on their names by giving @code{configure} the
option @samp{--program-prefix=@var{PREFIX}} or
@samp{--program-suffix=@var{SUFFIX}}.
@node Optional Features
@section Optional Features
Some packages pay attention to @samp{--enable-@var{feature}} options to
@code{configure}, where @var{feature} indicates an optional part of the
package. They may also pay attention to @samp{--with-@var{package}}
options, where @var{package} is something like @samp{gnu-as} or @samp{x}
(for the X Window System). The @file{README} should mention any
@samp{--enable-} and @samp{--with-} options that the package recognizes.
For packages that use the X Window System, @code{configure} can usually
find the X include and library files automatically, but if it doesn't,
you can use the @code{configure} options @samp{--x-includes=@var{dir}}
and @samp{--x-libraries=@var{dir}} to specify their locations.
@node System Type
@section Specifying the System Type
There may be some features @code{configure} can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually @code{configure} can figure that out, but if it
prints a message saying it can not guess the host type, give it the
@samp{--host=@var{type}} option. @var{type} can either be a short name
for the system type, such as @samp{sun4}, or a canonical name with three
fields:
@example
@var{cpu}-@var{company}-@var{system}
@end example
@noindent
See the file @file{config.sub} for the possible values of each field.
If @file{config.sub} isn't included in this package, then this package
doesn't need to know the host type.
If you are building compiler tools for cross-compiling, you can also use
the @samp{--target=@var{type}} option to select the type of system
they will produce code for and the @samp{--build=@var{type}} option
to select the type of system on which you are compiling the package.
@node Sharing Defaults
@section Sharing Defaults
If you want to set default values for @code{configure} scripts to share,
you can create a site shell script called @file{config.site} that gives
default values for variables like @code{CC}, @code{cache_file}, and
@code{prefix}. @code{configure} looks for
@file{@var{prefix}/share/config.site} if it exists, then
@file{@var{prefix}/etc/config.site} if it exists. Or, you can set
the @code{CONFIG_SITE} environment variable to the location of the site
script. A warning: not all @code{configure} scripts look for a site script.
@node Operation Controls
@section Operation Controls
@code{configure} recognizes the following options to control how it
operates.
@table @code
@item --cache-file=@var{file}
Use and save the results of the tests in @var{file} instead of
@file{./config.cache}. Set @var{file} to @file{/dev/null} to disable
caching, for debugging @code{configure}.
@item --help
Print a summary of the options to @code{configure}, and exit.
@item --quiet
@itemx --silent
@itemx -q
Do not print messages saying which checks are being made.
To suppress all normal output, redirect it to @file{/dev/null}
(any error messages will still be shown).
@item --srcdir=@var{dir}
Look for the package's source code in directory @var{dir}. Usually
@code{configure} can determine that directory automatically.
@item --version
Print the version of Autoconf used to generate the @code{configure}
script, and exit.
@end table
@noindent
@code{configure} also accepts some other, not widely useful, options.

View File

@ -0,0 +1,894 @@
@comment This file is included by both standards.texi and make.texinfo.
@comment It was broken out of standards.texi on 1/6/93 by roland.
@node Makefile Conventions
@chapter Makefile Conventions
@comment standards.texi does not print an index, but make.texinfo does.
@cindex makefile, conventions for
@cindex conventions for makefiles
@cindex standards for makefiles
This
@ifinfo
node
@end ifinfo
@iftex
@ifset CODESTD
section
@end ifset
@ifclear CODESTD
chapter
@end ifclear
@end iftex
describes conventions for writing the Makefiles for GNU programs.
@menu
* Makefile Basics:: General Conventions for Makefiles
* Utilities in Makefiles:: Utilities in Makefiles
* Command Variables:: Variables for Specifying Commands
* Directory Variables:: Variables for Installation Directories
* Standard Targets:: Standard Targets for Users
* Install Command Categories:: Three categories of commands in the `install'
rule: normal, pre-install and post-install.
@end menu
@node Makefile Basics
@section General Conventions for Makefiles
Every Makefile should contain this line:
@example
SHELL = /bin/sh
@end example
@noindent
to avoid trouble on systems where the @code{SHELL} variable might be
inherited from the environment. (This is never a problem with GNU
@code{make}.)
Different @code{make} programs have incompatible suffix lists and
implicit rules, and this sometimes creates confusion or misbehavior. So
it is a good idea to set the suffix list explicitly using only the
suffixes you need in the particular Makefile, like this:
@example
.SUFFIXES:
.SUFFIXES: .c .o
@end example
@noindent
The first line clears out the suffix list, the second introduces all
suffixes which may be subject to implicit rules in this Makefile.
Don't assume that @file{.} is in the path for command execution. When
you need to run programs that are a part of your package during the
make, please make sure that it uses @file{./} if the program is built as
part of the make or @file{$(srcdir)/} if the file is an unchanging part
of the source code. Without one of these prefixes, the current search
path is used.
The distinction between @file{./} (the @dfn{build directory}) and
@file{$(srcdir)/} (the @dfn{source directory}) is important because
users can build in a separate directory using the @samp{--srcdir} option
to @file{configure}. A rule of the form:
@smallexample
foo.1 : foo.man sedscript
sed -e sedscript foo.man > foo.1
@end smallexample
@noindent
will fail when the build directory is not the source directory, because
@file{foo.man} and @file{sedscript} are in the the source directory.
When using GNU @code{make}, relying on @samp{VPATH} to find the source
file will work in the case where there is a single dependency file,
since the @code{make} automatic variable @samp{$<} will represent the
source file wherever it is. (Many versions of @code{make} set @samp{$<}
only in implicit rules.) A Makefile target like
@smallexample
foo.o : bar.c
$(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o
@end smallexample
@noindent
should instead be written as
@smallexample
foo.o : bar.c
$(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@@
@end smallexample
@noindent
in order to allow @samp{VPATH} to work correctly. When the target has
multiple dependencies, using an explicit @samp{$(srcdir)} is the easiest
way to make the rule work well. For example, the target above for
@file{foo.1} is best written as:
@smallexample
foo.1 : foo.man sedscript
sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@@
@end smallexample
GNU distributions usually contain some files which are not source
files---for example, Info files, and the output from Autoconf, Automake,
Bison or Flex. Since these files normally appear in the source
directory, they should always appear in the source directory, not in the
build directory. So Makefile rules to update them should put the
updated files in the source directory.
However, if a file does not appear in the distribution, then the
Makefile should not put it in the source directory, because building a
program in ordinary circumstances should not modify the source directory
in any way.
Try to make the build and installation targets, at least (and all their
subtargets) work correctly with a parallel @code{make}.
@node Utilities in Makefiles
@section Utilities in Makefiles
Write the Makefile commands (and any shell scripts, such as
@code{configure}) to run in @code{sh}, not in @code{csh}. Don't use any
special features of @code{ksh} or @code{bash}.
The @code{configure} script and the Makefile rules for building and
installation should not use any utilities directly except these:
@c dd find
@c gunzip gzip md5sum
@c mkfifo mknod tee uname
@example
cat cmp cp diff echo egrep expr false grep install-info
ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true
@end example
The compression program @code{gzip} can be used in the @code{dist} rule.
Stick to the generally supported options for these programs. For
example, don't use @samp{mkdir -p}, convenient as it may be, because
most systems don't support it.
It is a good idea to avoid creating symbolic links in makefiles, since a
few systems don't support them.
The Makefile rules for building and installation can also use compilers
and related programs, but should do so via @code{make} variables so that the
user can substitute alternatives. Here are some of the programs we
mean:
@example
ar bison cc flex install ld ldconfig lex
make makeinfo ranlib texi2dvi yacc
@end example
Use the following @code{make} variables to run those programs:
@example
$(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX)
$(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC)
@end example
When you use @code{ranlib} or @code{ldconfig}, you should make sure
nothing bad happens if the system does not have the program in question.
Arrange to ignore an error from that command, and print a message before
the command to tell the user that failure of this command does not mean
a problem. (The Autoconf @samp{AC_PROG_RANLIB} macro can help with
this.)
If you use symbolic links, you should implement a fallback for systems
that don't have symbolic links.
Additional utilities that can be used via Make variables are:
@example
chgrp chmod chown mknod
@end example
It is ok to use other utilities in Makefile portions (or scripts)
intended only for particular systems where you know those utilities
exist.
@node Command Variables
@section Variables for Specifying Commands
Makefiles should provide variables for overriding certain commands, options,
and so on.
In particular, you should run most utility programs via variables.
Thus, if you use Bison, have a variable named @code{BISON} whose default
value is set with @samp{BISON = bison}, and refer to it with
@code{$(BISON)} whenever you need to use Bison.
File management utilities such as @code{ln}, @code{rm}, @code{mv}, and
so on, need not be referred to through variables in this way, since users
don't need to replace them with other programs.
Each program-name variable should come with an options variable that is
used to supply options to the program. Append @samp{FLAGS} to the
program-name variable name to get the options variable name---for
example, @code{BISONFLAGS}. (The names @code{CFLAGS} for the C
compiler, @code{YFLAGS} for yacc, and @code{LFLAGS} for lex, are
exceptions to this rule, but we keep them because they are standard.)
Use @code{CPPFLAGS} in any compilation command that runs the
preprocessor, and use @code{LDFLAGS} in any compilation command that
does linking as well as in any direct use of @code{ld}.
If there are C compiler options that @emph{must} be used for proper
compilation of certain files, do not include them in @code{CFLAGS}.
Users expect to be able to specify @code{CFLAGS} freely themselves.
Instead, arrange to pass the necessary options to the C compiler
independently of @code{CFLAGS}, by writing them explicitly in the
compilation commands or by defining an implicit rule, like this:
@smallexample
CFLAGS = -g
ALL_CFLAGS = -I. $(CFLAGS)
.c.o:
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
@end smallexample
Do include the @samp{-g} option in @code{CFLAGS}, because that is not
@emph{required} for proper compilation. You can consider it a default
that is only recommended. If the package is set up so that it is
compiled with GCC by default, then you might as well include @samp{-O}
in the default value of @code{CFLAGS} as well.
Put @code{CFLAGS} last in the compilation command, after other variables
containing compiler options, so the user can use @code{CFLAGS} to
override the others.
@code{CFLAGS} should be used in every invocation of the C compiler,
both those which do compilation and those which do linking.
Every Makefile should define the variable @code{INSTALL}, which is the
basic command for installing a file into the system.
Every Makefile should also define the variables @code{INSTALL_PROGRAM}
and @code{INSTALL_DATA}. (The default for each of these should be
@code{$(INSTALL)}.) Then it should use those variables as the commands
for actual installation, for executables and nonexecutables
respectively. Use these variables as follows:
@example
$(INSTALL_PROGRAM) foo $(bindir)/foo
$(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a
@end example
@noindent
Always use a file name, not a directory name, as the second argument of
the installation commands. Use a separate command for each file to be
installed.
@node Directory Variables
@section Variables for Installation Directories
Installation directories should always be named by variables, so it is
easy to install in a nonstandard place. The standard names for these
variables are described below. They are based on a standard filesystem
layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
other modern operating systems.
These two variables set the root for the installation. All the other
installation directories should be subdirectories of one of these two,
and nothing should be directly installed into these two directories.
@table @samp
@item prefix
A prefix used in constructing the default values of the variables listed
below. The default value of @code{prefix} should be @file{/usr/local}.
When building the complete GNU system, the prefix will be empty and
@file{/usr} will be a symbolic link to @file{/}.
(If you are using Autoconf, write it as @samp{@@prefix@@}.)
@item exec_prefix
A prefix used in constructing the default values of some of the
variables listed below. The default value of @code{exec_prefix} should
be @code{$(prefix)}.
(If you are using Autoconf, write it as @samp{@@exec_prefix@@}.)
Generally, @code{$(exec_prefix)} is used for directories that contain
machine-specific files (such as executables and subroutine libraries),
while @code{$(prefix)} is used directly for other directories.
@end table
Executable programs are installed in one of the following directories.
@table @samp
@item bindir
The directory for installing executable programs that users can run.
This should normally be @file{/usr/local/bin}, but write it as
@file{$(exec_prefix)/bin}.
(If you are using Autoconf, write it as @samp{@@bindir@@}.)
@item sbindir
The directory for installing executable programs that can be run from
the shell, but are only generally useful to system administrators. This
should normally be @file{/usr/local/sbin}, but write it as
@file{$(exec_prefix)/sbin}.
(If you are using Autoconf, write it as @samp{@@sbindir@@}.)
@item libexecdir
@comment This paragraph adjusted to avoid overfull hbox --roland 5jul94
The directory for installing executable programs to be run by other
programs rather than by users. This directory should normally be
@file{/usr/local/libexec}, but write it as @file{$(exec_prefix)/libexec}.
(If you are using Autoconf, write it as @samp{@@libexecdir@@}.)
@end table
Data files used by the program during its execution are divided into
categories in two ways.
@itemize @bullet
@item
Some files are normally modified by programs; others are never normally
modified (though users may edit some of these).
@item
Some files are architecture-independent and can be shared by all
machines at a site; some are architecture-dependent and can be shared
only by machines of the same kind and operating system; others may never
be shared between two machines.
@end itemize
This makes for six different possibilities. However, we want to
discourage the use of architecture-dependent files, aside from object
files and libraries. It is much cleaner to make other data files
architecture-independent, and it is generally not hard.
Therefore, here are the variables Makefiles should use to specify
directories:
@table @samp
@item datadir
The directory for installing read-only architecture independent data
files. This should normally be @file{/usr/local/share}, but write it as
@file{$(prefix)/share}.
(If you are using Autoconf, write it as @samp{@@datadir@@}.)
As a special exception, see @file{$(infodir)}
and @file{$(includedir)} below.
@item sysconfdir
The directory for installing read-only data files that pertain to a
single machine--that is to say, files for configuring a host. Mailer
and network configuration files, @file{/etc/passwd}, and so forth belong
here. All the files in this directory should be ordinary ASCII text
files. This directory should normally be @file{/usr/local/etc}, but
write it as @file{$(prefix)/etc}.
(If you are using Autoconf, write it as @samp{@@sysconfdir@@}.)
Do not install executables here in this directory (they probably belong
in @file{$(libexecdir)} or @file{$(sbindir)}). Also do not install
files that are modified in the normal course of their use (programs
whose purpose is to change the configuration of the system excluded).
Those probably belong in @file{$(localstatedir)}.
@item sharedstatedir
The directory for installing architecture-independent data files which
the programs modify while they run. This should normally be
@file{/usr/local/com}, but write it as @file{$(prefix)/com}.
(If you are using Autoconf, write it as @samp{@@sharedstatedir@@}.)
@item localstatedir
The directory for installing data files which the programs modify while
they run, and that pertain to one specific machine. Users should never
need to modify files in this directory to configure the package's
operation; put such configuration information in separate files that go
in @file{$(datadir)} or @file{$(sysconfdir)}. @file{$(localstatedir)}
should normally be @file{/usr/local/var}, but write it as
@file{$(prefix)/var}.
(If you are using Autoconf, write it as @samp{@@localstatedir@@}.)
@item libdir
The directory for object files and libraries of object code. Do not
install executables here, they probably ought to go in @file{$(libexecdir)}
instead. The value of @code{libdir} should normally be
@file{/usr/local/lib}, but write it as @file{$(exec_prefix)/lib}.
(If you are using Autoconf, write it as @samp{@@libdir@@}.)
@item infodir
The directory for installing the Info files for this package. By
default, it should be @file{/usr/local/info}, but it should be written
as @file{$(prefix)/info}.
(If you are using Autoconf, write it as @samp{@@infodir@@}.)
@item lispdir
The directory for installing any Emacs Lisp files in this package. By
default, it should be @file{/usr/local/share/emacs/site-lisp}, but it
should be written as @file{$(prefix)/share/emacs/site-lisp}.
If you are using Autoconf, write the default as @samp{@@lispdir@@}.
In order to make @samp{@@lispdir@@} work, you need the following lines
in your @file{configure.in} file:
@example
lispdir='$@{datadir@}/emacs/site-lisp'
AC_SUBST(lispdir)
@end example
@item includedir
@c rewritten to avoid overfull hbox --roland
The directory for installing header files to be included by user
programs with the C @samp{#include} preprocessor directive. This
should normally be @file{/usr/local/include}, but write it as
@file{$(prefix)/include}.
(If you are using Autoconf, write it as @samp{@@includedir@@}.)
Most compilers other than GCC do not look for header files in directory
@file{/usr/local/include}. So installing the header files this way is
only useful with GCC. Sometimes this is not a problem because some
libraries are only really intended to work with GCC. But some libraries
are intended to work with other compilers. They should install their
header files in two places, one specified by @code{includedir} and one
specified by @code{oldincludedir}.
@item oldincludedir
The directory for installing @samp{#include} header files for use with
compilers other than GCC. This should normally be @file{/usr/include}.
(If you are using Autoconf, you can write it as @samp{@@oldincludedir@@}.)
The Makefile commands should check whether the value of
@code{oldincludedir} is empty. If it is, they should not try to use
it; they should cancel the second installation of the header files.
A package should not replace an existing header in this directory unless
the header came from the same package. Thus, if your Foo package
provides a header file @file{foo.h}, then it should install the header
file in the @code{oldincludedir} directory if either (1) there is no
@file{foo.h} there or (2) the @file{foo.h} that exists came from the Foo
package.
To tell whether @file{foo.h} came from the Foo package, put a magic
string in the file---part of a comment---and @code{grep} for that string.
@end table
Unix-style man pages are installed in one of the following:
@table @samp
@item mandir
The top-level directory for installing the man pages (if any) for this
package. It will normally be @file{/usr/local/man}, but you should
write it as @file{$(prefix)/man}.
(If you are using Autoconf, write it as @samp{@@mandir@@}.)
@item man1dir
The directory for installing section 1 man pages. Write it as
@file{$(mandir)/man1}.
@item man2dir
The directory for installing section 2 man pages. Write it as
@file{$(mandir)/man2}
@item @dots{}
@strong{Don't make the primary documentation for any GNU software be a
man page. Write a manual in Texinfo instead. Man pages are just for
the sake of people running GNU software on Unix, which is a secondary
application only.}
@item manext
The file name extension for the installed man page. This should contain
a period followed by the appropriate digit; it should normally be @samp{.1}.
@item man1ext
The file name extension for installed section 1 man pages.
@item man2ext
The file name extension for installed section 2 man pages.
@item @dots{}
Use these names instead of @samp{manext} if the package needs to install man
pages in more than one section of the manual.
@end table
And finally, you should set the following variable:
@table @samp
@item srcdir
The directory for the sources being compiled. The value of this
variable is normally inserted by the @code{configure} shell script.
(If you are using Autconf, use @samp{srcdir = @@srcdir@@}.)
@end table
For example:
@smallexample
@c I have changed some of the comments here slightly to fix an overfull
@c hbox, so the make manual can format correctly. --roland
# Common prefix for installation directories.
# NOTE: This directory must exist when you start the install.
prefix = /usr/local
exec_prefix = $(prefix)
# Where to put the executable for the command `gcc'.
bindir = $(exec_prefix)/bin
# Where to put the directories used by the compiler.
libexecdir = $(exec_prefix)/libexec
# Where to put the Info files.
infodir = $(prefix)/info
@end smallexample
If your program installs a large number of files into one of the
standard user-specified directories, it might be useful to group them
into a subdirectory particular to that program. If you do this, you
should write the @code{install} rule to create these subdirectories.
Do not expect the user to include the subdirectory name in the value of
any of the variables listed above. The idea of having a uniform set of
variable names for installation directories is to enable the user to
specify the exact same values for several different GNU packages. In
order for this to be useful, all the packages must be designed so that
they will work sensibly when the user does so.
@node Standard Targets
@section Standard Targets for Users
All GNU programs should have the following targets in their Makefiles:
@table @samp
@item all
Compile the entire program. This should be the default target. This
target need not rebuild any documentation files; Info files should
normally be included in the distribution, and DVI files should be made
only when explicitly asked for.
By default, the Make rules should compile and link with @samp{-g}, so
that executable programs have debugging symbols. Users who don't mind
being helpless can strip the executables later if they wish.
@item install
Compile the program and copy the executables, libraries, and so on to
the file names where they should reside for actual use. If there is a
simple test to verify that a program is properly installed, this target
should run that test.
Do not strip executables when installing them. Devil-may-care users can
use the @code{install-strip} target to do that.
If possible, write the @code{install} target rule so that it does not
modify anything in the directory where the program was built, provided
@samp{make all} has just been done. This is convenient for building the
program under one user name and installing it under another.
The commands should create all the directories in which files are to be
installed, if they don't already exist. This includes the directories
specified as the values of the variables @code{prefix} and
@code{exec_prefix}, as well as all subdirectories that are needed.
One way to do this is by means of an @code{installdirs} target
as described below.
Use @samp{-} before any command for installing a man page, so that
@code{make} will ignore any errors. This is in case there are systems
that don't have the Unix man page documentation system installed.
The way to install Info files is to copy them into @file{$(infodir)}
with @code{$(INSTALL_DATA)} (@pxref{Command Variables}), and then run
the @code{install-info} program if it is present. @code{install-info}
is a program that edits the Info @file{dir} file to add or update the
menu entry for the given Info file; it is part of the Texinfo package.
Here is a sample rule to install an Info file:
@comment This example has been carefully formatted for the Make manual.
@comment Please do not reformat it without talking to roland@gnu.ai.mit.edu.
@smallexample
$(infodir)/foo.info: foo.info
$(POST_INSTALL)
# There may be a newer info file in . than in srcdir.
-if test -f foo.info; then d=.; \
else d=$(srcdir); fi; \
$(INSTALL_DATA) $$d/foo.info $@@; \
# Run install-info only if it exists.
# Use `if' instead of just prepending `-' to the
# line so we notice real errors from install-info.
# We use `$(SHELL) -c' because some shells do not
# fail gracefully when there is an unknown command.
if $(SHELL) -c 'install-info --version' \
>/dev/null 2>&1; then \
install-info --dir-file=$(infodir)/dir \
$(infodir)/foo.info; \
else true; fi
@end smallexample
When writing the @code{install} target, you must classify all the
commands into three categories: normal ones, @dfn{pre-installation}
commands and @dfn{post-installation} commands. @xref{Install Command
Categories}.
@item uninstall
Delete all the installed files---the copies that the @samp{install}
target creates.
This rule should not modify the directories where compilation is done,
only the directories where files are installed.
The uninstallation commands are divided into three categories, just like
the installation commands. @xref{Install Command Categories}.
@item install-strip
Like @code{install}, but strip the executable files while installing
them. In many cases, the definition of this target can be very simple:
@smallexample
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
install
@end smallexample
Normally we do not recommend stripping an executable unless you are sure
the program has no bugs. However, it can be reasonable to install a
stripped executable for actual execution while saving the unstripped
executable elsewhere in case there is a bug.
@comment The gratuitous blank line here is to make the table look better
@comment in the printed Make manual. Please leave it in.
@item clean
Delete all files from the current directory that are normally created by
building the program. Don't delete the files that record the
configuration. Also preserve files that could be made by building, but
normally aren't because the distribution comes with them.
Delete @file{.dvi} files here if they are not part of the distribution.
@item distclean
Delete all files from the current directory that are created by
configuring or building the program. If you have unpacked the source
and built the program without creating any other files, @samp{make
distclean} should leave only the files that were in the distribution.
@item mostlyclean
Like @samp{clean}, but may refrain from deleting a few files that people
normally don't want to recompile. For example, the @samp{mostlyclean}
target for GCC does not delete @file{libgcc.a}, because recompiling it
is rarely necessary and takes a lot of time.
@item maintainer-clean
Delete almost everything from the current directory that can be
reconstructed with this Makefile. This typically includes everything
deleted by @code{distclean}, plus more: C source files produced by
Bison, tags tables, Info files, and so on.
The reason we say ``almost everything'' is that running the command
@samp{make maintainer-clean} should not delete @file{configure} even if
@file{configure} can be remade using a rule in the Makefile. More generally,
@samp{make maintainer-clean} should not delete anything that needs to
exist in order to run @file{configure} and then begin to build the
program. This is the only exception; @code{maintainer-clean} should
delete everything else that can be rebuilt.
The @samp{maintainer-clean} target is intended to be used by a maintainer of
the package, not by ordinary users. You may need special tools to
reconstruct some of the files that @samp{make maintainer-clean} deletes.
Since these files are normally included in the distribution, we don't
take care to make them easy to reconstruct. If you find you need to
unpack the full distribution again, don't blame us.
To help make users aware of this, the commands for the special
@code{maintainer-clean} target should start with these two:
@smallexample
@@echo 'This command is intended for maintainers to use; it'
@@echo 'deletes files that may need special tools to rebuild.'
@end smallexample
@item TAGS
Update a tags table for this program.
@c ADR: how?
@item info
Generate any Info files needed. The best way to write the rules is as
follows:
@smallexample
info: foo.info
foo.info: foo.texi chap1.texi chap2.texi
$(MAKEINFO) $(srcdir)/foo.texi
@end smallexample
@noindent
You must define the variable @code{MAKEINFO} in the Makefile. It should
run the @code{makeinfo} program, which is part of the Texinfo
distribution.
Normally a GNU distribution comes with Info files, and that means the
Info files are present in the source directory. Therefore, the Make
rule for an info file should update it in the source directory. When
users build the package, ordinarily Make will not update the Info files
because they will already be up to date.
@item dvi
Generate DVI files for all Texinfo documentation.
For example:
@smallexample
dvi: foo.dvi
foo.dvi: foo.texi chap1.texi chap2.texi
$(TEXI2DVI) $(srcdir)/foo.texi
@end smallexample
@noindent
You must define the variable @code{TEXI2DVI} in the Makefile. It should
run the program @code{texi2dvi}, which is part of the Texinfo
distribution.@footnote{@code{texi2dvi} uses @TeX{} to do the real work
of formatting. @TeX{} is not distributed with Texinfo.} Alternatively,
write just the dependencies, and allow GNU @code{make} to provide the command.
@item dist
Create a distribution tar file for this program. The tar file should be
set up so that the file names in the tar file start with a subdirectory
name which is the name of the package it is a distribution for. This
name can include the version number.
For example, the distribution tar file of GCC version 1.40 unpacks into
a subdirectory named @file{gcc-1.40}.
The easiest way to do this is to create a subdirectory appropriately
named, use @code{ln} or @code{cp} to install the proper files in it, and
then @code{tar} that subdirectory.
Compress the tar file file with @code{gzip}. For example, the actual
distribution file for GCC version 1.40 is called @file{gcc-1.40.tar.gz}.
The @code{dist} target should explicitly depend on all non-source files
that are in the distribution, to make sure they are up to date in the
distribution.
@ifset CODESTD
@xref{Releases, , Making Releases}.
@end ifset
@ifclear CODESTD
@xref{Releases, , Making Releases, standards, GNU Coding Standards}.
@end ifclear
@item check
Perform self-tests (if any). The user must build the program before
running the tests, but need not install the program; you should write
the self-tests so that they work when the program is built but not
installed.
@end table
The following targets are suggested as conventional names, for programs
in which they are useful.
@table @code
@item installcheck
Perform installation tests (if any). The user must build and install
the program before running the tests. You should not assume that
@file{$(bindir)} is in the search path.
@item installdirs
It's useful to add a target named @samp{installdirs} to create the
directories where files are installed, and their parent directories.
There is a script called @file{mkinstalldirs} which is convenient for
this; you can find it in the Texinfo package.
@c It's in /gd/gnu/lib/mkinstalldirs.
You can use a rule like this:
@comment This has been carefully formatted to look decent in the Make manual.
@comment Please be sure not to make it extend any further to the right.--roland
@smallexample
# Make sure all installation directories (e.g. $(bindir))
# actually exist by making them if necessary.
installdirs: mkinstalldirs
$(srcdir)/mkinstalldirs $(bindir) $(datadir) \
$(libdir) $(infodir) \
$(mandir)
@end smallexample
This rule should not modify the directories where compilation is done.
It should do nothing but create installation directories.
@end table
@node Install Command Categories
@section Install Command Categories
@cindex pre-installation commands
@cindex post-installation commands
When writing the @code{install} target, you must classify all the
commands into three categories: normal ones, @dfn{pre-installation}
commands and @dfn{post-installation} commands.
Normal commands move files into their proper places, and set their
modes. They may not alter any files except the ones that come entirely
from the package they belong to.
Pre-installation and post-installation commands may alter other files;
in particular, they can edit global configuration files or data bases.
Pre-installation commands are typically executed before the normal
commands, and post-installation commands are typically run after the
normal commands.
The most common use for a post-installation command is to run
@code{install-info}. This cannot be done with a normal command, since
it alters a file (the Info directory) which does not come entirely and
solely from the package being installed. It is a post-installation
command because it needs to be done after the normal command which
installs the package's Info files.
Most programs don't need any pre-installation commands, but we have the
feature just in case it is needed.
To classify the commands in the @code{install} rule into these three
categories, insert @dfn{category lines} among them. A category line
specifies the category for the commands that follow.
A category line consists of a tab and a reference to a special Make
variable, plus an optional comment at the end. There are three
variables you can use, one for each category; the variable name
specifies the category. Category lines are no-ops in ordinary execution
because these three Make variables are normally undefined (and you
@emph{should not} define them in the makefile).
Here are the three possible category lines, each with a comment that
explains what it means:
@smallexample
$(PRE_INSTALL) # @r{Pre-install commands follow.}
$(POST_INSTALL) # @r{Post-install commands follow.}
$(NORMAL_INSTALL) # @r{Normal commands follow.}
@end smallexample
If you don't use a category line at the beginning of the @code{install}
rule, all the commands are classified as normal until the first category
line. If you don't use any category lines, all the commands are
classified as normal.
These are the category lines for @code{uninstall}:
@smallexample
$(PRE_UNINSTALL) # @r{Pre-uninstall commands follow.}
$(POST_UNINSTALL) # @r{Post-uninstall commands follow.}
$(NORMAL_UNINSTALL) # @r{Normal commands follow.}
@end smallexample
Typically, a pre-uninstall command would be used for deleting entries
from the Info directory.
If the @code{install} or @code{uninstall} target has any dependencies
which act as subroutines of installation, then you should start
@emph{each} dependency's commands with a category line, and start the
main target's commands with a category line also. This way, you can
ensure that each command is placed in the right category regardless of
which of the dependencies actually run.
Pre-installation and post-installation commands should not run any
programs except for these:
@example
[ basename bash cat chgrp chmod chown cmp cp dd diff echo
egrep expand expr false fgrep find getopt grep gunzip gzip
hostname install install-info kill ldconfig ln ls md5sum
mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee
test touch true uname xargs yes
@end example
@cindex binary packages
The reason for distinguishing the commands in this way is for the sake
of making binary packages. Typically a binary package contains all the
executables and other files that need to be installed, and has its own
method of installing them---so it does not need to run the normal
installation commands. But installing the binary package does need to
execute the pre-installation and post-installation commands.
Programs to build binary packages work by extracting the
pre-installation and post-installation commands. Here is one way of
extracting the pre-installation commands:
@smallexample
make -n install -o all \
PRE_INSTALL=pre-install \
POST_INSTALL=post-install \
NORMAL_INSTALL=normal-install \
| gawk -f pre-install.awk
@end smallexample
@noindent
where the file @file{pre-install.awk} could contain this:
@smallexample
$0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ @{on = 0@}
on @{print $0@}
$0 ~ /^\t[ \t]*pre_install[ \t]*$/ @{on = 1@}
@end smallexample
The resulting file of pre-installation commands is executed as a shell
script as part of installing the binary package.

40
legacy/autoconf/mkinstalldirs Executable file
View File

@ -0,0 +1,40 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.12.2.1 1998/12/26 17:32:14 bje Exp $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,80 @@
# Makefile for Autoconf test suite.
# Copyright (C) 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 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#### Start of system configuration section. ####
top_srcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
M4 = @M4@
prefix = @prefix@
exec_prefix = @exec_prefix@
AUTOCONF = ../autoconf
AUTOCONFFLAGS = -m $(top_srcdir)
RUNTEST= runtest
RUNTESTFLAGS=
#### End of system configuration section. ####
SHELL = /bin/sh
all:
info:
dvi:
check: site.exp all
@if ($(RUNTEST) --version) >/dev/null 2>&1; then \
echo $(RUNTEST); \
$(RUNTEST) $(RUNTESTFLAGS) --tool autoconf AUTOCONF=${AUTOCONF} \
AUTOCONFFLAGS="${AUTOCONFFLAGS}" --srcdir $(srcdir); \
else echo $(RUNTEST) not found, check skipped; fi
installcheck:
site.exp: Makefile
@echo "Making a new site.exp file..."
@test ! -f site.bak || rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
@echo "## these variables are automatically generated by make ##" > site.exp
@echo "# Do not edit here. If you wish to override these values" >> site.exp
@echo "# add them to the last section" >> site.exp
@echo "set tool autoconf" >> site.exp
@echo "set srcdir ${srcdir}" >> site.exp
@echo "set objdir `pwd`" >> site.exp
@echo "## All variables above are generated by configure. Do Not Edit ##" >> site.exp
@test ! -f site.bak || sed '1,/^## All variables above are.*##/ d' site.bak >> site.exp
install:
install-info:
uninstall:
Makefile: Makefile.in ../config.status
cd ..; ./config.status
clean mostlyclean distclean maintainer-clean::
rm -f autoconf.log autoconf.sum site.exp site.bak AC* confdummy*
distclean maintainer-clean::
rm -f Makefile config.status config.cache config.log
TAGS:

View File

@ -0,0 +1,2 @@
# Test whether AC_INIT and AC_OUTPUT compile.
autoconf_test AC_INIT ""

View File

@ -0,0 +1 @@
autoconf_test AC_CHECK_SIZEOF "AC_CHECK_SIZEOF(long *)"

View File

@ -0,0 +1,49 @@
# -*- TCL -*-
# Check for a 1-1 correspondence between acconfig.h and acspecific.m4.
# Copyright (C) 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Adapted by David MacKenzie from a shell script by Paul Eggert.
set top_srcdir "$srcdir/.."
set uscript {s/^#undef[ ]*\([^ ]*\).*/\1/p}
set undefs [exec sed -n $uscript $top_srcdir/acconfig.h]
set dscript {s/.*AC_DEFINE[A-Z_]*(\([^$,)]*\).*/\1/p; s/.*AC_CHECK_TYPE(\([^$,)]*\).*/\1/p}
set defines [exec sed -n $dscript $top_srcdir/acspecific.m4]
send_user "Checking acspecific.m4 for definitions of symbols in acconfig.h...\n"
foreach u $undefs {
send_user "$u\n"
if {[lsearch -exact $defines $u] != -1} {
pass "$u"
} else {
fail "$u, not defined"
}
}
send_user "Checking acconfig.h for symbols defined in acspecific.m4...\n"
foreach d $defines {
send_user "$d\n"
if {[lsearch -exact $undefs $d] != -1} {
pass "$d"
} else {
fail "$d, no entry"
}
}

View File

@ -0,0 +1,10 @@
# Test all of the acspecific.m4 macros. -*- TCL -*-
send_user "Checking for syntax errors in the specific tests...\n"
set script {s/^AC_DEFUN(\([^,]*\).*/\1/p}
set macros [exec sed -n $script $srcdir/../acspecific.m4]
foreach mac $macros {
send_user "$mac\n"
autoconf_test $mac $mac
}

View File

@ -0,0 +1,124 @@
# -*- TCL -*-
# Test-specific TCL procedures required by DejaGNU.
# Copyright (C) 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Modified by David MacKenzie <djm@gnu.ai.mit.edu> from the gcc files
# written by Rob Savoye <rob@cygnus.com>.
#
# Called by runtest.
# Extract and print the version number of autoconf.
#
proc autoconf_version {} {
global AUTOCONF
global AUTOCONFFLAGS
if {[which $AUTOCONF] != 0} then {
set tmp [ eval exec $AUTOCONF $AUTOCONFFLAGS --version /dev/null ]
regexp "version.*$" $tmp version
if [info exists version] then {
clone_output "[which $AUTOCONF] $version\n"
} else {
warning "cannot get version from $tmp."
}
} else {
warning "$AUTOCONF, program does not exist"
}
}
#
# Compile a configure.in using autoconf.
# Runs autoconf and leaves the output in $comp_output.
# Called by individual test scripts.
# Return 1 if ok, 0 if not.
proc autoconf_start { configout } {
global verbose
global AUTOCONF
global AUTOCONFFLAGS
global comp_output
if {[which $AUTOCONF] == 0} then {
error "$AUTOCONF, program does not exist"
exit 1
}
set configin "$configout.in"
send_log "$AUTOCONF $AUTOCONFFLAGS $configin > $configout\n"
if $verbose>1 then {
send_user "Spawning \"$AUTOCONF $AUTOCONFFLAGS $configin > $configout\"\n"
}
catch "exec $AUTOCONF $AUTOCONFFLAGS $configin > $configout" comp_output
if ![string match "" $comp_output] then {
send_log "$comp_output\n"
if $verbose>1 then {
send_user "$comp_output\n"
}
}
catch "exec chmod +x $configout"
return 1
}
#
# Execute the configure script.
# Leaves the output in $exec_output.
# Called by individual test scripts.
# Return 1 if successful so far, 0 if failure already.
proc autoconf_load { args } {
global verbose
global exec_output
if ![file exists $args] then {
error "$args, configure script does not exist"
return 0
}
# Check whether m4 processing left any icky residue.
# The autoconf script does this already, pretty much.
# catch "exec sed -n -e /dnl/p -e /AC_/p $args" exec_output
# if $verbose>1 then {
# send_user "Checked $args for unexpanded m4 macros\n"
# }
# if ![string match "" $exec_output] then {
# fail "$args, unexpanded m4 macros"
# send_log "$exec_output\n"
# return 0
# }
# Capture only stderr in exec_output, not "creating Makefile" etc.
catch "exec ./$args --cache=/dev/null >/dev/null" exec_output
if $verbose>1 then {
send_user "Executed $args --cache=/dev/null\n"
}
if ![string match "" $exec_output] then {
fail "$args, problem with executing"
send_log "$exec_output\n"
return 0
} else {
return 1
}
}
#
# Called by runtest.
# Clean up (remove temporary files) before runtest exits.
#
proc autoconf_exit {} {
}
load_lib common.exp

View File

@ -0,0 +1,123 @@
# -*- TCL -*-
# Auxiliary procedures for autoconf tests.
# Copyright (C) 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Written by David MacKenzie <djm@gnu.ai.mit.edu>.
#
# Create a configure.in from a string.
# CONFIG.in is the file to create containing CONTENTS plus boilerplate.
# Return 1 if successful, 0 if an error occurs.
proc autoconf_create {config contents} {
if [catch {open "$config.in" "w"} hand] {
error "$config, cannot create $config.in"
return 0
}
puts $hand "AC_INIT(confdummy.in)
$contents
AC_OUTPUT(confdummy)"
close $hand
if [catch {open "confdummy.in" "w"} hand] {
error "$config, cannot create confdummy.in"
return 0
}
puts $hand "# This is a dummy file for testing.
srcdir = @srcdir@
# Please ignore this file."
close $hand
return 1
}
# Compile a configure.in into a configure
# and call error if there's any output (undefined macros, can't
# find library files, etc.).
proc autoconf_start_plus {configout} {
global comp_output
set status [autoconf_start $configout]
if {$status==0} {
return 0
}
# Examine $comp_output.
if [string match "*is obsolete*" "$comp_output"] then {
return 1
}
if [string match "*allow cross*" "$comp_output"] then {
return 1
}
if ![string match "" "$comp_output"] then {
fail "$configout, problem with running autoconf"
return 0
}
return 1
}
# Execute a configure script and check the output
# against what it's supposed to be.
# Return 1 if successful so far, 0 if failure already.
proc autoconf_load_plus {args} {
global exec_output
set status [autoconf_load $args]
if {$status==0} {
return 0
}
if [string match "*:*" "$exec_output"] then {
fail "$args, problem with executing"
return 0
}
return 1
}
# Remove generated configuration files for test CONFIG.
# Return 1 if successful, 0 if not.
proc autoconf_remove {config} {
if [catch "exec rm -f $config $config.in [glob -nocomplain conftest* confdummy*] config.status config.cache config.log"] {
warning "$config output files, cannot remove"
return 0
}
return 1
}
# The standard autoconf test: create, compile, run, and remove
# a simple configure script to test a single macro.
# TESTNAME is the name of the macro being tested.
# CONTENTS is the body of the configure script to create and test.
proc autoconf_test {testname contents} {
if ![autoconf_remove $testname] {
return 0
}
if ![autoconf_create $testname "$contents"] {
return 0
}
if ![autoconf_start_plus $testname] {
autoconf_remove $testname
return 0
}
if ![autoconf_load_plus $testname] {
autoconf_remove $testname
return 0
}
if ![autoconf_remove $testname] {
return 0
}
pass "$testname"
return 1
}

5452
legacy/autoconf/texinfo.tex Normal file

File diff suppressed because it is too large Load Diff