merge the autotools branch
authorStas Sergeev <stsp@aknet.ru>
Wed, 13 Sep 2006 17:20:32 +0000 (17:20 +0000)
committerStas Sergeev <stsp@aknet.ru>
Wed, 13 Sep 2006 17:20:32 +0000 (17:20 +0000)
109 files changed:
ABOUT-NLS [new file with mode: 0644]
AUTHORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
ChangeLog.old [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile [deleted file]
Makefile.am [new file with mode: 0644]
Makefile.in [new file with mode: 0644]
NEWS [new file with mode: 0644]
README
TODO
aclocal.m4 [new file with mode: 0644]
ai.c [deleted file]
autogen.sh [new file with mode: 0755]
battle.c [deleted file]
compile [new file with mode: 0755]
config.guess [new file with mode: 0755]
config.rpath [new file with mode: 0755]
config.sub [new file with mode: 0755]
configure [new file with mode: 0755]
configure.ac [new file with mode: 0644]
depcomp [new file with mode: 0755]
doc/Makefile.am [new file with mode: 0644]
doc/Makefile.in [new file with mode: 0644]
doc/makehelp.py [new file with mode: 0755]
doc/sst-doc.xml [new file with mode: 0644]
doc/sst-layer.xsl [new file with mode: 0644]
doc/sst.xml [new file with mode: 0644]
events.c [deleted file]
finish.c [deleted file]
install-sh [new file with mode: 0755]
io.c [deleted file]
m4/ChangeLog [new file with mode: 0644]
m4/codeset.m4 [new file with mode: 0644]
m4/gettext.m4 [new file with mode: 0644]
m4/glibc2.m4 [new file with mode: 0644]
m4/glibc21.m4 [new file with mode: 0644]
m4/iconv.m4 [new file with mode: 0644]
m4/intdiv0.m4 [new file with mode: 0644]
m4/intmax.m4 [new file with mode: 0644]
m4/inttypes-pri.m4 [new file with mode: 0644]
m4/inttypes.m4 [new file with mode: 0644]
m4/inttypes_h.m4 [new file with mode: 0644]
m4/isc-posix.m4 [new file with mode: 0644]
m4/lcmessage.m4 [new file with mode: 0644]
m4/lib-ld.m4 [new file with mode: 0644]
m4/lib-link.m4 [new file with mode: 0644]
m4/lib-prefix.m4 [new file with mode: 0644]
m4/longdouble.m4 [new file with mode: 0644]
m4/longlong.m4 [new file with mode: 0644]
m4/nls.m4 [new file with mode: 0644]
m4/po.m4 [new file with mode: 0644]
m4/printf-posix.m4 [new file with mode: 0644]
m4/progtest.m4 [new file with mode: 0644]
m4/signed.m4 [new file with mode: 0644]
m4/size_max.m4 [new file with mode: 0644]
m4/stdint_h.m4 [new file with mode: 0644]
m4/uintmax_t.m4 [new file with mode: 0644]
m4/ulonglong.m4 [new file with mode: 0644]
m4/wchar_t.m4 [new file with mode: 0644]
m4/wint_t.m4 [new file with mode: 0644]
m4/xsize.m4 [new file with mode: 0644]
makehelp.py [deleted file]
missing [new file with mode: 0755]
mkinstalldirs [new file with mode: 0755]
moving.c [deleted file]
planets.c [deleted file]
po/ChangeLog [new file with mode: 0644]
po/Makefile [new file with mode: 0644]
po/Makefile.in [new file with mode: 0644]
po/Makefile.in.in [new file with mode: 0644]
po/Makevars [new file with mode: 0644]
po/Makevars.template [new file with mode: 0644]
po/POTFILES [new file with mode: 0644]
po/POTFILES.in [new file with mode: 0644]
po/Rules-quot [new file with mode: 0644]
po/boldquot.sed [new file with mode: 0644]
po/en@boldquot.header [new file with mode: 0644]
po/en@quot.header [new file with mode: 0644]
po/insert-header.sin [new file with mode: 0644]
po/quot.sed [new file with mode: 0644]
po/remove-potcdate.sed [new file with mode: 0644]
po/remove-potcdate.sin [new file with mode: 0644]
reports.c [deleted file]
setup.c [deleted file]
src/Makefile.am [new file with mode: 0644]
src/Makefile.in [new file with mode: 0644]
src/ai.c [new file with mode: 0644]
src/battle.c [new file with mode: 0644]
src/config.h.in [new file with mode: 0644]
src/events.c [new file with mode: 0644]
src/finish.c [new file with mode: 0644]
src/io.c [new file with mode: 0644]
src/moving.c [new file with mode: 0644]
src/planets.c [new file with mode: 0644]
src/reports.c [new file with mode: 0644]
src/setup.c [new file with mode: 0644]
src/sst.c [new file with mode: 0644]
src/sst.h [new file with mode: 0644]
src/sstlinux.c [new file with mode: 0644]
src/sstlinux.h [new file with mode: 0644]
sst-doc.xml [deleted file]
sst-layer.xsl [deleted file]
sst.c [deleted file]
sst.h [deleted file]
sst.xml [deleted file]
sstlinux.c [deleted file]
sstlinux.h [deleted file]

diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644 (file)
index 0000000..e32d52d
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,996 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international!  The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages.  A few packages already provide translations for their
+messages.
+
+   If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site.  But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+   Installers will find here some useful hints.  These notes also
+explain how users should proceed for getting the programs to use the
+available translations.  They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+   When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used.  The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+1.1 Quick configuration advice
+==============================
+
+If you want to exploit the full power of internationalization, you
+should configure it using
+
+     ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed.  So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation.  Future versions of GNU `gettext' will
+very likely convey even more functionality.  So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+   So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+1.2 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language.  Most such
+packages use GNU `gettext'.  Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+   By default, this package will be installed to allow translation of
+messages.  It will automatically detect whether the system already
+provides the GNU `gettext' functions.  If not, the included GNU
+`gettext' library will be used.  This library is wholly contained
+within this package, usually in the `intl/' subdirectory, so prior
+installation of the GNU `gettext' package is _not_ required.
+Installers may use special options at configuration time for changing
+the default behaviour.  The commands:
+
+     ./configure --with-included-gettext
+     ./configure --disable-nls
+
+will, respectively, bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+   When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this.  This might not be desirable.  You should use
+the more recent version of the GNU `gettext' library.  I.e. if the file
+`intl/VERSION' shows that the library which comes with this package is
+more recent, you should use
+
+     ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+   The configuration process will not test for the `catgets' function
+and therefore it will not be used.  The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+   Internationalized packages usually have many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language.  Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package.  However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.3 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination.  Here `LL' is an ISO 639 two-letter language code,
+and `CC' is an ISO 3166 two-letter country code.  For example, let's
+suppose that you speak German and live in Germany.  At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+   You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries.  For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil.  The
+country code serves to distinguish the dialects.
+
+   The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc.  On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'.  You can get the list of
+locales supported by your system for your country by running the command
+`locale -a | grep '^LL''.
+
+   Not all programs have translations for all languages.  By default, an
+English message is shown in place of a nonexistent translation.  If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'.  GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries.  For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+   Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003).  During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+   In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect.  For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+1.4 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list.  The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
+area.
+
+   If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended.  For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+     subscribe
+
+   Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around.  If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `translation@iro.umontreal.ca' to reach the
+coordinator for all translator teams.
+
+   The English team is special.  It works at improving and uniformizing
+the terminology in use.  Proven linguistic skill are praised more than
+programming skill, here.
+
+1.5 Available Packages
+======================
+
+Languages are not equally supported in all packages.  The following
+matrix shows the current state of internationalization, as of May 2005.
+The matrix shows, in regard of each package, for which languages PO
+files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+     Ready PO files       af am ar az be bg bs ca cs cy da de el en en_GB
+                        +-------------------------------------------------+
+     GNUnet             |                                                 |
+     a2ps               |             []                [] [] []     []   |
+     aegis              |                                  ()             |
+     ant-phone          |                                  ()             |
+     anubis             |                                  []             |
+     ap-utils           |                                                 |
+     aspell             |                         []    [] []        []   |
+     bash               |                      []          []             |
+     batchelor          |                                  []             |
+     bfd                |                                                 |
+     bibshelf           |                                  []             |
+     binutils           |                               []                |
+     bison              |                               [] []             |
+     bluez-pin          | []                      []       [] []          |
+     clisp              |                                  []    []       |
+     console-tools      |                         []       []             |
+     coreutils          |                []    []       [] []             |
+     cpio               |                                                 |
+     cpplib             |                      []       [] []             |
+     darkstat           |                []             () []             |
+     dialog             |                      [] [] [] [] [] []          |
+     diffutils          |                      [] []    [] [] []          |
+     doodle             |                                  []             |
+     e2fsprogs          |                         []       []             |
+     enscript           |                      []       [] []        []   |
+     error              |                      []       [] []        []   |
+     fetchmail          |                      []       [] () []          |
+     fileutils          |                               [] []             |
+     findutils          |                      []       []    []          |
+     flex               |                      []       [] []             |
+     fslint             |                                  []             |
+     gas                |                                                 |
+     gawk               |                      []       [] []             |
+     gbiff              |                                  []             |
+     gcal               |                      []                         |
+     gcc                |                                  []             |
+     gettext-examples   | []                   []          [] []          |
+     gettext-runtime    |             []       []       [] []             |
+     gettext-tools      |                      []          []             |
+     gimp-print         |                         []    [] []        []   |
+     gip                |                                                 |
+     gliv               |                                  []             |
+     glunarclock        |                                                 |
+     gmult              | []                               []             |
+     gnubiff            |                                  ()             |
+     gnucash            |                         []       () ()     []   |
+     gnucash-glossary   |                               [] ()             |
+     gpe-aerial         |                         []       []             |
+     gpe-beam           |                         []       []             |
+     gpe-calendar       |                         []       []             |
+     gpe-clock          |                         []       []             |
+     gpe-conf           |                         []       []             |
+     gpe-contacts       |                                                 |
+     gpe-edit           |                         []                      |
+     gpe-go             |                         []                      |
+     gpe-login          |                         []       []             |
+     gpe-ownerinfo      |                         []       []             |
+     gpe-sketchbook     |                         []       []             |
+     gpe-su             |                         []       []             |
+     gpe-taskmanager    |                         []       []             |
+     gpe-timesheet      |                         []                      |
+     gpe-today          |                         []       []             |
+     gpe-todo           |                         []       []             |
+     gphoto2            |                         []    [] []        []   |
+     gprof              |                               [] []             |
+     gpsdrive           |                                  ()    ()       |
+     gramadoir          | []                               []             |
+     grep               | []          [] []    []          [] []          |
+     gretl              |                                                 |
+     gsasl              |                                  []             |
+     gss                |                                                 |
+     gst-plugins        | []       []          [] []       []        []   |
+     gstreamer          | []                   [] []       []        []   |
+     gtick              | []                               ()             |
+     gtkspell           |             []                   [] []          |
+     hello              |                      []       [] [] []          |
+     id-utils           |                               [] []             |
+     impost             |                                                 |
+     indent             |                      []          []             |
+     iso_3166           |                                                 |
+     iso_3166_1         |                      [] []    [] [] []          |
+     iso_3166_2         |                                                 |
+     iso_3166_3         |                                  []             |
+     iso_4217           |                                                 |
+     iso_639            |                                                 |
+     jpilot             |                         []                      |
+     jtag               |                                                 |
+     jwhois             |                                                 |
+     kbd                |                         []    [] [] []          |
+     latrine            |                                  ()             |
+     ld                 |                               []                |
+     libc               |                      [] []    [] [] []          |
+     libextractor       |                                                 |
+     libgpewidget       |                         []    [] []             |
+     libgphoto2         |                                  []             |
+     libgphoto2_port    |                                  []             |
+     libgsasl           |                                                 |
+     libiconv           | []                   []       [] [] []          |
+     libidn             |                                                 |
+     lifelines          |                               [] ()             |
+     lilypond           |                                  []             |
+     lingoteach         |                                                 |
+     lynx               |                      [] []    [] []             |
+     m4                 |                         []    [] [] []          |
+     mailutils          |                      []                         |
+     make               |                               [] []             |
+     man-db             |                      [] ()    [] []             |
+     minicom            |                         []       []             |
+     mysecretdiary      |                               [] []             |
+     nano               |                      [] ()       []             |
+     nano_1_0           |                      [] ()    [] []             |
+     opcodes            |                                  []             |
+     parted             |                      [] []    [] []             |
+     psmisc             |                                                 |
+     ptx                |                      []       [] []             |
+     pwdutils           |                                                 |
+     python             |                                                 |
+     radius             |                      []                         |
+     recode             |             []       []       [] [] []          |
+     rpm                |                         []    []                |
+     screem             |                                                 |
+     scrollkeeper       |          [] []       [] [] [] [] []        []   |
+     sed                |                      []          []             |
+     sh-utils           |                               [] []             |
+     shared-mime-info   |                []       []                      |
+     sharutils          |                      [] []    [] [] []          |
+     silky              |                                                 |
+     skencil            |                               [] ()             |
+     sketch             |                               [] ()             |
+     solfege            |                                  []             |
+     soundtracker       |                               [] []             |
+     sp                 |                                  []             |
+     stardict           |                         []                      |
+     tar                |                                                 |
+     texinfo            |                               [] []             |
+     textutils          |                      []       [] []             |
+     tin                |                                  ()        ()   |
+     tp-robot           |                                  []             |
+     tuxpaint           | []                   [] []    [] [] []     []   |
+     unicode-han-tra... |                                                 |
+     unicode-transla... |                                                 |
+     util-linux         |                      [] []    [] []             |
+     vorbis-tools       |             []          []    []           []   |
+     wastesedge         |                                  ()             |
+     wdiff              |                      []       [] []        []   |
+     wget               |                                                 |
+     xchat              |                []    []          [] []     []   |
+     xkeyboard-config   |                                                 |
+     xpad               |                                                 |
+                        +-------------------------------------------------+
+                          af am ar az be bg bs ca cs cy da de el en en_GB
+                          10  0  0  2  7  5  0 40 43  2 51 91 19  1  14
+
+                          eo es et eu fa fi fr  ga gl he hi hr hu id is
+                        +-----------------------------------------------+
+     GNUnet             |                                               |
+     a2ps               |       []       [] []                          |
+     aegis              |                                               |
+     ant-phone          |                   []                          |
+     anubis             |                   []                          |
+     ap-utils           |                   []                          |
+     aspell             |                   []  []                      |
+     bash               | [] []             []                 []       |
+     batchelor          |                   []  []                      |
+     bfd                |    []                                         |
+     bibshelf           |    []                 []                      |
+     binutils           |    []             []                          |
+     bison              |    [] []          []  []                []    |
+     bluez-pin          | []             [] []  []             [] []    |
+     clisp              |    []             []                          |
+     console-tools      |                                               |
+     coreutils          |    [] []       [] []  []                      |
+     cpio               |    []             []                          |
+     cpplib             |    []             []                          |
+     darkstat           |    []             ()  []             [] []    |
+     dialog             |    [] [] []    [] []  []             []       |
+     diffutils          | [] []          [] []  [] [] []       [] []    |
+     doodle             |                       []                      |
+     e2fsprogs          |    []             []                          |
+     enscript           |                   []              []          |
+     error              |    []          [] []  []             []       |
+     fetchmail          |    []                                         |
+     fileutils          |    [] []          []  []             []       |
+     findutils          |    [] []          []  []                      |
+     flex               |    []             []  []                      |
+     fslint             |                   []                          |
+     gas                |    []             []                          |
+     gawk               |    []             []  []    []                |
+     gbiff              |                   []                          |
+     gcal               |    []             []                          |
+     gcc                |    []                                         |
+     gettext-examples   |    []             []  []                      |
+     gettext-runtime    |    []          [] []  []                []    |
+     gettext-tools      |    []             []                          |
+     gimp-print         |    []             []                          |
+     gip                |    []    []       []                          |
+     gliv               |                   ()                          |
+     glunarclock        |                []     []             []       |
+     gmult              |          []       []                          |
+     gnubiff            |                   ()                          |
+     gnucash            |    []                                ()       |
+     gnucash-glossary   |    []                                         |
+     gpe-aerial         |    []             []                          |
+     gpe-beam           |    []             []                          |
+     gpe-calendar       |    []             []                 [] []    |
+     gpe-clock          |    []          [] []                          |
+     gpe-conf           |                   []                          |
+     gpe-contacts       |                   []                          |
+     gpe-edit           |                   []                    []    |
+     gpe-go             |    []             []                          |
+     gpe-login          |    []             []                 []       |
+     gpe-ownerinfo      |    []          [] []                 [] []    |
+     gpe-sketchbook     |    []             []                          |
+     gpe-su             |    []          [] []                          |
+     gpe-taskmanager    |    []          [] []                          |
+     gpe-timesheet      |    []             []  []                []    |
+     gpe-today          |    []          [] []  []                      |
+     gpe-todo           |    []             []                    []    |
+     gphoto2            |    []          [] []                 []       |
+     gprof              |    []             []                    []    |
+     gpsdrive           |    ()             ()                 []       |
+     gramadoir          |                   []  []                      |
+     grep               |    [] [] []    [] []  [] [] []    [] [] []    |
+     gretl              |    []             []                          |
+     gsasl              |          []       []  []                      |
+     gss                |                   []                          |
+     gst-plugins        |                   []                 []       |
+     gstreamer          |                                               |
+     gtick              |          []    [] []  []                      |
+     gtkspell           | [] []    []       []  []                      |
+     hello              | [] [] [] [] [] [] []  [] [] []    [] [] []    |
+     id-utils           |                   []                 [] []    |
+     impost             |                   []  []                      |
+     indent             | [] [] [] []    [] []  [] []          [] []    |
+     iso_3166           | []             [] []                          |
+     iso_3166_1         |    []    []    [] []  []             [] []    |
+     iso_3166_2         |                   []                          |
+     iso_3166_3         |                   []                          |
+     iso_4217           |       []       []        []                   |
+     iso_639            | []          [] [] []                          |
+     jpilot             |    []             []                          |
+     jtag               |                   []                          |
+     jwhois             |    []             []                 [] []    |
+     kbd                |    []             []                          |
+     latrine            |                   []  []                      |
+     ld                 |    []             []                          |
+     libc               |    []          [] []     []          []       |
+     libextractor       |                                               |
+     libgpewidget       |    []             []  []             [] []    |
+     libgphoto2         |    []             []                 []       |
+     libgphoto2_port    |                   []                          |
+     libgsasl           |                   []  []                      |
+     libiconv           | [] [] []       [] []  [] []       [] [] []    |
+     libidn             | []                []                          |
+     lifelines          |                   ()                          |
+     lilypond           |                                               |
+     lingoteach         |                   []                    []    |
+     lynx               |       []                             []       |
+     m4                 |                   []  [] []             []    |
+     mailutils          |    []             []                          |
+     make               |    []          [] []  [] [] []    []          |
+     man-db             |    ()                                         |
+     minicom            |    []          [] []                 []       |
+     mysecretdiary      |    []             []                    []    |
+     nano               |    []    []    () []                          |
+     nano_1_0           |    []             []     []             []    |
+     opcodes            |    []          [] []                          |
+     parted             |    []             []     []                   |
+     psmisc             |          []                                   |
+     ptx                | [] [] []       [] []  [] []          [] []    |
+     pwdutils           |                                               |
+     python             |                                               |
+     radius             |    []             []                          |
+     recode             | [] []             []     [] []       [] []    |
+     rpm                |                   []                          |
+     screem             |                                               |
+     scrollkeeper       |    []          []                    []       |
+     sed                | [] [] []          []  []             []       |
+     sh-utils           |    [] []       [] []  []             []       |
+     shared-mime-info   | [] []    []    [] []                 []       |
+     sharutils          |    [] []       [] []     []          []       |
+     silky              |                   []                          |
+     skencil            |    []             []                          |
+     sketch             |    []             []                          |
+     solfege            |                                               |
+     soundtracker       |    []             []                          |
+     sp                 |                   []                          |
+     stardict           |                                      []       |
+     tar                |    [] []          []  []                      |
+     texinfo            | []                []        []                |
+     textutils          |    []             []  [] []          []       |
+     tin                |       []          ()                          |
+     tp-robot           |                   []                 []       |
+     tuxpaint           |    []          [] []  []    []       [] [] [] |
+     unicode-han-tra... |                                               |
+     unicode-transla... |                   []  []                      |
+     util-linux         |    [] []       [] []                 []       |
+     vorbis-tools       |    []             []                          |
+     wastesedge         |                   ()                          |
+     wdiff              |    [] []          []  [] []          [] []    |
+     wget               |       [] []           []          []          |
+     xchat              |    []    []    [] []           []             |
+     xkeyboard-config   |                                               |
+     xpad               |    []                 []             []       |
+                        +-----------------------------------------------+
+                          eo es et eu fa fi fr  ga gl he hi hr hu id is
+                          15 85 21 15  2 35 115 45 16  8  1  6 40 27  1
+
+                          it ja ko ku lg lt lv mk mn ms mt nb nl nn no nso
+                        +--------------------------------------------------+
+     GNUnet             |                                                  |
+     a2ps               | ()    ()                   []       []    ()     |
+     aegis              |                                     ()           |
+     ant-phone          |                                     []           |
+     anubis             |                            []    [] []           |
+     ap-utils           |                                                  |
+     aspell             |                         []          []           |
+     bash               |                                     []           |
+     batchelor          |                                     []           |
+     bfd                |                                                  |
+     bibshelf           | []                                               |
+     binutils           |                                                  |
+     bison              | []                         []    [] []           |
+     bluez-pin          |          []                         []           |
+     clisp              |                                     []           |
+     console-tools      |                                                  |
+     coreutils          |    []                               []           |
+     cpio               |                                                  |
+     cpplib             |                                     []           |
+     darkstat           |                            []       []           |
+     dialog             | []                                  []           |
+     diffutils          | [] []                      []       []           |
+     doodle             | []                                               |
+     e2fsprogs          | []                                               |
+     enscript           |                                     []           |
+     error              |                                     []           |
+     fetchmail          |    []                               []           |
+     fileutils          | [] []       []                                   |
+     findutils          | []                                  []           |
+     flex               |       []                            []           |
+     fslint             |                                     []           |
+     gas                |                                                  |
+     gawk               |    []                               []           |
+     gbiff              |                                     []           |
+     gcal               |                                                  |
+     gcc                |                                                  |
+     gettext-examples   | [] []                               []           |
+     gettext-runtime    | [] [] []                            []           |
+     gettext-tools      | [] [] []                                         |
+     gimp-print         |    []                               []           |
+     gip                |                                     []           |
+     gliv               |                                     []           |
+     glunarclock        |                            []       []           |
+     gmult              | [] []                                            |
+     gnubiff            | ()                                               |
+     gnucash            | [] ()                            () []           |
+     gnucash-glossary   | []                                  []           |
+     gpe-aerial         |                                     []           |
+     gpe-beam           |                                     []           |
+     gpe-calendar       |                                     []           |
+     gpe-clock          |                                     []           |
+     gpe-conf           |                                     []           |
+     gpe-contacts       |                                                  |
+     gpe-edit           |                                     []           |
+     gpe-go             |                                     []           |
+     gpe-login          |                                     []           |
+     gpe-ownerinfo      |                                     []           |
+     gpe-sketchbook     |                                     []           |
+     gpe-su             |                                     []           |
+     gpe-taskmanager    |          []                         []           |
+     gpe-timesheet      |                                     []           |
+     gpe-today          |                                     []           |
+     gpe-todo           |                                     []           |
+     gphoto2            | [] []                               []           |
+     gprof              |                                                  |
+     gpsdrive           | () ()                               ()    ()     |
+     gramadoir          |                                     ()           |
+     grep               | [] []                            [] []           |
+     gretl              | []                                               |
+     gsasl              |                                     []           |
+     gss                |                                                  |
+     gst-plugins        | []                                  []           |
+     gstreamer          | []                                  []           |
+     gtick              | []                                  []           |
+     gtkspell           | []                      []          []           |
+     hello              | [] [] []          []       []    [] [] [] []     |
+     id-utils           | []                                  []           |
+     impost             |                                                  |
+     indent             | [] []                               []           |
+     iso_3166           |                                     []           |
+     iso_3166_1         |                                     []    []     |
+     iso_3166_2         |                                     []           |
+     iso_3166_3         |                                     []           |
+     iso_4217           |    []                   []          []           |
+     iso_639            |    []                               [] []        |
+     jpilot             |    ()                               ()    ()     |
+     jtag               |                                                  |
+     jwhois             | []                                  []           |
+     kbd                |                                     []           |
+     latrine            | []                                  []           |
+     ld                 |                                                  |
+     libc               |    [] []                         [] []    []     |
+     libextractor       |                                                  |
+     libgpewidget       |                                     []           |
+     libgphoto2         | [] []                                            |
+     libgphoto2_port    | [] []                                            |
+     libgsasl           |                                     []           |
+     libiconv           | []                                  []           |
+     libidn             | []                                               |
+     lifelines          |                                     []           |
+     lilypond           |                                                  |
+     lingoteach         | []                                  []           |
+     lynx               | [] []                               []           |
+     m4                 |    []                               []           |
+     mailutils          |                                                  |
+     make               |    [] []                            []           |
+     man-db             |    ()                                            |
+     minicom            |    []                                            |
+     mysecretdiary      |                                     []           |
+     nano               | []                         []    []              |
+     nano_1_0           | []                         []    []    []        |
+     opcodes            |                                     []           |
+     parted             | [] []                               [] []        |
+     psmisc             | []                               [] []           |
+     ptx                |                                  [] []    []     |
+     pwdutils           |                                                  |
+     python             |                                                  |
+     radius             |                                                  |
+     recode             | []                                  []           |
+     rpm                |    [] []                                         |
+     screem             |    []                                            |
+     scrollkeeper       |                                  [] [] []        |
+     sed                |    []                               []           |
+     sh-utils           | [] []                            []              |
+     shared-mime-info   |       []                         [] [] []        |
+     sharutils          | [] []                               []           |
+     silky              |                                     []           |
+     skencil            |                                                  |
+     sketch             |                                                  |
+     solfege            | []                                  []    []     |
+     soundtracker       | []                                               |
+     sp                 |    ()                                            |
+     stardict           |                      []             []           |
+     tar                | [] []                               []           |
+     texinfo            |    []                            [] []           |
+     textutils          |    [] []                         []              |
+     tin                |                                                  |
+     tp-robot           |                                     []           |
+     tuxpaint           | [] [] []       []          []       [] []        |
+     unicode-han-tra... |                                                  |
+     unicode-transla... |                                                  |
+     util-linux         | [] []                               []           |
+     vorbis-tools       |                                     []           |
+     wastesedge         |                                     []           |
+     wdiff              | []                         []    []              |
+     wget               |    []                                            |
+     xchat              | []    []          [] []             []           |
+     xkeyboard-config   |                                     []           |
+     xpad               |                                     []           |
+                        +--------------------------------------------------+
+                          it ja ko ku lg lt lv mk mn ms mt nb nl nn no nso
+                          46 35 11  2  1  1  2  2  3 11  0 15 96  7  5  0
+
+                          or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv
+                        +----------------------------------------------+
+     GNUnet             |                                              |
+     a2ps               |       ()     []      [] []       []    [] [] |
+     aegis              |                      () ()                   |
+     ant-phone          |                      []                      |
+     anubis             |       []             [] []                   |
+     ap-utils           |       ()                                     |
+     aspell             |                      [] []                   |
+     bash               |              []      [] []                   |
+     batchelor          |                      []                      |
+     bfd                |                                              |
+     bibshelf           |                                              |
+     binutils           |                         []                [] |
+     bison              |       []     []      [] []                [] |
+     bluez-pin          |       []     []   [] [] []    []       [] [] |
+     clisp              |                         []                   |
+     console-tools      |                         []                   |
+     coreutils          |       []                []       []       [] |
+     cpio               |       []                                  [] |
+     cpplib             |                                              |
+     darkstat           |       []     []      []       []       [] [] |
+     dialog             |       [] []  []   [] [] [] []                |
+     diffutils          |       []     []      [] []             [] [] |
+     doodle             |                                     []       |
+     e2fsprogs          |       []                                  [] |
+     enscript           |              []      [] []                [] |
+     error              |              []      []       []             |
+     fetchmail          |       []                []    []    []       |
+     fileutils          |       []             [] []       []       [] |
+     findutils          |       [] []          []       []       [] [] |
+     flex               |       []     []      [] []                [] |
+     fslint             |              []      []                []    |
+     gas                |                                              |
+     gawk               |       []     []      []                   [] |
+     gbiff              |                      []                      |
+     gcal               |                                           [] |
+     gcc                |                                              |
+     gettext-examples   |       []             [] []    []       [] [] |
+     gettext-runtime    |       []             [] []    [] []    [] [] |
+     gettext-tools      |       []             [] []    [] []    [] [] |
+     gimp-print         |                               []          [] |
+     gip                |                   []          []       []    |
+     gliv               |              []      []       []             |
+     glunarclock        |              []      [] []    []       [] [] |
+     gmult              |              []   [] []                []    |
+     gnubiff            |                      ()                   [] |
+     gnucash            |       () []             []    []          [] |
+     gnucash-glossary   |          []                   []          [] |
+     gpe-aerial         |          []  []      [] []             [] [] |
+     gpe-beam           |          []  []      [] []             [] [] |
+     gpe-calendar       |          []  []      [] []    []       [] [] |
+     gpe-clock          |          []  []      [] []    []       [] [] |
+     gpe-conf           |          []  []      [] []    []          [] |
+     gpe-contacts       |                      [] []             [] [] |
+     gpe-edit           |          []  []      [] []    []       [] [] |
+     gpe-go             |              []      [] []             [] [] |
+     gpe-login          |          []  []      [] []    []       [] [] |
+     gpe-ownerinfo      |          []  []      [] []    []       [] [] |
+     gpe-sketchbook     |          []  []      [] []    []       [] [] |
+     gpe-su             |          []  []      [] []    []       [] [] |
+     gpe-taskmanager    |          []  []      [] []    []       [] [] |
+     gpe-timesheet      |          []  []      [] []    []       [] [] |
+     gpe-today          |          []  []      [] []    []       [] [] |
+     gpe-todo           |    []    []  []      [] []    []       [] [] |
+     gphoto2            |                      []       []       [] [] |
+     gprof              |              []      []                   [] |
+     gpsdrive           |    []                []                      |
+     gramadoir          |                               []             |
+     grep               |       [] []  []      [] []       []    []    |
+     gretl              |       []                                     |
+     gsasl              |       []             []             [] [] [] |
+     gss                |       []             []                   [] |
+     gst-plugins        | []                                  [] [] [] |
+     gstreamer          |                         []          [] [] [] |
+     gtick              |                      [] []                [] |
+     gtkspell           |              []   [] [] []    []       []    |
+     hello              |       []     []      [] []    []       [] [] |
+     id-utils           |              []      [] []                [] |
+     impost             |                                              |
+     indent             |              []      [] []    []       [] [] |
+     iso_3166           |          []                []       [] [] [] |
+     iso_3166_1         |                               [] [] [] []    |
+     iso_3166_2         |                                              |
+     iso_3166_3         |                      []    []          []    |
+     iso_4217           |                            []          []    |
+     iso_639            |                            []          [] [] |
+     jpilot             |                                              |
+     jtag               |                               []             |
+     jwhois             |       []     []      [] ()                () |
+     kbd                |       []             []                   [] |
+     latrine            |                      []                   [] |
+     ld                 |                                           [] |
+     libc               |       []     []         []    []          [] |
+     libextractor       |                      []                      |
+     libgpewidget       |          []  []      []       []       [] [] |
+     libgphoto2         |                         []                [] |
+     libgphoto2_port    |                         []                   |
+     libgsasl           |       []             []                []    |
+     libiconv           |       []     []   [] [] []    [] [] [] [] [] |
+     libidn             |       []                                  () |
+     lifelines          |       []                                  [] |
+     lilypond           |                                              |
+     lingoteach         |              []                              |
+     lynx               |              []         []                [] |
+     m4                 |       []     []      [] []                [] |
+     mailutils          |       []             [] []                   |
+     make               |       []     []         []                [] |
+     man-db             |                      []                   [] |
+     minicom            |       []     []      [] []                   |
+     mysecretdiary      |              []      [] []                [] |
+     nano               |              []      []                   [] |
+     nano_1_0           |       []             [] []                [] |
+     opcodes            |                      []                   [] |
+     parted             |       [] []  []                           [] |
+     psmisc             |       []             []                      |
+     ptx                |       [] []  []      [] []                [] |
+     pwdutils           |       []                                     |
+     python             |                                              |
+     radius             |       []                []                   |
+     recode             |       []     []      [] []       []       [] |
+     rpm                |       [] []             []                [] |
+     screem             |                                              |
+     scrollkeeper       |       []             [] []    []    [] [] [] |
+     sed                |       [] []  []      [] []    []       [] [] |
+     sh-utils           |                         []       []    []    |
+     shared-mime-info   |          []  []         []          [] [] [] |
+     sharutils          |                         []             [] [] |
+     silky              |                               []             |
+     skencil            |          []  []                           [] |
+     sketch             |          []  []                           [] |
+     solfege            |                                              |
+     soundtracker       |                               []          [] |
+     sp                 |                                              |
+     stardict           |                         []    []             |
+     tar                |       []             [] []                [] |
+     texinfo            |       []             [] []                [] |
+     textutils          |                         []       []       [] |
+     tin                |                                              |
+     tp-robot           |                         []                   |
+     tuxpaint           |       [] []  []      []       []    [] [] [] |
+     unicode-han-tra... |                                              |
+     unicode-transla... |                                              |
+     util-linux         |              []         []                [] |
+     vorbis-tools       |                      [] []                   |
+     wastesedge         |                                              |
+     wdiff              |       []     []      [] []    []          [] |
+     wget               |                                              |
+     xchat              |    []                   []    [] [] [] [] [] |
+     xkeyboard-config   |                                              |
+     xpad               |                                              |
+                        +----------------------------------------------+
+                          or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv
+                           1  3 47 29  57    6 78 73  5 44 12 12 50 85
+
+                          ta tg th tk tr uk ven vi wa xh zh_CN zh_TW zu
+                        +-----------------------------------------------+
+     GNUnet             |                                               |  0
+     a2ps               |             [] []     []                      | 19
+     aegis              |                                               |  0
+     ant-phone          |             []        []                      |  5
+     anubis             |             [] []     []                      | 11
+     ap-utils           |                ()     []                      |  2
+     aspell             |                []     [] []                   | 13
+     bash               |                       []                      | 11
+     batchelor          |             []        []                      |  7
+     bfd                |                                               |  1
+     bibshelf           |                       []                      |  5
+     binutils           |             []                                |  6
+     bison              |             []        []                      | 18
+     bluez-pin          |             [] []     [] []     []            | 25
+     clisp              |                                               |  7
+     console-tools      |             []        []                      |  5
+     coreutils          |             []        []                      | 17
+     cpio               |             [] []     []                      |  7
+     cpplib             |             []        []                      |  8
+     darkstat           |                       []        ()    ()      | 15
+     dialog             |             [] []     []                      | 25
+     diffutils          |             []        []        []    []      | 28
+     doodle             |                       []                      |  5
+     e2fsprogs          |             []                                |  8
+     enscript           |             []                                | 12
+     error              |             []        []              []      | 16
+     fetchmail          |             []                                | 12
+     fileutils          |             []                  []    []      | 18
+     findutils          |             []        []                      | 17
+     flex               |             []        []                      | 15
+     fslint             |                       []                      |  7
+     gas                |             []                                |  3
+     gawk               |             []                                | 14
+     gbiff              |                       []                      |  5
+     gcal               |             []                                |  5
+     gcc                |             []                  []            |  4
+     gettext-examples   |             [] []     []        []    []      | 21
+     gettext-runtime    |             [] []     []        []    []      | 25
+     gettext-tools      |             [] []     []        []    []      | 19
+     gimp-print         |                []                             | 11
+     gip                |                       []                      |  8
+     gliv               |             []        []                      |  7
+     glunarclock        |                       [] []                   | 13
+     gmult              |             []        []        []            | 13
+     gnubiff            |                       []                      |  3
+     gnucash            |             ()                        []      | 10
+     gnucash-glossary   |                       []              []      |  9
+     gpe-aerial         |                       []        []            | 13
+     gpe-beam           |                       []        []            | 13
+     gpe-calendar       |                       [] []     []    []      | 18
+     gpe-clock          |             []        [] []     []            | 17
+     gpe-conf           |                       []        []            | 12
+     gpe-contacts       |                       []        []            |  7
+     gpe-edit           |             []        [] []           []      | 15
+     gpe-go             |             []        []                      | 11
+     gpe-login          |             []        [] []     []    []      | 18
+     gpe-ownerinfo      |             []        []        []    []      | 19
+     gpe-sketchbook     |             []        []                      | 14
+     gpe-su             |             []        []        []            | 16
+     gpe-taskmanager    |             []        []        []            | 17
+     gpe-timesheet      |             []        []        []    []      | 17
+     gpe-today          |             []        [] []     []    []      | 19
+     gpe-todo           |                       [] []           []      | 17
+     gphoto2            |                []               []    []      | 18
+     gprof              |             []        []                      | 10
+     gpsdrive           |                                               |  3
+     gramadoir          |                       []                      |  6
+     grep               |             [] []     []              []      | 32
+     gretl              |                                               |  4
+     gsasl              |                       []        []            | 12
+     gss                |                       []                      |  5
+     gst-plugins        |                []     []              []      | 17
+     gstreamer          |             [] []     []              []      | 15
+     gtick              |                       []                      | 11
+     gtkspell           |                       [] []     []    []      | 21
+     hello              |             [] []     []        []            | 37
+     id-utils           |             []        []                      | 13
+     impost             |                       []                      |  3
+     indent             |             []        []        []    []      | 25
+     iso_3166           |          [] []        []                      | 12
+     iso_3166_1         |             []           []                   | 20
+     iso_3166_2         |                                               |  2
+     iso_3166_3         |                          []     []            |  8
+     iso_4217           |             []        []                      | 10
+     iso_639            |                       [] []                   | 12
+     jpilot             |             [] []               []            |  6
+     jtag               |                                               |  2
+     jwhois             |             []        []              []      | 12
+     kbd                |             []        []                      | 12
+     latrine            |             []        []                      |  8
+     ld                 |             []                                |  5
+     libc               |             []                  []            | 22
+     libextractor       |                                               |  1
+     libgpewidget       |                       [] []                   | 17
+     libgphoto2         |                                 []            |  9
+     libgphoto2_port    |                                               |  5
+     libgsasl           |                       []                      |  7
+     libiconv           |             [] []     [] []     []            | 32
+     libidn             |                       []        []            |  6
+     lifelines          |                                               |  4
+     lilypond           |                                               |  1
+     lingoteach         |                       []                      |  6
+     lynx               |             [] []     []                      | 15
+     m4                 |                       []        []            | 17
+     mailutils          |                []                             |  7
+     make               |             []                  []            | 18
+     man-db             |                                               |  5
+     minicom            |                                               | 11
+     mysecretdiary      |             []        []                      | 12
+     nano               |                       []              []      | 13
+     nano_1_0           |             [] []     []                      | 18
+     opcodes            |             []        []                      |  9
+     parted             |             [] []               []            | 18
+     psmisc             |                       []                      |  7
+     ptx                |             []                  []            | 23
+     pwdutils           |                                               |  1
+     python             |                                               |  0
+     radius             |                []                             |  6
+     recode             |             []        []                      | 22
+     rpm                |             [] []                             | 11
+     screem             |                                               |  1
+     scrollkeeper       |             [] []                     []      | 24
+     sed                |             []        []              []      | 21
+     sh-utils           |             []                                | 15
+     shared-mime-info   |                []               []    []      | 21
+     sharutils          |             []        []              []      | 20
+     silky              |                                               |  3
+     skencil            |                                               |  6
+     sketch             |                                               |  6
+     solfege            |                                               |  4
+     soundtracker       |             []                                |  8
+     sp                 |             []                                |  3
+     stardict           |                []     []        []    []      | 10
+     tar                |             [] []     []              []      | 15
+     texinfo            |             []                  []            | 14
+     textutils          |             []                  []    []      | 17
+     tin                |                                               |  1
+     tp-robot           |                       []        []    []      |  8
+     tuxpaint           |             []        [] []     []            | 34
+     unicode-han-tra... |                                               |  0
+     unicode-transla... |                                               |  2
+     util-linux         |             [] []     []                      | 18
+     vorbis-tools       |                []                             | 10
+     wastesedge         |                                               |  1
+     wdiff              |             []        []                      | 22
+     wget               |             []        []                      |  7
+     xchat              |                []     []        []    []      | 26
+     xkeyboard-config   |                       []                      |  2
+     xpad               |                       []                      |  5
+                        +-----------------------------------------------+
+       73 teams           ta tg th tk tr uk ven vi wa xh zh_CN zh_TW zu
+      149 domains          0  0  0  1 77 30  0  92 16  0  42    32    0  1746
+
+   Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect.  This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+   For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer.  There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+   If May 2005 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites.  The most up-to-date
+matrix with full percentage details can be found at
+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
+
+1.6 Using `gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package.  Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library.  This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+   Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations.  The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project.  Therefore the information given above
+applies also for every other Free Software Project.  Contact
+`translation@iro.umontreal.ca' to make the `.pot' files available to
+the translation teams.
+
diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..b795e58
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,19 @@
+                     Produced For Your Enjoyment
+
+                                 By
+
+                            David Matuszek
+                                 and
+                            Paul Reynolds
+
+                        With Modifications By
+                              Don Smith
+
+                            Resurrected By
+                               Tom Almy
+
+                          Curses Interface By
+                              Stas Sergeev
+
+                          SST 2K polishing by
+                             Eric S. Raymond
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..00acf97
--- /dev/null
+++ b/COPYING
@@ -0,0 +1 @@
+BSD license
\ No newline at end of file
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..1f4ebf0
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,7 @@
+2006-09-12  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * Makefile.am (SUBDIRS): Add po.
+       (ACLOCAL_AMFLAGS): New variable.
+       (EXTRA_DIST): Add config.rpath, m4/ChangeLog.
+       * configure.ac (AC_CONFIG_FILES): Add po/Makefile.in.
+
diff --git a/ChangeLog.old b/ChangeLog.old
new file mode 100644 (file)
index 0000000..9c7ac09
--- /dev/null
@@ -0,0 +1,106 @@
+Tom Almy story:
+
+Back in (about) 1977 I got a copy of this Super Star Trek game for
+the CDC 6600 mainframe computer. Someone had converted it to PDP-11
+Fortran but couldn't get it to run because of its size. I modified
+the program to use overlays and managed to shoehorn it in on the 56k
+byte machine.
+
+I liked the game so much I put some time into fixing bugs, mainly
+what could be called continuity errors and loopholes in the game's
+logic. We even played a couple tournaments.
+
+In 1979, I lost access to that PDP-11. I did save the source code
+listing. In 1995, missing that old friend, I started converting the
+program into portable ANSI C. It's been slow, tedious work that took
+over a year to accomplish.
+
+In early 1997, I got the bright idea to look for references to "Super
+Star Trek" on the World Wide Web. There weren't many hits, but there
+was one that came up with 1979 Fortran sources! This version had a
+few additional features that mine didn't have, however mine had some
+feature it didn't have. So I merged its features that I liked. I also
+took a peek at the DECUS version (a port, less sources, to the
+PDP-10), and some other variations.
+
+Modifications I made:
+
+  Compared to original version, I've changed the "help" command to
+  "call" and the "terminate" command to "quit" to better match user
+  expectations. The DECUS version apparently made those changes as well
+  as changing "freeze" to "save". However I like "freeze".
+
+  I added EMEXIT from the 1979 version.
+
+  That later version also mentions srscan and lrscan working when
+  docked (using the starbase's scanners), so I made some changes here
+  to do this (and indicating that fact to the player), and then
+  realized the base would have a subspace radio as well -- doing a
+  Chart when docked updates the star chart, and all radio reports will
+  be heard. The Dock command will also give a report if a base is under
+  attack.
+
+  It also had some added logic to spread the initial positioning of
+  bases. That made sense to add because most people abort games with
+  bad base placement.
+
+  The experimental deathray originally had only a 5% chance of success,
+  but could be used repeatedly. I guess after a couple years of use, it
+  was less "experimental" because the 1979 version had a 70% success
+  rate. However it was prone to breaking after use. I upgraded the
+  deathray, but kept the original set of failure modes (great humor!).
+
+  I put in the Tholian Web code from the 1979 version.
+
+  I added code so that Romulans and regular Klingons could move in
+  advanced games. I re-enabled the code which allows enemy ships to
+  ram the Enterprise; it had never worked right. The 1979 version
+  seems to have it all fixed up, but I'm still not overly happy with
+  the algorithm.
+
+  The DECUS version had a Deep Space Probe. Looked like a good idea
+  so I implimented it based on its description.
+
+
+Stas Sergeev story:
+
+Found Tom Almy's C sources - yeah! Hmm, not too playable - I've got
+used to that nice text-based GUI I've seen on an IBM S/370 port, and the
+command-line control gets me quite annoyed. But that's a good starting
+point for some improvements - the sources are finally here! I was about
+to start writing an S/370 emulator to get it a go, and now here are
+the sources - what a great finding.
+
+[a bit later]
+
+Added a text-based interface which makes the game much more playable.
+Initially I made it for DOS using conio.h. Later I decided to make a
+linux port, and I ported it using a linux-conio package. I had to patch
+linux-conio a lot, so you have to use my version. The colors are still
+wrong though.
+I also fixed an uncountable amount of bugs and added some features, I
+can't remember now which ones.
+
+[3 years later]
+
+I dusted off the game and finally got around to move it to autoconf.
+For building with Borland C under DOS, use the build_bc.bat file.
+
+It turned out Tom Almy also did a linux port and made some bug-fixing
+work, although to the much smaller extent than I did. I contacted him
+and notified about my port, but he expressed no interest. :(
+
+[a year later]
+
+I've found out that Eric S Raymond (ESR) took over the development
+of the Tom Almy's sources. He could use mine instead as they are
+much more advanced, but oh well... Now I have to find out the way
+to incorporate my mods into his version and hope that he can do
+the better work on that game than I could (which is most likely
+the case).
+.....
+OK, the changes were incorporated, however Eric removed the conio
+port and therefore the game can no longer be compiled with bcc/DOS.
+The DJGPP port might still be possible in the future.
+
+  -- Stas Sergeev <stsp@users.sourceforge.net>
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..a4b3414
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,229 @@
+Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index f8acefc..0000000
--- a/Makefile
+++ /dev/null
@@ -1,81 +0,0 @@
-#      Makefile for the Super Star Trek game
-
-VERSION=$(shell sed <sst.spec -n -e '/Version: \(.*\)/s//\1/p')
-
-CFLAGS= -O1 -g -Wall -DSSTDOC='"/usr/share/doc/sst/sst.doc"'
-
-.c.o:
-       $(CC) $(CFLAGS) -c $<
-
-CFILES= sst.c finish.c reports.c setup.c moving.c battle.c events.c ai.c planets.c io.c sstlinux.c
-OFILES= $(CFILES:.c=.o)
-HFILES=sst.h
-DOCS = README sst-doc.xml sst.xml sst-layer.xsl TODO
-
-# sst.doc and sst.6 are included so target system won't need xmlto
-SOURCES= $(CFILES) $(HFILES) $(DOCS) sst.doc sst.6 makehelp.py makefile sst.spec
-
-all: sst sst.doc
-
-ai.o: ai.c sst.h
-battle.o: battle.c sst.h
-events.o: events.c sst.h
-finish.o: finish.c sst.h
-io.o: io.c sst.h
-moving.o: moving.c sstlinux.h sst.h
-planets.o: planets.c sst.h
-reports.o: reports.c sst.h
-setup.o: setup.c sst.h
-sst.o: sst.c sstlinux.h sst.h
-sstlinux.o: sstlinux.c sstlinux.h
-
-sst:  $(OFILES)
-       gcc  -o sst $(OFILES) -lm -lcurses
-
-$(OFILES):  $(HFILES)
-
-sst.6: sst.xml
-       xmlto man sst.xml
-
-sst-doc.txt: sst-doc.xml
-       xmlto -m sst-layer.xsl txt sst-doc.xml
-sst.doc: sst-doc.txt
-       makehelp.py >sst.doc
-
-sst-doc.html: sst-doc.xml
-       xmlto xhtml-nochunks sst-doc.xml
-
-install: uninstall sst.6 sst.doc sst-doc.html 
-       install -m 755 -o 0 -g 0 -d $(ROOT)/usr/bin/
-       install -m 755 -o 0 -g 0 sst $(ROOT)/usr/bin/sst
-       install -m 755 -o 0 -g 0 -d $(ROOT)/usr/share/man/man6/
-       install -m 755 -o 0 -g 0 sst.6 $(ROOT)/usr/share/man/man6/sst.6
-       mkdir -p /usr/share/doc/sst/
-       install -m 644 -o 0 -g 0 sst.doc $(ROOT)/usr/share/doc/sst/
-       install -m 644 -o 0 -g 0 sst-doc.html $(ROOT)/usr/share/doc/sst/index.html
-
-uninstall:
-       rm -f ${ROOT}/usr/bin/sst ${ROOT}/usr/share/man/man6/sst.6
-       rm -fr ${ROOT}/usr/share/doc/sst/
-
-clean:
-       rm -f *.o sst sst-doc.html sst-doc.txt sst.doc
-
-# The "trunk" below assumes this is a Subversion working copy
-sst-$(VERSION).tar.gz: $(SOURCES) sst.6
-       ls $(SOURCES) sst.6 | sed s:^:sst-$(VERSION)/: >MANIFEST
-       (cd ..; ln -s trunk sst-$(VERSION))
-       (cd ..; tar -czvf trunk/sst-$(VERSION).tar.gz `cat trunk/MANIFEST`)
-       (cd ..; rm sst-$(VERSION))
-
-dist: sst-$(VERSION).tar.gz
-
-release: sst-$(VERSION).tar.gz sst.html
-       shipper; rm -f CHANGES ANNOUNCE* *.6 *.html *.rpm *.lsm MANIFEST
-
-version:
-       @echo $(VERSION)
-
-# Experimental XaW code, not yet integrated with the game
-xio: xio.c
-       cc xio.c -lXaw3d -o xio
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..9b972df
--- /dev/null
@@ -0,0 +1,18 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = po src doc
+
+EXTRA_DIST = config.rpath po m4 \
+       autogen.sh sst.spec ChangeLog.old
+
+maintainer-clean-local:
+       rm -f configure
+       rm -f aclocal.m4
+       rm -f `find . -name Makefile.in`
+       rm -f `find . -name *~`
+       rm -f src/include/config.h.in
+
+clean-local:
+       rm -rf autom4te*.cache
+
+ACLOCAL_AMFLAGS = -I m4
diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..4650df6
--- /dev/null
@@ -0,0 +1,600 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(top_srcdir)/configure ABOUT-NLS \
+       AUTHORS COPYING ChangeLog INSTALL NEWS TODO compile \
+       config.guess config.rpath config.sub depcomp install-sh \
+       missing mkinstalldirs
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
+       $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-exec-recursive install-info-recursive \
+       install-recursive installcheck-recursive installdirs-recursive \
+       pdf-recursive ps-recursive uninstall-info-recursive \
+       uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GMSGFMT = @GMSGFMT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POSUB = @POSUB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_ct_have_python = @ac_ct_have_python@
+ac_ct_have_xmlto = @ac_ct_have_xmlto@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+have_python = @have_python@
+have_xmlto = @have_xmlto@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = po src doc
+EXTRA_DIST = config.rpath po m4 \
+       autogen.sh sst.spec ChangeLog.old
+
+ACLOCAL_AMFLAGS = -I m4
+all: all-recursive
+
+.SUFFIXES:
+am--refresh:
+       @:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+             cd $(srcdir) && $(AUTOMAKE) --gnu  \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           echo ' $(SHELL) ./config.status'; \
+           $(SHELL) ./config.status;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       $(am__remove_distdir)
+       mkdir $(distdir)
+       $(mkdir_p) $(distdir)/m4 $(distdir)/po
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+       || chmod -R a+r $(distdir)
+dist-gzip: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+
+dist-bzip2: distdir
+       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+dist-tarZ: distdir
+       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+       $(am__remove_distdir)
+
+dist-shar: distdir
+       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       $(am__remove_distdir)
+
+dist-zip: distdir
+       -rm -f $(distdir).zip
+       zip -rq $(distdir).zip $(distdir)
+       $(am__remove_distdir)
+
+dist dist-all: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+       case '$(DIST_ARCHIVES)' in \
+       *.tar.gz*) \
+         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+       *.tar.bz2*) \
+         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.Z*) \
+         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+       *.shar.gz*) \
+         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+       *.zip*) \
+         unzip $(distdir).zip ;;\
+       esac
+       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       mkdir $(distdir)/_build
+       mkdir $(distdir)/_inst
+       chmod a-w $(distdir)
+       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+         && cd $(distdir)/_build \
+         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(DISTCHECK_CONFIGURE_FLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) check \
+         && $(MAKE) $(AM_MAKEFLAGS) install \
+         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+               distuninstallcheck \
+         && chmod -R a-w "$$dc_install_base" \
+         && ({ \
+              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+             } || { rm -rf "$$dc_destdir"; exit 1; }) \
+         && rm -rf "$$dc_destdir" \
+         && $(MAKE) $(AM_MAKEFLAGS) dist \
+         && rm -rf $(DIST_ARCHIVES) \
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+       $(am__remove_distdir)
+       @(echo "$(distdir) archives ready for distribution: "; \
+         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+       @cd $(distuninstallcheck_dir) \
+       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+          || { echo "ERROR: files left after uninstall:" ; \
+               if test -n "$(DESTDIR)"; then \
+                 echo "  (check DESTDIR support)"; \
+               fi ; \
+               $(distuninstallcheck_listfiles) ; \
+               exit 1; } >&2
+distcleancheck: distclean
+       @if test '$(srcdir)' = . ; then \
+         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+         exit 1 ; \
+       fi
+       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+         || { echo "ERROR: files left in build directory after distclean:" ; \
+              $(distcleancheck_listfiles) ; \
+              exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-local mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf $(top_srcdir)/autom4te.cache
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic \
+       maintainer-clean-local
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+       check-am clean clean-generic clean-local clean-recursive ctags \
+       ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
+       dist-tarZ dist-zip distcheck distclean distclean-generic \
+       distclean-recursive distclean-tags distcleancheck distdir \
+       distuninstallcheck dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       maintainer-clean-local maintainer-clean-recursive mostlyclean \
+       mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \
+       tags tags-recursive uninstall uninstall-am uninstall-info-am
+
+
+maintainer-clean-local:
+       rm -f configure
+       rm -f aclocal.m4
+       rm -f `find . -name Makefile.in`
+       rm -f `find . -name *~`
+       rm -f src/include/config.h.in
+
+clean-local:
+       rm -rf autom4te*.cache
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/README b/README
index 97ab9f527e10cc6dde149c6385ad11a3470f4da9..2063e420e7547d2162c0aea5c7c39efeae26d63a 100644 (file)
--- a/README
+++ b/README
@@ -5,9 +5,6 @@ strip-mine them for dilithium!  Encounter mysterious space thingies!
 This is the classic Super Star Trek game from the days of slow teletypes, 
 reloaded.
 
-There is one binary, sst.  
-On-line documentation goes to /usr/share/doc/sst.doc.
-
 If you enjoy this, check out other ancient games in the Retrocomputing Museum 
 at <http://www.catb.org/retro/>.
 
diff --git a/TODO b/TODO
index 0c104883ad064d6822c09793878aa568a6703bb4..dae737b5cf06fed25370845f8e7e2db16a346d0f 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,4 +1,21 @@
                Super Star Trek TO-DO list
 
-* Wrap a GUI around it.
 
+Short-term items:
+
+* Bring the online help in sync with our commands changes
+
+* Find out why the online help contains the escape sequences like ~@~T (Eric?)
+
+* Adjust the sst.spec wrt the build system changes
+
+* Maybe make a release
+
+
+Long-term items:
+
+* gettextize
+
+* Russian translation
+
+* Wrap a GUI around it.
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..6c88f2b
--- /dev/null
@@ -0,0 +1,870 @@
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+        [AM_AUTOMAKE_VERSION([1.9.6])])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake.  There are at least two reasons why we must not
+# use `-m 0755':
+#   - it causes special bits like SGID to be ignored,
+#   - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out.  Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/gettext.m4])
+m4_include([m4/iconv.m4])
+m4_include([m4/lib-ld.m4])
+m4_include([m4/lib-link.m4])
+m4_include([m4/lib-prefix.m4])
+m4_include([m4/nls.m4])
+m4_include([m4/po.m4])
+m4_include([m4/progtest.m4])
diff --git a/ai.c b/ai.c
deleted file mode 100644 (file)
index a1b4bbf..0000000
--- a/ai.c
+++ /dev/null
@@ -1,615 +0,0 @@
-#include "sst.h"
-
-static int tryexit(int lookx, int looky, int ienm, int loccom, int irun) 
-{
-    int iqx, iqy, l;
-
-    iqx = quadx+(lookx+(QUADSIZE-1))/QUADSIZE - 1;
-    iqy = quady+(looky+(QUADSIZE-1))/QUADSIZE - 1;
-    if (!VALID_QUADRANT(iqx,iqy) ||
-       game.state.galaxy[iqx][iqy].supernova ||
-       game.state.galaxy[iqx][iqy].klingons > 8)
-       return 0; /* no can do -- neg energy, supernovae, or >8 Klingons */
-    if (ienm == IHR) return 0; /* Romulans cannot escape! */
-    if (irun == 0) {
-       /* avoid intruding on another commander's territory */
-       if (ienm == IHC) {
-           for_commanders(l)
-               if (game.state.cx[l]==iqx && game.state.cy[l]==iqy) return 0;
-           /* refuse to leave if currently attacking starbase */
-           if (batx==quadx && baty==quady) return 0;
-       }
-       /* don't leave if over 1000 units of energy */
-       if (game.kpower[loccom] > 1000.) return 0;
-    }
-    /* print escape message and move out of quadrant.
-       We know this if either short or long range sensors are working */
-    if (game.damage[DSRSENS] == 0.0 || game.damage[DLRSENS] == 0.0 ||
-       condit == IHDOCKED) {
-       crmena(1, ienm, 2, game.kx[loccom], game.ky[loccom]);
-       prout(" escapes to %s (and regains strength).",
-             cramlc(quadrant, iqx, iqy));
-    }
-    /* handle local matters related to escape */
-    game.quad[game.kx[loccom]][game.ky[loccom]] = IHDOT;
-    game.kx[loccom] = game.kx[nenhere];
-    game.ky[loccom] = game.ky[nenhere];
-    game.kavgd[loccom] = game.kavgd[nenhere];
-    game.kpower[loccom] = game.kpower[nenhere];
-    game.kdist[loccom] = game.kdist[nenhere];
-    klhere--;
-    nenhere--;
-    if (condit != IHDOCKED) newcnd();
-    /* Handle global matters related to escape */
-    game.state.galaxy[quadx][quady].klingons--;
-    game.state.galaxy[iqx][iqy].klingons++;
-    if (ienm==IHS) {
-       ishere=0;
-       iscate=0;
-       ientesc=0;
-       isatb=0;
-       game.future[FSCMOVE]=0.2777+game.state.date;
-       game.future[FSCDBAS]=FOREVER;
-       game.state.isx=iqx;
-       game.state.isy=iqy;
-    }
-    else {
-       for_commanders(l) {
-           if (game.state.cx[l]==quadx && game.state.cy[l]==quady) {
-               game.state.cx[l]=iqx;
-               game.state.cy[l]=iqy;
-               break;
-           }
-       }
-       comhere = 0;
-    }
-    return 1; /* success */
-}
-
-
-static void movebaddy(int comx, int comy, int loccom, int ienm) 
-{
-    int motion, mdist, nsteps, mx, my, nextx, nexty, lookx, looky, ll;
-    int irun = 0;
-    int krawlx, krawly;
-    int success;
-    int attempts;
-    /* This should probably be just comhere + ishere */
-    int nbaddys = skill >= SKILL_EXPERT ?
-       (int)((comhere*2 + ishere*2+klhere*1.23+irhere*1.5)/2.0):
-       (comhere + ishere);
-    double dist1, forces;
-
-    dist1 = game.kdist[loccom];
-    mdist = dist1 + 0.5; /* Nearest integer distance */
-
-    /* If SC, check with spy to see if should hi-tail it */
-    if (ienm==IHS &&
-       (game.kpower[loccom] <= 500.0 || (condit==IHDOCKED && game.damage[DPHOTON]==0))) {
-       irun = 1;
-       motion = -QUADSIZE;
-    }
-    else {
-       /* decide whether to advance, retreat, or hold position */
-/* Algorithm:
- * Enterprise has "force" based on condition of phaser and photon torpedoes.
- If both are operating full strength, force is 1000. If both are damaged,
- force is -1000. Having shields down subtracts an additional 1000.
-
- * Enemy has forces equal to the energy of the attacker plus
- 100*(K+R) + 500*(C+S) - 400 for novice through good levels OR
- 346*K + 400*R + 500*(C+S) - 400 for expert and emeritus.
-
- Attacker Initial energy levels (nominal):
- Klingon   Romulan   Commander   Super-Commander
- Novice    400        700        1200        
- Fair      425        750        1250
- Good      450        800        1300        1750
- Expert    475        850        1350        1875
- Emeritus  500        900        1400        2000
- VARIANCE   75        200         200         200
-
- Enemy vessels only move prior to their attack. In Novice - Good games
- only commanders move. In Expert games, all enemy vessels move if there
- is a commander present. In Emeritus games all enemy vessels move.
-
- *  If Enterprise is not docked, an agressive action is taken if enemy
- forces are 1000 greater than Enterprise.
-
- Agressive action on average cuts the distance between the ship and
- the enemy to 1/4 the original.
-
- *  At lower energy advantage, movement units are proportional to the
- advantage with a 650 advantage being to hold ground, 800 to move forward
- 1, 950 for two, 150 for back 4, etc. Variance of 100.
-
- If docked, is reduced by roughly 1.75*skill, generally forcing a
- retreat, especially at high skill levels.
-
- *  Motion is limited to skill level, except for SC hi-tailing it out.
- */
-
-       forces = game.kpower[loccom]+100.0*nenhere+400*(nbaddys-1);
-       if (shldup==0) forces += 1000; /* Good for enemy if shield is down! */
-       if (game.damage[DPHASER] == 0.0 || game.damage[DPHOTON] == 0.0) {
-           if (game.damage[DPHASER] != 0) /* phasers damaged */
-               forces += 300.0;
-           else
-               forces -= 0.2*(energy - 2500.0);
-           if (game.damage[DPHOTON] != 0) /* photon torpedoes damaged */
-               forces += 300.0;
-           else
-               forces -= 50.0*torps;
-       }
-       else {
-           /* phasers and photon tubes both out! */
-           forces += 1000.0;
-       }
-       motion = 0;
-       if (forces <= 1000.0 && condit != IHDOCKED) /* Typical situation */
-           motion = ((forces+200.0*Rand())/150.0) - 5.0;
-       else {
-           if (forces > 1000.0) /* Very strong -- move in for kill */
-               motion = (1.0-square(Rand()))*dist1 + 1.0;
-           if (condit==IHDOCKED && (game.options & OPTION_BASE)) /* protected by base -- back off ! */
-               motion -= skill*(2.0-square(Rand()));
-       }
-#ifdef DEBUG
-       if (idebug) {
-           proutn("MOTION = %1.2f", motion);
-           proutn("  FORCES = %1,2f", forces);
-       }
-#endif
-       /* don't move if no motion */
-       if (motion==0) return;
-       /* Limit motion according to skill */
-       if (abs(motion) > skill) motion = (motion < 0) ? -skill : skill;
-    }
-    /* calculate preferred number of steps */
-    nsteps = motion < 0 ? -motion : motion;
-    if (motion > 0 && nsteps > mdist) nsteps = mdist; /* don't overshoot */
-    if (nsteps > QUADSIZE) nsteps = QUADSIZE; /* This shouldn't be necessary */
-    if (nsteps < 1) nsteps = 1; /* This shouldn't be necessary */
-#ifdef DEBUG
-    if (idebug) {
-       prout("NSTEPS = %d", nsteps);
-    }
-#endif
-    /* Compute preferred values of delta X and Y */
-    mx = sectx - comx;
-    my = secty - comy;
-    if (2.0 * abs(mx) < abs(my)) mx = 0;
-    if (2.0 * abs(my) < abs(sectx-comx)) my = 0;
-    if (mx != 0) mx = mx*motion < 0 ? -1 : 1;
-    if (my != 0) my = my*motion < 0 ? -1 : 1;
-    nextx = comx;
-    nexty = comy;
-    /* main move loop */
-    for (ll = 0; ll < nsteps; ll++) {
-#ifdef DEBUG
-       if (idebug) {
-           prout("%d", ll+1);
-       }
-#endif
-       /* Check if preferred position available */
-       lookx = nextx + mx;
-       looky = nexty + my;
-       krawlx = mx < 0 ? 1 : -1;
-       krawly = my < 0 ? 1 : -1;
-       success = 0;
-       attempts = 0; /* Settle mysterious hang problem */
-       while (attempts++ < 20 && !success) {
-           if (lookx < 1 || lookx > QUADSIZE) {
-               if (motion < 0 && tryexit(lookx, looky, ienm, loccom, irun))
-                   return;
-               if (krawlx == mx || my == 0) break;
-               lookx = nextx + krawlx;
-               krawlx = -krawlx;
-           }
-           else if (looky < 1 || looky > QUADSIZE) {
-               if (motion < 0 && tryexit(lookx, looky, ienm, loccom, irun))
-                   return;
-               if (krawly == my || mx == 0) break;
-               looky = nexty + krawly;
-               krawly = -krawly;
-           }
-           else if ((game.options & OPTION_RAMMING) && game.quad[lookx][looky] != IHDOT) {
-               /* See if we should ram ship */
-               if (game.quad[lookx][looky] == ship &&
-                   (ienm == IHC || ienm == IHS)) {
-                   ram(1, ienm, comx, comy);
-                   return;
-               }
-               if (krawlx != mx && my != 0) {
-                   lookx = nextx + krawlx;
-                   krawlx = -krawlx;
-               }
-               else if (krawly != my && mx != 0) {
-                   looky = nexty + krawly;
-                   krawly = -krawly;
-               }
-               else break; /* we have failed */
-           }
-           else success = 1;
-       }
-       if (success) {
-           nextx = lookx;
-           nexty = looky;
-#ifdef DEBUG
-           if (idebug) {
-               prout(cramlc(neither, nextx, nexty));
-           }
-#endif
-       }
-       else break; /* done early */
-    }
-    /* Put commander in place within same quadrant */
-    game.quad[comx][comy] = IHDOT;
-    game.quad[nextx][nexty] = ienm;
-    if (nextx != comx || nexty != comy) {
-       /* it moved */
-       game.kx[loccom] = nextx;
-       game.ky[loccom] = nexty;
-       game.kdist[loccom] = game.kavgd[loccom] =
-           sqrt(square(sectx-nextx)+square(secty-nexty));
-       if (game.damage[DSRSENS] == 0 || condit == IHDOCKED) {
-           proutn("***");
-           cramen(ienm);
-           proutn(" from %s", cramlc(2, comx, comy));
-           if (game.kdist[loccom] < dist1) proutn(" advances to ");
-           else proutn(" retreats to ");
-           prout(cramlc(sector, nextx, nexty));
-       }
-    }
-}
-
-void movcom(void) 
-{
-    int ix, iy, i;
-
-#ifdef DEBUG
-    if (idebug) prout("MOVCOM");
-#endif
-
-    /* Figure out which Klingon is the commander (or Supercommander)
-       and do move */
-    if (comhere) 
-       for_local_enemies(i) {
-           ix = game.kx[i];
-           iy = game.ky[i];
-           if (game.quad[ix][iy] == IHC) {
-               movebaddy(ix, iy, i, IHC);
-               break;
-           }
-       }
-    if (ishere) 
-       for_local_enemies(i) {
-           ix = game.kx[i];
-           iy = game.ky[i];
-           if (game.quad[ix][iy] == IHS) {
-               movebaddy(ix, iy, i, IHS);
-               break;
-           }
-       }
-    /* if skill level is high, move other Klingons and Romulans too!
-       Move these last so they can base their actions on what the
-       commander(s) do. */
-    if (skill >= SKILL_EXPERT && (game.options & OPTION_MVBADDY)) 
-       for_local_enemies(i) {
-           ix = game.kx[i];
-           iy = game.ky[i];
-           if (game.quad[ix][iy] == IHK || game.quad[ix][iy] == IHR)
-               movebaddy(ix, iy, i, game.quad[ix][iy]);
-       }
-
-    sortkl();
-}
-
-static int movescom(int iqx, int iqy, int flag, int *ipage) 
-{
-    int i;
-
-    if ((iqx==quadx && iqy==quady) ||
-       !VALID_QUADRANT(iqx, iqy) ||
-       game.state.galaxy[iqx][iqy].supernova ||
-       game.state.galaxy[iqx][iqy].klingons > 8) 
-       return 1;
-    if (flag) {
-       /* Avoid quadrants with bases if we want to avoid Enterprise */
-       for_starbases(i)
-           if (game.state.baseqx[i]==iqx && game.state.baseqy[i]==iqy) return 1;
-    }
-    if (justin && !iscate) return 1;
-    /* do the move */
-    game.state.galaxy[game.state.isx][game.state.isy].klingons--;
-    game.state.isx = iqx;
-    game.state.isy = iqy;
-    game.state.galaxy[game.state.isx][game.state.isy].klingons++;
-    if (ishere) {
-       /* SC has scooted, Remove him from current quadrant */
-       iscate=0;
-       isatb=0;
-       ishere=0;
-       ientesc=0;
-       game.future[FSCDBAS]=FOREVER;
-       for_local_enemies(i) 
-           if (game.quad[game.kx[i]][game.ky[i]] == IHS) break;
-       game.quad[game.kx[i]][game.ky[i]] = IHDOT;
-       game.kx[i] = game.kx[nenhere];
-       game.ky[i] = game.ky[nenhere];
-       game.kdist[i] = game.kdist[nenhere];
-       game.kavgd[i] = game.kavgd[nenhere];
-       game.kpower[i] = game.kpower[nenhere];
-       klhere--;
-       nenhere--;
-       if (condit!=IHDOCKED) newcnd();
-       sortkl();
-    }
-    /* check for a helpful planet */
-    for (i = 0; i < inplan; i++) {
-       if (game.state.plnets[i].x==game.state.isx && game.state.plnets[i].y==game.state.isy &&
-           game.state.plnets[i].crystals == 1) {
-           /* destroy the planet */
-           DESTROY(&game.state.plnets[i]);
-           game.state.galaxy[game.state.isx][game.state.isy].planets -= 1;
-           if (game.damage[DRADIO] == 0.0 || condit == IHDOCKED) {
-               if (*ipage==0) pause_game(1);
-               *ipage = 1;
-               prout("Lt. Uhura-  \"Captain, Starfleet Intelligence reports");
-               proutn("   a planet in ");
-               proutn(cramlc(quadrant, game.state.isx, game.state.isy));
-               prout(" has been destroyed");
-               prout("   by the Super-commander.\"");
-           }
-           break;
-       }
-    }
-    return 0; /* looks good! */
-}
-                       
-void scom(int *ipage)
-{
-    int i, i2, j, ideltax, ideltay, ibqx, ibqy, sx, sy, ifindit, iwhichb;
-    int iqx, iqy;
-    int basetbl[BASEMAX+1];
-    double bdist[BASEMAX+1];
-    int flag;
-#ifdef DEBUG
-    if (idebug) prout("SCOM");
-#endif
-
-    /* Decide on being active or passive */
-    flag = ((NKILLC+NKILLK)/(game.state.date+0.01-indate) < 0.1*skill*(skill+1.0) ||
-           (game.state.date-indate) < 3.0);
-    if (iscate==0 && flag) {
-       /* compute move away from Enterprise */
-       ideltax = game.state.isx-quadx;
-       ideltay = game.state.isy-quady;
-       if (sqrt(ideltax*(double)ideltax+ideltay*(double)ideltay) > 2.0) {
-           /* circulate in space */
-           ideltax = game.state.isy-quady;
-           ideltay = quadx-game.state.isx;
-       }
-    }
-    else {
-       /* compute distances to starbases */
-       if (game.state.rembase <= 0) {
-           /* nothing left to do */
-           game.future[FSCMOVE] = FOREVER;
-           return;
-       }
-       sx = game.state.isx;
-       sy = game.state.isy;
-       for_starbases(i) {
-           basetbl[i] = i;
-           ibqx = game.state.baseqx[i];
-           ibqy = game.state.baseqy[i];
-           bdist[i] = sqrt(square(ibqx-sx) + square(ibqy-sy));
-       }
-       if (game.state.rembase > 1) {
-           /* sort into nearest first order */
-           int iswitch;
-           do {
-               iswitch = 0;
-               for (i=1; i < game.state.rembase-1; i++) {
-                   if (bdist[i] > bdist[i+1]) {
-                       int ti = basetbl[i];
-                       double t = bdist[i];
-                       bdist[i] = bdist[i+1];
-                       bdist[i+1] = t;
-                       basetbl[i] = basetbl[i+1];
-                       basetbl[i+1] =ti;
-                       iswitch = 1;
-                   }
-               }
-           } while (iswitch);
-       }
-       /* look for nearest base without a commander, no Enterprise, and
-          without too many Klingons, and not already under attack. */
-       ifindit = iwhichb = 0;
-
-       for_starbases(i2) {
-           i = basetbl[i2];    /* bug in original had it not finding nearest*/
-           ibqx = game.state.baseqx[i];
-           ibqy = game.state.baseqy[i];
-           if ((ibqx == quadx && ibqy == quady) ||
-               (ibqx == batx && ibqy == baty) ||
-               game.state.galaxy[ibqx][ibqy].supernova ||
-               game.state.galaxy[ibqx][ibqy].klingons > 8) 
-               continue;
-           /* if there is a commander, an no other base is appropriate,
-              we will take the one with the commander */
-           for_commanders (j) {
-               if (ibqx==game.state.cx[j] && ibqy==game.state.cy[j] && ifindit!= 2) {
-                   ifindit = 2;
-                   iwhichb = i;
-                   break;
-               }
-           }
-           if (j > game.state.remcom) { /* no commander -- use this one */
-               ifindit = 1;
-               iwhichb = i;
-               break;
-           }
-       }
-       if (ifindit==0) return; /* Nothing suitable -- wait until next time*/
-       ibqx = game.state.baseqx[iwhichb];
-       ibqy = game.state.baseqy[iwhichb];
-       /* decide how to move toward base */
-       ideltax = ibqx - game.state.isx;
-       ideltay = ibqy - game.state.isy;
-    }
-    /* Maximum movement is 1 quadrant in either or both axis */
-    if (ideltax > 1) ideltax = 1;
-    if (ideltax < -1) ideltax = -1;
-    if (ideltay > 1) ideltay = 1;
-    if (ideltay < -1) ideltay = -1;
-
-    /* try moving in both x and y directions */
-    iqx = game.state.isx + ideltax;
-    iqy = game.state.isy + ideltax;
-    if (movescom(iqx, iqy, flag, ipage)) {
-       /* failed -- try some other maneuvers */
-       if (ideltax==0 || ideltay==0) {
-           /* attempt angle move */
-           if (ideltax != 0) {
-               iqy = game.state.isy + 1;
-               if (movescom(iqx, iqy, flag, ipage)) {
-                   iqy = game.state.isy - 1;
-                   movescom(iqx, iqy, flag, ipage);
-               }
-           }
-           else {
-               iqx = game.state.isx + 1;
-               if (movescom(iqx, iqy, flag, ipage)) {
-                   iqx = game.state.isx - 1;
-                   movescom(iqx, iqy, flag, ipage);
-               }
-           }
-       }
-       else {
-           /* try moving just in x or y */
-           iqy = game.state.isy;
-           if (movescom(iqx, iqy, flag, ipage)) {
-               iqy = game.state.isy + ideltay;
-               iqx = game.state.isx;
-               movescom(iqx, iqy, flag, ipage);
-           }
-       }
-    }
-    /* check for a base */
-    if (game.state.rembase == 0) {
-       game.future[FSCMOVE] = FOREVER;
-    }
-    else for_starbases(i) {
-       ibqx = game.state.baseqx[i];
-       ibqy = game.state.baseqy[i];
-       if (ibqx==game.state.isx && ibqy == game.state.isy && game.state.isx != batx && game.state.isy != baty) {
-           /* attack the base */
-           if (flag) return; /* no, don't attack base! */
-           iseenit = 0;
-           isatb=1;
-           game.future[FSCDBAS] = game.state.date + 1.0 +2.0*Rand();
-           if (game.future[FCDBAS] < FOREVER) game.future[FSCDBAS] +=
-               game.future[FCDBAS]-game.state.date;
-           if (game.damage[DRADIO] > 0 && condit != IHDOCKED)
-               return; /* no warning */
-           iseenit = 1;
-           if (*ipage == 0)  pause_game(1);
-           *ipage=1;
-           proutn("Lt. Uhura-  \"Captain, the starbase in ");
-           proutn(cramlc(quadrant, game.state.isx, game.state.isy));
-           skip(1);
-           prout("   reports that it is under attack from the Klingon Super-commander.");
-           proutn("   It can survive until stardate %d.\"",
-                  (int)game.future[FSCDBAS]);
-           if (resting==0) return;
-           prout("Mr. Spock-  \"Captain, shall we cancel the rest period?\"");
-           if (ja()==0) return;
-           resting = 0;
-           Time = 0.0; /* actually finished */
-           return;
-       }
-    }
-    /* Check for intelligence report */
-    if (
-#ifdef DEBUG
-       idebug==0 &&
-#endif
-       (Rand() > 0.2 ||
-        (game.damage[DRADIO] > 0.0 && condit != IHDOCKED) ||
-        !game.state.galaxy[game.state.isx][game.state.isy].charted))
-       return;
-    if (*ipage==0) pause_game(1);
-    *ipage = 1;
-    prout("Lt. Uhura-  \"Captain, Starfleet Intelligence reports");
-    proutn("   the Super-commander is in ");
-    proutn(cramlc(quadrant, game.state.isx, game.state. isy));
-    prout(".\"");
-    return;
-}
-
-void movetho(void)
-{
-    int idx, idy, im, i, dum, my;
-    /* Move the Tholian */
-    if (ithere==0 || justin == 1) return;
-
-    if (ithx == 1 && ithy == 1) {
-       idx = 1; idy = QUADSIZE;
-    }
-    else if (ithx == 1 && ithy == QUADSIZE) {
-       idx = QUADSIZE; idy = QUADSIZE;
-    }
-    else if (ithx == QUADSIZE && ithy == QUADSIZE) {
-       idx = QUADSIZE; idy = 1;
-    }
-    else if (ithx == QUADSIZE && ithy == 1) {
-       idx = 1; idy = 1;
-    }
-    else {
-       /* something is wrong! */
-       ithere = 0;
-       return;
-    }
-
-    /* Do nothing if we are blocked */
-    if (game.quad[idx][idy]!= IHDOT && game.quad[idx][idy]!= IHWEB) return;
-    game.quad[ithx][ithy] = IHWEB;
-
-    if (ithx != idx) {
-       /* move in x axis */
-       im = fabs((double)idx - ithx)/((double)idx - ithx);
-       while (ithx != idx) {
-           ithx += im;
-           if (game.quad[ithx][ithy]==IHDOT) game.quad[ithx][ithy] = IHWEB;
-       }
-    }
-    else if (ithy != idy) {
-       /* move in y axis */
-       im = fabs((double)idy - ithy)/((double)idy - ithy);
-       while (ithy != idy) {
-           ithy += im;
-           if (game.quad[ithx][ithy]==IHDOT) game.quad[ithx][ithy] = IHWEB;
-       }
-    }
-    game.quad[ithx][ithy] = IHT;
-    game.kx[nenhere]=ithx;
-    game.ky[nenhere]=ithy;
-
-    /* check to see if all holes plugged */
-    for_sectors(i) {
-       if (game.quad[1][i]!=IHWEB && game.quad[1][i]!=IHT) return;
-       if (game.quad[QUADSIZE][i]!=IHWEB && game.quad[QUADSIZE][i]!=IHT) return;
-       if (game.quad[i][1]!=IHWEB && game.quad[i][1]!=IHT) return;
-       if (game.quad[i][QUADSIZE]!=IHWEB && game.quad[i][QUADSIZE]!=IHT) return;
-    }
-    /* All plugged up -- Tholian splits */
-    game.quad[ithx][ithy]=IHWEB;
-    dropin(IHBLANK, &dum, &my);
-    crmena(1,IHT, 2, ithx, ithy);
-    prout(" completes web.");
-    ithere = ithx = ithy = 0;
-    nenhere--;
-    return;
-}
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..1c69a72
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+autoreconf -v
diff --git a/battle.c b/battle.c
deleted file mode 100644 (file)
index 56a981f..0000000
--- a/battle.c
+++ /dev/null
@@ -1,1226 +0,0 @@
-#include <unistd.h>
-#include "sst.h"
-
-void doshield(int i) 
-{
-    int key;
-    enum {NONE, SHUP, SHDN, NRG} action = NONE;
-
-    ididit = 0;
-
-    if (i == 2) action = SHUP;
-    else {
-       key = scan();
-       if (key == IHALPHA) {
-           if (isit("transfer"))
-               action = NRG;
-           else {
-               chew();
-               if (game.damage[DSHIELD]) {
-                   prout("Shields damaged and down.");
-                   return;
-               }
-               if (isit("up"))
-                   action = SHUP;
-               else if (isit("down"))
-                   action = SHDN;
-           }
-       }
-       if (action==NONE) {
-           proutn("Do you wish to change shield energy? ");
-           if (ja()) {
-               proutn("Energy to transfer to shields- ");
-               action = NRG;
-           }
-           else if (game.damage[DSHIELD]) {
-               prout("Shields damaged and down.");
-               return;
-           }
-           else if (shldup) {
-               proutn("Shields are up. Do you want them down? ");
-               if (ja()) action = SHDN;
-               else {
-                   chew();
-                   return;
-               }
-           }
-           else {
-               proutn("Shields are down. Do you want them up? ");
-               if (ja()) action = SHUP;
-               else {
-                   chew();
-                   return;
-               }
-           }
-       }
-    }
-    switch (action) {
-    case SHUP: /* raise shields */
-       if (shldup) {
-           prout("Shields already up.");
-           return;
-       }
-       shldup = 1;
-       shldchg = 1;
-       if (condit != IHDOCKED) energy -= 50.0;
-       prout("Shields raised.");
-       if (energy <= 0) {
-           skip(1);
-           prout("Shields raising uses up last of energy.");
-           finish(FNRG);
-           return;
-       }
-       ididit=1;
-       return;
-    case SHDN:
-       if (shldup==0) {
-           prout("Shields already down.");
-           return;
-       }
-       shldup=0;
-       shldchg=1;
-       prout("Shields lowered.");
-       ididit=1;
-       return;
-    case NRG:
-       while (scan() != IHREAL) {
-           chew();
-           proutn("Energy to transfer to shields- ");
-       }
-       chew();
-       if (aaitem==0) return;
-       if (aaitem > energy) {
-           prout("Insufficient ship energy.");
-           return;
-       }
-       ididit = 1;
-       if (shield+aaitem >= inshld) {
-           prout("Shield energy maximized.");
-           if (shield+aaitem > inshld) {
-               prout("Excess energy requested returned to ship energy");
-           }
-           energy -= inshld-shield;
-           shield = inshld;
-           return;
-       }
-       if (aaitem < 0.0 && energy-aaitem > inenrg) {
-           /* Prevent shield drain loophole */
-           skip(1);
-           prout("Engineering to bridge--");
-           prout("  Scott here. Power circuit problem, Captain.");
-           prout("  I can't drain the shields.");
-           ididit = 0;
-           return;
-       }
-       if (shield+aaitem < 0) {
-           prout("All shield energy transferred to ship.");
-           energy += shield;
-           shield = 0.0;
-           return;
-       }
-       proutn("Scotty- \"");
-       if (aaitem > 0)
-           prout("Transferring energy to shields.\"");
-       else
-           prout("Draining energy from shields.\"");
-       shield += aaitem;
-       energy -= aaitem;
-       return;
-    case NONE:;        /* avoid gcc warning */
-    }
-}
-
-void ram(int ibumpd, int ienm, int ix, int iy)
-{
-    double type = 1.0, extradm;
-    int icas, l;
-       
-    prouts("***RED ALERT!  RED ALERT!");
-    skip(1);
-    prout("***COLLISION IMMINENT.");
-    skip(2);
-    proutn("***");
-    crmshp();
-    switch (ienm) {
-    case IHR: type = 1.5; break;
-    case IHC: type = 2.0; break;
-    case IHS: type = 2.5; break;
-    case IHT: type = 0.5; break;
-    case IHQUEST: type = 4.0; break;
-    }
-    proutn(ibumpd ? " rammed by " : " rams ");
-    crmena(0, ienm, 2, ix, iy);
-    if (ibumpd) proutn(" (original position)");
-    skip(1);
-    deadkl(ix, iy, ienm, sectx, secty);
-    proutn("***");
-    crmshp();
-    prout(" heavily damaged.");
-    icas = 10.0+20.0*Rand();
-    prout("***Sickbay reports %d casualties", icas);
-    casual += icas;
-    for (l=0; l < NDEVICES; l++) {
-       if (l == DDRAY) 
-           continue; // Don't damage deathray 
-       if (game.damage[l] < 0) 
-           continue;
-       extradm = (10.0*type*Rand()+1.0)*damfac;
-       game.damage[l] += Time + extradm; /* Damage for at least time of travel! */
-    }
-    shldup = 0;
-    if (KLINGREM) {
-       pause_game(2);
-       dreprt();
-    }
-    else finish(FWON);
-    return;
-}
-
-void torpedo(double course, double r, int inx, int iny, double *hit, int i, int n)
-{
-    int l, iquad=0, ix=0, iy=0, jx=0, jy=0, shoved=0, ll;
-       
-    double ac=course + 0.25*r;
-    double angle = (15.0-ac)*0.5235988;
-    double bullseye = (15.0 - course)*0.5235988;
-    double deltax=-sin(angle), deltay=cos(angle), x=inx, y=iny, bigger;
-    double ang, temp, xx, yy, kp, h1;
-
-    bigger = fabs(deltax);
-    if (fabs(deltay) > bigger) bigger = fabs(deltay);
-    deltax /= bigger;
-    deltay /= bigger;
-    if (game.damage[DSRSENS]==0 || condit==IHDOCKED) 
-       setwnd(srscan_window);
-    else 
-       setwnd(message_window);
-    /* Loop to move a single torpedo */
-    for (l=1; l <= 15; l++) {
-       x += deltax;
-       ix = x + 0.5;
-       y += deltay;
-       iy = y + 0.5;
-       if (!VALID_SECTOR(ix, iy)) break;
-       iquad=game.quad[ix][iy];
-       tracktorpedo(ix, iy, l, i, n, iquad);
-       if (iquad==IHDOT) continue;
-       /* hit something */
-       setwnd(message_window);
-       skip(1);        /* start new line after text track */
-       switch(iquad) {
-       case IHE: /* Hit our ship */
-       case IHF:
-           skip(1);
-           proutn("Torpedo hits ");
-           crmshp();
-           prout(".");
-           *hit = 700.0 + 100.0*Rand() -
-               1000.0*sqrt(square(ix-inx)+square(iy-iny))*
-               fabs(sin(bullseye-angle));
-           *hit = fabs(*hit);
-           newcnd(); /* we're blown out of dock */
-           /* We may be displaced. */
-           if (landed==1 || condit==IHDOCKED) return; /* Cheat if on a planet */
-           ang = angle + 2.5*(Rand()-0.5);
-           temp = fabs(sin(ang));
-           if (fabs(cos(ang)) > temp) temp = fabs(cos(ang));
-           xx = -sin(ang)/temp;
-           yy = cos(ang)/temp;
-           jx=ix+xx+0.5;
-           jy=iy+yy+0.5;
-           if (!VALID_SECTOR(jx, jy)) return;
-           if (game.quad[jx][jy]==IHBLANK) {
-               finish(FHOLE);
-               return;
-           }
-           if (game.quad[jx][jy]!=IHDOT) {
-               /* can't move into object */
-               return;
-           }
-           sectx = jx;
-           secty = jy;
-           crmshp();
-           shoved = 1;
-           break;
-                                         
-       case IHC: /* Hit a commander */
-       case IHS:
-           if (Rand() <= 0.05) {
-               crmena(1, iquad, 2, ix, iy);
-               prout(" uses anti-photon device;");
-               prout("   torpedo neutralized.");
-               return;
-           }
-       case IHR: /* Hit a regular enemy */
-       case IHK:
-           /* find the enemy */
-           for_local_enemies(ll)
-               if (ix==game.kx[ll] && iy==game.ky[ll]) break;
-           kp = fabs(game.kpower[ll]);
-           h1 = 700.0 + 100.0*Rand() -
-               1000.0*sqrt(square(ix-inx)+square(iy-iny))*
-               fabs(sin(bullseye-angle));
-           h1 = fabs(h1);
-           if (kp < h1) h1 = kp;
-           game.kpower[ll] -= (game.kpower[ll]<0 ? -h1 : h1);
-           if (game.kpower[ll] == 0) {
-               deadkl(ix, iy, iquad, ix, iy);
-               return;
-           }
-           crmena(1, iquad, 2, ix, iy);
-           /* If enemy damaged but not destroyed, try to displace */
-           ang = angle + 2.5*(Rand()-0.5);
-           temp = fabs(sin(ang));
-           if (fabs(cos(ang)) > temp) temp = fabs(cos(ang));
-           xx = -sin(ang)/temp;
-           yy = cos(ang)/temp;
-           jx=ix+xx+0.5;
-           jy=iy+yy+0.5;
-           if (!VALID_SECTOR(jx, jy)) {
-               prout(" damaged but not destroyed.");
-               return;
-           }
-           if (game.quad[jx][jy]==IHBLANK) {
-               prout(" buffeted into black hole.");
-               deadkl(ix, iy, iquad, jx, jy);
-               return;
-           }
-           if (game.quad[jx][jy]!=IHDOT) {
-               /* can't move into object */
-               prout(" damaged but not destroyed.");
-               return;
-           }
-           proutn(" damaged--");
-           game.kx[ll] = jx;
-           game.ky[ll] = jy;
-           shoved = 1;
-           break;
-       case IHB: /* Hit a base */
-           skip(1);
-           prout("***STARBASE DESTROYED..");
-           for_starbases(ll) {
-               if (game.state.baseqx[ll]==quadx && game.state.baseqy[ll]==quady) {
-                   game.state.baseqx[ll]=game.state.baseqx[game.state.rembase];
-                   game.state.baseqy[ll]=game.state.baseqy[game.state.rembase];
-                   break;
-               }
-           }
-           game.quad[ix][iy]=IHDOT;
-           game.state.rembase--;
-           basex=basey=0;
-           game.state.galaxy[quadx][quady].starbase--;
-           game.state.chart[quadx][quady].starbase--;
-           game.state.basekl++;
-           newcnd();
-           return;
-       case IHP: /* Hit a planet */
-           crmena(1, iquad, 2, ix, iy);
-           prout(" destroyed.");
-           game.state.nplankl++;
-           game.state.galaxy[quadx][quady].planets--;
-           DESTROY(&game.state.plnets[iplnet]);
-           iplnet = 0;
-           plnetx = plnety = 0;
-           game.quad[ix][iy] = IHDOT;
-           if (landed==1) {
-               /* captain perishes on planet */
-               finish(FDPLANET);
-           }
-           return;
-       case IHSTAR: /* Hit a star */
-           if (Rand() > 0.10) {
-               nova(ix, iy);
-               return;
-           }
-           crmena(1, IHSTAR, 2, ix, iy);
-           prout(" unaffected by photon blast.");
-           return;
-       case IHQUEST: /* Hit a thingy */
-           if (!(game.options & OPTION_THINGY) || Rand()>0.7) {
-               skip(1);
-               prouts("AAAAIIIIEEEEEEEEAAAAAAAAUUUUUGGGGGHHHHHHHHHHHH!!!");
-               skip(1);
-               prouts("    HACK!     HACK!    HACK!        *CHOKE!*  ");
-               skip(1);
-               proutn("Mr. Spock-");
-               prouts("  \"Fascinating!\"");
-               skip(1);
-               deadkl(ix, iy, iquad, ix, iy);
-           } else {
-               /*
-                * Stas Sergeev added the possibility that
-                * you can shove the Thingy and piss it off.
-                * It then becomes an enemy and may fire at you.
-                */
-               iqengry=1;
-               shoved=1;
-           }
-           return;
-       case IHBLANK: /* Black hole */
-           skip(1);
-           crmena(1, IHBLANK, 2, ix, iy);
-           prout(" swallows torpedo.");
-           return;
-       case IHWEB: /* hit the web */
-           skip(1);
-           prout("***Torpedo absorbed by Tholian web.");
-           return;
-       case IHT:  /* Hit a Tholian */
-           h1 = 700.0 + 100.0*Rand() -
-               1000.0*sqrt(square(ix-inx)+square(iy-iny))*
-               fabs(sin(bullseye-angle));
-           h1 = fabs(h1);
-           if (h1 >= 600) {
-               game.quad[ix][iy] = IHDOT;
-               ithere = 0;
-               ithx = ithy = 0;
-               deadkl(ix, iy, iquad, ix, iy);
-               return;
-           }
-           skip(1);
-           crmena(1, IHT, 2, ix, iy);
-           if (Rand() > 0.05) {
-               prout(" survives photon blast.");
-               return;
-           }
-           prout(" disappears.");
-           game.quad[ix][iy] = IHWEB;
-           ithere = ithx = ithy = 0;
-           nenhere--;
-           {
-               int dum, my;
-               dropin(IHBLANK, &dum, &my);
-           }
-           return;
-                                       
-       default: /* Problem! */
-           skip(1);
-           proutn("Don't know how to handle collision with ");
-           crmena(1, iquad, 2, ix, iy);
-           skip(1);
-           return;
-       }
-       break;
-    }
-    if(curwnd!=message_window) {
-       setwnd(message_window);
-    }
-    if (shoved) {
-       game.quad[jx][jy]=iquad;
-       game.quad[ix][iy]=IHDOT;
-       prout(" displaced by blast to %s ", cramlc(sector, jx, jy));
-       for_local_enemies(ll)
-           game.kdist[ll] = game.kavgd[ll] = sqrt(square(sectx-game.kx[ll])+square(secty-game.ky[ll]));
-       sortkl();
-       return;
-    }
-    skip(1);
-    prout("Torpedo missed.");
-    return;
-}
-
-static void fry(double hit) 
-{
-    double ncrit, extradm;
-    int ktr=1, l, ll, j, cdam[NDEVICES];
-
-    /* a critical hit occured */
-    if (hit < (275.0-25.0*skill)*(1.0+0.5*Rand())) return;
-
-    ncrit = 1.0 + hit/(500.0+100.0*Rand());
-    proutn("***CRITICAL HIT--");
-    /* Select devices and cause damage */
-    for (l = 0; l < ncrit && 0 < NDEVICES; l++) {
-       do {
-           j = NDEVICES*Rand();
-           /* Cheat to prevent shuttle damage unless on ship */
-       } while 
-             (game.damage[j]<0.0 || (j==DSHUTTL && iscraft!=1) || j==DDRAY);
-       cdam[l] = j;
-       extradm = (hit*damfac)/(ncrit*(75.0+25.0*Rand()));
-       game.damage[j] += extradm;
-       if (l > 0) {
-           for (ll=2; ll<=l && j != cdam[ll-1]; ll++) ;
-           if (ll<=l) continue;
-           ktr += 1;
-           if (ktr==3) skip(1);
-           proutn(" and ");
-       }
-       proutn(device[j]);
-    }
-    prout(" damaged.");
-    if (game.damage[DSHIELD] && shldup) {
-       prout("***Shields knocked down.");
-       shldup=0;
-    }
-}
-
-void attack(int torps_ok) 
-{
-    /* torps_ok == 0 forces use of phasers in an attack */
-    int percent, ihurt=0, l, i=0, jx, jy, iquad, itflag;
-    int atackd = 0, attempt = 0;
-    double hit;
-    double pfac, dustfac, hitmax=0.0, hittot=0.0, chgfac=1.0, r;
-
-    iattak = 1;
-    if (alldone) return;
-#ifdef DEBUG
-    if (idebug) prout("ATTACK!");
-#endif
-
-    if (ithere) movetho();
-
-    if (neutz) { /* The one chance not to be attacked */
-       neutz = 0;
-       return;
-    }
-    if ((((comhere || ishere) && (justin == 0)) || skill == SKILL_EMERITUS)&&(torps_ok!=0)) movcom();
-    if (nenhere==0 || (nenhere==1 && iqhere && iqengry==0)) return;
-    pfac = 1.0/inshld;
-    if (shldchg == 1) chgfac = 0.25+0.5*Rand();
-    skip(1);
-    if (skill <= SKILL_FAIR) i = 2;
-    for_local_enemies(l) {
-       if (game.kpower[l] < 0) continue;       /* too weak to attack */
-       /* compute hit strength and diminsh shield power */
-       r = Rand();
-       /* Increase chance of photon torpedos if docked or enemy energy low */
-       if (condit == IHDOCKED) r *= 0.25;
-       if (game.kpower[l] < 500) r *= 0.25; 
-       jx = game.kx[l];
-       jy = game.ky[l];
-       iquad = game.quad[jx][jy];
-       if (iquad==IHT || (iquad==IHQUEST && !iqengry)) continue;
-       itflag = (iquad == IHK && r > 0.0005) || !torps_ok ||
-           (iquad==IHC && r > 0.015) ||
-           (iquad==IHR && r > 0.3) ||
-           (iquad==IHS && r > 0.07) ||
-           (iquad==IHQUEST && r > 0.05);
-       if (itflag) {
-           /* Enemy uses phasers */
-           if (condit == IHDOCKED) continue; /* Don't waste the effort! */
-           attempt = 1; /* Attempt to attack */
-           dustfac = 0.8+0.05*Rand();
-           hit = game.kpower[l]*pow(dustfac,game.kavgd[l]);
-           game.kpower[l] *= 0.75;
-       }
-       else { /* Enemy used photon torpedo */
-           double course = 1.90985*atan2((double)secty-jy, (double)jx-sectx);
-           hit = 0;
-           proutn("***TORPEDO INCOMING");
-           if (game.damage[DSRSENS] <= 0.0) {
-               proutn(" From ");
-               crmena(0, iquad, i, jx, jy);
-           }
-           attempt = 1;
-           prout("  ");
-           r = (Rand()+Rand())*0.5 -0.5;
-           r += 0.002*game.kpower[l]*r;
-           torpedo(course, r, jx, jy, &hit, 1, 1);
-           if (KLINGREM==0) 
-               finish(FWON); /* Klingons did themselves in! */
-           if (game.state.galaxy[quadx][quady].supernova || alldone) 
-               return; /* Supernova or finished */
-           if (hit == 0) continue;
-       }
-       if (shldup != 0 || shldchg != 0 || condit==IHDOCKED) {
-           /* shields will take hits */
-           double absorb, hitsh, propor = pfac*shield*(condit==IHDOCKED ? 2.1 : 1.0);
-           if(propor < 0.1) propor = 0.1;
-           hitsh = propor*chgfac*hit+1.0;
-           atackd=1;
-           absorb = 0.8*hitsh;
-           if (absorb > shield) absorb = shield;
-           shield -= absorb;
-           hit -= hitsh;
-           if (condit==IHDOCKED) dock(0);
-           if (propor > 0.1 && hit < 0.005*energy) continue;
-       }
-       /* It's a hit -- print out hit size */
-       atackd = 1; /* We weren't going to check casualties, etc. if
-                      shields were down for some strange reason. This
-                      doesn't make any sense, so I've fixed it */
-       ihurt = 1;
-       proutn("%d unit hit", (int)hit);
-       if ((game.damage[DSRSENS] > 0 && itflag) || skill<=SKILL_FAIR) {
-           proutn(" on the ");
-           crmshp();
-       }
-       if (game.damage[DSRSENS] <= 0.0 && itflag) {
-           proutn(" from ");
-           crmena(0, iquad, i, jx, jy);
-       }
-       skip(1);
-       /* Decide if hit is critical */
-       if (hit > hitmax) hitmax = hit;
-       hittot += hit;
-       fry(hit);
-       prout("Hit %g energy %g", hit, energy);
-       energy -= hit;
-       if (condit==IHDOCKED) 
-           dock(0);
-    }
-    if (energy <= 0) {
-       /* Returning home upon your shield, not with it... */
-       finish(FBATTLE);
-       return;
-    }
-    if (attempt == 0 && condit == IHDOCKED)
-       prout("***Enemies decide against attacking your ship.");
-    if (atackd == 0) return;
-    percent = 100.0*pfac*shield+0.5;
-    if (ihurt==0) {
-       /* Shields fully protect ship */
-       proutn("Enemy attack reduces shield strength to ");
-    }
-    else {
-       /* Print message if starship suffered hit(s) */
-       skip(1);
-       proutn("Energy left %2d    shields ", (int)energy);
-       if (shldup) proutn("up ");
-       else if (game.damage[DSHIELD] == 0) proutn("down ");
-       else proutn("damaged, ");
-    }
-    prout("%d%%,   torpedoes left %d", percent, torps);
-    /* Check if anyone was hurt */
-    if (hitmax >= 200 || hittot >= 500) {
-       int icas= hittot*Rand()*0.015;
-       if (icas >= 2) {
-           skip(1);
-           prout("Mc Coy-  \"Sickbay to bridge.  We suffered %d casualties", icas);
-           prout("   in that last attack.\"");
-           casual += icas;
-       }
-    }
-    /* After attack, reset average distance to enemies */
-    for_local_enemies(l)
-       game.kavgd[l] = game.kdist[l];
-    sortkl();
-    return;
-}
-               
-void deadkl(int ix, int iy, int type, int ixx, int iyy) 
-{
-    /* Added ixx and iyy allow enemy to "move" before dying */
-
-    int i,j;
-
-    skip(1);
-    crmena(1, type, 2, ixx, iyy);
-    /* Decide what kind of enemy it is and update approriately */
-    if (type == IHR) {
-       /* chalk up a Romulan */
-       game.state.galaxy[quadx][quady].romulans--;
-       irhere--;
-       game.state.nromrem--;
-    }
-    else if (type == IHT) {
-       /* Killed a Tholian */
-       ithere = 0;
-    }
-    else if (type == IHQUEST) {
-       /* Killed a Thingy */
-       iqhere=iqengry=thingx=thingy=0;
-    }
-    else {
-       /* Some type of a Klingon */
-       game.state.galaxy[quadx][quady].klingons--;
-       klhere--;
-       switch (type) {
-       case IHC:
-           comhere = 0;
-           for_commanders (i)
-               if (game.state.cx[i]==quadx && game.state.cy[i]==quady) break;
-           game.state.cx[i] = game.state.cx[game.state.remcom];
-           game.state.cy[i] = game.state.cy[game.state.remcom];
-           game.state.cx[game.state.remcom] = 0;
-           game.state.cy[game.state.remcom] = 0;
-           game.state.remcom--;
-           game.future[FTBEAM] = FOREVER;
-           if (game.state.remcom != 0)
-               game.future[FTBEAM] = game.state.date + expran(1.0*incom/game.state.remcom);
-           break;
-       case IHK:
-           game.state.remkl--;
-           break;
-       case IHS:
-           game.state.nscrem--;
-           ishere = game.state.isx = game.state.isy = isatb = iscate = 0;
-           game.future[FSCMOVE] = game.future[FSCDBAS] = FOREVER;
-           break;
-       }
-    }
-
-    /* For each kind of enemy, finish message to player */
-    prout(" destroyed.");
-    game.quad[ix][iy] = IHDOT;
-    if (KLINGREM==0) return;
-
-    game.state.remtime = game.state.remres/(game.state.remkl + 4*game.state.remcom);
-
-    /* Remove enemy ship from arrays describing local conditions */
-    if (game.future[FCDBAS] < FOREVER && batx==quadx && baty==quady && type==IHC)
-       game.future[FCDBAS] = FOREVER;
-    for_local_enemies(i)
-       if (game.kx[i]==ix && game.ky[i]==iy) break;
-    nenhere--;
-    if (i <= nenhere)  {
-       for (j=i; j<=nenhere; j++) {
-           game.kx[j] = game.kx[j+1];
-           game.ky[j] = game.ky[j+1];
-           game.kpower[j] = game.kpower[j+1];
-           game.kavgd[j] = game.kdist[j] = game.kdist[j+1];
-       }
-    }
-    game.kx[nenhere+1] = 0;
-    game.ky[nenhere+1] = 0;
-    game.kdist[nenhere+1] = 0;
-    game.kavgd[nenhere+1] = 0;
-    game.kpower[nenhere+1] = 0;
-    return;
-}
-
-static int targetcheck(double x, double y, double *course) 
-{
-    double deltx, delty;
-    /* Return TRUE if target is invalid */
-    if (!VALID_SECTOR(x, y)) {
-       huh();
-       return 1;
-    }
-    deltx = 0.1*(y - secty);
-    delty = 0.1*(sectx - x);
-    if (deltx==0 && delty== 0) {
-       skip(1);
-       prout("Spock-  \"Bridge to sickbay.  Dr. McCoy,");
-       prout("  I recommend an immediate review of");
-       prout("  the Captain's psychological profile.\"");
-       chew();
-       return 1;
-    }
-    *course = 1.90985932*atan2(deltx, delty);
-    return 0;
-}
-
-void photon(void) 
-{
-    double targ[4][3], course[4];
-    double r, dummy;
-    int key, n, i, osuabor;
-
-    ididit = 0;
-
-    if (game.damage[DPHOTON]) {
-       prout("Photon tubes damaged.");
-       chew();
-       return;
-    }
-    if (torps == 0) {
-       prout("No torpedoes left.");
-       chew();
-       return;
-    }
-    key = scan();
-    for (;;) {
-       if (key == IHALPHA) {
-           huh();
-           return;
-       }
-       else if (key == IHEOL) {
-           prout("%d torpedoes left.", torps);
-           proutn("Number of torpedoes to fire- ");
-           key = scan();
-       }
-       else /* key == IHREAL */ {
-           n = aaitem + 0.5;
-           if (n <= 0) { /* abort command */
-               chew();
-               return;
-           }
-           if (n > 3) {
-               chew();
-               prout("Maximum of 3 torpedoes per burst.");
-               key = IHEOL;
-               return;
-           }
-           if (n <= torps) break;
-           chew();
-           key = IHEOL;
-       }
-    }
-    for (i = 1; i <= n; i++) {
-       key = scan();
-       if (i==1 && key == IHEOL) {
-           break;      /* we will try prompting */
-       }
-       if (i==2 && key == IHEOL) {
-           /* direct all torpedoes at one target */
-           while (i <= n) {
-               targ[i][1] = targ[1][1];
-               targ[i][2] = targ[1][2];
-               course[i] = course[1];
-               i++;
-           }
-           break;
-       }
-       if (key != IHREAL) {
-           huh();
-           return;
-       }
-       targ[i][1] = aaitem;
-       key = scan();
-       if (key != IHREAL) {
-           huh();
-           return;
-       }
-       targ[i][2] = aaitem;
-       if (targetcheck(targ[i][1], targ[i][2], &course[i])) return;
-    }
-    chew();
-    if (i == 1 && key == IHEOL) {
-       /* prompt for each one */
-       for (i = 1; i <= n; i++) {
-           proutn("Target sector for torpedo number %d- ", i);
-           key = scan();
-           if (key != IHREAL) {
-               huh();
-               return;
-           }
-           targ[i][1] = aaitem;
-           key = scan();
-           if (key != IHREAL) {
-               huh();
-               return;
-           }
-           targ[i][2] = aaitem;
-           chew();
-           if (targetcheck(targ[i][1], targ[i][2], &course[i])) return;
-       }
-    }
-    ididit = 1;
-    /* Loop for moving <n> torpedoes */
-    osuabor = 0;
-    for (i = 1; i <= n && !osuabor; i++) {
-       if (condit != IHDOCKED) torps--;
-       r = (Rand()+Rand())*0.5 -0.5;
-       if (fabs(r) >= 0.47) {
-           /* misfire! */
-           r = (Rand()+1.2) * r;
-           if (n>1) {
-               prouts("***TORPEDO NUMBER %d MISFIRES", i);
-           }
-           else prouts("***TORPEDO MISFIRES.");
-           skip(1);
-           if (i < n)
-               prout("  Remainder of burst aborted.");
-           osuabor=1;
-           if (Rand() <= 0.2) {
-               prout("***Photon tubes damaged by misfire.");
-               game.damage[DPHOTON] = damfac*(1.0+2.0*Rand());
-               break;
-           }
-       }
-       if (shldup || condit == IHDOCKED) 
-           r *= 1.0 + 0.0001*shield;
-       torpedo(course[i], r, sectx, secty, &dummy, i, n);
-       if (alldone || game.state.galaxy[quadx][quady].supernova)
-           return;
-    }
-    if (KLINGREM==0) finish(FWON);
-}
-
-       
-
-static void overheat(double rpow) 
-{
-    if (rpow > 1500) {
-       double chekbrn = (rpow-1500.)*0.00038;
-       if (Rand() <= chekbrn) {
-           prout("Weapons officer Sulu-  \"Phasers overheated, sir.\"");
-           game.damage[DPHASER] = damfac*(1.0 + Rand()) * (1.0+chekbrn);
-       }
-    }
-}
-
-static int checkshctrl(double rpow) 
-{
-    double hit;
-    int icas;
-       
-    skip(1);
-    if (Rand() < .998) {
-       prout("Shields lowered.");
-       return 0;
-    }
-    /* Something bad has happened */
-    prouts("***RED ALERT!  RED ALERT!");
-    skip(2);
-    hit = rpow*shield/inshld;
-    energy -= rpow+hit*0.8;
-    shield -= hit*0.2;
-    if (energy <= 0.0) {
-       prouts("Sulu-  \"Captain! Shield malf***********************\"");
-       skip(1);
-       stars();
-       finish(FPHASER);
-       return 1;
-    }
-    prouts("Sulu-  \"Captain! Shield malfunction! Phaser fire contained!\"");
-    skip(2);
-    prout("Lt. Uhura-  \"Sir, all decks reporting damage.\"");
-    icas = hit*Rand()*0.012;
-    skip(1);
-    fry(0.8*hit);
-    if (icas) {
-       skip(1);
-       prout("McCoy to bridge- \"Severe radiation burns, Jim.");
-       prout("  %d casualties so far.\"", icas);
-       casual -= icas;
-    }
-    skip(1);
-    prout("Phaser energy dispersed by shields.");
-    prout("Enemy unaffected.");
-    overheat(rpow);
-    return 1;
-}
-       
-
-void phasers(void) 
-{
-    double hits[21], rpow=0, extra, powrem, over, temp;
-    int kz = 0, k=1, i, irec=0; /* Cheating inhibitor */
-    int ifast=0, no=0, ipoop=1, msgflag = 1;
-    enum {NOTSET, MANUAL, FORCEMAN, AUTOMATIC} automode = NOTSET;
-    int key=0;
-
-    skip(1);
-    /* SR sensors and Computer */
-    if (game.damage[DSRSENS]+game.damage[DCOMPTR] > 0) ipoop = 0;
-    if (condit == IHDOCKED) {
-       prout("Phasers can't be fired through base shields.");
-       chew();
-       return;
-    }
-    if (game.damage[DPHASER] != 0) {
-       prout("Phaser control damaged.");
-       chew();
-       return;
-    }
-    if (shldup) {
-       if (game.damage[DSHCTRL]) {
-           prout("High speed shield control damaged.");
-           chew();
-           return;
-       }
-       if (energy <= 200.0) {
-           prout("Insufficient energy to activate high-speed shield control.");
-           chew();
-           return;
-       }
-       prout("Weapons Officer Sulu-  \"High-speed shield control enabled, sir.\"");
-       ifast = 1;
-               
-    }
-    /* Original code so convoluted, I re-did it all */
-    while (automode==NOTSET) {
-       key=scan();
-       if (key == IHALPHA) {
-           if (isit("manual")) {
-               if (nenhere==0) {
-                   prout("There is no enemy present to select.");
-                   chew();
-                   key = IHEOL;
-                   automode=AUTOMATIC;
-               }
-               else {
-                   automode = MANUAL;
-                   key = scan();
-               }
-           }
-           else if (isit("automatic")) {
-               if ((!ipoop) && nenhere != 0) {
-                   automode = FORCEMAN;
-               }
-               else {
-                   if (nenhere==0)
-                       prout("Energy will be expended into space.");
-                   automode = AUTOMATIC;
-                   key = scan();
-               }
-           }
-           else if (isit("no")) {
-               no = 1;
-           }
-           else {
-               huh();
-               return;
-           }
-       }
-       else if (key == IHREAL) {
-           if (nenhere==0) {
-               prout("Energy will be expended into space.");
-               automode = AUTOMATIC;
-           }
-           else if (!ipoop)
-               automode = FORCEMAN;
-           else
-               automode = AUTOMATIC;
-       }
-       else {
-           /* IHEOL */
-           if (nenhere==0) {
-               prout("Energy will be expended into space.");
-               automode = AUTOMATIC;
-           }
-           else if (!ipoop)
-               automode = FORCEMAN;
-           else 
-               proutn("Manual or automatic? ");
-       }
-    }
-                               
-    switch (automode) {
-    case AUTOMATIC:
-       if (key == IHALPHA && isit("no")) {
-           no = 1;
-           key = scan();
-       }
-       if (key != IHREAL && nenhere != 0) {
-           prout("Phasers locked on target. Energy available: %.2f",
-                 ifast?energy-200.0:energy,1,2);
-       }
-       irec=0;
-       do {
-           chew();
-           if (!kz) for_local_enemies(i)
-               irec+=fabs(game.kpower[i])/(PHASEFAC*pow(0.90,game.kdist[i]))*
-                   (1.01+0.05*Rand()) + 1.0;
-           kz=1;
-           proutn("(%d) units required. ", irec);
-           chew();
-           proutn("Units to fire= ");
-           key = scan();
-           if (key!=IHREAL) return;
-           rpow = aaitem;
-           if (rpow > (ifast?energy-200:energy)) {
-               proutn("Energy available= %.2f",
-                      ifast?energy-200:energy);
-               skip(1);
-               key = IHEOL;
-           }
-       } while (rpow > (ifast?energy-200:energy));
-       if (rpow<=0) {
-           /* chicken out */
-           chew();
-           return;
-       }
-       if ((key=scan()) == IHALPHA && isit("no")) {
-           no = 1;
-       }
-       if (ifast) {
-           energy -= 200; /* Go and do it! */
-           if (checkshctrl(rpow)) return;
-       }
-       chew();
-       energy -= rpow;
-       extra = rpow;
-       if (nenhere) {
-           extra = 0.0;
-           powrem = rpow;
-           for_local_enemies(i) {
-               hits[i] = 0.0;
-               if (powrem <= 0) continue;
-               hits[i] = fabs(game.kpower[i])/(PHASEFAC*pow(0.90,game.kdist[i]));
-               over = (0.01 + 0.05*Rand())*hits[i];
-               temp = powrem;
-               powrem -= hits[i] + over;
-               if (powrem <= 0 && temp < hits[i]) hits[i] = temp;
-               if (powrem <= 0) over = 0.0;
-               extra += over;
-           }
-           if (powrem > 0.0) extra += powrem;
-           hittem(hits);
-           ididit=1;
-       }
-       if (extra > 0 && alldone == 0) {
-           if (ithere) {
-               proutn("*** Tholian web absorbs ");
-               if (nenhere>0) proutn("excess ");
-               prout("phaser energy.");
-           }
-           else {
-               prout("%d expended on empty space.", (int)extra);
-           }
-       }
-       break;
-
-    case FORCEMAN:
-       chew();
-       key = IHEOL;
-       if (game.damage[DCOMPTR]!=0)
-           prout("Battle comuter damaged, manual file only.");
-       else {
-           skip(1);
-           prouts("---WORKING---");
-           skip(1);
-           prout("Short-range-sensors-damaged");
-           prout("Insufficient-data-for-automatic-phaser-fire");
-           prout("Manual-fire-must-be-used");
-           skip(1);
-       }
-    case MANUAL:
-       rpow = 0.0;
-       for (k = 1; k <= nenhere;) {
-           int ii = game.kx[k], jj = game.ky[k];
-           int ienm = game.quad[ii][jj];
-           if (msgflag) {
-               proutn("Energy available= %.2f",
-                      energy-.006-(ifast?200:0));
-               skip(1);
-               msgflag = 0;
-               rpow = 0.0;
-           }
-           if (game.damage[DSRSENS] && !(abs(sectx-ii) < 2 && abs(secty-jj) < 2) &&
-               (ienm == IHC || ienm == IHS)) {
-               cramen(ienm);
-               prout(" can't be located without short range scan.");
-               chew();
-               key = IHEOL;
-               hits[k] = 0; /* prevent overflow -- thanks to Alexei Voitenko */
-               k++;
-               continue;
-           }
-           if (key == IHEOL) {
-               chew();
-               if (ipoop && k > kz)
-                   irec=(fabs(game.kpower[k])/(PHASEFAC*pow(0.9,game.kdist[k])))*
-                       (1.01+0.05*Rand()) + 1.0;
-               kz = k;
-               proutn("(");
-               if (game.damage[DCOMPTR]==0) proutn("%d", irec);
-               else proutn("??");
-               proutn(")  ");
-               proutn("units to fire at ");
-               crmena(0, ienm, 2, ii, jj);
-               proutn("-  ");
-               key = scan();
-           }
-           if (key == IHALPHA && isit("no")) {
-               no = 1;
-               key = scan();
-               continue;
-           }
-           if (key == IHALPHA) {
-               huh();
-               return;
-           }
-           if (key == IHEOL) {
-               if (k==1) { /* Let me say I'm baffled by this */
-                   msgflag = 1;
-               }
-               continue;
-           }
-           if (aaitem < 0) {
-               /* abort out */
-               chew();
-               return;
-           }
-           hits[k] = aaitem;
-           rpow += aaitem;
-           /* If total requested is too much, inform and start over */
-                               
-           if (rpow > (ifast?energy-200:energy)) {
-               prout("Available energy exceeded -- try again.");
-               chew();
-               return;
-           }
-           key = scan(); /* scan for next value */
-           k++;
-       }
-       if (rpow == 0.0) {
-           /* zero energy -- abort */
-           chew();
-           return;
-       }
-       if (key == IHALPHA && isit("no")) {
-           no = 1;
-       }
-       energy -= rpow;
-       chew();
-       if (ifast) {
-           energy -= 200.0;
-           if (checkshctrl(rpow)) return;
-       }
-       hittem(hits);
-       ididit=1;
-    case NOTSET:;      /* avoid gcc warning */
-    }
-    /* Say shield raised or malfunction, if necessary */
-    if (alldone) 
-       return;
-    if (ifast) {
-       skip(1);
-       if (no == 0) {
-           if (Rand() >= 0.99) {
-               prout("Sulu-  \"Sir, the high-speed shield control has malfunctioned . . .");
-               prouts("         CLICK   CLICK   POP  . . .");
-               prout(" No  response, sir!");
-               shldup = 0;
-           }
-           else
-               prout("Shields raised.");
-       }
-       else
-           shldup = 0;
-    }
-    overheat(rpow);
-}
-
-void hittem(double *hits) 
-{
-    double kp, kpow, wham, hit, dustfac, kpini;
-    int nenhr2=nenhere, k=1, kk=1, ii, jj, ienm;
-
-    skip(1);
-
-    for (; k <= nenhr2; k++, kk++) {
-       if ((wham = hits[k])==0) continue;
-       dustfac = 0.9 + 0.01*Rand();
-       hit = wham*pow(dustfac,game.kdist[kk]);
-       kpini = game.kpower[kk];
-       kp = fabs(kpini);
-       if (PHASEFAC*hit < kp) kp = PHASEFAC*hit;
-       game.kpower[kk] -= (game.kpower[kk] < 0 ? -kp: kp);
-       kpow = game.kpower[kk];
-       ii = game.kx[kk];
-       jj = game.ky[kk];
-       if (hit > 0.005) {
-           if (game.damage[DSRSENS]==0)
-               boom(ii, jj);
-           proutn("%d unit hit on ", (int)hit);
-       }
-       else
-           proutn("Very small hit on ");
-       ienm = game.quad[ii][jj];
-       if (ienm==IHQUEST) iqengry=1;
-       crmena(0,ienm,2,ii,jj);
-       skip(1);
-       if (kpow == 0) {
-           deadkl(ii, jj, ienm, ii, jj);
-           if (KLINGREM==0) finish(FWON);
-           if (alldone) return;
-           kk--; /* don't do the increment */
-       }
-       else /* decide whether or not to emasculate klingon */
-           if (kpow > 0 && Rand() >= 0.9 &&
-               kpow <= ((0.4 + 0.4*Rand())*kpini)) {
-               prout("***Mr. Spock-  \"Captain, the vessel at ",
-                     cramlc(sector,ii,jj));
-               prout("   has just lost its firepower.\"");
-               game.kpower[kk] = -kpow;
-           }
-    }
-    return;
-}
-
diff --git a/compile b/compile
new file mode 100755 (executable)
index 0000000..1b1d232
--- /dev/null
+++ b/compile
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we strip `-o arg' only if arg is an object.
+       eat=1
+       case $2 in
+         *.o | *.obj)
+           ofile=$2
+           ;;
+         *)
+           set x "$@" -o "$2"
+           shift
+           ;;
+       esac
+       ;;
+      *.c)
+       cfile=$1
+       set x "$@" "$1"
+       shift
+       ;;
+      *)
+       set x "$@" "$1"
+       shift
+       ;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config.guess b/config.guess
new file mode 100755 (executable)
index 0000000..917bbc5
--- /dev/null
@@ -0,0 +1,1463 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-07-08'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+       for c in cc gcc c89 c99 ; do
+         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       case "${UNAME_MACHINE_ARCH}" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep __ELF__ >/dev/null
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "${UNAME_VERSION}" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
+       exit ;;
+    *:OpenBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    alpha:OSF1:*:*)
+       case $UNAME_RELEASE in
+       *4.0)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE="alpha" ;;
+           "EV5 (21164)")
+               UNAME_MACHINE="alphaev5" ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE="alphaev56" ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE="alphapca56" ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE="alphapca57" ;;
+           "EV6 (21264)")
+               UNAME_MACHINE="alphaev6" ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE="alphaev67" ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE="alphaev69" ;;
+           "EV7 (21364)")
+               UNAME_MACHINE="alphaev7" ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE="alphaev79" ;;
+       esac
+       # A Pn.n version is a patched version.
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7; exit ;;
+       esac ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    i86pc:SunOS:5.*:*)
+       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c &&
+         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`$dummy $dummyarg` &&
+           { echo "$SYSTEM_NAME"; exit; }
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+           else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
+       else
+           echo i586-dg-dgux${UNAME_RELEASE}
+       fi
+       exit ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
+               sed 's/^                //' << EOF >$dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit ;;
+    *:AIX:*:[45])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit ;;
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+               {
+               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+               case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+                   switch (bits)
+                       {
+                       case 64: puts ("hppa2.0w"); break;
+                       case 32: puts ("hppa2.0n"); break;
+                       default: puts ("hppa2.0"); break;
+                       } break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+                   puts ("hppa2.0"); break;
+              #endif
+               default: puts ("hppa1.0"); break;
+               }
+                  exit (0);
+              }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ ${HP_ARCH} = "hppa2.0w" ]
+       then
+           eval $set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep __LP64__ >/dev/null
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit ;;
+    3050*:HI-UX:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+               { echo "$SYSTEM_NAME"; exit; }
+       echo unknown-hitachi-hiuxwe2
+       exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    *:UNICOS/mp:*:*)
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:FreeBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit ;;
+    i*:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit ;;
+    i*:windows32*:*)
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
+       exit ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit ;;
+    x86:Interix*:[34]*)
+       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+       exit ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i586-pc-interix
+       exit ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit ;;
+    amd64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit ;;
+    arm*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    mips:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips
+       #undef mipsel
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mipsel
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips64
+       #undef mips64el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mips64el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips64
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit ;;
+    i*86:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us. cd to the root directory to prevent
+       # problems with other programs or directories called `ld' in the path.
+       # Set LC_ALL=C to ensure ld outputs messages in English.
+       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+                        | sed -ne '/supported targets:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported targets: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_targets" in
+         elf32-i386)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+               ;;
+         a.out-i386-linux)
+               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+               exit ;;
+         coff-i386)
+               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+               exit ;;
+         "")
+               # Either a pre-BFD a.out linker (linux-gnuoldld) or
+               # one that does not give us useful --help.
+               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+               exit ;;
+       esac
+       # Determine whether the default compiler is a.out or elf
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #ifdef __ELF__
+       # ifdef __GLIBC__
+       #  if __GLIBC__ >= 2
+       LIBC=gnu
+       #  else
+       LIBC=gnulibc1
+       #  endif
+       # else
+       LIBC=gnulibc1
+       # endif
+       #else
+       #ifdef __INTEL_COMPILER
+       LIBC=gnu
+       #else
+       LIBC=gnuaout
+       #endif
+       #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+       test x"${LIBC}" != x && {
+               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+               exit
+       }
+       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+       ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
+       echo i386-sequent-sysv4
+       exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit ;;
+    i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+       fi
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit ;;
+    i*86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+       echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+           *86) UNAME_PROCESSOR=i686 ;;
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = "x86"; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       exit ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+         ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit ;;
+    c34*)
+       echo c34-convex-bsd
+       exit ;;
+    c38*)
+       echo c38-convex-bsd
+       exit ;;
+    c4*)
+       echo c4-convex-bsd
+       exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.rpath b/config.rpath
new file mode 100755 (executable)
index 0000000..3f1bef3
--- /dev/null
@@ -0,0 +1,571 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+#   Copyright 1996-2005 Free Software Foundation, Inc.
+#   Taken from GNU libtool, 2001
+#   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+#   This file is free software; the Free Software Foundation gives
+#   unlimited permission to copy and/or distribute it, with or without
+#   modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+#    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+#    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+#   than 256 bytes, otherwise the compiler driver will dump core. The only
+#   known workaround is to choose shorter directory names for the build
+#   directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+  wl='-Wl,'
+else
+  case "$host_os" in
+    aix*)
+      wl='-Wl,'
+      ;;
+    darwin*)
+      case "$cc_basename" in
+        xlc*)
+          wl='-Wl,'
+          ;;
+      esac
+      ;;
+    mingw* | pw32* | os2*)
+      ;;
+    hpux9* | hpux10* | hpux11*)
+      wl='-Wl,'
+      ;;
+    irix5* | irix6* | nonstopux*)
+      wl='-Wl,'
+      ;;
+    newsos6)
+      ;;
+    linux*)
+      case $cc_basename in
+        icc* | ecc*)
+          wl='-Wl,'
+          ;;
+        pgcc | pgf77 | pgf90)
+          wl='-Wl,'
+          ;;
+        ccc*)
+          wl='-Wl,'
+          ;;
+        como)
+          wl='-lopt='
+          ;;
+      esac
+      ;;
+    osf3* | osf4* | osf5*)
+      wl='-Wl,'
+      ;;
+    sco3.2v5*)
+      ;;
+    solaris*)
+      wl='-Wl,'
+      ;;
+    sunos4*)
+      wl='-Qoption ld '
+      ;;
+    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+      wl='-Wl,'
+      ;;
+    sysv4*MP*)
+      ;;
+    unicos*)
+      wl='-Wl,'
+      ;;
+    uts4*)
+      ;;
+  esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+  case "$host_os" in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+        ld_shlibs=no
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we cannot use
+      # them.
+      ld_shlibs=no
+      ;;
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    cygwin* | mingw* | pw32*)
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    netbsd*)
+      ;;
+    solaris* | sysv5*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+        ld_shlibs=no
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    sunos4*)
+      hardcode_direct=yes
+      ;;
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+        :
+      else
+        ld_shlibs=no
+      fi
+      ;;
+  esac
+  if test "$ld_shlibs" = yes; then
+    # Unlike libtool, we use -rpath here, not --rpath, since the documented
+    # option of GNU ld is called -rpath, not --rpath.
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+  fi
+else
+  case "$host_os" in
+    aix3*)
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes; then
+        # Neither direct hardcoding nor static linking is supported with a
+        # broken collect2.
+        hardcode_direct=unsupported
+      fi
+      ;;
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+        # On IA64, the linker does run time linking by default, so we don't
+        # have to do anything special.
+        aix_use_runtimelinking=no
+      else
+        aix_use_runtimelinking=no
+        # Test if we are trying to use run time linking or normal
+        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+        # need to do runtime linking.
+        case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+          for ld_flag in $LDFLAGS; do
+            if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+              aix_use_runtimelinking=yes
+              break
+            fi
+          done
+        esac
+      fi
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      if test "$GCC" = yes; then
+        case $host_os in aix4.[012]|aix4.[012].*)
+          collect2name=`${CC} -print-prog-name=collect2`
+          if test -f "$collect2name" && \
+            strings "$collect2name" | grep resolve_lib_name >/dev/null
+          then
+            # We have reworked collect2
+            hardcode_direct=yes
+          else
+            # We have old collect2
+            hardcode_direct=unsupported
+            hardcode_minus_L=yes
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_libdir_separator=
+          fi
+        esac
+      fi
+      # Begin _LT_AC_SYS_LIBPATH_AIX.
+      echo 'int main () { return 0; }' > conftest.c
+      ${CC} ${LDFLAGS} conftest.c -o conftest
+      aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      if test -z "$aix_libpath"; then
+        aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+      fi
+      if test -z "$aix_libpath"; then
+        aix_libpath="/usr/lib:/lib"
+      fi
+      rm -f conftest.c conftest
+      # End _LT_AC_SYS_LIBPATH_AIX.
+      if test "$aix_use_runtimelinking" = yes; then
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+      else
+        if test "$host_cpu" = ia64; then
+          hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+        else
+          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        fi
+      fi
+      ;;
+    amigaos*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+    bsdi[45]*)
+      ;;
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      libext=lib
+      ;;
+    darwin* | rhapsody*)
+      hardcode_direct=no
+      if test "$GCC" = yes ; then
+        :
+      else
+        case "$cc_basename" in
+          xlc*)
+            ;;
+          *)
+            ld_shlibs=no
+            ;;
+        esac
+      fi
+      ;;
+    dgux*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      ;;
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+    freebsd2.2*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    freebsd2*)
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      ;;
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    hpux9*)
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      ;;
+    hpux10* | hpux11*)
+      if test "$with_gnu_ld" = no; then
+        case "$host_cpu" in
+          hppa*64*)
+            hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+            hardcode_libdir_separator=:
+            hardcode_direct=no
+            ;;
+          ia64*)
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_direct=no
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+          *)
+            hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+            hardcode_libdir_separator=:
+            hardcode_direct=yes
+            # hardcode_minus_L: Not really in the search PATH,
+            # but as the default location of the library.
+            hardcode_minus_L=yes
+            ;;
+        esac
+      fi
+      ;;
+    irix5* | irix6* | nonstopux*)
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    netbsd*)
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      ;;
+    newsos6)
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+    openbsd*)
+      hardcode_direct=yes
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      else
+        case "$host_os" in
+          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+            hardcode_libdir_flag_spec='-R$libdir'
+            ;;
+          *)
+            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+       &nbs