diff options
Diffstat (limited to 'support/ligatex')
-rw-r--r-- | support/ligatex/COPYING | 273 | ||||
-rw-r--r-- | support/ligatex/Changes | 16 | ||||
-rw-r--r-- | support/ligatex/LIESMICH | 20 | ||||
-rw-r--r-- | support/ligatex/LIZENZ | 514 | ||||
-rw-r--r-- | support/ligatex/Makefile | 118 | ||||
-rw-r--r-- | support/ligatex/Makefile.in | 118 | ||||
-rw-r--r-- | support/ligatex/README | 20 | ||||
-rw-r--r-- | support/ligatex/common.c | 59 | ||||
-rwxr-xr-x | support/ligatex/configure | 1475 | ||||
-rwxr-xr-x | support/ligatex/configure.in | 29 | ||||
-rw-r--r-- | support/ligatex/getopt.c | 1031 | ||||
-rw-r--r-- | support/ligatex/getopt.h | 133 | ||||
-rw-r--r-- | support/ligatex/getopt1.c | 185 | ||||
-rwxr-xr-x | support/ligatex/install.sh | 119 | ||||
-rw-r--r-- | support/ligatex/ligatex.l | 420 | ||||
-rw-r--r-- | support/ligatex/ligatex.man | 128 | ||||
-rwxr-xr-x | support/ligatex/mkinstalldirs | 32 |
17 files changed, 4690 insertions, 0 deletions
diff --git a/support/ligatex/COPYING b/support/ligatex/COPYING new file mode 100644 index 0000000000..e4c6e126c1 --- /dev/null +++ b/support/ligatex/COPYING @@ -0,0 +1,273 @@ + GNU GENERAL PUBLIC LICENSE
+
+ Version 2, June 1991
+ Copyright © 1989, 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.
+
+ 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
diff --git a/support/ligatex/Changes b/support/ligatex/Changes new file mode 100644 index 0000000000..6e9f93a6ae --- /dev/null +++ b/support/ligatex/Changes @@ -0,0 +1,16 @@ +0.1.0 First release +0.1.1 added manpage, thanks to Heiko Bauke + <Heiko.Bauke@Student.UNI-Magdeburg.DE> + for telling me that it was missing +0.1.5 added more words, found in rmligs by Björn Jacke + improved documentation & removed "Aufl." thanks to + Joachim Trinkwitz <jtr@uni-bonn.de> + Makros don't get ligatexed +0.1.6 corrected typo, thanks to Karsten + Tinnefeld <tinne@noether.cs.uni-dortmund.de> + corrected error in macro-processing, thanks to Björn Jacke, + and corrected his name. +0.2.0 ./configure --bindir works now. + LigaTeX parses now babel-makros. + Introduced ligatex-pseudo-environment. + Extended manpage. diff --git a/support/ligatex/LIESMICH b/support/ligatex/LIESMICH new file mode 100644 index 0000000000..2eec59b51b --- /dev/null +++ b/support/ligatex/LIESMICH @@ -0,0 +1,20 @@ +Ligatex Version 0.2 + +Das Programm Ligatex hebt in Texten, die für Verwendung mit dem Textsatzsystem +TeX geschrieben sind, an Stellen wo sie nicht hingehören, Ligaturen auf. +Es greift dazu auf einen wörterbuchbasierten Ansatz zurück und kann daher nur +für Texte, die auf Deutsch verfaßt sind, sinnvoll verwandt werden. Eine +Anpassung für andere Sprachen kann durch Ersatz der Datei ligatex.l erfolgen. +Der Autor würde sich über solche Anpassungen freuen, sowie über Fehlermeldungen +zur vorliegenden deutschen Version. + +The programme ligatex converts texts that are written for use with the layout +system Tex in such a way that ligatures are removed from certain places. The +programm currently only treats texts written in German. Thus this programme is +probably only of interest to you if you have some knowledge of the German +language. Therefore the rest of this documentation is only available in German. +However, the author welcomes additions to ligatex in order to make it usable +with any language. For this purpose the file ligatex.l should be edited. + +Gerhard Killesreiter +killesreiter@physik.uni-freiburg.de
\ No newline at end of file diff --git a/support/ligatex/LIZENZ b/support/ligatex/LIZENZ new file mode 100644 index 0000000000..1add6a4f5e --- /dev/null +++ b/support/ligatex/LIZENZ @@ -0,0 +1,514 @@ + +Deutsche Übersetzung der GNU General Public License + + + Erstellt im Auftrag der [1]S.u.S.E. GmbH [suse@suse.de] + von Katja Lachmann Übersetzungen [na194@fim.uni-erlangen.de], + überarbeitet von [2]Peter Gerwinski [peter.gerwinski@uni-essen.de] + (31. Oktober 1996) + + Diese Übersetzung wird mit der Absicht angeboten, das Verständnis der + GNU General Public License (GNU-GPL) zu erleichtern. Es handelt sich + jedoch nicht um eine offizielle oder im rechtlichen Sinne anerkannte + Übersetzung. + + Die Free Software Foundation (FSF) ist nicht der Herausgeber dieser + Übersetzung, und sie hat diese Übersetzung auch nicht als + rechtskräftigen Ersatz für die Original-GNU-GPL anerkannt. Da die + Übersetzung nicht sorgfältig von Anwälten überprüft wurde, können die + Übersetzer nicht garantieren, daß die Übersetzung die rechtlichen + Aussagen der GNU-GPL exakt wiedergibt. Wenn Sie sichergehen wollen, + daß von Ihnen geplante Aktivitäten im Sinne der GNU-GPL gestattet + sind, halten Sie sich bitte an die englischsprachige Originalversion. + + Die Free Software Foundation möchte Sie darum bitten, diese + Übersetzung nicht als offizielle Lizenzbedingungen für von Ihnen + geschriebene Programme zu verwenden. Bitte benutzen Sie hierfür + stattdessen die von der Free Software Foundation herausgegebene + englischsprachige Originalversion. + + This is a translation of the GNU General Public License into German. + This translation is distributed in the hope that it will facilitate + understanding, but it is not an official or legally approved + translation. + + The Free Software Foundation is not the publisher of this translation + and has not approved it as a legal substitute for the authentic GNU + General Public License. The translation has not been reviewed + carefully by lawyers, and therefore the translator cannot be sure that + it exactly represents the legal meaning of the GNU General Public + License. If you wish to be sure whether your planned activities are + permitted by the GNU General Public License, please refer to the + authentic English version. + + The Free Software Foundation strongly urges you not to use this + translation as the official distribution terms for your programs; + instead, please use the authentic English version published by the + Free Software Foundation. + _________________________________________________________________ + + GNU General Public License + + Deutsche Übersetzung der Version 2, Juni 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + + Jeder hat das Recht, diese Lizenzurkunde zu vervielfältigen und + unveränderte Kopien zu verbreiten; Änderungen sind jedoch nicht + gestattet. + + Diese Übersetzung ist kein rechtskräftiger Ersatz für die + englischsprachige Originalversion! + +Vorwort + + Die meisten Softwarelizenzen sind daraufhin entworfen worden, Ihnen + die Freiheit zu nehmen, die Software weiterzugeben und zu verändern. + Im Gegensatz dazu soll Ihnen die GNU General Public License, die + allgemeine öffentliche GNU-Lizenz, ebendiese Freiheit garantieren. Sie + soll sicherstellen, daß die Software für alle Benutzer frei ist. Diese + Lizenz gilt für den Großteil der von der Free Software Foundation + herausgegebenen Software und für alle anderen Programme, deren Autoren + ihr Werk dieser Lizenz unterstellt haben. Auch Sie können diese + Möglichkeit der Lizenzierung für Ihre Programme anwenden. (Ein anderer + Teil der Software der Free Software Foundation unterliegt stattdessen + der GNU Library General Public License, der allgemeinen öffentlichen + GNU-Lizenz für Bibliotheken. + ) + + Die Bezeichnung "freie" Software bezieht sich auf Freiheit, nicht auf + den Preis. Unsere Lizenzen sollen Ihnen die Freiheit garantieren, + Kopien freier Software zu verbreiten (und etwas für diesen Service zu + berechnen, wenn Sie möchten), die Möglichkeit, die Software im + Quelltext zu erhalten oder den Quelltext auf Wunsch zu bekommen. Die + Lizenzen sollen garantieren, daß Sie die Software ändern oder Teile + davon in neuen freien Programmen verwenden dürfen - und daß Sie + wissen, daß Sie dies alles tun dürfen. + + Um Ihre Rechte zu schützen, müssen wir Einschränkungen machen, die es + jedem verbieten, Ihnen diese Rechte zu verweigern oder Sie + aufzufordern, auf diese Rechte zu verzichten. Aus diesen + Einschränkungen folgen bestimmte Verantwortlichkeiten für Sie, wenn + Sie Kopien der Software verbreiten oder sie verändern. + + Beispielsweise müssen Sie den Empfängern alle Rechte gewähren, die Sie + selbst haben, wenn Sie - kostenlos oder gegen Bezahlung - Kopien eines + solchen Programms verbreiten. Sie müssen sicherstellen, daß auch sie + den Quelltext erhalten bzw. erhalten können. Und Sie müssen ihnen + diese Bedingungen zeigen, damit sie ihre Rechte kennen. + + Wir schützen Ihre Rechte in zwei Schritten: (1) Wir stellen die + Software unter ein Urheberrecht (Copyright), und (2) wir bieten Ihnen + diese Lizenz an, die Ihnen das Recht gibt, die Software zu + vervielfältigen, zu verbreiten und/oder zu verändern. + + Um die Autoren und uns zu schützen, wollen wir darüberhinaus + sicherstellen, daß jeder erfährt, daß für diese freie Software + keinerlei Garantie besteht. Wenn die Software von jemand anderem + modifiziert und weitergegeben wird, möchten wir, daß die Empfänger + wissen, daß sie nicht das Original erhalten haben, damit von anderen + verursachte Probleme nicht den Ruf des ursprünglichen Autors + schädigen. + + Schließlich und endlich ist jedes freie Programm permanent durch + Software-Patente bedroht. Wir möchten die Gefahr ausschließen, daß + Distributoren eines freien Programms individuell Patente lizensieren - + mit dem Ergebnis, daß das Programm proprietär würde. Um dies zu + verhindern, haben wir klargestellt, daß jedes Patent entweder für + freie Benutzung durch jedermann lizenziert werden muß oder überhaupt + nicht lizenziert werden darf. + + Es folgen die genauen Bedingungen für die Vervielfältigung, + Verbreitung und Bearbeitung: + +Bedingungen für die Vervielfältigung, Verbreitung und Bearbeitung + + Paragraph 0. Diese Lizenz gilt für jedes Programm und jedes andere + Werk, in dem ein entsprechender Vermerk des Copyright-Inhabers darauf + hinweist, daß das Werk unter den Bestimmungen dieser General Public + License verbreitet werden darf. Im folgenden wird jedes derartige + Programm oder Werk als "das Programm" bezeichnet; die Formulierung + "auf dem Programm basierendes Werk" bezeichnet das Programm sowie + jegliche Bearbeitung des Programms im urheberrechtlichen Sinne, also + ein Werk, welches das Programm, auch auszugsweise, sei es unverändert + oder verändert und/oder in eine andere Sprache übersetzt, enthält. (Im + folgenden wird die Übersetzung ohne Einschränkung als "Bearbeitung" + eingestuft.) Jeder Lizenznehmer wird im folgenden als "Sie" + angesprochen. + + Andere Handlungen als Vervielfältigung, Verbreitung und Bearbeitung + werden von dieser Lizenz nicht berührt; sie fallen nicht in ihren + Anwendungsbereich. Der Vorgang der Ausführung des Programms wird nicht + eingeschränkt, und die Ausgaben des Programms unterliegen dieser + Lizenz nur, wenn der Inhalt ein auf dem Programm basierendes Werk + darstellt (unabhängig davon, daß die Ausgabe durch die Ausführung des + Programmes erfolgte). Ob dies zutrifft, hängt von den Funktionen des + Programms ab. + + Paragraph 1. Sie dürfen auf beliebigen Medien unveränderte Kopien des + Quelltextes des Programms, wie sie ihn erhalten haben, anfertigen und + verbreiten. Voraussetzung hierfür ist, daß Sie mit jeder Kopie einen + entsprechenden Copyright-Vermerk sowie einen Haftungsausschluß + veröffentlichen, alle Vermerke, die sich auf diese Lizenz und das + Fehlen einer Garantie beziehen, unverändert lassen und desweiteren + allen anderen Empfängern des Programms zusammen mit dem Programm eine + Kopie dieser Lizenz zukommen lassen. + + Sie dürfen für den eigentlichen Kopiervorgang eine Gebühr verlangen. + Wenn Sie es wünschen, dürfen Sie auch gegen Entgelt eine Garantie für + das Programm anbieten. + + Paragraph 2. Sie dürfen Ihre Kopie(n) des Programms oder eines Teils + davon verändern, wodurch ein auf dem Programm basierendes Werk + entsteht; Sie dürfen derartige Bearbeitungen unter den Bestimmungen + von Paragraph 1 vervielfältigen und verbreiten, vorausgesetzt, daß + zusätzlich alle folgenden Bedingungen erfüllt werden: + + (a) + Sie müssen die veränderten Dateien mit einem auffälligen + Vermerk versehen, der auf die von Ihnen vorgenommene + Modifizierung und das Datum jeder Änderung hinweist. + + (b) + Sie müssen dafür sorgen, daß jede von Ihnen verbreitete oder + veröffentlichte Arbeit, die ganz oder teilweise von dem + Programm oder Teilen davon abgeleitet ist, Dritten gegenüber + als Ganzes unter den Bedingungen dieser Lizenz ohne + Lizenzgebühren zur Verfügung gestellt wird. + + (c) + Wenn das veränderte Programm normalerweise bei der Ausführung + interaktiv Kommandos einliest, müssen Sie dafür sorgen, daß es, + wenn es auf dem üblichsten Wege für solche interaktive Nutzung + gestartet wird, eine Meldung ausgibt oder ausdruckt, die einen + geeigneten Copyright-Vermerk enthält sowie einen Hinweis, daß + es keine Gewährleistung gibt (oder anderenfalls, daß Sie + Garantie leisten), und daß die Benutzer das Programm unter + diesen Bedingungen weiter verbreiten dürfen. Auch muß der + Benutzer darauf hingewiesen werden, wie er eine Kopie dieser + Lizenz ansehen kann. (Ausnahme: Wenn das Programm selbst + interaktiv arbeitet, aber normalerweise keine derartige Meldung + ausgibt, muß Ihr auf dem Programm basierendes Werk auch keine + solche Meldung ausgeben). + + Diese Anforderungen betreffen das veränderte Werk als Ganzes. Wenn + identifizierbare Abschnitte des Werkes nicht von dem Programm + abgeleitet sind und vernünftigerweise selbst als unabhängige und + eigenständige Werke betrachtet werden können, dann erstrecken sich + diese Lizenz und ihre Bedingungen nicht auf diese Abschnitte, wenn sie + als eigenständige Werke verbreitet werden. Wenn Sie jedoch dieselben + Abschnitte als Teil eines Ganzen verbreiten, das ein auf dem Programm + basierendes Werk darstellt, dann muß die Verbreitung des Ganzen nach + den Bedingungen dieser Lizenz erfolgen, deren Bedingungen für weitere + Lizenznehmer somit auf die Gesamtheit ausgedehnt werden - und damit + auf jeden einzelnen Teil, unabhängig vom jeweiligen Autor. + + Somit ist es nicht die Absicht dieses Abschnittes, Rechte für Werke in + Anspruch zu nehmen oder zu beschneiden, die komplett von Ihnen + geschrieben wurden; vielmehr ist es die Absicht, die Rechte zur + Kontrolle der Verbreitung von Werken, die auf dem Programm basieren + oder unter seiner auszugsweisen Verwendung zusammengestellt worden + sind, auszuüben. + + Ferner bringt ein einfaches Zusammenstellen eines anderen Werkes, das + nicht auf dem Programm basiert, zusammen mit dem Programm oder einem + auf dem Programm basierenden Werk auf ein- und demselben Speicher- + oder Vertriebsmedium das andere Werk nicht in den Anwendungsbereich + dieser Lizenz. + + Paragraph 3. Sie dürfen das Programm (oder ein darauf basierendes Werk + gemäß Paragraph 2) als Objectcode oder in ausführbarer Form unter den + Bedingungen von Paragraph 1 und 2 vervielfältigen und verbreiten - + vorausgesetzt, daß Sie außerdem eine der folgenden Leistungen + erbringen: + + (a) + Liefern Sie das Programm zusammen mit dem vollständigen + zugehörigen maschinenlesbaren Quelltext auf einem für den + Datenaustausch üblichen Medium aus, wobei die Verteilung unter + den Bedingungen der Paragraphen 1 und 2 erfolgen muß. Oder: + + (b) + Liefern Sie das Programm zusammen mit einem mindestens drei + Jahre lang gültigen schriftlichen Angebot aus, jedem Dritten + eine vollständige maschinenlesbare Kopie des Quelltextes zur + Verfügung zu stellen - zu nicht höheren Kosten als denen, die + durch den physikalischen Kopiervorgang anfallen -, wobei der + Quelltext unter den Bedingungen der Paragraphen 1 und 2 auf + einem für den Datenaustausch üblichen Medium weitergegeben + wird. Oder: + + (c) + Liefern Sie das Programm zusammen mit dem schriftlichen Angebot + der Zurverfügungstellung des Quelltextes aus, das Sie selbst + erhalten haben. (Diese Alternative ist nur für + nicht-kommerzielle Verbreitung zulässig und nur, wenn Sie das + Programm als Objectcode oder in ausführbarer Form mit einem + entsprechenden Angebot gemäß Absatz b erhalten haben.) + + Unter dem Quelltext eines Werkes wird diejenige Form des Werkes + verstanden, die für Bearbeitungen vorzugsweise verwendet wird. Für ein + ausführbares Programm bedeutet "der komplette Quelltext": Der + Quelltext aller im Programm enthaltenen Module einschließlich aller + zugehörigen Modulschnittstellen-Definitionsdateien sowie der zur + Compilation und Installation verwendeten Skripte. Als besondere + Ausnahme jedoch braucht der verteilte Quelltext nichts von dem zu + enthalten, was üblicherweise (entweder als Quelltext oder in binärer + Form) zusammen mit den Hauptkomponenten des Betriebssystems (Kernel, + Compiler usw.) geliefert wird, unter dem das Programm läuft - es sei + denn, diese Komponente selbst gehört zum ausführbaren Programm. + + Wenn die Verbreitung eines ausführbaren Programms oder des Objectcodes + dadurch erfolgt, daß der Kopierzugriff auf eine dafür vorgesehene + Stelle gewährt wird, so gilt die Gewährung eines gleichwertigen + Zugriffs auf den Quelltext als Verbreitung des Quelltextes, auch wenn + Dritte nicht dazu gezwungen sind, den Quelltext zusammen mit dem + Objectcode zu kopieren. + + Paragraph 4. Sie dürfen das Programm nicht vervielfältigen, verändern, + weiter lizenzieren oder verbreiten, sofern es nicht durch diese Lizenz + ausdrücklich gestattet ist. Jeder anderweitige Versuch der + Vervielfältigung, Modifizierung, Weiterlizenzierung und Verbreitung + ist nichtig und beendet automatisch Ihre Rechte unter dieser Lizenz. + Jedoch werden die Lizenzen Dritter, die von Ihnen Kopien oder Rechte + unter dieser Lizenz erhalten haben, nicht beendet, solange diese die + Lizenz voll anerkennen und befolgen. + + Paragraph 5. Sie sind nicht verpflichtet, diese Lizenz anzunehmen, da + Sie sie nicht unterzeichnet haben. Jedoch gibt Ihnen nichts anderes + die Erlaubnis, das Programm oder von ihm abgeleitete Werke zu + verändern oder zu verbreiten. Diese Handlungen sind gesetzlich + verboten, wenn Sie diese Lizenz nicht anerkennen. Indem Sie das + Programm (oder ein darauf basierendes Werk) verändern oder verbreiten, + erklären Sie Ihr Einverständnis mit dieser Lizenz und mit allen ihren + Bedingungen bezüglich der Vervielfältigung, Verbreitung und + Veränderung des Programms oder eines darauf basierenden Werkes. + + Paragraph 6. Jedesmal, wenn Sie das Programm (oder ein auf dem + Programm basierendes Werk) weitergeben, erhält der Empfänger + automatisch vom ursprünglichen Lizenzgeber die Lizenz, das Programm + entsprechend den hier festgelegten Bestimmungen zu vervielfältigen, zu + verbreiten und zu verändern. Sie dürfen keine weiteren Einschränkungen + der Durchsetzung der hierin zugestandenen Rechte des Empfängers + vornehmen. Sie sind nicht dafür verantwortlich, die Einhaltung dieser + Lizenz durch Dritte durchzusetzen. + + Paragraph 7. Sollten Ihnen infolge eines Gerichtsurteils, des Vorwurfs + einer Patentverletzung oder aus einem anderen Grunde (nicht auf + Patentfragen begrenzt) Bedingungen (durch Gerichtsbeschluß, Vergleich + oder anderweitig) auferlegt werden, die den Bedingungen dieser Lizenz + widersprechen, so befreien Sie diese Umstände nicht von den + Bestimmungen dieser Lizenz. Wenn es Ihnen nicht möglich ist, das + Programm unter gleichzeitiger Beachtung der Bedingungen in dieser + Lizenz und Ihrer anderweitigen Verpflichtungen zu verbreiten, dann + dürfen Sie als Folge das Programm überhaupt nicht verbreiten. Wenn zum + Beispiel ein Patent nicht die gebührenfreie Weiterverbreitung des + Programms durch diejenigen erlaubt, die das Programm direkt oder + indirekt von Ihnen erhalten haben, dann besteht der einzige Weg, + sowohl das Patentrecht als auch diese Lizenz zu befolgen, darin, ganz + auf die Verbreitung des Programms zu verzichten. + + Sollte sich ein Teil dieses Paragraphen als ungültig oder unter + bestimmten Umständen nicht durchsetzbar erweisen, so soll dieser + Paragraph seinem Sinne nach angewandt werden; im übrigen soll dieser + Paragraph als Ganzes gelten. + + Zweck dieses Paragraphen ist nicht, Sie dazu zu bringen, irgendwelche + Patente oder andere Eigentumsansprüche zu verletzen oder die + Gültigkeit solcher Ansprüche zu bestreiten; dieser Paragraph hat + einzig den Zweck, die Integrität des Verbreitungssystems der freien + Software zu schützen, das durch die Praxis öffentlicher Lizenzen + verwirklicht wird. Viele Leute haben großzügige Beiträge zu dem großen + Angebot der mit diesem System verbreiteten Software im Vertrauen auf + die konsistente Anwendung dieses Systems geleistet; es liegt am + Autor/Geber, zu entscheiden, ob er die Software mittels irgendeines + anderen Systems verbreiten will; ein Lizenznehmer hat auf diese + Entscheidung keinen Einfluß. + + Dieser Paragraph ist dazu gedacht, deutlich klarzustellen, was als + Konsequenz aus dem Rest dieser Lizenz betrachtet wird. + + Paragraph 8. Wenn die Verbreitung und/oder die Benutzung des Programms + in bestimmten Staaten entweder durch Patente oder durch + urheberrechtlich geschützte Schnittstellen eingeschränkt ist, kann der + Urheberrechtsinhaber, der das Programm unter diese Lizenz gestellt + hat, eine explizite geographische Begrenzung der Verbreitung angeben, + in der diese Staaten ausgeschlossen werden, so daß die Verbreitung nur + innerhalb und zwischen den Staaten erlaubt ist, die nicht + ausgeschlossen sind. In einem solchen Fall beinhaltet diese Lizenz die + Beschränkung, als wäre sie in diesem Text niedergeschrieben. + + Paragraph 9. Die Free Software Foundation kann von Zeit zu Zeit + überarbeitete und/oder neue Versionen der General Public License + veröffentlichen. Solche neuen Versionen werden vom Grundprinzip her + der gegenwärtigen entsprechen, können aber im Detail abweichen, um + neuen Problemen und Anforderungen gerecht zu werden. + + Jede Version dieser Lizenz hat eine eindeutige Versionsnummer. Wenn in + einem Programm angegeben wird, daß es dieser Lizenz in einer + bestimmten Versionsnummer oder "jeder späteren Version" ("any later + version") unterliegt, so haben Sie die Wahl, entweder den Bestimmungen + der genannten Version zu folgen oder denen jeder beliebigen späteren + Version, die von der Free Software Foundation veröffentlicht wurde. + Wenn das Programm keine Versionsnummer angibt, können Sie eine + beliebige Version wählen, die je von der Free Software Foundation + veröffentlicht wurde. + + Paragraph 10. Wenn Sie den Wunsch haben, Teile des Programms in + anderen freien Programmen zu verwenden, deren Bedingungen für die + Verbreitung anders sind, schreiben Sie an den Autor, um ihn um die + Erlaubnis zu bitten. Für Software, die unter dem Copyright der Free + Software Foundation steht, schreiben Sie an die Free Software + Foundation; wir machen zu diesem Zweck gelegentlich Ausnahmen. Unsere + Entscheidung wird von den beiden Zielen geleitet werden, zum einen den + freien Status aller von unserer freien Software abgeleiteten Werke zu + erhalten und zum anderen das gemeinschaftliche Nutzen und + Wiederverwenden von Software im allgemeinen zu fördern. + + Keine Gewährleistung + + Paragraph 11. Da das Programm ohne jegliche Kosten lizenziert wird, + besteht keinerlei Gewährleistung für das Programm, soweit dies + gesetzlich zulässig ist. Sofern nicht anderweitig schriftlich + bestätigt, stellen die Copyright-Inhaber und/oder Dritte das Programm + so zur Verfügung, "wie es ist", ohne irgendeine Gewährleistung, weder + ausdrücklich noch implizit, einschließlich - aber nicht begrenzt auf - + Marktreife oder Verwendbarkeit für einen bestimmten Zweck. Das volle + Risiko bezüglich Qualität und Leistungsfähigkeit des Programms liegt + bei Ihnen. Sollte sich das Programm als fehlerhaft herausstellen, + liegen die Kosten für notwendigen Service, Reparatur oder Korrektur + bei Ihnen. + + Paragraph 12. In keinem Fall, außer wenn durch geltendes Recht + gefordert oder schriftlich zugesichert, ist irgendein + Copyright-Inhaber oder irgendein Dritter, der das Programm wie oben + erlaubt modifiziert oder verbreitet hat, Ihnen gegenüber für + irgendwelche Schäden haftbar, einschließlich jeglicher allgemeiner + oder spezieller Schäden, Schäden durch Seiteneffekte (Nebenwirkungen) + oder Folgeschäden, die aus der Benutzung des Programms oder der + Unbenutzbarkeit des Programms folgen (einschließlich - aber nicht + beschränkt auf - Datenverluste, fehlerhafte Verarbeitung von Daten, + Verluste, die von Ihnen oder anderen getragen werden müssen, oder dem + Unvermögen des Programms, mit irgendeinem anderen Programm + zusammenzuarbeiten), selbst wenn ein Copyright-Inhaber oder Dritter + über die Möglichkeit solcher Schäden unterrichtet worden war. + + Ende der Bedingungen + _________________________________________________________________ + +Anhang: Wie Sie diese Bedingungen auf Ihre neuen Programme anwendbar machen + + Wenn Sie ein neues Programm entwickeln und wollen, daß es von + größtmöglichem Nutzen für die Allgemeinheit ist, dann erreichen Sie + das am besten, indem Sie es zu freier Software machen, die jeder unter + diesen Bestimmungen weiterverbreiten und verändern kann. + + Um dies zu erreichen, fügen Sie die folgenden Anmerkungen zu Ihrem + Programm hinzu. Am sichersten ist es, sie an den Anfang einer jeden + Quelldatei zu stellen, um den Gewährleistungsausschluß möglichst + deutlich darzustellen; außerdem sollte jede Datei mindestens eine + "Copyright"-Zeile besitzen sowie einen kurzen Hinweis darauf, wo die + vollständige Lizenz gefunden werden kann. + + [eine Zeile mit dem Programmnamen und einer kurzen Beschreibung] + Copyright (C) 19[yy] [Name des Autors] + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + Auf Deutsch: + + + [eine Zeile mit dem Programmnamen und einer kurzen Beschreibung] + Copyright (C) 19[jj] [Name des Autors] + + Dieses Programm ist freie Software. Sie können es unter + den Bedingungen der GNU General Public License, wie von der + Free Software Foundation herausgegeben, weitergeben und/oder + modifizieren, entweder unter Version 2 der Lizenz oder (wenn + Sie es wünschen) jeder späteren Version. + + Die Veröffentlichung dieses Programms erfolgt in der + Hoffnung, daß es Ihnen von Nutzen sein wird, aber OHNE JEDE + GEWÄHRLEISTUNG - sogar ohne die implizite Gewährleistung + der MARKTREIFE oder der EIGNUNG FÜR EINEN BESTIMMTEN ZWECK. + Details finden Sie in der GNU General Public License. + + Sie sollten eine Kopie der GNU General Public License zusammen + mit diesem Programm erhalten haben. Falls nicht, schreiben Sie + an die Free Software Foundation, Inc., 675 Mass Ave, Cambridge, + MA 02139, USA. + + + Fügen Sie auch einen kurzen Hinweis hinzu, wie Sie elektronisch und + per Brief erreichbar sind. + + Wenn Ihr Programm interaktiv ist, sorgen Sie dafür, daß es nach dem + Start einen kurzen Vermerk ausgibt: + + Gnomovision version 69, Copyright (C) 19[yy] [Name des Autors] + 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. + + + Auf Deutsch: + + Gnomovision Version 69, Copyright (C) 19[jj] [Name des Autors] + Für Gnomovision besteht KEINERLEI GARANTIE; geben Sie `show w' + für Details ein. Gnomovision ist freie Software, die Sie unter + bestimmten Bedingungen weitergeben dürfen; geben Sie `show c' + für Details ein. + + + Die hypothetischen Kommandos `show w' und `show c' sollten die + entsprechenden Teile der GNU-GPL anzeigen. Natürlich können die von + Ihnen verwendeten Kommandos anders heißen als `show w' und `show c'; + es könnten auch Mausklicks oder Menüpunkte sein - was immer am besten + in Ihr Programm paßt. + + Soweit vorhanden, sollten Sie auch Ihren Arbeitgeber (wenn Sie als + Programmierer arbeiten) oder Ihre Schule einen Copyright-Verzicht für + das Programm unterschreiben lassen. Hier ein Beispiel; ändern Sie + bitte die Namen: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + program "Gnomovision" (which makes passes at compilers) written by + James Hacker. + + [Unterschrift von Ty Coon], 1 April 1989 + Ty Coon, President of Vice + + Auf Deutsch: + + Die Yoyodyne GmbH erhebt keinerlei urheberrechtlichen Anspruch auf + das Programm "Gnomovision" (einem Schrittmacher für Compiler), + geschrieben von James Hacker. + + [Unterschrift von Ty Coon], 1. April 1989 + Ty Coon, Vizepräsident + + Diese General Public License gestattet nicht die Einbindung des + Programms in proprietäre Programme. Ist Ihr Programm eine + Funktionsbibliothek, so kann es sinnvoller sein, das Linken + proprietärer Programme mit dieser Bibliothek zu gestatten. Wenn Sie + dies tun wollen, sollten Sie die GNU Library General Public License + anstelle dieser Lizenz verwenden. + +References + + 1. http://www.suse.de/ + 2. http://agnes.dida.physik.uni-essen.de/~peter/ diff --git a/support/ligatex/Makefile b/support/ligatex/Makefile new file mode 100644 index 0000000000..4921afdd8f --- /dev/null +++ b/support/ligatex/Makefile @@ -0,0 +1,118 @@ +# Generated automatically from Makefile.in by configure. +#---------------------------------------------------------------------------- +# Ligatex - Makefile +# +# v0.2.0 +# +# Taken from the GNU Talkfilters v 1.0 +# See GNU General Public License for modification and distribution +# information. +#---------------------------------------------------------------------------- + +SHELL = /bin/sh + +.SUFFIXES: .c .l .o + +#---------------------------------------------------------------------------- + +srcdir = . + +CC = gcc +LEX = flex +INSTALL = /usr/bin/ginstall -c +INSTALL_PROGRAM = ${INSTALL} +INSTALL_DATA = ${INSTALL} -m 644 + +CFLAGS = -g -O2 +LFLAGS = -Cf -8 +CFLAGS_COMPILE_ONLY = -c +LDFLAGS = +O=o + +LIBS = -lfl + +prefix = /home/killes +exec_prefix = ${prefix} + +# Where the installed binary goes. +bindir = ${exec_prefix}/bin +binprefix = + +mandir = ${prefix}/man/man${manext} +manext = 1 +manprefix = + +#### End of system configuration section. #### + +#---------------------------------------------------------------------------- + +PACKAGE = ligatex-0.2.0 +FILTERS = ligatex +PROGS = $(FILTERS) + +all: $(PROGS) + +GETOPT = getopt.o getopt1.o +COMMON = $(GETOPT) common.o + +.l.c: + $(LEX) $(LFLAGS) $< + mv lex.yy.c $@ + +.c.o: + $(CC) -c $< + +ligatex: ligatex.o $(COMMON) + $(CC) $(CFLAGS) ligatex.o $(COMMON) -o $@ $(LIBS) + + + +install: all installdirs + ${INSTALL_DATA} ${srcdir}/ligatex.man \ + ${mandir}/${manprefix}/ligatex.${manext}; \ + for i in $(FILTERS); do \ + ${INSTALL_PROGRAM} $$i ${bindir}/${binprefix}$$i; \ + ${INSTALL_DATA} ${srcdir}/$$i.man \ + ${mandir}/${manprefix}$$i.${manext}; \ + done + +uninstall: + for i in $(PROGS); do \ + rm -f ${bindir}/${binprefix}/$$i; \ + rm -f ${mandir}/$$i.${manext}; \ + done + +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install + +dist: distclean + cd .. ; \ + rm -f $(PACKAGE).tar $(PACKAGE).tar.gz ; \ + tar cvf $(PACKAGE).tar ./$(PACKAGE) ; \ + gzip $(PACKAGE).tar + +distclean: clean + rm -f *.log config.cache config.status ref.man + +installdirs: + $(SHELL) ${srcdir}/mkinstalldirs ${bindir} ${mandir} + +mostlyclean: clean + +clean: + rm -f core *.o *.log + for i in $(PROGS); do \ + rm -f $$i; \ + done; + for i in $(FILTERS); do \ + rm -f $$i.c; \ + done; + + + + + + + + + diff --git a/support/ligatex/Makefile.in b/support/ligatex/Makefile.in new file mode 100644 index 0000000000..721c0592e8 --- /dev/null +++ b/support/ligatex/Makefile.in @@ -0,0 +1,118 @@ +#---------------------------------------------------------------------------- +# Ligatex - Makefile +# +# v0.2.0 +# +# Taken from the GNU Talkfilters v 1.0 +# See GNU General Public License for modification and distribution +# information. +#---------------------------------------------------------------------------- + +SHELL = /bin/sh + +.SUFFIXES: .c .l .o + +#---------------------------------------------------------------------------- + +srcdir = @srcdir@ +VPATH = @srcdir@ + +CC = @CC@ +LEX = @LEX@ +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +CFLAGS = @CFLAGS@ +LFLAGS = -Cf -8 +CFLAGS_COMPILE_ONLY = -c +LDFLAGS = @LDFLAGS@ +O=o + +LIBS = @LIBS@ -lfl + +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +# Where the installed binary goes. +bindir = @bindir@ +binprefix = + +mandir = ${prefix}/man/man${manext} +manext = 1 +manprefix = + +#### End of system configuration section. #### + +#---------------------------------------------------------------------------- + +PACKAGE = ligatex-0.2.0 +FILTERS = ligatex +PROGS = $(FILTERS) + +all: $(PROGS) + +GETOPT = getopt.o getopt1.o +COMMON = $(GETOPT) common.o + +.l.c: + $(LEX) $(LFLAGS) $< + mv lex.yy.c $@ + +.c.o: + $(CC) -c $< + +ligatex: ligatex.o $(COMMON) + $(CC) $(CFLAGS) ligatex.o $(COMMON) -o $@ $(LIBS) + + + +install: all installdirs + ${INSTALL_DATA} ${srcdir}/ligatex.man \ + ${mandir}/${manprefix}/ligatex.${manext}; \ + for i in $(FILTERS); do \ + ${INSTALL_PROGRAM} $$i ${bindir}/${binprefix}$$i; \ + ${INSTALL_DATA} ${srcdir}/$$i.man \ + ${mandir}/${manprefix}$$i.${manext}; \ + done + +uninstall: + for i in $(PROGS); do \ + rm -f ${bindir}/${binprefix}/$$i; \ + rm -f ${mandir}/$$i.${manext}; \ + done + +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install + +dist: distclean + cd .. ; \ + rm -f $(PACKAGE).tar $(PACKAGE).tar.gz ; \ + tar cvf $(PACKAGE).tar ./$(PACKAGE) ; \ + gzip $(PACKAGE).tar + +distclean: clean + rm -f *.log config.cache config.status ref.man + +installdirs: + $(SHELL) ${srcdir}/mkinstalldirs ${bindir} ${mandir} + +mostlyclean: clean + +clean: + rm -f core *.o *.log + for i in $(PROGS); do \ + rm -f $$i; \ + done; + for i in $(FILTERS); do \ + rm -f $$i.c; \ + done; + + + + + + + + + diff --git a/support/ligatex/README b/support/ligatex/README new file mode 100644 index 0000000000..04e9078ce3 --- /dev/null +++ b/support/ligatex/README @@ -0,0 +1,20 @@ +Ligatex Version 0.2 + +Das Programm Ligatex hebt in Texten, die für Verwendung mit dem Textsatzsystem +TeX geschrieben sind, an Stellen wo sie nicht hingehören, Ligaturen auf. +Es greift dazu auf einen wörterbuchbasierten Ansatz zurück und kann daher nur +für Texte, die auf Deutsch verfaßt sind, sinnvoll verwandt werden. Eine +Anpassung für andere Sprachen kann durch Ersatz der Datei ligatex.l erfolgen. +Der Autor würde sich über solche Anpassungen freuen, sowie über Fehlermeldungen +zur vorliegenden deutschen Version. + +The programme ligatex converts texts that are written for use with the layout +system TeX in such a way that ligatures are removed from certain places. The +programm currently only treats texts written in German. Thus this programme is +probably only of interest to you if you have some knowledge of the German +language. Therefore the rest of this documentation is only available in German. +However, the author welcomes additions to ligatex in order to make it usable +with any language. For this purpose the file ligatex.l should be edited. + +Gerhard Killesreiter +killesreiter@physik.uni-freiburg.de diff --git a/support/ligatex/common.c b/support/ligatex/common.c new file mode 100644 index 0000000000..c1c6c2c1f8 --- /dev/null +++ b/support/ligatex/common.c @@ -0,0 +1,59 @@ +/* GNU TalkFilters - common command line parsing code + Copyright (C) 1998 Free Software Foundation, Inc. + + This file is part of GNU Talkfilters + + GNU Talkfilters 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. + + GNU Talkfilters is distributed in the hope that it will be amusing, + 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 Talkfilters; see the file COPYING. If not, write to + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <stdlib.h> +#include <stddef.h> +#include <stdio.h> + +#include "getopt.h" + +#define HELP_OPTION 0 +#define VERSION_OPTION 1 + +static const struct option options[] = { { "help", 0, NULL, 0 }, + { "version", 0, NULL, 0 }, + { NULL, 0, NULL, 0 } }; + +void parse_args(int argc, char **argv, char *help, char *version) +{ + int c, option_index; + + while((c = getopt_long(argc, argv, "", options, &option_index)) != EOF) + { + switch(c) + { + case 0: + if(option_index == HELP_OPTION) + fprintf(stderr, help, *argv); + else if(option_index == VERSION_OPTION) + { + fputs(version, stderr); + fputc('\n', stderr); + } + exit(EXIT_SUCCESS); + break; + + default: + fprintf(stderr, help, *argv); + exit(EXIT_FAILURE); + break; + } + } +} diff --git a/support/ligatex/configure b/support/ligatex/configure new file mode 100755 index 0000000000..5a41881b89 --- /dev/null +++ b/support/ligatex/configure @@ -0,0 +1,1475 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# 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= +SHELL=${CONFIG_SHELL-/bin/sh} +# 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.13" + 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=ligatex.l + +# 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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +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 + + + +# Extract the first word of "flex", so it can be a program name with args. +set dummy flex; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:529: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_LEX="flex" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lose" +fi +fi +LEX="$ac_cv_prog_LEX" +if test -n "$LEX"; then + echo "$ac_t""$LEX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test $ac_cv_prog_LEX = lose; then + echo flex not found + exit 1 +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 +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./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:592: 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=":" + 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. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall 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. + : + 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_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:647: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:677: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:728: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:760: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 771 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +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${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:802: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:807: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:835: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + + + +echo $ac_n "checking for main in -ll""... $ac_c" 1>&6 +echo "configure:869: checking for main in -ll" >&5 +ac_lib_var=`echo l'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ll $LIBS" +cat > conftest.$ac_ext <<EOF +#line 877 "configure" +#include "confdefs.h" + +int main() { +main() +; return 0; } +EOF +if { (eval echo configure:884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo l | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-ll $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:913: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext <<EOF +#line 928 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext <<EOF +#line 945 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext <<EOF +#line 962 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:993: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 998 "configure" +#include "confdefs.h" +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1023 "configure" +#include "confdefs.h" +#include <string.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1041 "configure" +#include "confdefs.h" +#include <stdlib.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext <<EOF +#line 1062 "configure" +#include "confdefs.h" +#include <ctype.h> +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +for ac_hdr in unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1100: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1105 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:1138: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1143 "configure" +#include "confdefs.h" + +int main() { + +/* Ultrix mips cc rejects this. */ +typedef int charset[2]; const charset x; +/* SunOS 4.1.1 cc rejects this. */ +char const *const *ccp; +char **p; +/* NEC SVR4.0.2 mips cc rejects this. */ +struct point {int x, y;}; +static struct point const zero = {0,0}; +/* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in an arm + of an if-expression whose if-part is not a constant expression */ +const char *g = "string"; +ccp = &g + (g ? g-g : 0); +/* HPUX 7.0 cc rejects these. */ +++ccp; +p = (char**) ccp; +ccp = (char const *const *) p; +{ /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; +} +{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; +} +{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; +} +{ /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:1192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + + + +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 | grep ac_space) 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.13" + 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%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%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%@LEX@%$LEX%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@CC@%$CC%g +s%@CPP@%$CPP%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 + diff --git a/support/ligatex/configure.in b/support/ligatex/configure.in new file mode 100755 index 0000000000..a22fdca06c --- /dev/null +++ b/support/ligatex/configure.in @@ -0,0 +1,29 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(ligatex.l) + +dnl We only want to use flex, not any other lex, because the files in this +dnl distribution are too big for non-flex lex implementations. +AC_CHECK_PROG(LEX, flex, flex, lose) +if test $ac_cv_prog_LEX = lose; then + echo flex not found + exit 1 +fi + +dnl Checks for programs. +AC_PROG_INSTALL +AC_PROG_CC + +dnl Checks for libraries. + +AC_CHECK_LIB(l, main) + +dnl Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS(unistd.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST + +dnl Checks for library functions. + +AC_OUTPUT(Makefile) diff --git a/support/ligatex/getopt.c b/support/ligatex/getopt.c new file mode 100644 index 0000000000..f08ec7760c --- /dev/null +++ b/support/ligatex/getopt.c @@ -0,0 +1,1031 @@ +/* Getopt for GNU. + NOTE: getopt is now part of the C library, so if you don't know what + "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu + before changing it! + + Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97 + 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, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +USA. */ + +/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. + Ditto for AIX 3.2 and <stdlib.h>. */ +#ifndef _NO_PROTO +#define _NO_PROTO +#endif + +#ifdef HAVE_CONFIG_H +#include <../src/config.h> +#endif + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#define GETOPT_INTERFACE_VERSION 2 +#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2 +#include <gnu-versions.h> +#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION +#define ELIDE_CODE +#endif +#endif + +#ifndef ELIDE_CODE + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +/* Don't include stdlib.h for non-GNU C libraries because some of them + contain conflicting prototypes for getopt. */ +#include <stdlib.h> +#include <unistd.h> +#endif /* GNU C library. */ + +#ifdef VMS +#include <unixlib.h> +#if HAVE_STRING_H - 0 +#include <string.h> +#endif +#endif + +#if defined (WIN32) && !defined (__CYGWIN32__) +/* It's not Unix, really. See? Capital letters. */ +#include <windows.h> +#define getpid() GetCurrentProcessId() +#endif + +#ifndef _ +/* This is for other GNU distributions with internationalized messages. + When compiling libc, the _ macro is predefined. */ +#ifdef HAVE_LIBINTL_H +# include <libintl.h> +# define _(msgid) gettext (msgid) +#else +# define _(msgid) (msgid) +#endif +#endif + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of ARGV so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Setting the environment variable POSIXLY_CORRECT disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include "getopt.h" + +/* 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. */ + +char *optarg = NULL; + +/* 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 -1, 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. */ + +/* 1003.2 says this must be 1 before any call. */ +int optind = 1; + +/* Formerly, initialization of getopt depended on optind==0, which + causes problems with re-calling getopt as programs generally don't + know that. */ + +int __getopt_initialized = 0; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int optopt = '?'; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using `+' as the first character + of the list of option characters. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code 1. + Using `-' as the first character of the list of option characters + selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return -1 with `optind' != ARGC. */ + +static enum +{ + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER +} ordering; + +/* Value of POSIXLY_CORRECT environment variable. */ +static char *posixly_correct; + +#ifdef __GNU_LIBRARY__ +/* We want to avoid inclusion of string.h with non-GNU libraries + because there are many ways it can cause trouble. + On some systems, it contains special magic macros that don't work + in GCC. */ +#include <string.h> +#define my_index strchr +#else + +/* Avoid depending on library functions or files + whose names are inconsistent. */ + +char *getenv (); + +static char * +my_index (const char *str, int chr) +{ + while (*str) + { + if (*str == chr) + return (char *) str; + str++; + } + return 0; +} + +/* If using GCC, we can safely declare strlen this way. + If not using GCC, it is ok not to declare it. */ +#ifdef __GNUC__ +/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. + That was relevant to code that was here before. */ +#if !defined (__STDC__) || !__STDC__ +/* gcc with -traditional declares the built-in strlen to return int, + and has done so at least since version 2.4.5. -- rms. */ +extern int strlen (const char *); +#endif /* not __STDC__ */ +#endif /* __GNUC__ */ + +#endif /* not __GNU_LIBRARY__ */ + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +#ifdef _LIBC +/* Bash 2.0 gives us an environment variable containing flags + indicating ARGV elements that should not be considered arguments. */ + +/* Defined in getopt_init.c */ +extern char *__getopt_nonoption_flags; + +static int nonoption_flags_max_len; +static int nonoption_flags_len; + +static int original_argc; +static char *const *original_argv; + +extern pid_t __libc_pid; + +/* Make sure the environment variable bash 2.0 puts in the environment + is valid for the getopt call we must make sure that the ARGV passed + to getopt is that one passed to the process. */ +static void +__attribute__ ((unused)) +store_args_and_env (int argc, char *const *argv) +{ + /* XXX This is no good solution. We should rather copy the args so + that we can compare them later. But we must not use malloc(3). */ + original_argc = argc; + original_argv = argv; +} +text_set_element (__libc_subinit, store_args_and_env); + +# define SWAP_FLAGS(ch1, ch2) \ + if (nonoption_flags_len > 0) \ + { \ + char __tmp = __getopt_nonoption_flags[ch1]; \ + __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ + __getopt_nonoption_flags[ch2] = __tmp; \ + } +#else /* !_LIBC */ +# define SWAP_FLAGS(ch1, ch2) +#endif /* _LIBC */ + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +#if defined (__STDC__) && __STDC__ +static void exchange (char **); +#endif + +static void +exchange (char **argv) +{ + int bottom = first_nonopt; + int middle = last_nonopt; + int top = optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + +#ifdef _LIBC + /* First make sure the handling of the `__getopt_nonoption_flags' + string can work normally. Our top argument must be in the range + of the string. */ + if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) + { + /* We must extend the array. The user plays games with us and + presents new arguments. */ + char *new_str = malloc (top + 1); + if (new_str == NULL) + nonoption_flags_len = nonoption_flags_max_len = 0; + else + { + memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len); + memset (&new_str[nonoption_flags_max_len], '\0', + top + 1 - nonoption_flags_max_len); + nonoption_flags_max_len = top + 1; + __getopt_nonoption_flags = new_str; + } + } +#endif + + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + SWAP_FLAGS (bottom + i, middle + i); + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } + + /* Update records for the slots the non-options now occupy. */ + + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} + +/* Initialize the internal data when the first call is made. */ + +#if defined (__STDC__) && __STDC__ +static const char *_getopt_initialize (int, char *const *, const char *); +#endif +static const char * +_getopt_initialize (int argc, char *const *argv, const char *optstring) +{ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + first_nonopt = last_nonopt = optind; + + nextchar = NULL; + + posixly_correct = getenv ("POSIXLY_CORRECT"); + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (posixly_correct != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + +#ifdef _LIBC + if (posixly_correct == NULL + && argc == original_argc && argv == original_argv) + { + if (nonoption_flags_max_len == 0) + { + if (__getopt_nonoption_flags == NULL + || __getopt_nonoption_flags[0] == '\0') + nonoption_flags_max_len = -1; + else + { + const char *orig_str = __getopt_nonoption_flags; + int len = nonoption_flags_max_len = strlen (orig_str); + if (nonoption_flags_max_len < argc) + nonoption_flags_max_len = argc; + __getopt_nonoption_flags = + (char *) malloc (nonoption_flags_max_len); + if (__getopt_nonoption_flags == NULL) + nonoption_flags_max_len = -1; + else + { + memcpy (__getopt_nonoption_flags, orig_str, len); + memset (&__getopt_nonoption_flags[len], '\0', + nonoption_flags_max_len - len); + } + } + } + nonoption_flags_len = nonoption_flags_max_len; + } + else + nonoption_flags_len = 0; +#endif + + return optstring; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns -1. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg', otherwise `optarg' is set to zero. + + If OPTSTRING starts with `-' or `+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with `--' instead of `-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a `=', or else the in next ARGV-element. + When `getopt' finds a long-named option, it returns 0 if that option's + `flag' field is nonzero, the value of the option's `val' field + if the `flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of `struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal (int argc, char *const *argv, const char *optstring, + const struct option *longopts, int *longind, int long_only) +{ + optarg = NULL; + + if (optind == 0 || !__getopt_initialized) + { + if (optind == 0) + optind = 1; /* Don't scan ARGV[0], the program name. */ + optstring = _getopt_initialize (argc, argv, optstring); + __getopt_initialized = 1; + } + + /* Test whether ARGV[optind] points to a non-option argument. + Either it does not have option syntax, or there is an environment flag + from the shell indicating it is not an option. The later information + is only used when the used in the GNU libc. */ +#ifdef _LIBC +#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ + || (optind < nonoption_flags_len \ + && __getopt_nonoption_flags[optind] == '1')) +#else +#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') +#endif + + if (nextchar == NULL || *nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (last_nonopt > optind) + last_nonopt = optind; + if (first_nonopt > optind) + first_nonopt = optind; + + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc && NONOPTION_P) + optind++; + last_nonopt = optind; + } + + /* The special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return -1; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (NONOPTION_P) + { + if (ordering == REQUIRE_ORDER) + return -1; + optarg = argv[optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + nextchar = (argv[optind] + 1 + + (longopts != NULL && argv[optind][1] == '-')); + } + + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[optind][1] == '-' + || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = -1; + int option_index; + + for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) + == (unsigned int) strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second or later nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + if (opterr) + fprintf (stderr, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); + nextchar += strlen (nextchar); + optind++; + optopt = 0; + return '?'; + } + + if (pfound != NULL) + { + option_index = indfound; + optind++; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (opterr) + if (argv[optind - 1][1] == '-') + /* --option */ + fprintf (stderr, + _("%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); + else + /* +option or -option */ + fprintf (stderr, + _("%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], pfound->name); + + nextchar += strlen (nextchar); + + optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (opterr) + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + nextchar += strlen (nextchar); + optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[optind][1] == '-' + || my_index (optstring, *nextchar) == NULL) + { + if (opterr) + { + if (argv[optind][1] == '-') + /* --option */ + fprintf (stderr, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); + else + /* +option or -option */ + fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); + } + nextchar = (char *) ""; + optind++; + optopt = 0; + return '?'; + } + } + + /* Look at and handle the next short option-character. */ + + { + char c = *nextchar++; + char *temp = my_index (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; + + if (temp == NULL || c == ':') + { + if (opterr) + { + if (posixly_correct) + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, _("%s: illegal option -- %c\n"), + argv[0], c); + else + fprintf (stderr, _("%s: invalid option -- %c\n"), + argv[0], c); + } + optopt = c; + return '?'; + } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (opterr) + { + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, _("%s: option requires an argument -- %c\n"), + argv[0], c); + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) + { + if (opterr) + fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); + nextchar += strlen (nextchar); + optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (opterr) + fprintf (stderr, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); + + nextchar += strlen (nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (opterr) + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + nextchar += strlen (nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != '\0') + { + optarg = nextchar; + optind++; + } + else + optarg = NULL; + nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (opterr) + { + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, + _("%s: option requires an argument -- %c\n"), + argv[0], c); + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = NULL; + } + } + return c; + } +} + +int +getopt (int argc, char *const *argv, const char *optstring) +{ + return _getopt_internal (argc, argv, optstring, + (const struct option *) 0, + (int *) 0, + 0); +} + +#endif /* Not ELIDE_CODE. */ + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use in testing + the above definition of `getopt'. */ + +int +main (int argc, char **argv) +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == -1) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/support/ligatex/getopt.h b/support/ligatex/getopt.h new file mode 100644 index 0000000000..69256fd386 --- /dev/null +++ b/support/ligatex/getopt.h @@ -0,0 +1,133 @@ +/* Declarations for getopt. + Copyright (C) 1989,90,91,92,93,94,96,97 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, Inc., 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 -1, 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 defined (__STDC__) && __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 defined (__STDC__) && __STDC__ +#ifdef __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 /* __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 /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#endif /* _GETOPT_H */ diff --git a/support/ligatex/getopt1.c b/support/ligatex/getopt1.c new file mode 100644 index 0000000000..26ed12a97e --- /dev/null +++ b/support/ligatex/getopt1.c @@ -0,0 +1,185 @@ +/* getopt_long and getopt_long_only entry points for GNU getopt. + Copyright (C) 1987,88,89,90,91,92,93,94,96,97 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, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +USA. */ + +#ifdef HAVE_CONFIG_H +#include <../src/config.h> +#endif + +#include "getopt.h" + +#include <stdio.h> + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#define GETOPT_INTERFACE_VERSION 2 +#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2 +#include <gnu-versions.h> +#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION +#define ELIDE_CODE +#endif +#endif + +#ifndef ELIDE_CODE + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +#include <stdlib.h> +#endif + +#ifndef NULL +#define NULL 0 +#endif + +int +getopt_long (int argc, char *const *argv, const char *options, + const struct option *long_options, int *opt_index) +{ + return _getopt_internal (argc, argv, options, long_options, opt_index, 0); +} + +/* Like getopt_long, but '-' as well as '--' can indicate a long option. + If an option that starts with '-' (not '--') doesn't match a long option, + but does match a short option, it is parsed as a short option + instead. */ + +int +getopt_long_only (int argc, char *const *argv, const char *options, + const struct option *long_options, int *opt_index) +{ + return _getopt_internal (argc, argv, options, long_options, opt_index, 1); +} + + +#endif /* Not ELIDE_CODE. */ + +#ifdef TEST + +#include <stdio.h> + +int +main (int argc, char **argv) +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + int option_index = 0; + static struct option long_options[] = + { + {"add", 1, 0, 0}, + {"append", 0, 0, 0}, + {"delete", 1, 0, 0}, + {"verbose", 0, 0, 0}, + {"create", 0, 0, 0}, + {"file", 1, 0, 0}, + {0, 0, 0, 0} + }; + + c = getopt_long (argc, argv, "abc:d:0123456789", + long_options, &option_index); + if (c == -1) + break; + + switch (c) + { + case 0: + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case 'd': + printf ("option d with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ + + + + + + + + + + + + + + diff --git a/support/ligatex/install.sh b/support/ligatex/install.sh new file mode 100755 index 0000000000..0ff4b6a08e --- /dev/null +++ b/support/ligatex/install.sh @@ -0,0 +1,119 @@ +#!/bin/sh + +# +# install - install a program, script, or datafile +# This comes from X11R5; it is not part of GNU. +# +# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ +# +# This script is compatible with the BSD install script, but was written +# from scratch. +# + + +# 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}" + +instcmd="$mvprog" +chmodcmd="" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + 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;; + + *) if [ x"$src" = x ] + then + src=$1 + else + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +fi + +if [ x"$dst" = x ] +then + echo "install: no destination specified" + exit 1 +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` +fi + +# Make a temp file name in the proper directory. + +dstdir=`dirname $dst` +dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + +$doit $instcmd $src $dsttmp + +# and set any options; do chmod last to preserve setuid bits + +if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi +if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi +if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi +if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi + +# Now rename the file to the real destination. + +$doit $rmcmd $dst +$doit $mvcmd $dsttmp $dst + + +exit 0 diff --git a/support/ligatex/ligatex.l b/support/ligatex/ligatex.l new file mode 100644 index 0000000000..d99097fd60 --- /dev/null +++ b/support/ligatex/ligatex.l @@ -0,0 +1,420 @@ +%pointer +%s LIGATEX +%x KLAMMER GARNICHT +NN [ ,.;\n\t\r<-] +kon [b-df-hj-np-tv-z] +vok ([aeiouäüö]|(ä)|(\"a)|(ü)|(\"u)|(ö)|(\"o)) +kss [bdfghklmnpqrstvwxz] +klein ([a-zäüöß]|(ä)|(\"a)|(ü)|(\"u)|(ö)|(\"o)|ß|(\"s)|(ß)) +grosz ([A-ZÄÖÜ]|(Ä)|(\"A)|(Ü)|(\"U)|(Ö)|(\"O)) +endung (e|(en)|(es)|(em)|(er)|(est)|(este)|(esten)|(ester)|(estes)|(estem)|(ste)|(ster)|(stes)|(sten)|(stem)|(st)|(ste)|(stes)|(sten)|(stem)|(ster)) +konjugiert (e|(en)|(st)|(en)|t|(te)|(test)|(ten)|(tet)) +ae (ä|(ä)|(\"a)) +ue (ü|(ü)|(\"u)) +oe (ö|(ö)|(\"o)) +Ae (Ä|(Ä)|(\"A)) +Ue (Ü|(Ü)|(\"U)) +Oe (Ö|(Ö)|(\"O)) +uml (ä|(ä)|(\"a)|ü|(ü)|(\"u)|ö|(ö)|(\"o)) +Uml (Ä|(Ä)|(\"A)|Ü|(Ü)|(\"U)|Ö|(Ö)|(\"O)) +sz (ß|(\"s)|(ß)) +sstp (((ssch)|(sst)|(ssp))([a-z]|(ä|(ä)|(\"a)|ü|(ü)|(\"u)|ö|(ö)|(\"o)))) + +%{ +/* Ligatex + Copyright (C) 1999,2000 Gerhard Killesreiter <gerhard@killesreiter.de> + +Ligatex ist ein freies Programm; Sie können es unter den +Bedingungen der GNU General Public Licence, wie sie von der Free +Software Foundation veröffentlicht wurde, verteilen und/oder +modifizieren. Sie können die zweite Version verwenden oder nach +ihrer Wahl jedwede später erscheinende Version. + +Ligatex wird in der Hoffnung verteilt, daß es nützlich sei, aber +OHNE JEDWEDE GARANTIE, sogar ohne auch nur die implizite Garantie +der HANDELBARKEIT oder der EIGNUNG FüR EINEN BESTIMMTEN ZWECK. Lesen +Sie die GNU General Public Licence, um mehr Details zu erfahren. + +Sie sollten in der Datei COPYING eine Kopie der GNU General Public +Licence mit Ligatex erhalten haben. Falls nicht, schreiben Sie +an die Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, +USA. In der Datei LIZENZ befindet sich eine Übersetzung der GNU +General Public Licence ins Deutsche, im Zweifelsfall ist die +englische Originalversion die ausschlaggebende. + +Ligatex 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. + +Ligatex is distributed in the hope that it will be usefull, +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 Ligatex; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +%} + char zeich; + int i,j; + int umlleng = 1; + int latex = 0; + int klammer = 0; + int scan = 0; + int foreign = 0; + char *szp; + char *aep; + char *deutsch; +%% +[öäüßÖÄÜ] {ECHO; umlleng=1; szp = "ß";aep = "ä";} +((&[Aa]uml;)|(&[Uu]uml;)|(&[Uu]uml;)|(ß)) {ECHO; umlleng= 6; + szp = "ß"; + aep = "ä";} +((\"[Aa])|(\"[Uu])|(\"[Oo])|(\"s)) {ECHO; umlleng = 2; szp = "\"s"; + aep = "\"a";} +^[ \t]*"\\documentclass[" {printf(yytext); latex = 1;} +^[ \t]*"\\documentclass" {printf(yytext); + latex = 1;} +^[ \t]*"\\documentclass["[a-z,]*n?german[a-z,]*"]" {printf(yytext); + deutsch = "babel"; + latex = 1;} +^[ \t]*"\\documentclass["[a-z,]*n?austrian[a-z,]*"]" {printf(yytext); + deutsch = "babel"; + latex = 1;} +^[ \t]*"\\usepackage{"[a-z,]*n?german[a-z,]*"}" {printf(yytext); + deutsch = "german";} +^[ \t]*"\\usepackage["[a-z,]*n?german"]{babel}" {printf(yytext); + deutsch = "babel2";} +^[ \t]*"\\usepackage["[a-z,]*n?german[a-z,]*"]{babel}" {printf(yytext); + deutsch = "babel";} +^[ \t]*"\\usepackage["[a-z,]*n?austrian"]{babel}" {printf(yytext); + deutsch = "babel2";} +^[ \t]*"\\usepackage["[a-z,]*n?austrian[a-z,]*"]{babel}" {printf(yytext); + deutsch = "babel";} +^[ \t]*"\\begin{document}" {printf(yytext); + if ( deutsch == "german" || + deutsch == "babel2"){ + BEGIN(LIGATEX); + scan = 1;}} +<GARNICHT,INITIAL>^%*"\\begin{ligatex}" {printf(yytext); + BEGIN(LIGATEX); + scan = 1;} +"\\selectlanguage{"[a-z]+"}" { + int stamm = yyleng - 17; + char sprache[yyleng - 17]; + printf(yytext); + if ( stamm >= 7 ){ + for (i = 0;i < stamm; i++){ + sprache[i] = yytext[16 + i]; + } + if(strncmp(sprache,"german",6) == 0 || + strncmp(sprache,"\\german",7) == 0 || + strncmp(sprache,"ngerman",7) == 0 || + strncmp(sprache,"austrian",8) == 0 || + strncmp(sprache,"naustrian",9) == 0) + { + BEGIN(LIGATEX); + scan = 1;} else{ + BEGIN(INITIAL); + scan = 0;} + } else {BEGIN(INITIAL); + scan = 0;} + } +"\\begin{otherlanguage}{"[a-z]+"}" { + int stamm = yyleng - 23; + char sprache[yyleng - 23]; + printf(yytext); + if ( stamm >= 6 ){ + for (i = 0;i< stamm; i++){ + sprache[i] = yytext[22 + i]; + } + if(strncmp(sprache,"german",6) == 0 || + strncmp(sprache,"ngerman",7) == 0 || + strncmp(sprache,"austrian",8) == 0 || + strncmp(sprache,"naustrian",9) == 0) + { + BEGIN(LIGATEX); + scan = 1;} else{ + BEGIN(INITIAL); + scan = 0;} + } else {BEGIN(INITIAL); + scan = 0;} + } +"\\begin{otherlanguage*}{"[a-z]*"}" { + int stamm = yyleng - 24; + char sprache[yyleng - 24]; + printf(yytext); + if ( stamm >= 6 ){ + for (i = 0;i < stamm;i++){ + sprache[i] = yytext[23 + i]; + } + if( strncmp(sprache,"german",6) == 0 || + strncmp(sprache,"ngerman",7) == 0 || + strncmp(sprache,"austrian",8) == 0 || + strncmp(sprache,"naustrian",9) == 0) + { + BEGIN(LIGATEX); + scan = 1;} else{ + BEGIN(INITIAL); + scan = 0;} + } else {BEGIN(INITIAL); + scan = 0;} + } +"\\end{otherlanguage}" {printf(yytext); + if(scan == 1){ + BEGIN(INITIAL); + scan = 0;} + else { + BEGIN(LIGATEX); + scan = 1;}} +"\\foreignlanguage{"[a-z]+"}{" { + int stamm = yyleng - 19; + char sprache[yyleng - 19]; + printf(yytext); + if ( stamm >= 6 && + stamm <= 9 ){ + for (i = 0;i < stamm ; i++){ + sprache[i] = yytext[17 + i]; + } + if(strncmp(sprache,"german",6) == 0 || + strncmp(sprache,"ngerman",7) == 0 || + strncmp(sprache,"austrian",8) == 0 || + strncmp(sprache,"naustrian",9) == 0) + { + BEGIN(LIGATEX); + scan = 1; + klammer = 1; + foreign = 1; + } else{ + BEGIN(KLAMMER); + scan = 0; + foreign = 0; + klammer = 1; + } + } else {BEGIN(KLAMMER); + scan = 0; + klammer = 1; + foreign = 0; + } + } +<LIGATEX>"\\{" ECHO; +<LIGATEX>"\\}" ECHO; +<LIGATEX>"{" {printf(yytext); + if (foreign == 1 ){ + klammer = klammer + 1;}} +<LIGATEX>"}" {printf(yytext); + if (foreign == 1 ){ + klammer = klammer - 1;} + if ( klammer == 0 && + foreign == 1){ + BEGIN(INITIAL); + scan = 0; + foreign = 0; + }} +<KLAMMER>"\\{" ECHO; +<KLAMMER>"\\}" ECHO; +<KLAMMER>"{" {printf(yytext); + klammer = klammer + 1;} +<KLAMMER>"}" {printf(yytext); + klammer = klammer - 1; + if ( klammer == 0){ + BEGIN(LIGATEX); + scan = 1; + }} +^[ \t]*"\\end{document}" {printf(yytext); + BEGIN(INITIAL); + scan = 0;} +^%*"\\end{ligatex}" {printf(yytext); + BEGIN(GARNICHT); + scan = 0;} +<LIGATEX>{ +"\\"({grosz}{klein}*)* printf(yytext);/*TeX Makros*/ +"\\"{klein}*{NN} printf(yytext); +"\\"{klein}*"\\" printf(yytext); +"\\begin{"{grosz}{klein}*"}" printf(yytext);/*Umgebungen*/ +"\\begin{"{klein}*"}" printf(yytext);/*Umgebungen*/ +"\\end{"{grosz}{klein}*"}" printf(yytext);/*Umgebungen*/ +"\\end{"{klein}*"}" printf(yytext);/*Umgebungen*/ +[Tt]"iefl" {for (i = 0;i < yyleng - 1;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("l"); +[Tt]"ieffl" {for (i = 0;i < yyleng - 2;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("fl"); +"Aufl." printf("Aufl."); +[^Bb][Aa]"ufl" {for (i = 0;i < yyleng - 1;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("l"); +[Aa]"uffl" {for (i = 0;i < yyleng - 2;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("fl"); +[Aa]"uffi" {for (i = 0;i < yyleng - 2;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("fi"); +[Aa]"uff" {for (i = 0;i < yyleng - 1;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("f"); +[Cc]"heffl" {for (i = 0;i < yyleng - 2;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("fl"); +[Cc]"hefi" {for (i = 0;i < yyleng - 1;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("i"); +[Dd]"ampfl" {for (i=0;i < yyleng -1;i++){ + printf("%c",yytext[i]);} + };printf("\"|");printf("l"); +[Ff]"reiberufl" {for (i=0;i < yyleng -1;i++){ + printf("%c",yytext[i]);} + };printf("\"|");printf("l"); +"pffl" {for (i = 0;i < yyleng - 2;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("fl"); +[Kk]"ampff" {for (i=0;i < yyleng -1;i++){ + printf("%c",yytext[i]);} + };printf("\"|");printf("f"); +[Kk]"opflastig" printf("%c",yytext[0]);printf("opf\"|lastig"); +{NN}[Oo]"ffl" {for (i = 0;i < yyleng - 1;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("l"); +[Ss]"chaffell" printf("%c",yytext[0]);printf("chaf\"|fell"); +[Ss]"chaufl" {for (i = 0;i < yyleng;i++ ){ + printf("%c",yytext[i]); + } + }; +[Ss]"chlupfl" printf("%c",yytext[0]);printf("chlupf\"|l"); +[Ss]"chn"{ue}"ffl" {for (i = 0;i < yyleng -3 ;i++ ){ + printf("%c",yytext[i]); + } + };printf("ff\"|l"); +[Ss]"umpfl" {for (i=0;i < yyleng -1;i++){ + printf("%c",yytext[i]);} + };printf("\"|");printf("l"); +[Cc]"hauffi" {for (i = 0;i < yyleng;i++ ){ + printf("%c",yytext[i]); + } + }; +[Cc]"hauff" {for (i = 0;i < yyleng;i++ ){ + printf("%c",yytext[i]); + } + }; +[alp]"flos"([^s]|{NN}) {printf("%c",yytext[0]); + printf("f\"|los"); + printf("%c",yytext[5]);} +"flich"({endung}|{NN}) printf("f\"|lich");{ + for (i = 5;i < yyleng;i++ ){ + printf("%c",yytext[i]); + }}; +"flisch"({endung}|{NN}) printf("f\"|lisch");{ + for (i = 6;i < yyleng;i++ ){ + printf("%c",yytext[i]); + }}; +"flig"({endung}|{NN}) printf("f\"|lig");{ + for (i = 4;i < yyleng;i++ ){ + printf("%c",yytext[i]); + }}; +[^Pp]"flich"({endung}|{NN}) {printf("%c",yytext[0]); + printf("f\"|lich");{ + for (i = 6;i < yyleng;i++ ){ + printf("%c",yytext[i]); + }};} +"lffach"{NN} {printf("lf\"|fach"); + printf("%c",yytext[6]);} +"lffach"{endung} {printf("lf\"|fach"); + {for (i = 6;i < yyleng;i++ ){ + printf("%c",yytext[i]); + }};} +[Ss]"chiefl" {for (i = 0;i < yyleng - 1;i++ ){ + printf("%c",yytext[i]);} + printf("\"|");printf("l");} +"fling" printf("f\"|ling"); +"flein" printf("f\"|lein"); +"flung" printf("f\"|lung"); +"afle" printf("af\"|le"); +"ifle" printf("if\"|le"); +"ofle" printf("of\"|le"); +"opflo" printf("opf\"|lo"); +"opfle" printf("opf\"|le"); +"afli" printf("af\"|li"); +"rafla" printf("raf\"|la"); +"rifl" printf("rif\"|l"); +({oe}|o)"pfl"{oe} {for (i = 0;i < yyleng - umlleng - 1;i++ ) + { printf("%c",yytext[i]);} + printf("\"|l"); + for (i = yyleng - umlleng;i < yyleng ;i++ ){ + printf("%c",yytext[i]); + }} +"mpflie" printf("mpf\"|lie"); +"mpflu" printf("mpf\"|lu"); +"mpffi" printf("mpf\"|fi"); +"offin" printf("off\"|in"); +"lffi" printf("lf\"|fi"); +"nffi" printf("nf\"|fi"); +"nffa" printf("nf\"|fa"); +"flichkeit" printf("f\"|lichkeit"); +[Kk]"aufin" {for (i = 0;i < yyleng - 2;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("in"); +[Ss]"treiflicht" {for (i = 0;i < yyleng - 5;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("licht"); +[Ww]"aldorflehrer" {for (i = 0;i < yyleng - 6;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("lehrer"); +[Zz]"upfin" {for (i = 0;i < yyleng - 2;i++ ){ + printf("%c",yytext[i]); + } + };printf("\"|");printf("in"); +"fff" printf("ff\"|f"); /*RSR ist doof*/ +} +%% + + +#define HELP \ +"Usage: %s [OPTIONS]\n\n\ +The following mutually exclusiv options are recognized:\n\n\ + --help display this help and exit\n\ + --version output version information and exit\n\n\ + +This program is a filter; it reads data from standard input, processes it,\n\ +and writes the results to standard output.\n\ +The data can be text encoded either in latin-1, TeX, or Html.\n\ +" + +#define VERSION "Ligatex 0.2.0" + + +extern int parse_args(int, char **, char *, char *); + +int main(int argc, char **argv) +{ + parse_args(argc, argv, HELP, VERSION); +/* fputs(GERMAN,stderr); */ +/* fputs(BABEL,stderr); */ +/* fputc('\n', stderr); */ + yylex(); + + return(EXIT_SUCCESS); +} + + + diff --git a/support/ligatex/ligatex.man b/support/ligatex/ligatex.man new file mode 100644 index 0000000000..26a0b080dd --- /dev/null +++ b/support/ligatex/ligatex.man @@ -0,0 +1,128 @@ +.TH ligatex 1 "22. November 2000" "Version 0.2.0" +.SH NAME +ligatex +\- ligatex +.SH SYNOPSIS +\fBligatex\fP [\fB--version --help\fP] +.SH DESCRIPTION +.PP +Ligatex Version 0.2.0 + +The programme ligatex converts texts that are written for use with the layout +system TeX in such a way that ligatures are removed from certain places. The +programm currently only treats texts written in German. Thus this programme is +probably only of interest to you if you have some knowledge of the German +language. Therefore the rest of this documentation is only available in German. +However, the author welcomes additions to ligatex in order to make it usable +with any language. For this purpose the file ligatex.l should be edited. + +Das Programm Ligatex hebt in Texten, die für Verwendung mit dem Textsatzsystem +TeX geschrieben sind, an Stellen wo sie nicht hingehören, Ligaturen auf. +Es greift dazu auf einen wörterbuchbasierten Ansatz zurück und kann daher nur +für Texte, die auf Deutsch verfaßt sind, sinnvoll verwandt werden. Eine +Anpassung für andere Sprachen kann durch Ersatz der Datei ligatex.l erfolgen. +Der Autor würde sich über solche Anpassungen freuen, sowie über Fehlermeldungen +zur vorliegenden deutschen Version. + +.SH Handhabung + +Das Programm liest Text von der Standardeingabe und schreibt konvertierten Text +an die Standardausgabe: + +Durch den Aufruf + +ligatex < rein.tex > raus.tex + +erhält man die veränderte Version raus.tex. Die Originalversion +rein.tex wird nicht verändert. raus.tex kann ohne Fehler zu +verursachen wieder prozessiert werden. + +ligatex < raus.tex > raus2.tex + +raus.tex und raus2.tex sollten identisch sein, falls raus.tex nicht +verändert wurde. + +.SH LaTeX + +Die Verwendung von german.sty oder babel.sty wird vorausgesetzt. +LaTeX 2.09 wird nicht unterstützt. +Die Datei wird erst ab \\begin{document} auf Ligaturen untersucht. +Dateien, denen diese Zeile fehlt, können mittels + +%\\begin{ligatex} + +Text mit Ligaturen. + +%\\end{ligatex} + +dennoch überprüft werden. Die Anzahl der Prozentzeichen ist beliebig. +Nach einem %\\end{ligatex} wird bis zum nächsten %\\begin{ligatex} +kein Text auf Ligaturen untersucht. Dadurch können auch verbatim-Umgebungen +mit LaTeX-Quelltext im Dokument enthalten sein: + +%\\end{ligatex} + +\\begin{verbatim} + +LaTeX-Text + +\\end{verbatim} + +%\\begin{ligatex} + +Vor den Schaltern für die Pseudo-Umgebung ligatex darf kein Text in der +Zeile stehen. Sie müssen nicht paarig auftreten. + +.SH German.sty + +Neben german.sty wird auch ngerman.sty (die flasche Rechtschreibung) +unterstützt. + +.SH Babel.sty + +Bei Verwendung von babel.sty bestimmt die Reihenfolge, in der die +Sprachdefinitionen geladen werden, die am Anfang des Dokumentes +aktive Sprache. \fPLigaTeX\fP kann diese aber nur dann feststellen, +wenn Sie die Syntax + +\\usepackage[sprach1,sprache2,german,sprache3]{babel} + +verwenden. Schreiben Sie + +\\documentclass[option1,option2,sprache1,german,weitere,optionen]{book} + +kann \fPLigaTeX\fP weiter Sprachen nicht zuverlässig von weiteren Optionen +unterscheiden und bleibt daher am Dokumentanfang inaktiv, + +Neben der Option german werden auch die Optionen austrian, +ngerman und naustrian unterstützt. + +Das Makro \\foreignlanguage wird unterstützt. + +.SH Eigene Definitionen + +Sie können Makros definieren, deren Name verändert würde, z.B. +\\auflage, dies gilt auch für Umgebungen aber nicht für Pakete. + +.SH Text-Kodierung + +Der Text kann in \fPLatin-1\fP, \fPTeX\fP oder +\fPHTML\fP kodiert sein. Das Programm stellt dies selbsttätig fest und gibt +entsprechend kodierten Text wieder aus. +HTML-Dateien werden immer prozessiert. + +.SH Caveat + +Verbatim-Umgebungen, die LaTeX-Text enthalten, +dürften für Verwirrung sorgen. Abhilfe schafft die +Pseudo-Umgebung ligatex. + + +.SH Bugs + +Der Autor bitte um Mithilfe bei der Beseitigung von Fehlern und der +Implementierung etwaiger fehlender Funktionen. + +.SH AUTOR + +Gerhard Killesreiter, killesreiter@physik.uni-freiburg.de diff --git a/support/ligatex/mkinstalldirs b/support/ligatex/mkinstalldirs new file mode 100755 index 0000000000..91f6d04e17 --- /dev/null +++ b/support/ligatex/mkinstalldirs @@ -0,0 +1,32 @@ +#!/bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman <friedman@prep.ai.mit.edu> +# Created: 1993-05-16 +# Last modified: 1994-03-25 +# Public domain + +errstatus=0 + +for file in ${1+"$@"} ; do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d in ${1+"$@"} ; do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + mkdir "$pathcomp" || errstatus=$? + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here |