mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
Initial revision
From-SVN: r14877
This commit is contained in:
parent
8975416cfb
commit
6599da043e
31
.cvsignore
Normal file
31
.cvsignore
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
*-all
|
||||||
|
*-co
|
||||||
|
*-dirs
|
||||||
|
*-done
|
||||||
|
*-info
|
||||||
|
*-install
|
||||||
|
*-install-info
|
||||||
|
*-src
|
||||||
|
*-stamp-*
|
||||||
|
*-tagged
|
||||||
|
blockit
|
||||||
|
cfg-paper.info
|
||||||
|
config.status
|
||||||
|
configure.aux
|
||||||
|
configure.cp
|
||||||
|
configure.cps
|
||||||
|
configure.dvi
|
||||||
|
configure.fn
|
||||||
|
configure.fns
|
||||||
|
configure.ky
|
||||||
|
configure.kys
|
||||||
|
configure.log
|
||||||
|
configure.pg
|
||||||
|
configure.pgs
|
||||||
|
configure.toc
|
||||||
|
configure.tp
|
||||||
|
configure.tps
|
||||||
|
configure.vr
|
||||||
|
configure.vrs
|
||||||
|
dir.info
|
||||||
|
Makefile
|
340
COPYING
Normal file
340
COPYING
Normal 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
|
||||||
|
|
||||||
|
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.
|
481
COPYING.LIB
Normal file
481
COPYING.LIB
Normal file
@ -0,0 +1,481 @@
|
|||||||
|
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||||
|
675 Mass Ave, Cambridge, MA 02139, USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
[This is the first released version of the library GPL. It is
|
||||||
|
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
|
This license, the Library General Public License, applies to some
|
||||||
|
specially designated Free Software Foundation software, and to any
|
||||||
|
other libraries whose authors decide to use it. You can use it for
|
||||||
|
your libraries, 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 library, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link a program with the library, you must provide
|
||||||
|
complete object files to the recipients so that they can relink them
|
||||||
|
with the library, after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
Our method of protecting your rights has two steps: (1) copyright
|
||||||
|
the library, and (2) offer you this license which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
Also, for each distributor's protection, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
library. If the library is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original
|
||||||
|
version, 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 companies distributing free
|
||||||
|
software will individually obtain patent licenses, thus in effect
|
||||||
|
transforming the program into proprietary software. To prevent this,
|
||||||
|
we have made it clear that any patent must be licensed for everyone's
|
||||||
|
free use or not licensed at all.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the ordinary
|
||||||
|
GNU General Public License, which was designed for utility programs. This
|
||||||
|
license, the GNU Library General Public License, applies to certain
|
||||||
|
designated libraries. This license is quite different from the ordinary
|
||||||
|
one; be sure to read it in full, and don't assume that anything in it is
|
||||||
|
the same as in the ordinary license.
|
||||||
|
|
||||||
|
The reason we have a separate public license for some libraries is that
|
||||||
|
they blur the distinction we usually make between modifying or adding to a
|
||||||
|
program and simply using it. Linking a program with a library, without
|
||||||
|
changing the library, is in some sense simply using the library, and is
|
||||||
|
analogous to running a utility program or application program. However, in
|
||||||
|
a textual and legal sense, the linked executable is a combined work, a
|
||||||
|
derivative of the original library, and the ordinary General Public License
|
||||||
|
treats it as such.
|
||||||
|
|
||||||
|
Because of this blurred distinction, using the ordinary General
|
||||||
|
Public License for libraries did not effectively promote software
|
||||||
|
sharing, because most developers did not use the libraries. We
|
||||||
|
concluded that weaker conditions might promote sharing better.
|
||||||
|
|
||||||
|
However, unrestricted linking of non-free programs would deprive the
|
||||||
|
users of those programs of all benefit from the free status of the
|
||||||
|
libraries themselves. This Library General Public License is intended to
|
||||||
|
permit developers of non-free programs to use free libraries, while
|
||||||
|
preserving your freedom as a user of such programs to change the free
|
||||||
|
libraries that are incorporated in them. (We have not seen how to achieve
|
||||||
|
this as regards changes in header files, but we have achieved it as regards
|
||||||
|
changes in the actual functions of the Library.) The hope is that this
|
||||||
|
will lead to faster development of free libraries.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, while the latter only
|
||||||
|
works together with the library.
|
||||||
|
|
||||||
|
Note that it is possible for a library to be covered by the ordinary
|
||||||
|
General Public License rather than by this special one.
|
||||||
|
|
||||||
|
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library which
|
||||||
|
contains a notice placed by the copyright holder or other authorized
|
||||||
|
party saying it may be distributed under the terms of this Library
|
||||||
|
General Public License (also called "this License"). Each licensee is
|
||||||
|
addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, 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 library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete 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 distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
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 Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
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 Library, 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 Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you 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.
|
||||||
|
|
||||||
|
If distribution of 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 satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also compile or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
c) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
d) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. 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.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library 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.
|
||||||
|
|
||||||
|
9. 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 Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
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.
|
||||||
|
|
||||||
|
11. 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 Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library 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 Library.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library 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.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Library General Public License from time to time.
|
||||||
|
Such new versions will be similar in spirit to the present version,
|
||||||
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Library
|
||||||
|
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 Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
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
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "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
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. 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 LIBRARY 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
|
||||||
|
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries
|
||||||
|
|
||||||
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
possible use to the public, we recommend making it free software that
|
||||||
|
everyone can redistribute and change. You can do so by permitting
|
||||||
|
redistribution under these terms (or, alternatively, under the terms of the
|
||||||
|
ordinary General Public License).
|
||||||
|
|
||||||
|
To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library 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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this library; if not, write to the Free
|
||||||
|
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||||
|
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1990
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
1608
Makefile.in
Normal file
1608
Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
47
README
Normal file
47
README
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
README for GNU development tools
|
||||||
|
|
||||||
|
This directory contains various GNU compilers, assemblers, linkers,
|
||||||
|
debuggers, etc., plus their support routines, definitions, and documentation.
|
||||||
|
|
||||||
|
If you are receiving this as part of a GDB release, see the file gdb/README.
|
||||||
|
If with a binutils release, see binutils/README; if with a libg++ release,
|
||||||
|
see libg++/README, etc. That'll give you info about this
|
||||||
|
package -- supported targets, how to use it, how to report bugs, etc.
|
||||||
|
|
||||||
|
It is now possible to automatically configure and build a variety of
|
||||||
|
tools with one command. To build all of the tools contained herein,
|
||||||
|
run the ``configure'' script here, e.g.:
|
||||||
|
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
To install them (by default in /usr/local/bin, /usr/local/lib, etc),
|
||||||
|
then do:
|
||||||
|
make install
|
||||||
|
|
||||||
|
(If the configure script can't determine your type of computer, give it
|
||||||
|
the name as an argument, for instance ``./configure sun4''. You can
|
||||||
|
use the script ``config.sub'' to test whether a name is recognized; if
|
||||||
|
it is, config.sub translates it to a triplet specifying CPU, vendor,
|
||||||
|
and OS.)
|
||||||
|
|
||||||
|
If you have more than one compiler on your system, it is often best to
|
||||||
|
explicitly set CC in the environment before running configure, and to
|
||||||
|
also set CC when running make. For example (assuming sh/bash/ksh):
|
||||||
|
|
||||||
|
CC=gcc ./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
A similar example using csh:
|
||||||
|
|
||||||
|
setenv CC gcc
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
|
||||||
|
Much of the code and documentation enclosed is copyright by
|
||||||
|
the Free Software Foundation, Inc. See the file COPYING or
|
||||||
|
COPYING.LIB in the various directories, for a description of the
|
||||||
|
GNU General Public License terms under which you can copy the files.
|
||||||
|
|
||||||
|
REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
|
||||||
|
on where and how to report problems.
|
612
config-ml.in
Normal file
612
config-ml.in
Normal file
@ -0,0 +1,612 @@
|
|||||||
|
# Configure fragment invoked in the post-target section for subdirs
|
||||||
|
# wanting multilib support.
|
||||||
|
#
|
||||||
|
# It is advisable to support a few --enable/--disable options to let the
|
||||||
|
# user select which libraries s/he really wants.
|
||||||
|
#
|
||||||
|
# Subdirectories wishing to use multilib should put the following lines
|
||||||
|
# in the "post-target" section of configure.in.
|
||||||
|
#
|
||||||
|
# if [ "${srcdir}" = "." ] ; then
|
||||||
|
# if [ "${with_target_subdir}" != "." ] ; then
|
||||||
|
# . ${with_multisrctop}../../config-ml.in
|
||||||
|
# else
|
||||||
|
# . ${with_multisrctop}../config-ml.in
|
||||||
|
# fi
|
||||||
|
# else
|
||||||
|
# . ${srcdir}/../config-ml.in
|
||||||
|
# fi
|
||||||
|
#
|
||||||
|
# See librx/configure.in in the libg++ distribution for an example of how
|
||||||
|
# to handle autoconf'd libraries.
|
||||||
|
#
|
||||||
|
# Things are complicated because 6 separate cases must be handled:
|
||||||
|
# 2 (native, cross) x 3 (absolute-path, relative-not-dot, dot) = 6.
|
||||||
|
#
|
||||||
|
# srcdir=. is special. It must handle make programs that don't handle VPATH.
|
||||||
|
# To implement this, a symlink tree is built for each library and for each
|
||||||
|
# multilib subdir.
|
||||||
|
#
|
||||||
|
# The build tree is layed out as
|
||||||
|
#
|
||||||
|
# ./
|
||||||
|
# libg++
|
||||||
|
# newlib
|
||||||
|
# m68020/
|
||||||
|
# libg++
|
||||||
|
# newlib
|
||||||
|
# m68881/
|
||||||
|
# libg++
|
||||||
|
# newlib
|
||||||
|
#
|
||||||
|
# The nice feature about this arrangement is that inter-library references
|
||||||
|
# in the build tree work without having to care where you are. Note that
|
||||||
|
# inter-library references also work in the source tree because symlink trees
|
||||||
|
# are built when srcdir=.
|
||||||
|
#
|
||||||
|
# Unfortunately, trying to access the libraries in the build tree requires
|
||||||
|
# the user to manually choose which library to use as GCC won't be able to
|
||||||
|
# find the right one. This is viewed as the lesser of two evils.
|
||||||
|
#
|
||||||
|
# Configure variables:
|
||||||
|
# ${with_target_subdir} = "." for native, or ${target_alias} for cross.
|
||||||
|
# Set by top level Makefile.
|
||||||
|
# ${with_multisrctop} = how many levels of multilibs there are in the source
|
||||||
|
# tree. It exists to handle the case of configuring in the source tree:
|
||||||
|
# ${srcdir} is not constant.
|
||||||
|
# ${with_multisubdir} = name of multilib subdirectory (eg: m68020/m68881).
|
||||||
|
#
|
||||||
|
# Makefile variables:
|
||||||
|
# MULTISRCTOP = number of multilib levels in source tree (+1 if cross)
|
||||||
|
# (FIXME: note that this is different than ${with_multisrctop}. Check out.).
|
||||||
|
# MULTIBUILDTOP = number of multilib levels in build tree
|
||||||
|
# MULTIDIRS = list of multilib subdirs (eg: m68000 m68020 ...)
|
||||||
|
# (only defined in each library's main Makefile).
|
||||||
|
# MULTISUBDIR = installed subdirectory name with leading '/' (eg: /m68000)
|
||||||
|
# (only defined in each multilib subdir).
|
||||||
|
|
||||||
|
# FIXME: Multilib is currently disabled by default for everything other than
|
||||||
|
# newlib. It is up to each target to turn on multilib support for the other
|
||||||
|
# libraries as desired.
|
||||||
|
|
||||||
|
# We have to handle being invoked by both Cygnus configure and Autoconf.
|
||||||
|
#
|
||||||
|
# Cygnus configure incoming variables:
|
||||||
|
# srcdir, subdir, target, arguments
|
||||||
|
#
|
||||||
|
# Autoconf incoming variables:
|
||||||
|
# srcdir, target, ac_configure_args
|
||||||
|
#
|
||||||
|
# We *could* figure srcdir and target out, but we'd have to do work that
|
||||||
|
# our caller has already done to figure them out and requiring these two
|
||||||
|
# seems reasonable.
|
||||||
|
|
||||||
|
if [ -n "${ac_configure_args}" ]; then
|
||||||
|
Makefile=${ac_file-Makefile}
|
||||||
|
ml_config_shell=${CONFIG_SHELL-/bin/sh}
|
||||||
|
ml_arguments="${ac_configure_args}"
|
||||||
|
ml_realsrcdir=${srcdir}
|
||||||
|
else
|
||||||
|
Makefile=${Makefile-Makefile}
|
||||||
|
ml_config_shell=${config_shell-/bin/sh}
|
||||||
|
ml_arguments="${arguments}"
|
||||||
|
if [ -n "${subdir}" -a "${subdir}" != "." ] ; then
|
||||||
|
ml_realsrcdir=${srcdir}/${subdir}
|
||||||
|
else
|
||||||
|
ml_realsrcdir=${srcdir}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Scan all the arguments and set all the ones we need.
|
||||||
|
|
||||||
|
for option in ${ml_arguments}
|
||||||
|
do
|
||||||
|
case $option in
|
||||||
|
--*) ;;
|
||||||
|
-*) option=-$option ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $option in
|
||||||
|
--*=*)
|
||||||
|
optarg=`echo $option | sed -e 's/^[^=]*=//'`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $option in
|
||||||
|
--disable-*)
|
||||||
|
enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
|
||||||
|
eval $enableopt=no
|
||||||
|
;;
|
||||||
|
--enable-*)
|
||||||
|
case "$option" in
|
||||||
|
*=*) ;;
|
||||||
|
*) optarg=yes ;;
|
||||||
|
esac
|
||||||
|
enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
|
||||||
|
eval $enableopt="$optarg"
|
||||||
|
;;
|
||||||
|
--norecursion | --no*)
|
||||||
|
ml_norecursion=yes
|
||||||
|
;;
|
||||||
|
--verbose | --v | --verb*)
|
||||||
|
ml_verbose=--verbose
|
||||||
|
;;
|
||||||
|
--with-*)
|
||||||
|
case "$option" in
|
||||||
|
*=*) ;;
|
||||||
|
*) optarg=yes ;;
|
||||||
|
esac
|
||||||
|
withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
|
||||||
|
eval $withopt="$optarg"
|
||||||
|
;;
|
||||||
|
--without-*)
|
||||||
|
withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
|
||||||
|
eval $withopt=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Only do this if --enable-multilib.
|
||||||
|
if [ "${enable_multilib}" = yes ]; then
|
||||||
|
|
||||||
|
# Compute whether this is the library's top level directory
|
||||||
|
# (ie: not a multilib subdirectory, and not a subdirectory like libg++/src).
|
||||||
|
# ${with_multisubdir} tells us we're in the right branch, but we could be
|
||||||
|
# in a subdir of that.
|
||||||
|
# ??? The previous version could void this test by separating the process into
|
||||||
|
# two files: one that only the library's toplevel configure.in ran (to
|
||||||
|
# configure the multilib subdirs), and another that all configure.in's ran to
|
||||||
|
# update the Makefile. It seemed reasonable to collapse all multilib support
|
||||||
|
# into one file, but it does leave us with having to perform this test.
|
||||||
|
ml_toplevel_p=no
|
||||||
|
if [ -z "${with_multisubdir}" ]; then
|
||||||
|
if [ "${srcdir}" = "." ]; then
|
||||||
|
# Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.
|
||||||
|
# ${with_target_subdir} = "." for native, otherwise target alias.
|
||||||
|
if [ "${with_target_subdir}" = "." ]; then
|
||||||
|
if [ -f ${ml_realsrcdir}/../config-ml.in ]; then
|
||||||
|
ml_toplevel_p=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -f ${ml_realsrcdir}/../../config-ml.in ]; then
|
||||||
|
ml_toplevel_p=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}.
|
||||||
|
if [ -f ${ml_realsrcdir}/../config-ml.in ]; then
|
||||||
|
ml_toplevel_p=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If this is the library's top level directory, set multidirs to the
|
||||||
|
# multilib subdirs to support. This lives at the top because we need
|
||||||
|
# `multidirs' set right away.
|
||||||
|
|
||||||
|
if [ "${ml_toplevel_p}" = yes ]; then
|
||||||
|
|
||||||
|
multidirs=
|
||||||
|
for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
|
||||||
|
dir=`echo $i | sed -e 's/;.*$//'`
|
||||||
|
if [ "${dir}" = "." ]; then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
if [ -z "${multidirs}" ]; then
|
||||||
|
multidirs="${dir}"
|
||||||
|
else
|
||||||
|
multidirs="${multidirs} ${dir}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
case "${target}" in
|
||||||
|
arc-*-elf*)
|
||||||
|
if [ x$enable_biendian != xyes ]
|
||||||
|
then
|
||||||
|
old_multidirs=${multidirs}
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "${x}" in
|
||||||
|
*be*) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
m68*-*-*)
|
||||||
|
if [ x$enable_softfloat = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*soft-float* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ x$enable_m68881 = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*m68881* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ x$enable_m68000 = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*m68000* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ x$enable_m68020 = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*m68020* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
mips*-*-*)
|
||||||
|
if [ x$enable_single_float = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*single* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ x$enable_biendian = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*el* ) : ;;
|
||||||
|
*eb* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ x$enable_softfloat = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*soft-float* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
powerpc*-*-* | rs6000*-*-*)
|
||||||
|
if [ x$enable_softfloat = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*soft-float* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ x$enable_powercpu = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
power | */power | */power/* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ x$enable_powerpccpu = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*powerpc* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ x$enable_powerpcos = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*mcall-linux* | *mcall-solaris* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ x$enable_biendian = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*mlittle* | *mbig* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ x$enable_sysv = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*mcall-sysv* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ x$enable_aix = xno ]
|
||||||
|
then
|
||||||
|
old_multidirs="${multidirs}"
|
||||||
|
multidirs=""
|
||||||
|
for x in ${old_multidirs}; do
|
||||||
|
case "$x" in
|
||||||
|
*mcall-aix* ) : ;;
|
||||||
|
*) multidirs="${multidirs} ${x}" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Remove extraneous blanks from multidirs.
|
||||||
|
# Tests like `if [ -n "$multidirs" ]' require it.
|
||||||
|
multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'`
|
||||||
|
|
||||||
|
# Add code to library's top level makefile to handle building the multilib
|
||||||
|
# subdirs.
|
||||||
|
|
||||||
|
cat > Multi.tem <<\EOF
|
||||||
|
|
||||||
|
# FIXME: There should be an @-sign in front of the `if'.
|
||||||
|
# Leave out until this is tested a bit more.
|
||||||
|
multi-do:
|
||||||
|
if [ -z "$(MULTIDIRS)" ]; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
rootpre=`pwd`/; export rootpre; \
|
||||||
|
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
|
||||||
|
lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \
|
||||||
|
compiler="$(CC)"; \
|
||||||
|
for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \
|
||||||
|
dir=`echo $$i | sed -e 's/;.*$$//'`; \
|
||||||
|
if [ "$${dir}" = "." ]; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
if [ -d ../$${dir}/$${lib} ]; then \
|
||||||
|
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
|
||||||
|
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
|
||||||
|
CFLAGS="$(CFLAGS) $${flags}" \
|
||||||
|
CXXFLAGS="$(CXXFLAGS) $${flags}" \
|
||||||
|
LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
|
||||||
|
LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
|
||||||
|
$(DO)); then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
else true; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# FIXME: There should be an @-sign in front of the `if'.
|
||||||
|
# Leave out until this is tested a bit more.
|
||||||
|
multi-clean:
|
||||||
|
if [ -z "$(MULTIDIRS)" ]; then \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
lib=`pwd | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
|
||||||
|
for dir in Makefile $(MULTIDIRS); do \
|
||||||
|
if [ -f ../$${dir}/$${lib}/Makefile ]; then \
|
||||||
|
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \
|
||||||
|
then true; \
|
||||||
|
else exit 1; \
|
||||||
|
fi; \
|
||||||
|
else true; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat ${Makefile} Multi.tem > Makefile.tem
|
||||||
|
rm -f ${Makefile} Multi.tem
|
||||||
|
mv Makefile.tem ${Makefile}
|
||||||
|
|
||||||
|
fi # ${ml_toplevel_p} = yes
|
||||||
|
|
||||||
|
if [ "${ml_verbose}" = --verbose ]; then
|
||||||
|
echo "Adding multilib support to Makefile in ${ml_realsrcdir}"
|
||||||
|
if [ "${ml_toplevel_p}" = yes ]; then
|
||||||
|
echo "multidirs=${multidirs}"
|
||||||
|
fi
|
||||||
|
echo "with_multisubdir=${with_multisubdir}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${srcdir}" = "." ]; then
|
||||||
|
if [ "${with_target_subdir}" != "." ]; then
|
||||||
|
ml_srcdotdot="../"
|
||||||
|
else
|
||||||
|
ml_srcdotdot=""
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ml_srcdotdot=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${with_multisubdir}" ]; then
|
||||||
|
ml_subdir=
|
||||||
|
ml_builddotdot=
|
||||||
|
: # ml_srcdotdot= # already set
|
||||||
|
else
|
||||||
|
ml_subdir="/${with_multisubdir}"
|
||||||
|
# The '[^/][^/]*' appears that way to work around a SunOS sed bug.
|
||||||
|
ml_builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`/
|
||||||
|
if [ "$srcdir" = "." ]; then
|
||||||
|
ml_srcdotdot=${ml_srcdotdot}${ml_builddotdot}
|
||||||
|
else
|
||||||
|
: # ml_srcdotdot= # already set
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${ml_toplevel_p}" = yes ]; then
|
||||||
|
ml_do='$(MAKE)'
|
||||||
|
ml_clean='$(MAKE)'
|
||||||
|
else
|
||||||
|
ml_do=true
|
||||||
|
ml_clean=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# TOP is used by newlib and should not be used elsewhere for this purpose.
|
||||||
|
# MULTI{SRC,BUILD}TOP are the proper ones to use. MULTISRCTOP is empty
|
||||||
|
# when srcdir != builddir. MULTIBUILDTOP is always some number of ../'s.
|
||||||
|
# FIXME: newlib needs to be updated to use MULTI{SRC,BUILD}TOP so we can
|
||||||
|
# delete TOP. Newlib may wish to continue to use TOP for its own purposes
|
||||||
|
# of course.
|
||||||
|
# MULTIDIRS is non-empty for the cpu top level Makefile (eg: newlib/Makefile)
|
||||||
|
# and lists the subdirectories to recurse into.
|
||||||
|
# MULTISUBDIR is non-empty in each cpu subdirectory's Makefile
|
||||||
|
# (eg: newlib/h8300h/Makefile) and is the installed subdirectory name with
|
||||||
|
# a leading '/'.
|
||||||
|
# MULTIDO is used for targets like all, install, and check where
|
||||||
|
# $(FLAGS_TO_PASS) augmented with the subdir's compiler option is needed.
|
||||||
|
# MULTICLEAN is used for the *clean targets.
|
||||||
|
#
|
||||||
|
# ??? It is possible to merge MULTIDO and MULTICLEAN into one. They are
|
||||||
|
# currently kept separate because we don't want the *clean targets to require
|
||||||
|
# the existence of the compiler (which MULTIDO currently requires) and
|
||||||
|
# therefore we'd have to record the directory options as well as names
|
||||||
|
# (currently we just record the names and use --print-multi-lib to get the
|
||||||
|
# options).
|
||||||
|
|
||||||
|
sed -e "s:^TOP[ ]*=[ ]*\([./]*\)[ ]*$:TOP = ${ml_builddotdot}\1:" \
|
||||||
|
-e "s:^MULTISRCTOP[ ]*=.*$:MULTISRCTOP = ${ml_srcdotdot}:" \
|
||||||
|
-e "s:^MULTIBUILDTOP[ ]*=.*$:MULTIBUILDTOP = ${ml_builddotdot}:" \
|
||||||
|
-e "s:^MULTIDIRS[ ]*=.*$:MULTIDIRS = ${multidirs}:" \
|
||||||
|
-e "s:^MULTISUBDIR[ ]*=.*$:MULTISUBDIR = ${ml_subdir}:" \
|
||||||
|
-e "s:^MULTIDO[ ]*=.*$:MULTIDO = $ml_do:" \
|
||||||
|
-e "s:^MULTICLEAN[ ]*=.*$:MULTICLEAN = $ml_clean:" \
|
||||||
|
${Makefile} > Makefile.tem
|
||||||
|
rm -f ${Makefile}
|
||||||
|
mv Makefile.tem ${Makefile}
|
||||||
|
|
||||||
|
# If this is the library's top level, configure each multilib subdir.
|
||||||
|
# This is done at the end because this is the loop that runs configure
|
||||||
|
# in each multilib subdir and it seemed reasonable to finish updating the
|
||||||
|
# Makefile before going on to configure the subdirs.
|
||||||
|
|
||||||
|
if [ "${ml_toplevel_p}" = yes ]; then
|
||||||
|
|
||||||
|
# We must freshly configure each subdirectory. This bit of code is
|
||||||
|
# actually partially stolen from the main configure script. FIXME.
|
||||||
|
|
||||||
|
if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
|
||||||
|
|
||||||
|
if [ "${ml_verbose}" = --verbose ]; then
|
||||||
|
echo "Running configure in multilib subdirs ${multidirs}"
|
||||||
|
echo "pwd: `pwd`"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ml_origdir=`pwd`
|
||||||
|
ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'`
|
||||||
|
# cd to top-level-build-dir/${with_target_subdir}
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
for ml_dir in ${multidirs}; do
|
||||||
|
|
||||||
|
if [ "${ml_verbose}" = --verbose ]; then
|
||||||
|
echo "Running configure in multilib subdir ${ml_dir}"
|
||||||
|
echo "pwd: `pwd`"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d ${ml_dir} ]; then true; else mkdir ${ml_dir}; fi
|
||||||
|
if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi
|
||||||
|
|
||||||
|
# Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../
|
||||||
|
dotdot=../`echo ${ml_dir} | sed -e 's|[^/]||g' -e 's|/|../|g'`
|
||||||
|
|
||||||
|
case ${srcdir} in
|
||||||
|
".")
|
||||||
|
echo Building symlink tree in `pwd`/${ml_dir}/${ml_libdir}
|
||||||
|
if [ "${with_target_subdir}" != "." ]; then
|
||||||
|
ml_unsubdir="../"
|
||||||
|
else
|
||||||
|
ml_unsubdir=""
|
||||||
|
fi
|
||||||
|
(cd ${ml_dir}/${ml_libdir};
|
||||||
|
../${dotdot}${ml_unsubdir}symlink-tree ../${dotdot}${ml_unsubdir}${ml_libdir} "")
|
||||||
|
ml_newsrcdir="."
|
||||||
|
ml_srcdiroption=
|
||||||
|
multisrctop=${dotdot}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case "${srcdir}" in
|
||||||
|
/*) # absolute path
|
||||||
|
ml_newsrcdir=${srcdir}
|
||||||
|
;;
|
||||||
|
*) # otherwise relative
|
||||||
|
ml_newsrcdir=${dotdot}${srcdir}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
ml_srcdiroption="-srcdir=${ml_newsrcdir}"
|
||||||
|
multisrctop=
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "${progname}" in
|
||||||
|
/*) ml_recprog=${progname} ;;
|
||||||
|
*) ml_recprog=${dotdot}${progname} ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# FIXME: POPDIR=${PWD=`pwd`} doesn't work here.
|
||||||
|
ML_POPDIR=`pwd`
|
||||||
|
cd ${ml_dir}/${ml_libdir}
|
||||||
|
|
||||||
|
if [ -f ${ml_newsrcdir}/configure ]; then
|
||||||
|
ml_recprog=${ml_newsrcdir}/configure
|
||||||
|
fi
|
||||||
|
if eval ${ml_config_shell} ${ml_recprog} \
|
||||||
|
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
|
||||||
|
${ml_arguments} ${ml_srcdiroption} ; then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd ${ML_POPDIR}
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
cd ${ml_origdir}
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi # ${ml_toplevel_p} = yes
|
||||||
|
fi # ${enable_multilib} = yes
|
833
config.guess
vendored
Executable file
833
config.guess
vendored
Executable file
@ -0,0 +1,833 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Attempt to guess a canonical system name.
|
||||||
|
# Copyright (C) 1992, 93, 94, 95, 96, 1997 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:*:*)
|
||||||
|
# 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 0x47e03d84
|
||||||
|
cmoveq \$4,0,\$3
|
||||||
|
addl \$3,\$31,\$0
|
||||||
|
ret \$31,(\$26),1
|
||||||
|
.end main
|
||||||
|
EOF
|
||||||
|
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||||
|
if test "$?" = 0 ; then
|
||||||
|
./dummy
|
||||||
|
case "$?" in
|
||||||
|
1)
|
||||||
|
UNAME_MACHINE="alphaev5"
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
UNAME_MACHINE="alphaev56"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
rm -f dummy.s dummy
|
||||||
|
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
|
||||||
|
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 ;;
|
||||||
|
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*:*:*)
|
||||||
|
# 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 ;;
|
||||||
|
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 ;;
|
||||||
|
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 ;;
|
||||||
|
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)
|
||||||
|
if /usr/sbin/lsattr -EHl proc0 | 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/[3478]??:HP-UX:*:*)
|
||||||
|
case "${UNAME_MACHINE}" in
|
||||||
|
9000/31? ) HP_ARCH=m68000 ;;
|
||||||
|
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||||
|
9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
|
||||||
|
9000/8?? ) HP_ARCH=hppa1.0 ;;
|
||||||
|
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 ;;
|
||||||
|
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 i386-pc-cygwin32
|
||||||
|
exit 0 ;;
|
||||||
|
i*:MINGW*:*)
|
||||||
|
echo i386-pc-mingw32
|
||||||
|
exit 0 ;;
|
||||||
|
p*:CYGWIN*:*)
|
||||||
|
echo powerpcle-unknown-cygwin32
|
||||||
|
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:*:*)
|
||||||
|
# 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 ;;
|
||||||
|
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 0x47e03d84
|
||||||
|
cmoveq \$4,0,\$3
|
||||||
|
addl \$3,\$31,\$0
|
||||||
|
ret \$31,(\$26),1
|
||||||
|
.end main
|
||||||
|
EOF
|
||||||
|
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||||
|
if test "$?" = 0 ; then
|
||||||
|
./dummy
|
||||||
|
case "$?" in
|
||||||
|
1)
|
||||||
|
UNAME_MACHINE="alphaev5"
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
UNAME_MACHINE="alphaev56"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
rm -f dummy.s dummy
|
||||||
|
echo ${UNAME_MACHINE}-unknown-linux-gnu ; 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 ;;
|
||||||
|
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:*:*)
|
||||||
|
if [ -d /usr/nec ]; then
|
||||||
|
echo mips-nec-sysv${UNAME_RELEASE}
|
||||||
|
else
|
||||||
|
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||||
|
fi
|
||||||
|
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
|
1177
config.sub
vendored
Executable file
1177
config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
312
config/ChangeLog
Normal file
312
config/ChangeLog
Normal file
@ -0,0 +1,312 @@
|
|||||||
|
Wed Jul 23 12:32:18 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
|
||||||
|
|
||||||
|
* mh-go32 (CFLAGS): Don't set -fno-omit-frame-pointer.
|
||||||
|
|
||||||
|
Mon Jun 16 19:06:41 1997 Geoff Keating <geoffk@ozemail.com.au>
|
||||||
|
|
||||||
|
* mh-ppcpic: New file.
|
||||||
|
* mt-ppcpic: New file.
|
||||||
|
|
||||||
|
Thu Mar 27 15:52:40 1997 Geoffrey Noer <noer@cygnus.com>
|
||||||
|
|
||||||
|
* mh-cygwin32: override CXXFLAGS, setting to -O2 only
|
||||||
|
(no debug)
|
||||||
|
|
||||||
|
Tue Mar 25 18:16:43 1997 Geoffrey Noer <noer@cygnus.com>
|
||||||
|
|
||||||
|
* mh-cygwin32: override LIBGCC2_DEBUG_CFLAGS so debug info
|
||||||
|
isn't included in cygwin32-hosted libgcc2.a by default
|
||||||
|
|
||||||
|
Wed Jan 8 19:56:43 1997 Geoffrey Noer <noer@cygnus.com>
|
||||||
|
|
||||||
|
* mh-cygwin32: override CFLAGS so debug info isn't included
|
||||||
|
in cygwin32-hosted tools by default
|
||||||
|
|
||||||
|
Tue Dec 31 16:04:26 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* mh-linux: Remove.
|
||||||
|
|
||||||
|
Mon Nov 11 10:29:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||||
|
|
||||||
|
* mt-ppc: Delete file, options moved to newlib configure.
|
||||||
|
|
||||||
|
Fri Oct 4 12:21:03 1996 Angela Marie Thomas (angela@cygnus.com)
|
||||||
|
|
||||||
|
* mh-dgux386: New file. x86 dgux specific flags
|
||||||
|
|
||||||
|
Mon Sep 30 15:10:07 1996 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* mpw-mh-mpw (EXTRALIBS_PPC_XCOFF): New, was EXTRALIBS_PPC.
|
||||||
|
(EXTRALIBS_PPC): Use shared libraries instead of xcoff.
|
||||||
|
|
||||||
|
Sat Aug 17 04:56:25 1996 Geoffrey Noer <noer@skaro.cygnus.com>
|
||||||
|
|
||||||
|
* mh-cygwin32: don't -D_WIN32 here anymore
|
||||||
|
|
||||||
|
Thu Aug 15 19:46:44 1996 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* mpw-mh-mpw (SEGFLAG_68K, SEGFLAG_PPC): Remove.
|
||||||
|
(EXTRALIBS_PPC): Add libgcc.xcoff.
|
||||||
|
|
||||||
|
Thu Aug 8 14:51:47 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||||
|
|
||||||
|
* mt-ppc: New file, add -mrelocatable-lib and -mno-eabi to all
|
||||||
|
target builds for PowerPC eabi targets.
|
||||||
|
|
||||||
|
Fri Jul 12 12:06:01 1996 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* mpw: New subdir, Mac MPW configuration support bits.
|
||||||
|
|
||||||
|
Mon Jul 8 17:30:52 1996 Jim Wilson <wilson@cygnus.com>
|
||||||
|
|
||||||
|
* mh-irix6: New file.
|
||||||
|
|
||||||
|
Mon Jul 8 15:15:37 1996 Jason Merrill <jason@yorick.cygnus.com>
|
||||||
|
|
||||||
|
* mt-sparcpic (PICFLAG_FOR_TARGET): Use -fPIC.
|
||||||
|
|
||||||
|
Fri Jul 5 11:49:02 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* mh-irix4 (RANLIB): Don't define; Irix 4 does have ranlib.
|
||||||
|
|
||||||
|
Sun Jun 23 22:59:25 1996 Geoffrey Noer <noer@cygnus.com>
|
||||||
|
|
||||||
|
* mh-cygwin32: new file. Like mh-go32 without the CFLAGS entry.
|
||||||
|
|
||||||
|
Tue Mar 26 14:10:41 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* mh-go32 (CFLAGS): Define.
|
||||||
|
|
||||||
|
Thu Mar 14 19:20:54 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* mh-necv4: New file.
|
||||||
|
|
||||||
|
Thu Feb 15 13:07:43 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* mh-cxux (CC): New variable.
|
||||||
|
(CFLAGS, LDFLAGS): Remove.
|
||||||
|
* mh-ncrsvr43 (CC): New variable.
|
||||||
|
(CFLAGS): Remove.
|
||||||
|
* mh-solaris (CFLAGS): Remove.
|
||||||
|
|
||||||
|
* mh-go32: Remove most variable settings, since they presumed a
|
||||||
|
Canadian Cross, which is now handled correctly by the configure
|
||||||
|
script.
|
||||||
|
|
||||||
|
* mh-sparcpic (PICFLAG): Set to -fPIC, not -fpic.
|
||||||
|
|
||||||
|
Mon Feb 12 14:53:39 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
|
||||||
|
|
||||||
|
* mh-m68kpic, mt-m68kpic: New files.
|
||||||
|
|
||||||
|
Thu Feb 1 14:15:42 1996 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* mpw-mh-mpw (CC_MWC68K): Add options similar to those used
|
||||||
|
in CC_MWCPPC, and -mc68020 -model far.
|
||||||
|
(AR_MWLINK68K): Add -xm library.
|
||||||
|
(AR_AR): Define.
|
||||||
|
(CC_LD_MWLINK68K): Remove -d.
|
||||||
|
(EXTRALIBS_MWC68K): Define.
|
||||||
|
|
||||||
|
Thu Jan 25 16:05:33 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* mh-ncrsvr43 (CFLAGS): Remove -Hnocopyr.
|
||||||
|
|
||||||
|
Tue Nov 7 15:41:30 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* mpw-mh-mpw (CC_MWC68K, CC_MWCPPC): Remove unused include path.
|
||||||
|
(CC_MWCPPC): Add -mpw_chars, disable warnings, add comments
|
||||||
|
explaining reasons for various flags.
|
||||||
|
(EXTRALIBS_PPC, EXTRALIBS_MWCPPC ): Put runtime library first.
|
||||||
|
|
||||||
|
Fri Oct 13 14:44:25 1995 Jason Molenda (crash@phydeaux.cygnus.com)
|
||||||
|
|
||||||
|
* mh-aix, mh-sun: Removed.
|
||||||
|
|
||||||
|
* mh-decstation (X11_EXTRA_CFLAGS): Define.
|
||||||
|
|
||||||
|
* mh-sco, mh-solaris, mh-sysv4 (X11_EXTRA_LIBS): Define.
|
||||||
|
|
||||||
|
* mh-hp300, mh-hpux, mh-hpux8, mh-solaris, mh-sun3, mh-sysv4: Don't
|
||||||
|
hardcode location of X stuff here.
|
||||||
|
|
||||||
|
Thu Sep 28 13:14:56 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* mpw-mh-mpw: Add definitions for various 68K and PowerMac
|
||||||
|
compilers, add definitions for library and link steps for
|
||||||
|
PowerMacs.
|
||||||
|
|
||||||
|
Thu Sep 14 08:20:04 1995 Fred Fish <fnf@cygnus.com>
|
||||||
|
|
||||||
|
* mh-hp300 (CC): Add "CC = cc -Wp,-H256000" to avoid
|
||||||
|
"too much defining" errors from the HPUX compiler.
|
||||||
|
|
||||||
|
Thu Aug 17 17:28:56 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
|
||||||
|
|
||||||
|
* mh-hp300 (RANLIB): Use "ar ts", in case GNU ar was used and
|
||||||
|
didn't build a symbol table.
|
||||||
|
|
||||||
|
Thu Jun 22 17:47:24 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* mpw-mh-mpw (CC): Define ANSI_PROTOTYPES.
|
||||||
|
|
||||||
|
Mon Apr 10 12:29:48 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* mpw-mh-mpw (EXTRALIBS): Always link in Math.o, CSANELIB.o,
|
||||||
|
and ToolLibs.o.
|
||||||
|
|
||||||
|
* mpw-mh-mpw (CC): Define ALMOST_STDC.
|
||||||
|
(CFLAGS): Remove ALMOST_STDC, -mc68881.
|
||||||
|
(LDFLAGS): add -w.
|
||||||
|
|
||||||
|
* mpw-mh-mpw (CFLAGS): Add -b option to put strings at the ends of
|
||||||
|
functions.
|
||||||
|
|
||||||
|
* mpw-mh-mpw: New file, host makefile definitions for MPW.
|
||||||
|
|
||||||
|
Fri Mar 31 11:35:17 1995 Jason Molenda (crash@phydeaux.cygnus.com)
|
||||||
|
|
||||||
|
* mt-netware: New file.
|
||||||
|
|
||||||
|
Mon Mar 13 12:31:29 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* mh-hpux8: New file.
|
||||||
|
* mh-hpux: Use X11R5 rather than X11R4.
|
||||||
|
|
||||||
|
Thu Feb 9 11:04:13 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* mh-linux (SYSV): Don't define.
|
||||||
|
(RANLIB): Don't define.
|
||||||
|
|
||||||
|
Wed Jan 11 16:29:34 1995 Jason Merrill <jason@phydeaux.cygnus.com>
|
||||||
|
|
||||||
|
* m?-*pic (LIBCXXFLAGS): Add -fno-implicit-templates.
|
||||||
|
|
||||||
|
Thu Nov 3 17:27:19 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
|
||||||
|
|
||||||
|
* mh-irix4 (CC): Increase maximum string length.
|
||||||
|
|
||||||
|
* mh-sco (CC): Define away const, it doesn't work right; elements
|
||||||
|
of arrays of ptr-to-const are considered const themselves.
|
||||||
|
|
||||||
|
Sat Jul 16 12:17:49 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||||
|
|
||||||
|
* mh-cxux: New file, from Bob Rusk (rrusk@mail.csd.harris.com).
|
||||||
|
|
||||||
|
Sat Jun 4 17:22:12 1994 Per Bothner (bothner@kalessin.cygnus.com)
|
||||||
|
|
||||||
|
* mh-ncrsvr43: New file from Tom McConnell
|
||||||
|
<tmcconne@sedona.intel.com>.
|
||||||
|
|
||||||
|
Thu May 19 00:32:11 1994 Jeff Law (law@snake.cs.utah.edu)
|
||||||
|
|
||||||
|
* mh-hpux (CC): Add -Wp,-H256000 to avoid "too much defining"
|
||||||
|
errors from the HPUX 8 compilers.
|
||||||
|
|
||||||
|
Wed May 4 20:14:47 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
|
||||||
|
|
||||||
|
* mh-lynxrs6k: set SHELL to /bin/bash
|
||||||
|
|
||||||
|
Tue Apr 12 12:38:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||||
|
|
||||||
|
* mh-irix4 (CC): Change -XNh1500 to -XNh2000.
|
||||||
|
|
||||||
|
Sat Dec 25 20:03:45 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
|
||||||
|
|
||||||
|
* mt-hppa: Delete.
|
||||||
|
|
||||||
|
Tue Nov 16 22:54:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
|
* mh-a68bsd: Define CC to gcc.
|
||||||
|
|
||||||
|
Mon Nov 15 16:56:51 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
|
* mh-linux: Don't put -static in LDFLAGS. Add comments.
|
||||||
|
|
||||||
|
Mon Nov 15 13:37:58 1993 david d `zoo' zuhn (zoo@cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* mh-sysv4 (AR_FLAGS): change from cq to cr
|
||||||
|
|
||||||
|
Fri Nov 5 08:12:32 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com)
|
||||||
|
|
||||||
|
* mh-unixware: remove. It's the same as sysv4, and config.guess
|
||||||
|
can't tell the difference. So don't allow skew.
|
||||||
|
|
||||||
|
Wed Oct 20 20:35:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
|
* mh-hp300: Revert yesterday's change, but add comment explaining.
|
||||||
|
|
||||||
|
Tue Oct 19 18:58:21 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
|
* mh-hp300: Don't define CFLAGS to empty. Why should hp300 be
|
||||||
|
different from anything else? ("gdb doesn't understand the native
|
||||||
|
debug format" isn't a good enough answer because we might be using
|
||||||
|
gcc).
|
||||||
|
|
||||||
|
Tue Oct 5 12:17:40 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||||
|
|
||||||
|
* mh-alphaosf: Remove, no longer necessary now that gdb knows
|
||||||
|
how to handle OSF/1 shared libraries.
|
||||||
|
|
||||||
|
Tue Jul 6 11:27:33 1993 Steve Chamberlain (sac@phydeaux.cygnus.com)
|
||||||
|
|
||||||
|
* mh-alphaosf: New file.
|
||||||
|
|
||||||
|
Thu Jul 1 15:49:33 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
|
* mh-riscos: New file.
|
||||||
|
|
||||||
|
Mon Jun 14 12:03:18 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
|
||||||
|
|
||||||
|
* mh-aix, mh-aix386, mh-decstation, mh-delta88, mh-hpux, mh-irix4,
|
||||||
|
mh-ncr3000, mh-solaris, mh-sysv, mh-sysv4: remove INSTALL=cp line,
|
||||||
|
now that we're using install.sh globally
|
||||||
|
|
||||||
|
Fri Jun 4 16:09:34 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||||
|
|
||||||
|
* mh-sysv4 (INSTALL): Use cp, not /usr/ucb/install.
|
||||||
|
|
||||||
|
Thu Apr 8 11:21:52 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||||
|
|
||||||
|
* mt-a29k, mt-ebmon29k, mt-os68k, mt-ose68000, mt-ose68k,
|
||||||
|
mt-vxworks68, mt-vxworks960: Removed obsolete, unused target
|
||||||
|
Makefile fragment files.
|
||||||
|
|
||||||
|
Mon Mar 8 15:05:25 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
|
||||||
|
|
||||||
|
* mh-aix386: New file; old mh-aix, plus no-op RANLIB.
|
||||||
|
|
||||||
|
Thu Oct 1 13:50:48 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* mh-solaris: INSTALL is NOT /usr/ucb/install
|
||||||
|
|
||||||
|
Mon Aug 24 14:25:35 1992 Ian Lance Taylor (ian@cygnus.com)
|
||||||
|
|
||||||
|
* mt-ose68000, mt-ose68k: renamed from mt-OSE*.
|
||||||
|
|
||||||
|
Tue Jul 21 02:11:01 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
|
||||||
|
|
||||||
|
* mt-OSE68k, mt-680000: new configs.
|
||||||
|
|
||||||
|
Thu Jul 16 17:12:09 1992 K. Richard Pixley (rich@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* mh-irix4: merged changes from progressive.
|
||||||
|
|
||||||
|
Tue Jun 9 23:29:38 1992 Per Bothner (bothner@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* Everywhere: Change RANLIB=echo>/dev/null (which confuses
|
||||||
|
some shells - and I don't blame them) to RANLIB=true.
|
||||||
|
* mh-solaris: Use /usr/ucb/install for INSTALL.
|
||||||
|
|
||||||
|
Sun May 31 14:45:23 1992 Mark Eichin (eichin at cygnus.com)
|
||||||
|
|
||||||
|
* mh-solaris2: Add new configuration for Solaris 2 (sysv, no ranlib)
|
||||||
|
|
||||||
|
Fri Apr 10 23:10:08 1992 Fred Fish (fnf@cygnus.com)
|
||||||
|
|
||||||
|
* mh-ncr3000: Add new configuration for NCR 3000.
|
||||||
|
|
||||||
|
Tue Dec 10 00:10:55 1991 K. Richard Pixley (rich at rtl.cygnus.com)
|
||||||
|
|
||||||
|
* ChangeLog: fresh changelog.
|
||||||
|
|
12
config/mh-a68bsd
Normal file
12
config/mh-a68bsd
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
RANLIB=true
|
||||||
|
|
||||||
|
#None of the Apollo compilers can compile gas or binutils. The preprocessor
|
||||||
|
# chokes on bfd, the compiler won't let you assign integers to enums, and
|
||||||
|
# other problems. Defining CC to gcc is a questionable way to say "don't use
|
||||||
|
# the apollo compiler" (the preferred version of GCC could be called cc,
|
||||||
|
# or whatever), but I'm not sure leaving CC as cc is any better...
|
||||||
|
|
||||||
|
#CC=cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DNO_STDARG
|
||||||
|
CC=gcc
|
||||||
|
|
||||||
|
BISON=yacc
|
1
config/mh-aix386
Normal file
1
config/mh-aix386
Normal file
@ -0,0 +1 @@
|
|||||||
|
RANLIB = @:
|
3
config/mh-apollo68
Normal file
3
config/mh-apollo68
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
HDEFINES = -DUSG
|
||||||
|
RANLIB=true
|
||||||
|
CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__ -DUSG
|
14
config/mh-cxux
Normal file
14
config/mh-cxux
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Configuration for Harris CX/UX 7 (and maybe 6), based on sysv4 configuration.
|
||||||
|
|
||||||
|
# Define SYSV as -DSYSV if you are using a System V operating system.
|
||||||
|
SYSV = -DSYSV -DSVR4
|
||||||
|
RANLIB = true
|
||||||
|
|
||||||
|
# C++ debugging is not yet supported under SVR4 (DWARF)
|
||||||
|
CXXFLAGS=-O
|
||||||
|
|
||||||
|
# The l flag generates a warning from the SVR4 archiver, remove it.
|
||||||
|
AR_FLAGS = cq
|
||||||
|
|
||||||
|
# Under CX/UX, we want to tell the compiler to use ANSI mode.
|
||||||
|
CC=cc -Xa
|
16
config/mh-cygwin32
Normal file
16
config/mh-cygwin32
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# We don't want debugging info in Win32-hosted toolchains.
|
||||||
|
# Accomplish this by overriding CFLAGS.
|
||||||
|
CFLAGS=-O2
|
||||||
|
CXXFLAGS=-O2
|
||||||
|
|
||||||
|
# We also need to override LIBGCC2_DEBUG_CFLAGS so libgcc2 will be
|
||||||
|
# build without debugging information
|
||||||
|
|
||||||
|
LIBGCC2_DEBUG_CFLAGS=
|
||||||
|
|
||||||
|
# We set MAKEINFOFLAGS to not split .info files, because the resulting
|
||||||
|
# file names don't work on DOS.
|
||||||
|
MAKEINFOFLAGS=--no-split
|
||||||
|
|
||||||
|
# custom installation rules for cygwin32 (append .exe to binaries, etc.)
|
||||||
|
INSTALL_DOSREL=install-dosrel
|
5
config/mh-decstation
Normal file
5
config/mh-decstation
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
CC = cc -Wf,-XNg1000
|
||||||
|
|
||||||
|
# for X11, since the native DECwindows include files are really broken when
|
||||||
|
# it comes to function prototypes.
|
||||||
|
X11_EXTRA_CFLAGS = "-DNeedFunctionPrototypes=0"
|
4
config/mh-delta88
Normal file
4
config/mh-delta88
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
RANLIB = true
|
||||||
|
|
||||||
|
|
||||||
|
|
4
config/mh-dgux
Normal file
4
config/mh-dgux
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
HDEFINES=-DHOST_SYS=DGUX_SYS
|
||||||
|
CC=gcc -Wall -ansi -D__using_DGUX
|
||||||
|
RANLIB=true
|
||||||
|
|
22
config/mh-dgux386
Normal file
22
config/mh-dgux386
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# from mh-dgux
|
||||||
|
HDEFINES=-DHOST_SYS=DGUX_SYS
|
||||||
|
CC=gcc -Wall -ansi -D__using_DGUX
|
||||||
|
RANLIB = true
|
||||||
|
|
||||||
|
# from mh-sysv4
|
||||||
|
# Define SYSV as -DSYSV if you are using a System V operating system.
|
||||||
|
SYSV = -DSYSV -DSVR4
|
||||||
|
RANLIB = true
|
||||||
|
|
||||||
|
# C++ debugging is not yet supported under SVR4 (DWARF)
|
||||||
|
CXXFLAGS=-O
|
||||||
|
|
||||||
|
# The l flag generates a warning from the SVR4 archiver, remove it.
|
||||||
|
AR_FLAGS = cr
|
||||||
|
|
||||||
|
X11_EXTRA_LIBS = -lnsl
|
||||||
|
|
||||||
|
# from angela
|
||||||
|
# no debugging due to broken compiler, use BSD style timeofday
|
||||||
|
CFLAGS=-O -D_BSD_TIMEOFDAY_FLAVOR
|
||||||
|
|
4
config/mh-go32
Normal file
4
config/mh-go32
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# We don't want to use debugging information on DOS. Unfortunately,
|
||||||
|
# this requires that we set CFLAGS.
|
||||||
|
# This used to set -fno-omit-frame-pointer.
|
||||||
|
CFLAGS=-O2
|
13
config/mh-hp300
Normal file
13
config/mh-hp300
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Define SYSV as -DSYSV if you are using a System V operating system.
|
||||||
|
SYSV = -DSYSV
|
||||||
|
# Avoid "too much defining" errors from HPUX compiler.
|
||||||
|
CC = cc -Wp,-H256000
|
||||||
|
# If "ar" in $PATH is GNU ar, the symbol table may need rebuilding.
|
||||||
|
# If it's HP/UX ar, this should be harmless.
|
||||||
|
RANLIB = ar ts
|
||||||
|
|
||||||
|
# Native cc can't bootstrap gcc with -g. Defining CFLAGS here loses (a)
|
||||||
|
# for non-gcc directories, (b) if we are compiling with gcc, not
|
||||||
|
# native cc. Neither (a) nor (b) has a trivial fix though.
|
||||||
|
|
||||||
|
CFLAGS =
|
4
config/mh-hpux
Normal file
4
config/mh-hpux
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Define SYSV as -DSYSV if you are using a System V operating system.
|
||||||
|
CC = cc -Wp,-H256000
|
||||||
|
SYSV = -DSYSV
|
||||||
|
RANLIB = true
|
4
config/mh-hpux8
Normal file
4
config/mh-hpux8
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Define SYSV as -DSYSV if you are using a System V operating system.
|
||||||
|
CC = cc -Wp,-H256000
|
||||||
|
SYSV = -DSYSV
|
||||||
|
RANLIB = true
|
7
config/mh-irix4
Normal file
7
config/mh-irix4
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Makefile changes for SGI's running IRIX-4.x.
|
||||||
|
# Tell compiler to use K&R C. We can't compile under the SGI Ansi
|
||||||
|
# environment. Also bump switch table size so that cp-parse will
|
||||||
|
# compile. Bump string length limit so linker builds.
|
||||||
|
|
||||||
|
CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 -Wf,-XNl8192
|
||||||
|
SYSV = -DSYSV
|
3
config/mh-irix5
Normal file
3
config/mh-irix5
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Makefile changes for SGI's running IRIX-5.x.
|
||||||
|
SYSV = -DSYSV
|
||||||
|
RANLIB = true
|
7
config/mh-irix6
Normal file
7
config/mh-irix6
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Makefile changes for SGI's running IRIX-6.x.
|
||||||
|
SYSV = -DSYSV
|
||||||
|
RANLIB = true
|
||||||
|
# Specify the ABI, to ensure that all Irix 6 systems will behave the same.
|
||||||
|
# Also, using -32 avoids bugs that exist in the n32/n64 support in some
|
||||||
|
# versions of the SGI compiler.
|
||||||
|
CC = cc -32
|
2
config/mh-lynxos
Normal file
2
config/mh-lynxos
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# /bin/cc is less than useful for our purposes. Always use GCC
|
||||||
|
CC = /bin/gcc
|
8
config/mh-lynxrs6k
Normal file
8
config/mh-lynxrs6k
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# LynxOS running on the rs6000 doesn't have ranlib
|
||||||
|
RANLIB = true
|
||||||
|
|
||||||
|
# /bin/cc is less than useful for our purposes. Always use GCC
|
||||||
|
CC = /usr/cygnus/progressive/bin/gcc
|
||||||
|
|
||||||
|
# /bin/sh is too buggy, so use /bin/bash instead.
|
||||||
|
SHELL = /bin/bash
|
1
config/mh-m68kpic
Normal file
1
config/mh-m68kpic
Normal file
@ -0,0 +1 @@
|
|||||||
|
PICFLAG=-fpic
|
17
config/mh-ncr3000
Normal file
17
config/mh-ncr3000
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Host configuration file for an NCR 3000 (i486/SVR4) system.
|
||||||
|
|
||||||
|
# The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
|
||||||
|
# This compiler not only emits obnoxious copyright messages every time
|
||||||
|
# you run it, but it chokes and dies on a whole bunch of GNU source
|
||||||
|
# files. Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
|
||||||
|
# Unfortunately though, the AT&T compiler sometimes generates code that
|
||||||
|
# the assembler barfs on if -g is used, so disable it by default as well.
|
||||||
|
CC = /usr/ccs/ATT/cc
|
||||||
|
CFLAGS =
|
||||||
|
|
||||||
|
# Define SYSV as -DSYSV if you are using a System V operating system.
|
||||||
|
SYSV = -DSYSV -DSVR4
|
||||||
|
RANLIB = true
|
||||||
|
|
||||||
|
# The l flag generates a warning from the SVR4 archiver, remove it.
|
||||||
|
AR_FLAGS = cq
|
9
config/mh-ncrsvr43
Normal file
9
config/mh-ncrsvr43
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Host configuration file for an NCR 3000 (i486/SVR43) system.
|
||||||
|
|
||||||
|
# The MetaWare compiler will generate a copyright message unless you
|
||||||
|
# turn it off by adding the -Hnocopyr flag.
|
||||||
|
CC = cc -Hnocopyr
|
||||||
|
|
||||||
|
# Define SYSV as -DSYSV if you are using a System V operating system.
|
||||||
|
SYSV = -DSYSV -DSVR4
|
||||||
|
RANLIB = true
|
11
config/mh-necv4
Normal file
11
config/mh-necv4
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Host Makefile fragment for NEC MIPS SVR4.
|
||||||
|
|
||||||
|
# The C compiler on NEC MIPS SVR4 needs bigger tables.
|
||||||
|
CC = cc -ZXNd=5000 -ZXNg=1000
|
||||||
|
|
||||||
|
# Define SYSV as -DSYSV if you are using a System V operating system.
|
||||||
|
SYSV = -DSYSV -DSVR4
|
||||||
|
RANLIB = true
|
||||||
|
|
||||||
|
# NEC -lX11 needs some other libraries.
|
||||||
|
X11_EXTRA_LIBS = -lsocket -lnsl
|
1
config/mh-papic
Normal file
1
config/mh-papic
Normal file
@ -0,0 +1 @@
|
|||||||
|
PICFLAG=-fPIC
|
1
config/mh-ppcpic
Normal file
1
config/mh-ppcpic
Normal file
@ -0,0 +1 @@
|
|||||||
|
PICFLAG=-fPIC
|
15
config/mh-riscos
Normal file
15
config/mh-riscos
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# This is for a MIPS running RISC/os 4.52C.
|
||||||
|
|
||||||
|
# This is needed for GDB, but needs to be in the top-level make because
|
||||||
|
# if a library is compiled with the bsd headers and gets linked with the
|
||||||
|
# sysv system libraries all hell can break loose (e.g. a jmp_buf might be
|
||||||
|
# a different size).
|
||||||
|
# ptrace(2) apparently has problems in the BSD environment. No workaround is
|
||||||
|
# known except to select the sysv environment. Could we use /proc instead?
|
||||||
|
# These "sysv environments" and "bsd environments" often end up being a pain.
|
||||||
|
#
|
||||||
|
# This is not part of CFLAGS because perhaps not all C compilers have this
|
||||||
|
# option.
|
||||||
|
CC= cc -systype sysv
|
||||||
|
|
||||||
|
RANLIB = true
|
10
config/mh-sco
Normal file
10
config/mh-sco
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Define SYSV as -DSYSV if you are using a System V operating system.
|
||||||
|
SYSV = -DSYSV
|
||||||
|
RANLIB = true
|
||||||
|
# You may need this if you don't have bison.
|
||||||
|
# BISON = yacc -Sm10400
|
||||||
|
# The native C compiler botches some simple uses of const. Unfortunately,
|
||||||
|
# it doesn't defined anything like "__sco__" for us to test for in ansidecl.h.
|
||||||
|
CC = cc -Dconst=
|
||||||
|
|
||||||
|
X11_EXTRA_LIBS = -lsocket -lm -lintl -lmalloc
|
6
config/mh-solaris
Normal file
6
config/mh-solaris
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Makefile changes for Suns running Solaris 2
|
||||||
|
|
||||||
|
SYSV = -DSYSV
|
||||||
|
RANLIB = true
|
||||||
|
|
||||||
|
X11_EXTRA_LIBS = -lnsl -lsocket
|
1
config/mh-sparcpic
Normal file
1
config/mh-sparcpic
Normal file
@ -0,0 +1 @@
|
|||||||
|
PICFLAG=-fPIC
|
3
config/mh-sun3
Normal file
3
config/mh-sun3
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Sun's C compiler needs the -J flag to be able to compile cp-parse.c
|
||||||
|
# without overflowing the jump tables (-J says to use a 32 bit table)
|
||||||
|
CC = cc -J
|
3
config/mh-sysv
Normal file
3
config/mh-sysv
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Define SYSV as -DSYSV if you are using a System V operating system.
|
||||||
|
SYSV = -DSYSV
|
||||||
|
RANLIB = true
|
11
config/mh-sysv4
Normal file
11
config/mh-sysv4
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Define SYSV as -DSYSV if you are using a System V operating system.
|
||||||
|
SYSV = -DSYSV -DSVR4
|
||||||
|
RANLIB = true
|
||||||
|
|
||||||
|
# C++ debugging is not yet supported under SVR4 (DWARF)
|
||||||
|
CXXFLAGS=-O
|
||||||
|
|
||||||
|
# The l flag generates a warning from the SVR4 archiver, remove it.
|
||||||
|
AR_FLAGS = cr
|
||||||
|
|
||||||
|
X11_EXTRA_LIBS = -lnsl
|
2
config/mh-vaxult2
Normal file
2
config/mh-vaxult2
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# The old BSD pcc isn't up to compiling parts of gdb so use gcc
|
||||||
|
CC = gcc
|
16
config/mh-windows
Normal file
16
config/mh-windows
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
CC=cc
|
||||||
|
CFLAGS=
|
||||||
|
RANLIB=true
|
||||||
|
AR_FLAGS=
|
||||||
|
|
||||||
|
.PHONY: windows
|
||||||
|
windows: nmake.mak
|
||||||
|
@echo "Don't forget to setup setvars.mak!"
|
||||||
|
|
||||||
|
nmake.mak: to-be-built
|
||||||
|
@echo Building nmake files
|
||||||
|
@$(srcdir)/gdb/mswin/genmakes
|
||||||
|
|
||||||
|
to-be-built:
|
||||||
|
@echo Recording commands
|
||||||
|
@$(srcdir)/gdb/mswin/recordit
|
1
config/mh-x86pic
Normal file
1
config/mh-x86pic
Normal file
@ -0,0 +1 @@
|
|||||||
|
PICFLAG=-fpic
|
157
config/mpw-mh-mpw
Normal file
157
config/mpw-mh-mpw
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
# This is an MPW makefile fragment.
|
||||||
|
|
||||||
|
# Since there are a multiplicity of Mac compilers and two different
|
||||||
|
# processors, this file is primarily a library of options for each
|
||||||
|
# compiler. Somebody else (such as a configure or build script) will
|
||||||
|
# make the actual choice.
|
||||||
|
|
||||||
|
# Compiler to use for compiling.
|
||||||
|
|
||||||
|
CC_MPW_C = C -d MPW_C -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -mc68020 -model far -b -w
|
||||||
|
|
||||||
|
CC_SC = SC -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -mc68020 -model far -b -i '' -i :
|
||||||
|
|
||||||
|
CC_MWC68K = MWC68K -d MPW -enum int -mpw_chars -sym on -w off -mc68020 -model far
|
||||||
|
|
||||||
|
CC_PPCC = PPCC -d powerc=1 -d pascal= -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -w
|
||||||
|
|
||||||
|
CC_MRC = MrC -d powerc=1 -d pascal= -d ALMOST_STDC -d ANSI_PROTOTYPES -d MPW -i '' -i : -jm
|
||||||
|
|
||||||
|
CC_SMrC = SMrC -d MPW
|
||||||
|
|
||||||
|
# "-mpw_chars" is necessary because GNU sources often mix signed and
|
||||||
|
# unsigned casually.
|
||||||
|
# "-w off" is not a great idea, but CW7 is complaining about enum
|
||||||
|
# assignments.
|
||||||
|
# "-opt global,peep,l4,speed" is sometimes good, and sometimes bad.
|
||||||
|
# We must use {CIncludes} so that MPW tools will work; {MWCIncludes}
|
||||||
|
# defines stdout, islower, etc, in ways that are incompatible with MPW's
|
||||||
|
# runtime. However, this cannot be done via -i "{CIncludes}", since
|
||||||
|
# that does not affect how <>-type includes happen; instead, the variable
|
||||||
|
# MWCIncludes must be set to point at {CIncludes}.
|
||||||
|
|
||||||
|
CC_MWCPPC = MWCPPC -d MPW -enum int -mpw_chars -sym on -w off
|
||||||
|
|
||||||
|
# Note that GCC does *not* wire in a definition of "pascal", so that
|
||||||
|
# it can be handled in another way if desired.
|
||||||
|
|
||||||
|
CC_68K_GCC = gC -Dpascal= -DANSI_PROTOTYPES -DMPW
|
||||||
|
|
||||||
|
CC_PPC_GCC = gC -Dpowerc=1 -Dpascal= -DANSI_PROTOTYPES -DMPW
|
||||||
|
|
||||||
|
# Nothing for the default CFLAGS.
|
||||||
|
|
||||||
|
CFLAGS =
|
||||||
|
|
||||||
|
# Tool to use for making libraries/archives.
|
||||||
|
|
||||||
|
AR_LIB = Lib
|
||||||
|
|
||||||
|
AR_MWLINK68K = MWLink68K -xm library
|
||||||
|
|
||||||
|
AR_PPCLINK = PPCLink -xm library
|
||||||
|
|
||||||
|
AR_MWLINKPPC = MWLinkPPC -xm library
|
||||||
|
|
||||||
|
AR_AR = ar
|
||||||
|
|
||||||
|
AR_FLAGS = -o
|
||||||
|
|
||||||
|
RANLIB_NULL = null-command
|
||||||
|
|
||||||
|
RANLIB_RANLIB = ranlib
|
||||||
|
|
||||||
|
# Compiler and/or linker to use for linking.
|
||||||
|
|
||||||
|
CC_LD_LINK = Link -w -d -model far {CC_LD_TOOL_FLAGS}
|
||||||
|
|
||||||
|
CC_LD_MWLINK68K = MWLink68K -w {CC_LD_TOOL_FLAGS} -sym on -model far
|
||||||
|
|
||||||
|
CC_LD_PPCLINK = PPCLink -main __start -outputformat xcoff
|
||||||
|
|
||||||
|
CC_LD_MWLINKPPC = MWLinkPPC -w {CC_LD_TOOL_FLAGS} -sym on
|
||||||
|
|
||||||
|
CC_LD_GLD = gC
|
||||||
|
|
||||||
|
# Extension for linker output.
|
||||||
|
|
||||||
|
PROG_EXT_68K =
|
||||||
|
|
||||||
|
PROG_EXT_XCOFF = .xcoff
|
||||||
|
|
||||||
|
# Nothing for the default LDFLAGS.
|
||||||
|
|
||||||
|
LDFLAGS = -w
|
||||||
|
|
||||||
|
CC_LD_TOOL_FLAGS = -c 'MPS ' -t MPST
|
||||||
|
|
||||||
|
# Libraries to link against.
|
||||||
|
|
||||||
|
# It would appear that the math libraries are not
|
||||||
|
# needed except to provide a definition for scalb,
|
||||||
|
# which is called from ldexp, which is referenced
|
||||||
|
# in the m68k opcodes library.
|
||||||
|
|
||||||
|
EXTRALIBS_C = \Option-d
|
||||||
|
"{CLibraries}"StdClib.o \Option-d
|
||||||
|
"{CLibraries}"Math.o \Option-d
|
||||||
|
"{CLibraries}"CSANELib.o \Option-d
|
||||||
|
"{Libraries}"Stubs.o \Option-d
|
||||||
|
"{Libraries}"Runtime.o \Option-d
|
||||||
|
"{Libraries}"Interface.o \Option-d
|
||||||
|
"{Libraries}"ToolLibs.o
|
||||||
|
|
||||||
|
EXTRALIBS_MWC68K = \Option-d
|
||||||
|
"{CLibraries}"StdClib.o \Option-d
|
||||||
|
"{CLibraries}"Math.o \Option-d
|
||||||
|
"{CLibraries}"CSANELib.o \Option-d
|
||||||
|
"{Libraries}"Stubs.o \Option-d
|
||||||
|
"{Libraries}"Runtime.o \Option-d
|
||||||
|
"{Libraries}"Interface.o \Option-d
|
||||||
|
"{Libraries}"ToolLibs.o \Option-d
|
||||||
|
"{MW68KLibraries}MPW ANSI (4i) C.68K.Lib"
|
||||||
|
|
||||||
|
EXTRALIBS_PPC_XCOFF = \Option-d
|
||||||
|
"{PPCLibraries}"StdCRuntime.o \Option-d
|
||||||
|
"{PPCLibraries}"InterfaceLib.xcoff \Option-d
|
||||||
|
"{PPCLibraries}"MathLib.xcoff \Option-d
|
||||||
|
"{PPCLibraries}"StdCLib.xcoff \Option-d
|
||||||
|
"{PPCLibraries}"PPCToolLibs.o \Option-d
|
||||||
|
"{PPCLibraries}"PPCCRuntime.o \Option-d
|
||||||
|
"{GCCPPCLibraries}"libgcc.xcoff
|
||||||
|
|
||||||
|
EXTRALIBS_PPC = \Option-d
|
||||||
|
"{PPCLibraries}"StdCRuntime.o \Option-d
|
||||||
|
"{SharedLibraries}"InterfaceLib \Option-d
|
||||||
|
"{SharedLibraries}"MathLib \Option-d
|
||||||
|
"{SharedLibraries}"StdCLib \Option-d
|
||||||
|
"{PPCLibraries}"PPCToolLibs.o \Option-d
|
||||||
|
"{PPCLibraries}"PPCCRuntime.o \Option-d
|
||||||
|
"{GCCPPCLibraries}"libgcc.xcoff
|
||||||
|
|
||||||
|
EXTRALIBS_MWCPPC = \Option-d
|
||||||
|
"{MWPPCLibraries}"MWStdCRuntime.Lib \Option-d
|
||||||
|
"{MWPPCLibraries}"InterfaceLib \Option-d
|
||||||
|
"{MWPPCLibraries}"StdCLib \Option-d
|
||||||
|
"{MWPPCLibraries}"MathLib \Option-d
|
||||||
|
"{MWPPCLibraries}"PPCToolLibs.o
|
||||||
|
|
||||||
|
# Tool to make PEF with, if needed.
|
||||||
|
|
||||||
|
MAKEPEF_NULL = null-command
|
||||||
|
|
||||||
|
MAKEPEF_PPC = MakePEF
|
||||||
|
|
||||||
|
MAKEPEF_FLAGS = \Option-d
|
||||||
|
-l InterfaceLib.xcoff=InterfaceLib \Option-d
|
||||||
|
-l MathLib.xcoff=MathLib \Option-d
|
||||||
|
-l StdCLib.xcoff=StdCLib
|
||||||
|
|
||||||
|
MAKEPEF_TOOL_FLAGS = -ft MPST -fc 'MPS '
|
||||||
|
|
||||||
|
# Resource compiler to use.
|
||||||
|
|
||||||
|
REZ_68K = Rez
|
||||||
|
|
||||||
|
REZ_PPC = Rez -d WANT_CFRG
|
||||||
|
|
53
config/mpw/ChangeLog
Normal file
53
config/mpw/ChangeLog
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
Tue Nov 26 12:34:12 1996 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* g-mpw-make.sed: Fix some comments.
|
||||||
|
|
||||||
|
Mon Sep 16 14:42:52 1996 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* g-mpw-make.sed (HLDENV): Edit out all references.
|
||||||
|
|
||||||
|
Thu Aug 15 19:49:23 1996 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* true: New script, identical to mpw-true.
|
||||||
|
* g-mpw-make.sed: Add @DASH_C_FLAG@ and @SEGMENT_FLAG()@
|
||||||
|
to the editors for compile commands.
|
||||||
|
|
||||||
|
Thu Aug 1 15:01:42 1996 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* mpw-true, mpw-touch, null-command: New scripts.
|
||||||
|
* README: Describe usage in more detail.
|
||||||
|
|
||||||
|
Tue Dec 12 14:51:51 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* g-mpw-make.sed: Don't edit out "version=" occurrences.
|
||||||
|
|
||||||
|
Fri Dec 1 11:46:18 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* g-mpw-make.sed (bindir, libdir): Edit the positions of
|
||||||
|
pathname separators to work with other pathnames better.
|
||||||
|
|
||||||
|
Tue Nov 7 15:08:07 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* g-mpw-make.sed: Add comment about Duplicate vs Catenate,
|
||||||
|
add additional pattern for editing link-compile commands.
|
||||||
|
|
||||||
|
Tue Oct 24 14:28:51 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* g-mpw-make.sed: Add handling for *.tab.[hc] files.
|
||||||
|
(CHILL_FOR_TARGET, CHILL_LIB): Edit out tricky definitions
|
||||||
|
of these.
|
||||||
|
|
||||||
|
Thu Sep 28 21:05:10 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* g-mpw-make.sed: New file, generic sed commands to translate
|
||||||
|
Unix makefiles into MPW makefile syntax.
|
||||||
|
|
||||||
|
Fri Mar 17 11:51:20 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* README: Clarify instructions.
|
||||||
|
* fi: Remove.
|
||||||
|
|
||||||
|
Wed Dec 21 15:45:53 1994 Stan Shebs <shebs@andros.cygnus.com>
|
||||||
|
|
||||||
|
* MoveIfChange, README, fi, forward-include, open-brace,
|
||||||
|
tr-7to8-src: New files.
|
19
config/mpw/MoveIfChange
Normal file
19
config/mpw/MoveIfChange
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Rename a file only if it is different from a previously existing
|
||||||
|
# file of the same name. This is useful for keeping make from doing
|
||||||
|
# too much work if the contents of a file haven't changed.
|
||||||
|
|
||||||
|
# This is an MPW translation of the standard GNU sh script move-if-change.
|
||||||
|
|
||||||
|
Set exit 0
|
||||||
|
|
||||||
|
If "`exists -f "{2}"`"
|
||||||
|
Compare "{1}" "{2}" >dev:null
|
||||||
|
If {status} != 0
|
||||||
|
Rename -y "{1}" "{2}"
|
||||||
|
Else
|
||||||
|
Echo "{2}" is unchanged
|
||||||
|
Delete -i -y "{1}"
|
||||||
|
End
|
||||||
|
Else
|
||||||
|
Rename -y "{1}" "{2}"
|
||||||
|
End
|
23
config/mpw/README
Normal file
23
config/mpw/README
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
This directory contains MPW scripts and related files that are needed to
|
||||||
|
build Cygnus GNU tools for MPW. The scripts should be somewhere on the
|
||||||
|
command path; our usual practice has been to have a separate directory
|
||||||
|
for the scripts, and put the tools (byacc, flex, and sed at least) there
|
||||||
|
also; then it's easier to drag the support bits around as a group, or to
|
||||||
|
upgrade MPW versions. The complete package of scripts and tool binaries
|
||||||
|
is usually available as pub/mac/buildtools.cpt.hqx on ftp.cygnus.com.
|
||||||
|
|
||||||
|
"tr-7to8-src" is actually the source to an MPW script that transforms
|
||||||
|
sequences like "\Option-d" into the actual 8-bit chars that MPW needs.
|
||||||
|
It's only the source because it can't itself include any 8-bit chars.
|
||||||
|
It *can* be processed into a genuine "tr-7to8" by using itself:
|
||||||
|
|
||||||
|
tr-7to8 tr-7to8-src | sed -e 's/Src//' >new-tr-7to8
|
||||||
|
|
||||||
|
Use this to verify:
|
||||||
|
|
||||||
|
compare tr-7to8 new-tr-7to8
|
||||||
|
|
||||||
|
If you don't have a working tr-7to8, then you will have to manually
|
||||||
|
replace all occurrences of "\Option-d" with real Option-d (which looks
|
||||||
|
like a delta), then do similarly with all the other "\Option-..."
|
||||||
|
strings, and then change "\SrcOption-d" into the string "\Option-d".
|
3
config/mpw/forward-include
Normal file
3
config/mpw/forward-include
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Echo '#include' ¶""{1}"¶" >"{2}".tem
|
||||||
|
MoveIfChange "{2}".tem "{2}"
|
||||||
|
|
293
config/mpw/g-mpw-make.sed
Normal file
293
config/mpw/g-mpw-make.sed
Normal file
@ -0,0 +1,293 @@
|
|||||||
|
# Sed commands to translate Unix makefiles into MPW makefiles.
|
||||||
|
# These are nominally generic, but work best on the makefiles used
|
||||||
|
# for GNU programs.
|
||||||
|
|
||||||
|
# Whack out any commented-out lines that are probably commands;
|
||||||
|
# they can only cause trouble later on.
|
||||||
|
/^# /d
|
||||||
|
|
||||||
|
# Change dependency char.
|
||||||
|
/:$/s/:/ \\Option-f/g
|
||||||
|
/^[^ :#][^:]*:/s/\([ ]*\):\([ ]*\)/ \\Option-f /g
|
||||||
|
|
||||||
|
# Change syntax of Makefile vars.
|
||||||
|
/\$/s/\${\([a-zA-Z0-9_-]*\)}/{\1}/g
|
||||||
|
/\$/s/\$(\([a-zA-Z0-9_-]*\))/{\1}/g
|
||||||
|
/ $@/s/ $@/ {Targ}/
|
||||||
|
|
||||||
|
# Double-$ are literals to Unix but not to MPW make.
|
||||||
|
/\$\$/s/\$\$/$/g
|
||||||
|
|
||||||
|
# Change pathname syntax.
|
||||||
|
/\//s,\.\./\/\.\./,:::,g
|
||||||
|
/\//s,\.\./,::,g
|
||||||
|
/\.\//s,\./,:,g
|
||||||
|
/\//s,/,:,g
|
||||||
|
# Undo excess changes.
|
||||||
|
/and/s,and:or$,and/or,
|
||||||
|
/and/s,and:or ,and/or ,
|
||||||
|
/want/s,want:need,want/need,
|
||||||
|
# Fixing up sed commands.
|
||||||
|
/-e/s_":\([^:]*\):d"_"/\1/d"_g
|
||||||
|
/-e/s_":\([^:]*\):,:\([^:]*\):d"_"/\1/,/\2/d"_g
|
||||||
|
|
||||||
|
/=/s/ = \.$/ = :/
|
||||||
|
|
||||||
|
# Make these go away so that later edits not confused.
|
||||||
|
/HLDENV/s/{HLDENV}//
|
||||||
|
|
||||||
|
# Comment out any explicit srcdir setting.
|
||||||
|
/srcdir/s/^srcdir/# srcdir/
|
||||||
|
|
||||||
|
/BASEDIR/s/^BASEDIR =.*$/BASEDIR = "{srcroot}"/
|
||||||
|
/{BASEDIR}:/s/{BASEDIR}:/{BASEDIR}/g
|
||||||
|
/{srcdir}:/s/{srcdir}:/"{srcdir}"/g
|
||||||
|
/"{srcdir}":/s/"{srcdir}":/"{srcdir}"/g
|
||||||
|
|
||||||
|
# Tweak some conventions that are backwards for the Mac.
|
||||||
|
/bindir/s/{exec_prefix}:bin/{exec_prefix}bin:/
|
||||||
|
/libdir/s/{exec_prefix}:lib/{exec_prefix}lib:/
|
||||||
|
|
||||||
|
# Comment out settings of anything set by mpw host config.
|
||||||
|
/CC/s/^CC *=/#CC =/
|
||||||
|
/CFLAGS/s/^CFLAGS *=/#CFLAGS =/
|
||||||
|
/AR/s/^AR *=/#AR =/
|
||||||
|
/AR_FLAGS/s/^AR_FLAGS *=/#AR_FLAGS =/
|
||||||
|
/RANLIB/s/^RANLIB *=/#RANLIB =/
|
||||||
|
/CC_LD/s/^CC_LD *=/#CC_LD =/
|
||||||
|
/LDFLAGS/s/^LDFLAGS *=/#LDFLAGS =/
|
||||||
|
|
||||||
|
# Change -I usages.
|
||||||
|
/-I/s/-I\./-i :/g
|
||||||
|
/-I/s/-I::bfd/-i ::bfd:/g
|
||||||
|
/-I/s/-I::include/-i ::include:/g
|
||||||
|
/-I/s/-I/-i /g
|
||||||
|
|
||||||
|
# Change -D usage.
|
||||||
|
/-D/s/\([ =]\)-D\([^ ]*\)/\1-d \2/g
|
||||||
|
|
||||||
|
# Change continuation char.
|
||||||
|
/\\$/s/\\$/\\Option-d/
|
||||||
|
|
||||||
|
# Change wildcard char.
|
||||||
|
/\*/s/\*/\\Option-x/g
|
||||||
|
|
||||||
|
# Change path of various types of source files. This rule does not allow
|
||||||
|
# for file names with multiple dots in the name.
|
||||||
|
/\.[chly]/s/\([ ><=]\)\([-a-zA-Z0-9_${}:"]*\)\.\([chly]\)/\1"{s}"\2.\3/g
|
||||||
|
/\.[chly]/s/^\([-a-zA-Z0-9_${}:"]*\)\.\([chly]\)/"{s}"\1.\2/
|
||||||
|
# Allow files named *.tab.[ch] as a special case.
|
||||||
|
/\.tab\.[ch]/s/\([ ><=]\)\([-a-zA-Z0-9_${}:"]*\.tab\)\.\([ch]\)/\1"{s}"\2.\3/g
|
||||||
|
/\.tab\.[ch]/s/^\([-a-zA-Z0-9_${}:"]*\.tab\)\.\([ch]\)/"{s}"\1.\2/
|
||||||
|
# Fix some overenthusiasms.
|
||||||
|
/{s}/s/"{s}""{srcdir}"/"{srcdir}"/g
|
||||||
|
/{s}/s/"{s}"{\([a-zA-Z0-9_]*\)dir}/"{\1dir}"/g
|
||||||
|
/{s}/s/"{s}"{\([a-zA-Z0-9_]*\)DIR}/"{\1DIR}"/g
|
||||||
|
/{s}/s/"{s}""{\([a-zA-Z0-9_]*\)dir}"/"{\1dir}"/g
|
||||||
|
/{s}/s/"{s}""{\([a-zA-Z0-9_]*\)DIR}"/"{\1DIR}"/g
|
||||||
|
/{s}/s/"{s}":/:/g
|
||||||
|
/{s}/s/^"{s}"//g
|
||||||
|
/{s}/s/"{s}""{s}"/"{s}"/g
|
||||||
|
/{s}/s/"{s}""{srcdir}"/"{s}"/g
|
||||||
|
/{s}/s/"{srcdir}""{s}"/"{s}"/g
|
||||||
|
|
||||||
|
# The .def files are also typically source files.
|
||||||
|
/\.def/s/\([ ><]\)\([-a-zA-Z0-9_${}:"]*\)\.def/\1"{s}"\2.def/g
|
||||||
|
/\.def/s/^\([-a-zA-Z0-9_${}:"]*\)\.def/"{s}"\1.def/g
|
||||||
|
|
||||||
|
# Change extension and path of objects.
|
||||||
|
/\.o/s/\([ =]\)\([-a-zA-Z0-9_${}:"]*\)\.o/\1"{o}"\2.c.o/g
|
||||||
|
/\.o/s/^\([-a-zA-Z0-9_${}:"]*\)\.o/"{o}"\1.c.o/
|
||||||
|
# Allow *.tab.o files as a special case of a 2-dot-name file.
|
||||||
|
/\.o/s/\([ =]\)\([-a-zA-Z0-9_${}:"]*\)\.tab\.o/\1"{o}"\2.tab.c.o/g
|
||||||
|
/\.o/s/^\([-a-zA-Z0-9_${}:"]*\)\.tab\.o/"{o}"\1.tab.c.o/
|
||||||
|
# Clean up.
|
||||||
|
/"{o}"/s/"{o}""{o}"/"{o}"/g
|
||||||
|
/"{o}"/s/^"{o}"\([a-zA-Z0-9_]*\)=/\1=/
|
||||||
|
|
||||||
|
# Change extension of libs.
|
||||||
|
/\.a/s/lib\([a-z]*\)\.a/lib\1.o/g
|
||||||
|
|
||||||
|
# Remove non-fail option.
|
||||||
|
/-/s/^\([ ]*\)-/\1/
|
||||||
|
# Fix overeagernesses - assumes no one-letter commands.
|
||||||
|
/^[ ]*[a-z] /s/^\([ ]*\)\([a-z]\) /\1-\2 /
|
||||||
|
|
||||||
|
# Remove non-echo option. (watch out for autoconf things)
|
||||||
|
/@/s/^\([ ]*\)@/\1/
|
||||||
|
|
||||||
|
# Change cp to Duplicate.
|
||||||
|
# Catenate is perhaps more accurate, but the pattern would have to
|
||||||
|
# identify the output file and add a '>' redirection into it.
|
||||||
|
/cp/s/^\([ ]*\)cp /\1Duplicate -d -y /
|
||||||
|
# Change mv to Rename.
|
||||||
|
/mv/s/^\([ ]*\)mv /\1Rename -y /
|
||||||
|
/Rename/s/^\([ ]*\)Rename -y -f/\1Rename -y/
|
||||||
|
# Change rm to Delete.
|
||||||
|
/rm -rf/s/^\([ ]*\)rm -rf /\1Delete -i -y /
|
||||||
|
/rm -f/s/^\([ ]*\)rm -f /\1Delete -i -y /
|
||||||
|
/rm/s/^\([ ]*\)rm /\1Delete -i -y /
|
||||||
|
# Note that we don't mess with ln - directory-specific scripts
|
||||||
|
# must decide what to do with symlinks.
|
||||||
|
# Change cat to Catenate.
|
||||||
|
/cat/s/^\([ ]*\)cat /\1Catenate /
|
||||||
|
# Change touch to mpw-touch.
|
||||||
|
/touch/s/^\([ ]*\)touch /\1mpw-touch /
|
||||||
|
# Change mkdir to NewFolder.
|
||||||
|
/mkdir/s/^\([ ]*\)mkdir /\1NewFolder /
|
||||||
|
# Change var setting to Set.
|
||||||
|
/=/s/^\([ ]*\)\([-a-zA-Z0-9_]*\)=\([^;]*\); \\Option-d/\1Set \2 \3/
|
||||||
|
|
||||||
|
# Change tests.
|
||||||
|
/if /s/if \[ *-f \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" != ""/
|
||||||
|
/if /s/if \[ *-f \([^ ]*\) ] *; *then *\\Option-d/If "`Exists "\1"`" != ""/
|
||||||
|
/if /s/if \[ ! *-f \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" == ""/
|
||||||
|
/if /s/if \[ ! *-f \([^ ]*\) ] *; *then \\Option-d/If "`Exists "\1"`" == ""/
|
||||||
|
|
||||||
|
/if /s/if \[ *-d \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" != ""/
|
||||||
|
/if /s/if \[ *-d \([^ ]*\) ] *; *then *\\Option-d/If "`Exists "\1"`" != ""/
|
||||||
|
/if /s/if \[ ! *-d \([^ ]*\) ] *; *\\Option-d/If "`Exists "\1"`" == ""/
|
||||||
|
/if /s/if \[ ! *-d \([^ ]*\) ] *; *then *\\Option-d/If "`Exists "\1"`" == ""/
|
||||||
|
|
||||||
|
/if /s/if \[ -d \([^ ]*\) ] *; then true *; else mkdir \([^ ;]*\) *; fi/If "`Exists "\1"`" != "" NewFolder \2 End If/
|
||||||
|
|
||||||
|
/if /s/if \[ \([^ ]*\) = \([^ ]*\) ] *; *\\Option-d/If "\1" == "\2"/
|
||||||
|
/if /s/if \[ \([^ ]*\) = \([^ ]*\) ] *; *then *\\Option-d/If "\1" == "\2"/
|
||||||
|
|
||||||
|
/if /s/if \[ \([^ ]*\) != \([^ ]*\) ] *; *\\Option-d/If "\1" != "\2"/
|
||||||
|
/if /s/if \[ \([^ ]*\) != \([^ ]*\) ] *; *then *\\Option-d/If "\1" != "\2"/
|
||||||
|
|
||||||
|
/if /s/if \[ \([^ ]*\) -eq \([^ ]*\) ] *; *\\Option-d/If "\1" != "\2"/
|
||||||
|
/if /s/if \[ \([^ ]*\) -eq \([^ ]*\) ] *; *then *\\Option-d/If "\1" != "\2"/
|
||||||
|
|
||||||
|
/^[ ]*else true$/c\
|
||||||
|
Else\
|
||||||
|
mpw-true\
|
||||||
|
|
||||||
|
|
||||||
|
/else/s/^\([ ]*\)else[ ]*$/\1Else/
|
||||||
|
/else/s/^\([ ]*\)else[; ]*\\Option-d$/\1Else/
|
||||||
|
|
||||||
|
/^[ ]*else[ ]*true[ ]*$/c\
|
||||||
|
Else\
|
||||||
|
mpw-true
|
||||||
|
|
||||||
|
/^[ ]*else[ ]*true[; ]*fi$/c\
|
||||||
|
Else\
|
||||||
|
mpw-true\
|
||||||
|
End If
|
||||||
|
|
||||||
|
/fi/s/^\([ ]*\)fi *$/\1End/
|
||||||
|
/fi/s/^\([ ]*\)fi *; *\\Option-d/\1End/
|
||||||
|
|
||||||
|
# Change looping.
|
||||||
|
/for/s/^\([ ]*\)for \([-a-zA-Z0-9_]*\) in \([^;]*\); *do *\\Option-d/\1For \2 In \3/
|
||||||
|
/^\([ ]*\)do *\\Option-d/d
|
||||||
|
/done/s/^\([ ]*\)done *; *\\Option-d/\1End/
|
||||||
|
/done/s/^\([ ]*\)done$/\1End/
|
||||||
|
|
||||||
|
# Trailing semicolons and continued lines are unneeded sh syntax.
|
||||||
|
/; \\Option-d/s/; \\Option-d//
|
||||||
|
|
||||||
|
# Change move-if-change to MoveIfChange.
|
||||||
|
/move-if-change/s/\([^ ]*\)move-if-change/MoveIfChange/g
|
||||||
|
|
||||||
|
# Change $(SHELL) to the script name by itself.
|
||||||
|
/SHELL/s/^\([ ]*\){SHELL} /\1/
|
||||||
|
|
||||||
|
# Change syntax of default rule dependency.
|
||||||
|
/^\.c\.o/s/^\.c\.o \\Option-f$/.c.o \\Option-f .c/
|
||||||
|
|
||||||
|
# Change default rule's action.
|
||||||
|
/{CC} -c/s/{CC} -c \(.*\) \$<$/{CC} @DASH_C_FLAG@ {DepDir}{Default}.c \1 @SEGMENT_FLAG({Default})@ -o {TargDir}{Default}.c.o/
|
||||||
|
|
||||||
|
# This is pretty disgusting, but I can't seem to detect empty rules.
|
||||||
|
/Option-f$/s/Option-f$/Option-f _oldest/g
|
||||||
|
|
||||||
|
# Remove -c from explicit compiler calls. (but should not if GCC)
|
||||||
|
# Handle the case of a source file that is "{xxx}"file.c.
|
||||||
|
/ -c /s/{\([A-Z_]*\)CC}\(.*\) -c \(.*\)"\([^"]*\)"\([-a-z_]*\)\.c/{\1CC}\2 @DASH_C_FLAG@ \3"\4"\5.c -o "{o}"\5.c.o/
|
||||||
|
# Handle the case of a source file that is "{xxx}"dir:file.c.
|
||||||
|
/ -c /s/{\([A-Z_]*\)CC}\(.*\) -c \(.*\)"\([^"]*\)"\([-a-z_]*\):\([-a-z_]*\)\.c/{\1CC}\2 @DASH_C_FLAG@ \3"\4"\5:\6.c -o "{o}"\6.c.o/
|
||||||
|
|
||||||
|
# Change linking cc to linking sequence.
|
||||||
|
/-o/s/^\([ ]*\){CC} \(.*\){\([A-Z_]*\)CFLAGS} \(.*\){LDFLAGS} \(.*\)-o \([^ ]*\) \(.*\)$/\1{CC_LD} \2 {\3CFLAGS} \4 {LDFLAGS} \5 -o \6{PROG_EXT} \7\
|
||||||
|
\1{MAKEPEF} \6{PROG_EXT} -o \6 {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\
|
||||||
|
\1{REZ} "{s}"\6.r -o \6 -append -d PROG_NAME='"'\6'"' -d VERSION_STRING='"'{version}'"'/
|
||||||
|
/-o/s/^\([ ]*\){CC} \(.*\){\([A-Z_]*\)CFLAGS} \(.*\)-o \([^ ]*\) \(.*\){LDFLAGS} \(.*\)$/\1{CC_LD} \2 {\3CFLAGS} \4 {LDFLAGS} \6 -o \5{PROG_EXT} \7\
|
||||||
|
\1{MAKEPEF} \5{PROG_EXT} -o \5 {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\
|
||||||
|
\1{REZ} "{s}"\5.r -o \5 -append -d PROG_NAME='"'\5'"' -d VERSION_STRING='"'{version}'"'/
|
||||||
|
/-o/s/^\([ ]*\){HOST_CC} \(.*\)-o \([^ ]*\) \(.*\)$/\1{HOST_CC_LD} \2 -o \3{PROG_EXT} \4\
|
||||||
|
\1{MAKEPEF} \3{PROG_EXT} -o \3 {MAKEPEF_TOOL_FLAGS} {MAKEPEF_FLAGS}\
|
||||||
|
\1{REZ} "{s}"\3.r -o \3 -append -d PROG_NAME='"'\3'"' -d VERSION_STRING='"'{version}'"'/
|
||||||
|
|
||||||
|
# Comment out .NOEXPORT rules.
|
||||||
|
/\.NOEXPORT/s/^\.NOEXPORT/#\.NOEXPORT/
|
||||||
|
# Comment out .PHONY rules.
|
||||||
|
/\.PHONY/s/^\.PHONY/#\.PHONY/
|
||||||
|
# Comment out .PRECIOUS rules.
|
||||||
|
/\.PRECIOUS/s/^\.PRECIOUS/#\.PRECIOUS/
|
||||||
|
# Comment out .SUFFIXES rules.
|
||||||
|
/\.SUFFIXES/s/^\.SUFFIXES/#\.SUFFIXES/
|
||||||
|
|
||||||
|
# Set the install program appropriately.
|
||||||
|
/INSTALL/s/^INSTALL *= *`.*`:install.sh -c/INSTALL = Duplicate -y/
|
||||||
|
|
||||||
|
# Don't try to decide whether to use the tree's own tools.
|
||||||
|
/bison/s/`.*bison:bison.*`/bison -y/
|
||||||
|
/byacc/s/`.*byacc:byacc.*`/byacc/
|
||||||
|
/flex/s/`.*flex:flex.*`/flex/
|
||||||
|
|
||||||
|
# Turn transformed C comments in echo commands back into comments.
|
||||||
|
/echo/s,echo '\(.*\):\\Option-x\(.*\)\\Option-x:\(.*\)',echo '\1/*\2*/\3',
|
||||||
|
|
||||||
|
# Whack out various clever expressions that search for tools, since
|
||||||
|
# the clever code is too /bin/sh specific.
|
||||||
|
|
||||||
|
/^AR_FOR_TARGET = `/,/`$/c\
|
||||||
|
AR_FOR_TARGET = ::binutils:ar\
|
||||||
|
|
||||||
|
|
||||||
|
/^RANLIB_FOR_TARGET = `/,/`$/c\
|
||||||
|
RANLIB_FOR_TARGET = ::binutils:ranlib\
|
||||||
|
|
||||||
|
|
||||||
|
/^RANLIB_TEST_FOR_TARGET = /,/ranlib ] )$/c\
|
||||||
|
RANLIB_TEST_FOR_TARGET = \
|
||||||
|
|
||||||
|
|
||||||
|
/^EXPECT = `/,/`$/c\
|
||||||
|
EXPECT = \
|
||||||
|
|
||||||
|
|
||||||
|
/^RUNTEST = `/,/`$/c\
|
||||||
|
RUNTEST = \
|
||||||
|
|
||||||
|
|
||||||
|
/^CC_FOR_TARGET = `/,/`$/c\
|
||||||
|
CC_FOR_TARGET = \
|
||||||
|
|
||||||
|
|
||||||
|
/^CXX_FOR_TARGET = `/,/`$/c\
|
||||||
|
CXX_FOR_TARGET = \
|
||||||
|
|
||||||
|
|
||||||
|
/^CHILL_FOR_TARGET = `/,/`$/c\
|
||||||
|
CHILL_FOR_TARGET = \
|
||||||
|
|
||||||
|
|
||||||
|
/^CHILL_LIB = `/,/`$/c\
|
||||||
|
CHILL_LIB = \
|
||||||
|
|
||||||
|
/sanit/s/{start-sanit...-[a-z0-9]*}//
|
||||||
|
/sanit/s/{end-sanit...-[a-z0-9]*}//
|
||||||
|
|
||||||
|
# Add standard defines and default rules.
|
||||||
|
/^# srcdir/a\
|
||||||
|
\
|
||||||
|
s = "{srcdir}"\
|
||||||
|
\
|
||||||
|
o = :\
|
||||||
|
\
|
||||||
|
"{o}" \\Option-f : "{s}"
|
||||||
|
|
7
config/mpw/mpw-touch
Normal file
7
config/mpw/mpw-touch
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# "Touch" command.
|
||||||
|
|
||||||
|
If "`Exists "{1}"`" != ""
|
||||||
|
SetFile -m . "{1}"
|
||||||
|
Else
|
||||||
|
Echo ' ' > "{1}"
|
||||||
|
End If
|
1
config/mpw/mpw-true
Normal file
1
config/mpw/mpw-true
Normal file
@ -0,0 +1 @@
|
|||||||
|
Exit 0
|
1
config/mpw/null-command
Normal file
1
config/mpw/null-command
Normal file
@ -0,0 +1 @@
|
|||||||
|
# This command does nothing.
|
4
config/mpw/open-brace
Normal file
4
config/mpw/open-brace
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# MPW makefiles seem not to have any way to get a literal open
|
||||||
|
# brace into a rule anywhere, so this does the job.
|
||||||
|
|
||||||
|
Echo '{'
|
9
config/mpw/tr-7to8-src
Normal file
9
config/mpw/tr-7to8-src
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
StreamEdit -e \Option-d
|
||||||
|
'/\Option-x/ \Option-d
|
||||||
|
Replace /\Option-d\SrcOption-d/ "\Option-d\Option-d" -c \Option-5 ; \Option-d
|
||||||
|
Replace /\Option-d\SrcOption-f/ "\Option-d\Option-f" -c \Option-5 ; \Option-d
|
||||||
|
Replace /\Option-d\SrcOption-8/ "\Option-d\Option-8" -c \Option-5 ; \Option-d
|
||||||
|
Replace /\Option-d\SrcOption-5/ "\Option-d\Option-5" -c \Option-5 ; \Option-d
|
||||||
|
Replace /\Option-d\SrcOption-x/ "\Option-d\Option-x" -c \Option-5 ; \Option-d
|
||||||
|
Replace /\Option-d\SrcOption-r/ "\Option-d\Option-r" -c \Option-5' \Option-d
|
||||||
|
"{1}"
|
1
config/mpw/true
Normal file
1
config/mpw/true
Normal file
@ -0,0 +1 @@
|
|||||||
|
Exit 0
|
1
config/mt-m68kpic
Normal file
1
config/mt-m68kpic
Normal file
@ -0,0 +1 @@
|
|||||||
|
PICFLAG_FOR_TARGET=-fpic
|
1
config/mt-netware
Normal file
1
config/mt-netware
Normal file
@ -0,0 +1 @@
|
|||||||
|
GDB_NLM_DEPS = all-gcc all-ld
|
1
config/mt-papic
Normal file
1
config/mt-papic
Normal file
@ -0,0 +1 @@
|
|||||||
|
PICFLAG_FOR_TARGET=-fPIC
|
1
config/mt-ppcpic
Normal file
1
config/mt-ppcpic
Normal file
@ -0,0 +1 @@
|
|||||||
|
PICFLAG_FOR_TARGET=-fPIC
|
1
config/mt-sparcpic
Normal file
1
config/mt-sparcpic
Normal file
@ -0,0 +1 @@
|
|||||||
|
PICFLAG_FOR_TARGET=-fPIC
|
4
config/mt-v810
Normal file
4
config/mt-v810
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
CC_FOR_TARGET = ca732 -ansi
|
||||||
|
AS_FOR_TARGET = as732
|
||||||
|
AR_FOR_TARGET = ar732
|
||||||
|
RANLIB_FOR_TARGET = true
|
1
config/mt-x86pic
Normal file
1
config/mt-x86pic
Normal file
@ -0,0 +1 @@
|
|||||||
|
PICFLAG_FOR_TARGET=-fpic
|
874
configure.in
Normal file
874
configure.in
Normal file
@ -0,0 +1,874 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
## This file is a shell script fragment that supplies the information
|
||||||
|
## necessary to tailor a template configure script into the configure
|
||||||
|
## script appropriate for this directory. For more information, check
|
||||||
|
## any existing configure script.
|
||||||
|
|
||||||
|
## Be warned, there are two types of configure.in files. There are those
|
||||||
|
## used by Autoconf, which are macros which are expanded into a configure
|
||||||
|
## script by autoconf. The other sort, of which this is one, is executed
|
||||||
|
## by Cygnus configure.
|
||||||
|
|
||||||
|
## For more information on these two systems, check out the documentation
|
||||||
|
## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi).
|
||||||
|
|
||||||
|
# Copyright (C) 1992, 93, 94, 95, 96, 1997 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.
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
### To add a new directory to the tree, first choose whether it is a target
|
||||||
|
### or a host dependent tool. Then put it into the appropriate list
|
||||||
|
### (library or tools, host or target), doing a dependency sort. For
|
||||||
|
### example, gdb requires that byacc (or bison) be built first, so it is in
|
||||||
|
### the ${host_tools} list after byacc and bison.
|
||||||
|
|
||||||
|
|
||||||
|
# these libraries are used by various programs built for the host environment
|
||||||
|
#
|
||||||
|
host_libs="mmalloc libiberty opcodes bfd readline gash db tcl tk tclX itcl tix"
|
||||||
|
|
||||||
|
if [ "${enable_gdbgui}" = "yes" ] ; then
|
||||||
|
host_libs="${host_libs} libgui"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# these tools are built for the host environment
|
||||||
|
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
|
||||||
|
# know that we are building the simulator.
|
||||||
|
host_tools="texinfo byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu bash m4 autoconf automake ispell grep diff rcs cvs fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils sn"
|
||||||
|
|
||||||
|
# these libraries are built for the target environment, and are built after
|
||||||
|
# the host libraries and the host tools (which may be a cross compiler)
|
||||||
|
#
|
||||||
|
target_libs="target-libiberty target-libgloss target-newlib target-libio target-librx target-libstdc++ target-libg++"
|
||||||
|
|
||||||
|
|
||||||
|
# these tools are built using the target libs, and are intended to run only
|
||||||
|
# in the target environment
|
||||||
|
#
|
||||||
|
# note: any program that *uses* libraries that are in the "target_libs"
|
||||||
|
# list belongs in this list. those programs are also very likely
|
||||||
|
# candidates for the "native_only" list which follows
|
||||||
|
#
|
||||||
|
target_tools="target-examples target-groff target-gperf"
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
## These two lists are of directories that are to be removed from the
|
||||||
|
## ${configdirs} list for either cross-compilations or for native-
|
||||||
|
## compilations. For example, it doesn't make that much sense to
|
||||||
|
## cross-compile Emacs, nor is it terribly useful to compile target-libiberty in
|
||||||
|
## a native environment.
|
||||||
|
|
||||||
|
# directories to be built in the native environment only
|
||||||
|
#
|
||||||
|
# This must be a single line because of the way it is searched by grep in
|
||||||
|
# the code below.
|
||||||
|
native_only="autoconf automake cvs emacs emacs19 fileutils find gawk grep gzip hello indent ispell m4 rcs recode sed shellutils tar textutils gash uudecode wdiff gprof target-groff guile perl apache inet time bash prms sn gnuserv target-gperf"
|
||||||
|
|
||||||
|
# directories to be built in a cross environment only
|
||||||
|
#
|
||||||
|
cross_only="target-libgloss target-newlib"
|
||||||
|
|
||||||
|
## All tools belong in one of the four categories, and are assigned above
|
||||||
|
## We assign ${configdirs} this way to remove all embedded newlines. This
|
||||||
|
## is important because configure will choke if they ever get through.
|
||||||
|
## ${configdirs} is directories we build using the host tools.
|
||||||
|
## ${target_configdirs} is directories we build using the target tools.
|
||||||
|
#
|
||||||
|
configdirs=`echo ${host_libs} ${host_tools}`
|
||||||
|
target_configdirs=`echo ${target_libs} ${target_tools}`
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
srctrigger=move-if-change
|
||||||
|
srcname="gnu development package"
|
||||||
|
|
||||||
|
# This gets set non-empty for some net releases of packages.
|
||||||
|
appdirs=""
|
||||||
|
|
||||||
|
# per-host:
|
||||||
|
|
||||||
|
# Work in distributions that contain no compiler tools, like Autoconf.
|
||||||
|
if [ -d ${srcdir}/config ]; then
|
||||||
|
case "${host}" in
|
||||||
|
m68k-hp-hpux*) host_makefile_frag=config/mh-hp300 ;;
|
||||||
|
m68k-apollo-sysv*) host_makefile_frag=config/mh-apollo68 ;;
|
||||||
|
m68k-apollo-bsd*) host_makefile_frag=config/mh-a68bsd ;;
|
||||||
|
m88k-dg-dgux*) host_makefile_frag=config/mh-dgux ;;
|
||||||
|
m88k-harris-cxux*) host_makefile_frag=config/mh-cxux ;;
|
||||||
|
m88k-motorola-sysv*) host_makefile_frag=config/mh-delta88;;
|
||||||
|
mips*-dec-ultrix*) host_makefile_frag=config/mh-decstation ;;
|
||||||
|
mips*-nec-sysv4*) host_makefile_frag=config/mh-necv4 ;;
|
||||||
|
mips*-sgi-irix6*) host_makefile_frag=config/mh-irix6 ;;
|
||||||
|
mips*-sgi-irix5*) host_makefile_frag=config/mh-irix5 ;;
|
||||||
|
mips*-sgi-irix4*) host_makefile_frag=config/mh-irix4 ;;
|
||||||
|
mips*-sgi-irix3*) host_makefile_frag=config/mh-sysv ;;
|
||||||
|
mips*-*-sysv4*) host_makefile_frag=config/mh-sysv4 ;;
|
||||||
|
mips*-*-sysv*) host_makefile_frag=config/mh-riscos ;;
|
||||||
|
i[3456]86-*-dgux*) host_makefile_frag=config/mh-dgux386 ;;
|
||||||
|
i[3456]86-ncr-sysv4.3) host_makefile_frag=config/mh-ncrsvr43 ;;
|
||||||
|
i[3456]86-ncr-sysv4*) host_makefile_frag=config/mh-ncr3000 ;;
|
||||||
|
i[3456]86-*-sco3.2v5*) host_makefile_frag=config/mh-sysv ;;
|
||||||
|
i[3456]86-*-sco*) host_makefile_frag=config/mh-sco ;;
|
||||||
|
i[3456]86-*-isc*) host_makefile_frag=config/mh-sysv ;;
|
||||||
|
i[3456]86-*-solaris2*) host_makefile_frag=config/mh-sysv4 ;;
|
||||||
|
i[3456]86-*-aix*) host_makefile_frag=config/mh-aix386 ;;
|
||||||
|
i[3456]86-*-go32*) host_makefile_frag=config/mh-go32 ;;
|
||||||
|
i[3456]86-*-msdosdjgpp*) host_makefile_frag=config/mh-go32 ;;
|
||||||
|
*-cygwin32*) host_makefile_frag=config/mh-cygwin32 ;;
|
||||||
|
*-windows*) host_makefile_frag=config/mh-windows ;;
|
||||||
|
vax-*-ultrix2*) host_makefile_frag=config/mh-vaxult2 ;;
|
||||||
|
*-*-solaris2*) host_makefile_frag=config/mh-solaris ;;
|
||||||
|
m68k-sun-sunos*) host_makefile_frag=config/mh-sun3 ;;
|
||||||
|
*-hp-hpux[78]*) host_makefile_frag=config/mh-hpux8 ;;
|
||||||
|
*-hp-hpux*) host_makefile_frag=config/mh-hpux ;;
|
||||||
|
*-*-hiux*) host_makefile_frag=config/mh-hpux ;;
|
||||||
|
rs6000-*-lynxos*) host_makefile_frag=config/mh-lynxrs6k ;;
|
||||||
|
*-*-lynxos*) host_makefile_frag=config/mh-lynxos ;;
|
||||||
|
*-*-sysv4*) host_makefile_frag=config/mh-sysv4 ;;
|
||||||
|
*-*-sysv*) host_makefile_frag=config/mh-sysv ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If we aren't going to be using gcc, see if we can extract a definition
|
||||||
|
# of CC from the fragment.
|
||||||
|
if [ -z "${CC}" -a "${build}" = "${host}" ]; then
|
||||||
|
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
|
||||||
|
found=
|
||||||
|
for dir in $PATH; do
|
||||||
|
test -z "$dir" && dir=.
|
||||||
|
if test -f $dir/gcc; then
|
||||||
|
found=yes
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$save_ifs"
|
||||||
|
if [ -z "${found}" -a -n "${host_makefile_frag}" -a -f "${srcdir}/${host_makefile_frag}" ]; then
|
||||||
|
xx=`sed -n -e 's/^[ ]*CC[ ]*=[ ]*\(.*\)$/\1/p' < ${srcdir}/${host_makefile_frag}`
|
||||||
|
if [ -n "${xx}" ] ; then
|
||||||
|
CC=$xx
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We default to --with-shared on platforms where -fpic is meaningless.
|
||||||
|
# Well, we don't yet, but we will.
|
||||||
|
if false && [ "${host}" = "${target}" ] && [ x${enable_shared} = x ]; then
|
||||||
|
case "${target}" in
|
||||||
|
alpha-dec-osf*) enable_shared=yes ;;
|
||||||
|
alpha-*-linux*) enable_shared=yes ;;
|
||||||
|
mips-sgi-irix5*) enable_shared=yes ;;
|
||||||
|
*) enable_shared=no ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "${enable_shared}" in
|
||||||
|
yes) shared=yes ;;
|
||||||
|
no) shared=no ;;
|
||||||
|
"") shared=no ;;
|
||||||
|
*) shared=yes ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ x${shared} = xyes ]; then
|
||||||
|
waugh=
|
||||||
|
case "${host}" in
|
||||||
|
hppa*) waugh=config/mh-papic ;;
|
||||||
|
i[3456]86-*) waugh=config/mh-x86pic ;;
|
||||||
|
sparc64-*) waugh=config/mh-sparcpic ;;
|
||||||
|
powerpc*-*) waugh=config/mh-ppcpic ;;
|
||||||
|
*) waugh=config/mh-${host_cpu}pic ;;
|
||||||
|
esac
|
||||||
|
if [ -f ${srcdir}/${waugh} ]; then
|
||||||
|
if [ -n "${host_makefile_frag}" ] ; then
|
||||||
|
cat ${srcdir}/${host_makefile_frag} > mh-frag
|
||||||
|
cat ${srcdir}/${waugh} >> mh-frag
|
||||||
|
host_makefile_frag=mh-frag
|
||||||
|
else
|
||||||
|
host_makefile_frag=${waugh}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# per-target:
|
||||||
|
|
||||||
|
case "${target}" in
|
||||||
|
v810*) target_makefile_frag=config/mt-v810 ;;
|
||||||
|
i[3456]86-*-netware*) target_makefile_frag=config/mt-netware ;;
|
||||||
|
powerpc-*-netware*) target_makefile_frag=config/mt-netware ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
skipdirs=
|
||||||
|
gasdir=gas
|
||||||
|
use_gnu_ld=
|
||||||
|
use_gnu_as=
|
||||||
|
|
||||||
|
# some tools are so dependent upon X11 that if we're not building with X,
|
||||||
|
# it's not even worth trying to configure, much less build, that tool.
|
||||||
|
|
||||||
|
case ${with_x} in
|
||||||
|
yes | "") # the default value for this tree is that X11 is available
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
skipdirs="${skipdirs} tk gash"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Some tools are only suitable for building in a "native" situation.
|
||||||
|
# Those are added when we have a host==target configuration. For cross
|
||||||
|
# toolchains, we add some directories that should only be useful in a
|
||||||
|
# cross-compiler.
|
||||||
|
|
||||||
|
is_cross_compiler=
|
||||||
|
|
||||||
|
if [ x"${host}" = x"${target}" ] ; then
|
||||||
|
# when doing a native toolchain, don't build the targets
|
||||||
|
# that are in the 'cross only' list
|
||||||
|
skipdirs="${skipdirs} ${cross_only}"
|
||||||
|
is_cross_compiler=no
|
||||||
|
target_subdir=.
|
||||||
|
case "${host}" in
|
||||||
|
# We need multilib support for irix6, to get libiberty built
|
||||||
|
# properly for o32 and n32.
|
||||||
|
mips-sgi-irix6*) target_subdir=${host} ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
# similarly, don't build the targets in the 'native only'
|
||||||
|
# list when building a cross compiler
|
||||||
|
skipdirs="${skipdirs} ${native_only}"
|
||||||
|
is_cross_compiler=yes
|
||||||
|
target_subdir=${target_alias}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d ${target_subdir} ] ; then
|
||||||
|
if mkdir ${target_subdir} ; then true
|
||||||
|
else
|
||||||
|
echo "'*** could not make ${PWD=`pwd`}/${target_subdir}" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
copy_dirs=
|
||||||
|
|
||||||
|
# Handle --with-headers=XXX. The contents of the named directory are
|
||||||
|
# copied to $(tooldir)/sys-include.
|
||||||
|
if [ x"${with_headers}" != x ]; then
|
||||||
|
if [ x${is_cross_compiler} = xno ]; then
|
||||||
|
echo 1>&2 '***' --with-headers is only supported when cross compiling
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
case "${exec_prefixoption}" in
|
||||||
|
"") x=${prefix} ;;
|
||||||
|
*) x=${exec_prefix} ;;
|
||||||
|
esac
|
||||||
|
copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Handle --with-libs=XXX. Multiple directories are permitted. The
|
||||||
|
# contents are copied to $(tooldir)/lib.
|
||||||
|
if [ x"${with_libs}" != x ]; then
|
||||||
|
if [ x${is_cross_compiler} = xno ]; then
|
||||||
|
echo 1>&2 '***' --with-libs is only supported when cross compiling
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# Copy the libraries in reverse order, so that files in the first named
|
||||||
|
# library override files in subsequent libraries.
|
||||||
|
case "${exec_prefixoption}" in
|
||||||
|
"") x=${prefix} ;;
|
||||||
|
*) x=${exec_prefix} ;;
|
||||||
|
esac
|
||||||
|
for l in ${with_libs}; do
|
||||||
|
copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If both --with-headers and --with-libs are specified, default to
|
||||||
|
# --without-newlib.
|
||||||
|
if [ x"${with_headers}" != x ] && [ x"${with_libs}" != x ]; then
|
||||||
|
if [ x"${with_newlib}" = x ]; then
|
||||||
|
with_newlib=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Recognize --with-newlib/--without-newlib.
|
||||||
|
if [ x${with_newlib} = xno ]; then
|
||||||
|
skipdirs="${skipdirs} target-newlib"
|
||||||
|
elif [ x${with_newlib} = xyes ]; then
|
||||||
|
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Default to using --with-stabs for certain targets.
|
||||||
|
if [ x${with_stabs} = x ]; then
|
||||||
|
case "${target}" in
|
||||||
|
mips*-*-irix6*)
|
||||||
|
;;
|
||||||
|
mips*-*-* | alpha*-*-osf* | i[3456]86*-*-sysv4* | i[3456]86*-*-unixware*)
|
||||||
|
with_stabs=yes;
|
||||||
|
withoptions="${withoptions} --with-stabs"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Handle ${copy_dirs}
|
||||||
|
set fnord ${copy_dirs}
|
||||||
|
shift
|
||||||
|
while [ $# != 0 ]; do
|
||||||
|
if [ -f $2/COPIED ] && [ x"`cat $2/COPIED`" = x"$1" ]; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo Copying $1 to $2
|
||||||
|
|
||||||
|
# Use the install script to create the directory and all required
|
||||||
|
# parent directories.
|
||||||
|
if [ -d $2 ]; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo >config.temp
|
||||||
|
${srcdir}/install-sh -c -m 644 config.temp $2/COPIED
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy the directory, assuming we have tar.
|
||||||
|
# FIXME: Should we use B in the second tar? Not all systems support it.
|
||||||
|
(cd $1; tar -cf - .) | (cd $2; tar -xpf -)
|
||||||
|
|
||||||
|
# It is the responsibility of the user to correctly adjust all
|
||||||
|
# symlinks. If somebody can figure out how to handle them correctly
|
||||||
|
# here, feel free to add the code.
|
||||||
|
|
||||||
|
echo $1 > $2/COPIED
|
||||||
|
fi
|
||||||
|
shift; shift
|
||||||
|
done
|
||||||
|
|
||||||
|
# Configure extra directories which are host specific
|
||||||
|
|
||||||
|
case "${host}" in
|
||||||
|
i[3456]86-*-go32*)
|
||||||
|
configdirs="$configdirs dosrel" ;;
|
||||||
|
*-cygwin32*)
|
||||||
|
configdirs="$configdirs dosrel" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Remove more programs from consideration, based on the host or
|
||||||
|
# target this usually means that a port of the program doesn't
|
||||||
|
# exist yet.
|
||||||
|
|
||||||
|
noconfigdirs=""
|
||||||
|
|
||||||
|
case "${host}" in
|
||||||
|
i[3456]86-*-vsta)
|
||||||
|
noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl apache inet itcl tix db sn gnuserv"
|
||||||
|
;;
|
||||||
|
i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*)
|
||||||
|
noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db sn gnuserv"
|
||||||
|
;;
|
||||||
|
*-*-cygwin32)
|
||||||
|
noconfigdirs="expect dejagnu cvs autoconf automake bison send-pr gprof rcs guile perl texinfo apache inet"
|
||||||
|
;;
|
||||||
|
*-*-windows*)
|
||||||
|
# This is only used to build WinGDB...
|
||||||
|
# note that powerpc-eabi depends on sim configured before gdb.
|
||||||
|
configdirs="bfd libiberty opcodes readline sim gdb"
|
||||||
|
target_configdirs=
|
||||||
|
;;
|
||||||
|
ppc*-*-pe)
|
||||||
|
noconfigdirs="patch diff make tk tcl expect dejagnu cvs autoconf automake texinfo bison send-pr gprof rcs guile perl apache inet itcl tix db sn gnuserv"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
case "${target}" in
|
||||||
|
*-*-netware)
|
||||||
|
noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-librx target-newlib target-libiberty target-libgloss"
|
||||||
|
;;
|
||||||
|
*-*-vxworks*)
|
||||||
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
||||||
|
;;
|
||||||
|
alpha-dec-osf*)
|
||||||
|
# ld works, but does not support shared libraries. emacs doesn't
|
||||||
|
# work. newlib is not 64 bit ready. I'm not sure about fileutils.
|
||||||
|
# gas doesn't generate exception information.
|
||||||
|
noconfigdirs="$noconfigdirs gas ld emacs fileutils target-newlib target-libgloss"
|
||||||
|
;;
|
||||||
|
alpha*-*-*vms*)
|
||||||
|
noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss"
|
||||||
|
;;
|
||||||
|
alpha*-*-*)
|
||||||
|
# newlib is not 64 bit ready
|
||||||
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
||||||
|
;;
|
||||||
|
arc-*-*)
|
||||||
|
noconfigdirs="$noconfigdirs target-libgloss"
|
||||||
|
;;
|
||||||
|
arm-*-pe*)
|
||||||
|
noconfigdirs="$noconfigdirs target-libgloss"
|
||||||
|
;;
|
||||||
|
arm-*-coff*)
|
||||||
|
noconfigdirs="$noconfigdirs target-libgloss"
|
||||||
|
;;
|
||||||
|
arm-*-riscix*)
|
||||||
|
noconfigdirs="$noconfigdirs ld target-libgloss"
|
||||||
|
;;
|
||||||
|
d10v-*-*)
|
||||||
|
noconfigdirs="$noconfigdirs target-librx target-libg++ target-libstdc++ target-libio target-libgloss"
|
||||||
|
;;
|
||||||
|
h8300*-*-* | \
|
||||||
|
h8500-*-*)
|
||||||
|
noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx target-libgloss"
|
||||||
|
;;
|
||||||
|
hppa*-*-*elf* | \
|
||||||
|
hppa*-*-lites* | \
|
||||||
|
hppa*-*-rtems* )
|
||||||
|
# Do configure ld/binutils/gas for this case.
|
||||||
|
;;
|
||||||
|
hppa*-*-*)
|
||||||
|
# HP's C compiler doesn't handle Emacs correctly (but on BSD and Mach
|
||||||
|
# cc is gcc, and on any system a user should be able to link cc to
|
||||||
|
# whatever they want. FIXME, emacs emacs19).
|
||||||
|
case "${CC}" in
|
||||||
|
"" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
noconfigdirs="$noconfigdirs ld shellutils"
|
||||||
|
;;
|
||||||
|
i[3456]86-*-go32* | i[3456]-*-msdosdjgpp*)
|
||||||
|
# but don't build gdb
|
||||||
|
noconfigdirs="$noconfigdirs gdb target-libg++ target-libstdc++ target-libio target-librx"
|
||||||
|
;;
|
||||||
|
*-*-cygwin32)
|
||||||
|
target_configdirs="$target_configdirs target-winsup"
|
||||||
|
noconfigdirs="$noconfigdirs expect target-libgloss"
|
||||||
|
# always build newlib.
|
||||||
|
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
|
||||||
|
|
||||||
|
# Can't build gdb for cygwin32 if not native.
|
||||||
|
case "${host}" in
|
||||||
|
*-*-cygwin32) ;; # keep gdb tcl tk expect etc.
|
||||||
|
*) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl tix db sn gnuserv"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
i[3456]86-*-pe)
|
||||||
|
noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx target-libgloss"
|
||||||
|
;;
|
||||||
|
i[3456]86-*-sco3.2v5*)
|
||||||
|
# The linker does not yet know about weak symbols in COFF,
|
||||||
|
# and is not configured to handle mixed ELF and COFF.
|
||||||
|
noconfigdirs="$noconfigdirs gprof ld target-libgloss"
|
||||||
|
;;
|
||||||
|
i[3456]86-*-sco*)
|
||||||
|
noconfigdirs="$noconfigdirs gprof target-libgloss"
|
||||||
|
;;
|
||||||
|
i[3456]86-*-solaris2*)
|
||||||
|
# The linker does static linking correctly, but the Solaris C library
|
||||||
|
# has bugs such that some important functions won't work when statically
|
||||||
|
# linked. (See man pages for getpwuid, for example.)
|
||||||
|
noconfigdirs="$noconfigdirs ld target-libgloss"
|
||||||
|
;;
|
||||||
|
i[3456]86-*-sysv4*)
|
||||||
|
# The SYSV4 C compiler doesn't handle Emacs correctly
|
||||||
|
case "${CC}" in
|
||||||
|
"" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
# but that's okay since emacs doesn't work anyway
|
||||||
|
noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss"
|
||||||
|
;;
|
||||||
|
mn10200-*-*)
|
||||||
|
noconfigdirs="$noconfigdirs target-libgloss"
|
||||||
|
;;
|
||||||
|
mn10300-*-*)
|
||||||
|
noconfigdirs="$noconfigdirs target-libgloss"
|
||||||
|
;;
|
||||||
|
powerpc-*-aix*)
|
||||||
|
# copied from rs6000-*-* entry
|
||||||
|
noconfigdirs="$noconfigdirs gprof cvs target-libgloss"
|
||||||
|
# This is needed until gcc and ld are fixed to work together.
|
||||||
|
use_gnu_ld=no
|
||||||
|
;;
|
||||||
|
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
|
||||||
|
target_configdirs="$target_configdirs target-winsup"
|
||||||
|
noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db sn gnuserv"
|
||||||
|
# always build newlib.
|
||||||
|
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
|
||||||
|
;;
|
||||||
|
# This is temporary until we can link against shared libraries
|
||||||
|
powerpcle-*-solaris*)
|
||||||
|
noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db sn gnuserv"
|
||||||
|
;;
|
||||||
|
rs6000-*-lynxos*)
|
||||||
|
# The CVS server code doesn't work on the RS/6000
|
||||||
|
# Newlib makes problems for libg++ in crosses.
|
||||||
|
noconfigdirs="$noconfigdirs target-newlib gprof cvs"
|
||||||
|
;;
|
||||||
|
rs6000-*-aix*)
|
||||||
|
noconfigdirs="$noconfigdirs gprof"
|
||||||
|
# This is needed until gcc and ld are fixed to work together.
|
||||||
|
use_gnu_ld=no
|
||||||
|
;;
|
||||||
|
rs6000-*-*)
|
||||||
|
noconfigdirs="$noconfigdirs gprof"
|
||||||
|
;;
|
||||||
|
m68k-apollo-*)
|
||||||
|
noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss"
|
||||||
|
;;
|
||||||
|
mips*-*-irix5*)
|
||||||
|
# The GNU linker does not support shared libraries.
|
||||||
|
# emacs is emacs 18, which does not work on Irix 5 (emacs19 does work)
|
||||||
|
noconfigdirs="$noconfigdirs ld gprof emacs target-libgloss"
|
||||||
|
;;
|
||||||
|
mips*-*-irix6*)
|
||||||
|
# The GNU assembler and linker do not support IRIX 6.
|
||||||
|
# emacs is emacs 18, which does not work on Irix 5 (emacs19 does work)
|
||||||
|
noconfigdirs="$noconfigdirs ld gas gprof emacs target-libgloss"
|
||||||
|
;;
|
||||||
|
mips*-dec-bsd*)
|
||||||
|
noconfigdirs="$noconfigdirs gprof target-libgloss"
|
||||||
|
;;
|
||||||
|
mips*-*-bsd*)
|
||||||
|
noconfigdirs="$noconfigdirs gprof target-libgloss"
|
||||||
|
;;
|
||||||
|
mips*-*-*)
|
||||||
|
noconfigdirs="$noconfigdirs gprof"
|
||||||
|
;;
|
||||||
|
romp-*-*)
|
||||||
|
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss"
|
||||||
|
;;
|
||||||
|
sh-*-*)
|
||||||
|
case "${host}" in
|
||||||
|
i[3456]86-*-vsta) ;; # don't add gprof back in
|
||||||
|
i[3456]86-*-go32*) ;; # don't add gprof back in
|
||||||
|
i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in
|
||||||
|
*) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
|
||||||
|
esac
|
||||||
|
noconfigdirs="$noconfigdirs target-libgloss"
|
||||||
|
;;
|
||||||
|
sparc-*-sunos4*)
|
||||||
|
if [ x${is_cross_compiler} != xno ] ; then
|
||||||
|
noconfigdirs="$noconfigdirs gdb gdbtest target-newlib target-libgloss"
|
||||||
|
else
|
||||||
|
use_gnu_ld=no
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
v810-*-*)
|
||||||
|
noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libio target-libg++ target-libstdc++ opcodes target-libgloss"
|
||||||
|
;;
|
||||||
|
vax-*-vms)
|
||||||
|
noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss"
|
||||||
|
;;
|
||||||
|
vax-*-*)
|
||||||
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
||||||
|
;;
|
||||||
|
*-*-lynxos*)
|
||||||
|
# Newlib makes problems for libg++ in crosses.
|
||||||
|
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
|
||||||
|
;;
|
||||||
|
*-*-macos* | \
|
||||||
|
*-*-mpw*)
|
||||||
|
# Macs want a resource compiler.
|
||||||
|
configdirs="$configdirs grez"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# targets that need a second pass
|
||||||
|
case "${target}" in
|
||||||
|
*-gm-magic*)
|
||||||
|
noconfigdirs="$noconfigdirs target-libgloss"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If we aren't building newlib, then don't build libgloss, since libgloss
|
||||||
|
# depends upon some newlib header files.
|
||||||
|
case "${noconfigdirs}" in
|
||||||
|
*target-libgloss*) ;;
|
||||||
|
*target-newlib*) noconfigdirs="$noconfigdirs target-libgloss" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If we are building a Canadian Cross, discard tools that can not be built
|
||||||
|
# using a cross compiler. FIXME: These tools should be fixed.
|
||||||
|
if [ "${build}" != "${host}" ]; then
|
||||||
|
noconfigdirs="$noconfigdirs expect dejagnu"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make sure we don't let GNU ld be added if we didn't want it.
|
||||||
|
if [ x$with_gnu_ld = xno ]; then
|
||||||
|
use_gnu_ld=no
|
||||||
|
noconfigdirs="$noconfigdirs ld"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make sure we don't let GNU as be added if we didn't want it.
|
||||||
|
if [ x$with_gnu_as = xno ]; then
|
||||||
|
use_gnu_as=no
|
||||||
|
noconfigdirs="$noconfigdirs gas"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
|
||||||
|
# $target_configdirs.
|
||||||
|
# If we have the source for $noconfigdirs entries, add them to $notsupp.
|
||||||
|
|
||||||
|
notsupp=""
|
||||||
|
for dir in . $skipdirs $noconfigdirs ; do
|
||||||
|
dirname=`echo $dir | sed -e s/target-//g`
|
||||||
|
if [ $dir != . ] && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||||
|
configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
|
||||||
|
if [ -r $srcdir/$dirname/configure ] \
|
||||||
|
|| [ -r $srcdir/$dirname/configure.in ]; then
|
||||||
|
if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
notsupp="$notsupp $dir"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ $dir != . ] && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||||
|
target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
|
||||||
|
if [ -r $srcdir/$dirname/configure ] \
|
||||||
|
|| [ -r $srcdir/$dirname/configure.in ]; then
|
||||||
|
if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
notsupp="$notsupp $dir"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Sometimes the tools are distributed with libiberty but with no other
|
||||||
|
# libraries. In that case, we don't want to build target-libiberty.
|
||||||
|
if [ -n "${target_configdirs}" ]; then
|
||||||
|
others=
|
||||||
|
for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
|
||||||
|
if [ "$i" != "libiberty" ]; then
|
||||||
|
if [ -r $srcdir/$i/configure ] || [ -r $srcdir/$i/configure.in ]; then
|
||||||
|
others=yes;
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -z "${others}" ]; then
|
||||||
|
target_configdirs=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Deconfigure all subdirectories, in case we are changing the
|
||||||
|
# configuration from one where a subdirectory is supported to one where it
|
||||||
|
# is not.
|
||||||
|
if [ -z "${norecursion}" -a -n "${configdirs}" ]; then
|
||||||
|
for i in `echo ${configdirs} | sed -e s/target-//g` ; do
|
||||||
|
rm -f $i/Makefile
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ -z "${norecursion}" -a -n "${target_configdirs}" ]; then
|
||||||
|
for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
|
||||||
|
rm -f ${target_subdir}/$i/Makefile
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Produce a warning message for the subdirs we can't configure.
|
||||||
|
# This isn't especially interesting in the Cygnus tree, but in the individual
|
||||||
|
# FSF releases, it's important to let people know when their machine isn't
|
||||||
|
# supported by the one or two programs in a package.
|
||||||
|
|
||||||
|
if [ -n "${notsupp}" ] && [ -z "${norecursion}" ]; then
|
||||||
|
# If $appdirs is non-empty, at least one of those directories must still
|
||||||
|
# be configured, or we error out. (E.g., if the gas release supports a
|
||||||
|
# specified target in some subdirs but not the gas subdir, we shouldn't
|
||||||
|
# pretend that all is well.)
|
||||||
|
if [ -n "$appdirs" ]; then
|
||||||
|
for dir in $appdirs ; do
|
||||||
|
if [ -r $dir/Makefile.in ]; then
|
||||||
|
if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||||
|
appdirs=""
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||||
|
appdirs=""
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -n "$appdirs" ]; then
|
||||||
|
echo "*** This configuration is not supported by this package." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# Okay, some application will build, or we don't care to check. Still
|
||||||
|
# notify of subdirs not getting built.
|
||||||
|
echo "*** This configuration is not supported in the following subdirectories:" 1>&2
|
||||||
|
echo " ${notsupp}" 1>&2
|
||||||
|
echo " (Any other directories should still work fine.)" 1>&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set with_gnu_as and with_gnu_ld as appropriate.
|
||||||
|
#
|
||||||
|
# This is done by determining whether or not the appropriate directory
|
||||||
|
# is available, and by checking whether or not specific configurations
|
||||||
|
# have requested that this magic not happen.
|
||||||
|
#
|
||||||
|
# The command line options always override the explicit settings in
|
||||||
|
# configure.in, and the settings in configure.in override this magic.
|
||||||
|
#
|
||||||
|
# If the default for a toolchain is to use GNU as and ld, and you don't
|
||||||
|
# want to do that, then you should use the --without-gnu-as and
|
||||||
|
# --without-gnu-ld options for the configure script.
|
||||||
|
|
||||||
|
if [ x${use_gnu_as} = x ] ; then
|
||||||
|
if [ x${with_gnu_as} != xno ] && echo " ${configdirs} " | grep " ${gasdir} " > /dev/null 2>&1 && [ -d ${srcdir}/${gasdir} ] ; then
|
||||||
|
with_gnu_as=yes
|
||||||
|
withoptions="$withoptions --with-gnu-as"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x${use_gnu_ld} = x ] ; then
|
||||||
|
if [ x${with_gnu_ld} != xno ] && echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 && [ -d ${srcdir}/ld ] ; then
|
||||||
|
with_gnu_ld=yes
|
||||||
|
withoptions="$withoptions --with-gnu-ld"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If using newlib, add --with-newlib to the withoptions so that gcc/configure
|
||||||
|
# can detect this case.
|
||||||
|
|
||||||
|
if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " target-newlib " > /dev/null 2>&1 && [ -d ${srcdir}/newlib ] ; then
|
||||||
|
with_newlib=yes
|
||||||
|
withoptions="$withoptions --with-newlib"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x${shared} = xyes ]; then
|
||||||
|
case "${target}" in
|
||||||
|
hppa*) target_makefile_frag=config/mt-papic ;;
|
||||||
|
i[3456]86-*) target_makefile_frag=config/mt-x86pic ;;
|
||||||
|
powerpc*-*) target_makefile_frag=config/mt-ppcpic ;;
|
||||||
|
*) target_makefile_frag=config/mt-${target_cpu}pic ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# post-target:
|
||||||
|
|
||||||
|
# Make sure that the compiler is able to generate an executable. If it
|
||||||
|
# can't, we are probably in trouble. We don't care whether we can run the
|
||||||
|
# executable--we might be using a cross compiler--we only care whether it
|
||||||
|
# can be created. At this point the main configure script has set CC.
|
||||||
|
echo "int main () { return 0; }" > conftest.c
|
||||||
|
${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
|
||||||
|
if [ $? = 0 ] && [ -s conftest ]; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
|
||||||
|
echo 1>&2 "*** You must set the environment variable CC to a working compiler."
|
||||||
|
rm -f conftest*
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
|
||||||
|
# The Solaris /usr/ucb/cc compiler does not appear to work.
|
||||||
|
case "${host}" in
|
||||||
|
sparc-sun-solaris2*)
|
||||||
|
CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
|
||||||
|
if [ "`/usr/bin/which $CCBASE`" = "/usr/ucb/cc" ] ; then
|
||||||
|
could_use=
|
||||||
|
[ -d /opt/SUNWspro/bin ] && could_use="/opt/SUNWspro/bin"
|
||||||
|
if [ -d /opt/cygnus/bin ] ; then
|
||||||
|
if [ "$could_use" = "" ] ; then
|
||||||
|
could_use="/opt/cygnus/bin"
|
||||||
|
else
|
||||||
|
could_use="$could_use or /opt/cygnus/bin"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ "$could_use" = "" ] ; then
|
||||||
|
echo "Warning: compilation may fail because you're using"
|
||||||
|
echo "/usr/ucb/cc. You should change your PATH or CC "
|
||||||
|
echo "variable and rerun configure."
|
||||||
|
else
|
||||||
|
echo "Warning: compilation may fail because you're using"
|
||||||
|
echo "/usr/ucb/cc, when you should use the C compiler from"
|
||||||
|
echo "$could_use. You should change your"
|
||||||
|
echo "PATH or CC variable and rerun configure."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If --enable-shared was set, we must set LD_LIBRARY_PATH so that the
|
||||||
|
# binutils tools will find libbfd.so.
|
||||||
|
if [ "${shared}" = "yes" ]; then
|
||||||
|
sed -e 's/^SET_LIB_PATH[ ]*=.*$/SET_LIB_PATH = $(REALLY_SET_LIB_PATH)/' \
|
||||||
|
Makefile > Makefile.tem
|
||||||
|
rm -f Makefile
|
||||||
|
mv -f Makefile.tem Makefile
|
||||||
|
|
||||||
|
case "${host}" in
|
||||||
|
*-*-hpux*)
|
||||||
|
sed -e 's/RPATH_ENVVAR[ ]*=.*$/RPATH_ENVVAR = SHLIB_PATH/' \
|
||||||
|
Makefile > Makefile.tem
|
||||||
|
rm -f Makefile
|
||||||
|
mv -f Makefile.tem Makefile
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If we are building for a cygwin32 host, then set INSTALL_PROGRAM_ARGS to
|
||||||
|
# -x. This will cause programs to be installed with .exe extensions.
|
||||||
|
case "${host}" in
|
||||||
|
*-*-cygwin32*)
|
||||||
|
sed -e 's/^INSTALL_PROGRAM_ARGS[ ]*=.*$/INSTALL_PROGRAM_ARGS = -x/' \
|
||||||
|
Makefile > Makefile.tem
|
||||||
|
rm -f Makefile
|
||||||
|
mv -f Makefile.tem Makefile
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Record target_configdirs and the configure arguments in Makefile.
|
||||||
|
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
|
||||||
|
targargs=`echo "${arguments}" | \
|
||||||
|
sed -e 's/--norecursion//' \
|
||||||
|
-e 's/--cache[a-z-]*=[^ ]*//' \
|
||||||
|
-e 's/--ho[a-z-]*=[^ ]*//' \
|
||||||
|
-e 's/--bu[a-z-]*=[^ ]*//' \
|
||||||
|
-e 's/--ta[a-z-]*=[^ ]*//'`
|
||||||
|
|
||||||
|
# Passing a --with-cross-host argument lets the target libraries know
|
||||||
|
# whether they are being built with a cross-compiler or being built
|
||||||
|
# native. However, it would be better to use other mechanisms to make the
|
||||||
|
# sorts of decisions they want to make on this basis. Please consider
|
||||||
|
# this option to be deprecated. FIXME.
|
||||||
|
if [ x${is_cross_compiler} = xyes ]; then
|
||||||
|
targargs="--with-cross-host=${host_alias} ${targargs}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Default to --enable-multilib.
|
||||||
|
if [ x${enable_multilib} = x ]; then
|
||||||
|
targargs="--enable-multilib ${targargs}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
targargs="--host=${target_alias} --build=${build_alias} ${targargs}"
|
||||||
|
sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \
|
||||||
|
-e "s%^CONFIG_ARGUMENTS[ ]*=.*$%CONFIG_ARGUMENTS = ${targargs}%" \
|
||||||
|
-e "s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \
|
||||||
|
Makefile > Makefile.tem
|
||||||
|
rm -f Makefile
|
||||||
|
mv -f Makefile.tem Makefile
|
||||||
|
|
||||||
|
#
|
||||||
|
# Local Variables:
|
||||||
|
# fill-column: 131
|
||||||
|
# End:
|
||||||
|
#
|
392
etc/ChangeLog
Normal file
392
etc/ChangeLog
Normal file
@ -0,0 +1,392 @@
|
|||||||
|
Tue Jun 17 15:50:23 1997 Angela Marie Thomas (angela@cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: Add /usr/bsd to PATH for Irix (home of compress)
|
||||||
|
|
||||||
|
Thu Jun 12 13:47:00 1997 Angela Marie Thomas (angela@cygnus.com)
|
||||||
|
|
||||||
|
* Install.in (show_exec_prefix_msg): fix quoting
|
||||||
|
|
||||||
|
Wed Jun 4 15:31:43 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
|
||||||
|
|
||||||
|
* rebuilding.texi: Removed.
|
||||||
|
|
||||||
|
Sat May 24 18:02:20 1997 Angela Marie Thomas (angela@cygnus.com)
|
||||||
|
|
||||||
|
* cross-tools-fix: Remove host check since it doesn't matter
|
||||||
|
for this case.
|
||||||
|
* Install.in (guess_system): clean up more unused hosts.
|
||||||
|
* Install.in, cross-tools-fix, comp-tools-fix, comp-tools-verify:
|
||||||
|
Hack for host check to not warn the user for certain cases.
|
||||||
|
|
||||||
|
Fri May 23 23:46:10 1997 Angela Marie Thomas (angela@cygnus.com)
|
||||||
|
|
||||||
|
* subst-strings: Remove a lot of unused code
|
||||||
|
* Install.in: Remove reference to TAPEdflt, use variables instead of
|
||||||
|
string substitution when able.
|
||||||
|
|
||||||
|
Fri Apr 11 17:25:52 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* configure.in: Change file named in AC_INIT to Makefile.in.
|
||||||
|
* configure: Rebuild.
|
||||||
|
|
||||||
|
Fri Apr 11 18:12:42 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
|
||||||
|
|
||||||
|
* Install.in (guess_system): Back out change to INSTALLHOST to
|
||||||
|
call all IRIX systems "mips-sgi-irix4"
|
||||||
|
|
||||||
|
* Makefile.in: Remove references to configure.texi and cfg-paper.texi.
|
||||||
|
|
||||||
|
Thu Apr 10 23:26:45 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
|
||||||
|
|
||||||
|
* srctree.texi, emacs-relnotes.texi, cfg-paper.texi: Remove.
|
||||||
|
* Install.in: Remove Ultrix-specific hacks.
|
||||||
|
Update Cygnus phone numbers.
|
||||||
|
(guess_system): Remove some old systems (Ultrix, OSF1 v1 & 2,
|
||||||
|
m68k-HPUX, m68k SunOS, etc.)
|
||||||
|
(show_gnu_root_msg): Remove.
|
||||||
|
Removed all the remove option code.
|
||||||
|
|
||||||
|
Thu Apr 10 23:23:33 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
|
||||||
|
|
||||||
|
* configure.man, configure.texi: Remote.
|
||||||
|
|
||||||
|
Mon Apr 7 18:15:00 1997 Brendan Kehoe <brendan@cygnus.com>
|
||||||
|
|
||||||
|
* Fix the version string for OSF1 4.0 to recognize either
|
||||||
|
V4.* or X4.*
|
||||||
|
|
||||||
|
Mon Apr 7 15:34:47 1997 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* standards.texi, make-stds.texi: Update to current FSF versions.
|
||||||
|
|
||||||
|
Tue Apr 1 16:19:31 1997 Jason Molenda (crash@godzilla.cygnus.co.jp)
|
||||||
|
|
||||||
|
* Install.in (show_exec_prefix_msg): GDBTK_FILENAME to
|
||||||
|
GDBTK_LIBRARY, also update TCL_LIBRARY and TK_LIBRARY.
|
||||||
|
|
||||||
|
Tue Nov 19 15:36:14 1996 Doug Evans <dje@canuck.cygnus.com>
|
||||||
|
|
||||||
|
* make-rel-sym-tree: New file.
|
||||||
|
|
||||||
|
Wed Oct 23 00:34:07 1996 Angela Marie Thomas (angela@cygnus.com)
|
||||||
|
|
||||||
|
* Lots of patches from progressive...
|
||||||
|
* Install.in: restore DDOPTS for AIX 4.x
|
||||||
|
* Install.in, subst-strings: add case for DG Aviion
|
||||||
|
* subst-strings: fix typo in INSTALLdir var setting
|
||||||
|
* comp-tools-verify: set SHLIB_PATH for shared libs
|
||||||
|
* Install.in, subst-strings: add case for solaris2.5
|
||||||
|
* Install.in: fix regression for hppa1.1 check
|
||||||
|
* comp-tools-fix: set LD_LIBRARY_PATH
|
||||||
|
* comp-tools-fix: If fixincludes fixes /usr/include/limits.h,
|
||||||
|
install it as syslimits.h.
|
||||||
|
|
||||||
|
Wed Oct 16 19:20:42 1996 Michael Meissner <meissner@tiktok.cygnus.com>
|
||||||
|
|
||||||
|
* Install.in (guess_system): Treat powerpc-ibm-aix4.1 the same as
|
||||||
|
rs6000-ibm-aix4.1, since the compiler now uses common mode by
|
||||||
|
default.
|
||||||
|
|
||||||
|
Wed Oct 2 15:39:07 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
|
||||||
|
|
||||||
|
* configure.in (AC_PROG_INSTALL): Added.
|
||||||
|
* Makefile.in (distclean): Remove config.cache.
|
||||||
|
|
||||||
|
Wed Oct 2 14:33:58 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
|
||||||
|
|
||||||
|
* configure.in: Switch to autoconf configure.in.
|
||||||
|
* configure: New.
|
||||||
|
* Makefile.in: Use autoconf-substituted values.
|
||||||
|
|
||||||
|
Tue Jun 25 18:56:08 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
|
||||||
|
|
||||||
|
* Makefile.in (datadir): Changed to $(prefix)/share.
|
||||||
|
|
||||||
|
Fri Mar 29 11:38:01 1996 J.T. Conklin (jtc@lisa.cygnus.com)
|
||||||
|
|
||||||
|
* configure.man: Changed to be recognized by catman -w on Solaris.
|
||||||
|
|
||||||
|
Wed Dec 6 15:40:28 1995 Doug Evans <dje@canuck.cygnus.com>
|
||||||
|
|
||||||
|
* comp-tools-fix (fixincludes): Define FIXPROTO_DEFINES from
|
||||||
|
.../install-tools/fixproto-defines.
|
||||||
|
|
||||||
|
Sun Nov 12 19:31:27 1995 Jason Molenda (crash@phydeaux.cygnus.com)
|
||||||
|
|
||||||
|
* comp-tools-verify (verify_cxx_initializers): delete argv,
|
||||||
|
argc declarations, add -static to compile line.
|
||||||
|
(verify_cxx_hello_world): delete argv, argc declarations, add
|
||||||
|
-static to compile line.
|
||||||
|
|
||||||
|
Wed Sep 20 13:21:52 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* Makefile.in (maintainer-clean): New target, synonym for
|
||||||
|
realclean.
|
||||||
|
|
||||||
|
Thu Sep 14 17:19:58 1995 Jason Molenda (crash@phydeaux.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in (show_exec_prefix_msg): print out paths for
|
||||||
|
TCL_LIBRARY, TK_LIBRARY and GDBTK_FILENAME.
|
||||||
|
|
||||||
|
Mon Aug 28 17:25:49 1995 Jason Molenda (crash@phydeaux.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in (PATH): add /usr/ucb to $PATH (for SunOS 4.1.x).
|
||||||
|
|
||||||
|
Tue Aug 15 21:51:58 1995 Jason Molenda (crash@phydeaux.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in (guess_system): Match OSF/1 v3.x as the same as
|
||||||
|
v2.x--v2.x binaries are upward compatible.
|
||||||
|
|
||||||
|
Tue Aug 15 21:46:54 1995 Jason Molenda (crash@phydeaux.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in (guess_system): recognize HP 9000/800 systems as the
|
||||||
|
same as HP 9000/700 systems.
|
||||||
|
|
||||||
|
Tue Aug 8 13:11:56 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
|
||||||
|
|
||||||
|
* Install.in: For emacs, run show_emacs_alternate_msg and exit.
|
||||||
|
(show_emacs_alternate_msg): New message saying how emacs can't be
|
||||||
|
installed in an alternate prefix.
|
||||||
|
|
||||||
|
Thu Jun 8 00:42:56 1995 Angela Marie Thomas <angela@cirdan.cygnus.com>
|
||||||
|
|
||||||
|
* subst-strings: change du commands to $BINDIR/. & $SRCDIR/. just
|
||||||
|
in case they are symlinks.
|
||||||
|
|
||||||
|
Tue Apr 18 14:23:10 1995 J.T. Conklin <jtc@rtl.cygnus.com>
|
||||||
|
|
||||||
|
* cdk-fix: Extracted table of targets that don't need their
|
||||||
|
headers fixed from gcc's configure script.
|
||||||
|
|
||||||
|
* cdk-fix, cdk-verify: Use ${HOST} instead of ||HOSTstr||
|
||||||
|
|
||||||
|
* cdk-fix, cdk-verify: New files, install script fragments used
|
||||||
|
for Cygnus Developer's Kit.
|
||||||
|
|
||||||
|
* Install.in (do_mkdir): New function.
|
||||||
|
|
||||||
|
* Install.in: Added support for --with and --without options.
|
||||||
|
Changed so that tape commands are not run when extracting
|
||||||
|
from a file.
|
||||||
|
(do_mt): Changed to take only one argument.
|
||||||
|
|
||||||
|
Wed Mar 29 11:16:38 1995 Jason Molenda (crash@phydeaux.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: catch UNAME==alpha-dec-osf2.x and correct entry for
|
||||||
|
alpha-dec-osf1.x
|
||||||
|
|
||||||
|
Fri Jan 27 12:04:29 1995 J.T. Conklin <jtc@rtl.cygnus.com>
|
||||||
|
|
||||||
|
* subst-strings (mips-sgi-irix5): New entry in table.
|
||||||
|
|
||||||
|
Thu Jan 19 12:15:44 1995 J.T. Conklin <jtc@rtl.cygnus.com>
|
||||||
|
|
||||||
|
* Install.in: Major rewrite, bundle dependent code (for example,
|
||||||
|
fixincludes for comp-tools) will be inserted into the Install
|
||||||
|
script when it is generated.
|
||||||
|
|
||||||
|
Tue Jan 17 16:51:32 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
|
||||||
|
|
||||||
|
* Makefile.in (Makefile): Rebuild using $(SHELL).
|
||||||
|
|
||||||
|
Thu Nov 3 19:30:33 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
|
||||||
|
|
||||||
|
* Makefile.in (install-info): Depend on info.
|
||||||
|
|
||||||
|
Fri Aug 19 16:16:38 1994 Jason Molenda (crash@phydeaux.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: set $FIX_HEADER so fixproto can find fix-header.
|
||||||
|
|
||||||
|
Fri May 6 16:18:58 1994 Jason Molenda (crash@sendai.cygnus.com)
|
||||||
|
|
||||||
|
* Makefile.in (install-info): add a semicolon in the if statement.
|
||||||
|
|
||||||
|
Fri Apr 29 16:56:07 1994 David J. Mackenzie (djm@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* cfg-paper.texi: Update some outdated information.
|
||||||
|
|
||||||
|
* Makefile.in (install-info): Pass file, not directory, as last
|
||||||
|
arg to INSTALL_DATA.
|
||||||
|
(uninstall): New target.
|
||||||
|
|
||||||
|
Thu Apr 28 14:42:22 1994 David J. Mackenzie (djm@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* configure.texi: Comment out @smallbook.
|
||||||
|
|
||||||
|
* Makefile.in: Define TEXI2DVI and TEXIDIR, and use the latter.
|
||||||
|
Remove info files in realclean, not clean, per coding standards.
|
||||||
|
Remove TeX output in clean.
|
||||||
|
|
||||||
|
Tue Apr 26 17:18:03 1994 Jason Molenda (crash@sendai.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: fixincludes output is actually put in fixincludes.log,
|
||||||
|
but echo'ed messages claim it is fixinc.log. This is the same
|
||||||
|
messages as I logged in March 4 1994, but for some reason we found
|
||||||
|
the change hadn't been done. I'll have to dig through the logs
|
||||||
|
and find out what I really did do that day. :)
|
||||||
|
|
||||||
|
Mon Apr 25 20:28:19 1994 Jason Molenda (crash@sendai.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: use eval to call do_mt() for Ultrix brokenness.
|
||||||
|
|
||||||
|
Mon Apr 25 20:00:00 1994 Jason Molenda (crash@sendai.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in(do_mt): exit with error status 1 if # of parameters
|
||||||
|
!= 3.
|
||||||
|
|
||||||
|
Mon Apr 25 19:42:36 1994 Jason Molenda (crash@sendai.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: lose TAPE_FORWARD and TAPE_REWIND, add do_mt()
|
||||||
|
to do all tape movement operations. Currently untested. Addresses
|
||||||
|
PR # 4886 from bull.
|
||||||
|
|
||||||
|
* Install.in: add 1994 to the copyright thing.
|
||||||
|
|
||||||
|
Fri Apr 22 19:05:13 1994 David J. Mackenzie (djm@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* standards.texi: Update from FSF.
|
||||||
|
|
||||||
|
Fri Apr 22 15:46:10 1994 Jason Molenda (crash@cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: Add $DDOPTS, has ``bs=124b'' for all systems except
|
||||||
|
AIX (some versions of AIX don't understand bs=124b. Silly OS).
|
||||||
|
|
||||||
|
Mon Apr 4 22:55:05 1994 Jason Molenda (crash@sendai.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: null out $TOOLS before adding stuff to it
|
||||||
|
non-destructively.
|
||||||
|
|
||||||
|
Wed Mar 30 21:45:35 1994 David J. Mackenzie (djm@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* standards.texi: Fix typo.
|
||||||
|
|
||||||
|
* configure.texi, configure.man: Document --disable-.
|
||||||
|
|
||||||
|
Mon Mar 28 13:22:15 1994 David J. Mackenzie (djm@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* standards.texi: Update from FSF.
|
||||||
|
|
||||||
|
Sat Mar 26 09:21:44 1994 David J. Mackenzie (djm@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* standards.texi, make-stds.texi: Update from FSF.
|
||||||
|
|
||||||
|
Fri Mar 25 22:59:45 1994 David J. Mackenzie (djm@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* configure.texi, configure.man: Document --enable-* options.
|
||||||
|
|
||||||
|
Wed Mar 23 23:38:24 1994 Jason Molenda (crash@sendai.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: set CPP to be gcc -E for fixincludes.
|
||||||
|
|
||||||
|
Wed Mar 23 13:42:48 1994 Jason Molenda (crash@sendai.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: set PATH to $PATH:/bin:/usr/bin so we can pick
|
||||||
|
up native tools even if the user doesn't have them in his
|
||||||
|
path.
|
||||||
|
|
||||||
|
* Install.in: ``hppa-1.1-hp-hpux'' -> ``hppa1.1-hp-hpux''.
|
||||||
|
|
||||||
|
Tue Mar 15 22:09:20 1994 Jason Molenda (crash@sendai.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: TAPE_REWIND and TAPE_FORWARD variables for Unixunaware,
|
||||||
|
added switch statement to detect if system is Unixunaware.
|
||||||
|
|
||||||
|
Fri Mar 4 12:10:30 1994 Jason Molenda (crash@sendai.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: fixincludes output is actually put in fixincludes.log,
|
||||||
|
but echo'ed messages claim it is fixinc.log.
|
||||||
|
|
||||||
|
Wed Nov 3 02:58:02 1993 Jeffrey Osier (jeffrey@thepub.cygnus.com)
|
||||||
|
|
||||||
|
* subst-strings: output TEXBUNDLE for more install notes matching
|
||||||
|
* install-texi.in: PRMS info now exists
|
||||||
|
|
||||||
|
Tue Oct 26 16:57:12 1993 K. Richard Pixley (rich@sendai.cygnus.com)
|
||||||
|
|
||||||
|
* subst-strings: match solaris*. Also, add default case to catch
|
||||||
|
and error out for unrecognized systems.
|
||||||
|
|
||||||
|
Thu Aug 19 18:21:31 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: handle the new fixproto work
|
||||||
|
|
||||||
|
Mon Jul 19 12:05:41 1993 david d `zoo' zuhn (zoo@cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: remove "MT=tctl" for AIX (not needed, and barely
|
||||||
|
worked anyway)
|
||||||
|
|
||||||
|
Mon Jun 14 19:09:22 1993 Jeffrey Osier (jeffrey@cygnus.com)
|
||||||
|
|
||||||
|
* subst-strings: changed HOST to recognize Solaris for install notes
|
||||||
|
|
||||||
|
Thu Jun 10 16:01:25 1993 Jeffrey Osier (jeffrey@cygnus.com)
|
||||||
|
|
||||||
|
* dos-inst.texi: new file.
|
||||||
|
|
||||||
|
Wed Jun 9 19:23:59 1993 Jeffrey Osier (jeffrey@rtl.cygnus.com)
|
||||||
|
|
||||||
|
* install-texi.in: added conditionals (nearly complete)
|
||||||
|
cleaned up
|
||||||
|
added support for other releases (not done)
|
||||||
|
|
||||||
|
Wed Jun 9 15:53:58 1993 Jim Kingdon (kingdon@cygnus.com)
|
||||||
|
|
||||||
|
* Makefile.in (install-info): Use INSTALL_DATA.
|
||||||
|
({dist,real}clean): Also delete Makefile and config.status.
|
||||||
|
|
||||||
|
Fri Jun 4 17:09:56 1993 Jeffrey Osier (jeffrey@cygnus.com)
|
||||||
|
|
||||||
|
* subst-strings: added data for OS_STRING
|
||||||
|
|
||||||
|
* subst-strings: added support for OS_STRING
|
||||||
|
|
||||||
|
Thu Jun 3 00:37:01 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: pull COPYING and COPYING.LIB off of the tape
|
||||||
|
|
||||||
|
Tue Jun 1 16:52:08 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* subst-strings: replace RELEASE_DIR too
|
||||||
|
|
||||||
|
Mon Mar 22 23:55:27 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* Makefile.in: add installcheck target
|
||||||
|
|
||||||
|
Wed Mar 17 02:21:15 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* Install.in: fix 'source only' extraction bug where it looked for
|
||||||
|
the src dir under H-<host>/src instead of src; also remove stray
|
||||||
|
reference to EMACSHIBIN
|
||||||
|
|
||||||
|
Mon Mar 15 01:25:45 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* make-stds.texi: added 'installcheck' to the standard targets
|
||||||
|
|
||||||
|
Tue Mar 9 19:48:28 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* standards.texi: added INFO-DIR-ENTRY, updated version from the FSF
|
||||||
|
|
||||||
|
Tue Feb 9 12:40:23 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||||
|
|
||||||
|
* Makefile.in (standards.info): Added -I$(srcdir) to find
|
||||||
|
make-stds.texi.
|
||||||
|
|
||||||
|
Mon Feb 1 16:32:56 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* standards.texi: updated to latest FSF version, which includes:
|
||||||
|
|
||||||
|
* make-stds.texi: new file
|
||||||
|
|
||||||
|
Mon Nov 30 01:31:40 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* install-texi.in, relnotes.texi, intro.texi: changed Cygnus phone
|
||||||
|
numbers from the old Palo Alto ones to the new Mtn. View numbers
|
||||||
|
|
||||||
|
Mon Nov 16 16:50:43 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* Makefile.in: define $(RM) to "rm -f"
|
||||||
|
|
||||||
|
Sun Oct 11 16:05:48 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
|
||||||
|
|
||||||
|
* intro.texi: added INFO-DIR-ENTRY
|
||||||
|
|
88
etc/Makefile.in
Normal file
88
etc/Makefile.in
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
#
|
||||||
|
# Makefile.in for etc
|
||||||
|
#
|
||||||
|
|
||||||
|
prefix = @prefix@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
|
||||||
|
srcdir = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
|
||||||
|
bindir = @bindir@
|
||||||
|
libdir = @libdir@
|
||||||
|
tooldir = $(libdir)
|
||||||
|
datadir = @datadir@
|
||||||
|
|
||||||
|
mandir = @mandir@
|
||||||
|
man1dir = $(mandir)/man1
|
||||||
|
man2dir = $(mandir)/man2
|
||||||
|
man3dir = $(mandir)/man3
|
||||||
|
man4dir = $(mandir)/man4
|
||||||
|
man5dir = $(mandir)/man5
|
||||||
|
man6dir = $(mandir)/man6
|
||||||
|
man7dir = $(mandir)/man7
|
||||||
|
man8dir = $(mandir)/man8
|
||||||
|
man9dir = $(mandir)/man9
|
||||||
|
infodir = @infodir@
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
|
||||||
|
MAKEINFO = makeinfo
|
||||||
|
TEXI2DVI = texi2dvi
|
||||||
|
|
||||||
|
# Where to find texinfo.tex to format documentation with TeX.
|
||||||
|
TEXIDIR = $(srcdir)/../texinfo
|
||||||
|
|
||||||
|
#### Host, target, and site specific Makefile fragments come in here.
|
||||||
|
###
|
||||||
|
|
||||||
|
INFOFILES = standards.info
|
||||||
|
DVIFILES = standards.dvi
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
|
install:
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
|
||||||
|
info: $(INFOFILES)
|
||||||
|
|
||||||
|
install-info: info
|
||||||
|
if test ! -f standards.info ; then cd $(srcdir); fi; \
|
||||||
|
for i in standards.info*; do \
|
||||||
|
$(INSTALL_DATA) $$i $(infodir)/$$i; \
|
||||||
|
done
|
||||||
|
|
||||||
|
dvi: $(DVIFILES)
|
||||||
|
|
||||||
|
standards.info: $(srcdir)/standards.texi
|
||||||
|
$(MAKEINFO) -I$(srcdir) -o standards.info $(srcdir)/standards.texi
|
||||||
|
|
||||||
|
standards.dvi: $(srcdir)/standards.texi
|
||||||
|
TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/standards.texi
|
||||||
|
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
|
||||||
|
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
|
||||||
|
|
||||||
|
mostlyclean: clean
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
rm -f Makefile config.status config.cache
|
||||||
|
|
||||||
|
maintainer-clean realclean: distclean
|
||||||
|
rm -f *.info*
|
||||||
|
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
|
||||||
|
$(SHELL) ./config.status
|
||||||
|
|
||||||
|
## these last targets are for standards.texi conformance
|
||||||
|
dist:
|
||||||
|
check:
|
||||||
|
installcheck:
|
||||||
|
TAGS:
|
858
etc/configure
vendored
Executable file
858
etc/configure
vendored
Executable file
@ -0,0 +1,858 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
|
# Generated automatically using autoconf version 2.12
|
||||||
|
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This configure script is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy, distribute and modify it.
|
||||||
|
|
||||||
|
# Defaults:
|
||||||
|
ac_help=
|
||||||
|
ac_default_prefix=/usr/local
|
||||||
|
# Any additions from configure.in:
|
||||||
|
|
||||||
|
# Initialize some variables set by options.
|
||||||
|
# The variables have the same names as the options, with
|
||||||
|
# dashes changed to underlines.
|
||||||
|
build=NONE
|
||||||
|
cache_file=./config.cache
|
||||||
|
exec_prefix=NONE
|
||||||
|
host=NONE
|
||||||
|
no_create=
|
||||||
|
nonopt=NONE
|
||||||
|
no_recursion=
|
||||||
|
prefix=NONE
|
||||||
|
program_prefix=NONE
|
||||||
|
program_suffix=NONE
|
||||||
|
program_transform_name=s,x,x,
|
||||||
|
silent=
|
||||||
|
site=
|
||||||
|
srcdir=
|
||||||
|
target=NONE
|
||||||
|
verbose=
|
||||||
|
x_includes=NONE
|
||||||
|
x_libraries=NONE
|
||||||
|
bindir='${exec_prefix}/bin'
|
||||||
|
sbindir='${exec_prefix}/sbin'
|
||||||
|
libexecdir='${exec_prefix}/libexec'
|
||||||
|
datadir='${prefix}/share'
|
||||||
|
sysconfdir='${prefix}/etc'
|
||||||
|
sharedstatedir='${prefix}/com'
|
||||||
|
localstatedir='${prefix}/var'
|
||||||
|
libdir='${exec_prefix}/lib'
|
||||||
|
includedir='${prefix}/include'
|
||||||
|
oldincludedir='/usr/include'
|
||||||
|
infodir='${prefix}/info'
|
||||||
|
mandir='${prefix}/man'
|
||||||
|
|
||||||
|
# Initialize some other variables.
|
||||||
|
subdirs=
|
||||||
|
MFLAGS= MAKEFLAGS=
|
||||||
|
# Maximum number of lines to put in a shell here document.
|
||||||
|
ac_max_here_lines=12
|
||||||
|
|
||||||
|
ac_prev=
|
||||||
|
for ac_option
|
||||||
|
do
|
||||||
|
|
||||||
|
# If the previous option needs an argument, assign it.
|
||||||
|
if test -n "$ac_prev"; then
|
||||||
|
eval "$ac_prev=\$ac_option"
|
||||||
|
ac_prev=
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$ac_option" in
|
||||||
|
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||||
|
*) ac_optarg= ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Accept the important Cygnus configure options, so we can diagnose typos.
|
||||||
|
|
||||||
|
case "$ac_option" in
|
||||||
|
|
||||||
|
-bindir | --bindir | --bindi | --bind | --bin | --bi)
|
||||||
|
ac_prev=bindir ;;
|
||||||
|
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
|
||||||
|
bindir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-build | --build | --buil | --bui | --bu)
|
||||||
|
ac_prev=build ;;
|
||||||
|
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
||||||
|
build="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-cache-file | --cache-file | --cache-fil | --cache-fi \
|
||||||
|
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
|
||||||
|
ac_prev=cache_file ;;
|
||||||
|
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
|
||||||
|
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
|
||||||
|
cache_file="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
|
||||||
|
ac_prev=datadir ;;
|
||||||
|
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
|
||||||
|
| --da=*)
|
||||||
|
datadir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-disable-* | --disable-*)
|
||||||
|
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
|
||||||
|
# Reject names that are not valid shell variable names.
|
||||||
|
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
|
||||||
|
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
|
||||||
|
eval "enable_${ac_feature}=no" ;;
|
||||||
|
|
||||||
|
-enable-* | --enable-*)
|
||||||
|
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
|
||||||
|
# Reject names that are not valid shell variable names.
|
||||||
|
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
|
||||||
|
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
|
||||||
|
case "$ac_option" in
|
||||||
|
*=*) ;;
|
||||||
|
*) ac_optarg=yes ;;
|
||||||
|
esac
|
||||||
|
eval "enable_${ac_feature}='$ac_optarg'" ;;
|
||||||
|
|
||||||
|
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
|
||||||
|
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
|
||||||
|
| --exec | --exe | --ex)
|
||||||
|
ac_prev=exec_prefix ;;
|
||||||
|
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
|
||||||
|
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
|
||||||
|
| --exec=* | --exe=* | --ex=*)
|
||||||
|
exec_prefix="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-gas | --gas | --ga | --g)
|
||||||
|
# Obsolete; use --with-gas.
|
||||||
|
with_gas=yes ;;
|
||||||
|
|
||||||
|
-help | --help | --hel | --he)
|
||||||
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
|
cat << EOF
|
||||||
|
Usage: configure [options] [host]
|
||||||
|
Options: [defaults in brackets after descriptions]
|
||||||
|
Configuration:
|
||||||
|
--cache-file=FILE cache test results in FILE
|
||||||
|
--help print this message
|
||||||
|
--no-create do not create output files
|
||||||
|
--quiet, --silent do not print \`checking...' messages
|
||||||
|
--version print the version of autoconf that created configure
|
||||||
|
Directory and file names:
|
||||||
|
--prefix=PREFIX install architecture-independent files in PREFIX
|
||||||
|
[$ac_default_prefix]
|
||||||
|
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
||||||
|
[same as prefix]
|
||||||
|
--bindir=DIR user executables in DIR [EPREFIX/bin]
|
||||||
|
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
|
||||||
|
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
|
||||||
|
--datadir=DIR read-only architecture-independent data in DIR
|
||||||
|
[PREFIX/share]
|
||||||
|
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
|
||||||
|
--sharedstatedir=DIR modifiable architecture-independent data in DIR
|
||||||
|
[PREFIX/com]
|
||||||
|
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
|
||||||
|
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
|
||||||
|
--includedir=DIR C header files in DIR [PREFIX/include]
|
||||||
|
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
|
||||||
|
--infodir=DIR info documentation in DIR [PREFIX/info]
|
||||||
|
--mandir=DIR man documentation in DIR [PREFIX/man]
|
||||||
|
--srcdir=DIR find the sources in DIR [configure dir or ..]
|
||||||
|
--program-prefix=PREFIX prepend PREFIX to installed program names
|
||||||
|
--program-suffix=SUFFIX append SUFFIX to installed program names
|
||||||
|
--program-transform-name=PROGRAM
|
||||||
|
run sed PROGRAM on installed program names
|
||||||
|
EOF
|
||||||
|
cat << EOF
|
||||||
|
Host type:
|
||||||
|
--build=BUILD configure for building on BUILD [BUILD=HOST]
|
||||||
|
--host=HOST configure for HOST [guessed]
|
||||||
|
--target=TARGET configure for TARGET [TARGET=HOST]
|
||||||
|
Features and packages:
|
||||||
|
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||||
|
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||||
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
|
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||||
|
--x-includes=DIR X include files are in DIR
|
||||||
|
--x-libraries=DIR X library files are in DIR
|
||||||
|
EOF
|
||||||
|
if test -n "$ac_help"; then
|
||||||
|
echo "--enable and --with options recognized:$ac_help"
|
||||||
|
fi
|
||||||
|
exit 0 ;;
|
||||||
|
|
||||||
|
-host | --host | --hos | --ho)
|
||||||
|
ac_prev=host ;;
|
||||||
|
-host=* | --host=* | --hos=* | --ho=*)
|
||||||
|
host="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-includedir | --includedir | --includedi | --included | --include \
|
||||||
|
| --includ | --inclu | --incl | --inc)
|
||||||
|
ac_prev=includedir ;;
|
||||||
|
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
|
||||||
|
| --includ=* | --inclu=* | --incl=* | --inc=*)
|
||||||
|
includedir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-infodir | --infodir | --infodi | --infod | --info | --inf)
|
||||||
|
ac_prev=infodir ;;
|
||||||
|
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
|
||||||
|
infodir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-libdir | --libdir | --libdi | --libd)
|
||||||
|
ac_prev=libdir ;;
|
||||||
|
-libdir=* | --libdir=* | --libdi=* | --libd=*)
|
||||||
|
libdir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
|
||||||
|
| --libexe | --libex | --libe)
|
||||||
|
ac_prev=libexecdir ;;
|
||||||
|
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
|
||||||
|
| --libexe=* | --libex=* | --libe=*)
|
||||||
|
libexecdir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-localstatedir | --localstatedir | --localstatedi | --localstated \
|
||||||
|
| --localstate | --localstat | --localsta | --localst \
|
||||||
|
| --locals | --local | --loca | --loc | --lo)
|
||||||
|
ac_prev=localstatedir ;;
|
||||||
|
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
|
||||||
|
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
|
||||||
|
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
|
||||||
|
localstatedir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
|
||||||
|
ac_prev=mandir ;;
|
||||||
|
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
|
||||||
|
mandir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-nfp | --nfp | --nf)
|
||||||
|
# Obsolete; use --without-fp.
|
||||||
|
with_fp=no ;;
|
||||||
|
|
||||||
|
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
|
||||||
|
| --no-cr | --no-c)
|
||||||
|
no_create=yes ;;
|
||||||
|
|
||||||
|
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
|
||||||
|
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
|
||||||
|
no_recursion=yes ;;
|
||||||
|
|
||||||
|
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
|
||||||
|
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
|
||||||
|
| --oldin | --oldi | --old | --ol | --o)
|
||||||
|
ac_prev=oldincludedir ;;
|
||||||
|
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
|
||||||
|
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
|
||||||
|
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
|
||||||
|
oldincludedir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
|
||||||
|
ac_prev=prefix ;;
|
||||||
|
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
|
||||||
|
prefix="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-program-prefix | --program-prefix | --program-prefi | --program-pref \
|
||||||
|
| --program-pre | --program-pr | --program-p)
|
||||||
|
ac_prev=program_prefix ;;
|
||||||
|
-program-prefix=* | --program-prefix=* | --program-prefi=* \
|
||||||
|
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
|
||||||
|
program_prefix="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-program-suffix | --program-suffix | --program-suffi | --program-suff \
|
||||||
|
| --program-suf | --program-su | --program-s)
|
||||||
|
ac_prev=program_suffix ;;
|
||||||
|
-program-suffix=* | --program-suffix=* | --program-suffi=* \
|
||||||
|
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
|
||||||
|
program_suffix="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-program-transform-name | --program-transform-name \
|
||||||
|
| --program-transform-nam | --program-transform-na \
|
||||||
|
| --program-transform-n | --program-transform- \
|
||||||
|
| --program-transform | --program-transfor \
|
||||||
|
| --program-transfo | --program-transf \
|
||||||
|
| --program-trans | --program-tran \
|
||||||
|
| --progr-tra | --program-tr | --program-t)
|
||||||
|
ac_prev=program_transform_name ;;
|
||||||
|
-program-transform-name=* | --program-transform-name=* \
|
||||||
|
| --program-transform-nam=* | --program-transform-na=* \
|
||||||
|
| --program-transform-n=* | --program-transform-=* \
|
||||||
|
| --program-transform=* | --program-transfor=* \
|
||||||
|
| --program-transfo=* | --program-transf=* \
|
||||||
|
| --program-trans=* | --program-tran=* \
|
||||||
|
| --progr-tra=* | --program-tr=* | --program-t=*)
|
||||||
|
program_transform_name="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
|
||||||
|
| -silent | --silent | --silen | --sile | --sil)
|
||||||
|
silent=yes ;;
|
||||||
|
|
||||||
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||||
|
ac_prev=sbindir ;;
|
||||||
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||||
|
| --sbi=* | --sb=*)
|
||||||
|
sbindir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-sharedstatedir | --sharedstatedir | --sharedstatedi \
|
||||||
|
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
|
||||||
|
| --sharedst | --shareds | --shared | --share | --shar \
|
||||||
|
| --sha | --sh)
|
||||||
|
ac_prev=sharedstatedir ;;
|
||||||
|
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
|
||||||
|
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
|
||||||
|
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
|
||||||
|
| --sha=* | --sh=*)
|
||||||
|
sharedstatedir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-site | --site | --sit)
|
||||||
|
ac_prev=site ;;
|
||||||
|
-site=* | --site=* | --sit=*)
|
||||||
|
site="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
|
||||||
|
ac_prev=srcdir ;;
|
||||||
|
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
||||||
|
srcdir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
|
||||||
|
| --syscon | --sysco | --sysc | --sys | --sy)
|
||||||
|
ac_prev=sysconfdir ;;
|
||||||
|
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
|
||||||
|
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
|
||||||
|
sysconfdir="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-target | --target | --targe | --targ | --tar | --ta | --t)
|
||||||
|
ac_prev=target ;;
|
||||||
|
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
||||||
|
target="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-v | -verbose | --verbose | --verbos | --verbo | --verb)
|
||||||
|
verbose=yes ;;
|
||||||
|
|
||||||
|
-version | --version | --versio | --versi | --vers)
|
||||||
|
echo "configure generated by autoconf version 2.12"
|
||||||
|
exit 0 ;;
|
||||||
|
|
||||||
|
-with-* | --with-*)
|
||||||
|
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
|
||||||
|
# Reject names that are not valid shell variable names.
|
||||||
|
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
|
||||||
|
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
ac_package=`echo $ac_package| sed 's/-/_/g'`
|
||||||
|
case "$ac_option" in
|
||||||
|
*=*) ;;
|
||||||
|
*) ac_optarg=yes ;;
|
||||||
|
esac
|
||||||
|
eval "with_${ac_package}='$ac_optarg'" ;;
|
||||||
|
|
||||||
|
-without-* | --without-*)
|
||||||
|
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
|
||||||
|
# Reject names that are not valid shell variable names.
|
||||||
|
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
|
||||||
|
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
ac_package=`echo $ac_package| sed 's/-/_/g'`
|
||||||
|
eval "with_${ac_package}=no" ;;
|
||||||
|
|
||||||
|
--x)
|
||||||
|
# Obsolete; use --with-x.
|
||||||
|
with_x=yes ;;
|
||||||
|
|
||||||
|
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
|
||||||
|
| --x-incl | --x-inc | --x-in | --x-i)
|
||||||
|
ac_prev=x_includes ;;
|
||||||
|
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
|
||||||
|
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
|
||||||
|
x_includes="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-x-libraries | --x-libraries | --x-librarie | --x-librari \
|
||||||
|
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
|
||||||
|
ac_prev=x_libraries ;;
|
||||||
|
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
|
||||||
|
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
|
||||||
|
x_libraries="$ac_optarg" ;;
|
||||||
|
|
||||||
|
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
|
||||||
|
echo "configure: warning: $ac_option: invalid host type" 1>&2
|
||||||
|
fi
|
||||||
|
if test "x$nonopt" != xNONE; then
|
||||||
|
{ echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
nonopt="$ac_option"
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -n "$ac_prev"; then
|
||||||
|
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
|
||||||
|
|
||||||
|
# File descriptor usage:
|
||||||
|
# 0 standard input
|
||||||
|
# 1 file creation
|
||||||
|
# 2 errors and warnings
|
||||||
|
# 3 some systems may open it to /dev/tty
|
||||||
|
# 4 used on the Kubota Titan
|
||||||
|
# 6 checking for... messages and results
|
||||||
|
# 5 compiler messages saved in config.log
|
||||||
|
if test "$silent" = yes; then
|
||||||
|
exec 6>/dev/null
|
||||||
|
else
|
||||||
|
exec 6>&1
|
||||||
|
fi
|
||||||
|
exec 5>./config.log
|
||||||
|
|
||||||
|
echo "\
|
||||||
|
This file contains any messages produced by compilers while
|
||||||
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
" 1>&5
|
||||||
|
|
||||||
|
# Strip out --no-create and --no-recursion so they do not pile up.
|
||||||
|
# Also quote any args containing shell metacharacters.
|
||||||
|
ac_configure_args=
|
||||||
|
for ac_arg
|
||||||
|
do
|
||||||
|
case "$ac_arg" in
|
||||||
|
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
|
||||||
|
| --no-cr | --no-c) ;;
|
||||||
|
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
|
||||||
|
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
|
||||||
|
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
|
||||||
|
ac_configure_args="$ac_configure_args '$ac_arg'" ;;
|
||||||
|
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# confdefs.h avoids OS command line length limits that DEFS can exceed.
|
||||||
|
rm -rf conftest* confdefs.h
|
||||||
|
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
|
||||||
|
echo > confdefs.h
|
||||||
|
|
||||||
|
# A filename unique to this package, relative to the directory that
|
||||||
|
# configure is in, which we can look for to find out if srcdir is correct.
|
||||||
|
ac_unique_file=Makefile.in
|
||||||
|
|
||||||
|
# Find the source files, if location was not specified.
|
||||||
|
if test -z "$srcdir"; then
|
||||||
|
ac_srcdir_defaulted=yes
|
||||||
|
# Try the directory containing this script, then its parent.
|
||||||
|
ac_prog=$0
|
||||||
|
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
|
||||||
|
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
|
||||||
|
srcdir=$ac_confdir
|
||||||
|
if test ! -r $srcdir/$ac_unique_file; then
|
||||||
|
srcdir=..
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ac_srcdir_defaulted=no
|
||||||
|
fi
|
||||||
|
if test ! -r $srcdir/$ac_unique_file; then
|
||||||
|
if test "$ac_srcdir_defaulted" = yes; then
|
||||||
|
{ echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
|
||||||
|
else
|
||||||
|
{ echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
|
||||||
|
|
||||||
|
# Prefer explicitly selected file to automatically selected ones.
|
||||||
|
if test -z "$CONFIG_SITE"; then
|
||||||
|
if test "x$prefix" != xNONE; then
|
||||||
|
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
|
||||||
|
else
|
||||||
|
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
for ac_site_file in $CONFIG_SITE; do
|
||||||
|
if test -r "$ac_site_file"; then
|
||||||
|
echo "loading site script $ac_site_file"
|
||||||
|
. "$ac_site_file"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -r "$cache_file"; then
|
||||||
|
echo "loading cache $cache_file"
|
||||||
|
. $cache_file
|
||||||
|
else
|
||||||
|
echo "creating cache $cache_file"
|
||||||
|
> $cache_file
|
||||||
|
fi
|
||||||
|
|
||||||
|
ac_ext=c
|
||||||
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||||
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
|
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||||
|
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||||
|
cross_compiling=$ac_cv_prog_cc_cross
|
||||||
|
|
||||||
|
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
|
||||||
|
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
|
||||||
|
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
|
||||||
|
ac_n= ac_c='
|
||||||
|
' ac_t=' '
|
||||||
|
else
|
||||||
|
ac_n=-n ac_c= ac_t=
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
ac_n= ac_c='\c' ac_t=
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ac_aux_dir=
|
||||||
|
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
|
||||||
|
if test -f $ac_dir/install-sh; then
|
||||||
|
ac_aux_dir=$ac_dir
|
||||||
|
ac_install_sh="$ac_aux_dir/install-sh -c"
|
||||||
|
break
|
||||||
|
elif test -f $ac_dir/install.sh; then
|
||||||
|
ac_aux_dir=$ac_dir
|
||||||
|
ac_install_sh="$ac_aux_dir/install.sh -c"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$ac_aux_dir"; then
|
||||||
|
{ echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
ac_config_guess=$ac_aux_dir/config.guess
|
||||||
|
ac_config_sub=$ac_aux_dir/config.sub
|
||||||
|
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
|
||||||
|
|
||||||
|
# Find a good install program. We prefer a C program (faster),
|
||||||
|
# so one script is as good as another. But avoid the broken or
|
||||||
|
# incompatible versions:
|
||||||
|
# SysV /etc/install, /usr/sbin/install
|
||||||
|
# SunOS /usr/etc/install
|
||||||
|
# IRIX /sbin/install
|
||||||
|
# AIX /bin/install
|
||||||
|
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
|
||||||
|
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||||
|
# ./install, which can be erroneously created by make from ./install.sh.
|
||||||
|
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||||
|
echo "configure:553: checking for a BSD compatible install" >&5
|
||||||
|
if test -z "$INSTALL"; then
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
|
||||||
|
for ac_dir in $PATH; do
|
||||||
|
# Account for people who put trailing slashes in PATH elements.
|
||||||
|
case "$ac_dir/" in
|
||||||
|
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
|
||||||
|
*)
|
||||||
|
# OSF1 and SCO ODT 3.0 have their own names for install.
|
||||||
|
for ac_prog in ginstall installbsd scoinst install; do
|
||||||
|
if test -f $ac_dir/$ac_prog; then
|
||||||
|
if test $ac_prog = install &&
|
||||||
|
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
|
||||||
|
# AIX install. It has an incompatible calling convention.
|
||||||
|
# OSF/1 installbsd also uses dspmsg, but is usable.
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ac_cv_path_install="$ac_dir/$ac_prog -c"
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
IFS="$ac_save_IFS"
|
||||||
|
|
||||||
|
fi
|
||||||
|
if test "${ac_cv_path_install+set}" = set; then
|
||||||
|
INSTALL="$ac_cv_path_install"
|
||||||
|
else
|
||||||
|
# As a last resort, use the slow shell script. We don't cache a
|
||||||
|
# path for INSTALL within a source directory, because that will
|
||||||
|
# break other packages using the cache if that directory is
|
||||||
|
# removed, or if the path is relative.
|
||||||
|
INSTALL="$ac_install_sh"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "$ac_t""$INSTALL" 1>&6
|
||||||
|
|
||||||
|
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
|
||||||
|
# It thinks the first close brace ends the variable substitution.
|
||||||
|
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
|
||||||
|
|
||||||
|
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||||
|
|
||||||
|
|
||||||
|
trap '' 1 2 15
|
||||||
|
cat > confcache <<\EOF
|
||||||
|
# This file is a shell script that caches the results of configure
|
||||||
|
# tests run on this system so they can be shared between configure
|
||||||
|
# scripts and configure runs. It is not useful on other systems.
|
||||||
|
# If it contains results you don't want to keep, you may remove or edit it.
|
||||||
|
#
|
||||||
|
# By default, configure uses ./config.cache as the cache file,
|
||||||
|
# creating it if it does not exist already. You can give configure
|
||||||
|
# the --cache-file=FILE option to use a different cache file; that is
|
||||||
|
# what configure does when it calls configure scripts in
|
||||||
|
# subdirectories, so they share the cache.
|
||||||
|
# Giving --cache-file=/dev/null disables caching, for debugging configure.
|
||||||
|
# config.status only pays attention to the cache file if you give it the
|
||||||
|
# --recheck option to rerun configure.
|
||||||
|
#
|
||||||
|
EOF
|
||||||
|
# The following way of writing the cache mishandles newlines in values,
|
||||||
|
# but we know of no workaround that is simple, portable, and efficient.
|
||||||
|
# So, don't put newlines in cache variables' values.
|
||||||
|
# Ultrix sh set writes to stderr and can't be redirected directly,
|
||||||
|
# and sets the high bit in the cache file unless we assign to the vars.
|
||||||
|
(set) 2>&1 |
|
||||||
|
case `(ac_space=' '; set) 2>&1` in
|
||||||
|
*ac_space=\ *)
|
||||||
|
# `set' does not quote correctly, so add quotes (double-quote substitution
|
||||||
|
# turns \\\\ into \\, and sed turns \\ into \).
|
||||||
|
sed -n \
|
||||||
|
-e "s/'/'\\\\''/g" \
|
||||||
|
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# `set' quotes correctly as required by POSIX, so do not add quotes.
|
||||||
|
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
|
||||||
|
;;
|
||||||
|
esac >> confcache
|
||||||
|
if cmp -s $cache_file confcache; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
if test -w $cache_file; then
|
||||||
|
echo "updating cache $cache_file"
|
||||||
|
cat confcache > $cache_file
|
||||||
|
else
|
||||||
|
echo "not updating unwritable cache $cache_file"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
rm -f confcache
|
||||||
|
|
||||||
|
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
|
||||||
|
|
||||||
|
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
||||||
|
# Let make expand exec_prefix.
|
||||||
|
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
||||||
|
|
||||||
|
# Any assignment to VPATH causes Sun make to only execute
|
||||||
|
# the first set of double-colon rules, so remove it if not needed.
|
||||||
|
# If there is a colon in the path, we need to keep it.
|
||||||
|
if test "x$srcdir" = x.; then
|
||||||
|
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
|
||||||
|
fi
|
||||||
|
|
||||||
|
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
|
||||||
|
|
||||||
|
# Transform confdefs.h into DEFS.
|
||||||
|
# Protect against shell expansion while executing Makefile rules.
|
||||||
|
# Protect against Makefile macro expansion.
|
||||||
|
cat > conftest.defs <<\EOF
|
||||||
|
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
|
||||||
|
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
|
||||||
|
s%\[%\\&%g
|
||||||
|
s%\]%\\&%g
|
||||||
|
s%\$%$$%g
|
||||||
|
EOF
|
||||||
|
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
|
||||||
|
rm -f conftest.defs
|
||||||
|
|
||||||
|
|
||||||
|
# Without the "./", some shells look in PATH for config.status.
|
||||||
|
: ${CONFIG_STATUS=./config.status}
|
||||||
|
|
||||||
|
echo creating $CONFIG_STATUS
|
||||||
|
rm -f $CONFIG_STATUS
|
||||||
|
cat > $CONFIG_STATUS <<EOF
|
||||||
|
#! /bin/sh
|
||||||
|
# Generated automatically by configure.
|
||||||
|
# Run this file to recreate the current configuration.
|
||||||
|
# This directory was configured as follows,
|
||||||
|
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
|
||||||
|
#
|
||||||
|
# $0 $ac_configure_args
|
||||||
|
#
|
||||||
|
# Compiler output produced by configure, useful for debugging
|
||||||
|
# configure, is in ./config.log if it exists.
|
||||||
|
|
||||||
|
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
|
||||||
|
for ac_option
|
||||||
|
do
|
||||||
|
case "\$ac_option" in
|
||||||
|
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
|
||||||
|
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||||
|
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||||
|
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||||
|
echo "$CONFIG_STATUS generated by autoconf version 2.12"
|
||||||
|
exit 0 ;;
|
||||||
|
-help | --help | --hel | --he | --h)
|
||||||
|
echo "\$ac_cs_usage"; exit 0 ;;
|
||||||
|
*) echo "\$ac_cs_usage"; exit 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
ac_given_srcdir=$srcdir
|
||||||
|
ac_given_INSTALL="$INSTALL"
|
||||||
|
|
||||||
|
trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||||
|
EOF
|
||||||
|
cat >> $CONFIG_STATUS <<EOF
|
||||||
|
|
||||||
|
# Protect against being on the right side of a sed subst in config.status.
|
||||||
|
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
|
||||||
|
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
|
||||||
|
$ac_vpsub
|
||||||
|
$extrasub
|
||||||
|
s%@CFLAGS@%$CFLAGS%g
|
||||||
|
s%@CPPFLAGS@%$CPPFLAGS%g
|
||||||
|
s%@CXXFLAGS@%$CXXFLAGS%g
|
||||||
|
s%@DEFS@%$DEFS%g
|
||||||
|
s%@LDFLAGS@%$LDFLAGS%g
|
||||||
|
s%@LIBS@%$LIBS%g
|
||||||
|
s%@exec_prefix@%$exec_prefix%g
|
||||||
|
s%@prefix@%$prefix%g
|
||||||
|
s%@program_transform_name@%$program_transform_name%g
|
||||||
|
s%@bindir@%$bindir%g
|
||||||
|
s%@sbindir@%$sbindir%g
|
||||||
|
s%@libexecdir@%$libexecdir%g
|
||||||
|
s%@datadir@%$datadir%g
|
||||||
|
s%@sysconfdir@%$sysconfdir%g
|
||||||
|
s%@sharedstatedir@%$sharedstatedir%g
|
||||||
|
s%@localstatedir@%$localstatedir%g
|
||||||
|
s%@libdir@%$libdir%g
|
||||||
|
s%@includedir@%$includedir%g
|
||||||
|
s%@oldincludedir@%$oldincludedir%g
|
||||||
|
s%@infodir@%$infodir%g
|
||||||
|
s%@mandir@%$mandir%g
|
||||||
|
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
||||||
|
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||||
|
|
||||||
|
CEOF
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat >> $CONFIG_STATUS <<\EOF
|
||||||
|
|
||||||
|
# Split the substitutions into bite-sized pieces for seds with
|
||||||
|
# small command number limits, like on Digital OSF/1 and HP-UX.
|
||||||
|
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
|
||||||
|
ac_file=1 # Number of current file.
|
||||||
|
ac_beg=1 # First line for current file.
|
||||||
|
ac_end=$ac_max_sed_cmds # Line after last line for current file.
|
||||||
|
ac_more_lines=:
|
||||||
|
ac_sed_cmds=""
|
||||||
|
while $ac_more_lines; do
|
||||||
|
if test $ac_beg -gt 1; then
|
||||||
|
sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
|
||||||
|
else
|
||||||
|
sed "${ac_end}q" conftest.subs > conftest.s$ac_file
|
||||||
|
fi
|
||||||
|
if test ! -s conftest.s$ac_file; then
|
||||||
|
ac_more_lines=false
|
||||||
|
rm -f conftest.s$ac_file
|
||||||
|
else
|
||||||
|
if test -z "$ac_sed_cmds"; then
|
||||||
|
ac_sed_cmds="sed -f conftest.s$ac_file"
|
||||||
|
else
|
||||||
|
ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
|
||||||
|
fi
|
||||||
|
ac_file=`expr $ac_file + 1`
|
||||||
|
ac_beg=$ac_end
|
||||||
|
ac_end=`expr $ac_end + $ac_max_sed_cmds`
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if test -z "$ac_sed_cmds"; then
|
||||||
|
ac_sed_cmds=cat
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat >> $CONFIG_STATUS <<EOF
|
||||||
|
|
||||||
|
CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
|
||||||
|
EOF
|
||||||
|
cat >> $CONFIG_STATUS <<\EOF
|
||||||
|
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||||
|
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
|
||||||
|
case "$ac_file" in
|
||||||
|
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
|
||||||
|
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||||
|
*) ac_file_in="${ac_file}.in" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
|
||||||
|
|
||||||
|
# Remove last slash and all that follows it. Not all systems have dirname.
|
||||||
|
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
|
||||||
|
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
|
||||||
|
# The file is in a subdirectory.
|
||||||
|
test ! -d "$ac_dir" && mkdir "$ac_dir"
|
||||||
|
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
|
||||||
|
# A "../" for each directory in $ac_dir_suffix.
|
||||||
|
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
|
||||||
|
else
|
||||||
|
ac_dir_suffix= ac_dots=
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$ac_given_srcdir" in
|
||||||
|
.) srcdir=.
|
||||||
|
if test -z "$ac_dots"; then top_srcdir=.
|
||||||
|
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
|
||||||
|
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
|
||||||
|
*) # Relative path.
|
||||||
|
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
|
||||||
|
top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$ac_given_INSTALL" in
|
||||||
|
[/$]*) INSTALL="$ac_given_INSTALL" ;;
|
||||||
|
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo creating "$ac_file"
|
||||||
|
rm -f "$ac_file"
|
||||||
|
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
|
||||||
|
case "$ac_file" in
|
||||||
|
*Makefile*) ac_comsub="1i\\
|
||||||
|
# $configure_input" ;;
|
||||||
|
*) ac_comsub= ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
|
||||||
|
sed -e "$ac_comsub
|
||||||
|
s%@configure_input@%$configure_input%g
|
||||||
|
s%@srcdir@%$srcdir%g
|
||||||
|
s%@top_srcdir@%$top_srcdir%g
|
||||||
|
s%@INSTALL@%$INSTALL%g
|
||||||
|
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
|
||||||
|
fi; done
|
||||||
|
rm -f conftest.s*
|
||||||
|
|
||||||
|
EOF
|
||||||
|
cat >> $CONFIG_STATUS <<EOF
|
||||||
|
|
||||||
|
EOF
|
||||||
|
cat >> $CONFIG_STATUS <<\EOF
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
EOF
|
||||||
|
chmod +x $CONFIG_STATUS
|
||||||
|
rm -fr confdefs* $ac_clean_files
|
||||||
|
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|
||||||
|
|
7
etc/configure.in
Normal file
7
etc/configure.in
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
AC_PREREQ(2.5)
|
||||||
|
AC_INIT(Makefile.in)
|
||||||
|
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
|
AC_OUTPUT(Makefile)
|
893
etc/make-stds.texi
Normal file
893
etc/make-stds.texi
Normal file
@ -0,0 +1,893 @@
|
|||||||
|
@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 name @code{CFLAGS} is an exception to
|
||||||
|
this rule, but we keep it because it is 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.
|
||||||
|
|
||||||
|
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@@}.)
|
||||||
|
|
||||||
|
@c rewritten to avoid overfull hbox --tower
|
||||||
|
Do not install executables
|
||||||
|
@c 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
|
||||||
|
@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.
|
3061
etc/standards.texi
Normal file
3061
etc/standards.texi
Normal file
File diff suppressed because it is too large
Load Diff
340
include/COPYING
Normal file
340
include/COPYING
Normal 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
|
||||||
|
|
||||||
|
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.
|
1254
include/ChangeLog
Normal file
1254
include/ChangeLog
Normal file
File diff suppressed because it is too large
Load Diff
154
include/ansidecl.h
Normal file
154
include/ansidecl.h
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
/* ANSI and traditional C compatability macros
|
||||||
|
Copyright 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||||
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
|
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. */
|
||||||
|
|
||||||
|
/* ANSI and traditional C compatibility macros
|
||||||
|
|
||||||
|
ANSI C is assumed if __STDC__ is #defined.
|
||||||
|
|
||||||
|
Macro ANSI C definition Traditional C definition
|
||||||
|
----- ---- - ---------- ----------- - ----------
|
||||||
|
PTR `void *' `char *'
|
||||||
|
LONG_DOUBLE `long double' `double'
|
||||||
|
VOLATILE `volatile' `'
|
||||||
|
SIGNED `signed' `'
|
||||||
|
PTRCONST `void *const' `char *'
|
||||||
|
ANSI_PROTOTYPES 1 not defined
|
||||||
|
|
||||||
|
CONST is also defined, but is obsolete. Just use const.
|
||||||
|
|
||||||
|
obsolete -- DEFUN (name, arglist, args)
|
||||||
|
|
||||||
|
Defines function NAME.
|
||||||
|
|
||||||
|
ARGLIST lists the arguments, separated by commas and enclosed in
|
||||||
|
parentheses. ARGLIST becomes the argument list in traditional C.
|
||||||
|
|
||||||
|
ARGS list the arguments with their types. It becomes a prototype in
|
||||||
|
ANSI C, and the type declarations in traditional C. Arguments should
|
||||||
|
be separated with `AND'. For functions with a variable number of
|
||||||
|
arguments, the last thing listed should be `DOTS'.
|
||||||
|
|
||||||
|
obsolete -- DEFUN_VOID (name)
|
||||||
|
|
||||||
|
Defines a function NAME, which takes no arguments.
|
||||||
|
|
||||||
|
obsolete -- EXFUN (name, (prototype)) -- obsolete.
|
||||||
|
|
||||||
|
Replaced by PARAMS. Do not use; will disappear someday soon.
|
||||||
|
Was used in external function declarations.
|
||||||
|
In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in
|
||||||
|
parentheses). In traditional C it is `NAME()'.
|
||||||
|
For a function that takes no arguments, PROTOTYPE should be `(void)'.
|
||||||
|
|
||||||
|
obsolete -- PROTO (type, name, (prototype) -- obsolete.
|
||||||
|
|
||||||
|
This one has also been replaced by PARAMS. Do not use.
|
||||||
|
|
||||||
|
PARAMS ((args))
|
||||||
|
|
||||||
|
We could use the EXFUN macro to handle prototype declarations, but
|
||||||
|
the name is misleading and the result is ugly. So we just define a
|
||||||
|
simple macro to handle the parameter lists, as in:
|
||||||
|
|
||||||
|
static int foo PARAMS ((int, char));
|
||||||
|
|
||||||
|
This produces: `static int foo();' or `static int foo (int, char);'
|
||||||
|
|
||||||
|
EXFUN would have done it like this:
|
||||||
|
|
||||||
|
static int EXFUN (foo, (int, char));
|
||||||
|
|
||||||
|
but the function is not external...and it's hard to visually parse
|
||||||
|
the function name out of the mess. EXFUN should be considered
|
||||||
|
obsolete; new code should be written to use PARAMS.
|
||||||
|
|
||||||
|
DOTS is also obsolete.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
extern int printf PARAMS ((const char *format, ...));
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _ANSIDECL_H
|
||||||
|
|
||||||
|
#define _ANSIDECL_H 1
|
||||||
|
|
||||||
|
|
||||||
|
/* Every source file includes this file,
|
||||||
|
so they will all get the switch for lint. */
|
||||||
|
/* LINTLIBRARY */
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
|
||||||
|
/* All known AIX compilers implement these things (but don't always
|
||||||
|
define __STDC__). The RISC/OS MIPS compiler defines these things
|
||||||
|
in SVR4 mode, but does not define __STDC__. */
|
||||||
|
|
||||||
|
#define PTR void *
|
||||||
|
#define PTRCONST void *CONST
|
||||||
|
#define LONG_DOUBLE long double
|
||||||
|
|
||||||
|
#define AND ,
|
||||||
|
#define NOARGS void
|
||||||
|
#define VOLATILE volatile
|
||||||
|
#define SIGNED signed
|
||||||
|
|
||||||
|
#define PARAMS(paramlist) paramlist
|
||||||
|
#define ANSI_PROTOTYPES 1
|
||||||
|
|
||||||
|
#define VPARAMS(ARGS) ARGS
|
||||||
|
#define VA_START(va_list,var) va_start(va_list,var)
|
||||||
|
|
||||||
|
/* These are obsolete. Do not use. */
|
||||||
|
#define CONST const
|
||||||
|
#define DOTS , ...
|
||||||
|
#define PROTO(type, name, arglist) type name arglist
|
||||||
|
#define EXFUN(name, proto) name proto
|
||||||
|
#define DEFUN(name, arglist, args) name(args)
|
||||||
|
#define DEFUN_VOID(name) name(void)
|
||||||
|
|
||||||
|
#else /* Not ANSI C. */
|
||||||
|
|
||||||
|
#define PTR char *
|
||||||
|
#define PTRCONST PTR
|
||||||
|
#define LONG_DOUBLE double
|
||||||
|
|
||||||
|
#define AND ;
|
||||||
|
#define NOARGS
|
||||||
|
#ifndef const /* some systems define it in header files for non-ansi mode */
|
||||||
|
#define const
|
||||||
|
#endif
|
||||||
|
#define VOLATILE
|
||||||
|
#define SIGNED
|
||||||
|
|
||||||
|
#define PARAMS(paramlist) ()
|
||||||
|
|
||||||
|
#define VPARAMS(ARGS) (va_alist) va_dcl
|
||||||
|
#define VA_START(va_list,var) va_start(va_list)
|
||||||
|
|
||||||
|
/* These are obsolete. Do not use. */
|
||||||
|
#define CONST
|
||||||
|
#define DOTS
|
||||||
|
#define PROTO(type, name, arglist) type name ()
|
||||||
|
#define EXFUN(name, proto) name()
|
||||||
|
#define DEFUN(name, arglist, args) name arglist args;
|
||||||
|
#define DEFUN_VOID(name) name()
|
||||||
|
|
||||||
|
#endif /* ANSI C. */
|
||||||
|
|
||||||
|
#endif /* ansidecl.h */
|
90
include/demangle.h
Normal file
90
include/demangle.h
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
/* Defs for interface to demanglers.
|
||||||
|
Copyright 1992, 1995, 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 !defined (DEMANGLE_H)
|
||||||
|
#define DEMANGLE_H
|
||||||
|
|
||||||
|
#ifdef IN_GCC
|
||||||
|
#include "gansidecl.h"
|
||||||
|
#define PARAMS(ARGS) PROTO(ARGS)
|
||||||
|
#else /* ! IN_GCC */
|
||||||
|
#include <ansidecl.h>
|
||||||
|
#endif /* IN_GCC */
|
||||||
|
|
||||||
|
/* Options passed to cplus_demangle (in 2nd parameter). */
|
||||||
|
|
||||||
|
#define DMGL_NO_OPTS 0 /* For readability... */
|
||||||
|
#define DMGL_PARAMS (1 << 0) /* Include function args */
|
||||||
|
#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
|
||||||
|
#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
|
||||||
|
|
||||||
|
#define DMGL_AUTO (1 << 8)
|
||||||
|
#define DMGL_GNU (1 << 9)
|
||||||
|
#define DMGL_LUCID (1 << 10)
|
||||||
|
#define DMGL_ARM (1 << 11)
|
||||||
|
/* If none of these are set, use 'current_demangling_style' as the default. */
|
||||||
|
#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM)
|
||||||
|
|
||||||
|
/* Enumeration of possible demangling styles.
|
||||||
|
|
||||||
|
Lucid and ARM styles are still kept logically distinct, even though
|
||||||
|
they now both behave identically. The resulting style is actual the
|
||||||
|
union of both. I.E. either style recognizes both "__pt__" and "__rf__"
|
||||||
|
for operator "->", even though the first is lucid style and the second
|
||||||
|
is ARM style. (FIXME?) */
|
||||||
|
|
||||||
|
extern enum demangling_styles
|
||||||
|
{
|
||||||
|
unknown_demangling = 0,
|
||||||
|
auto_demangling = DMGL_AUTO,
|
||||||
|
gnu_demangling = DMGL_GNU,
|
||||||
|
lucid_demangling = DMGL_LUCID,
|
||||||
|
arm_demangling = DMGL_ARM
|
||||||
|
} current_demangling_style;
|
||||||
|
|
||||||
|
/* Define string names for the various demangling styles. */
|
||||||
|
|
||||||
|
#define AUTO_DEMANGLING_STYLE_STRING "auto"
|
||||||
|
#define GNU_DEMANGLING_STYLE_STRING "gnu"
|
||||||
|
#define LUCID_DEMANGLING_STYLE_STRING "lucid"
|
||||||
|
#define ARM_DEMANGLING_STYLE_STRING "arm"
|
||||||
|
|
||||||
|
/* Some macros to test what demangling style is active. */
|
||||||
|
|
||||||
|
#define CURRENT_DEMANGLING_STYLE current_demangling_style
|
||||||
|
#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO)
|
||||||
|
#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU)
|
||||||
|
#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID)
|
||||||
|
#define ARM_DEMANGLING (CURRENT_DEMANGLING_STYLE & DMGL_ARM)
|
||||||
|
|
||||||
|
extern char *
|
||||||
|
cplus_demangle PARAMS ((const char *mangled, int options));
|
||||||
|
|
||||||
|
extern int
|
||||||
|
cplus_demangle_opname PARAMS ((const char *opname, char *result, int options));
|
||||||
|
|
||||||
|
extern const char *
|
||||||
|
cplus_mangle_opname PARAMS ((const char *opname, int options));
|
||||||
|
|
||||||
|
/* Note: This sets global state. FIXME if you care about multi-threading. */
|
||||||
|
|
||||||
|
extern void
|
||||||
|
set_cplus_marker_for_demangling PARAMS ((int ch));
|
||||||
|
|
||||||
|
#endif /* DEMANGLE_H */
|
111
include/floatformat.h
Normal file
111
include/floatformat.h
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
/* IEEE floating point support declarations, for GDB, the GNU Debugger.
|
||||||
|
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GDB.
|
||||||
|
|
||||||
|
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. */
|
||||||
|
|
||||||
|
#if !defined (FLOATFORMAT_H)
|
||||||
|
#define FLOATFORMAT_H 1
|
||||||
|
|
||||||
|
#include "ansidecl.h"
|
||||||
|
|
||||||
|
/* A floatformat consists of a sign bit, an exponent and a mantissa. Once the
|
||||||
|
bytes are concatenated according to the byteorder flag, then each of those
|
||||||
|
fields is contiguous. We number the bits with 0 being the most significant
|
||||||
|
(i.e. BITS_BIG_ENDIAN type numbering), and specify which bits each field
|
||||||
|
contains with the *_start and *_len fields. */
|
||||||
|
|
||||||
|
/* What is the order of the bytes. */
|
||||||
|
|
||||||
|
enum floatformat_byteorders {
|
||||||
|
|
||||||
|
/* Standard little endian byte order.
|
||||||
|
EX: 1.2345678e10 => 00 00 80 c5 e0 fe 06 42 */
|
||||||
|
|
||||||
|
floatformat_little,
|
||||||
|
|
||||||
|
/* Standard big endian byte order.
|
||||||
|
EX: 1.2345678e10 => 42 06 fe e0 c5 80 00 00 */
|
||||||
|
|
||||||
|
floatformat_big,
|
||||||
|
|
||||||
|
/* Little endian byte order but big endian word order.
|
||||||
|
EX: 1.2345678e10 => e0 fe 06 42 00 00 80 c5 */
|
||||||
|
|
||||||
|
floatformat_littlebyte_bigword
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
enum floatformat_intbit { floatformat_intbit_yes, floatformat_intbit_no };
|
||||||
|
|
||||||
|
struct floatformat
|
||||||
|
{
|
||||||
|
enum floatformat_byteorders byteorder;
|
||||||
|
unsigned int totalsize; /* Total size of number in bits */
|
||||||
|
|
||||||
|
/* Sign bit is always one bit long. 1 means negative, 0 means positive. */
|
||||||
|
unsigned int sign_start;
|
||||||
|
|
||||||
|
unsigned int exp_start;
|
||||||
|
unsigned int exp_len;
|
||||||
|
/* Amount added to "true" exponent. 0x3fff for many IEEE extendeds. */
|
||||||
|
unsigned int exp_bias;
|
||||||
|
/* Exponent value which indicates NaN. This is the actual value stored in
|
||||||
|
the float, not adjusted by the exp_bias. This usually consists of all
|
||||||
|
one bits. */
|
||||||
|
unsigned int exp_nan;
|
||||||
|
|
||||||
|
unsigned int man_start;
|
||||||
|
unsigned int man_len;
|
||||||
|
|
||||||
|
/* Is the integer bit explicit or implicit? */
|
||||||
|
enum floatformat_intbit intbit;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* floatformats for IEEE single and double, big and little endian. */
|
||||||
|
|
||||||
|
extern const struct floatformat floatformat_ieee_single_big;
|
||||||
|
extern const struct floatformat floatformat_ieee_single_little;
|
||||||
|
extern const struct floatformat floatformat_ieee_double_big;
|
||||||
|
extern const struct floatformat floatformat_ieee_double_little;
|
||||||
|
|
||||||
|
/* floatformat for ARM IEEE double, little endian bytes and big endian words */
|
||||||
|
|
||||||
|
extern const struct floatformat floatformat_ieee_double_littlebyte_bigword;
|
||||||
|
|
||||||
|
/* floatformats for various extendeds. */
|
||||||
|
|
||||||
|
extern const struct floatformat floatformat_i387_ext;
|
||||||
|
extern const struct floatformat floatformat_m68881_ext;
|
||||||
|
extern const struct floatformat floatformat_i960_ext;
|
||||||
|
extern const struct floatformat floatformat_m88110_ext;
|
||||||
|
extern const struct floatformat floatformat_arm_ext;
|
||||||
|
|
||||||
|
/* Convert from FMT to a double.
|
||||||
|
FROM is the address of the extended float.
|
||||||
|
Store the double in *TO. */
|
||||||
|
|
||||||
|
extern void
|
||||||
|
floatformat_to_double PARAMS ((const struct floatformat *, char *, double *));
|
||||||
|
|
||||||
|
/* The converse: convert the double *FROM to FMT
|
||||||
|
and store where TO points. */
|
||||||
|
|
||||||
|
extern void
|
||||||
|
floatformat_from_double PARAMS ((const struct floatformat *,
|
||||||
|
double *, char *));
|
||||||
|
|
||||||
|
#endif /* defined (FLOATFORMAT_H) */
|
69
include/fnmatch.h
Normal file
69
include/fnmatch.h
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||||
|
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2, or (at your option) any
|
||||||
|
later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
|
#ifndef _FNMATCH_H
|
||||||
|
|
||||||
|
#define _FNMATCH_H 1
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
||||||
|
#undef __P
|
||||||
|
#define __P(args) args
|
||||||
|
#else /* Not C++ or ANSI C. */
|
||||||
|
#undef __P
|
||||||
|
#define __P(args) ()
|
||||||
|
/* We can get away without defining `const' here only because in this file
|
||||||
|
it is used only inside the prototype for `fnmatch', which is elided in
|
||||||
|
non-ANSI C where `const' is problematical. */
|
||||||
|
#endif /* C++ or ANSI C. */
|
||||||
|
|
||||||
|
|
||||||
|
/* We #undef these before defining them because some losing systems
|
||||||
|
(HP-UX A.08.07 for example) define these in <unistd.h>. */
|
||||||
|
#undef FNM_PATHNAME
|
||||||
|
#undef FNM_NOESCAPE
|
||||||
|
#undef FNM_PERIOD
|
||||||
|
|
||||||
|
/* Bits set in the FLAGS argument to `fnmatch'. */
|
||||||
|
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
|
||||||
|
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
|
||||||
|
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
|
||||||
|
|
||||||
|
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
|
||||||
|
#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
|
||||||
|
#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
|
||||||
|
#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
|
||||||
|
#define FNM_NOMATCH 1
|
||||||
|
|
||||||
|
/* Match STRING against the filename pattern PATTERN,
|
||||||
|
returning zero if it matches, FNM_NOMATCH if not. */
|
||||||
|
extern int fnmatch __P ((const char *__pattern, const char *__string,
|
||||||
|
int __flags));
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* fnmatch.h */
|
129
include/getopt.h
Normal file
129
include/getopt.h
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
/* Declarations for getopt.
|
||||||
|
Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library 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 Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef _GETOPT_H
|
||||||
|
#define _GETOPT_H 1
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* For communication from `getopt' to the caller.
|
||||||
|
When `getopt' finds an option that takes an argument,
|
||||||
|
the argument value is returned here.
|
||||||
|
Also, when `ordering' is RETURN_IN_ORDER,
|
||||||
|
each non-option ARGV-element is returned here. */
|
||||||
|
|
||||||
|
extern char *optarg;
|
||||||
|
|
||||||
|
/* Index in ARGV of the next element to be scanned.
|
||||||
|
This is used for communication to and from the caller
|
||||||
|
and for communication between successive calls to `getopt'.
|
||||||
|
|
||||||
|
On entry to `getopt', zero means this is the first call; initialize.
|
||||||
|
|
||||||
|
When `getopt' returns EOF, this is the index of the first of the
|
||||||
|
non-option elements that the caller should itself scan.
|
||||||
|
|
||||||
|
Otherwise, `optind' communicates from one call to the next
|
||||||
|
how much of ARGV has been scanned so far. */
|
||||||
|
|
||||||
|
extern int optind;
|
||||||
|
|
||||||
|
/* Callers store zero here to inhibit the error message `getopt' prints
|
||||||
|
for unrecognized options. */
|
||||||
|
|
||||||
|
extern int opterr;
|
||||||
|
|
||||||
|
/* Set to an option character which was unrecognized. */
|
||||||
|
|
||||||
|
extern int optopt;
|
||||||
|
|
||||||
|
/* Describe the long-named options requested by the application.
|
||||||
|
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
|
||||||
|
of `struct option' terminated by an element containing a name which is
|
||||||
|
zero.
|
||||||
|
|
||||||
|
The field `has_arg' is:
|
||||||
|
no_argument (or 0) if the option does not take an argument,
|
||||||
|
required_argument (or 1) if the option requires an argument,
|
||||||
|
optional_argument (or 2) if the option takes an optional argument.
|
||||||
|
|
||||||
|
If the field `flag' is not NULL, it points to a variable that is set
|
||||||
|
to the value given in the field `val' when the option is found, but
|
||||||
|
left unchanged if the option is not found.
|
||||||
|
|
||||||
|
To have a long-named option do something other than set an `int' to
|
||||||
|
a compiled-in constant, such as set a value from `optarg', set the
|
||||||
|
option's `flag' field to zero and its `val' field to a nonzero
|
||||||
|
value (the equivalent single-letter option character, if there is
|
||||||
|
one). For long options that have a zero `flag' field, `getopt'
|
||||||
|
returns the contents of the `val' field. */
|
||||||
|
|
||||||
|
struct option
|
||||||
|
{
|
||||||
|
#if __STDC__
|
||||||
|
const char *name;
|
||||||
|
#else
|
||||||
|
char *name;
|
||||||
|
#endif
|
||||||
|
/* has_arg can't be an enum because some compilers complain about
|
||||||
|
type mismatches in all the code that assumes it is an int. */
|
||||||
|
int has_arg;
|
||||||
|
int *flag;
|
||||||
|
int val;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Names for the values of the `has_arg' field of `struct option'. */
|
||||||
|
|
||||||
|
#define no_argument 0
|
||||||
|
#define required_argument 1
|
||||||
|
#define optional_argument 2
|
||||||
|
|
||||||
|
#if __STDC__
|
||||||
|
#if defined(__GNU_LIBRARY__)
|
||||||
|
/* Many other libraries have conflicting prototypes for getopt, with
|
||||||
|
differences in the consts, in stdlib.h. To avoid compilation
|
||||||
|
errors, only prototype getopt for the GNU C library. */
|
||||||
|
extern int getopt (int argc, char *const *argv, const char *shortopts);
|
||||||
|
#else /* not __GNU_LIBRARY__ */
|
||||||
|
extern int getopt ();
|
||||||
|
#endif /* not __GNU_LIBRARY__ */
|
||||||
|
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
|
||||||
|
const struct option *longopts, int *longind);
|
||||||
|
extern int getopt_long_only (int argc, char *const *argv,
|
||||||
|
const char *shortopts,
|
||||||
|
const struct option *longopts, int *longind);
|
||||||
|
|
||||||
|
/* Internal only. Users should not call this directly. */
|
||||||
|
extern int _getopt_internal (int argc, char *const *argv,
|
||||||
|
const char *shortopts,
|
||||||
|
const struct option *longopts, int *longind,
|
||||||
|
int long_only);
|
||||||
|
#else /* not __STDC__ */
|
||||||
|
extern int getopt ();
|
||||||
|
extern int getopt_long ();
|
||||||
|
extern int getopt_long_only ();
|
||||||
|
|
||||||
|
extern int _getopt_internal ();
|
||||||
|
#endif /* not __STDC__ */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _GETOPT_H */
|
161
include/libiberty.h
Normal file
161
include/libiberty.h
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
/* Function declarations for libiberty.
|
||||||
|
Written by Cygnus Support, 1994.
|
||||||
|
|
||||||
|
The libiberty library provides a number of functions which are
|
||||||
|
missing on some operating systems. We do not declare those here,
|
||||||
|
to avoid conflicts with the system header files on operating
|
||||||
|
systems that do support those functions. In this file we only
|
||||||
|
declare those functions which are specific to libiberty. */
|
||||||
|
|
||||||
|
#ifndef LIBIBERTY_H
|
||||||
|
#define LIBIBERTY_H
|
||||||
|
|
||||||
|
#include "ansidecl.h"
|
||||||
|
|
||||||
|
/* Build an argument vector from a string. Allocates memory using
|
||||||
|
malloc. Use freeargv to free the vector. */
|
||||||
|
|
||||||
|
extern char **buildargv PARAMS ((char *));
|
||||||
|
|
||||||
|
/* Free a vector returned by buildargv. */
|
||||||
|
|
||||||
|
extern void freeargv PARAMS ((char **));
|
||||||
|
|
||||||
|
/* Return the last component of a path name. Note that we can't use a
|
||||||
|
prototype here because the parameter is declared inconsistently
|
||||||
|
across different systems, sometimes as "char *" and sometimes as
|
||||||
|
"const char *" */
|
||||||
|
|
||||||
|
#if defined(__GNU_LIBRARY__ ) || defined (__linux__)
|
||||||
|
extern char *basename PARAMS ((const char *));
|
||||||
|
#else
|
||||||
|
extern char *basename ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Concatenate an arbitrary number of strings, up to (char *) NULL.
|
||||||
|
Allocates memory using xmalloc. */
|
||||||
|
|
||||||
|
extern char *concat PARAMS ((const char *, ...));
|
||||||
|
|
||||||
|
/* Check whether two file descriptors refer to the same file. */
|
||||||
|
|
||||||
|
extern int fdmatch PARAMS ((int fd1, int fd2));
|
||||||
|
|
||||||
|
/* Get the amount of time the process has run, in microseconds. */
|
||||||
|
|
||||||
|
extern long get_run_time PARAMS ((void));
|
||||||
|
|
||||||
|
/* Choose a temporary directory to use for scratch files. */
|
||||||
|
|
||||||
|
extern char *choose_temp_base PARAMS ((void));
|
||||||
|
|
||||||
|
/* Allocate memory filled with spaces. Allocates using malloc. */
|
||||||
|
|
||||||
|
extern const char *spaces PARAMS ((int count));
|
||||||
|
|
||||||
|
/* Return the maximum error number for which strerror will return a
|
||||||
|
string. */
|
||||||
|
|
||||||
|
extern int errno_max PARAMS ((void));
|
||||||
|
|
||||||
|
/* Return the name of an errno value (e.g., strerrno (EINVAL) returns
|
||||||
|
"EINVAL"). */
|
||||||
|
|
||||||
|
extern const char *strerrno PARAMS ((int));
|
||||||
|
|
||||||
|
/* Given the name of an errno value, return the value. */
|
||||||
|
|
||||||
|
extern int strtoerrno PARAMS ((const char *));
|
||||||
|
|
||||||
|
/* ANSI's strerror(), but more robust. */
|
||||||
|
|
||||||
|
extern char *xstrerror PARAMS ((int));
|
||||||
|
|
||||||
|
/* Return the maximum signal number for which strsignal will return a
|
||||||
|
string. */
|
||||||
|
|
||||||
|
extern int signo_max PARAMS ((void));
|
||||||
|
|
||||||
|
/* Return a signal message string for a signal number
|
||||||
|
(e.g., strsignal (SIGHUP) returns something like "Hangup"). */
|
||||||
|
/* This is commented out as it can conflict with one in system headers.
|
||||||
|
We still document its existence though. */
|
||||||
|
|
||||||
|
/*extern const char *strsignal PARAMS ((int));*/
|
||||||
|
|
||||||
|
/* Return the name of a signal number (e.g., strsigno (SIGHUP) returns
|
||||||
|
"SIGHUP"). */
|
||||||
|
|
||||||
|
extern const char *strsigno PARAMS ((int));
|
||||||
|
|
||||||
|
/* Given the name of a signal, return its number. */
|
||||||
|
|
||||||
|
extern int strtosigno PARAMS ((const char *));
|
||||||
|
|
||||||
|
/* Register a function to be run by xexit. Returns 0 on success. */
|
||||||
|
|
||||||
|
extern int xatexit PARAMS ((void (*fn) (void)));
|
||||||
|
|
||||||
|
/* Exit, calling all the functions registered with xatexit. */
|
||||||
|
|
||||||
|
#ifndef __GNUC__
|
||||||
|
extern void xexit PARAMS ((int status));
|
||||||
|
#else
|
||||||
|
typedef void libiberty_voidfn PARAMS ((int status));
|
||||||
|
__volatile__ libiberty_voidfn xexit;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Set the program name used by xmalloc. */
|
||||||
|
|
||||||
|
extern void xmalloc_set_program_name PARAMS ((const char *));
|
||||||
|
|
||||||
|
/* Allocate memory without fail. If malloc fails, this will print a
|
||||||
|
message to stderr (using the name set by xmalloc_set_program_name,
|
||||||
|
if any) and then call xexit. */
|
||||||
|
|
||||||
|
#ifdef ANSI_PROTOTYPES
|
||||||
|
/* Get a definition for size_t. */
|
||||||
|
#include <stddef.h>
|
||||||
|
#endif
|
||||||
|
extern PTR xmalloc PARAMS ((size_t));
|
||||||
|
|
||||||
|
/* Reallocate memory without fail. This works like xmalloc.
|
||||||
|
|
||||||
|
FIXME: We do not declare the parameter types for the same reason as
|
||||||
|
xmalloc. */
|
||||||
|
|
||||||
|
extern PTR xrealloc PARAMS ((PTR, size_t));
|
||||||
|
|
||||||
|
/* Copy a string into a memory buffer without fail. */
|
||||||
|
|
||||||
|
extern char *xstrdup PARAMS ((const char *));
|
||||||
|
|
||||||
|
/* hex character manipulation routines */
|
||||||
|
|
||||||
|
#define _hex_array_size 256
|
||||||
|
#define _hex_bad 99
|
||||||
|
extern char _hex_value[_hex_array_size];
|
||||||
|
extern void hex_init PARAMS ((void));
|
||||||
|
#define hex_p(c) (hex_value (c) != _hex_bad)
|
||||||
|
/* If you change this, note well: Some code relies on side effects in
|
||||||
|
the argument being performed exactly once. */
|
||||||
|
#define hex_value(c) (_hex_value[(unsigned char) (c)])
|
||||||
|
|
||||||
|
/* Definitions used by the pexecute routine. */
|
||||||
|
|
||||||
|
#define PEXECUTE_FIRST 1
|
||||||
|
#define PEXECUTE_LAST 2
|
||||||
|
#define PEXECUTE_ONE (PEXECUTE_FIRST + PEXECUTE_LAST)
|
||||||
|
#define PEXECUTE_SEARCH 4
|
||||||
|
#define PEXECUTE_VERBOSE 8
|
||||||
|
|
||||||
|
/* Execute a program. */
|
||||||
|
|
||||||
|
extern int pexecute PARAMS ((const char *, char * const *, const char *,
|
||||||
|
const char *, char **, char **, int));
|
||||||
|
|
||||||
|
/* Wait for pexecute to finish. */
|
||||||
|
|
||||||
|
extern int pwait PARAMS ((int, int *, int));
|
||||||
|
|
||||||
|
#endif /* ! defined (LIBIBERTY_H) */
|
115
include/objalloc.h
Normal file
115
include/objalloc.h
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
/* objalloc.h -- routines to allocate memory for objects
|
||||||
|
Copyright 1997 Free Software Foundation, Inc.
|
||||||
|
Written by Ian Lance Taylor, Cygnus Solutions.
|
||||||
|
|
||||||
|
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, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
|
#ifndef OBJALLOC_H
|
||||||
|
#define OBJALLOC_H
|
||||||
|
|
||||||
|
#include "ansidecl.h"
|
||||||
|
|
||||||
|
/* These routines allocate space for an object. The assumption is
|
||||||
|
that the object will want to allocate space as it goes along, but
|
||||||
|
will never want to free any particular block. There is a function
|
||||||
|
to free a block, which also frees all more recently allocated
|
||||||
|
blocks. There is also a function to free all the allocated space.
|
||||||
|
|
||||||
|
This is essentially a specialization of obstacks. The main
|
||||||
|
difference is that a block may not be allocated a bit at a time.
|
||||||
|
Another difference is that these routines are always built on top
|
||||||
|
of malloc, and always pass an malloc failure back to the caller,
|
||||||
|
unlike more recent versions of obstacks. */
|
||||||
|
|
||||||
|
/* This is what an objalloc structure looks like. Callers should not
|
||||||
|
refer to these fields, nor should they allocate these structure
|
||||||
|
themselves. Instead, they should only create them via
|
||||||
|
objalloc_init, and only access them via the functions and macros
|
||||||
|
listed below. The structure is only defined here so that we can
|
||||||
|
access it via macros. */
|
||||||
|
|
||||||
|
struct objalloc
|
||||||
|
{
|
||||||
|
char *current_ptr;
|
||||||
|
unsigned int current_space;
|
||||||
|
PTR chunks;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Work out the required alignment. */
|
||||||
|
|
||||||
|
struct objalloc_align { char x; double d; };
|
||||||
|
|
||||||
|
#if defined (__STDC__) && __STDC__
|
||||||
|
#ifndef offsetof
|
||||||
|
#include <stddef.h>
|
||||||
|
#endif
|
||||||
|
#define OBJALLOC_ALIGN \
|
||||||
|
((ptrdiff_t) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
|
||||||
|
#else
|
||||||
|
#define OBJALLOC_ALIGN \
|
||||||
|
((long) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Create an objalloc structure. Returns NULL if malloc fails. */
|
||||||
|
|
||||||
|
extern struct objalloc *objalloc_create PARAMS ((void));
|
||||||
|
|
||||||
|
/* Allocate space from an objalloc structure. Returns NULL if malloc
|
||||||
|
fails. */
|
||||||
|
|
||||||
|
extern PTR _objalloc_alloc PARAMS ((struct objalloc *, unsigned long));
|
||||||
|
|
||||||
|
/* The macro version of objalloc_alloc. We only define this if using
|
||||||
|
gcc, because otherwise we would have to evaluate the arguments
|
||||||
|
multiple times, or use a temporary field as obstack.h does. */
|
||||||
|
|
||||||
|
#if defined (__GNUC__) && defined (__STDC__) && __STDC__
|
||||||
|
|
||||||
|
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
|
||||||
|
does not implement __extension__. But that compiler doesn't define
|
||||||
|
__GNUC_MINOR__. */
|
||||||
|
#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
|
||||||
|
#define __extension__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define objalloc_alloc(o, l) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct objalloc *__o = (o); \
|
||||||
|
unsigned long __len = (l); \
|
||||||
|
if (__len == 0) \
|
||||||
|
__len = 1; \
|
||||||
|
__len = (__len + OBJALLOC_ALIGN - 1) &~ (OBJALLOC_ALIGN - 1); \
|
||||||
|
(__len <= __o->current_space \
|
||||||
|
? (__o->current_ptr += __len, \
|
||||||
|
__o->current_space -= __len, \
|
||||||
|
(PTR) (__o->current_ptr - __len)) \
|
||||||
|
: _objalloc_alloc (__o, __len)); })
|
||||||
|
|
||||||
|
#else /* ! __GNUC__ */
|
||||||
|
|
||||||
|
#define objalloc_alloc(o, l) _objalloc_alloc ((o), (l))
|
||||||
|
|
||||||
|
#endif /* ! __GNUC__ */
|
||||||
|
|
||||||
|
/* Free an entire objalloc structure. */
|
||||||
|
|
||||||
|
extern void objalloc_free PARAMS ((struct objalloc *));
|
||||||
|
|
||||||
|
/* Free a block allocated by objalloc_alloc. This also frees all more
|
||||||
|
recently allocated blocks. */
|
||||||
|
|
||||||
|
extern void objalloc_free_block PARAMS ((struct objalloc *, PTR));
|
||||||
|
|
||||||
|
#endif /* OBJALLOC_H */
|
570
include/obstack.h
Normal file
570
include/obstack.h
Normal file
@ -0,0 +1,570 @@
|
|||||||
|
/* obstack.h - object stack macros
|
||||||
|
Copyright (C) 1988,89,90,91,92,93,94,96 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
|
/* Summary:
|
||||||
|
|
||||||
|
All the apparent functions defined here are macros. The idea
|
||||||
|
is that you would use these pre-tested macros to solve a
|
||||||
|
very specific set of problems, and they would run fast.
|
||||||
|
Caution: no side-effects in arguments please!! They may be
|
||||||
|
evaluated MANY times!!
|
||||||
|
|
||||||
|
These macros operate a stack of objects. Each object starts life
|
||||||
|
small, and may grow to maturity. (Consider building a word syllable
|
||||||
|
by syllable.) An object can move while it is growing. Once it has
|
||||||
|
been "finished" it never changes address again. So the "top of the
|
||||||
|
stack" is typically an immature growing object, while the rest of the
|
||||||
|
stack is of mature, fixed size and fixed address objects.
|
||||||
|
|
||||||
|
These routines grab large chunks of memory, using a function you
|
||||||
|
supply, called `obstack_chunk_alloc'. On occasion, they free chunks,
|
||||||
|
by calling `obstack_chunk_free'. You must define them and declare
|
||||||
|
them before using any obstack macros.
|
||||||
|
|
||||||
|
Each independent stack is represented by a `struct obstack'.
|
||||||
|
Each of the obstack macros expects a pointer to such a structure
|
||||||
|
as the first argument.
|
||||||
|
|
||||||
|
One motivation for this package is the problem of growing char strings
|
||||||
|
in symbol tables. Unless you are "fascist pig with a read-only mind"
|
||||||
|
--Gosper's immortal quote from HAKMEM item 154, out of context--you
|
||||||
|
would not like to put any arbitrary upper limit on the length of your
|
||||||
|
symbols.
|
||||||
|
|
||||||
|
In practice this often means you will build many short symbols and a
|
||||||
|
few long symbols. At the time you are reading a symbol you don't know
|
||||||
|
how long it is. One traditional method is to read a symbol into a
|
||||||
|
buffer, realloc()ating the buffer every time you try to read a symbol
|
||||||
|
that is longer than the buffer. This is beaut, but you still will
|
||||||
|
want to copy the symbol from the buffer to a more permanent
|
||||||
|
symbol-table entry say about half the time.
|
||||||
|
|
||||||
|
With obstacks, you can work differently. Use one obstack for all symbol
|
||||||
|
names. As you read a symbol, grow the name in the obstack gradually.
|
||||||
|
When the name is complete, finalize it. Then, if the symbol exists already,
|
||||||
|
free the newly read name.
|
||||||
|
|
||||||
|
The way we do this is to take a large chunk, allocating memory from
|
||||||
|
low addresses. When you want to build a symbol in the chunk you just
|
||||||
|
add chars above the current "high water mark" in the chunk. When you
|
||||||
|
have finished adding chars, because you got to the end of the symbol,
|
||||||
|
you know how long the chars are, and you can create a new object.
|
||||||
|
Mostly the chars will not burst over the highest address of the chunk,
|
||||||
|
because you would typically expect a chunk to be (say) 100 times as
|
||||||
|
long as an average object.
|
||||||
|
|
||||||
|
In case that isn't clear, when we have enough chars to make up
|
||||||
|
the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
|
||||||
|
so we just point to it where it lies. No moving of chars is
|
||||||
|
needed and this is the second win: potentially long strings need
|
||||||
|
never be explicitly shuffled. Once an object is formed, it does not
|
||||||
|
change its address during its lifetime.
|
||||||
|
|
||||||
|
When the chars burst over a chunk boundary, we allocate a larger
|
||||||
|
chunk, and then copy the partly formed object from the end of the old
|
||||||
|
chunk to the beginning of the new larger chunk. We then carry on
|
||||||
|
accreting characters to the end of the object as we normally would.
|
||||||
|
|
||||||
|
A special macro is provided to add a single char at a time to a
|
||||||
|
growing object. This allows the use of register variables, which
|
||||||
|
break the ordinary 'growth' macro.
|
||||||
|
|
||||||
|
Summary:
|
||||||
|
We allocate large chunks.
|
||||||
|
We carve out one object at a time from the current chunk.
|
||||||
|
Once carved, an object never moves.
|
||||||
|
We are free to append data of any size to the currently
|
||||||
|
growing object.
|
||||||
|
Exactly one object is growing in an obstack at any one time.
|
||||||
|
You can run one obstack per control block.
|
||||||
|
You may have as many control blocks as you dare.
|
||||||
|
Because of the way we do it, you can `unwind' an obstack
|
||||||
|
back to a previous state. (You may remove objects much
|
||||||
|
as you would with a stack.)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* Don't do the contents of this file more than once. */
|
||||||
|
|
||||||
|
#ifndef __OBSTACK_H__
|
||||||
|
#define __OBSTACK_H__
|
||||||
|
|
||||||
|
/* We use subtraction of (char *) 0 instead of casting to int
|
||||||
|
because on word-addressable machines a simple cast to int
|
||||||
|
may ignore the byte-within-word field of the pointer. */
|
||||||
|
|
||||||
|
#ifndef __PTR_TO_INT
|
||||||
|
#define __PTR_TO_INT(P) ((P) - (char *) 0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __INT_TO_PTR
|
||||||
|
#define __INT_TO_PTR(P) ((P) + (char *) 0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* We need the type of the resulting object. In ANSI C it is ptrdiff_t
|
||||||
|
but in traditional C it is usually long. If we are in ANSI C and
|
||||||
|
don't already have ptrdiff_t get it. */
|
||||||
|
|
||||||
|
#if defined (__STDC__) && __STDC__ && ! defined (offsetof)
|
||||||
|
#if defined (__GNUC__) && defined (IN_GCC)
|
||||||
|
/* On Next machine, the system's stddef.h screws up if included
|
||||||
|
after we have defined just ptrdiff_t, so include all of stddef.h.
|
||||||
|
Otherwise, define just ptrdiff_t, which is all we need. */
|
||||||
|
#ifndef __NeXT__
|
||||||
|
#define __need_ptrdiff_t
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (__STDC__) && __STDC__
|
||||||
|
#define PTR_INT_TYPE ptrdiff_t
|
||||||
|
#else
|
||||||
|
#define PTR_INT_TYPE long
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct _obstack_chunk /* Lives at front of each chunk. */
|
||||||
|
{
|
||||||
|
char *limit; /* 1 past end of this chunk */
|
||||||
|
struct _obstack_chunk *prev; /* address of prior chunk or NULL */
|
||||||
|
char contents[4]; /* objects begin here */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct obstack /* control current object in current chunk */
|
||||||
|
{
|
||||||
|
long chunk_size; /* preferred size to allocate chunks in */
|
||||||
|
struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
|
||||||
|
char *object_base; /* address of object we are building */
|
||||||
|
char *next_free; /* where to add next char to current object */
|
||||||
|
char *chunk_limit; /* address of char after current chunk */
|
||||||
|
PTR_INT_TYPE temp; /* Temporary for some macros. */
|
||||||
|
int alignment_mask; /* Mask of alignment for each object. */
|
||||||
|
#if defined (__STDC__) && __STDC__
|
||||||
|
/* These prototypes vary based on `use_extra_arg', and we use
|
||||||
|
casts to the prototypeless function type in all assignments,
|
||||||
|
but having prototypes here quiets -Wstrict-prototypes. */
|
||||||
|
struct _obstack_chunk *(*chunkfun) (void *, long);
|
||||||
|
void (*freefun) (void *, struct _obstack_chunk *);
|
||||||
|
void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
|
||||||
|
#else
|
||||||
|
struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
|
||||||
|
void (*freefun) (); /* User's function to free a chunk. */
|
||||||
|
char *extra_arg; /* first arg for chunk alloc/dealloc funcs */
|
||||||
|
#endif
|
||||||
|
unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
|
||||||
|
unsigned maybe_empty_object:1;/* There is a possibility that the current
|
||||||
|
chunk contains a zero-length object. This
|
||||||
|
prevents freeing the chunk if we allocate
|
||||||
|
a bigger chunk to replace it. */
|
||||||
|
unsigned alloc_failed:1; /* chunk alloc func returned 0 */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Declare the external functions we use; they are in obstack.c. */
|
||||||
|
|
||||||
|
#if defined (__STDC__) && __STDC__
|
||||||
|
extern void _obstack_newchunk (struct obstack *, int);
|
||||||
|
extern void _obstack_free (struct obstack *, void *);
|
||||||
|
extern int _obstack_begin (struct obstack *, int, int,
|
||||||
|
void *(*) (long), void (*) (void *));
|
||||||
|
extern int _obstack_begin_1 (struct obstack *, int, int,
|
||||||
|
void *(*) (void *, long),
|
||||||
|
void (*) (void *, void *), void *);
|
||||||
|
/* CYGNUS LOCAL */
|
||||||
|
extern int _obstack_memory_used (struct obstack *);
|
||||||
|
/* END CYGNUS LOCAL */
|
||||||
|
#else
|
||||||
|
extern void _obstack_newchunk ();
|
||||||
|
extern void _obstack_free ();
|
||||||
|
extern int _obstack_begin ();
|
||||||
|
extern int _obstack_begin_1 ();
|
||||||
|
/* CYGNUS LOCAL */
|
||||||
|
extern int _obstack_memory_used ();
|
||||||
|
/* END CYGNUS LOCAL */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined (__STDC__) && __STDC__
|
||||||
|
|
||||||
|
/* Do the function-declarations after the structs
|
||||||
|
but before defining the macros. */
|
||||||
|
|
||||||
|
void obstack_init (struct obstack *obstack);
|
||||||
|
|
||||||
|
void * obstack_alloc (struct obstack *obstack, int size);
|
||||||
|
|
||||||
|
void * obstack_copy (struct obstack *obstack, void *address, int size);
|
||||||
|
void * obstack_copy0 (struct obstack *obstack, void *address, int size);
|
||||||
|
|
||||||
|
void obstack_free (struct obstack *obstack, void *block);
|
||||||
|
|
||||||
|
void obstack_blank (struct obstack *obstack, int size);
|
||||||
|
|
||||||
|
void obstack_grow (struct obstack *obstack, void *data, int size);
|
||||||
|
void obstack_grow0 (struct obstack *obstack, void *data, int size);
|
||||||
|
|
||||||
|
void obstack_1grow (struct obstack *obstack, int data_char);
|
||||||
|
void obstack_ptr_grow (struct obstack *obstack, void *data);
|
||||||
|
void obstack_int_grow (struct obstack *obstack, int data);
|
||||||
|
|
||||||
|
void * obstack_finish (struct obstack *obstack);
|
||||||
|
|
||||||
|
int obstack_object_size (struct obstack *obstack);
|
||||||
|
|
||||||
|
int obstack_room (struct obstack *obstack);
|
||||||
|
void obstack_1grow_fast (struct obstack *obstack, int data_char);
|
||||||
|
void obstack_ptr_grow_fast (struct obstack *obstack, void *data);
|
||||||
|
void obstack_int_grow_fast (struct obstack *obstack, int data);
|
||||||
|
void obstack_blank_fast (struct obstack *obstack, int size);
|
||||||
|
|
||||||
|
void * obstack_base (struct obstack *obstack);
|
||||||
|
void * obstack_next_free (struct obstack *obstack);
|
||||||
|
int obstack_alignment_mask (struct obstack *obstack);
|
||||||
|
int obstack_chunk_size (struct obstack *obstack);
|
||||||
|
/* CYGNUS LOCAL */
|
||||||
|
int obstack_memory_used (struct obstack *obstack);
|
||||||
|
/* END CYGNUS LOCAL */
|
||||||
|
|
||||||
|
#endif /* __STDC__ */
|
||||||
|
|
||||||
|
/* Non-ANSI C cannot really support alternative functions for these macros,
|
||||||
|
so we do not declare them. */
|
||||||
|
|
||||||
|
/* Pointer to beginning of object being allocated or to be allocated next.
|
||||||
|
Note that this might not be the final address of the object
|
||||||
|
because a new chunk might be needed to hold the final size. */
|
||||||
|
|
||||||
|
#define obstack_base(h) ((h)->alloc_failed ? 0 : (h)->object_base)
|
||||||
|
|
||||||
|
/* Size for allocating ordinary chunks. */
|
||||||
|
|
||||||
|
#define obstack_chunk_size(h) ((h)->chunk_size)
|
||||||
|
|
||||||
|
/* Pointer to next byte not yet allocated in current chunk. */
|
||||||
|
|
||||||
|
#define obstack_next_free(h) ((h)->alloc_failed ? 0 : (h)->next_free)
|
||||||
|
|
||||||
|
/* Mask specifying low bits that should be clear in address of an object. */
|
||||||
|
|
||||||
|
#define obstack_alignment_mask(h) ((h)->alignment_mask)
|
||||||
|
|
||||||
|
/* To prevent prototype warnings provide complete argument list in
|
||||||
|
standard C version. */
|
||||||
|
#if defined (__STDC__) && __STDC__
|
||||||
|
|
||||||
|
#define obstack_init(h) \
|
||||||
|
_obstack_begin ((h), 0, 0, \
|
||||||
|
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
|
||||||
|
|
||||||
|
#define obstack_begin(h, size) \
|
||||||
|
_obstack_begin ((h), (size), 0, \
|
||||||
|
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
|
||||||
|
|
||||||
|
#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
|
||||||
|
_obstack_begin ((h), (size), (alignment), \
|
||||||
|
(void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
|
||||||
|
|
||||||
|
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
|
||||||
|
_obstack_begin_1 ((h), (size), (alignment), \
|
||||||
|
(void *(*) (void *, long)) (chunkfun), \
|
||||||
|
(void (*) (void *, void *)) (freefun), (arg))
|
||||||
|
|
||||||
|
#define obstack_chunkfun(h, newchunkfun) \
|
||||||
|
((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
|
||||||
|
|
||||||
|
#define obstack_freefun(h, newfreefun) \
|
||||||
|
((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define obstack_init(h) \
|
||||||
|
_obstack_begin ((h), 0, 0, \
|
||||||
|
(void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
|
||||||
|
|
||||||
|
#define obstack_begin(h, size) \
|
||||||
|
_obstack_begin ((h), (size), 0, \
|
||||||
|
(void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
|
||||||
|
|
||||||
|
#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
|
||||||
|
_obstack_begin ((h), (size), (alignment), \
|
||||||
|
(void *(*) ()) (chunkfun), (void (*) ()) (freefun))
|
||||||
|
|
||||||
|
#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
|
||||||
|
_obstack_begin_1 ((h), (size), (alignment), \
|
||||||
|
(void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg))
|
||||||
|
|
||||||
|
#define obstack_chunkfun(h, newchunkfun) \
|
||||||
|
((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
|
||||||
|
|
||||||
|
#define obstack_freefun(h, newfreefun) \
|
||||||
|
((h) -> freefun = (void (*)()) (newfreefun))
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
|
||||||
|
|
||||||
|
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
|
||||||
|
|
||||||
|
/* CYGNUS LOCAL */
|
||||||
|
#define obstack_memory_used(h) _obstack_memory_used (h)
|
||||||
|
/* END CYGNUS LOCAL */
|
||||||
|
|
||||||
|
#if defined (__GNUC__) && defined (__STDC__) && __STDC__
|
||||||
|
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
|
||||||
|
does not implement __extension__. But that compiler doesn't define
|
||||||
|
__GNUC_MINOR__. */
|
||||||
|
#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
|
||||||
|
#define __extension__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* For GNU C, if not -traditional,
|
||||||
|
we can define these macros to compute all args only once
|
||||||
|
without using a global variable.
|
||||||
|
Also, we can avoid using the `temp' slot, to make faster code. */
|
||||||
|
|
||||||
|
#define obstack_object_size(OBSTACK) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__o = (OBSTACK); \
|
||||||
|
__o->alloc_failed ? 0 : \
|
||||||
|
(unsigned) (__o->next_free - __o->object_base); })
|
||||||
|
|
||||||
|
#define obstack_room(OBSTACK) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__o = (OBSTACK); \
|
||||||
|
(unsigned) (__o->chunk_limit - __o->next_free); })
|
||||||
|
|
||||||
|
#define obstack_grow(OBSTACK,where,length) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__o = (OBSTACK); \
|
||||||
|
int __len = (length); \
|
||||||
|
if (__o->next_free + __len > __o->chunk_limit) \
|
||||||
|
_obstack_newchunk (__o, __len); \
|
||||||
|
if (!__o->alloc_failed) \
|
||||||
|
{ \
|
||||||
|
memcpy (__o->next_free, (char *) (where), __len); \
|
||||||
|
__o->next_free += __len; \
|
||||||
|
} \
|
||||||
|
(void) 0; })
|
||||||
|
|
||||||
|
#define obstack_grow0(OBSTACK,where,length) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__o = (OBSTACK); \
|
||||||
|
int __len = (length); \
|
||||||
|
if (__o->next_free + __len + 1 > __o->chunk_limit) \
|
||||||
|
_obstack_newchunk (__o, __len + 1); \
|
||||||
|
if (!__o->alloc_failed) \
|
||||||
|
{ \
|
||||||
|
memcpy (__o->next_free, (char *) (where), __len); \
|
||||||
|
__o->next_free += __len; \
|
||||||
|
*(__o->next_free)++ = 0; \
|
||||||
|
} \
|
||||||
|
(void) 0; })
|
||||||
|
|
||||||
|
#define obstack_1grow(OBSTACK,datum) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__o = (OBSTACK); \
|
||||||
|
if (__o->next_free + 1 > __o->chunk_limit) \
|
||||||
|
_obstack_newchunk (__o, 1); \
|
||||||
|
if (!__o->alloc_failed) \
|
||||||
|
*(__o->next_free)++ = (datum); \
|
||||||
|
(void) 0; })
|
||||||
|
|
||||||
|
/* These assume that the obstack alignment is good enough for pointers or ints,
|
||||||
|
and that the data added so far to the current object
|
||||||
|
shares that much alignment. */
|
||||||
|
|
||||||
|
#define obstack_ptr_grow(OBSTACK,datum) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__o = (OBSTACK); \
|
||||||
|
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
|
||||||
|
_obstack_newchunk (__o, sizeof (void *)); \
|
||||||
|
if (!__o->alloc_failed) \
|
||||||
|
*((void **)__o->next_free)++ = ((void *)datum); \
|
||||||
|
(void) 0; })
|
||||||
|
|
||||||
|
#define obstack_int_grow(OBSTACK,datum) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__o = (OBSTACK); \
|
||||||
|
if (__o->next_free + sizeof (int) > __o->chunk_limit) \
|
||||||
|
_obstack_newchunk (__o, sizeof (int)); \
|
||||||
|
if (!__o->alloc_failed) \
|
||||||
|
*((int *)__o->next_free)++ = ((int)datum); \
|
||||||
|
(void) 0; })
|
||||||
|
|
||||||
|
#define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
|
||||||
|
#define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
|
||||||
|
|
||||||
|
#define obstack_blank(OBSTACK,length) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__o = (OBSTACK); \
|
||||||
|
int __len = (length); \
|
||||||
|
if (__o->chunk_limit - __o->next_free < __len) \
|
||||||
|
_obstack_newchunk (__o, __len); \
|
||||||
|
if (!__o->alloc_failed) \
|
||||||
|
__o->next_free += __len; \
|
||||||
|
(void) 0; })
|
||||||
|
|
||||||
|
#define obstack_alloc(OBSTACK,length) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__h = (OBSTACK); \
|
||||||
|
obstack_blank (__h, (length)); \
|
||||||
|
obstack_finish (__h); })
|
||||||
|
|
||||||
|
#define obstack_copy(OBSTACK,where,length) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__h = (OBSTACK); \
|
||||||
|
obstack_grow (__h, (where), (length)); \
|
||||||
|
obstack_finish (__h); })
|
||||||
|
|
||||||
|
#define obstack_copy0(OBSTACK,where,length) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__h = (OBSTACK); \
|
||||||
|
obstack_grow0 (__h, (where), (length)); \
|
||||||
|
obstack_finish (__h); })
|
||||||
|
|
||||||
|
/* The local variable is named __o1 to avoid a name conflict
|
||||||
|
when obstack_blank is called. */
|
||||||
|
#define obstack_finish(OBSTACK) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__o1 = (OBSTACK); \
|
||||||
|
void *value; \
|
||||||
|
if (__o1->alloc_failed) \
|
||||||
|
value = 0; \
|
||||||
|
else \
|
||||||
|
{ \
|
||||||
|
value = (void *) __o1->object_base; \
|
||||||
|
if (__o1->next_free == value) \
|
||||||
|
__o1->maybe_empty_object = 1; \
|
||||||
|
__o1->next_free \
|
||||||
|
= __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
|
||||||
|
& ~ (__o1->alignment_mask)); \
|
||||||
|
if (__o1->next_free - (char *)__o1->chunk \
|
||||||
|
> __o1->chunk_limit - (char *)__o1->chunk) \
|
||||||
|
__o1->next_free = __o1->chunk_limit; \
|
||||||
|
__o1->object_base = __o1->next_free; \
|
||||||
|
} \
|
||||||
|
value; })
|
||||||
|
|
||||||
|
#define obstack_free(OBSTACK, OBJ) \
|
||||||
|
__extension__ \
|
||||||
|
({ struct obstack *__o = (OBSTACK); \
|
||||||
|
void *__obj = (OBJ); \
|
||||||
|
if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
|
||||||
|
__o->next_free = __o->object_base = __obj; \
|
||||||
|
else (obstack_free) (__o, __obj); })
|
||||||
|
|
||||||
|
#else /* not __GNUC__ or not __STDC__ */
|
||||||
|
|
||||||
|
#define obstack_object_size(h) \
|
||||||
|
(unsigned) ((h)->alloc_failed ? 0 : (h)->next_free - (h)->object_base)
|
||||||
|
|
||||||
|
#define obstack_room(h) \
|
||||||
|
(unsigned) ((h)->chunk_limit - (h)->next_free)
|
||||||
|
|
||||||
|
/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
|
||||||
|
so that we can avoid having void expressions
|
||||||
|
in the arms of the conditional expression.
|
||||||
|
Casting the third operand to void was tried before,
|
||||||
|
but some compilers won't accept it. */
|
||||||
|
|
||||||
|
#define obstack_grow(h,where,length) \
|
||||||
|
( (h)->temp = (length), \
|
||||||
|
(((h)->next_free + (h)->temp > (h)->chunk_limit) \
|
||||||
|
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
|
||||||
|
((h)->alloc_failed ? 0 : \
|
||||||
|
(memcpy ((h)->next_free, (char *) (where), (h)->temp), \
|
||||||
|
(h)->next_free += (h)->temp)))
|
||||||
|
|
||||||
|
#define obstack_grow0(h,where,length) \
|
||||||
|
( (h)->temp = (length), \
|
||||||
|
(((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
|
||||||
|
? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
|
||||||
|
((h)->alloc_failed ? 0 : \
|
||||||
|
(memcpy ((h)->next_free, (char *) (where), (h)->temp), \
|
||||||
|
(h)->next_free += (h)->temp, \
|
||||||
|
*((h)->next_free)++ = 0)))
|
||||||
|
|
||||||
|
#define obstack_1grow(h,datum) \
|
||||||
|
( (((h)->next_free + 1 > (h)->chunk_limit) \
|
||||||
|
? (_obstack_newchunk ((h), 1), 0) : 0), \
|
||||||
|
((h)->alloc_failed ? 0 : \
|
||||||
|
(*((h)->next_free)++ = (datum))))
|
||||||
|
|
||||||
|
#define obstack_ptr_grow(h,datum) \
|
||||||
|
( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
|
||||||
|
? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
|
||||||
|
((h)->alloc_failed ? 0 : \
|
||||||
|
(*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum))))
|
||||||
|
|
||||||
|
#define obstack_int_grow(h,datum) \
|
||||||
|
( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
|
||||||
|
? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
|
||||||
|
((h)->alloc_failed ? 0 : \
|
||||||
|
(*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum))))
|
||||||
|
|
||||||
|
#define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
|
||||||
|
#define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
|
||||||
|
|
||||||
|
#define obstack_blank(h,length) \
|
||||||
|
( (h)->temp = (length), \
|
||||||
|
(((h)->chunk_limit - (h)->next_free < (h)->temp) \
|
||||||
|
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
|
||||||
|
((h)->alloc_failed ? 0 : \
|
||||||
|
((h)->next_free += (h)->temp)))
|
||||||
|
|
||||||
|
#define obstack_alloc(h,length) \
|
||||||
|
(obstack_blank ((h), (length)), obstack_finish ((h)))
|
||||||
|
|
||||||
|
#define obstack_copy(h,where,length) \
|
||||||
|
(obstack_grow ((h), (where), (length)), obstack_finish ((h)))
|
||||||
|
|
||||||
|
#define obstack_copy0(h,where,length) \
|
||||||
|
(obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
|
||||||
|
|
||||||
|
#define obstack_finish(h) \
|
||||||
|
( (h)->alloc_failed ? 0 : \
|
||||||
|
(((h)->next_free == (h)->object_base \
|
||||||
|
? (((h)->maybe_empty_object = 1), 0) \
|
||||||
|
: 0), \
|
||||||
|
(h)->temp = __PTR_TO_INT ((h)->object_base), \
|
||||||
|
(h)->next_free \
|
||||||
|
= __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \
|
||||||
|
& ~ ((h)->alignment_mask)), \
|
||||||
|
(((h)->next_free - (char *) (h)->chunk \
|
||||||
|
> (h)->chunk_limit - (char *) (h)->chunk) \
|
||||||
|
? ((h)->next_free = (h)->chunk_limit) : 0), \
|
||||||
|
(h)->object_base = (h)->next_free, \
|
||||||
|
__INT_TO_PTR ((h)->temp)))
|
||||||
|
|
||||||
|
#if defined (__STDC__) && __STDC__
|
||||||
|
#define obstack_free(h,obj) \
|
||||||
|
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
|
||||||
|
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
|
||||||
|
? (int) ((h)->next_free = (h)->object_base \
|
||||||
|
= (h)->temp + (char *) (h)->chunk) \
|
||||||
|
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
|
||||||
|
#else
|
||||||
|
#define obstack_free(h,obj) \
|
||||||
|
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
|
||||||
|
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
|
||||||
|
? (int) ((h)->next_free = (h)->object_base \
|
||||||
|
= (h)->temp + (char *) (h)->chunk) \
|
||||||
|
: (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* not __GNUC__ or not __STDC__ */
|
||||||
|
|
||||||
|
#endif /* not __OBSTACK_H__ */
|
287
install-sh
Executable file
287
install-sh
Executable file
@ -0,0 +1,287 @@
|
|||||||
|
#!/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=""
|
||||||
|
# CYGNUS LOCAL: exeext variable
|
||||||
|
exeext=""
|
||||||
|
# END CYGNUS LOCAL
|
||||||
|
|
||||||
|
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;;
|
||||||
|
|
||||||
|
# CYGNUS LOCAL: -x option
|
||||||
|
-x=*) exeext=`echo $1 | sed 's/-x=//'`
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-x) exeext=".exe"
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
# END CYGNUS LOCAL
|
||||||
|
|
||||||
|
*) 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
|
||||||
|
|
||||||
|
# CYGNUS LOCAL noer
|
||||||
|
# Win32-based gcc automatically appends .exe to produced executables,
|
||||||
|
# whether asked for or not. This breaks installs. The following
|
||||||
|
# changes the value of $src to $src.exe if $src is missing
|
||||||
|
|
||||||
|
if [ -f $src ]
|
||||||
|
then
|
||||||
|
true
|
||||||
|
elif [ -f $src.exe ]
|
||||||
|
then
|
||||||
|
echo "install: $src does not exist, trying with .exe appended"
|
||||||
|
src="$src".exe
|
||||||
|
fi
|
||||||
|
|
||||||
|
# end CYGNUS LOCAL noer
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# CYGNUS LOCAL: Use exeext
|
||||||
|
case "`basename $dst`" in
|
||||||
|
*.*) ;;
|
||||||
|
*) dst="$dst$exeext" ;;
|
||||||
|
esac
|
||||||
|
# END CYGNUS LOCAL
|
||||||
|
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
|
481
libiberty/COPYING.LIB
Normal file
481
libiberty/COPYING.LIB
Normal file
@ -0,0 +1,481 @@
|
|||||||
|
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||||
|
675 Mass Ave, Cambridge, MA 02139, USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
[This is the first released version of the library GPL. It is
|
||||||
|
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
|
This license, the Library General Public License, applies to some
|
||||||
|
specially designated Free Software Foundation software, and to any
|
||||||
|
other libraries whose authors decide to use it. You can use it for
|
||||||
|
your libraries, 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 library, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link a program with the library, you must provide
|
||||||
|
complete object files to the recipients so that they can relink them
|
||||||
|
with the library, after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
Our method of protecting your rights has two steps: (1) copyright
|
||||||
|
the library, and (2) offer you this license which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
Also, for each distributor's protection, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
library. If the library is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original
|
||||||
|
version, 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 companies distributing free
|
||||||
|
software will individually obtain patent licenses, thus in effect
|
||||||
|
transforming the program into proprietary software. To prevent this,
|
||||||
|
we have made it clear that any patent must be licensed for everyone's
|
||||||
|
free use or not licensed at all.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the ordinary
|
||||||
|
GNU General Public License, which was designed for utility programs. This
|
||||||
|
license, the GNU Library General Public License, applies to certain
|
||||||
|
designated libraries. This license is quite different from the ordinary
|
||||||
|
one; be sure to read it in full, and don't assume that anything in it is
|
||||||
|
the same as in the ordinary license.
|
||||||
|
|
||||||
|
The reason we have a separate public license for some libraries is that
|
||||||
|
they blur the distinction we usually make between modifying or adding to a
|
||||||
|
program and simply using it. Linking a program with a library, without
|
||||||
|
changing the library, is in some sense simply using the library, and is
|
||||||
|
analogous to running a utility program or application program. However, in
|
||||||
|
a textual and legal sense, the linked executable is a combined work, a
|
||||||
|
derivative of the original library, and the ordinary General Public License
|
||||||
|
treats it as such.
|
||||||
|
|
||||||
|
Because of this blurred distinction, using the ordinary General
|
||||||
|
Public License for libraries did not effectively promote software
|
||||||
|
sharing, because most developers did not use the libraries. We
|
||||||
|
concluded that weaker conditions might promote sharing better.
|
||||||
|
|
||||||
|
However, unrestricted linking of non-free programs would deprive the
|
||||||
|
users of those programs of all benefit from the free status of the
|
||||||
|
libraries themselves. This Library General Public License is intended to
|
||||||
|
permit developers of non-free programs to use free libraries, while
|
||||||
|
preserving your freedom as a user of such programs to change the free
|
||||||
|
libraries that are incorporated in them. (We have not seen how to achieve
|
||||||
|
this as regards changes in header files, but we have achieved it as regards
|
||||||
|
changes in the actual functions of the Library.) The hope is that this
|
||||||
|
will lead to faster development of free libraries.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, while the latter only
|
||||||
|
works together with the library.
|
||||||
|
|
||||||
|
Note that it is possible for a library to be covered by the ordinary
|
||||||
|
General Public License rather than by this special one.
|
||||||
|
|
||||||
|
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library which
|
||||||
|
contains a notice placed by the copyright holder or other authorized
|
||||||
|
party saying it may be distributed under the terms of this Library
|
||||||
|
General Public License (also called "this License"). Each licensee is
|
||||||
|
addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, 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 library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete 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 distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
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 Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
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 Library, 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 Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you 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.
|
||||||
|
|
||||||
|
If distribution of 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 satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also compile or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
c) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
d) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. 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.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library 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.
|
||||||
|
|
||||||
|
9. 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 Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
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.
|
||||||
|
|
||||||
|
11. 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 Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library 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 Library.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library 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.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Library General Public License from time to time.
|
||||||
|
Such new versions will be similar in spirit to the present version,
|
||||||
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Library
|
||||||
|
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 Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
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
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "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
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. 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 LIBRARY 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
|
||||||
|
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries
|
||||||
|
|
||||||
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
possible use to the public, we recommend making it free software that
|
||||||
|
everyone can redistribute and change. You can do so by permitting
|
||||||
|
redistribution under these terms (or, alternatively, under the terms of the
|
||||||
|
ordinary General Public License).
|
||||||
|
|
||||||
|
To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library 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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this library; if not, write to the Free
|
||||||
|
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||||
|
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1990
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
2233
libiberty/ChangeLog
Normal file
2233
libiberty/ChangeLog
Normal file
File diff suppressed because it is too large
Load Diff
336
libiberty/Makefile.in
Normal file
336
libiberty/Makefile.in
Normal file
@ -0,0 +1,336 @@
|
|||||||
|
#
|
||||||
|
# Makefile
|
||||||
|
# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation
|
||||||
|
#
|
||||||
|
# This file is part of the libiberty library.
|
||||||
|
# Libiberty is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Library General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2 of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Libiberty 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
|
||||||
|
# Library General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Library General Public
|
||||||
|
# License along with libiberty; see the file COPYING.LIB. If not,
|
||||||
|
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
# Boston, MA 02111-1307, USA.
|
||||||
|
#
|
||||||
|
|
||||||
|
# This file was written, and is maintained by K. Richard Pixley
|
||||||
|
# <rich@cygnus.com>.
|
||||||
|
|
||||||
|
#
|
||||||
|
# Makefile for libiberty directory
|
||||||
|
#
|
||||||
|
|
||||||
|
srcdir = .
|
||||||
|
|
||||||
|
prefix = /usr/local
|
||||||
|
|
||||||
|
exec_prefix = $(prefix)
|
||||||
|
bindir = $(exec_prefix)/bin
|
||||||
|
libdir = $(exec_prefix)/lib
|
||||||
|
|
||||||
|
datadir = $(prefix)/share
|
||||||
|
|
||||||
|
mandir = $(prefix)/man
|
||||||
|
man1dir = $(mandir)/man1
|
||||||
|
man2dir = $(mandir)/man2
|
||||||
|
man3dir = $(mandir)/man3
|
||||||
|
man4dir = $(mandir)/man4
|
||||||
|
man5dir = $(mandir)/man5
|
||||||
|
man6dir = $(mandir)/man6
|
||||||
|
man7dir = $(mandir)/man7
|
||||||
|
man8dir = $(mandir)/man8
|
||||||
|
man9dir = $(mandir)/man9
|
||||||
|
infodir = $(prefix)/info
|
||||||
|
includedir = $(prefix)/include
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
# Multilib support variables.
|
||||||
|
MULTISRCTOP =
|
||||||
|
MULTIBUILDTOP =
|
||||||
|
MULTIDIRS =
|
||||||
|
MULTISUBDIR =
|
||||||
|
MULTIDO = true
|
||||||
|
MULTICLEAN = true
|
||||||
|
|
||||||
|
INSTALL = install -c
|
||||||
|
INSTALL_PROGRAM = $(INSTALL)
|
||||||
|
INSTALL_DATA = $(INSTALL)
|
||||||
|
|
||||||
|
AR = ar
|
||||||
|
AR_FLAGS = rc
|
||||||
|
|
||||||
|
ERRORS_CC = $(CC)
|
||||||
|
CC = cc
|
||||||
|
CFLAGS = -g
|
||||||
|
LIBCFLAGS = $(CFLAGS)
|
||||||
|
MAKEINFO = makeinfo
|
||||||
|
RANLIB = ranlib
|
||||||
|
|
||||||
|
PICFLAG =
|
||||||
|
|
||||||
|
MAKEOVERRIDES =
|
||||||
|
|
||||||
|
TARGETLIB = libiberty.a
|
||||||
|
|
||||||
|
CONFIG_H = lconfig.h
|
||||||
|
NEEDED_LIST = lneeded-list
|
||||||
|
|
||||||
|
# HOST_OFILES contains the list of objects that should be in the
|
||||||
|
# library (in addition to the REQUIRED_OFILES and EXTRA_OFILES).
|
||||||
|
# A configuration may override this with a fixed list a object files
|
||||||
|
# names (hard to maintain), or some other way to generate a list.
|
||||||
|
HOST_OFILES=`cat needed-list`
|
||||||
|
|
||||||
|
# Extra targets that the top-level target depends on.
|
||||||
|
# Specifically, what needs to be made before HOST_OFILES can be used.
|
||||||
|
# Can be empty if HOST_OFILES is just a list of file names.
|
||||||
|
DO_ALSO = needed-list
|
||||||
|
|
||||||
|
# A configuration can specify extra .o files that should be included,
|
||||||
|
# even if they are in libc. (Perhaps the libc version is buggy.)
|
||||||
|
EXTRA_OFILES =
|
||||||
|
|
||||||
|
# Flags to pass to a recursive make.
|
||||||
|
FLAGS_TO_PASS = \
|
||||||
|
"AR=$(AR)" \
|
||||||
|
"AR_FLAGS=$(AR_FLAGS)" \
|
||||||
|
"CC=$(CC)" \
|
||||||
|
"CFLAGS=$(CFLAGS)" \
|
||||||
|
"LIBCFLAGS=$(LIBCFLAGS)" \
|
||||||
|
"EXTRA_OFILES=$(EXTRA_OFILES)" \
|
||||||
|
"HDEFINES=$(HDEFINES)" \
|
||||||
|
"INSTALL=$(INSTALL)" \
|
||||||
|
"INSTALL_DATA=$(INSTALL_DATA)" \
|
||||||
|
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
||||||
|
"LDFLAGS=$(LDFLAGS)" \
|
||||||
|
"LOADLIBES=$(LOADLIBES)" \
|
||||||
|
"PICFLAG=$(PICFLAG)" \
|
||||||
|
"RANLIB=$(RANLIB)" \
|
||||||
|
"SHELL=$(SHELL)"
|
||||||
|
|
||||||
|
all: stamp-picdir $(TARGETLIB) required-list
|
||||||
|
@if [ "$(RULE1)" != "not-used" ]; then \
|
||||||
|
$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all; \
|
||||||
|
else true; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
.PHONY: check installcheck
|
||||||
|
check installcheck:
|
||||||
|
|
||||||
|
|
||||||
|
#### Host, target, and site specific Makefile fragments come in here.
|
||||||
|
###
|
||||||
|
|
||||||
|
INCDIR=$(srcdir)/$(MULTISRCTOP)../include
|
||||||
|
|
||||||
|
COMPILE.c = $(CC) -c $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES)
|
||||||
|
.c.o:
|
||||||
|
test -z "$(PICFLAG)" || \
|
||||||
|
$(COMPILE.c) $(PICFLAG) $< -o pic/$@
|
||||||
|
$(COMPILE.c) $<
|
||||||
|
|
||||||
|
# The default target just invokes make recursively.
|
||||||
|
# However, the automatic configuration (in config/mh_default).
|
||||||
|
# first causes it to figure out the objects missing in libc.
|
||||||
|
info install-info clean-info dvi:
|
||||||
|
|
||||||
|
# Include files that are in this directory.
|
||||||
|
HFILES =
|
||||||
|
|
||||||
|
# NOTE: If you add new files to the library, add them to this list
|
||||||
|
# (alphabetical), and add them to REQUIRED_OFILES or 'functions.def'.
|
||||||
|
CFILES = alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c bzero.c \
|
||||||
|
choose-temp.c clock.c concat.c cplus-dem.c fdmatch.c fnmatch.c \
|
||||||
|
getcwd.c getopt.c getopt1.c getpagesize.c getruntime.c \
|
||||||
|
floatformat.c hex.c index.c insque.c \
|
||||||
|
memchr.c memcmp.c memcpy.c memmove.c memset.c objalloc.c \
|
||||||
|
obstack.c random.c rename.c rindex.c sigsetmask.c spaces.c \
|
||||||
|
strcasecmp.c strncasecmp.c \
|
||||||
|
strchr.c strdup.c strerror.c strrchr.c strsignal.c \
|
||||||
|
strstr.c strtod.c strtol.c strtoul.c tmpnam.c \
|
||||||
|
vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c \
|
||||||
|
xatexit.c xexit.c xmalloc.c xstrdup.c xstrerror.c
|
||||||
|
# These are always included in the library.
|
||||||
|
REQUIRED_OFILES = argv.o basename.o choose-temp.o concat.o cplus-dem.o \
|
||||||
|
fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o \
|
||||||
|
floatformat.o objalloc.o obstack.o pexecute.o spaces.o strerror.o \
|
||||||
|
strsignal.o xatexit.o xexit.o xmalloc.o xstrdup.o xstrerror.o
|
||||||
|
|
||||||
|
# Do we want/need any config overrides?
|
||||||
|
#
|
||||||
|
|
||||||
|
STAGESTUFF = $(TARGETLIB) *.o
|
||||||
|
|
||||||
|
INSTALL_DEST = libdir
|
||||||
|
install: install_to_$(INSTALL_DEST)
|
||||||
|
|
||||||
|
install_to_libdir: all
|
||||||
|
$(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB).n
|
||||||
|
( cd $(libdir) ; $(RANLIB) $(libdir)/$(TARGETLIB).n )
|
||||||
|
mv -f $(libdir)/$(TARGETLIB).n $(libdir)$(MULTISUBDIR)/$(TARGETLIB)
|
||||||
|
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
|
||||||
|
|
||||||
|
install_to_tooldir: all
|
||||||
|
$(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib/$(TARGETLIB).n
|
||||||
|
( cd $(tooldir) ; $(RANLIB) $(tooldir)/lib/$(TARGETLIB).n )
|
||||||
|
mv -f $(tooldir)/lib/$(TARGETLIB).n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
|
||||||
|
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
|
||||||
|
|
||||||
|
# The default configuration adds to libiberty all those functions that are
|
||||||
|
# missing in libc. More precisely, it includes whatever $(CC) fails to find.
|
||||||
|
# Then a sed+awk combination translates the ld error messages into
|
||||||
|
# a list of .o files.
|
||||||
|
|
||||||
|
stamp-needed: stamp-picdir $(NEEDED_LIST)
|
||||||
|
cp $(NEEDED_LIST) needed-tmp
|
||||||
|
$(SHELL) $(srcdir)/../move-if-change needed-tmp needed-list
|
||||||
|
touch stamp-needed
|
||||||
|
|
||||||
|
needed-list: stamp-needed ; @true
|
||||||
|
|
||||||
|
lneeded-list: $(EXTRA_OFILES) needed.awk errors
|
||||||
|
rm -f lneeded-list
|
||||||
|
f=""; \
|
||||||
|
for i in `awk -f needed.awk <errors` $(EXTRA_OFILES) ; do \
|
||||||
|
case " $$f " in \
|
||||||
|
*" $$i "*) ;; \
|
||||||
|
*) f="$$f $$i" ;; \
|
||||||
|
esac ; \
|
||||||
|
done ; \
|
||||||
|
case $$f in \
|
||||||
|
*alloca.o*) f="$$f xmalloc.o xexit.o" ;; \
|
||||||
|
esac ; \
|
||||||
|
echo $$f >>lneeded-list
|
||||||
|
|
||||||
|
# Generate an awk script that looks for functions in functions.def
|
||||||
|
|
||||||
|
needed.awk: $(srcdir)/functions.def Makefile
|
||||||
|
echo "# !Automatically generated from $(srcdir)/functions.def"\
|
||||||
|
"- DO NOT EDIT!" >needed.awk
|
||||||
|
grep '^DEF(' < $(srcdir)/functions.def \
|
||||||
|
| sed -e '/DEF/s|DEF.\([^,]*\).*|/\1/ { printf "\1.o " }|' \
|
||||||
|
>>needed.awk
|
||||||
|
|
||||||
|
stamp-config: $(CONFIG_H)
|
||||||
|
cp $(CONFIG_H) config.tmp
|
||||||
|
$(SHELL) $(srcdir)/../move-if-change config.tmp config.h
|
||||||
|
touch stamp-config
|
||||||
|
|
||||||
|
config.h: stamp-config ; @true
|
||||||
|
|
||||||
|
lconfig.h: needed2.awk errors
|
||||||
|
echo "/* !Automatically generated from $(srcdir)/functions.def"\
|
||||||
|
"- DO NOT EDIT! */" >lconfig.h
|
||||||
|
awk -f needed2.awk <errors >>lconfig.h
|
||||||
|
|
||||||
|
# Generate an awk script that looks for variables in functions.def
|
||||||
|
|
||||||
|
needed2.awk: $(srcdir)/functions.def Makefile
|
||||||
|
echo "# !Automatically generated from $(srcdir)/functions.def"\
|
||||||
|
"- DO NOT EDIT!" >needed2.awk
|
||||||
|
grep '^DEFVAR(' < $(srcdir)/functions.def \
|
||||||
|
| sed -e '/DEFVAR/s|DEFVAR.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' \
|
||||||
|
>>needed2.awk
|
||||||
|
grep '^DEFFUNC(' < $(srcdir)/functions.def \
|
||||||
|
| sed -e '/DEFFUNC/s|DEFFUNC.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' \
|
||||||
|
>>needed2.awk
|
||||||
|
|
||||||
|
dummy.o: $(srcdir)/dummy.c $(srcdir)/functions.def
|
||||||
|
$(CC) -c $(CFLAGS) -I. -I$(INCDIR) $(HDEFINES) $(srcdir)/dummy.c 2>/dev/null
|
||||||
|
|
||||||
|
errors: dummy.o $(EXTRA_OFILES)
|
||||||
|
-($(ERRORS_CC) -o dummy $(CFLAGS) $(LDFLAGS) $(ERRORS_LDFLAGS) dummy.o $(EXTRA_OFILES) $(LOADLIBES)) >errors 2>&1 || true
|
||||||
|
|
||||||
|
# required-list is used when building a shared bfd/opcodes/libiberty library.
|
||||||
|
required-list: Makefile
|
||||||
|
echo $(REQUIRED_OFILES) > required-list
|
||||||
|
|
||||||
|
$(HOST_OFILES) $(REQUIRED_OFILES) : config.h
|
||||||
|
|
||||||
|
RULE1 = $(TARGETLIB)
|
||||||
|
$(RULE1): $(REQUIRED_OFILES) $(DO_ALSO) .always.
|
||||||
|
@$(MAKE) RULE1=not-used RULE2=$(TARGETLIB) $(FLAGS_TO_PASS) \
|
||||||
|
"HOST_OFILES=$(HOST_OFILES)"
|
||||||
|
|
||||||
|
# Rule invoked by recursive make in $(RULE1).
|
||||||
|
RULE2 = not-used
|
||||||
|
$(RULE2): $(REQUIRED_OFILES) $(HOST_OFILES)
|
||||||
|
rm -rf $(TARGETLIB)
|
||||||
|
$(AR) $(AR_FLAGS) $(TARGETLIB) \
|
||||||
|
$(REQUIRED_OFILES) $(HOST_OFILES)
|
||||||
|
$(RANLIB) $(TARGETLIB)
|
||||||
|
|
||||||
|
stamp-picdir:
|
||||||
|
if [ -n "$(PICFLAG)" ] && [ ! -d pic ]; then \
|
||||||
|
mkdir pic; \
|
||||||
|
else true; fi
|
||||||
|
touch stamp-picdir
|
||||||
|
|
||||||
|
.always.:
|
||||||
|
# Do nothing.
|
||||||
|
|
||||||
|
.PHONY: all etags tags ls clean stage1 stage2 .always.
|
||||||
|
|
||||||
|
etags tags: TAGS
|
||||||
|
|
||||||
|
TAGS: $(CFILES) $(HFILES)
|
||||||
|
etags `for i in $(HFILES) $(CFILES); do echo $(srcdir)/$$i ; done`
|
||||||
|
|
||||||
|
# The standalone demangler (c++filt) has been moved to binutils.
|
||||||
|
demangle:
|
||||||
|
@echo "The standalone demangler, now named c++filt, is now"
|
||||||
|
@echo "a part of binutils."
|
||||||
|
@false
|
||||||
|
|
||||||
|
ls:
|
||||||
|
@echo Makefile $(HFILES) $(CFILES)
|
||||||
|
|
||||||
|
# Need to deal with profiled libraries, too.
|
||||||
|
|
||||||
|
mostlyclean:
|
||||||
|
rm -rf *.o pic core errs \#* *.E a.out
|
||||||
|
rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
|
||||||
|
rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
|
||||||
|
@$(MULTICLEAN) multi-clean DO=mostlyclean
|
||||||
|
clean: mostlyclean
|
||||||
|
rm -f *.a required-list tmpmulti.out
|
||||||
|
@$(MULTICLEAN) multi-clean DO=clean
|
||||||
|
distclean: clean
|
||||||
|
rm -f *~ Makefile config.status alloca-conf.h xhost-mkfrag TAGS multilib.out
|
||||||
|
@$(MULTICLEAN) multi-clean DO=distclean
|
||||||
|
maintainer-clean realclean: distclean
|
||||||
|
|
||||||
|
force:
|
||||||
|
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
|
||||||
|
$(SHELL) ./config.status
|
||||||
|
|
||||||
|
argv.o: $(INCDIR)/libiberty.h
|
||||||
|
basename.o: $(INCDIR)/libiberty.h
|
||||||
|
concat.o: $(INCDIR)/libiberty.h
|
||||||
|
cplus-dem.o: $(INCDIR)/demangle.h
|
||||||
|
fdmatch.o: $(INCDIR)/libiberty.h
|
||||||
|
fnmatch.o: $(INCDIR)/fnmatch.h
|
||||||
|
getopt.o: $(INCDIR)/getopt.h
|
||||||
|
getopt1.o: $(INCDIR)/getopt.h
|
||||||
|
getruntime.o: $(INCDIR)/libiberty.h
|
||||||
|
hex.o: $(INCDIR)/libiberty.h
|
||||||
|
floatformat.o: $(INCDIR)/floatformat.h
|
||||||
|
objalloc.o: $(INCDIR)/objalloc.h
|
||||||
|
obstack.o: $(INCDIR)/obstack.h
|
||||||
|
pexecute.o: $(INCDIR)/libiberty.h
|
||||||
|
spaces.o: $(INCDIR)/libiberty.h
|
||||||
|
strerror.o: $(INCDIR)/libiberty.h
|
||||||
|
strsignal.o: $(INCDIR)/libiberty.h
|
||||||
|
xatexit.o: $(INCDIR)/libiberty.h
|
||||||
|
xexit.o: $(INCDIR)/libiberty.h
|
||||||
|
xmalloc.o: $(INCDIR)/libiberty.h
|
||||||
|
xstrdup.o: $(INCDIR)/libiberty.h
|
||||||
|
xstrerror.o: $(INCDIR)/libiberty.h
|
129
libiberty/README
Normal file
129
libiberty/README
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
This directory contains the -liberty library of free software.
|
||||||
|
It is a collection of subroutines used by various GNU programs.
|
||||||
|
Current members include:
|
||||||
|
|
||||||
|
getopt -- get options from command line
|
||||||
|
obstack -- stacks of arbitrarily-sized objects
|
||||||
|
strerror -- error message strings corresponding to errno
|
||||||
|
strtol -- string-to-long conversion
|
||||||
|
strtoul -- string-to-unsigned-long conversion
|
||||||
|
|
||||||
|
We expect many of the GNU subroutines that are floating around to
|
||||||
|
eventually arrive here.
|
||||||
|
|
||||||
|
To build the library, do:
|
||||||
|
|
||||||
|
./configure HOSTTYPE
|
||||||
|
make
|
||||||
|
|
||||||
|
Please report bugs and fixes to "bug-gnu-utils@prep.ai.mit.edu". Thank you.
|
||||||
|
|
||||||
|
ADDING A NEW FILE
|
||||||
|
=================
|
||||||
|
|
||||||
|
There are two sets of files: Those that are "required" will be
|
||||||
|
included in the library for all configurations, while those
|
||||||
|
that are "optional" will be included in the library only if "needed."
|
||||||
|
|
||||||
|
To add a new required file, edit Makefile to add the source file
|
||||||
|
name to CFILES and the object file to REQUIRED_OFILES.
|
||||||
|
|
||||||
|
Adding a new optional file is more fragile. As a general rule,
|
||||||
|
an optional file will be included in the library if it provides
|
||||||
|
functionality missing in the "standard" C library.
|
||||||
|
For most hosts, the Makefile automatically figures out which
|
||||||
|
functionality is missing by compiling and linking a dummy test
|
||||||
|
program, and examining the error messages.
|
||||||
|
|
||||||
|
So to get this to work, you should do the following:
|
||||||
|
|
||||||
|
1) Select one function defined in the file you're adding.
|
||||||
|
For example, the getcwd function.
|
||||||
|
2) Add that function to the list in the file functions.def.
|
||||||
|
3) The name of the new file must be the same as the function
|
||||||
|
you've chosen with the .c suffix added. E.g. getcwd() must be
|
||||||
|
defined in getcwd.c. (The file can define other functions as well.)
|
||||||
|
4) In Makefile.in, add the name of the source file (e.g. getcwd.c)
|
||||||
|
to CFILES.
|
||||||
|
|
||||||
|
The file you've added (e.g. getcwd.c) should compile and work
|
||||||
|
on all hosts where it is needed (e.g. not found when linking
|
||||||
|
the dummy.c program). It does not have to work or even
|
||||||
|
compile on hosts where it is not needed.
|
||||||
|
|
||||||
|
HOW THE AUTOMATIC CONFIGURATION WORKS
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
The libiberty.a target (in RULE1) depends on $(DO_ALSO).
|
||||||
|
For normal configurations, DO_ALSO=needed-list.
|
||||||
|
|
||||||
|
So needed-list is first made. The needed-list rule compiles
|
||||||
|
dummy.c. Because dummy.c includes functions.def, the
|
||||||
|
resulting object file will contain a call to each of the
|
||||||
|
optional functions (for simplicity assume each optional file
|
||||||
|
defines a single function). This object file will be linked
|
||||||
|
against the standard libraries (as defined by using $(CC)
|
||||||
|
and various flags). Any function missing will causes the
|
||||||
|
linker to emit an error message. We assume the name
|
||||||
|
of the missing function(s) are in the error message(s).
|
||||||
|
The awk script find-needed.awk has been generated from
|
||||||
|
functions.def. It is used to search the linker output
|
||||||
|
messages for words that match the functions listed in
|
||||||
|
functions.def. The list of functions found is written
|
||||||
|
on a single line to the file needed-list.
|
||||||
|
|
||||||
|
After needed-list has been generated, the libiberty.a
|
||||||
|
target (in RULE1) just calls 'make' recursively.
|
||||||
|
It passes the contents of needed-list using the
|
||||||
|
definition (expanded) HOST_OFILES="`cat needed-list`".
|
||||||
|
It also tells the inferior 'make' to use RULE2.
|
||||||
|
|
||||||
|
The inferior 'make' is very conventional: The main
|
||||||
|
rule is $(RULE2) (which is libiberty.a). It depends
|
||||||
|
on a list of object files: $(REQUIRED_OFILES) $(HOST_OFILES)
|
||||||
|
(and $(EXTRA_OFILES), which is usually empty). The superior
|
||||||
|
'make' passes in $(HOST_OFILES); the others are fixed
|
||||||
|
in the Makefile.
|
||||||
|
|
||||||
|
ADDING A NEW CONFIGURATION
|
||||||
|
==========================
|
||||||
|
|
||||||
|
On most hosts you should be able to use the scheme for automatically
|
||||||
|
figuring out which files are needed. In that case, you probably
|
||||||
|
don't need a special Makefile stub for that configuration.
|
||||||
|
|
||||||
|
If the fully automatic scheme doesn't work, you may be able to get
|
||||||
|
by with defining EXTRA_OFILES in your Makefile stub. This is
|
||||||
|
a list of object file names that should be treated as required
|
||||||
|
for this configuration - they will be included in libiberty.a,
|
||||||
|
regardless of whatever might be in the C library. Moreover,
|
||||||
|
when the dummy.c program is linked, it will be linked with
|
||||||
|
$(EXTRA_OFILES). Therefore, if a function in functions.def
|
||||||
|
is defined by one of the EXTRA_OFILES, it will not be listed as
|
||||||
|
"needed". Thus if your hal9000 host needs a special implementation
|
||||||
|
of getcwd, you can just create hal9000-getcwd.c, and define:
|
||||||
|
EXTRA_OFILES=hal9000-getcwd.o
|
||||||
|
Or if you want to use the libiberty version of strstr(),
|
||||||
|
even though there is a version in the C library (it might be
|
||||||
|
buggy or slow), just define:
|
||||||
|
EXTRA_OFILES=strstr.o
|
||||||
|
|
||||||
|
You can create a "manual" host configuration FOO with a file
|
||||||
|
config/mh-FOO. In it, the HOST_OFILES macro should explicitly
|
||||||
|
list that subset of the optional files that should be in the
|
||||||
|
library. You should also set:
|
||||||
|
DO_ALSO =
|
||||||
|
This overrides all of the magic needed to automatically
|
||||||
|
determine which files are "needed." However, keeping that list
|
||||||
|
up to date is another matter...
|
||||||
|
|
||||||
|
HOW THE MANUAL CONFIGURATION WORKS
|
||||||
|
==================================
|
||||||
|
|
||||||
|
This also uses a recursive make, but the superior make
|
||||||
|
does not do anything interesting - it just calls the
|
||||||
|
inferior make with HOST_OFILES defined as $(HOST_OFILES),
|
||||||
|
which is the list you created in your configuration.
|
||||||
|
|
||||||
|
You probably don't want to depend on manual configuration,
|
||||||
|
because keeping the HOST_OFILES list up-to-date will be a pain.
|
5
libiberty/alloca-botch.h
Normal file
5
libiberty/alloca-botch.h
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
/* RS/6000 AIX botched alloca and requires a pragma, which ordinary compilers
|
||||||
|
throw up about, so we have to put it in a specially-configured file.
|
||||||
|
Like this one. */
|
||||||
|
|
||||||
|
#pragma alloca
|
23
libiberty/alloca-norm.h
Normal file
23
libiberty/alloca-norm.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/* "Normal" configuration for alloca. */
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define alloca __builtin_alloca
|
||||||
|
#else /* ! defined (__GNUC__) */
|
||||||
|
#if defined (sparc) && defined (sun)
|
||||||
|
#include <alloca.h>
|
||||||
|
#ifdef __STDC__
|
||||||
|
extern void *__builtin_alloca();
|
||||||
|
#else /* ! defined (__STDC__) */
|
||||||
|
extern char *__builtin_alloca(); /* Stupid include file doesn't declare it */
|
||||||
|
#endif /* ! defined (__STDC__) */
|
||||||
|
#else /* ! defined (sparc) || ! defined (sun) */
|
||||||
|
#ifdef __STDC__
|
||||||
|
PTR alloca (size_t);
|
||||||
|
#else /* ! defined (__STDC__) */
|
||||||
|
PTR alloca (); /* must agree with functions.def */
|
||||||
|
#endif /* ! defined (__STDC__) */
|
||||||
|
#endif /* ! defined (sparc) || ! defined (sun) */
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
|
#endif /* ! defined (__GNUC__) */
|
479
libiberty/alloca.c
Normal file
479
libiberty/alloca.c
Normal file
@ -0,0 +1,479 @@
|
|||||||
|
/* alloca.c -- allocate automatically reclaimed memory
|
||||||
|
(Mostly) portable public-domain implementation -- D A Gwyn
|
||||||
|
|
||||||
|
This implementation of the PWB library alloca function,
|
||||||
|
which is used to allocate space off the run-time stack so
|
||||||
|
that it is automatically reclaimed upon procedure exit,
|
||||||
|
was inspired by discussions with J. Q. Johnson of Cornell.
|
||||||
|
J.Otto Tennant <jot@cray.com> contributed the Cray support.
|
||||||
|
|
||||||
|
There are some preprocessor constants that can
|
||||||
|
be defined when compiling for your specific system, for
|
||||||
|
improved efficiency; however, the defaults should be okay.
|
||||||
|
|
||||||
|
The general concept of this implementation is to keep
|
||||||
|
track of all alloca-allocated blocks, and reclaim any
|
||||||
|
that are found to be deeper in the stack than the current
|
||||||
|
invocation. This heuristic does not reclaim storage as
|
||||||
|
soon as it becomes invalid, but it will do so eventually.
|
||||||
|
|
||||||
|
As a special case, alloca(0) reclaims storage without
|
||||||
|
allocating any. It is a good idea to use alloca(0) in
|
||||||
|
your main control loop, etc. to force garbage collection. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* If compiling with GCC, this file's not needed. */
|
||||||
|
#ifndef alloca
|
||||||
|
|
||||||
|
#ifdef emacs
|
||||||
|
#ifdef static
|
||||||
|
/* actually, only want this if static is defined as ""
|
||||||
|
-- this is for usg, in which emacs must undefine static
|
||||||
|
in order to make unexec workable
|
||||||
|
*/
|
||||||
|
#ifndef STACK_DIRECTION
|
||||||
|
you
|
||||||
|
lose
|
||||||
|
-- must know STACK_DIRECTION at compile-time
|
||||||
|
#endif /* STACK_DIRECTION undefined */
|
||||||
|
#endif /* static */
|
||||||
|
#endif /* emacs */
|
||||||
|
|
||||||
|
/* If your stack is a linked list of frames, you have to
|
||||||
|
provide an "address metric" ADDRESS_FUNCTION macro. */
|
||||||
|
|
||||||
|
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||||
|
long i00afunc ();
|
||||||
|
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
|
||||||
|
#else
|
||||||
|
#define ADDRESS_FUNCTION(arg) &(arg)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __STDC__
|
||||||
|
#include <stddef.h>
|
||||||
|
typedef void *pointer;
|
||||||
|
#else
|
||||||
|
typedef char *pointer;
|
||||||
|
typedef unsigned size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NULL
|
||||||
|
#define NULL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Different portions of Emacs need to call different versions of
|
||||||
|
malloc. The Emacs executable needs alloca to call xmalloc, because
|
||||||
|
ordinary malloc isn't protected from input signals. On the other
|
||||||
|
hand, the utilities in lib-src need alloca to call malloc; some of
|
||||||
|
them are very simple, and don't have an xmalloc routine.
|
||||||
|
|
||||||
|
Non-Emacs programs expect this to call use xmalloc.
|
||||||
|
|
||||||
|
Callers below should use malloc. */
|
||||||
|
|
||||||
|
#ifndef emacs
|
||||||
|
#define malloc xmalloc
|
||||||
|
extern pointer xmalloc ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define STACK_DIRECTION 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 */
|
||||||
|
|
||||||
|
#ifndef STACK_DIRECTION
|
||||||
|
#define STACK_DIRECTION 0 /* Direction unknown. */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if STACK_DIRECTION != 0
|
||||||
|
|
||||||
|
#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
|
||||||
|
|
||||||
|
#else /* STACK_DIRECTION == 0; need run-time code. */
|
||||||
|
|
||||||
|
static int stack_dir; /* 1 or -1 once known. */
|
||||||
|
#define STACK_DIR stack_dir
|
||||||
|
|
||||||
|
static void
|
||||||
|
find_stack_direction ()
|
||||||
|
{
|
||||||
|
static char *addr = NULL; /* Address of first `dummy', once known. */
|
||||||
|
auto char dummy; /* To get stack address. */
|
||||||
|
|
||||||
|
if (addr == NULL)
|
||||||
|
{ /* Initial entry. */
|
||||||
|
addr = ADDRESS_FUNCTION (dummy);
|
||||||
|
|
||||||
|
find_stack_direction (); /* Recurse once. */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Second entry. */
|
||||||
|
if (ADDRESS_FUNCTION (dummy) > addr)
|
||||||
|
stack_dir = 1; /* Stack grew upward. */
|
||||||
|
else
|
||||||
|
stack_dir = -1; /* Stack grew downward. */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* STACK_DIRECTION == 0 */
|
||||||
|
|
||||||
|
/* An "alloca header" is used to:
|
||||||
|
(a) chain together all alloca'ed blocks;
|
||||||
|
(b) keep track of stack depth.
|
||||||
|
|
||||||
|
It is very important that sizeof(header) agree with malloc
|
||||||
|
alignment chunk size. The following default should work okay. */
|
||||||
|
|
||||||
|
#ifndef ALIGN_SIZE
|
||||||
|
#define ALIGN_SIZE sizeof(double)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef union hdr
|
||||||
|
{
|
||||||
|
char align[ALIGN_SIZE]; /* To force sizeof(header). */
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
union hdr *next; /* For chaining headers. */
|
||||||
|
char *deep; /* For stack depth measure. */
|
||||||
|
} h;
|
||||||
|
} header;
|
||||||
|
|
||||||
|
static header *last_alloca_header = NULL; /* -> last alloca header. */
|
||||||
|
|
||||||
|
/* Return a pointer to at least SIZE bytes of storage,
|
||||||
|
which will be automatically reclaimed upon exit from
|
||||||
|
the procedure that called alloca. Originally, this space
|
||||||
|
was supposed to be taken from the current stack frame of the
|
||||||
|
caller, but that method cannot be made to work for some
|
||||||
|
implementations of C, for example under Gould's UTX/32. */
|
||||||
|
|
||||||
|
pointer
|
||||||
|
alloca (size)
|
||||||
|
size_t size;
|
||||||
|
{
|
||||||
|
auto char probe; /* Probes stack depth: */
|
||||||
|
register char *depth = ADDRESS_FUNCTION (probe);
|
||||||
|
|
||||||
|
#if STACK_DIRECTION == 0
|
||||||
|
if (STACK_DIR == 0) /* Unknown growth direction. */
|
||||||
|
find_stack_direction ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Reclaim garbage, defined as all alloca'd storage that
|
||||||
|
was allocated from deeper in the stack than currently. */
|
||||||
|
|
||||||
|
{
|
||||||
|
register header *hp; /* Traverses linked list. */
|
||||||
|
|
||||||
|
for (hp = last_alloca_header; hp != NULL;)
|
||||||
|
if ((STACK_DIR > 0 && hp->h.deep > depth)
|
||||||
|
|| (STACK_DIR < 0 && hp->h.deep < depth))
|
||||||
|
{
|
||||||
|
register header *np = hp->h.next;
|
||||||
|
|
||||||
|
free ((pointer) hp); /* Collect garbage. */
|
||||||
|
|
||||||
|
hp = np; /* -> next header. */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break; /* Rest are not deeper. */
|
||||||
|
|
||||||
|
last_alloca_header = hp; /* -> last valid storage. */
|
||||||
|
}
|
||||||
|
|
||||||
|
if (size == 0)
|
||||||
|
return NULL; /* No allocation required. */
|
||||||
|
|
||||||
|
/* Allocate combined header + user data storage. */
|
||||||
|
|
||||||
|
{
|
||||||
|
register pointer new = malloc (sizeof (header) + size);
|
||||||
|
/* Address of header. */
|
||||||
|
|
||||||
|
((header *) new)->h.next = last_alloca_header;
|
||||||
|
((header *) new)->h.deep = depth;
|
||||||
|
|
||||||
|
last_alloca_header = (header *) new;
|
||||||
|
|
||||||
|
/* User storage begins just after header. */
|
||||||
|
|
||||||
|
return (pointer) ((char *) new + sizeof (header));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
|
||||||
|
|
||||||
|
#ifdef DEBUG_I00AFUNC
|
||||||
|
#include <stdio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CRAY_STACK
|
||||||
|
#define CRAY_STACK
|
||||||
|
#ifndef CRAY2
|
||||||
|
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
|
||||||
|
struct stack_control_header
|
||||||
|
{
|
||||||
|
long shgrow:32; /* Number of times stack has grown. */
|
||||||
|
long shaseg:32; /* Size of increments to stack. */
|
||||||
|
long shhwm:32; /* High water mark of stack. */
|
||||||
|
long shsize:32; /* Current size of stack (all segments). */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* The stack segment linkage control information occurs at
|
||||||
|
the high-address end of a stack segment. (The stack
|
||||||
|
grows from low addresses to high addresses.) The initial
|
||||||
|
part of the stack segment linkage control information is
|
||||||
|
0200 (octal) words. This provides for register storage
|
||||||
|
for the routine which overflows the stack. */
|
||||||
|
|
||||||
|
struct stack_segment_linkage
|
||||||
|
{
|
||||||
|
long ss[0200]; /* 0200 overflow words. */
|
||||||
|
long sssize:32; /* Number of words in this segment. */
|
||||||
|
long ssbase:32; /* Offset to stack base. */
|
||||||
|
long:32;
|
||||||
|
long sspseg:32; /* Offset to linkage control of previous
|
||||||
|
segment of stack. */
|
||||||
|
long:32;
|
||||||
|
long sstcpt:32; /* Pointer to task common address block. */
|
||||||
|
long sscsnm; /* Private control structure number for
|
||||||
|
microtasking. */
|
||||||
|
long ssusr1; /* Reserved for user. */
|
||||||
|
long ssusr2; /* Reserved for user. */
|
||||||
|
long sstpid; /* Process ID for pid based multi-tasking. */
|
||||||
|
long ssgvup; /* Pointer to multitasking thread giveup. */
|
||||||
|
long sscray[7]; /* Reserved for Cray Research. */
|
||||||
|
long ssa0;
|
||||||
|
long ssa1;
|
||||||
|
long ssa2;
|
||||||
|
long ssa3;
|
||||||
|
long ssa4;
|
||||||
|
long ssa5;
|
||||||
|
long ssa6;
|
||||||
|
long ssa7;
|
||||||
|
long sss0;
|
||||||
|
long sss1;
|
||||||
|
long sss2;
|
||||||
|
long sss3;
|
||||||
|
long sss4;
|
||||||
|
long sss5;
|
||||||
|
long sss6;
|
||||||
|
long sss7;
|
||||||
|
};
|
||||||
|
|
||||||
|
#else /* CRAY2 */
|
||||||
|
/* The following structure defines the vector of words
|
||||||
|
returned by the STKSTAT library routine. */
|
||||||
|
struct stk_stat
|
||||||
|
{
|
||||||
|
long now; /* Current total stack size. */
|
||||||
|
long maxc; /* Amount of contiguous space which would
|
||||||
|
be required to satisfy the maximum
|
||||||
|
stack demand to date. */
|
||||||
|
long high_water; /* Stack high-water mark. */
|
||||||
|
long overflows; /* Number of stack overflow ($STKOFEN) calls. */
|
||||||
|
long hits; /* Number of internal buffer hits. */
|
||||||
|
long extends; /* Number of block extensions. */
|
||||||
|
long stko_mallocs; /* Block allocations by $STKOFEN. */
|
||||||
|
long underflows; /* Number of stack underflow calls ($STKRETN). */
|
||||||
|
long stko_free; /* Number of deallocations by $STKRETN. */
|
||||||
|
long stkm_free; /* Number of deallocations by $STKMRET. */
|
||||||
|
long segments; /* Current number of stack segments. */
|
||||||
|
long maxs; /* Maximum number of stack segments so far. */
|
||||||
|
long pad_size; /* Stack pad size. */
|
||||||
|
long current_address; /* Current stack segment address. */
|
||||||
|
long current_size; /* Current stack segment size. This
|
||||||
|
number is actually corrupted by STKSTAT to
|
||||||
|
include the fifteen word trailer area. */
|
||||||
|
long initial_address; /* Address of initial segment. */
|
||||||
|
long initial_size; /* Size of initial segment. */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* The following structure describes the data structure which trails
|
||||||
|
any stack segment. I think that the description in 'asdef' is
|
||||||
|
out of date. I only describe the parts that I am sure about. */
|
||||||
|
|
||||||
|
struct stk_trailer
|
||||||
|
{
|
||||||
|
long this_address; /* Address of this block. */
|
||||||
|
long this_size; /* Size of this block (does not include
|
||||||
|
this trailer). */
|
||||||
|
long unknown2;
|
||||||
|
long unknown3;
|
||||||
|
long link; /* Address of trailer block of previous
|
||||||
|
segment. */
|
||||||
|
long unknown5;
|
||||||
|
long unknown6;
|
||||||
|
long unknown7;
|
||||||
|
long unknown8;
|
||||||
|
long unknown9;
|
||||||
|
long unknown10;
|
||||||
|
long unknown11;
|
||||||
|
long unknown12;
|
||||||
|
long unknown13;
|
||||||
|
long unknown14;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* CRAY2 */
|
||||||
|
#endif /* not CRAY_STACK */
|
||||||
|
|
||||||
|
#ifdef CRAY2
|
||||||
|
/* Determine a "stack measure" for an arbitrary ADDRESS.
|
||||||
|
I doubt that "lint" will like this much. */
|
||||||
|
|
||||||
|
static long
|
||||||
|
i00afunc (long *address)
|
||||||
|
{
|
||||||
|
struct stk_stat status;
|
||||||
|
struct stk_trailer *trailer;
|
||||||
|
long *block, size;
|
||||||
|
long result = 0;
|
||||||
|
|
||||||
|
/* We want to iterate through all of the segments. The first
|
||||||
|
step is to get the stack status structure. We could do this
|
||||||
|
more quickly and more directly, perhaps, by referencing the
|
||||||
|
$LM00 common block, but I know that this works. */
|
||||||
|
|
||||||
|
STKSTAT (&status);
|
||||||
|
|
||||||
|
/* Set up the iteration. */
|
||||||
|
|
||||||
|
trailer = (struct stk_trailer *) (status.current_address
|
||||||
|
+ status.current_size
|
||||||
|
- 15);
|
||||||
|
|
||||||
|
/* There must be at least one stack segment. Therefore it is
|
||||||
|
a fatal error if "trailer" is null. */
|
||||||
|
|
||||||
|
if (trailer == 0)
|
||||||
|
abort ();
|
||||||
|
|
||||||
|
/* Discard segments that do not contain our argument address. */
|
||||||
|
|
||||||
|
while (trailer != 0)
|
||||||
|
{
|
||||||
|
block = (long *) trailer->this_address;
|
||||||
|
size = trailer->this_size;
|
||||||
|
if (block == 0 || size == 0)
|
||||||
|
abort ();
|
||||||
|
trailer = (struct stk_trailer *) trailer->link;
|
||||||
|
if ((block <= address) && (address < (block + size)))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set the result to the offset in this segment and add the sizes
|
||||||
|
of all predecessor segments. */
|
||||||
|
|
||||||
|
result = address - block;
|
||||||
|
|
||||||
|
if (trailer == 0)
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (trailer->this_size <= 0)
|
||||||
|
abort ();
|
||||||
|
result += trailer->this_size;
|
||||||
|
trailer = (struct stk_trailer *) trailer->link;
|
||||||
|
}
|
||||||
|
while (trailer != 0);
|
||||||
|
|
||||||
|
/* We are done. Note that if you present a bogus address (one
|
||||||
|
not in any segment), you will get a different number back, formed
|
||||||
|
from subtracting the address of the first block. This is probably
|
||||||
|
not what you want. */
|
||||||
|
|
||||||
|
return (result);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else /* not CRAY2 */
|
||||||
|
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
|
||||||
|
Determine the number of the cell within the stack,
|
||||||
|
given the address of the cell. The purpose of this
|
||||||
|
routine is to linearize, in some sense, stack addresses
|
||||||
|
for alloca. */
|
||||||
|
|
||||||
|
static long
|
||||||
|
i00afunc (long address)
|
||||||
|
{
|
||||||
|
long stkl = 0;
|
||||||
|
|
||||||
|
long size, pseg, this_segment, stack;
|
||||||
|
long result = 0;
|
||||||
|
|
||||||
|
struct stack_segment_linkage *ssptr;
|
||||||
|
|
||||||
|
/* Register B67 contains the address of the end of the
|
||||||
|
current stack segment. If you (as a subprogram) store
|
||||||
|
your registers on the stack and find that you are past
|
||||||
|
the contents of B67, you have overflowed the segment.
|
||||||
|
|
||||||
|
B67 also points to the stack segment linkage control
|
||||||
|
area, which is what we are really interested in. */
|
||||||
|
|
||||||
|
stkl = CRAY_STACKSEG_END ();
|
||||||
|
ssptr = (struct stack_segment_linkage *) stkl;
|
||||||
|
|
||||||
|
/* If one subtracts 'size' from the end of the segment,
|
||||||
|
one has the address of the first word of the segment.
|
||||||
|
|
||||||
|
If this is not the first segment, 'pseg' will be
|
||||||
|
nonzero. */
|
||||||
|
|
||||||
|
pseg = ssptr->sspseg;
|
||||||
|
size = ssptr->sssize;
|
||||||
|
|
||||||
|
this_segment = stkl - size;
|
||||||
|
|
||||||
|
/* It is possible that calling this routine itself caused
|
||||||
|
a stack overflow. Discard stack segments which do not
|
||||||
|
contain the target address. */
|
||||||
|
|
||||||
|
while (!(this_segment <= address && address <= stkl))
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_I00AFUNC
|
||||||
|
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
|
||||||
|
#endif
|
||||||
|
if (pseg == 0)
|
||||||
|
break;
|
||||||
|
stkl = stkl - pseg;
|
||||||
|
ssptr = (struct stack_segment_linkage *) stkl;
|
||||||
|
size = ssptr->sssize;
|
||||||
|
pseg = ssptr->sspseg;
|
||||||
|
this_segment = stkl - size;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = address - this_segment;
|
||||||
|
|
||||||
|
/* If you subtract pseg from the current end of the stack,
|
||||||
|
you get the address of the previous stack segment's end.
|
||||||
|
This seems a little convoluted to me, but I'll bet you save
|
||||||
|
a cycle somewhere. */
|
||||||
|
|
||||||
|
while (pseg != 0)
|
||||||
|
{
|
||||||
|
#ifdef DEBUG_I00AFUNC
|
||||||
|
fprintf (stderr, "%011o %011o\n", pseg, size);
|
||||||
|
#endif
|
||||||
|
stkl = stkl - pseg;
|
||||||
|
ssptr = (struct stack_segment_linkage *) stkl;
|
||||||
|
size = ssptr->sssize;
|
||||||
|
pseg = ssptr->sspseg;
|
||||||
|
result += size;
|
||||||
|
}
|
||||||
|
return (result);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* not CRAY2 */
|
||||||
|
#endif /* CRAY */
|
||||||
|
|
||||||
|
#endif /* no alloca */
|
333
libiberty/argv.c
Normal file
333
libiberty/argv.c
Normal file
@ -0,0 +1,333 @@
|
|||||||
|
/* Create and destroy argument vectors (argv's)
|
||||||
|
Copyright (C) 1992 Free Software Foundation, Inc.
|
||||||
|
Written by Fred Fish @ Cygnus Support
|
||||||
|
|
||||||
|
This file is part of the libiberty library.
|
||||||
|
Libiberty is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
Libiberty 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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with libiberty; see the file COPYING.LIB. If
|
||||||
|
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
|
||||||
|
/* Create and destroy argument vectors. An argument vector is simply an
|
||||||
|
array of string pointers, terminated by a NULL pointer. */
|
||||||
|
|
||||||
|
#include "ansidecl.h"
|
||||||
|
#include "libiberty.h"
|
||||||
|
|
||||||
|
#ifdef isspace
|
||||||
|
#undef isspace
|
||||||
|
#endif
|
||||||
|
#define isspace(ch) ((ch) == ' ' || (ch) == '\t')
|
||||||
|
|
||||||
|
/* Routines imported from standard C runtime libraries. */
|
||||||
|
|
||||||
|
#ifdef __STDC__
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
extern void *memcpy (void *s1, const void *s2, size_t n); /* 4.11.2.1 */
|
||||||
|
extern size_t strlen (const char *s); /* 4.11.6.3 */
|
||||||
|
extern void *malloc (size_t size); /* 4.10.3.3 */
|
||||||
|
extern void *realloc (void *ptr, size_t size); /* 4.10.3.4 */
|
||||||
|
extern void free (void *ptr); /* 4.10.3.2 */
|
||||||
|
extern char *strdup (const char *s); /* Non-ANSI */
|
||||||
|
|
||||||
|
#else /* !__STDC__ */
|
||||||
|
|
||||||
|
#if !defined _WIN32 || defined __GNUC__
|
||||||
|
extern char *memcpy (); /* Copy memory region */
|
||||||
|
extern int strlen (); /* Count length of string */
|
||||||
|
extern char *malloc (); /* Standard memory allocater */
|
||||||
|
extern char *realloc (); /* Standard memory reallocator */
|
||||||
|
extern void free (); /* Free malloc'd memory */
|
||||||
|
extern char *strdup (); /* Duplicate a string */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __STDC__ */
|
||||||
|
|
||||||
|
#include "alloca-conf.h"
|
||||||
|
|
||||||
|
#ifndef NULL
|
||||||
|
#define NULL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef EOS
|
||||||
|
#define EOS '\0'
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define INITIAL_MAXARGC 8 /* Number of args + NULL in initial argv */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
NAME
|
||||||
|
|
||||||
|
freeargv -- free an argument vector
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
|
||||||
|
void freeargv (vector)
|
||||||
|
char **vector;
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
|
||||||
|
Free an argument vector that was built using buildargv. Simply scans
|
||||||
|
through the vector, freeing the memory for each argument until the
|
||||||
|
terminating NULL is found, and then frees the vector itself.
|
||||||
|
|
||||||
|
RETURNS
|
||||||
|
|
||||||
|
No value.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
void freeargv (vector)
|
||||||
|
char **vector;
|
||||||
|
{
|
||||||
|
register char **scan;
|
||||||
|
|
||||||
|
if (vector != NULL)
|
||||||
|
{
|
||||||
|
for (scan = vector; *scan != NULL; scan++)
|
||||||
|
{
|
||||||
|
free (*scan);
|
||||||
|
}
|
||||||
|
free (vector);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
NAME
|
||||||
|
|
||||||
|
buildargv -- build an argument vector from a string
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
|
||||||
|
char **buildargv (sp)
|
||||||
|
char *sp;
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
|
||||||
|
Given a pointer to a string, parse the string extracting fields
|
||||||
|
separated by whitespace and optionally enclosed within either single
|
||||||
|
or double quotes (which are stripped off), and build a vector of
|
||||||
|
pointers to copies of the string for each field. The input string
|
||||||
|
remains unchanged.
|
||||||
|
|
||||||
|
All of the memory for the pointer array and copies of the string
|
||||||
|
is obtained from malloc. All of the memory can be returned to the
|
||||||
|
system with the single function call freeargv, which takes the
|
||||||
|
returned result of buildargv, as it's argument.
|
||||||
|
|
||||||
|
The memory for the argv array is dynamically expanded as necessary.
|
||||||
|
|
||||||
|
RETURNS
|
||||||
|
|
||||||
|
Returns a pointer to the argument vector if successful. Returns NULL
|
||||||
|
if the input string pointer is NULL or if there is insufficient
|
||||||
|
memory to complete building the argument vector.
|
||||||
|
|
||||||
|
NOTES
|
||||||
|
|
||||||
|
In order to provide a working buffer for extracting arguments into,
|
||||||
|
with appropriate stripping of quotes and translation of backslash
|
||||||
|
sequences, we allocate a working buffer at least as long as the input
|
||||||
|
string. This ensures that we always have enough space in which to
|
||||||
|
work, since the extracted arg is never larger than the input string.
|
||||||
|
|
||||||
|
If the input is a null string (as opposed to a NULL pointer), then
|
||||||
|
buildarg returns an argv that has one arg, a null string.
|
||||||
|
|
||||||
|
Argv is always kept terminated with a NULL arg pointer, so it can
|
||||||
|
be passed to freeargv at any time, or returned, as appropriate.
|
||||||
|
*/
|
||||||
|
|
||||||
|
char **buildargv (input)
|
||||||
|
char *input;
|
||||||
|
{
|
||||||
|
char *arg;
|
||||||
|
char *copybuf;
|
||||||
|
int squote = 0;
|
||||||
|
int dquote = 0;
|
||||||
|
int bsquote = 0;
|
||||||
|
int argc = 0;
|
||||||
|
int maxargc = 0;
|
||||||
|
char **argv = NULL;
|
||||||
|
char **nargv;
|
||||||
|
|
||||||
|
if (input != NULL)
|
||||||
|
{
|
||||||
|
copybuf = alloca (strlen (input) + 1);
|
||||||
|
/* Is a do{}while to always execute the loop once. Always return an
|
||||||
|
argv, even for null strings. See NOTES above, test case below. */
|
||||||
|
do
|
||||||
|
{
|
||||||
|
/* Pick off argv[argc] */
|
||||||
|
while (isspace (*input))
|
||||||
|
{
|
||||||
|
input++;
|
||||||
|
}
|
||||||
|
if ((maxargc == 0) || (argc >= (maxargc - 1)))
|
||||||
|
{
|
||||||
|
/* argv needs initialization, or expansion */
|
||||||
|
if (argv == NULL)
|
||||||
|
{
|
||||||
|
maxargc = INITIAL_MAXARGC;
|
||||||
|
nargv = (char **) malloc (maxargc * sizeof (char *));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
maxargc *= 2;
|
||||||
|
nargv = (char **) realloc (argv, maxargc * sizeof (char *));
|
||||||
|
}
|
||||||
|
if (nargv == NULL)
|
||||||
|
{
|
||||||
|
if (argv != NULL)
|
||||||
|
{
|
||||||
|
freeargv (argv);
|
||||||
|
argv = NULL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
argv = nargv;
|
||||||
|
argv[argc] = NULL;
|
||||||
|
}
|
||||||
|
/* Begin scanning arg */
|
||||||
|
arg = copybuf;
|
||||||
|
while (*input != EOS)
|
||||||
|
{
|
||||||
|
if (isspace (*input) && !squote && !dquote && !bsquote)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (bsquote)
|
||||||
|
{
|
||||||
|
bsquote = 0;
|
||||||
|
*arg++ = *input;
|
||||||
|
}
|
||||||
|
else if (*input == '\\')
|
||||||
|
{
|
||||||
|
bsquote = 1;
|
||||||
|
}
|
||||||
|
else if (squote)
|
||||||
|
{
|
||||||
|
if (*input == '\'')
|
||||||
|
{
|
||||||
|
squote = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*arg++ = *input;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (dquote)
|
||||||
|
{
|
||||||
|
if (*input == '"')
|
||||||
|
{
|
||||||
|
dquote = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*arg++ = *input;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (*input == '\'')
|
||||||
|
{
|
||||||
|
squote = 1;
|
||||||
|
}
|
||||||
|
else if (*input == '"')
|
||||||
|
{
|
||||||
|
dquote = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*arg++ = *input;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*arg = EOS;
|
||||||
|
argv[argc] = strdup (copybuf);
|
||||||
|
if (argv[argc] == NULL)
|
||||||
|
{
|
||||||
|
freeargv (argv);
|
||||||
|
argv = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
argc++;
|
||||||
|
argv[argc] = NULL;
|
||||||
|
|
||||||
|
while (isspace (*input))
|
||||||
|
{
|
||||||
|
input++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (*input != EOS);
|
||||||
|
}
|
||||||
|
return (argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef MAIN
|
||||||
|
|
||||||
|
/* Simple little test driver. */
|
||||||
|
|
||||||
|
static char *tests[] =
|
||||||
|
{
|
||||||
|
"a simple command line",
|
||||||
|
"arg 'foo' is single quoted",
|
||||||
|
"arg \"bar\" is double quoted",
|
||||||
|
"arg \"foo bar\" has embedded whitespace",
|
||||||
|
"arg 'Jack said \\'hi\\'' has single quotes",
|
||||||
|
"arg 'Jack said \\\"hi\\\"' has double quotes",
|
||||||
|
"a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9",
|
||||||
|
|
||||||
|
/* This should be expanded into only one argument. */
|
||||||
|
"trailing-whitespace ",
|
||||||
|
|
||||||
|
"",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
char **argv;
|
||||||
|
char **test;
|
||||||
|
char **targs;
|
||||||
|
|
||||||
|
for (test = tests; *test != NULL; test++)
|
||||||
|
{
|
||||||
|
printf ("buildargv(\"%s\")\n", *test);
|
||||||
|
if ((argv = buildargv (*test)) == NULL)
|
||||||
|
{
|
||||||
|
printf ("failed!\n\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (targs = argv; *targs != NULL; targs++)
|
||||||
|
{
|
||||||
|
printf ("\t\"%s\"\n", *targs);
|
||||||
|
}
|
||||||
|
printf ("\n");
|
||||||
|
}
|
||||||
|
freeargv (argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* MAIN */
|
14
libiberty/atexit.c
Normal file
14
libiberty/atexit.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
|
||||||
|
/* This function is in the public domain. --Mike Stump. */
|
||||||
|
|
||||||
|
#ifndef NEED_on_exit
|
||||||
|
int
|
||||||
|
atexit(f)
|
||||||
|
void (*f)();
|
||||||
|
{
|
||||||
|
/* If the system doesn't provide a definition for atexit, use on_exit
|
||||||
|
if the system provides that. */
|
||||||
|
on_exit (f, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
43
libiberty/basename.c
Normal file
43
libiberty/basename.c
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/* Return the basename of a pathname.
|
||||||
|
This file is in the public domain. */
|
||||||
|
|
||||||
|
/*
|
||||||
|
NAME
|
||||||
|
basename -- return pointer to last component of a pathname
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
char *basename (const char *name)
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
Given a pointer to a string containing a typical pathname
|
||||||
|
(/usr/src/cmd/ls/ls.c for example), returns a pointer to the
|
||||||
|
last component of the pathname ("ls.c" in this case).
|
||||||
|
|
||||||
|
BUGS
|
||||||
|
Presumes a UNIX style path with UNIX style separators.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ansidecl.h"
|
||||||
|
#include "libiberty.h"
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef NEED_basename
|
||||||
|
|
||||||
|
char *
|
||||||
|
basename (name)
|
||||||
|
const char *name;
|
||||||
|
{
|
||||||
|
const char *base = name;
|
||||||
|
|
||||||
|
while (*name)
|
||||||
|
{
|
||||||
|
if (*name++ == '/')
|
||||||
|
{
|
||||||
|
base = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (char *) base;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
49
libiberty/bcmp.c
Normal file
49
libiberty/bcmp.c
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/* bcmp
|
||||||
|
This function is in the public domain. */
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
NAME
|
||||||
|
|
||||||
|
bcmp -- compare two memory regions
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
|
||||||
|
int bcmp (char *from, char *to, int count)
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
|
||||||
|
Compare two memory regions and return zero if they are identical,
|
||||||
|
non-zero otherwise. If count is zero, return zero.
|
||||||
|
|
||||||
|
NOTES
|
||||||
|
|
||||||
|
No guarantee is made about the non-zero returned value. In
|
||||||
|
particular, the results may be signficantly different than
|
||||||
|
strcmp(), where the return value is guaranteed to be less than,
|
||||||
|
equal to, or greater than zero, according to lexicographical
|
||||||
|
sorting of the compared regions.
|
||||||
|
|
||||||
|
BUGS
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
bcmp (from, to, count)
|
||||||
|
char *from, *to;
|
||||||
|
int count;
|
||||||
|
{
|
||||||
|
int rtnval = 0;
|
||||||
|
|
||||||
|
while (count-- > 0)
|
||||||
|
{
|
||||||
|
if (*from++ != *to++)
|
||||||
|
{
|
||||||
|
rtnval = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (rtnval);
|
||||||
|
}
|
||||||
|
|
35
libiberty/bcopy.c
Normal file
35
libiberty/bcopy.c
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/* bcopy -- copy memory regions of arbitary length
|
||||||
|
|
||||||
|
NAME
|
||||||
|
bcopy -- copy memory regions of arbitrary length
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
void bcopy (char *in, char *out, int length)
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
Copy LENGTH bytes from memory region pointed to by IN to memory
|
||||||
|
region pointed to by OUT.
|
||||||
|
|
||||||
|
BUGS
|
||||||
|
Significant speed improvements can be made in some cases by
|
||||||
|
implementing copies of multiple bytes simultaneously, or unrolling
|
||||||
|
the copy loop.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
bcopy (src, dest, len)
|
||||||
|
register char *src, *dest;
|
||||||
|
int len;
|
||||||
|
{
|
||||||
|
if (dest < src)
|
||||||
|
while (len--)
|
||||||
|
*dest++ = *src++;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char *lasts = src + (len-1);
|
||||||
|
char *lastd = dest + (len-1);
|
||||||
|
while (len--)
|
||||||
|
*(char *)lastd-- = *(char *)lasts--;
|
||||||
|
}
|
||||||
|
}
|
31
libiberty/bzero.c
Normal file
31
libiberty/bzero.c
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/* Portable version of bzero for systems without it.
|
||||||
|
This function is in the public domain. */
|
||||||
|
|
||||||
|
/*
|
||||||
|
NAME
|
||||||
|
bzero -- zero the contents of a specified memory region
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
void bzero (char *to, int count)
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
Zero COUNT bytes of memory pointed to by TO.
|
||||||
|
|
||||||
|
BUGS
|
||||||
|
Significant speed enhancements may be made in some environments
|
||||||
|
by zeroing more than a single byte at a time, or by unrolling the
|
||||||
|
loop.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
bzero (to, count)
|
||||||
|
char *to;
|
||||||
|
int count;
|
||||||
|
{
|
||||||
|
while (count-- > 0)
|
||||||
|
{
|
||||||
|
*to++ = 0;
|
||||||
|
}
|
||||||
|
}
|
147
libiberty/choose-temp.c
Normal file
147
libiberty/choose-temp.c
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
/* Utility to pick a temporary filename prefix.
|
||||||
|
Copyright (C) 1996 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of the libiberty library.
|
||||||
|
Libiberty is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
Libiberty 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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with libiberty; see the file COPYING.LIB. If not,
|
||||||
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
/* This file exports one function: choose_temp_base. */
|
||||||
|
|
||||||
|
/* This file lives in at least two places: libiberty and gcc.
|
||||||
|
Don't change one without the other. */
|
||||||
|
|
||||||
|
#ifndef NO_SYS_FILE_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/file.h> /* May get R_OK, etc. on some systems. */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef R_OK
|
||||||
|
#define R_OK 4
|
||||||
|
#define W_OK 2
|
||||||
|
#define X_OK 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h> /* May get P_tmpdir. */
|
||||||
|
|
||||||
|
#ifdef IN_GCC
|
||||||
|
#include "config.h"
|
||||||
|
#include "gansidecl.h"
|
||||||
|
extern char *xmalloc ();
|
||||||
|
#else
|
||||||
|
#include "ansidecl.h"
|
||||||
|
#include "libiberty.h"
|
||||||
|
#if defined (__MSDOS__) || defined (_WIN32)
|
||||||
|
#define DIR_SEPARATOR '\\'
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DIR_SEPARATOR
|
||||||
|
#define DIR_SEPARATOR '/'
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* On MSDOS, write temp files in current dir
|
||||||
|
because there's no place else we can expect to use. */
|
||||||
|
/* ??? Although the current directory is tried as a last resort,
|
||||||
|
this is left in so that on MSDOS it is prefered to /tmp on the
|
||||||
|
off chance that someone requires this, since that was the previous
|
||||||
|
behaviour. */
|
||||||
|
#ifdef __MSDOS__
|
||||||
|
#ifndef P_tmpdir
|
||||||
|
#define P_tmpdir "."
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Name of temporary file.
|
||||||
|
mktemp requires 6 trailing X's. */
|
||||||
|
#define TEMP_FILE "ccXXXXXX"
|
||||||
|
|
||||||
|
/* Subroutine of choose_temp_base.
|
||||||
|
If BASE is non-NULL, returh it.
|
||||||
|
Otherwise it checks if DIR is a usable directory.
|
||||||
|
If success, DIR is returned.
|
||||||
|
Otherwise NULL is returned. */
|
||||||
|
|
||||||
|
static char *
|
||||||
|
try (dir, base)
|
||||||
|
char *dir, *base;
|
||||||
|
{
|
||||||
|
if (base != 0)
|
||||||
|
return base;
|
||||||
|
if (dir != 0
|
||||||
|
&& access (dir, R_OK | W_OK | X_OK) == 0)
|
||||||
|
return dir;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return a prefix for temporary file names or NULL if unable to find one.
|
||||||
|
The current directory is chosen if all else fails so the program is
|
||||||
|
exited if a temporary directory can't be found (mktemp fails).
|
||||||
|
The buffer for the result is obtained with xmalloc. */
|
||||||
|
|
||||||
|
char *
|
||||||
|
choose_temp_base ()
|
||||||
|
{
|
||||||
|
char *base = 0;
|
||||||
|
char *temp_filename;
|
||||||
|
int len;
|
||||||
|
static char tmp[] = { DIR_SEPARATOR, 't', 'm', 'p', 0 };
|
||||||
|
static char usrtmp[] = { DIR_SEPARATOR, 'u', 's', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 };
|
||||||
|
|
||||||
|
#ifndef MPW
|
||||||
|
base = try (getenv ("TMPDIR"), base);
|
||||||
|
base = try (getenv ("TMP"), base);
|
||||||
|
base = try (getenv ("TEMP"), base);
|
||||||
|
|
||||||
|
#ifdef P_tmpdir
|
||||||
|
base = try (P_tmpdir, base);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Try /usr/tmp, then /tmp. */
|
||||||
|
base = try (usrtmp, base);
|
||||||
|
base = try (tmp, base);
|
||||||
|
|
||||||
|
/* If all else fails, use the current directory! */
|
||||||
|
if (base == 0)
|
||||||
|
#ifdef VMS
|
||||||
|
base = "[";
|
||||||
|
#else
|
||||||
|
base = ".";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else /* MPW */
|
||||||
|
base = ":";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
len = strlen (base);
|
||||||
|
temp_filename = xmalloc (len + 1 /*DIR_SEPARATOR*/
|
||||||
|
+ strlen (TEMP_FILE) + 1);
|
||||||
|
strcpy (temp_filename, base);
|
||||||
|
|
||||||
|
#ifndef MPW
|
||||||
|
if (len != 0
|
||||||
|
&& temp_filename[len-1] != '/'
|
||||||
|
&& temp_filename[len-1] != DIR_SEPARATOR)
|
||||||
|
temp_filename[len++] = DIR_SEPARATOR;
|
||||||
|
#else /* MPW */
|
||||||
|
if (temp_filename[len-1] != ':')
|
||||||
|
temp_filename[len++] = ':';
|
||||||
|
#endif /* MPW */
|
||||||
|
strcpy (temp_filename + len, TEMP_FILE);
|
||||||
|
|
||||||
|
mktemp (temp_filename);
|
||||||
|
if (strlen (temp_filename) == 0)
|
||||||
|
abort ();
|
||||||
|
return temp_filename;
|
||||||
|
}
|
73
libiberty/clock.c
Normal file
73
libiberty/clock.c
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/* ANSI-compatible clock function.
|
||||||
|
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of the libiberty library. This library 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 library 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 GNU CC; see the file COPYING. If not, write to
|
||||||
|
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
As a special exception, if you link this library with files
|
||||||
|
compiled with a GNU compiler to produce an executable, this does not cause
|
||||||
|
the resulting executable to be covered by the GNU General Public License.
|
||||||
|
This exception does not however invalidate any other reasons why
|
||||||
|
the executable file might be covered by the GNU General Public License. */
|
||||||
|
|
||||||
|
#ifdef HAVE_GETRUSAGE
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/resource.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TIMES
|
||||||
|
#ifndef NO_SYS_PARAM_H
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
#include <sys/times.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* FIXME: should be able to declare as clock_t. */
|
||||||
|
|
||||||
|
long
|
||||||
|
clock ()
|
||||||
|
{
|
||||||
|
#ifdef HAVE_GETRUSAGE
|
||||||
|
struct rusage rusage;
|
||||||
|
|
||||||
|
getrusage (0, &rusage);
|
||||||
|
return (rusage.ru_utime.tv_sec * 1000000 + rusage.ru_utime.tv_usec
|
||||||
|
+ rusage.ru_stime.tv_sec * 1000000 + rusage.ru_stime.tv_usec);
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_TIMES
|
||||||
|
struct tms tms;
|
||||||
|
|
||||||
|
times (&tms);
|
||||||
|
return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
|
||||||
|
#else
|
||||||
|
#ifdef VMS
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
int proc_user_time;
|
||||||
|
int proc_system_time;
|
||||||
|
int child_user_time;
|
||||||
|
int child_system_time;
|
||||||
|
} vms_times;
|
||||||
|
|
||||||
|
times (&vms_times);
|
||||||
|
return (vms_times.proc_user_time + vms_times.proc_system_time) * 10000;
|
||||||
|
#else
|
||||||
|
/* A fallback, if nothing else available. */
|
||||||
|
return 0;
|
||||||
|
#endif /* VMS */
|
||||||
|
#endif /* HAVE_TIMES */
|
||||||
|
#endif /* HAVE_GETRUSAGE */
|
||||||
|
}
|
||||||
|
|
167
libiberty/concat.c
Normal file
167
libiberty/concat.c
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
/* Concatenate variable number of strings.
|
||||||
|
Copyright (C) 1991, 1994 Free Software Foundation, Inc.
|
||||||
|
Written by Fred Fish @ Cygnus Support
|
||||||
|
|
||||||
|
This file is part of the libiberty library.
|
||||||
|
Libiberty is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
Libiberty 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
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with libiberty; see the file COPYING.LIB. If
|
||||||
|
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
NAME
|
||||||
|
|
||||||
|
concat -- concatenate a variable number of strings
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
|
||||||
|
#include <varargs.h>
|
||||||
|
|
||||||
|
char *concat (s1, s2, s3, ..., NULL)
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
|
||||||
|
Concatenate a variable number of strings and return the result
|
||||||
|
in freshly malloc'd memory.
|
||||||
|
|
||||||
|
Returns NULL if insufficient memory is available. The argument
|
||||||
|
list is terminated by the first NULL pointer encountered. Pointers
|
||||||
|
to empty strings are ignored.
|
||||||
|
|
||||||
|
NOTES
|
||||||
|
|
||||||
|
This function uses xmalloc() which is expected to be a front end
|
||||||
|
function to malloc() that deals with low memory situations. In
|
||||||
|
typical use, if malloc() returns NULL then xmalloc() diverts to an
|
||||||
|
error handler routine which never returns, and thus xmalloc will
|
||||||
|
never return a NULL pointer. If the client application wishes to
|
||||||
|
deal with low memory situations itself, it should supply an xmalloc
|
||||||
|
that just directly invokes malloc and blindly returns whatever
|
||||||
|
malloc returns.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "ansidecl.h"
|
||||||
|
#include "libiberty.h"
|
||||||
|
|
||||||
|
#ifdef ANSI_PROTOTYPES
|
||||||
|
#include <stdarg.h>
|
||||||
|
#else
|
||||||
|
#include <varargs.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __STDC__
|
||||||
|
#include <stddef.h>
|
||||||
|
extern size_t strlen (const char *s);
|
||||||
|
#else
|
||||||
|
extern int strlen ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define NULLP (char *)0
|
||||||
|
|
||||||
|
/* VARARGS */
|
||||||
|
#ifdef ANSI_PROTOTYPES
|
||||||
|
char *
|
||||||
|
concat (const char *first, ...)
|
||||||
|
#else
|
||||||
|
char *
|
||||||
|
concat (va_alist)
|
||||||
|
va_dcl
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
register int length;
|
||||||
|
register char *newstr;
|
||||||
|
register char *end;
|
||||||
|
register const char *arg;
|
||||||
|
va_list args;
|
||||||
|
#ifndef ANSI_PROTOTYPES
|
||||||
|
const char *first;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* First compute the size of the result and get sufficient memory. */
|
||||||
|
|
||||||
|
#ifdef ANSI_PROTOTYPES
|
||||||
|
va_start (args, first);
|
||||||
|
#else
|
||||||
|
va_start (args);
|
||||||
|
first = va_arg (args, const char *);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (first == NULLP)
|
||||||
|
length = 0;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
length = strlen (first);
|
||||||
|
while ((arg = va_arg (args, const char *)) != NULLP)
|
||||||
|
{
|
||||||
|
length += strlen (arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
newstr = (char *) xmalloc (length + 1);
|
||||||
|
va_end (args);
|
||||||
|
|
||||||
|
/* Now copy the individual pieces to the result string. */
|
||||||
|
|
||||||
|
if (newstr != NULLP)
|
||||||
|
{
|
||||||
|
#ifdef ANSI_PROTOTYPES
|
||||||
|
va_start (args, first);
|
||||||
|
#else
|
||||||
|
va_start (args);
|
||||||
|
first = va_arg (args, const char *);
|
||||||
|
#endif
|
||||||
|
end = newstr;
|
||||||
|
if (first != NULLP)
|
||||||
|
{
|
||||||
|
arg = first;
|
||||||
|
while (*arg)
|
||||||
|
{
|
||||||
|
*end++ = *arg++;
|
||||||
|
}
|
||||||
|
while ((arg = va_arg (args, const char *)) != NULLP)
|
||||||
|
{
|
||||||
|
while (*arg)
|
||||||
|
{
|
||||||
|
*end++ = *arg++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*end = '\000';
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (newstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef MAIN
|
||||||
|
|
||||||
|
/* Simple little test driver. */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
printf ("\"\" = \"%s\"\n", concat (NULLP));
|
||||||
|
printf ("\"a\" = \"%s\"\n", concat ("a", NULLP));
|
||||||
|
printf ("\"ab\" = \"%s\"\n", concat ("a", "b", NULLP));
|
||||||
|
printf ("\"abc\" = \"%s\"\n", concat ("a", "b", "c", NULLP));
|
||||||
|
printf ("\"abcd\" = \"%s\"\n", concat ("ab", "cd", NULLP));
|
||||||
|
printf ("\"abcde\" = \"%s\"\n", concat ("ab", "c", "de", NULLP));
|
||||||
|
printf ("\"abcdef\" = \"%s\"\n", concat ("", "a", "", "bcd", "ef", NULLP));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
13
libiberty/config.h-vms
Normal file
13
libiberty/config.h-vms
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#ifndef NEED_strerror
|
||||||
|
#define NEED_strerror
|
||||||
|
#endif
|
||||||
|
#ifndef NEED_basename
|
||||||
|
#define NEED_basename
|
||||||
|
#endif
|
||||||
|
#ifndef NEED_psignal
|
||||||
|
#define NEED_psignal
|
||||||
|
#endif
|
||||||
|
#ifndef NEED_on_exit
|
||||||
|
#define NEED_on_exit
|
||||||
|
#endif
|
||||||
|
|
69
libiberty/config.table
Normal file
69
libiberty/config.table
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
case "${host}" in
|
||||||
|
rs6000-ibm-aix3.1 | rs6000-ibm-aix)
|
||||||
|
frag=mh-aix
|
||||||
|
files=${xsrcdir}alloca-botch.h ;;
|
||||||
|
*-ibm-aix*) files=${xsrcdir}alloca-botch.h ;;
|
||||||
|
arm-*-riscix*) frag=mh-riscix ;;
|
||||||
|
m68k-apollo-bsd*) frag=mh-a68bsd ;;
|
||||||
|
m68k-apollo-sysv*) frag=mh-apollo68 ;;
|
||||||
|
i[3456]86-ncr-sysv4*) frag=mh-ncr3000 ;;
|
||||||
|
*-*-cxux7*) frag=mh-cxux7 ;;
|
||||||
|
*-*-cygwin32) frag=mh-cygwin32 ;;
|
||||||
|
*-*-dgux*) frag=mh-sysv ;;
|
||||||
|
hppa*-hp-bsd*) frag=mh-hpbsd ;;
|
||||||
|
*-*-hpux*) frag=mh-hpux ;;
|
||||||
|
*-*-hiux*) frag=mh-hpux ;;
|
||||||
|
*-*-irix4*) frag=mh-irix4 ;;
|
||||||
|
*-*-irix*) frag=mh-sysv ;;
|
||||||
|
*-*-m88kbcs*) frag=mh-sysv ;;
|
||||||
|
*-*-solaris2*) frag=mh-sysv4 ;;
|
||||||
|
*-*-sysv4*) frag=mh-sysv4 ;;
|
||||||
|
*-*-sysv*) frag=mh-sysv ;;
|
||||||
|
*-*-go32) frag=mh-go32 ;;
|
||||||
|
i[345]86-*-windows*) frag=mh-windows ;;
|
||||||
|
|
||||||
|
*-*-vxworks5*)
|
||||||
|
# VxWorks 5 needs special action, because the usual
|
||||||
|
# autoconfiguration scheme does not work.
|
||||||
|
frag=mt-vxworks5
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Try to handle funky case of solaris 2 -> sun 4.
|
||||||
|
case "${host}" in
|
||||||
|
sparc-sun-sunos4.1.3)
|
||||||
|
if [ "${with_cross_host}" != "${host}" ] ; then
|
||||||
|
frag=mt-sunos4
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
frags=$frag
|
||||||
|
|
||||||
|
# If they didn't specify --enable-shared, don't generate shared libs.
|
||||||
|
case "${enable_shared}" in
|
||||||
|
yes) shared=yes ;;
|
||||||
|
no) shared=no ;;
|
||||||
|
*) shared=yes ;;
|
||||||
|
esac
|
||||||
|
if [ "${shared}" = "yes" ]; then
|
||||||
|
case "${host}" in
|
||||||
|
hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;
|
||||||
|
i[3456]86-*-*) frags="${frags} ../../config/mh-x86pic" ;;
|
||||||
|
*-*-*) frags="${frags} ../../config/mh-${host_cpu}pic" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "# Warning: this fragment is automatically generated" > temp-frag
|
||||||
|
|
||||||
|
for frag in ${frags}; do
|
||||||
|
frag=${srcdir}/${xsrcdir}config/$frag
|
||||||
|
if [ -f ${frag} ]; then
|
||||||
|
echo "Appending ${frag} to xhost-mkfrag"
|
||||||
|
echo "# Following fragment copied from ${frag}" >> temp-frag
|
||||||
|
cat ${frag} >> temp-frag
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
frag=xhost-mkfrag
|
||||||
|
${config_shell} ${moveifchange} temp-frag xhost-mkfrag
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user