diff --git a/project/jni/application/lmarbles-1.0.8/AUTHORS b/project/jni/application/lmarbles-1.0.8/AUTHORS
new file mode 100644
index 000000000..15991edc3
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/AUTHORS
@@ -0,0 +1,6 @@
+Michael Speck
+
+**** Contributions ****
+
+Fix for input bug in Win32, a better installation
+system and memory leak fixes. - Lee Read
diff --git a/project/jni/application/lmarbles-1.0.8/COPYING b/project/jni/application/lmarbles-1.0.8/COPYING
new file mode 100644
index 000000000..c7aea1896
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/COPYING
@@ -0,0 +1,280 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
diff --git a/project/jni/application/lmarbles-1.0.8/ChangeLog b/project/jni/application/lmarbles-1.0.8/ChangeLog
new file mode 100644
index 000000000..26700d158
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/ChangeLog
@@ -0,0 +1,90 @@
+1.0.8:
+- added XDG desktop support (09/10/26 MS)
+- fixed configuration process (09/10/26 MS)
+- removed -Wall from CC arguments for better portability
+ (06/04/01 PM)
+
+1.0.7:
+- configure option --with-profile-path has been replaced with
+ autoconf option --localstatedir (04/06/14 M.S.)
+- data files will be installed to $datadir/lmarbles instead
+ of $datadir/games/lmarbles (04/06/14 M.S.)
+- replaced strlen with sizeof when building config path (04/06/09 M.S.)
+- renamed marbles.prfs to lmarbles.prfs in the Makefile (04/06/09 M.S.)
+- included header for NetBSD (03/09/30 H.F.)
+
+1.0.6:
+- renamed project to LMarbles (02/11/24 M.S.)
+- fixed security holes created by improper use of sprintf
+ (02/11/24 M.S.)
+
+1.0.5:
+- switched to SDL_mixer (02/08/10 L.R.)
+- bunch of memory leaks fixed (02/08/10 L.R.)
+- for Win32: (02/08/10 L.R.)
+ - edit bug fixed
+ - installation details added to README
+ - much improved installation system
+ - files are always opened in binary mode
+ - transparency bug fix
+
+1.0.4:
+- fixed a bug in the sound server that caused Marbles to crash
+ when exiting too fast (01/07/02 M.S.)
+- fixed a bug that caused Marbles to forget the last used profile
+ (01/07/02 M.S.)
+- fixed a bug in autoswitch which restarted the level when
+ the figure was completed with the last move (01/07/02 M.S.)
+- fixed a bug in restart routine that allowed selection of
+ a ghost marble (01/07/02 M.S.)
+
+1.0.3:
+- score is now properly modified (02/06/24 M.S.)
+- fixed a bug that caused an infinite loop when left-clicking
+ an empty tile directly after deselecting a marble (02/06/22 M.S.)
+- added a missing include at top of timer.c
+
+1.0.2
+-compileable for Win32 with MinGW
+-fixed more color keys
+-using gettimeofday() instead of ftime() for compatibility with FreeBSD
+
+1.0.1:
+-no crash when pressing move key when no marble is selected
+-configure option 'with-profile-path' named correctly
+-color key of marbles set correctly
+
+1.0:
+-moved config file to ~/.lgames/marbles.conf
+-rearranged the levelsets into one set with 32 levels
+where each level has now a move limit instead of a time
+limit (now you'll have time to think)
+-fixed some warnings
+-profile path is no longer hard-coded
+-profile directory is created if not existing
+-not 100% cputime consumed
+-ASCII option ( big-endian ) works again
+-man page properly installed
+
+010307:
+-minor bug fixes
+-added an 'experimental' levelset with a move limit instead of a time limit
+(tell me what you think of this!)
+-on a graphic a marble blinks
+-added manual page (thanks to Uwe Hermann)
+-fixed all '-Wall' warnings (thanks again)
+-script 'missing' is now executable (and again :)
+
+001211:
+-various difficulty levels (e.g. 'Training' with no time limit)
+-marbles move faster; in 'training mode' they can even be 'warped'
+-you can use your keyboard to move a marble
+-'save as ascii' configure option (for big-endian)
+-works with any bit depth (16 bits no longer hard-coded)
+
+001126:
+-various bug fixes (most important: chapters are opened properly, profile file
+included)
+
+001124:
+-initial public release
diff --git a/project/jni/application/lmarbles-1.0.8/INSTALL b/project/jni/application/lmarbles-1.0.8/INSTALL
new file mode 100644
index 000000000..02a4a0740
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/INSTALL
@@ -0,0 +1,167 @@
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+ The file `configure.in' is used to create `configure' by a program
+called `autoconf'. You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes a while. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 4. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on. Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+ CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+ If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
+
diff --git a/project/jni/application/lmarbles-1.0.8/LMarbles.prj b/project/jni/application/lmarbles-1.0.8/LMarbles.prj
new file mode 100644
index 000000000..e7370dc69
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/LMarbles.prj
@@ -0,0 +1,114 @@
+# Anjuta Version 0.1.8
+Compatibility Level: 1
+
+
+An Atomix-like puzzle game.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+props.file.type=project
+
+anjuta.version=0.1.8
+anjuta.compatibility.level=1
+
+project.name=LMarbles
+project.type=GENERIC
+project.target.type=EXECUTABLE
+project.version=1.0
+project.author=Michael Speck
+project.source.target=lmarbles
+
+project.has.gettext=0
+
+project.programming.language=C
+
+project.menu.entry=Marbles Version 0.1
+project.menu.group=Applications
+project.menu.comment=Marbles Version 0.1
+project.menu.icon=marbles_icon.(null)
+project.menu.need.terminal=0
+
+project.configure.options=
+
+anjuta.program.arguments=
+
+project.config.disable.overwriting=0 0 0 0 0 0 0 0 0
+project.config.extra.modules.before=
+project.config.extra.modules.after=
+
+module.incude.name=include
+module.incude.type=
+module.incude.expanded=0
+module.incude.files=
+
+module.source.name=src
+module.source.type=
+module.source.expanded=0
+module.source.files=\
+ dynlist.c dynlist.h sndsrv.c sndsrv.h menu.h menu.c sdl.c \
+ sdl.h cfg.h cfg.c levels.h levels.c game.h game.c timer.h timer.c \
+ profile.h profile.c file.h file.c \
+ main.c
+
+module.pixmap.name=pixmaps
+module.pixmap.type=
+module.pixmap.expanded=0
+module.pixmap.files=
+
+module.data.name=data
+module.data.type=
+module.data.expanded=0
+module.data.files=
+
+module.help.name=help
+module.help.type=
+module.help.expanded=0
+module.help.files=
+
+module.doc.name=doc
+module.doc.type=
+module.doc.expanded=0
+module.doc.files=
+
+module.po.expanded=0
+module.po.files=
+
+compiler.options.supports=
+
+compiler.options.include.paths=
+
+compiler.options.library.paths=
+
+compiler.options.libraries=
+compiler.options.libraries.selected=
+
+compiler.options.defines=
+
+compiler.options.warning.buttons=0 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1
+
+compiler.options.optimize.buttons=0 1 0 0
+
+compiler.options.other.buttons=1 0
+
+compiler.options.other.c.flags=
+
+compiler.options.other.l.flags=
+
+compiler.options.other.l.libs=
+
+project.source.paths=
+
diff --git a/project/jni/application/lmarbles-1.0.8/Makefile.am b/project/jni/application/lmarbles-1.0.8/Makefile.am
new file mode 100644
index 000000000..e62182ec4
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/Makefile.am
@@ -0,0 +1,75 @@
+SUBDIRS = src
+
+EXTRA_DIST = lmarbles.spec AUTHORS COPYING ChangeLog INSTALL README \
+README-SDL.txt TODO LMarbles.prj lmarbles32.gif lmarbles48.gif \
+lmarbles.desktop.in
+
+desktopdir = $(datadir)/applications
+desktop_DATA = lmarbles.desktop
+icondir = $(datadir)/icons
+icon_DATA = lmarbles48.gif
+
+AUTOMAKE_OPTIONS = foreign
+
+WIN32_TEXT = AUTHORS COPYING ChangeLog INSTALL README README-SDL.txt TODO marbles.spec
+WIN32_LOCAL_DLL = SDL.dll SDL_mixer.dll
+WIN32_SYS_DLL = msvcrt.dll
+
+lmarbles.desktop:
+ @sed -e "s+Icon=+Icon=$(datadir)/icons/lmarbles48.gif+" \
+ < lmarbles.desktop.in > lmarbles.desktop
+
+win32text: $(WIN32_TEXT)
+ @echo Converting text files for win32 installer
+ @-rm -rf ./win32text
+ @mkdir ./win32text
+ @for textfile in $(WIN32_TEXT); do \
+ $(AWK) '{printf "%s\r\n",$$0}' $$textfile > ./win32text/$$textfile ; \
+ done
+
+win32-installer-script: @win32_inst_script@
+
+@win32_inst_script@: win32text
+ @echo Generating win32 installer script
+ @echo "[Setup]" > $@
+ @echo "AppName=@appname@" >> $@
+ @echo "AppVerName=@appname@ $(VERSION)" >> $@
+ @echo "AppPublisher=Michael Speck" >> $@
+ @echo "AppPublisherURL=http://lgames.sourceforge.net/index.php?project=@appname@" >> $@
+ @echo "AppSupportURL=http://lgames.sourceforge.net/index.php?project=@appname@" >> $@
+ @echo "AppUpdatesURL=http://lgames.sourceforge.net/index.php?project=@appname@" >> $@
+ @echo "DefaultDirName={pf}\\$(PACKAGE)" >> $@
+ @echo "DefaultGroupName=@appname@" >> $@
+ @echo "OutputDir=." >> $@
+ @echo "Uninstallable=yes" >> $@
+ @echo "AlwaysCreateUninstallIcon=yes" >> $@
+ @echo "AdminPrivilegesRequired=1" >> $@
+ @echo "[Tasks]" >> $@
+ @echo "Name: \"desktopicon\"; Description: \"Create a &desktop icon\"; GroupDescription: \"Additional icons:\"" >> $@
+ @echo "[Files]" >> $@
+ @(cd win32dlls; for file in $(WIN32_LOCAL_DLL); do \
+ echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@; \
+ done)
+ @(cd win32dlls; for file in $(WIN32_SYS_DLL); do \
+ echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{sys}\"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall" >> $@; \
+ done)
+ @echo "Source: \"win32text\\*.*\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@;
+ @list='$(SUBDIRS)'; for subdir in $$list; do \
+ (cd $$subdir \
+ && $(MAKE) $(AM_MAKEFLAGS) win32-install-script); \
+ done
+ @echo "[Icons]" >> $@
+ @echo "Name: \"{group}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"" >> $@
+ @echo "Name: \"{group}\\@appname@ Manual\"; Filename: \"{app}\\manual\\manual.html\"" >> $@
+ @echo "Name: \"{userdesktop}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"; Tasks: \"desktopicon\"" >> $@
+ @echo "[Run]" >> $@
+ @echo "Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; Description: \"Launch @appname@\"; Flags: nowait postinstall skipifsilent" >> $@
+
+ @$(AWK) '{printf "%s\r\n",$$0}' $@ > marbles.iss.w32
+ @mv marbles.iss.w32 $@
+
+win32-installer: win32-installer-script
+ $(ISCC) installer.iss
+ @-rm -rf win32text
+ @mv setup.exe $(PACKAGE)-$(VERSION)-win32.exe
+ @echo Self installer created: $(PACKAGE)-$(VERSION)-win32.exe
diff --git a/project/jni/application/lmarbles-1.0.8/Makefile.in b/project/jni/application/lmarbles-1.0.8/Makefile.in
new file mode 100644
index 000000000..28fb44590
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/Makefile.in
@@ -0,0 +1,730 @@
+# 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@
+target_triplet = @target@
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+ TODO acconfig.h config.guess config.sub depcomp install-sh \
+ missing mkinstalldirs
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+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 = 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
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(icondir)"
+desktopDATA_INSTALL = $(INSTALL_DATA)
+iconDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(desktop_DATA) $(icon_DATA)
+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@
+GREP = @GREP@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+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@
+RANLIB = @RANLIB@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+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@
+appname = @appname@
+arch_flag = @arch_flag@
+ascii_flag = @ascii_flag@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+inst_dir = @inst_dir@
+inst_flag = @inst_flag@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mixer_flag = @mixer_flag@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+prf_dir = @prf_dir@
+prf_flag = @prf_flag@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sound_flag = @sound_flag@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+win32_deps = @win32_deps@
+win32_inst_script = @win32_inst_script@
+SUBDIRS = src
+EXTRA_DIST = lmarbles.spec AUTHORS COPYING ChangeLog INSTALL README \
+README-SDL.txt TODO LMarbles.prj lmarbles32.gif lmarbles48.gif \
+lmarbles.desktop.in
+
+desktopdir = $(datadir)/applications
+desktop_DATA = lmarbles.desktop
+icondir = $(datadir)/icons
+icon_DATA = lmarbles48.gif
+AUTOMAKE_OPTIONS = foreign
+WIN32_TEXT = AUTHORS COPYING ChangeLog INSTALL README README-SDL.txt TODO marbles.spec
+WIN32_LOCAL_DLL = SDL.dll SDL_mixer.dll
+WIN32_SYS_DLL = msvcrt.dll
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
+ cd $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign 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)
+
+config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
+ else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps) $(top_srcdir)/acconfig.h
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+uninstall-info-am:
+install-desktopDATA: $(desktop_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(desktopdir)" || $(mkdir_p) "$(DESTDIR)$(desktopdir)"
+ @list='$(desktop_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \
+ $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \
+ done
+
+uninstall-desktopDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(desktop_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(desktopdir)/$$f"; \
+ done
+install-iconDATA: $(icon_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(icondir)" || $(mkdir_p) "$(DESTDIR)$(icondir)"
+ @list='$(icon_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(iconDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(icondir)/$$f'"; \
+ $(iconDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(icondir)/$$f"; \
+ done
+
+uninstall-iconDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(icon_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(icondir)/$$f'"; \
+ rm -f "$(DESTDIR)$(icondir)/$$f"; \
+ done
+
+# 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) config.h.in $(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) config.h.in $(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) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(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)
+ @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 $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(icondir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+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 mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-desktopDATA install-iconDATA
+
+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
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-desktopDATA uninstall-iconDATA \
+ 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-recursive ctags \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
+ dist-tarZ dist-zip distcheck distclean distclean-generic \
+ distclean-hdr 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-desktopDATA install-exec \
+ install-exec-am install-iconDATA install-info install-info-am \
+ install-man install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-desktopDATA uninstall-iconDATA uninstall-info-am
+
+
+lmarbles.desktop:
+ @sed -e "s+Icon=+Icon=$(datadir)/icons/lmarbles48.gif+" \
+ < lmarbles.desktop.in > lmarbles.desktop
+
+win32text: $(WIN32_TEXT)
+ @echo Converting text files for win32 installer
+ @-rm -rf ./win32text
+ @mkdir ./win32text
+ @for textfile in $(WIN32_TEXT); do \
+ $(AWK) '{printf "%s\r\n",$$0}' $$textfile > ./win32text/$$textfile ; \
+ done
+
+win32-installer-script: @win32_inst_script@
+
+@win32_inst_script@: win32text
+ @echo Generating win32 installer script
+ @echo "[Setup]" > $@
+ @echo "AppName=@appname@" >> $@
+ @echo "AppVerName=@appname@ $(VERSION)" >> $@
+ @echo "AppPublisher=Michael Speck" >> $@
+ @echo "AppPublisherURL=http://lgames.sourceforge.net/index.php?project=@appname@" >> $@
+ @echo "AppSupportURL=http://lgames.sourceforge.net/index.php?project=@appname@" >> $@
+ @echo "AppUpdatesURL=http://lgames.sourceforge.net/index.php?project=@appname@" >> $@
+ @echo "DefaultDirName={pf}\\$(PACKAGE)" >> $@
+ @echo "DefaultGroupName=@appname@" >> $@
+ @echo "OutputDir=." >> $@
+ @echo "Uninstallable=yes" >> $@
+ @echo "AlwaysCreateUninstallIcon=yes" >> $@
+ @echo "AdminPrivilegesRequired=1" >> $@
+ @echo "[Tasks]" >> $@
+ @echo "Name: \"desktopicon\"; Description: \"Create a &desktop icon\"; GroupDescription: \"Additional icons:\"" >> $@
+ @echo "[Files]" >> $@
+ @(cd win32dlls; for file in $(WIN32_LOCAL_DLL); do \
+ echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@; \
+ done)
+ @(cd win32dlls; for file in $(WIN32_SYS_DLL); do \
+ echo "Source: \"`pwd -W`\\$$file\"; DestDir: \"{sys}\"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall" >> $@; \
+ done)
+ @echo "Source: \"win32text\\*.*\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@;
+ @list='$(SUBDIRS)'; for subdir in $$list; do \
+ (cd $$subdir \
+ && $(MAKE) $(AM_MAKEFLAGS) win32-install-script); \
+ done
+ @echo "[Icons]" >> $@
+ @echo "Name: \"{group}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"" >> $@
+ @echo "Name: \"{group}\\@appname@ Manual\"; Filename: \"{app}\\manual\\manual.html\"" >> $@
+ @echo "Name: \"{userdesktop}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"; Tasks: \"desktopicon\"" >> $@
+ @echo "[Run]" >> $@
+ @echo "Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; Description: \"Launch @appname@\"; Flags: nowait postinstall skipifsilent" >> $@
+
+ @$(AWK) '{printf "%s\r\n",$$0}' $@ > marbles.iss.w32
+ @mv marbles.iss.w32 $@
+
+win32-installer: win32-installer-script
+ $(ISCC) installer.iss
+ @-rm -rf win32text
+ @mv setup.exe $(PACKAGE)-$(VERSION)-win32.exe
+ @echo Self installer created: $(PACKAGE)-$(VERSION)-win32.exe
+# 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/project/jni/application/lmarbles-1.0.8/NEWS b/project/jni/application/lmarbles-1.0.8/NEWS
new file mode 100644
index 000000000..e69de29bb
diff --git a/project/jni/application/lmarbles-1.0.8/README b/project/jni/application/lmarbles-1.0.8/README
new file mode 100644
index 000000000..d8c49e896
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/README
@@ -0,0 +1,82 @@
+
+ LMarbles
+
+ an Atomix-like game
+ by Michael Speck
+
+********************
+I. Requirements
+II. Installation
+III. Manual
+IV. Feedback
+********************
+
+********************
+I. Requirements
+********************
+LMarbles runs in X and requires SDL and SDL_mixer. (both any version)
+
+********************
+II. Installation
+********************
+Enter your favorite shell and type in the following stuff (in the
+directory you extracted the LBreakout source)
+> ./configure [--disable-sound] [--disable-install] [--enable-ascii]
+ [--localstatedir=HIDIR]
+ --disable-sound: no sound
+ --disable-install: no installation; play from source directory
+ --enable-asci: for big-endian machines
+ --localstatedir: install global highscores to this directory
+ REPLACES --with-profile-path TO COMPLY
+ WITH AUTOCONF; THE DEFAULT LOCATION NOW
+ DEPENDS ON YOUR DISTRIBUTION: PREVIOUSLY
+ IT WAS /var/lib/games. USE
+ --localstatedir=/var/lib/games
+ FOR EXISTING HIGHSCORES.
+> make
+> su (become root)
+> make install (if install wasn't disabled)
+> exit (become user again)
+> lmarbles
+
+Building on Win32:
+ 1) Install the following win32 tools:
+ MinGW
+ MSYS
+ Inno Setup 2
+ 2) Install the following win32 libaries:
+ SDL (you might need to edit sdl-config)
+ SDL_mixer
+ 3) From the build root, create win32dll directory and copy the following
+ win32 dlls to it:
+ SDL.dll
+ SDL_mixer.dll
+ msvcrt.dll (freely available from Microsoft)
+ 4) configure will need to find SDL.dll. You can either register SDL.dll
+ or simply copy it to the root build directory.
+ 5) Setup environment. To get things to compile, I setup the following
+ environment variables:
+ SDL_CONFIG - fully qualified path to sdl-config
+ CFLAGS - tell build process where to find include files
+ LDFLAGS - tell build process where to find libraries
+ PATH - ensure that Inno Setup 2 iscc is in the PATH
+ 6) Do a full build by issueing the following commands:
+ configure --disable-install
+ make
+ 7) Create a win32 installer by issueing the following command:
+ make win32_installer
+
+ You'll find lmarbles--win32.exe in the build directory. It
+ is a standalone installer for marbles.
+
+********************
+III. Manual
+********************
+For more information about the game see src/manual/manual.html.
+
+********************
+IV. Feedback
+********************
+Please visit http://lgames.sf.net if you have any suggestions or
+problems.
+
diff --git a/project/jni/application/lmarbles-1.0.8/README-SDL.txt b/project/jni/application/lmarbles-1.0.8/README-SDL.txt
new file mode 100644
index 000000000..4d36ca9dc
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/README-SDL.txt
@@ -0,0 +1,13 @@
+
+Please distribute this file with the SDL runtime environment:
+
+The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library
+designed to make it easy to write multi-media software, such as games and
+emulators.
+
+The Simple DirectMedia Layer library source code is available from:
+http://www.libsdl.org/
+
+This library is distributed under the terms of the GNU LGPL license:
+http://www.gnu.org/copyleft/lesser.html
+
diff --git a/project/jni/application/lmarbles-1.0.8/TODO b/project/jni/application/lmarbles-1.0.8/TODO
new file mode 100644
index 000000000..ae497f35b
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/TODO
@@ -0,0 +1 @@
+mr.bones's suggestions
diff --git a/project/jni/application/lmarbles-1.0.8/acconfig.h b/project/jni/application/lmarbles-1.0.8/acconfig.h
new file mode 100644
index 000000000..caac01b14
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/acconfig.h
@@ -0,0 +1,13 @@
+#undef ENABLE_NLS
+#undef HAVE_CATGETS
+#undef HAVE_GETTEXT
+#undef HAVE_LC_MESSAGES
+#undef HAVE_STPCPY
+#undef HAVE_LIBSM
+#undef PACKAGE_LOCALE_DIR
+#undef PACKAGE_DOC_DIR
+#undef PACKAGE_DATA_DIR
+#undef PACKAGE_PIXMAPS_DIR
+#undef PACKAGE_HELP_DIR
+#undef PACKAGE_MENU_DIR
+#undef PACKAGE_SOURCE_DIR
diff --git a/project/jni/application/lmarbles-1.0.8/acinclude.m4 b/project/jni/application/lmarbles-1.0.8/acinclude.m4
new file mode 100644
index 000000000..ada3a4165
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/acinclude.m4
@@ -0,0 +1,175 @@
+# Configure paths for SDL
+# Sam Lantinga 9/21/99
+# stolen from Manish Singh
+# stolen back from Frank Belew
+# stolen from Manish Singh
+# Shamelessly stolen from Owen Taylor
+
+dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
+dnl
+AC_DEFUN([AM_PATH_SDL],
+[dnl
+dnl Get the cflags and libraries from the sdl-config script
+dnl
+AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
+ sdl_prefix="$withval", sdl_prefix="")
+AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
+ sdl_exec_prefix="$withval", sdl_exec_prefix="")
+AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
+ , enable_sdltest=yes)
+
+ if test x$sdl_exec_prefix != x ; then
+ sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
+ if test x${SDL_CONFIG+set} != xset ; then
+ SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
+ fi
+ fi
+ if test x$sdl_prefix != x ; then
+ sdl_args="$sdl_args --prefix=$sdl_prefix"
+ if test x${SDL_CONFIG+set} != xset ; then
+ SDL_CONFIG=$sdl_prefix/bin/sdl-config
+ fi
+ fi
+
+ AC_REQUIRE([AC_CANONICAL_TARGET])
+ PATH="$prefix/bin:$prefix/usr/bin:$PATH"
+ AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
+ min_sdl_version=ifelse([$1], ,0.11.0,$1)
+ AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
+ no_sdl=""
+ if test "$SDL_CONFIG" = "no" ; then
+ no_sdl=yes
+ else
+ SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
+ SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
+
+ sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_sdltest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"
+dnl
+dnl Now check if the installed SDL is sufficiently new. (Also sanity
+dnl checks the results of sdl-config to some extent
+dnl
+ rm -f conf.sdltest
+ AC_TRY_RUN([
+#include
+#include
+#include
+#include "SDL.h"
+
+char*
+my_strdup (char *str)
+{
+ char *new_str;
+
+ if (str)
+ {
+ new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
+ strcpy (new_str, str);
+ }
+ else
+ new_str = NULL;
+
+ return new_str;
+}
+
+int main (int argc, char *argv[])
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ /* This hangs on some systems (?)
+ system ("touch conf.sdltest");
+ */
+ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = my_strdup("$min_sdl_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_sdl_version");
+ exit(1);
+ }
+
+ if (($sdl_major_version > major) ||
+ (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
+ (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
+ printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
+ printf("*** best to upgrade to the required version.\n");
+ printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
+ printf("*** to point to the correct copy of sdl-config, and remove the file\n");
+ printf("*** config.cache before re-running configure\n");
+ return 1;
+ }
+}
+
+],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_sdl" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$SDL_CONFIG" = "no" ; then
+ echo "*** The sdl-config script installed by SDL could not be found"
+ echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the SDL_CONFIG environment variable to the"
+ echo "*** full path to sdl-config."
+ else
+ if test -f conf.sdltest ; then
+ :
+ else
+ echo "*** Could not run SDL test program, checking why..."
+ CFLAGS="$CFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"
+ AC_TRY_LINK([
+#include
+#include "SDL.h"
+
+int main(int argc, char *argv[])
+{ return 0; }
+#undef main
+#define main K_and_R_C_main
+], [ return 0; ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding SDL or finding the wrong"
+ echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means SDL was incorrectly installed"
+ echo "*** or that you have moved SDL since it was installed. In the latter case, you"
+ echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ SDL_CFLAGS=""
+ SDL_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(SDL_CFLAGS)
+ AC_SUBST(SDL_LIBS)
+ rm -f conf.sdltest
+])
diff --git a/project/jni/application/lmarbles-1.0.8/aclocal.m4 b/project/jni/application/lmarbles-1.0.8/aclocal.m4
new file mode 100644
index 000000000..dd92cb32b
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/aclocal.m4
@@ -0,0 +1,863 @@
+# 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 /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([acinclude.m4])
diff --git a/project/jni/application/lmarbles-1.0.8/config.guess b/project/jni/application/lmarbles-1.0.8/config.guess
new file mode 100755
index 000000000..dff9e481b
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/config.guess
@@ -0,0 +1,1317 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+
+timestamp='2001-09-04'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner .
+# Please send patches to .
+#
+# 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 ."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+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 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # 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
+
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int dummy(){}" > $dummy.c ;
+ for c in cc gcc c89 ; do
+ ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
+ if test $? = 0 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ rm -f $dummy.c $dummy.o $dummy.rel ;
+ 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'
+
+# 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.
+ # Determine the machine/vendor (is the vendor relevant).
+ case "${UNAME_MACHINE}" in
+ amiga) machine=m68k-unknown ;;
+ arm32) machine=arm-unknown ;;
+ atari*) machine=m68k-atari ;;
+ sun3*) machine=m68k-sun ;;
+ mac68k) machine=m68k-apple ;;
+ macppc) machine=powerpc-apple ;;
+ hp3[0-9][05]) machine=m68k-hp ;;
+ ibmrt|romp-ibm) machine=romp-ibm ;;
+ *) machine=${UNAME_MACHINE}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE}" in
+ i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+ 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
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # 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 0 ;;
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ cat <$dummy.s
+ .data
+\$Lformat:
+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
+
+ .text
+ .globl main
+ .align 4
+ .ent main
+main:
+ .frame \$30,16,\$26,0
+ ldgp \$29,0(\$27)
+ .prologue 1
+ .long 0x47e03d80 # implver \$0
+ lda \$2,-1
+ .long 0x47e20c21 # amask \$2,\$1
+ lda \$16,\$Lformat
+ mov \$0,\$17
+ not \$1,\$18
+ jsr \$26,printf
+ ldgp \$29,0(\$26)
+ mov 0,\$16
+ jsr \$26,exit
+ .end main
+EOF
+ eval $set_cc_for_build
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ case `./$dummy` in
+ 0-0)
+ UNAME_MACHINE="alpha"
+ ;;
+ 1-0)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 1-1)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 1-101)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 2-303)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ 2-307)
+ UNAME_MACHINE="alphaev67"
+ ;;
+ 2-1307)
+ UNAME_MACHINE="alphaev68"
+ ;;
+ esac
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ 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 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit 0;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ arc64:OpenBSD:*:*)
+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hkmips:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:NetBSD:*)
+ echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ # 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 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy \
+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $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 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ 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 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | 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 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ 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])
+ case "${HPUX_REV}" in
+ 11.[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" ;;
+ esac ;;
+ esac
+ fi ;;
+ esac
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include
+ #include
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+ rm -f $dummy.c $dummy
+ fi ;;
+ esac
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ hppa*:OpenBSD:*:*)
+ echo hppa-unknown-openbsd
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*X-MP:*:*:*)
+ echo xmp-cray-unicos
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3D:*:*:*)
+ echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY-2:*:*:*)
+ echo cray2-cray-unicos
+ exit 0 ;;
+ 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 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit 0 ;;
+ 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 i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit 0 ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux
+ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ mips:Linux:*:*)
+ case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
+ big) echo mips-unknown-linux-gnu && exit 0 ;;
+ little) echo mipsel-unknown-linux-gnu && exit 0 ;;
+ esac
+ ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit 0 ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit 0 ;;
+ 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 0 ;;
+ 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 0 ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit 0 ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit 0 ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit 0 ;;
+ 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.
+ ld_supported_targets=`cd /; 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 0 ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0 ;;
+ "")
+ # 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 0 ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ cat >$dummy.c <
+#ifdef __cplusplus
+#include /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+# if __GLIBC__ >= 2
+ printf ("%s-pc-linux-gnu\n", argv[1]);
+# else
+ printf ("%s-pc-linux-gnulibc1\n", argv[1]);
+# endif
+# else
+ printf ("%s-pc-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+ printf ("%s-pc-linux-gnuaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ ;;
+ 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 0 ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ 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 0 ;;
+ i*86:*:5:[78]*)
+ 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 0 ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
+ 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 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes .
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ 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 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Darwin:*:*)
+ echo `uname -p`-apple-darwin${UNAME_RELEASE}
+ exit 0 ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ if test "${UNAME_MACHINE}" = "x86pc"; then
+ UNAME_MACHINE=pc
+ fi
+ echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit 0 ;;
+ NSR-[KW]:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit 0 ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit 0 ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit 0 ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit 0 ;;
+ *: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 0 ;;
+ 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 0 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit 0 ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit 0 ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit 0 ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit 0 ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit 0 ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <
+# include
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+cat >&2 < in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/project/jni/application/lmarbles-1.0.8/config.h.in b/project/jni/application/lmarbles-1.0.8/config.h.in
new file mode 100644
index 000000000..129f38b7e
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/config.h.in
@@ -0,0 +1,101 @@
+/* config.h.in. Generated from configure.in by autoheader. */
+#undef ENABLE_NLS
+#undef HAVE_CATGETS
+#undef HAVE_GETTEXT
+#undef HAVE_LC_MESSAGES
+#undef HAVE_STPCPY
+#undef HAVE_LIBSM
+#undef PACKAGE_LOCALE_DIR
+#undef PACKAGE_DOC_DIR
+#undef PACKAGE_DATA_DIR
+#undef PACKAGE_PIXMAPS_DIR
+#undef PACKAGE_HELP_DIR
+#undef PACKAGE_MENU_DIR
+#undef PACKAGE_SOURCE_DIR
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_UNISTD_H
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Enable extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/config.sub b/project/jni/application/lmarbles-1.0.8/config.sub
new file mode 100755
index 000000000..393f13d37
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/config.sub
@@ -0,0 +1,1411 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+
+timestamp='2001-09-07'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to .
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+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 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit 0;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | c4x | clipper \
+ | d10v | d30v | dsp16xx \
+ | fr30 \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | m32r | m68000 | m68k | m88k | mcore \
+ | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el | mips64vr4300 \
+ | mips64vr4300el | mips64vr5000 | mips64vr5000el \
+ | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
+ | mipsisa32 \
+ | mn10200 | mn10300 \
+ | ns16k | ns32k \
+ | openrisc \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | s390 | s390x \
+ | sh | sh[34] | sh[34]eb | shbe | shle \
+ | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
+ | stormy16 | strongarm \
+ | tahoe | thumb | tic80 | tron \
+ | v850 \
+ | we32k \
+ | x86 | xscale \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alphapca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armv*-* \
+ | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c54x-* \
+ | clipper-* | cray2-* | cydra-* \
+ | d10v-* | d30v-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | m32r-* \
+ | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | mcore-* \
+ | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+ | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
+ | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | s390-* | s390x-* \
+ | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclite-* \
+ | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
+ | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+ | v850-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ cray2)
+ basic_machine=cray2-cray
+ os=-unicos
+ ;;
+ [cjt]90)
+ basic_machine=${basic_machine}-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mipsel*-linux*)
+ basic_machine=mipsel-unknown
+ os=-linux-gnu
+ ;;
+ mips*-linux*)
+ basic_machine=mips-unknown
+ os=-linux-gnu
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ mmix*)
+ basic_machine=mmix-knuth
+ os=-mmixware
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexgen)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2)
+ basic_machine=i686-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sparclite-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=t3e-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ windows32)
+ basic_machine=i386-pc
+ os=-windows32-msvcrt
+ ;;
+ xmp)
+ basic_machine=xmp-cray
+ os=-unicos
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ mips)
+ if [ x$os = x-linux-gnu ]; then
+ basic_machine=mips-unknown
+ else
+ basic_machine=mips-mips
+ fi
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh3 | sh4 | sh3eb | sh4eb)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv9 | sparcv9b)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ c4x*)
+ basic_machine=c4x-none
+ os=-coff
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto*)
+ os=-nto-qnx
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# 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/project/jni/application/lmarbles-1.0.8/configure b/project/jni/application/lmarbles-1.0.8/configure
new file mode 100755
index 000000000..543fb951e
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/configure
@@ -0,0 +1,7373 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 &1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="Makefile.am"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include
+#ifdef HAVE_SYS_TYPES_H
+# include
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include
+#endif
+#ifdef STDC_HEADERS
+# include
+# include
+#else
+# ifdef HAVE_STDLIB_H
+# include
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include
+# endif
+# include
+#endif
+#ifdef HAVE_STRINGS_H
+# include
+#endif
+#ifdef HAVE_INTTYPES_H
+# include
+#endif
+#ifdef HAVE_STDINT_H
+# include
+#endif
+#ifdef HAVE_UNISTD_H
+# include
+#endif"
+
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+target
+target_cpu
+target_vendor
+target_os
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+CPP
+GREP
+EGREP
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+AMTAR
+am__tar
+am__untar
+DEPDIR
+am__include
+am__quote
+AMDEP_TRUE
+AMDEP_FALSE
+AMDEPBACKSLASH
+CCDEPMODE
+am__fastdepCC_TRUE
+am__fastdepCC_FALSE
+RANLIB
+SDL_CONFIG
+SDL_CFLAGS
+SDL_LIBS
+sound_flag
+mixer_flag
+ascii_flag
+inst_flag
+prf_flag
+inst_dir
+prf_dir
+win32_deps
+arch_flag
+win32_inst_script
+appname
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --disable-sdltest Do not try to compile and run a test SDL program
+ --disable-sound Disables sound
+ --enable-ascii Enables 'save as ascii' option (for big-endian)
+ --disable-install No installation. Played from the source directory.
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)
+ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L if you have libraries in a
+ nonstandard directory
+ LIBS libraries to pass to the linker, e.g. -l
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if
+ you have headers in a nonstandard directory
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" || continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+ "$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+{ echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "x$target_alias" = x; then
+ ac_cv_target=$ac_cv_host
+else
+ ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
+echo "$as_me: error: invalid value of canonical target" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_ACEOF
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort. b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions. Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
+
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+ xno)
+ { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer to if __STDC__ is defined, since
+ # exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_GREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_EGREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+{ echo "$as_me:$LINENO: checking for AIX" >&5
+echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef _AIX
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+cat >>confdefs.h <<\_ACEOF
+#define _ALL_SOURCE 1
+_ACEOF
+
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+rm -f conftest*
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for minix/config.h" >&5
+echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
+echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
+echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
+echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_minix_config_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
+
+fi
+if test $ac_cv_header_minix_config_h = yes; then
+ MINIX=yes
+else
+ MINIX=
+fi
+
+
+if test "$MINIX" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_SOURCE 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_1_SOURCE 2
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _MINIX 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
+echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_safe_to_define___extensions__=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_safe_to_define___extensions__=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
+echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ cat >>confdefs.h <<\_ACEOF
+#define __EXTENSIONS__ 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _TANDEM_SOURCE 1
+_ACEOF
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+am__api_version="1.9"
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+# 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".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm -f conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+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=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+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
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ SET_MAKE=
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+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.
+{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+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
+
+
+{ echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=lmarbles
+ VERSION=1.0.8
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ 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_CC_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_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+ xno)
+ { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+{ echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+
+{ echo "$as_me:$LINENO: checking for main in -lm" >&5
+echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; }
+if test "${ac_cv_lib_m_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_m_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_m_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+echo "${ECHO_T}$ac_cv_lib_m_main" >&6; }
+if test $ac_cv_lib_m_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+else
+ { { echo "$as_me:$LINENO: error: lib math is needed" >&5
+echo "$as_me: error: lib math is needed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+# Check whether --with-sdl-prefix was given.
+if test "${with_sdl_prefix+set}" = set; then
+ withval=$with_sdl_prefix; sdl_prefix="$withval"
+else
+ sdl_prefix=""
+fi
+
+
+# Check whether --with-sdl-exec-prefix was given.
+if test "${with_sdl_exec_prefix+set}" = set; then
+ withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval"
+else
+ sdl_exec_prefix=""
+fi
+
+# Check whether --enable-sdltest was given.
+if test "${enable_sdltest+set}" = set; then
+ enableval=$enable_sdltest;
+else
+ enable_sdltest=yes
+fi
+
+
+ if test x$sdl_exec_prefix != x ; then
+ sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
+ if test x${SDL_CONFIG+set} != xset ; then
+ SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
+ fi
+ fi
+ if test x$sdl_prefix != x ; then
+ sdl_args="$sdl_args --prefix=$sdl_prefix"
+ if test x${SDL_CONFIG+set} != xset ; then
+ SDL_CONFIG=$sdl_prefix/bin/sdl-config
+ fi
+ fi
+
+
+ PATH="$prefix/bin:$prefix/usr/bin:$PATH"
+ # Extract the first word of "sdl-config", so it can be a program name with args.
+set dummy sdl-config; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_SDL_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $SDL_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
+ ;;
+esac
+fi
+SDL_CONFIG=$ac_cv_path_SDL_CONFIG
+if test -n "$SDL_CONFIG"; then
+ { echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5
+echo "${ECHO_T}$SDL_CONFIG" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ min_sdl_version=1.0.0
+ { echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5
+echo $ECHO_N "checking for SDL - version >= $min_sdl_version... $ECHO_C" >&6; }
+ no_sdl=""
+ if test "$SDL_CONFIG" = "no" ; then
+ no_sdl=yes
+ else
+ SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
+ SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
+
+ sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+ sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+ sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+ if test "x$enable_sdltest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"
+ rm -f conf.sdltest
+ if test "$cross_compiling" = yes; then
+ echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+#include
+#include "SDL.h"
+
+char*
+my_strdup (char *str)
+{
+ char *new_str;
+
+ if (str)
+ {
+ new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
+ strcpy (new_str, str);
+ }
+ else
+ new_str = NULL;
+
+ return new_str;
+}
+
+int main (int argc, char *argv[])
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ /* This hangs on some systems (?)
+ system ("touch conf.sdltest");
+ */
+ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = my_strdup("$min_sdl_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_sdl_version");
+ exit(1);
+ }
+
+ if (($sdl_major_version > major) ||
+ (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
+ (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
+ printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
+ printf("*** best to upgrade to the required version.\n");
+ printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
+ printf("*** to point to the correct copy of sdl-config, and remove the file\n");
+ printf("*** config.cache before re-running configure\n");
+ return 1;
+ }
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+no_sdl=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_sdl" = x ; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ :
+ else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ if test "$SDL_CONFIG" = "no" ; then
+ echo "*** The sdl-config script installed by SDL could not be found"
+ echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the SDL_CONFIG environment variable to the"
+ echo "*** full path to sdl-config."
+ else
+ if test -f conf.sdltest ; then
+ :
+ else
+ echo "*** Could not run SDL test program, checking why..."
+ CFLAGS="$CFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include "SDL.h"
+
+int main(int argc, char *argv[])
+{ return 0; }
+#undef main
+#define main K_and_R_C_main
+
+int
+main ()
+{
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding SDL or finding the wrong"
+ echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means SDL was incorrectly installed"
+ echo "*** or that you have moved SDL since it was installed. In the latter case, you"
+ echo "*** may want to edit the sdl-config script: $SDL_CONFIG"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ SDL_CFLAGS=""
+ SDL_LIBS=""
+ { { echo "$as_me:$LINENO: error: lib SDL is needed" >&5
+echo "$as_me: error: lib SDL is needed" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+
+ rm -f conf.sdltest
+
+CFLAGS="$CFLAGS $SDL_CFLAGS"
+LIBS="$LIBS $SDL_LIBS"
+
+# Check whether --with-sdl-prefix was given.
+if test "${with_sdl_prefix+set}" = set; then
+ withval=$with_sdl_prefix; sdl_prefix="$withval"
+else
+ sdl_prefix=""
+fi
+
+
+# Check whether --with-sdl-exec-prefix was given.
+if test "${with_sdl_exec_prefix+set}" = set; then
+ withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval"
+else
+ sdl_exec_prefix=""
+fi
+
+# Check whether --enable-sdltest was given.
+if test "${enable_sdltest+set}" = set; then
+ enableval=$enable_sdltest;
+else
+ enable_sdltest=yes
+fi
+
+
+ if test x$sdl_exec_prefix != x ; then
+ sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
+ if test x${SDL_CONFIG+set} != xset ; then
+ SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
+ fi
+ fi
+ if test x$sdl_prefix != x ; then
+ sdl_args="$sdl_args --prefix=$sdl_prefix"
+ if test x${SDL_CONFIG+set} != xset ; then
+ SDL_CONFIG=$sdl_prefix/bin/sdl-config
+ fi
+ fi
+
+
+ PATH="$prefix/bin:$prefix/usr/bin:$PATH"
+ # Extract the first word of "sdl-config", so it can be a program name with args.
+set dummy sdl-config; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_SDL_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $SDL_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
+ ;;
+esac
+fi
+SDL_CONFIG=$ac_cv_path_SDL_CONFIG
+if test -n "$SDL_CONFIG"; then
+ { echo "$as_me:$LINENO: result: $SDL_CONFIG" >&5
+echo "${ECHO_T}$SDL_CONFIG" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ min_sdl_version=1.1.5
+ { echo "$as_me:$LINENO: checking for SDL - version >= $min_sdl_version" >&5
+echo $ECHO_N "checking for SDL - version >= $min_sdl_version... $ECHO_C" >&6; }
+ no_sdl=""
+ if test "$SDL_CONFIG" = "no" ; then
+ no_sdl=yes
+ else
+ SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
+ SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
+
+ sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+ sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+ sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+ if test "x$enable_sdltest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"
+ rm -f conf.sdltest
+ if test "$cross_compiling" = yes; then
+ echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include
+#include
+#include "SDL.h"
+
+char*
+my_strdup (char *str)
+{
+ char *new_str;
+
+ if (str)
+ {
+ new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
+ strcpy (new_str, str);
+ }
+ else
+ new_str = NULL;
+
+ return new_str;
+}
+
+int main (int argc, char *argv[])
+{
+ int major, minor, micro;
+ char *tmp_version;
+
+ /* This hangs on some systems (?)
+ system ("touch conf.sdltest");
+ */
+ { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = my_strdup("$min_sdl_version");
+ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
+ printf("%s, bad version string\n", "$min_sdl_version");
+ exit(1);
+ }
+
+ if (($sdl_major_version > major) ||
+ (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
+ (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
+ printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
+ printf("*** best to upgrade to the required version.\n");
+ printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
+ printf("*** to point to the correct copy of sdl-config, and remove the file\n");
+ printf("*** config.cache before re-running configure\n");
+ return 1;
+ }
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+no_sdl=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_sdl" = x ; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ CFLAGS="$CFLAGS -DSDL_1_1_5"
+ else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ if test "$SDL_CONFIG" = "no" ; then
+ echo "*** The sdl-config script installed by SDL could not be found"
+ echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the SDL_CONFIG environment variable to the"
+ echo "*** full path to sdl-config."
+ else
+ if test -f conf.sdltest ; then
+ :
+ else
+ echo "*** Could not run SDL test program, checking why..."
+ CFLAGS="$CFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include
+#include "SDL.h"
+
+int main(int argc, char *argv[])
+{ return 0; }
+#undef main
+#define main K_and_R_C_main
+
+int
+main ()
+{
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding SDL or finding the wrong"
+ echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means SDL was incorrectly installed"
+ echo "*** or that you have moved SDL since it was installed. In the latter case, you"
+ echo "*** may want to edit the sdl-config script: $SDL_CONFIG"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ SDL_CFLAGS=""
+ SDL_LIBS=""
+ :
+ fi
+
+
+ rm -f conf.sdltest
+
+
+sound_flag="-DSOUND"
+mixer_flag="-lSDL_mixer"
+# Check whether --enable-sound was given.
+if test "${enable_sound+set}" = set; then
+ enableval=$enable_sound; sound_flag=""; mixer_flag=""
+fi
+
+
+{ echo "$as_me:$LINENO: checking for main in -lSDL_mixer" >&5
+echo $ECHO_N "checking for main in -lSDL_mixer... $ECHO_C" >&6; }
+if test "${ac_cv_lib_SDL_mixer_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lSDL_mixer $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_SDL_mixer_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_SDL_mixer_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_SDL_mixer_main" >&5
+echo "${ECHO_T}$ac_cv_lib_SDL_mixer_main" >&6; }
+if test $ac_cv_lib_SDL_mixer_main = yes; then
+ { echo "$as_me:$LINENO: result: \"SDL_Mixer found\"" >&5
+echo "${ECHO_T}\"SDL_Mixer found\"" >&6; }
+else
+ { echo "$as_me:$LINENO: result: \"SDL_Mixer NOT found: Audio disabled\"" >&5
+echo "${ECHO_T}\"SDL_Mixer NOT found: Audio disabled\"" >&6; }; sound_flag=""; mixer_flag=""
+fi
+
+
+
+
+
+ascii_flag=""
+# Check whether --enable-ascii was given.
+if test "${enable_ascii+set}" = set; then
+ enableval=$enable_ascii; ascii_flag="-DASCII"
+fi
+
+
+
+inst_dir="$datadir/lmarbles"
+prf_dir=$localstatedir
+
+# Check whether --enable-install was given.
+if test "${enable_install+set}" = set; then
+ enableval=$enable_install; inst_dir="." prf_dir="."
+fi
+
+
+inst_flag="-DSRC_DIR=\\\"$inst_dir\\\""
+prf_flag="-DPRF_DIR=\\\"$prf_dir\\\""
+
+
+
+
+
+
+case "$host" in
+ *-mingw32)
+ win32="yes"
+ win32_inst_script="`pwd -W`/installer.iss"
+ arch_flag="-march=i586"
+ win32_deps="lmarblesres.o" ;;
+ *)
+ win32="no"
+ win32_inst_script=""
+ arch_flag=""
+ win32_deps="" ;;
+esac
+
+
+
+
+if test "x$win32" = xyes; then
+ for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+
+fi
+
+appname="LMarbles"
+
+
+ac_config_files="$ac_config_files Makefile src/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to ."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.61,
+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ CONFIG_SHELL=$SHELL
+ export CONFIG_SHELL
+ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+target!$target$ac_delim
+target_cpu!$target_cpu$ac_delim
+target_vendor!$target_vendor$ac_delim
+target_os!$target_os$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+CYGPATH_W!$CYGPATH_W$ac_delim
+PACKAGE!$PACKAGE$ac_delim
+VERSION!$VERSION$ac_delim
+ACLOCAL!$ACLOCAL$ac_delim
+AUTOCONF!$AUTOCONF$ac_delim
+AUTOMAKE!$AUTOMAKE$ac_delim
+AUTOHEADER!$AUTOHEADER$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
+install_sh!$install_sh$ac_delim
+STRIP!$STRIP$ac_delim
+INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+mkdir_p!$mkdir_p$ac_delim
+AWK!$AWK$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+am__leading_dot!$am__leading_dot$ac_delim
+AMTAR!$AMTAR$ac_delim
+am__tar!$am__tar$ac_delim
+am__untar!$am__untar$ac_delim
+DEPDIR!$DEPDIR$ac_delim
+am__include!$am__include$ac_delim
+am__quote!$am__quote$ac_delim
+AMDEP_TRUE!$AMDEP_TRUE$ac_delim
+AMDEP_FALSE!$AMDEP_FALSE$ac_delim
+AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
+CCDEPMODE!$CCDEPMODE$ac_delim
+am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
+am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+RANLIB!$RANLIB$ac_delim
+SDL_CONFIG!$SDL_CONFIG$ac_delim
+SDL_CFLAGS!$SDL_CFLAGS$ac_delim
+SDL_LIBS!$SDL_LIBS$ac_delim
+sound_flag!$sound_flag$ac_delim
+mixer_flag!$mixer_flag$ac_delim
+ascii_flag!$ascii_flag$ac_delim
+inst_flag!$inst_flag$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+prf_flag!$prf_flag$ac_delim
+inst_dir!$inst_dir$ac_delim
+prf_dir!$prf_dir$ac_delim
+win32_deps!$win32_deps$ac_delim
+arch_flag!$arch_flag$ac_delim
+win32_inst_script!$win32_inst_script$ac_delim
+appname!$appname$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ ac_file_inputs="$ac_file_inputs $ac_f"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input="Generated from "`IFS=:
+ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ fi
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin";;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out"; rm -f "$tmp/out";;
+ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+ esac
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+_ACEOF
+
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status. If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless. But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
+ac_dB='\\)[ (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+ sed -n '
+ t rset
+ :rset
+ s/^[ ]*#[ ]*define[ ][ ]*//
+ t ok
+ d
+ :ok
+ s/[\\&,]/\\&/g
+ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+ ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[ #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+ # Write a here document:
+ cat >>$CONFIG_STATUS <<_ACEOF
+ # First, check the format of the line:
+ cat >"\$tmp/defines.sed" <<\\CEOF
+/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
+/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
+b
+:def
+_ACEOF
+ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+ grep . conftest.tail >/dev/null || break
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines conftest.tail
+
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
+ if test x"$ac_file" != x-; then
+ echo "/* $configure_input */" >"$tmp/config.h"
+ cat "$ac_result" >>"$tmp/config.h"
+ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f $ac_file
+ mv "$tmp/config.h" $ac_file
+ fi
+ else
+ echo "/* $configure_input */"
+ cat "$ac_result"
+ fi
+ rm -f "$tmp/out12"
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X$ac_file : 'X\(//\)[^/]' \| \
+ X$ac_file : 'X\(//\)$' \| \
+ X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
+echo X$ac_file |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || 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" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ 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_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir=$dirpart/$fdir
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+
+ esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/project/jni/application/lmarbles-1.0.8/configure.in b/project/jni/application/lmarbles-1.0.8/configure.in
new file mode 100644
index 000000000..ba070d5a9
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/configure.in
@@ -0,0 +1,89 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(Makefile.am)
+
+AC_CANONICAL_TARGET
+AC_USE_SYSTEM_EXTENSIONS
+
+AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE(lmarbles,1.0.8)
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_EXEEXT
+AC_CANONICAL_HOST
+
+dnl check for libraries
+AC_CHECK_LIB(m, main,, AC_MSG_ERROR(lib math is needed))
+
+dnl check SDL version
+AM_PATH_SDL(1.0.0,, AC_MSG_ERROR(lib SDL is needed))
+CFLAGS="$CFLAGS $SDL_CFLAGS"
+LIBS="$LIBS $SDL_LIBS"
+AM_PATH_SDL(1.1.5, CFLAGS="$CFLAGS -DSDL_1_1_5",)
+
+dnl check sound
+sound_flag="-DSOUND"
+mixer_flag="-lSDL_mixer"
+AC_ARG_ENABLE( sound,
+[ --disable-sound Disables sound], sound_flag=""; mixer_flag="")
+
+dnl check if SDL_mixer's installed
+dnl if not: clear sound_flag and mixer_flag
+AC_CHECK_LIB(SDL_mixer, main,
+AC_MSG_RESULT("SDL_Mixer found"),
+AC_MSG_RESULT("SDL_Mixer NOT found: Audio disabled"); sound_flag=""; mixer_flag="")
+
+AC_SUBST(sound_flag)
+AC_SUBST(mixer_flag)
+
+dnl check ascii-flag
+ascii_flag=""
+AC_ARG_ENABLE( ascii,
+[ --enable-ascii Enables 'save as ascii' option (for big-endian)], ascii_flag="-DASCII")
+AC_SUBST(ascii_flag)
+
+dnl installation & prefix path
+inst_dir="$datadir/lmarbles"
+prf_dir=$localstatedir
+
+dnl check if installation was disabled
+AC_ARG_ENABLE( install,
+[ --disable-install No installation. Played from the source directory.],
+inst_dir="." prf_dir=".")
+
+inst_flag="-DSRC_DIR=\\\"$inst_dir\\\""
+prf_flag="-DPRF_DIR=\\\"$prf_dir\\\""
+
+AC_SUBST(inst_flag)
+AC_SUBST(prf_flag)
+AC_SUBST(inst_dir)
+AC_SUBST(prf_dir)
+
+case "$host" in
+ *-mingw32)
+ win32="yes"
+ win32_inst_script="`pwd -W`/installer.iss"
+ arch_flag="-march=i586"
+ win32_deps="lmarblesres.o" ;;
+ *)
+ win32="no"
+ win32_inst_script=""
+ arch_flag=""
+ win32_deps="" ;;
+esac
+
+AC_SUBST(win32_deps)
+AC_SUBST(arch_flag)
+
+if test "x$win32" = xyes; then
+ AC_PROG_AWK
+dnl AC_PROG_STRIP
+dnl AC_PROG_ISCC
+ AC_SUBST(win32_inst_script)
+fi
+
+appname="LMarbles"
+AC_SUBST(appname)
+
+AC_OUTPUT(Makefile src/Makefile)
diff --git a/project/jni/application/lmarbles-1.0.8/depcomp b/project/jni/application/lmarbles-1.0.8/depcomp
new file mode 100755
index 000000000..11e2d3bfe
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/depcomp
@@ -0,0 +1,522 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2004-05-31.23
+
+# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# 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 Alexandre Oliva .
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to .
+EOF
+ exit 0
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit 0
+ ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+ "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> $depfile
+ echo >> $depfile
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> $depfile
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+ tmpdepfile="$stripped.u"
+ if test "$libtool" = yes; then
+ "$@" -Wc,-M
+ else
+ "$@" -M
+ fi
+ stat=$?
+
+ if test -f "$tmpdepfile"; then :
+ else
+ stripped=`echo "$stripped" | sed 's,^.*/,,'`
+ tmpdepfile="$stripped.u"
+ fi
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile"; then
+ outname="$stripped.o"
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+ sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ # Dependencies are output in .lo.d with libtool 1.4.
+ # With libtool 1.5 they are output both in $dir.libs/$base.o.d
+ # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the
+ # latter, because the former will be cleaned when $dir.libs is
+ # erased.
+ tmpdepfile1="$dir.libs/$base.lo.d"
+ tmpdepfile2="$dir$base.o.d"
+ tmpdepfile3="$dir.libs/$base.d"
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1="$dir$base.o.d"
+ tmpdepfile2="$dir$base.d"
+ tmpdepfile3="$dir$base.d"
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile1"; then
+ tmpdepfile="$tmpdepfile1"
+ elif test -f "$tmpdepfile2"; then
+ tmpdepfile="$tmpdepfile2"
+ else
+ tmpdepfile="$tmpdepfile3"
+ fi
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no
+ for arg in "$@"; do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix="`echo $object | sed 's/^.*\././'`"
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ "$@" || exit $?
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/project/jni/application/lmarbles-1.0.8/install-sh b/project/jni/application/lmarbles-1.0.8/install-sh
new file mode 100755
index 000000000..e8436696c
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/install-sh
@@ -0,0 +1,250 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/project/jni/application/lmarbles-1.0.8/lmarbles.desktop.in b/project/jni/application/lmarbles-1.0.8/lmarbles.desktop.in
new file mode 100644
index 000000000..be1f1523e
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/lmarbles.desktop.in
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=LMarbles
+Comment=Atomix-like enhanced puzzle game.
+Exec=lmarbles
+Icon=
+Type=Application
+Categories=Game;
diff --git a/project/jni/application/lmarbles-1.0.8/lmarbles.spec b/project/jni/application/lmarbles-1.0.8/lmarbles.spec
new file mode 100644
index 000000000..ab324209b
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/lmarbles.spec
@@ -0,0 +1,72 @@
+Name: lmarbles
+Version: 1.0.6
+Release: 1cl
+Summary: Atomix-like game of moving marbles in puzzles
+Summary(pt_BR): Jogo tipo Atomix, de mover bolas de gude em labirintos
+Summary(es): Atomix-like game of moving marbles in puzzles
+Group: Games
+Group(pt_BR): Jogos
+Group(es): Juegos
+License: GPL
+URL: http://lgames.sourceforge.net/%{name}/%{name}.html
+Source: http://ftp1.sourceforge.net/lgames/%{name}-%{version}.tar.gz
+Patch: %{name}-prefsdir.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%description
+Marbles is very similiar to Atomix and was heavily inspired by it.
+Goal is to create a more or less complex figure out of single marbles
+within a time limit to reach the next level.
+
+Sounds easy? Well, there is a problem: If a marble starts to move it
+will not stop until it hits a wall or marble. And to make it even more
+interesting there are obstacles like arrows, crumbling walls and
+teleports!
+
+%description -l pt_BR
+O Marbles é muito parecido com o jogo Atomix, pois foi inspirado nele.
+O objetivo é criar uma figura de bolas de gude mais ou menos complexa
+dentro de um limite de tempo.
+
+Parece fácil? Bem, há um problema: quando uma bolinha de gude começa a
+se mover, só pára quando bate em uma parede ou outra bolinha. E para
+ficar mais interessante, há alguns obstáculos como caminhos de mão
+única, paredes que desmoronam e teletransporte!
+
+%description -l es
+Marbles is very similiar to Atomix and was heavily inspired by it.
+Goal is to create a more or less complex figure out of single marbles
+within a time limit to reach the next level.
+
+Sounds easy? Well, there is a problem: If a marble starts to move it
+will not stop until it hits a wall or marble. And to make it even more
+interesting there are obstacles like arrows, crumbling walls and
+teleports!
+
+%prep
+%setup -q
+%patch
+
+%build
+%configure --datadir=%{_datadir}
+make
+
+%install
+mkdir -p %{buildroot}/%{_localstatedir}/games
+%makeinstall DESTDIR=%{buildroot} bindir=%{_prefix}/games
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(0644,root,root,0755)
+%doc AUTHORS COPYING README ChangeLog %{name}/manual
+%attr(2755,root,games) %{_prefix}/games/%{name}
+%{_datadir}/games/%{name}
+%attr(0664,root,games) %config %{_localstatedir}/games/%{name}.prfs
+
+%changelog
+* Thu Nov 30 2000 aurélio marinho jargas
++ marbles-001126-1cl
+- changed prefs dir
+- adopted
diff --git a/project/jni/application/lmarbles-1.0.8/lmarbles32.gif b/project/jni/application/lmarbles-1.0.8/lmarbles32.gif
new file mode 100644
index 000000000..73d381bfc
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/lmarbles32.gif differ
diff --git a/project/jni/application/lmarbles-1.0.8/lmarbles48.gif b/project/jni/application/lmarbles-1.0.8/lmarbles48.gif
new file mode 100644
index 000000000..edee6ce45
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/lmarbles48.gif differ
diff --git a/project/jni/application/lmarbles-1.0.8/missing b/project/jni/application/lmarbles-1.0.8/missing
new file mode 100755
index 000000000..cbe2b0ef0
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/missing
@@ -0,0 +1,188 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard , 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing - GNU libit 0.0"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`configure.in'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`configure.in'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`configure.in'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
+ if test -z "$files"; then
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
+ test -z "$files" || files="$files.in"
+ else
+ files=`echo "$files" | sed -e 's/:/ /g'`
+ fi
+ test -z "$files" && files="config.h.in"
+ touch $files
+ ;;
+
+ automake)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print \
+ | sed 's/^\(.*\).am$/touch \1.in/' \
+ | sh
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequirements for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/project/jni/application/lmarbles-1.0.8/mkinstalldirs b/project/jni/application/lmarbles-1.0.8/mkinstalldirs
new file mode 100755
index 000000000..4ebd8668f
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/mkinstalldirs
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.1.1.1 2000/08/05 10:36:33 michael Exp $
+
+errstatus=0
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/project/jni/application/lmarbles-1.0.8/src/Makefile.am b/project/jni/application/lmarbles-1.0.8/src/Makefile.am
new file mode 100644
index 000000000..9d72d7261
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/Makefile.am
@@ -0,0 +1,113 @@
+DEFS = @DEFS@ @arch_flag@ @inst_flag@ @prf_flag@ @sound_flag@ @ascii_flag@
+
+marblesres.o: win32.ico
+ @echo "1 VERSIONINFO" > $(PACKAGE).rc
+ @echo "FILEVERSION `echo $(VERSION) | $(AWK) '{ gsub(/\./,","); print }'`,0" >> $(PACKAGE).rc
+ @echo "PRODUCTVERSION `echo $(VERSION) | $(AWK) '{ gsub(/\./,","); print }'`,0" >> $(PACKAGE).rc
+ @echo "FILEFLAGSMASK 0" >> $(PACKAGE).rc
+ @echo "FILEOS 0x40000" >> $(PACKAGE).rc
+ @echo "FILETYPE 1" >> $(PACKAGE).rc
+ @echo "{" >> $(PACKAGE).rc
+ @echo " BLOCK \"StringFileInfo\"" >> $(PACKAGE).rc
+ @echo " {" >> $(PACKAGE).rc
+ @echo " BLOCK \"040904E4\"" >> $(PACKAGE).rc
+ @echo " {" >> $(PACKAGE).rc
+ @echo " VALUE \"CompanyName\", \"LGames - Michael Speck\"" >> $(PACKAGE).rc
+ @echo " VALUE \"FileDescription\", \"@appname@\"" >> $(PACKAGE).rc
+ @echo " VALUE \"FileVersion\", \"$(VERSION)\"" >> $(PACKAGE).rc
+ @echo " VALUE \"InternalName\", \"$(PACKAGE)\"" >> $(PACKAGE).rc
+ @echo " VALUE \"LegalCopyright\", \"GNU Public License\"" >> $(PACKAGE).rc
+ @echo " VALUE \"OriginalFilename\", \"$(PACKAGE)$(EXEEXT)\"" >> $(PACKAGE).rc
+ @echo " VALUE \"ProductName\", \"@appname@\"" >> $(PACKAGE).rc
+ @echo " VALUE \"ProductVersion\", \"$(VERSION)\"" >> $(PACKAGE).rc
+ @echo " }" >> $(PACKAGE).rc
+ @echo " }" >> $(PACKAGE).rc
+ @echo "}" >> $(PACKAGE).rc
+ @echo "0 ICON win32.ico" >> $(PACKAGE).rc
+ @windres -o $@ -i $(PACKAGE).rc
+
+bin_PROGRAMS = lmarbles
+
+lmarbles_SOURCES = audio.c cfg.c dynlist.c file.c game.c levels.c main.c menu.c \
+profile.c sdl.c timer.c audio.h cfg.h dynlist.h file.h game.h levels.h \
+menu.h profile.h sdl.h timer.h win32.ico lmarbles.6
+
+lmarbles_DEPENDENCIES = @win32_deps@
+lmarbles_LDADD = @win32_deps@ @mixer_flag@
+man_MANS = lmarbles.6
+
+DATA_FILES = \
+gfx/board.bmp gfx/f_red.bmp gfx/f_small.bmp gfx/f_white.bmp \
+gfx/f_yellow.bmp gfx/figure.bmp gfx/lights.bmp gfx/logo.bmp \
+gfx/m_frame.bmp gfx/m_sframe.bmp gfx/marbles.bmp gfx/tiny.sdlfnt \
+gfx/title.bmp gfx/win_icon.bmp \
+\
+sounds/alarm.wav sounds/arrow.wav sounds/click.wav sounds/explode.wav \
+sounds/select.wav sounds/stop.wav sounds/teleport.wav sounds/score.wav \
+\
+levels/Original \
+\
+gfx/stone/arrow_d.bmp gfx/stone/arrow_l.bmp gfx/stone/arrow_r.bmp \
+gfx/stone/arrow_u.bmp gfx/stone/background.bmp gfx/stone/barrier_lr.bmp \
+gfx/stone/barrier_ud.bmp gfx/stone/floor.bmp gfx/stone/teleport0.bmp \
+gfx/stone/teleport1.bmp gfx/stone/teleport2.bmp \
+gfx/stone/teleport3.bmp gfx/stone/wall.bmp \
+gfx/stone/wall_crumble.bmp \
+\
+gfx/metal/arrow_d.bmp gfx/metal/arrow_l.bmp gfx/metal/arrow_r.bmp \
+gfx/metal/arrow_u.bmp gfx/metal/background.bmp gfx/metal/barrier_lr.bmp \
+gfx/metal/barrier_ud.bmp gfx/metal/floor.bmp gfx/metal/teleport0.bmp \
+gfx/metal/teleport1.bmp gfx/metal/teleport2.bmp \
+gfx/metal/teleport3.bmp gfx/metal/wall.bmp \
+gfx/metal/wall_crumble.bmp \
+\
+gfx/wood/arrow_d.bmp gfx/wood/arrow_l.bmp gfx/wood/arrow_r.bmp \
+gfx/wood/arrow_u.bmp gfx/wood/background.bmp gfx/wood/barrier_lr.bmp \
+gfx/wood/barrier_ud.bmp gfx/wood/floor.bmp gfx/wood/teleport0.bmp \
+gfx/wood/teleport1.bmp gfx/wood/teleport2.bmp \
+gfx/wood/teleport3.bmp gfx/wood/wall.bmp \
+gfx/wood/wall_crumble.bmp
+
+DOC_FILES = manual/manual.html manual/arrow.jpg manual/arrow2.jpg \
+manual/crumble.jpg manual/teleport.jpg manual/marbles.jpg
+
+EXTRA_DIST= empty.prfs $(DATA_FILES) $(DOC_FILES)
+
+install-data-local:
+#directories
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/stone
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/metal
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/wood
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/sounds
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/levels
+#data files
+ for file in $(DATA_FILES); do\
+ $(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/$$file;\
+ done
+#profiles
+ $(mkinstalldirs) $(DESTDIR)$(prf_dir)
+ if ! test -f $(DESTDIR)$(prf_dir)/lmarbles.prfs; then \
+ $(INSTALL_DATA) -m 666 empty.prfs $(DESTDIR)$(prf_dir)/lmarbles.prfs; \
+ fi;
+
+uninstall-local:
+ rm -rf $(DESTDIR)$(inst_dir)
+ rm -f $(DESTDIR)$(prf_dir)/lmarbles.prfs
+
+win32rootdir=`pwd -W | awk '{ gsub("/","\\\\"); print}'`
+
+win32-install-script:
+ @$(STRIP) $(PACKAGE)$(EXEEXT)
+ @echo "Source: \"$(win32rootdir)\\$(PACKAGE)$(EXEEXT)\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@
+ @for file in $(DATA_FILES) $(DOC_FILES); do \
+ win32src=$(win32rootdir)\\`echo $$file | awk '{ gsub("/","\\\\"); print }'`; \
+ win32dest=`dirname $$file | awk '{ gsub("/","\\\\"); print }'`; \
+ echo "Source: \"$$win32src\"; DestDir: \"{app}\\$$win32dest\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
+ done
+
+ @list='$(SUBDIRS)'; for subdir in $$list; do \
+ (cd $$subdir \
+ && $(MAKE) $(AM_MAKEFLAGS) win32-install-script); \
+ done
diff --git a/project/jni/application/lmarbles-1.0.8/src/Makefile.in b/project/jni/application/lmarbles-1.0.8/src/Makefile.in
new file mode 100644
index 000000000..a2a4a6526
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/Makefile.in
@@ -0,0 +1,596 @@
+# 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@
+target_triplet = @target@
+bin_PROGRAMS = lmarbles$(EXEEXT)
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man6dir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_lmarbles_OBJECTS = audio.$(OBJEXT) cfg.$(OBJEXT) dynlist.$(OBJEXT) \
+ file.$(OBJEXT) game.$(OBJEXT) levels.$(OBJEXT) main.$(OBJEXT) \
+ menu.$(OBJEXT) profile.$(OBJEXT) sdl.$(OBJEXT) timer.$(OBJEXT)
+lmarbles_OBJECTS = $(am_lmarbles_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(lmarbles_SOURCES)
+DIST_SOURCES = $(lmarbles_SOURCES)
+man6dir = $(mandir)/man6
+NROFF = nroff
+MANS = $(man_MANS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+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@ @arch_flag@ @inst_flag@ @prf_flag@ @sound_flag@ @ascii_flag@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+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@
+RANLIB = @RANLIB@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_CONFIG = @SDL_CONFIG@
+SDL_LIBS = @SDL_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+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@
+appname = @appname@
+arch_flag = @arch_flag@
+ascii_flag = @ascii_flag@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+inst_dir = @inst_dir@
+inst_flag = @inst_flag@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mixer_flag = @mixer_flag@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+prf_dir = @prf_dir@
+prf_flag = @prf_flag@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sound_flag = @sound_flag@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+win32_deps = @win32_deps@
+win32_inst_script = @win32_inst_script@
+lmarbles_SOURCES = audio.c cfg.c dynlist.c file.c game.c levels.c main.c menu.c \
+profile.c sdl.c timer.c audio.h cfg.h dynlist.h file.h game.h levels.h \
+menu.h profile.h sdl.h timer.h win32.ico lmarbles.6
+
+lmarbles_DEPENDENCIES = @win32_deps@
+lmarbles_LDADD = @win32_deps@ @mixer_flag@
+man_MANS = lmarbles.6
+DATA_FILES = \
+gfx/board.bmp gfx/f_red.bmp gfx/f_small.bmp gfx/f_white.bmp \
+gfx/f_yellow.bmp gfx/figure.bmp gfx/lights.bmp gfx/logo.bmp \
+gfx/m_frame.bmp gfx/m_sframe.bmp gfx/marbles.bmp gfx/tiny.sdlfnt \
+gfx/title.bmp gfx/win_icon.bmp \
+\
+sounds/alarm.wav sounds/arrow.wav sounds/click.wav sounds/explode.wav \
+sounds/select.wav sounds/stop.wav sounds/teleport.wav sounds/score.wav \
+\
+levels/Original \
+\
+gfx/stone/arrow_d.bmp gfx/stone/arrow_l.bmp gfx/stone/arrow_r.bmp \
+gfx/stone/arrow_u.bmp gfx/stone/background.bmp gfx/stone/barrier_lr.bmp \
+gfx/stone/barrier_ud.bmp gfx/stone/floor.bmp gfx/stone/teleport0.bmp \
+gfx/stone/teleport1.bmp gfx/stone/teleport2.bmp \
+gfx/stone/teleport3.bmp gfx/stone/wall.bmp \
+gfx/stone/wall_crumble.bmp \
+\
+gfx/metal/arrow_d.bmp gfx/metal/arrow_l.bmp gfx/metal/arrow_r.bmp \
+gfx/metal/arrow_u.bmp gfx/metal/background.bmp gfx/metal/barrier_lr.bmp \
+gfx/metal/barrier_ud.bmp gfx/metal/floor.bmp gfx/metal/teleport0.bmp \
+gfx/metal/teleport1.bmp gfx/metal/teleport2.bmp \
+gfx/metal/teleport3.bmp gfx/metal/wall.bmp \
+gfx/metal/wall_crumble.bmp \
+\
+gfx/wood/arrow_d.bmp gfx/wood/arrow_l.bmp gfx/wood/arrow_r.bmp \
+gfx/wood/arrow_u.bmp gfx/wood/background.bmp gfx/wood/barrier_lr.bmp \
+gfx/wood/barrier_ud.bmp gfx/wood/floor.bmp gfx/wood/teleport0.bmp \
+gfx/wood/teleport1.bmp gfx/wood/teleport2.bmp \
+gfx/wood/teleport3.bmp gfx/wood/wall.bmp \
+gfx/wood/wall_crumble.bmp
+
+DOC_FILES = manual/manual.html manual/arrow.jpg manual/arrow2.jpg \
+manual/crumble.jpg manual/teleport.jpg manual/marbles.jpg
+
+EXTRA_DIST = empty.prfs $(DATA_FILES) $(DOC_FILES)
+win32rootdir = `pwd -W | awk '{ gsub("/","\\\\"); print}'`
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+lmarbles$(EXEEXT): $(lmarbles_OBJECTS) $(lmarbles_DEPENDENCIES)
+ @rm -f lmarbles$(EXEEXT)
+ $(LINK) $(lmarbles_LDFLAGS) $(lmarbles_OBJECTS) $(lmarbles_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynlist.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/game.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/levels.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+uninstall-info-am:
+install-man6: $(man6_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man6dir)" || $(mkdir_p) "$(DESTDIR)$(man6dir)"
+ @list='$(man6_MANS) $(dist_man6_MANS) $(nodist_man6_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.6*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 6*) ;; \
+ *) ext='6' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man6dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man6dir)/$$inst"; \
+ done
+uninstall-man6:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man6_MANS) $(dist_man6_MANS) $(nodist_man6_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.6*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ case "$$ext" in \
+ 6*) ;; \
+ *) ext='6' ;; \
+ esac; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f '$(DESTDIR)$(man6dir)/$$inst'"; \
+ rm -f "$(DESTDIR)$(man6dir)/$$inst"; \
+ 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: $(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; }'`; \
+ 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: $(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)
+ $(mkdir_p) $(distdir)/gfx $(distdir)/gfx/metal $(distdir)/gfx/stone $(distdir)/gfx/wood $(distdir)/levels $(distdir)/manual $(distdir)/sounds
+ @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
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man6dir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+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-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local install-man
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man: install-man6
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-local \
+ uninstall-man
+
+uninstall-man: uninstall-man6
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic ctags distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-data-local install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-man6 install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+ ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \
+ uninstall-info-am uninstall-local uninstall-man uninstall-man6
+
+
+marblesres.o: win32.ico
+ @echo "1 VERSIONINFO" > $(PACKAGE).rc
+ @echo "FILEVERSION `echo $(VERSION) | $(AWK) '{ gsub(/\./,","); print }'`,0" >> $(PACKAGE).rc
+ @echo "PRODUCTVERSION `echo $(VERSION) | $(AWK) '{ gsub(/\./,","); print }'`,0" >> $(PACKAGE).rc
+ @echo "FILEFLAGSMASK 0" >> $(PACKAGE).rc
+ @echo "FILEOS 0x40000" >> $(PACKAGE).rc
+ @echo "FILETYPE 1" >> $(PACKAGE).rc
+ @echo "{" >> $(PACKAGE).rc
+ @echo " BLOCK \"StringFileInfo\"" >> $(PACKAGE).rc
+ @echo " {" >> $(PACKAGE).rc
+ @echo " BLOCK \"040904E4\"" >> $(PACKAGE).rc
+ @echo " {" >> $(PACKAGE).rc
+ @echo " VALUE \"CompanyName\", \"LGames - Michael Speck\"" >> $(PACKAGE).rc
+ @echo " VALUE \"FileDescription\", \"@appname@\"" >> $(PACKAGE).rc
+ @echo " VALUE \"FileVersion\", \"$(VERSION)\"" >> $(PACKAGE).rc
+ @echo " VALUE \"InternalName\", \"$(PACKAGE)\"" >> $(PACKAGE).rc
+ @echo " VALUE \"LegalCopyright\", \"GNU Public License\"" >> $(PACKAGE).rc
+ @echo " VALUE \"OriginalFilename\", \"$(PACKAGE)$(EXEEXT)\"" >> $(PACKAGE).rc
+ @echo " VALUE \"ProductName\", \"@appname@\"" >> $(PACKAGE).rc
+ @echo " VALUE \"ProductVersion\", \"$(VERSION)\"" >> $(PACKAGE).rc
+ @echo " }" >> $(PACKAGE).rc
+ @echo " }" >> $(PACKAGE).rc
+ @echo "}" >> $(PACKAGE).rc
+ @echo "0 ICON win32.ico" >> $(PACKAGE).rc
+ @windres -o $@ -i $(PACKAGE).rc
+
+install-data-local:
+#directories
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/stone
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/metal
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/gfx/wood
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/sounds
+ $(mkinstalldirs) $(DESTDIR)$(inst_dir)/levels
+#data files
+ for file in $(DATA_FILES); do\
+ $(INSTALL_DATA) $$file $(DESTDIR)$(inst_dir)/$$file;\
+ done
+#profiles
+ $(mkinstalldirs) $(DESTDIR)$(prf_dir)
+ if ! test -f $(DESTDIR)$(prf_dir)/lmarbles.prfs; then \
+ $(INSTALL_DATA) -m 666 empty.prfs $(DESTDIR)$(prf_dir)/lmarbles.prfs; \
+ fi;
+
+uninstall-local:
+ rm -rf $(DESTDIR)$(inst_dir)
+ rm -f $(DESTDIR)$(prf_dir)/lmarbles.prfs
+
+win32-install-script:
+ @$(STRIP) $(PACKAGE)$(EXEEXT)
+ @echo "Source: \"$(win32rootdir)\\$(PACKAGE)$(EXEEXT)\"; DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@
+ @for file in $(DATA_FILES) $(DOC_FILES); do \
+ win32src=$(win32rootdir)\\`echo $$file | awk '{ gsub("/","\\\\"); print }'`; \
+ win32dest=`dirname $$file | awk '{ gsub("/","\\\\"); print }'`; \
+ echo "Source: \"$$win32src\"; DestDir: \"{app}\\$$win32dest\"; CopyMode: alwaysoverwrite" >> @win32_inst_script@; \
+ done
+
+ @list='$(SUBDIRS)'; for subdir in $$list; do \
+ (cd $$subdir \
+ && $(MAKE) $(AM_MAKEFLAGS) win32-install-script); \
+ done
+# 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/project/jni/application/lmarbles-1.0.8/src/audio.c b/project/jni/application/lmarbles-1.0.8/src/audio.c
new file mode 100644
index 000000000..4f91c34c7
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/audio.c
@@ -0,0 +1,151 @@
+/***************************************************************************
+ sound.c - description
+ -------------------
+ begin : Sun Jul 29 2001
+ copyright : (C) 2001 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifdef SOUND
+
+#include
+#include "audio.h"
+
+/*
+====================================================================
+If audio device was properly initiated this flag is set.
+If this flag is not set; no action will be taken for audio.
+====================================================================
+*/
+int audio_ok = 0;
+/*
+====================================================================
+If this flag is not set no sound is played.
+====================================================================
+*/
+int sound_enabled = 1;
+
+/*
+====================================================================
+Initiate/close audio
+====================================================================
+*/
+int audio_open()
+{
+ if ( Mix_OpenAudio( MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, 256 ) < 0 ) {
+ fprintf( stderr, "audio_open: can't open audio device: %s\n", SDL_GetError() );
+ audio_ok = 0;
+ return 0;
+ }
+ audio_ok = 1;
+ return 1;
+}
+void audio_close()
+{
+ if ( !audio_ok ) return;
+ Mix_CloseAudio();
+}
+
+/*
+====================================================================
+Sound chunk
+====================================================================
+*/
+Sound_Chunk* sound_chunk_load( char *file_name )
+{
+ char path[512];
+ Mix_Chunk *chunk = 0;
+
+ if ( !audio_ok ) {
+ fprintf( stderr,
+ "sound_chunk_load: cannot load WAV '%s' as audio device isn't initated properly\n",
+ file_name );
+ return 0;
+ }
+
+ /* use SRCDIR/sounds as source directory */
+ sprintf( path, "%s/sounds/%s", SRC_DIR, file_name );
+
+ chunk = Mix_LoadWAV( path );
+ if ( chunk == 0 )
+ {
+ fprintf( stderr, "chunk_load: couldn't load WAV '%s': %s\n", path, SDL_GetError() );
+ }
+ return (Sound_Chunk*)chunk;
+}
+void sound_chunk_free( Sound_Chunk **chunk )
+{
+ if ( !audio_ok ) return;
+ Mix_FreeChunk( (Mix_Chunk*)(*chunk) );
+ *chunk = 0;
+}
+
+/*
+====================================================================
+Sound stuff
+====================================================================
+*/
+
+/*
+====================================================================
+Enable/disable sound
+====================================================================
+*/
+void sound_enable( int enable )
+{
+ if ( !audio_ok ) return;
+ sound_enabled = enable;
+ if ( !enable )
+ Mix_Pause( -1 ); /* stop all sound channels */
+}
+/*
+====================================================================
+Set general volume of sounds. 0 - 127
+====================================================================
+*/
+void sound_volume( int level )
+{
+ if ( !audio_ok ) return;
+ if ( level < 0 ) level = 0;
+ if ( level > 127 ) level = 127;
+ Mix_Volume( -1, level ); /* all sound channels */
+}
+/*
+====================================================================
+Play a chunk.
+====================================================================
+*/
+void sound_play( Sound_Chunk *chunk )
+{
+ if ( !audio_ok ) return;
+ if ( !sound_enabled ) return;
+ /* use first free sound channel and play sound one time */
+ Mix_PlayChannel( -1, (Mix_Chunk*)chunk, 0 );
+}
+
+/*
+====================================================================
+Music stuff
+====================================================================
+*/
+
+/*
+====================================================================
+Set general volume of sounds. 0 - 127
+====================================================================
+*/
+void music_volume( int level )
+{
+ /* not implemented */
+}
+
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/src/audio.h b/project/jni/application/lmarbles-1.0.8/src/audio.h
new file mode 100644
index 000000000..f46cdf1ef
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/audio.h
@@ -0,0 +1,64 @@
+/***************************************************************************
+ sound.h - description
+ -------------------
+ begin : Sun Jul 29 2001
+ copyright : (C) 2001 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef __AUDIO_H
+#define __AUDIO_H
+
+#ifdef SOUND
+
+/*
+====================================================================
+Wrapper for the SDL_mixer functions.
+====================================================================
+*/
+
+/*
+====================================================================
+Initiate/close audio
+====================================================================
+*/
+int audio_open();
+void audio_close();
+
+/*
+====================================================================
+Sound chunk
+====================================================================
+*/
+typedef Mix_Chunk Sound_Chunk;
+Sound_Chunk* sound_chunk_load( char *file_name );
+void sound_chunk_free( Sound_Chunk **chunk );
+
+/*
+====================================================================
+Sound stuff
+====================================================================
+*/
+void sound_enable( int enable );
+void sound_volume( int level /*0 - 127*/ );
+void sound_play( Sound_Chunk *chunk );
+
+/*
+====================================================================
+Music stuff
+====================================================================
+*/
+void music_volume( int level );
+
+#endif
+
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/src/cfg.c b/project/jni/application/lmarbles-1.0.8/src/cfg.c
new file mode 100644
index 000000000..2831c1b61
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/cfg.c
@@ -0,0 +1,190 @@
+/***************************************************************************
+ cfg.c - description
+ -------------------
+ begin : Sat Aug 5 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "cfg.h"
+#include "sdl.h"
+#include
+#include
+#include
+#include "file.h"
+#include
+#include
+#include
+
+#ifdef _WIN32
+ #define MKDIR(d, p) mkdir(d)
+#else
+ #define MKDIR mkdir
+#endif
+
+char c_pth[512];
+Cfg cfg;
+
+/*
+ get the full path of the cfg file
+*/
+void C_StPth()
+{
+ DIR *dir;
+#ifdef _WIN32
+ snprintf( c_pth, sizeof(c_pth)-1, "%s/lgames", (getenv( "HOME" )?getenv( "HOME" ):".") );
+#else
+ snprintf( c_pth, sizeof(c_pth)-1, "%s/.lgames", getenv( "HOME" ) );
+#endif
+ /* create .lgames directory if not found */
+ if ( (dir = opendir( c_pth )) == 0 ) {
+ fprintf( stderr, "Config directory ~/.lgames not found. Creating it.\n" );
+ MKDIR( c_pth, S_IRWXU );
+ }
+ else
+ {
+ closedir(dir);
+ }
+ /* get full path of config file */
+ strcat( c_pth, "/lmarbles.conf" );
+}
+
+/*
+ load it
+*/
+void C_Ld()
+{
+ char str[256];
+ FILE *f;
+ struct stat dir_stat;
+
+ printf("loading configuration...\n");
+
+ // load init //
+ if ((f = fopen(c_pth, "r")) == 0) {
+ printf("cfg file '%s' not found; using defaults\n", c_pth);
+ C_Def();
+ }
+ else {
+ stat( c_pth, &dir_stat );
+ if ( dir_stat.st_size != sizeof( Cfg ) ) {
+ fprintf( stderr, "config file '%s' corrupted... using defaults\n", c_pth );
+ C_Def();
+ }
+ else
+
+ {
+#ifdef ASCII
+
+ F_GetE(f, str, F_VAL);
+ if (strncmp(str,"ascii",5)) {
+
+ printf("cfg file '%s' not in ascii; using defaults\n", c_pth);
+ C_Def();
+
+ }
+ else {
+
+ F_GetE(f, cfg.prf_nm, F_VAL); cfg.prf_nm[strlen(cfg.prf_nm) - 1] = 0;
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.prf);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.s_vol);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.s_on);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.ani);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.trp);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.fscr);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.dim);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.diff);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.k_up);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.k_down);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.k_left);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.k_right);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &cfg.k_undo);
+
+ }
+#else
+
+ fread(str, 5, 1, f);
+ if (!strncmp(str,"ascii",5)) {
+
+ printf("cfg file '%s' in ascii but raw binary data expected; using defaults\n", c_pth);
+ C_Def();
+
+ }
+ else {
+
+ fseek(f,SEEK_SET,0);
+ fread(&cfg, sizeof(Cfg), 1, f);
+
+ }
+
+#endif
+ }
+
+ fclose(f);
+ }
+}
+
+/*
+ save it
+*/
+void C_Sv()
+{
+ //save init //
+ FILE *f = fopen(c_pth, "w");
+#ifdef ASCII
+ char str[256];
+
+ F_WrtE(f, "ascii");
+ F_WrtE(f, cfg.prf_nm);
+ F_IntToStr(str, cfg.prf); F_WrtE(f, str);
+ F_IntToStr(str, cfg.s_vol); F_WrtE(f, str);
+ F_IntToStr(str, cfg.s_on); F_WrtE(f, str);
+ F_IntToStr(str, cfg.ani); F_WrtE(f, str);
+ F_IntToStr(str, cfg.trp); F_WrtE(f, str);
+ F_IntToStr(str, cfg.fscr); F_WrtE(f, str);
+ F_IntToStr(str, cfg.dim); F_WrtE(f, str);
+ F_IntToStr(str, cfg.diff); F_WrtE(f, str);
+ F_IntToStr(str, cfg.k_up); F_WrtE(f, str);
+ F_IntToStr(str, cfg.k_down); F_WrtE(f, str);
+ F_IntToStr(str, cfg.k_left); F_WrtE(f, str);
+ F_IntToStr(str, cfg.k_right); F_WrtE(f, str);
+ F_IntToStr(str, cfg.k_undo); F_WrtE(f, str);
+#else
+ fwrite(&cfg, sizeof(Cfg), 1, f);
+#endif
+
+ fclose(f);
+}
+
+/*
+ default values
+*/
+void C_Def()
+{
+ strcpy(cfg.prf_nm, "Michael");
+ cfg.prf = 0;
+ // sound //
+ cfg.s_vol = 6;
+ cfg.s_on = 1;
+ // gfx //
+ cfg.ani = 1;
+ cfg.trp = 1;
+ cfg.fscr = 0;
+ cfg.dim = 1;
+ cfg.diff = DIFF_NORMAL;
+ // controls
+ cfg.k_up = SDLK_UP;
+ cfg.k_down = SDLK_DOWN;
+ cfg.k_left = SDLK_LEFT;
+ cfg.k_right = SDLK_RIGHT;
+ cfg.k_undo = SDLK_SPACE;
+}
diff --git a/project/jni/application/lmarbles-1.0.8/src/cfg.h b/project/jni/application/lmarbles-1.0.8/src/cfg.h
new file mode 100644
index 000000000..216c46dbf
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/cfg.h
@@ -0,0 +1,56 @@
+/***************************************************************************
+ cfg.h - description
+ -------------------
+ begin : Sat Aug 5 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef CFG_H
+#define CFG_H
+
+enum {
+ DIFF_EASY = 0,
+ DIFF_NORMAL,
+ DIFF_HARD,
+ DIFF_BRAINSTORM
+};
+
+// config file //
+typedef struct {
+ // profile
+ char prf_nm[12];
+ int prf;
+ // level set //
+ int ls;
+ // sound
+ int s_on;
+ int s_vol;
+ // gfx //
+ int ani;
+ int trp;
+ int fscr; // fullscreen
+ int dim; // dim effect on?
+ int diff; // difficulty
+ int k_up; // controls
+ int k_down;
+ int k_left;
+ int k_right;
+ int k_undo;
+} Cfg;
+
+void C_StPth();
+void C_Ld();
+void C_Sv();
+void C_Def();
+
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/src/dynlist.c b/project/jni/application/lmarbles-1.0.8/src/dynlist.c
new file mode 100644
index 000000000..f1fb85d77
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/dynlist.c
@@ -0,0 +1,271 @@
+/***************************************************************************
+ dynlist.c - description
+ -------------------
+ begin : Sat Apr 8 2000
+ copyright : (C) 2000 by
+ email :
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "dynlist.h"
+#include
+#include
+#include
+
+/*
+ initialize list
+*/
+void DL_Ini(DLst *dlst)
+{
+ dlst->cntr = 0;
+ dlst->hd.p = dlst->tl.n = 0;
+ dlst->hd.n = &dlst->tl;
+ dlst->tl.p = &dlst->hd;
+ dlst->hd.d = dlst->tl.d = 0;
+ dlst->flgs = DL_NONE;
+ dlst->cb = 0;
+}
+
+/*
+ insert an item at index
+*/
+int DL_Ins(DLst *dlst, unsigned int index, void *item)
+{
+ int i;
+ DL_E *cur = &dlst->hd;
+ DL_E *new_entry;
+
+ if (index > dlst->cntr) {
+ fprintf(stderr, "ERR: dl_insert: index %i out of range...\n", index);
+ return 1;
+ }
+ if (item == 0) {
+ fprintf(stderr, "ERR: dl_insert: item is NULL...\n");
+ return 1;
+ }
+
+ for (i = 0; i < index; i++)
+ cur = cur->n;
+ new_entry = (DL_E*)malloc(sizeof(DL_E));
+ new_entry->d = item;
+ new_entry->n = cur->n;
+ new_entry->p = cur;
+ cur->n->p = new_entry;
+ cur->n = new_entry;
+ dlst->cntr++;
+
+ return 0;
+}
+
+/*
+ insert at the end of the list
+*/
+int DL_Add(DLst *dlst, void *item)
+{
+ return DL_Ins(dlst, dlst->cntr, item);
+}
+
+/*
+ delete an entry
+*/
+int DL_DelE(DLst *dlst, DL_E *e)
+{
+ if (e == 0) {
+ fprintf(stderr, "ERR: dl_delete: entry is NULL...\n");
+ return 1;
+ }
+ if (dlst->cntr == 0) {
+ fprintf(stderr, "ERR: dl_delete: list is empty...\n");
+ return 1;
+ }
+ if (e == &dlst->hd || e == &dlst->tl) {
+ fprintf(stderr, "ERR: dl_delete: trying to delete hd or tl..\n");
+ return 1;
+ }
+
+ e->p->n = e->n;
+ e->n->p = e->p;
+ dlst->cntr--;
+
+ if (dlst->flgs & DL_AUTODEL) {
+ if (dlst->flgs & DL_NOCB)
+ free(e->d);
+ else {
+ if (dlst->cb == 0) {
+ fprintf(stderr, "ERR: dl_delete: no destroy callback installed...\n");
+ free(e);
+ return 1;
+ }
+ (dlst->cb)(e->d);
+ }
+ }
+ free(e);
+
+ return 0;
+}
+
+/*
+ delete entry containing this item
+*/
+int DL_DelP(DLst *dlst, void *item)
+{
+ int i;
+ DL_E *cur = &dlst->hd;
+
+ if (item == 0) {
+ fprintf(stderr, "ERR: dl_delete: item is NULL...\n");
+ return 1;
+ }
+ if (dlst->cntr == 0) {
+ fprintf(stderr, "ERR: dl_delete: list is empty...\n");
+ return 1;
+ }
+
+ for (i = 0; i <= dlst->cntr; i++)
+ if (cur->n != &dlst->tl) {
+ cur = cur->n;
+ if (cur->d == item)
+ break;
+ }
+ else {
+ fprintf(stderr, "ERR: dl_delete: list does not contain item 0x%x...\n", (int)item);
+ return 1;
+ }
+
+ cur->n->p = cur->p;
+ cur->p->n = cur->n;
+ dlst->cntr--;
+ cur->n = cur->p = 0;
+
+ if (dlst->flgs & DL_AUTODEL) {
+ if (dlst->flgs & DL_NOCB)
+ free(cur->d);
+ else {
+ if (dlst->cb == 0) {
+ fprintf(stderr, "ERR: dl_delete: no destroy callback installed...\n");
+ free(cur);
+ return 1;
+ }
+ (dlst->cb)(cur->d);
+ }
+ }
+ free(cur);
+
+ return 0;
+}
+
+/*
+ delete item at index
+*/
+int DL_Del(DLst *dlst, unsigned int index)
+{
+ int i;
+ DL_E *cur = &dlst->hd;
+
+ if (index >= dlst->cntr) {
+ fprintf(stderr, "ERR: dl_delete: index %i out of range...\n", index);
+ return 1;
+ }
+ if (dlst->cntr == 0) {
+ fprintf(stderr, "ERR: dl_delete: list is empty...\n");
+ return 1;
+ }
+
+ for (i = 0; i <= index; i++)
+ cur = cur->n;
+
+ cur->n->p = cur->p;
+ cur->p->n = cur->n;
+ dlst->cntr--;
+ cur->n = cur->p = 0;
+
+ if (dlst->flgs & DL_AUTODEL) {
+ if (dlst->flgs & DL_NOCB)
+ free(cur->d);
+ else {
+ if (dlst->cb == 0) {
+ fprintf(stderr, "ERR: dl_delete: no destroy callback installed...\n");
+ free(cur);
+ return 1;
+ }
+ (dlst->cb)(cur->d);
+ }
+ }
+ free(cur);
+
+ return 0;
+}
+
+/*
+ get the item with index 'index'
+*/
+void* DL_Get(DLst *dlst, int index)
+{
+ unsigned int i;
+ DL_E *cur = &dlst->hd;
+
+ if (index >= dlst->cntr) {
+ fprintf(stderr, "ERR: dl_get: index %i out of range...\n", index);
+ return 0;
+ }
+
+ for (i = 0; i <= (unsigned)index; i++)
+ cur = cur->n;
+
+ return cur->d;
+}
+
+/*
+ get the current entry from a pointer
+*/
+DL_E *DL_GetE(DLst *dlst, void *item)
+{
+ int i;
+ DL_E *cur = &dlst->hd;
+
+ if (item == 0) {
+ fprintf(stderr, "ERR: DL_GetE: item is NULL...\n");
+ return 0;
+ }
+ if (dlst->cntr == 0) {
+ fprintf(stderr, "ERR: DL_GetE: list is empty...\n");
+ return 0;
+ }
+
+ for (i = 0; i <= dlst->cntr; i++)
+ if (cur->n != &dlst->tl) {
+ cur = cur->n;
+ if (cur->d == item)
+ break;
+ }
+ else {
+ fprintf(stderr, "ERR: DL_GetE: list does not contain item 0x%x...\n", (int)item);
+ return 0;
+ }
+
+ return cur;
+}
+
+/*
+ clear all entries of list
+*/
+void DL_Clr(DLst *dlst)
+{
+ DL_E *cur = dlst->hd.n;
+ DL_E *n;
+
+ while (cur != &dlst->tl) {
+ n = cur->n;
+ DL_DelE(dlst, cur);
+ cur = n;
+ }
+
+}
diff --git a/project/jni/application/lmarbles-1.0.8/src/dynlist.h b/project/jni/application/lmarbles-1.0.8/src/dynlist.h
new file mode 100644
index 000000000..98d0c0322
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/dynlist.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+ dynlist.h - description
+ -------------------
+ begin : Sat Apr 8 2000
+ copyright : (C) 2000 by
+ email :
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DYNLIST_H
+#define DYNLIST_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//dl flags
+#define DL_NONE (0)
+#define DL_AUTODEL (1L<<0)
+#define DL_NOCB (1L<<1)
+
+typedef struct _DL_E {
+ struct _DL_E *n;
+ struct _DL_E *p;
+ void *d;
+} DL_E;
+
+typedef struct {
+ unsigned int flgs;
+ unsigned int cntr; //don't edit
+ DL_E hd; //don't edit
+ DL_E tl; //don't edit
+ void (*cb)(void*);
+} DLst;
+
+void DL_Ini(DLst *dlst);
+int DL_Ins(DLst *dlst, unsigned int i, void *item); //insert item
+int DL_Add(DLst *dlst, void *item); //insert at the end
+int DL_DelE(DLst *dlst, DL_E *e);
+int DL_DelP(DLst *dlst, void *item);
+int DL_Del(DLst *dlst, unsigned int i);
+void* DL_Get(DLst *dlst, int i);
+DL_E *DL_GetE(DLst *dlst, void *item);
+void DL_Clr(DLst *dlst); //clear full list
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/src/empty.prfs b/project/jni/application/lmarbles-1.0.8/src/empty.prfs
new file mode 100644
index 000000000..e70262918
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/empty.prfs differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/file.c b/project/jni/application/lmarbles-1.0.8/src/file.c
new file mode 100644
index 000000000..a7219de7c
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/file.c
@@ -0,0 +1,168 @@
+/***************************************************************************
+ file.c - description
+ -------------------
+ begin : Tue Sep 26 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "file.h"
+#include
+#include
+
+int f_ln = 0;
+
+/*
+ read an entry and return if the correct flag is set else read next entry
+*/
+void F_GetE(FILE *f, char *str, int flgs)
+{
+ int i = 0;
+ char c;
+ str[0] = 0;
+ while (!feof(f)) {
+ fread(&c, 1/*sizeof(char)*/, 1, f); /* MUST BE exactly on byte */
+ if (c == 10) {
+ f_ln++; // increase line counter //
+ continue; // ignore returns //
+ }
+ str[i++] = c; str[i] = 0;
+ if ( (c == ';' && flgs & F_VAL) || (c == '>' && flgs & F_SUB) || (c == ')' && flgs & F_COM) )
+ break;
+ if (c == ';' || c == '>' || c == ')')
+ i = 0;
+ }
+ if (i == 1)
+ str[0] = 0;
+}
+
+/*
+ returns the first character bigger than 32
+*/
+char F_FstC(char *str, char **n)
+{
+ int i = 0;
+ while (str[i] <= 32) {
+ i++;
+ if (i >= strlen(str)) return 0;
+ }
+ *n = str + i;
+ return str[i];
+}
+
+/*
+ returns the last character bigger than 32
+*/
+char F_LstC(char *str)
+{
+ int i = strlen(str) - 1;
+ while (str[i] <= 32) {
+ i--;
+ if (i <= 0) return 0;
+ }
+ return str[i];
+}
+
+/*
+ read value to v
+*/
+int F_GetV(char *str, char *v)
+{
+ int i;
+ char *n;
+ for (i = 0; i < strlen(str); i++)
+ if (str[i] == '=') {
+ F_FstC(str + i + 1, &n);
+ strcpy(v, n);
+ v[strlen(v) - 1] = 0; // mask semicolon
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ check entry for type and target name and assign p the value
+*/
+int F_CkE(char *str, int t, char *nm, char *v)
+{
+ char *n;
+
+ if (strlen(str) == 0) return 0;
+
+ if (t & F_VAL) {
+ F_FstC(str, &n);
+ if (strncmp(nm, n, strlen(nm)))
+ return 0;
+ if (v != 0 )
+ return F_GetV(str, v);
+ else
+ return 0;
+ }
+ else
+ if (t & F_SUB) {
+ F_FstC(str, &n);
+ if (!strncmp(nm, n, strlen(nm)))
+ return 1;
+ }
+ else
+ if (t & F_COM && F_FstC(str, 0) == '(' && F_LstC(str) == ')')
+ return 1;
+ return 0;
+}
+
+/*
+ write an entry with a semicolon at its end
+*/
+void F_WrtE(FILE *f, char *str)
+{
+ char f_str[strlen(str) + 2];
+
+ sprintf(f_str, "%s;", str);
+ fwrite(f_str, strlen(f_str), 1, f);
+}
+
+/*
+ convert an integer to string
+*/
+void F_IntToStr(char *str, int i)
+{
+ sprintf(str,"%i", i);
+}
+
+/*
+ convert an float to string
+*/
+void F_FloatToStr(char *str, float f)
+{
+ sprintf(str,"%2.2f",f);
+}
+
+/* convert a value only containing one integer */
+void F_ValToInt(char *str, int *i)
+{
+ str[strlen(str) - 1] = 0;
+ *i = atoi(str);
+}
+
+/* convert a value only containing one float */
+void F_ValToFloat(char *str, float *f)
+{
+ str[strlen(str) - 1] = 0;
+ *f = (float)strtod(str, 0);
+}
+
+/* convert a value only containing one character */
+void F_ValToChar(char *str, char *c)
+{
+ str[strlen(str) - 1] = 0;
+ *c = (char)atoi(str);
+}
diff --git a/project/jni/application/lmarbles-1.0.8/src/file.h b/project/jni/application/lmarbles-1.0.8/src/file.h
new file mode 100644
index 000000000..c08cced79
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/file.h
@@ -0,0 +1,37 @@
+/***************************************************************************
+ file.h - description
+ -------------------
+ begin : Tue Sep 26 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef FILE_H
+#define FILE_H
+
+#include
+
+#define F_SUB 0x0001
+#define F_COM 0x0002
+#define F_VAL 0x0004
+
+void F_GetE(FILE *f, char *str, int flgs);
+int F_CkE(char *str, int t, char *nm, char *v);
+
+void F_WrtE(FILE *f, char *str);
+void F_IntToStr(char *str, int i);
+void F_FloatToStr(char *str, float f);
+void F_ValToInt(char *str, int *i);
+void F_ValToFloat(char *str, float *f);
+void F_ValToChar(char *str, char *c);
+
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/src/game.c b/project/jni/application/lmarbles-1.0.8/src/game.c
new file mode 100644
index 000000000..a3dcf0c1f
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/game.c
@@ -0,0 +1,2839 @@
+/***************************************************************************
+ game.c - description
+ -------------------
+ begin : Mon Aug 14 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "game.h"
+#include
+#include
+#include
+#include "file.h"
+#include "cfg.h"
+#include "menu.h"
+#include "timer.h"
+
+Game gm;
+/* levelset names & levelsets -- levels.h */
+extern char **ls_lst;
+extern int ls_n;
+extern DLst l_sts;
+/* line counter -- file.c */
+extern int f_ln;
+/* config -- cfg.c */
+extern Cfg cfg;
+/* Sdl -- sdl.c */
+extern Sdl sdl;
+/* profiles -- profile.c */
+extern DLst prfs;
+/* terminate game -- sdl.c */
+extern int trm_gm;
+
+void modify_score( int *b_lvl, int *b_tm );
+
+/*
+ initialize game
+*/
+void G_Ini()
+{
+ FILE *f;
+ int i;
+ char str[256];
+ int ok = 0;
+ // cursors //
+ char data[32], mask[32];
+ char csr[6][256] = {
+ {
+ 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2, 1, 1, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2, 1, 1, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2, 1, 2, 2, 1, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2, 1, 2, 2, 1, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 1, 2, 1, 1, 2, 1, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 1, 2, 1, 1, 2, 1, 2, 0, 0, 0, 0,
+ 0, 0, 0, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 0, 0, 0,
+ 0, 0, 0, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 0, 0, 0,
+ 0, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 0, 0,
+ 0, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 0, 0,
+ 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 0,
+ 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 0,
+ 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ },
+ {
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2,
+ 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 0,
+ 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 0,
+ 0, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 0, 0,
+ 0, 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 0, 0,
+ 0, 0, 0, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 0, 0, 0,
+ 0, 0, 0, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 0, 0, 0,
+ 0, 0, 0, 0, 2, 1, 2, 1, 1, 2, 1, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 1, 2, 1, 1, 2, 1, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2, 1, 2, 2, 1, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2, 1, 2, 2, 1, 2, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2, 1, 1, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2, 1, 1, 2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0,
+ },
+ {
+ 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 1, 2, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 1, 2, 2, 2, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0,
+ 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 0, 0, 0, 0, 0,
+ 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 0, 0, 0,
+ 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 0,
+ 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2,
+ 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2,
+ 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 0,
+ 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 0, 0, 0,
+ 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 0, 0, 0, 0, 0,
+ 2, 1, 2, 2, 2, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0,
+ 2, 1, 2, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ },
+ {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 2, 1, 2,
+ 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 2, 2, 2, 1, 2,
+ 0, 0, 0, 0, 0, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2,
+ 0, 0, 0, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2,
+ 0, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2,
+ 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
+ 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
+ 0, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2,
+ 0, 0, 0, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 2,
+ 0, 0, 0, 0, 0, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2,
+ 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 2, 2, 2, 1, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 2, 1, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 1, 2,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2,
+ },
+ {
+ 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2,
+ 2, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2,
+ 2, 1, 1, 1, 1, 2, 0, 0, 0, 0, 2, 1, 1, 1, 1, 2,
+ 2, 1, 1, 1, 1, 1, 2, 0, 0, 2, 1, 1, 1, 1, 1, 2,
+ 2, 1, 1, 1, 1, 1, 2, 0, 0, 2, 1, 1, 1, 1, 2, 0,
+ 0, 2, 1, 1, 1, 1, 2, 0, 0, 2, 1, 1, 1, 2, 0, 0,
+ 0, 0, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 0, 0, 0,
+ 0, 0, 2, 1, 1, 1, 2, 0, 0, 2, 1, 1, 1, 2, 0, 0,
+ 0, 2, 1, 1, 1, 1, 2, 0, 0, 2, 1, 1, 1, 1, 2, 0,
+ 2, 1, 1, 1, 1, 1, 2, 0, 0, 2, 1, 1, 1, 1, 1, 2,
+ 2, 1, 1, 1, 1, 2, 0, 0, 0, 0, 2, 1, 1, 1, 1, 2,
+ 2, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2,
+ 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2,
+ },
+ {
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2,
+ 0, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 2, 0,
+ 0, 2, 1, 1, 2, 2, 2, 0, 0, 2, 2, 1, 1, 1, 2, 0,
+ 0, 0, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 0, 0,
+ 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0,
+ 0, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2, 2, 1, 1, 1, 1, 2, 2, 0, 0, 0, 0,
+ 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0,
+ 0, 0, 2, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 2, 0, 0,
+ 0, 2, 1, 2, 0, 2, 1, 1, 1, 1, 2, 0, 2, 1, 2, 0,
+ 0, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 0,
+ 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ }
+ };
+
+ // initialize dyn list l_sts
+ DL_Ini(&l_sts);
+ l_sts.flgs = DL_AUTODEL;
+ l_sts.cb = L_DelSt;
+ // load level sets
+ printf("loading levelsets...\n");
+ for (i = 0; i < ls_n; i++) {
+ printf("%s... ", ls_lst[i]);
+ sprintf(str, "%s/levels/%s", SRC_DIR, ls_lst[i]);
+ f = fopen(str, "r");
+ if (f != 0) {
+ f_ln = 1;
+ if (L_LdSt(f)) {
+ ok = 1;
+ strcpy(((LSet*)l_sts.tl.p->d)->nm, ls_lst[i]);
+ }
+ else
+ L_AddInvSt(ls_lst[i]);
+ fclose(f);
+ }
+ else {
+ L_AddInvSt(ls_lst[i]);
+ printf("WARNING: levelset not found...\n");
+ }
+ }
+
+ // found something ? //
+ if (!ok) {
+ printf("ERROR: no valid level set found; need at least one level set...\n");
+ exit(1);
+ }
+
+ /* clear gm struct */
+ //memset( &gm, 0, sizeof( gm ) );
+
+ // initialize gfx set
+ DL_Ini(&gm.g_sts);
+ gm.g_sts.flgs = DL_AUTODEL;
+ gm.g_sts.cb = G_DelGSt;
+ // load gfx sets
+ G_LdGSts();
+
+ // load board
+ gm.s_brd = SS_Ld("gfx/board.bmp", SDL_SWSURFACE);
+ SDL_SetColorKey(gm.s_brd, 0, 0);
+ // load lights
+ gm.s_lghts = SS_Ld("gfx/lights.bmp", SDL_SWSURFACE);
+ // load marbles
+ gm.s_mrb = SS_Ld("gfx/marbles.bmp", SDL_SWSURFACE);
+ // load figure
+ gm.s_fig = SS_Ld("gfx/figure.bmp", SDL_SWSURFACE);
+ // load marble frame
+ gm.s_mf = SS_Ld("gfx/m_frame.bmp", SDL_SWSURFACE);
+ // load marble select frame
+ gm.s_msf = SS_Ld("gfx/m_sframe.bmp", SDL_SWSURFACE);
+ // background //
+ gm.s_bkgd = 0;
+
+ // load fonts
+ gm.f_sml = SF_LdFxd("gfx/f_small.bmp", 32, 96, 8);
+ gm.f_wht = SF_LdFxd("gfx/f_white.bmp", 32, 96, 10);
+ gm.f_rd = SF_LdFxd("gfx/f_red.bmp", 32, 96, 10);
+
+ // level
+ gm.c_lvl = 0;
+
+ // marble
+ gm.m_v = 0.15;
+ gm.m_a.p = 0;
+ gm.m_a.f = 4;
+ gm.m_a.c = 0.016 + 0.008;
+ gm.m_a.w = gm.m_a.h = 32;
+ gm.m_act = M_EMPTY;
+ gm.m_o_x = gm.m_o_y = -1;
+ gm.m_warp = 0;
+
+ // marble select frame
+ gm.msf_a.f = 4;
+ gm.msf_a.w = gm.msf_a.h = 40;
+ gm.msf_a.c = 0.02;
+ gm.msf_a.p = 0;
+
+ // marble frame
+ gm.mf_a.f = 4;
+ gm.mf_a.w = gm.mf_a.h = 40;
+ gm.mf_a.c = 0.02;
+ gm.mf_a.p = 0;
+
+ // layout
+ gm.b_x = 640 - 200;
+ gm.f_x = 35;
+ gm.f_y = 145;
+ gm.i_x = 20;
+ gm.i_y = 25;
+ gm.t_x = 40;
+ gm.t_y = 105;
+ gm.s_x = 15;
+ gm.s_y = 290;
+
+ // geometry
+ gm.t_w = gm.t_h = 32;
+ gm.f_w = gm.f_h = 12;
+ gm.f_fw = gm.f_fh = 130;
+ gm.scr_w = 640;
+ gm.scr_h = 480;
+ gm.brd_w = 200;
+ gm.s_w = 170;
+ gm.s_h = 175;
+ gm.c_off = 12;
+
+ // cursors
+ memset(data, 0, sizeof(data));
+ gm.c_u = gm.c_d = gm.c_l = gm.c_r = gm.c_s = gm.c_w = 0;
+ gm.c_n = SDL_GetCursor();
+ Cr_Ld(csr[0], data, mask);
+ gm.c_u = SDL_CreateCursor(data, mask, 16, 16, 8, 8);
+ Cr_Ld(csr[1], data, mask);
+ gm.c_d = SDL_CreateCursor(data, mask, 16, 16, 8, 8);
+ Cr_Ld(csr[2], data, mask);
+ gm.c_r = SDL_CreateCursor(data, mask, 16, 16, 8, 8);
+ Cr_Ld(csr[3], data, mask);
+ gm.c_l = SDL_CreateCursor(data, mask, 16, 16, 8, 8);
+ Cr_Ld(csr[4], data, mask);
+ gm.c_s = SDL_CreateCursor(data, mask, 16, 16, 8, 8);
+ Cr_Ld(csr[5], data, mask);
+ gm.c_w = SDL_CreateCursor(data, mask, 16, 16, 8, 8);
+
+ // map animations
+ gm.m_ani = 0;
+
+ // oneway animation info
+ gm.ma_ow_a.f = 4;
+ gm.ma_ow_a.c = 0.008;
+ gm.ma_ow_a.p = 0;
+ gm.ma_ow_a.w = gm.t_w;
+ gm.ma_ow_a.h = gm.t_h;
+
+ // teleport information
+ gm.ma_tlp_a.f = 4;
+ gm.ma_tlp_a.c = 0.008;
+ gm.ma_tlp_a.p = 0;
+ gm.ma_tlp_a.w = gm.t_w;
+ gm.ma_tlp_a.h = gm.t_h;
+ gm.tlp_a = 32;
+
+ // sounds
+#ifdef SOUND
+ gm.wv_tlp = sound_chunk_load("teleport.wav");
+ gm.wv_sel = sound_chunk_load("select.wav");
+ gm.wv_stp = sound_chunk_load("stop.wav");
+ gm.wv_clk = sound_chunk_load("click.wav");
+ gm.wv_exp = sound_chunk_load("explode.wav");
+ gm.wv_alm = sound_chunk_load("alarm.wav");
+ gm.wv_arw = sound_chunk_load("arrow.wav");
+ gm.wv_scr = sound_chunk_load("score.wav");
+#endif
+
+ // shrapnells
+ DL_Ini(&gm.shr);
+ gm.shr.flgs = DL_AUTODEL;
+ gm.shr.cb = Shr_Del;
+ gm.shr_a_c = 0.1;
+
+ // credits
+ gm.cr_a_c = 0.1;
+ gm.cr_tm = 3000;
+ gm.cr_y = 10;
+
+ // shnapshot
+ gm.snap = 0;
+}
+
+/*
+ terminate game
+*/
+void G_Trm()
+{
+ // release gfx
+ if (gm.s_brd) SDL_FreeSurface(gm.s_brd);
+ if (gm.s_lghts) SDL_FreeSurface(gm.s_lghts);
+ if (gm.s_mrb) SDL_FreeSurface(gm.s_mrb);
+ if (gm.s_fig) SDL_FreeSurface(gm.s_fig);
+ if (gm.s_mf) SDL_FreeSurface(gm.s_mf);
+ if (gm.s_msf) SDL_FreeSurface(gm.s_msf);
+ // release fonts
+ if (gm.f_sml) SF_Fr(gm.f_sml);
+ if (gm.f_wht) SF_Fr(gm.f_wht);
+ if (gm.f_rd) SF_Fr(gm.f_rd);
+ // release dynlists
+ DL_Clr(&gm.g_sts);
+ DL_Clr(&l_sts);
+ DL_Clr(&gm.shr);
+ // cursors //
+ if (gm.c_u) SDL_FreeCursor(gm.c_u);
+ if (gm.c_d) SDL_FreeCursor(gm.c_d);
+ if (gm.c_l) SDL_FreeCursor(gm.c_l);
+ if (gm.c_r) SDL_FreeCursor(gm.c_r);
+ if (gm.c_s) SDL_FreeCursor(gm.c_s);
+ if (gm.c_w) SDL_FreeCursor(gm.c_w);
+ // free map animations //
+ if (gm.m_ani)
+ free(gm.m_ani);
+ // sounds
+#ifdef SOUND
+ if (gm.wv_tlp) sound_chunk_free(&gm.wv_tlp);
+ if (gm.wv_sel) sound_chunk_free(&gm.wv_sel);
+ if (gm.wv_stp) sound_chunk_free(&gm.wv_stp);
+ if (gm.wv_clk) sound_chunk_free(&gm.wv_clk);
+ if (gm.wv_exp) sound_chunk_free(&gm.wv_exp);
+ if (gm.wv_alm) sound_chunk_free(&gm.wv_alm);
+ if (gm.wv_arw) sound_chunk_free(&gm.wv_arw);
+ if (gm.wv_scr) sound_chunk_free(&gm.wv_scr);
+#endif
+}
+
+/*
+ open a new game
+*/
+int G_Opn()
+{
+ Prf *p;
+ DL_E *e;
+ int flgs = SDL_SWSURFACE;
+
+ // get current level set
+ gm.c_l_st = (LSet*)DL_Get(&l_sts, cfg.ls);
+
+ // check if current level set is valid
+ if (!G_CkLSt()) {
+ // restore menu
+ MM_Shw(MM_RSZ);
+
+ return 0;
+ }
+
+ // current profile
+ gm.c_prf = (Prf*)DL_Get(&prfs, cfg.prf);
+
+ // current set info
+ gm.c_s_inf = Prf_RegLS(gm.c_prf, gm.c_l_st);
+
+ // dim & resize
+ if (cfg.dim)
+ SDL_DIM();
+ if (cfg.fscr)
+ flgs = flgs | SDL_FULLSCREEN;
+ Sdl_StVdMd(gm.scr_w, gm.scr_h, 16, flgs);
+
+ // create background
+ gm.s_bkgd = SS_Crt(gm.scr_w, gm.scr_h, SDL_SWSURFACE);
+ SDL_SetColorKey(gm.s_bkgd, 0, 0);
+
+ // get highest score
+ gm.hi_scr = 0;
+ e = prfs.hd.n;
+ while (e != &prfs.tl) {
+ p = (Prf*)e->d;
+ if (p->scr > gm.hi_scr)
+ gm.hi_scr = p->scr;
+ e = e->n;
+ }
+
+ // clear old chapter
+ gm.o_ch = -1;
+
+ // init first level
+ L_Ini(0, 0);
+
+ return 1;
+}
+
+/*
+ close game
+*/
+void G_Cls()
+{
+ // dim
+ if (!trm_gm && cfg.dim)
+ SDL_DIM();
+
+ // free background
+ if (gm.s_bkgd) SDL_FreeSurface(gm.s_bkgd);
+
+ // free level
+ free(gm.c_lvl);
+ gm.c_lvl = 0;
+
+ // restore cursor
+ SDL_SetCursor(gm.c_n);
+
+ // show menu
+ MM_Shw(MM_RSZ);
+}
+
+/*
+ game's main loop
+*/
+void G_Run()
+{
+ int leave = 0;
+ int restart = 0;
+ int ms;
+ SDL_Event ev;
+ SDL_Surface *buf;
+ int flgs;
+ int restore_pos;
+ int tm_rel = 0;
+ int ign_c_stat = 0;
+ int bonus_level, bonus_moves; /* bonus for level completion and remaining moves */
+
+ while (!trm_gm) {
+ // clear input
+ while (SDL_PollEvent(&ev));
+ // main loop
+ while (!leave && !trm_gm && !gm.l_done && !restart) {
+ // don't consume all cpu time
+ SDL_Delay( 5 );
+
+ restore_pos = 0; // do not restore old position
+ ign_c_stat = 0; // do not ignore cursor state
+ // get input
+ if (SDL_PollEvent(&ev)) {
+ switch (ev.type) {
+ case SDL_QUIT:
+ trm_gm = 1;
+ break;
+ case SDL_KEYUP:
+ switch (ev.key.keysym.sym) {
+ case SDLK_TAB:
+ SnapShot();
+ break;
+ case SDLK_ESCAPE:
+ if (G_CfmQut())
+ leave = 1;
+ break;
+ case SDLK_p:
+ G_Ps();
+ break;
+ case SDLK_r:
+ if (G_CfmRst())
+ restart = 1;
+ break;
+ case SDLK_f:
+ buf = SS_Crt(gm.scr_w, gm.scr_h, SDL_SWSURFACE);
+ D_FDST(buf);
+ D_FSRC(sdl.scr);
+ SS_Blt();
+ cfg.fscr = !cfg.fscr;
+ flgs = SDL_SWSURFACE;
+ if (cfg.fscr)
+ flgs = flgs | SDL_FULLSCREEN;
+ Sdl_StVdMd(gm.scr_w, gm.scr_h, 16, flgs);
+ D_FDST(sdl.scr);
+ D_FSRC(buf);
+ SS_Blt();
+ Sdl_FUpd();
+ break;
+ default:
+ /* if no marble is selected we don't have to check anything */
+ if ( !gm.m_sel )
+ break;
+ /* warp? */
+ if (gm.m_mv && (ev.key.keysym.sym == cfg.k_right || ev.key.keysym.sym == cfg.k_left || ev.key.keysym.sym == cfg.k_up || ev.key.keysym.sym == cfg.k_down)) {
+ gm.m_warp = 1;
+ break;
+ }
+ // undo key
+ if (ev.key.keysym.sym == cfg.k_undo) {
+ restore_pos = 1;
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+ }
+ // up key
+ if (ev.key.keysym.sym == cfg.k_up && (gm.m_vd & MD_U) && !gm.m_mv) {
+ ign_c_stat = 1;
+ gm.c_stat = C_U;
+ Mr_IniMv();
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+ }
+ // down key
+ if (ev.key.keysym.sym == cfg.k_down && (gm.m_vd & MD_D) && !gm.m_mv) {
+ ign_c_stat = 1;
+ gm.c_stat = C_D;
+ Mr_IniMv();
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+ }
+ // left key
+ if (ev.key.keysym.sym == cfg.k_left && (gm.m_vd & MD_L) && !gm.m_mv) {
+ ign_c_stat = 1;
+ gm.c_stat = C_L;
+ Mr_IniMv();
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+ }
+ // right key
+ if (ev.key.keysym.sym == cfg.k_right && (gm.m_vd & MD_R) && !gm.m_mv) {
+ ign_c_stat = 1;
+ gm.c_stat = C_R;
+ Mr_IniMv();
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+ }
+ break;
+ }
+ break;
+ case SDL_MOUSEBUTTONDOWN:
+ break;
+ case SDL_MOUSEBUTTONUP:
+ if ( ev.button.button == 1 && gm.m_mv &&
+ ( gm.c_l_st->limit_type == MOVES ) ) {
+ gm.m_warp = 1;
+ break;
+ }
+ gm.bttn[ev.button.button] = 1;
+ if (ev.button.button == 1) {
+ if (gm.c_stat == C_SEL)
+ Mr_Sel(ev.button.x, ev.button.y);
+ else
+ if (gm.m_sel && !gm.m_mv) {
+ // start movement of selected marble
+ Mr_IniMv();
+ }
+ }
+ else
+ if (gm.m_sel && !gm.m_mv)
+ Mr_Rel(ev.button.x, ev.button.y);
+ break;
+ case SDL_MOUSEMOTION:
+ if ( !ign_c_stat )
+ Cr_Cng(ev.motion.x, ev.motion.y);
+ gm.o_mx = ev.motion.x;
+ gm.o_my = ev.motion.y;
+ break;
+ default:
+ break;
+ }
+ }
+
+ // hide
+ if (!leave && !restart) {
+ Mr_Hd();
+ MF_Hd();
+ Tm_Hd();
+ Inf_Hd();
+ Shr_Hd();
+ Cr_Hd();
+ }
+
+ // update
+ ms = T_Gt();
+ MA_Upd(ms);
+ if (restore_pos)
+ Mr_ResPos();
+ if ( !Mr_Upd(ms) )
+ restart = 1;
+ MF_Upd(ms);
+ Shr_Upd(ms);
+ Cr_Upd(ms);
+ if (!Tm_Upd(ms))
+ restart = 1;
+ if (Inf_Upd() && G_CfmWrp()) {
+ gm.c_ch = gm.w_c;
+ gm.c_l_id = gm.w_l;
+ restart = 1;
+ }
+
+ // show
+ if (!leave && !restart)
+ MA_Shw();
+ if (!leave && !restart) {
+ Mr_Shw();
+ }
+ if (!leave && !restart && !gm.l_done) {
+ MF_Shw();
+ Tm_Shw();
+ Inf_Shw();
+ Shr_Shw();
+ Cr_Shw();
+
+ // refresh
+ Sdl_UpdR();
+ }
+ else
+ sdl.rnum = 0; // reset redraw regions
+
+ // reset buttonstate
+ memset(gm.bttn, 0, sizeof(gm.bttn));
+ }
+
+ // leave ?
+ if (leave)
+ break;
+
+ // init next level
+ if (gm.l_done || restart) {
+
+ if (gm.l_done) {
+
+ // figure animation
+ FA_Run();
+ // bonus summary
+ if ( !gm.c_s_inf->cmp[gm.c_ch * gm.c_s_inf->l_num + gm.c_l_id] ) {
+
+ /* level wasn't completed until now so gain score for it */
+ bonus_level = LB_COMPLETED;
+ bonus_moves = gm.c_lvl->tm * LB_PER_MOVE;
+ modify_score( &bonus_level, &bonus_moves );
+ BS_Run( bonus_level, bonus_moves );
+ tm_rel = ( 1000 * gm.c_lvl->tm ) / gm.c_l_st->ch[gm.c_ch].lvls[gm.c_l_id].tm;
+ Prf_Upd(gm.c_prf, gm.c_s_inf, gm.c_ch * gm.c_l_st->l_num + gm.c_l_id, tm_rel, bonus_level + bonus_moves );
+
+ }
+
+ }
+
+ if (cfg.dim)
+ SDL_DIM();
+ if (!restart)
+ if (!L_FndNxt()) // game finished ?
+ break;
+ L_Ini(gm.c_ch, gm.c_l_id);
+ restart = 0;
+ }
+ }
+ // save profiles
+ Prf_Sv();
+}
+
+/*
+ load all gfx sets
+*/
+void G_LdGSts()
+{
+ char d_nm[256];
+ char path[256+64];
+ DIR *dir = 0;
+ struct dirent *e;
+ struct stat s;
+ GSet *g_st;
+
+ printf("loading graphics sets...\n");
+
+ // create directory string //
+ sprintf(d_nm, "%s/gfx", SRC_DIR);
+
+ // find and open directory //
+ if ((dir = opendir(d_nm)) == 0) {
+ fprintf(stderr, "ERROR: can't find directory '%s'\n", d_nm);
+ exit(1);
+ }
+
+ // well, let's check for directories //
+ while ((e = readdir(dir)) != 0) {
+ sprintf(path, "%s/%s", d_nm, e->d_name);
+ stat(path, &s);
+ if (S_ISDIR(s.st_mode) && e->d_name[0] != '.') {
+ printf("'%s'... \n", e->d_name);
+ // load gfx //
+ g_st = (GSet*)malloc(sizeof(GSet));
+ memset(g_st, 0, sizeof(GSet));
+ strcpy(g_st->nm, e->d_name);
+ g_st->ok = 1;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "background.bmp");
+ g_st->s_bkgd = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL);
+ SDL_SetColorKey(g_st->s_bkgd, 0, 0);
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "wall.bmp");
+ if ((g_st->s_wl = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "floor.bmp");
+ if ((g_st->s_flr = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "arrow_r.bmp");
+ if ((g_st->s_r_arw = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "arrow_l.bmp");
+ if ((g_st->s_l_arw = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "arrow_u.bmp");
+ if ((g_st->s_u_arw = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "arrow_d.bmp");
+ if ((g_st->s_d_arw = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "barrier_lr.bmp");
+ if ((g_st->s_lr_bar = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "barrier_ud.bmp");
+ if ((g_st->s_ud_bar = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "teleport0.bmp");
+ if ((g_st->s_tlp_0 = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "teleport1.bmp");
+ if ((g_st->s_tlp_1 = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "teleport2.bmp");
+ if ((g_st->s_tlp_2 = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "teleport3.bmp");
+ if ((g_st->s_tlp_3 = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ sprintf(path, "gfx/%s/%s", e->d_name, "wall_crumble.bmp");
+ if ((g_st->s_crmbl = SS_Ld(path, SDL_SWSURFACE | SDL_NONFATAL)) == 0)
+ g_st->ok = 0;
+
+ if (g_st->ok) {
+ printf("ok\n");
+ // opaque
+ SDL_SetColorKey(g_st->s_flr, 0, 0);
+ SDL_SetColorKey(g_st->s_wl, 0, 0);
+ }
+ DL_Add(&gm.g_sts, g_st);
+ }
+ }
+ closedir(dir);
+}
+
+
+/*
+ delete a gset
+*/
+void G_DelGSt(void *p)
+{
+ GSet *st = (GSet*)p;
+ if (st->s_bkgd) SDL_FreeSurface(st->s_bkgd);
+ if (st->s_wl) SDL_FreeSurface(st->s_wl);
+ if (st->s_flr) SDL_FreeSurface(st->s_flr);
+ if (st->s_u_arw) SDL_FreeSurface(st->s_u_arw);
+ if (st->s_d_arw) SDL_FreeSurface(st->s_d_arw);
+ if (st->s_r_arw) SDL_FreeSurface(st->s_r_arw);
+ if (st->s_l_arw) SDL_FreeSurface(st->s_l_arw);
+ if (st->s_lr_bar) SDL_FreeSurface(st->s_lr_bar);
+ if (st->s_ud_bar) SDL_FreeSurface(st->s_ud_bar);
+ if (st->s_tlp_0) SDL_FreeSurface(st->s_tlp_0);
+ if (st->s_tlp_1) SDL_FreeSurface(st->s_tlp_1);
+ if (st->s_tlp_2) SDL_FreeSurface(st->s_tlp_2);
+ if (st->s_tlp_3) SDL_FreeSurface(st->s_tlp_3);
+ if (st->s_crmbl) SDL_FreeSurface(st->s_crmbl);
+ free(st);
+}
+
+/*
+ pause game
+*/
+void G_Ps()
+{
+ SFnt *ft = gm.f_sml;
+ SDL_Surface *buf;
+ char str[256];
+ SDL_Event e;
+ int leave = 0;
+ int flgs;
+ int mx = gm.o_mx, my = gm.o_my;
+
+ // save screen //
+ buf = SS_Crt(gm.scr_w, gm.scr_h, SDL_SWSURFACE);
+ SDL_SetColorKey(buf, 0, 0);
+ D_FDST(buf);
+ D_FSRC(sdl.scr);
+ SS_Blt();
+
+ // cursor
+ SDL_SetCursor(gm.c_n);
+
+ // fill with black
+ D_FDST(sdl.scr);
+ SS_Fill(0x0);
+
+ // write info
+ ft->algn = TA_X_C | TA_Y_C;
+ sprintf(str, "Game paused");
+ SF_Wrt(ft, sdl.scr, gm.scr_w / 2, gm.scr_h / 2, str, 0);
+
+ Sdl_FUpd();
+
+ // wait for 'p'
+ while (!leave) {
+ SDL_WaitEvent(&e);
+ switch (e.type) {
+ case SDL_QUIT:
+ trm_gm = 1;
+ leave = 1;
+ break;
+ case SDL_KEYUP:
+ if (e.key.keysym.sym == SDLK_p)
+ leave = 1;
+ if (e.key.keysym.sym == SDLK_f) {
+ cfg.fscr = !cfg.fscr;
+ flgs = SDL_SWSURFACE;
+ if (cfg.fscr)
+ flgs = flgs | SDL_FULLSCREEN;
+ Sdl_StVdMd(gm.scr_w, gm.scr_h, 16, flgs);
+ D_FDST(sdl.scr);
+ SS_Fill(0x0);
+ SF_Wrt(ft, sdl.scr, gm.scr_w / 2, gm.scr_h / 2, str, 0);
+ Sdl_FUpd();
+ }
+ break;
+ case SDL_MOUSEMOTION:
+ mx = e.motion.x;
+ my = e.motion.y;
+ break;
+ }
+ }
+
+ // restore screen
+ D_FDST(sdl.scr);
+ D_FSRC(buf);
+ SS_Blt();
+ Sdl_FUpd();
+ SDL_FreeSurface(buf);
+
+ // cursor
+ Cr_Cng(mx, my);
+
+ //reset time //
+ T_Rst();
+}
+
+/*
+ check if the figure has been completed
+*/
+void G_CkFgr()
+{
+ int i, j, k, l;
+ Lvl *lvl = gm.c_lvl;
+
+ for (i = 0; i < lvl->m_w - lvl->f_w; i++)
+ for (j = 0; j < lvl->m_h - lvl->f_h; j++) {
+ gm.l_done = 1;
+ for (k = 0; k < lvl->f_w; k++) {
+ for (l = 0; l < lvl->f_h; l++) {
+ if (lvl->fgr[k][l] != -1)
+ if (lvl->map[i + k][j + l].m != lvl->fgr[k][l]) {
+ gm.l_done = 0;
+ break;
+ }
+ }
+ if (!gm.l_done)
+ break;
+ }
+ if (gm.l_done)
+ return;
+ }
+}
+
+/*
+ confirm warp
+*/
+int G_CfmWrp()
+{
+ SFnt *ft = gm.f_sml;
+ SDL_Surface *buf;
+ SDL_Event e;
+ char str[256];
+ int leave = 0, ret = 0;
+ int mx = gm.o_mx, my = gm.o_my;
+
+ // save screen //
+ buf = SS_Crt(gm.scr_w, gm.scr_h, SDL_SWSURFACE);
+ SDL_SetColorKey(buf, 0, 0);
+ D_FDST(buf);
+ D_FSRC(sdl.scr);
+ SS_Blt();
+
+ // cursor
+ SDL_SetCursor(gm.c_n);
+
+ // fill with black
+ D_FDST(sdl.scr);
+ SS_Fill(0x0);
+
+ // write info
+ ft->algn = TA_X_C | TA_Y_T;
+ sprintf(str, "Your current position is level %i of chapter %i.", gm.c_l_id + 1, gm.c_ch + 1);
+ SF_Wrt(ft, sdl.scr, gm.scr_w / 2, 200, str, 0);
+ sprintf(str, "Do you really want to enter level %i of chapter %i?", gm.w_l + 1, gm.w_c + 1);
+ SF_Wrt(ft, sdl.scr, gm.scr_w / 2, 200 + 15, str, 0);
+ sprintf(str, "(All changes in the current level will be lost!)");
+ SF_Wrt(ft, sdl.scr, gm.scr_w / 2, 200 + 30, str, 0);
+ sprintf(str, "(press y/n)");
+ SF_Wrt(ft, sdl.scr, gm.scr_w / 2, 200 + 50, str, 0);
+
+ Sdl_FUpd();
+
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+ while (!leave) {
+ SDL_WaitEvent(&e);
+ switch (e.type) {
+ case SDL_QUIT:
+ trm_gm = leave = 1;
+ break;
+ case SDL_KEYUP:
+ switch (e.key.keysym.sym) {
+ case SDLK_y:
+ ret = 1;
+ leave = 1;
+ break;
+ case SDLK_n:
+ ret = 0;
+ leave = 1;
+ break;
+ default:
+ break;
+ }
+ break;
+ case SDL_MOUSEBUTTONUP:
+ switch (e.button.button) {
+ case 1:
+ ret = 1;
+ leave = 1;
+ break;
+ default:
+ ret = 0;
+ leave = 1;
+ break;
+ }
+ break;
+ case SDL_MOUSEMOTION:
+ mx = e.motion.x;
+ my = e.motion.y;
+ break;
+ }
+ }
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+
+ // restore screen
+ if (cfg.dim)
+ SDL_DIM();
+ if (!ret) {
+ D_FDST(sdl.scr);
+ D_FSRC(buf);
+ SS_Blt();
+ if (cfg.dim)
+ SDL_UNDIM();
+ else
+ Sdl_FUpd();
+
+ // cursor
+ Cr_Cng(mx, my);
+
+ }
+ SDL_FreeSurface(buf);
+
+ // reset time //
+ T_Rst();
+
+ return ret;
+}
+
+/*
+ confirm quit
+*/
+int G_CfmQut()
+{
+ SFnt *ft = gm.f_sml;
+ SDL_Surface *buf;
+ SDL_Event e;
+ char str[256];
+ int leave = 0, ret = 0;
+ int mx = gm.o_mx, my = gm.o_my;
+
+ // save screen //
+ buf = SS_Crt(gm.scr_w, gm.scr_h, SDL_SWSURFACE);
+ SDL_SetColorKey(buf, 0, 0);
+ D_FDST(buf);
+ D_FSRC(sdl.scr);
+ SS_Blt();
+
+ // cursor
+ SDL_SetCursor(gm.c_n);
+
+ // fill with black
+ D_FDST(sdl.scr);
+ SS_Fill(0x0);
+
+ // write info
+ ft->algn = TA_X_C | TA_Y_C;
+ sprintf(str, "Do you really want to quit? (y/n)");
+ SF_Wrt(ft, sdl.scr, gm.scr_w / 2, gm.scr_h / 2, str, 0);
+
+ Sdl_FUpd();
+
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+ while (!leave) {
+ SDL_WaitEvent(&e);
+ switch (e.type) {
+ case SDL_QUIT:
+ trm_gm = leave = 1;
+ break;
+ case SDL_KEYUP:
+ switch (e.key.keysym.sym) {
+ case SDLK_ESCAPE:
+ case SDLK_y:
+ ret = 1;
+ leave = 1;
+ break;
+ case SDLK_n:
+ ret = 0;
+ leave = 1;
+ break;
+ default:
+ break;
+ }
+ break;
+ case SDL_MOUSEBUTTONUP:
+ switch (e.button.button) {
+ case 1:
+ ret = 1;
+ leave = 1;
+ break;
+ default:
+ ret = 0;
+ leave = 1;
+ break;
+ }
+ break;
+ }
+ }
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+
+ // restore screen
+ if (!ret) {
+ if (cfg.dim)
+ SDL_DIM();
+ D_FDST(sdl.scr);
+ D_FSRC(buf);
+ SS_Blt();
+ if (cfg.dim)
+ SDL_UNDIM();
+ else
+ Sdl_FUpd();
+
+ // cursor
+ Cr_Cng(mx, my);
+
+ }
+ SDL_FreeSurface(buf);
+
+ // reset time //
+ T_Rst();
+
+ return ret;
+}
+
+/*
+ confirm quit
+*/
+int G_CfmRst()
+{
+ SFnt *ft = gm.f_sml;
+ SDL_Surface *buf;
+ SDL_Event e;
+ char str[256];
+ int leave = 0, ret = 0;
+ int mx = gm.o_mx, my = gm.o_my;
+
+ // save screen //
+ buf = SS_Crt(gm.scr_w, gm.scr_h, SDL_SWSURFACE);
+ SDL_SetColorKey(buf, 0, 0);
+ D_FDST(buf);
+ D_FSRC(sdl.scr);
+ SS_Blt();
+
+ // cursor
+ SDL_SetCursor(gm.c_n);
+
+ // fill with black
+ D_FDST(sdl.scr);
+ SS_Fill(0x0);
+
+ // write info
+ ft->algn = TA_X_C | TA_Y_C;
+ sprintf(str, "Do you really want to restart? (y/n)");
+ SF_Wrt(ft, sdl.scr, gm.scr_w / 2, gm.scr_h / 2, str, 0);
+
+ Sdl_FUpd();
+
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+ while (!leave) {
+ SDL_WaitEvent(&e);
+ switch (e.type) {
+ case SDL_QUIT:
+ trm_gm = leave = 1;
+ break;
+ case SDL_KEYUP:
+ switch (e.key.keysym.sym) {
+ case SDLK_r:
+ case SDLK_y:
+ ret = 1;
+ leave = 1;
+ break;
+ case SDLK_n:
+ ret = 0;
+ leave = 1;
+ break;
+ default:
+ break;
+ }
+ break;
+ case SDL_MOUSEBUTTONUP:
+ switch (e.button.button) {
+ case 1:
+ ret = 1;
+ leave = 1;
+ break;
+ default:
+ ret = 0;
+ leave = 1;
+ break;
+ }
+ break;
+ }
+ }
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+
+ // restore screen
+ if (cfg.dim)
+ SDL_DIM();
+ if (!ret) {
+ D_FDST(sdl.scr);
+ D_FSRC(buf);
+ SS_Blt();
+ if (cfg.dim)
+ SDL_UNDIM();
+ else
+ Sdl_FUpd();
+
+ // cursor
+ Cr_Cng(mx, my);
+
+ }
+ SDL_FreeSurface(buf);
+
+ // reset time //
+ T_Rst();
+
+ return ret;
+}
+
+/*
+ check if level set can be played and ask for confirmation if it got errors
+*/
+int G_CkLSt()
+{
+ char str[256];
+ SFnt *ft = gm.f_sml;
+ SDL_Event e;
+
+ if (gm.c_l_st->ch == 0) {
+ D_FDST(sdl.scr);
+ SS_Fill(0x0);
+ sprintf(str, "This level set cannot be played.\n");
+ ft->algn = TA_X_C | TA_Y_C;
+ SF_Wrt(ft, sdl.scr, sdl.scr->w / 2, sdl.scr->h / 2, str, 0);
+ Sdl_FUpd();
+ Sdl_WtFrClk();
+ return 0;
+ }
+ if (!gm.c_l_st->ok) {
+ D_FDST(sdl.scr);
+ SS_Fill(0x0);
+ sprintf(str, "This level set has errors. Play anyway? (y/n)\n");
+ ft->algn = TA_X_C | TA_Y_C;
+ SF_Wrt(ft, sdl.scr, sdl.scr->w / 2, sdl.scr->h / 2, str, 0);
+ Sdl_FUpd();
+ while (1) {
+ if (SDL_WaitEvent(&e))
+ switch (e.type) {
+ case SDL_KEYUP:
+ switch (e.key.keysym.sym) {
+ case SDLK_ESCAPE:
+ case SDLK_n:
+ return 0;
+ case SDLK_y:
+ return 1;
+ default:
+ break;
+ }
+ case SDL_MOUSEBUTTONUP:
+ switch (e.button.button) {
+ case 1:
+ return 1;
+ default:
+ return 0;
+ break;
+ }
+ break;
+ }
+ }
+ }
+ return 1;
+}
+
+// marble //
+/*
+ hide current marble
+*/
+void Mr_Hd()
+{
+ if (!gm.m_sel) return;
+ D_DST(sdl.scr, (int)gm.m_x, (int)gm.m_y, gm.t_w, gm.t_h);
+ D_SRC(gm.s_bkgd, (int)gm.m_x, (int)gm.m_y);
+ SS_Blt();
+ Sdl_AddR((int)gm.m_x, (int)gm.m_y, gm.t_w, gm.t_h);
+}
+
+/*
+ show current marble
+*/
+void Mr_Shw()
+{
+ if (!gm.m_sel) return;
+ D_DST(sdl.scr, (int)gm.m_x, (int)gm.m_y, gm.t_w, gm.t_h);
+ D_SRC(gm.s_mrb, (int)gm.m_a.p * gm.m_a.w, gm.m_id * gm.t_h);
+ SS_Blt();
+ Sdl_AddR((int)gm.m_x, (int)gm.m_y, gm.t_w, gm.t_h);
+}
+
+/*
+ update current marble
+ return 0 if times out( moves )
+*/
+int Mr_Upd(int ms)
+{
+ float c; // change
+ int stp = 0; // marble stopped ?
+
+ if (!gm.m_sel || !gm.m_mv) return 1;
+
+ // marble animation (frame)
+ switch (gm.m_d) {
+ case 1:
+ case 2:
+ gm.m_a.p += gm.m_a.c * ms;
+ if (gm.m_a.p >= gm.m_a.f)
+ gm.m_a.p = 0;
+ break;
+ case 0:
+ case 3:
+ gm.m_a.p -= gm.m_a.c * ms;
+ if (gm.m_a.p <= 0)
+ gm.m_a.p = gm.m_a.f;
+ break;
+ }
+
+ c = ms * gm.m_v;
+ switch (gm.m_d) {
+ case 0:
+ gm.m_y -= c;
+ if (gm.m_y <= gm.m_ty) {
+ Mr_Stp();
+ stp = 1;
+ }
+ break;
+ case 1:
+ gm.m_x += c;
+ if (gm.m_x >= gm.m_tx) {
+ Mr_Stp();
+ stp = 1;
+ }
+ break;
+ case 2:
+ gm.m_y += c;
+ if (gm.m_y >= gm.m_ty) {
+ Mr_Stp();
+ stp = 1;
+ }
+ break;
+ case 3:
+ gm.m_x -= c;
+ if (gm.m_x <= gm.m_tx) {
+ Mr_Stp();
+ stp = 1;
+ }
+ break;
+ }
+
+ // warp???
+ if ( gm.m_warp ) {
+ gm.m_x = gm.m_tx; gm.m_y = gm.m_ty;
+ Mr_Stp();
+ stp = 1;
+ gm.m_warp = 0;
+ }
+
+ // check time if move limit //
+ if ( stp && gm.c_l_st->limit_type == MOVES &&
+ gm.m_act != M_TLP_0 && gm.m_act != M_TLP_1 &&
+ gm.m_act != M_TLP_2 && gm.m_act != M_TLP_3) {
+
+ gm.c_lvl->tm--;
+ if ( gm.c_lvl->tm <= 0 && !gm.l_done /* completion with last move is okay */ )
+ return 0;
+
+ }
+
+ // stopped and awaiting action ?
+ if (stp && gm.m_act != M_EMPTY)
+ Mr_Act();
+ else
+ if (stp) {
+#ifdef SOUND
+ sound_play(gm.wv_stp);
+#endif
+ }
+
+ return 1;
+}
+
+/*
+ select a marble
+*/
+void Mr_Sel(int x, int y)
+{
+ int mx, my;
+
+ mx = (x - gm.l_x) / gm.t_w;
+ my = (y - gm.l_y) / gm.t_h;
+
+ if (gm.m_sel) {
+ gm.mf_a.p = gm.msf_a.p = 0;
+ Mr_Ins();
+ }
+
+ // set selected
+ gm.m_sel = 1;
+ // get map position
+ gm.m_mx = mx;
+ gm.m_my = my;
+ // check valid moving directions
+ Mr_CkVDir(mx, my);
+ // delete marble from background
+ L_DrwMpTl(mx, my);
+ // get position in screen
+ gm.m_x = mx * gm.t_w + gm.l_x;
+ gm.m_y = my * gm.t_h + gm.l_y;
+ // get id //
+ gm.m_id = gm.c_lvl->map[mx][my].m;
+ // delete marble from map
+ gm.c_lvl->map[mx][my].m = -1;
+ // save old position
+ gm.m_o_x = (int)gm.m_x;
+ gm.m_o_y = (int)gm.m_y;
+ gm.m_o_move_count = gm.c_lvl->tm;
+
+#ifdef SOUND
+ sound_play(gm.wv_sel);
+#endif
+}
+
+/*
+ release a marble
+*/
+void Mr_Rel(int x, int y)
+{
+ Mr_Ins();
+ gm.m_sel = 0;
+ SDL_SetCursor(gm.c_n);
+ gm.m_o_x = gm.m_o_y = -1;
+}
+
+/*
+ initialize movement
+*/
+void Mr_IniMv()
+{
+ int x_a = 0, y_a = 0, tx, ty;
+ int t_fnd = 0;
+
+ // direction
+ gm.m_d = gm.c_stat -2;
+ if (gm.m_d < 0 || gm.m_d > 4)
+ return;
+
+ // direction verified; activate movement
+ gm.m_mv = 1;
+
+ // store position if no action
+ if ( gm.m_act == M_EMPTY ) {
+ gm.m_o_x = (int)gm.m_x;
+ gm.m_o_y = (int)gm.m_y;
+ gm.m_o_move_count = gm.c_lvl->tm;
+ }
+
+ // clear previous action
+ gm.m_act = M_EMPTY;
+
+ // compute target position
+ switch (gm.m_d) {
+ case 0: y_a = -1; break;
+ case 1: x_a = 1; break;
+ case 2: y_a = 1; break;
+ case 3: x_a = -1; break;
+ }
+ tx = gm.m_mx + x_a; ty = gm.m_my + y_a;
+ while ( // target already found
+ !t_fnd &&
+ // wall
+ gm.c_lvl->map[tx][ty].t != M_WALL &&
+ // crumbling wall
+ gm.c_lvl->map[tx][ty].t != M_CRUMBLE &&
+ // marble
+ gm.c_lvl->map[tx][ty].m == -1 &&
+ // up
+ !((gm.c_lvl->map[tx][ty].t == M_OW_D || gm.c_lvl->map[tx][ty].t == M_OW_D_C || gm.c_lvl->map[tx][ty].t == M_OW_L_C || gm.c_lvl->map[tx][ty].t == M_OW_R_C) && y_a == -1) &&
+ // down
+ !((gm.c_lvl->map[tx][ty].t == M_OW_U || gm.c_lvl->map[tx][ty].t == M_OW_U_C || gm.c_lvl->map[tx][ty].t == M_OW_L_C || gm.c_lvl->map[tx][ty].t == M_OW_R_C) && y_a == 1) &&
+ // right
+ !((gm.c_lvl->map[tx][ty].t == M_OW_L || gm.c_lvl->map[tx][ty].t == M_OW_L_C || gm.c_lvl->map[tx][ty].t == M_OW_U_C || gm.c_lvl->map[tx][ty].t == M_OW_D_C) && x_a == 1) &&
+ // left
+ !((gm.c_lvl->map[tx][ty].t == M_OW_R || gm.c_lvl->map[tx][ty].t == M_OW_R_C || gm.c_lvl->map[tx][ty].t == M_OW_U_C || gm.c_lvl->map[tx][ty].t == M_OW_D_C) && x_a == -1)
+ ) {
+
+ // check action
+ switch (gm.c_lvl->map[tx][ty].t) {
+ case M_TLP_0:
+ case M_TLP_1:
+ case M_TLP_2:
+ case M_TLP_3:
+ t_fnd = 1;
+ gm.m_act = gm.c_lvl->map[tx][ty].t;
+ break;
+ case M_OW_U:
+ if (y_a != -1) {
+ gm.m_act = M_OW_U;
+ t_fnd = 1;
+ }
+ break;
+ case M_OW_D:
+ if (y_a != 1) {
+ gm.m_act = M_OW_D;
+ t_fnd = 1;
+ }
+ break;
+ case M_OW_L:
+ if (x_a != -1) {
+ gm.m_act = M_OW_L;
+ t_fnd = 1;
+ }
+ break;
+ case M_OW_R:
+ if (x_a != 1) {
+ gm.m_act = M_OW_R;
+ t_fnd = 1;
+ }
+ break;
+ }
+ tx += x_a;
+ ty += y_a;
+ }
+
+ // crumbling wall
+ if (gm.c_lvl->map[tx][ty].t == M_CRUMBLE)
+ gm.m_act = M_CRUMBLE;
+
+ tx -= x_a;
+ ty -= y_a;
+
+ gm.m_tx = tx * gm.t_w + gm.l_x;
+ gm.m_ty = ty * gm.t_h + gm.l_y;
+
+ // wait cursor
+ SDL_SetCursor(gm.c_w);
+}
+
+/*
+ stop a marble
+*/
+void Mr_Stp()
+{
+ int mx, my;
+
+ // position in screen
+ gm.m_x = gm.m_tx;
+ gm.m_y = gm.m_ty;
+
+ mx = (gm.m_x - gm.l_x) / gm.t_w;
+ my = (gm.m_y - gm.l_y) / gm.t_h;
+
+ // position in map
+ gm.m_mx = mx;
+ gm.m_my = my;
+
+ // check valid moving directions
+ Mr_CkVDir(mx, my);
+
+ gm.m_mv = 0;
+ gm.m_a.p = 0;
+
+ // check cursor //
+ Cr_Cng(gm.o_mx, gm.o_my);
+
+ // if no action check if the figure is completed
+ if (gm.m_act == M_EMPTY || gm.m_act == M_CRUMBLE) {
+
+ gm.c_lvl->map[mx][my].m = gm.m_id;
+ G_CkFgr();
+ gm.c_lvl->map[mx][my].m = -1;
+ }
+}
+
+/*
+ insert a marble into map
+*/
+void Mr_Ins()
+{
+ int mx, my, x, y;
+
+ mx = (gm.m_x - gm.l_x) / gm.t_w;
+ my = (gm.m_y - gm.l_y) / gm.t_h;
+ x = mx * gm.t_w + gm.l_x;
+ y = my * gm.t_h + gm.l_y;
+
+ //hide frame
+ MF_Hd();
+ // draw to background
+ D_DST(gm.s_bkgd, x, y, gm.t_w, gm.t_h);
+ D_SRC(gm.s_mrb, 0, gm.m_id * gm.t_h);
+ SS_Blt();
+ // to screen
+ D_DST(sdl.scr, x, y, gm.t_w, gm.t_h);
+ D_SRC(gm.s_mrb, 0, gm.m_id * gm.t_h);
+ SS_Blt();
+ // and to map
+ gm.c_lvl->map[mx][my].m = gm.m_id;
+}
+
+/*
+ check valid directions
+*/
+void Mr_CkVDir(int mx, int my)
+{
+ gm.m_vd = 0;
+ if ( gm.c_lvl->map[mx][my].t != M_OW_D_C && gm.c_lvl->map[mx][my].t != M_OW_U_C && gm.c_lvl->map[mx - 1][my].t != M_WALL && gm.c_lvl->map[mx - 1][my].t != M_CRUMBLE && gm.c_lvl->map[mx - 1][my].m == -1 && gm.c_lvl->map[mx - 1][my].t != M_OW_R && gm.c_lvl->map[mx - 1][my].t != M_OW_R_C && gm.c_lvl->map[mx - 1][my].t != M_OW_U_C && gm.c_lvl->map[mx - 1][my].t != M_OW_D_C)
+ gm.m_vd = gm.m_vd | MD_L;
+ if ( gm.c_lvl->map[mx][my].t != M_OW_D_C && gm.c_lvl->map[mx][my].t != M_OW_U_C && gm.c_lvl->map[mx + 1][my].t != M_WALL && gm.c_lvl->map[mx + 1][my].t != M_CRUMBLE && gm.c_lvl->map[mx + 1][my].m == -1 && gm.c_lvl->map[mx + 1][my].t != M_OW_L && gm.c_lvl->map[mx + 1][my].t != M_OW_L_C && gm.c_lvl->map[mx + 1][my].t != M_OW_U_C && gm.c_lvl->map[mx + 1][my].t != M_OW_D_C)
+ gm.m_vd = gm.m_vd | MD_R;
+ if ( gm.c_lvl->map[mx][my].t != M_OW_L_C && gm.c_lvl->map[mx][my].t != M_OW_R_C && gm.c_lvl->map[mx][my - 1].t != M_WALL && gm.c_lvl->map[mx][my - 1].t != M_CRUMBLE && gm.c_lvl->map[mx][my - 1].m == -1 && gm.c_lvl->map[mx][my - 1].t != M_OW_D && gm.c_lvl->map[mx][my - 1].t != M_OW_D_C && gm.c_lvl->map[mx][my - 1].t != M_OW_L_C && gm.c_lvl->map[mx][my - 1].t != M_OW_R_C)
+ gm.m_vd = gm.m_vd | MD_U;
+ if ( gm.c_lvl->map[mx][my].t != M_OW_L_C && gm.c_lvl->map[mx][my].t != M_OW_R_C && gm.c_lvl->map[mx][my + 1].t != M_WALL && gm.c_lvl->map[mx][my + 1].t != M_CRUMBLE && gm.c_lvl->map[mx][my + 1].m == -1 && gm.c_lvl->map[mx][my + 1].t != M_OW_U && gm.c_lvl->map[mx][my + 1].t != M_OW_U_C && gm.c_lvl->map[mx][my + 1].t != M_OW_L_C && gm.c_lvl->map[mx][my + 1].t != M_OW_R_C)
+ gm.m_vd = gm.m_vd | MD_D;
+}
+
+/*
+ handle actions!
+*/
+void Mr_Act()
+{
+ int x_a = 0, y_a = 0, ow = 0, mx = gm.m_mx, my = gm.m_my, tx, ty;
+ int i, j;
+
+ // crumbling wall ?
+ if (gm.m_act == M_CRUMBLE) {
+ tx = mx + (gm.m_d == 1 ? 1 : gm.m_d == 3 ? -1 : 0);
+ ty = my + (gm.m_d == 0 ? -1 : gm.m_d == 2 ? 1 : 0);
+ if (gm.c_lvl->map[tx][ty].t == M_CRUMBLE) {
+#ifdef SOUND
+ sound_play(gm.wv_stp);
+#endif
+ if (gm.c_lvl->map[tx][ty].id > 0)
+ gm.c_lvl->map[tx][ty].id--;
+ else {
+ Wl_Exp(gm.l_x + tx * gm.t_w, gm.l_y + ty * gm.t_h, gm.m_d);
+ gm.c_lvl->map[tx][ty].t = M_FLOOR;
+ // check moving direction
+ Mr_CkVDir(gm.m_mx, gm.m_my);
+ Cr_Cng(gm.o_mx, gm.o_my);
+ // reset restore position
+ gm.m_o_x = gm.m_tx;
+ gm.m_o_y = gm.m_ty;
+ gm.m_o_move_count = gm.c_lvl->tm;
+#ifdef SOUND
+ sound_play(gm.wv_exp);
+#endif
+ }
+ // draw to background
+ L_DrwMpTl(tx, ty);
+ // draw to screen
+ D_DST(sdl.scr, gm.l_x + tx * gm.t_w, gm.l_y + ty * gm.t_h, gm.t_w, gm.t_h);
+ D_SRC(gm.s_bkgd, gm.l_x + tx * gm.t_w, gm.l_y + ty * gm.t_h);
+ SS_Blt();
+ // add refresh rect
+ Sdl_AddR(gm.l_x + tx * gm.t_w, gm.l_y + ty * gm.t_h, gm.t_w, gm.t_h);
+ }
+ // no action
+// gm.m_act = M_EMPTY;
+ return;
+ }
+
+ // oneway ?
+ switch (gm.m_act) {
+ case M_OW_U:
+ y_a = -1;
+ ow = 1;
+ gm.c_stat = C_U;
+ break;
+ case M_OW_D:
+ y_a = 1;
+ ow = 1;
+ gm.c_stat = C_D;
+ break;
+ case M_OW_R:
+ x_a = 1;
+ ow = 1;
+ gm.c_stat = C_R;
+ break;
+ case M_OW_L:
+ x_a = -1;
+ ow = 1;
+ gm.c_stat = C_L;
+ break;
+ }
+ if (ow) {
+/* mx += x_a; my += y_a;
+ while (gm.c_lvl->map[mx][my].m != -1) {
+ mx += x_a;
+ my += y_a;
+ }
+ mx -= x_a; my -= y_a;
+ if (mx != gm.m_mx || my != gm.m_my) {
+ Mr_Ins();
+ Mr_Sel(gm.l_x + mx * gm.t_w, gm.l_y + my * gm.t_h);
+ }*/
+#ifdef SOUND
+ sound_play(gm.wv_arw);
+#endif
+ Mr_IniMv();
+ return;
+ }
+
+ // teleport ?
+ if (gm.m_act >= M_TLP_0 && gm.m_act <= M_TLP_3) {
+ for (i = 0; i < gm.c_lvl->m_w; i++) {
+ for (j = 0; j < gm.c_lvl->m_h; j++)
+ if (gm.c_lvl->map[i][j].t == gm.m_act && (i != gm.m_mx || j != gm.m_my)) {
+ // only warp if destination is empty //
+ if (gm.c_lvl->map[i][j].m == -1) {
+ gm.m_mx = i;
+ gm.m_my = j;
+ gm.m_x = gm.m_mx * gm.t_w + gm.l_x;
+ gm.m_y = gm.m_my * gm.t_h + gm.l_y;
+#ifdef SOUND
+ sound_play(gm.wv_tlp);
+#endif
+ }
+ gm.c_stat = gm.m_d + 2; // restore c_stat for movement initialization
+ // initate movement
+ Mr_IniMv();
+
+/* // check if the figure is completed
+ gm.c_lvl->map[gm.m_mx][gm.m_my].m = gm.m_id;
+ G_CkFgr();
+ gm.c_lvl->map[gm.m_mx][gm.m_my].m = -1;*/
+
+ return;
+ }
+ }
+ }
+
+// gm.m_act = M_EMPTY;
+}
+
+/*
+ restore old position
+*/
+void Mr_ResPos()
+{
+ if ( !gm.m_sel || gm.m_o_x == -1 ) return;
+
+ gm.m_act = M_EMPTY;
+ gm.m_tx = gm.m_o_x;
+ gm.m_ty = gm.m_o_y;
+ if ( gm.c_l_st->limit_type == MOVES )
+ gm.c_lvl->tm = gm.m_o_move_count;
+ Mr_Stp();
+}
+
+// timer //
+/*
+ hide time
+*/
+void Tm_Hd()
+{
+ int w = gm.brd_w - gm.t_x * 2;
+ int h = gm.f_wht->h;
+
+ D_DST(sdl.scr, gm.t_x + gm.b_x, gm.t_y, w, h);
+ D_SRC(gm.s_bkgd, gm.t_x + gm.b_x, gm.t_y);
+ SS_Blt();
+ Sdl_AddR(gm.t_x + gm.b_x, gm.t_y, w, h);
+}
+
+/*
+ show time
+*/
+void Tm_Shw()
+{
+ SFnt *ft;
+ char str_tm[16];
+ char str_sec[4];
+ int tm;
+
+ // adjust time //
+ if ( gm.c_l_st->limit_type == TIME )
+ tm = gm.c_lvl->tm / 1000;
+ else
+ tm = gm.c_lvl->tm;
+
+ // select font
+ ft = gm.f_wht;
+ if ( gm.c_l_st->limit_type == TIME && tm <= 30 )
+ ft = gm.f_rd;
+ else
+ if ( gm.c_l_st->limit_type == MOVES && tm <= 10 )
+ ft = gm.f_rd;
+
+ // draw "time"
+ ft->algn = TA_X_L | TA_Y_T;
+ if ( gm.c_l_st->limit_type == TIME )
+ SF_Wrt(ft, sdl.scr, gm.t_x + gm.b_x, gm.t_y, "Time:", 0);
+ else
+ SF_Wrt(ft, sdl.scr, gm.t_x + gm.b_x, gm.t_y, "Moves:", 0);
+
+ // compute and draw time str
+ if ( gm.c_l_st->limit_type == TIME ) {
+
+ sprintf(str_tm, "%i:", tm / 60);
+ sprintf(str_sec, "%i", tm % 60);
+ if (strlen(str_sec) < 2)
+ strcat(str_tm, "0");
+ strcat(str_tm, str_sec);
+
+ }
+ else
+ sprintf( str_tm, "%i", tm );
+
+ ft->algn = TA_X_R | TA_Y_T;
+ SF_Wrt(ft, sdl.scr, gm.scr_w - gm.t_x, gm.t_y, str_tm, 0);
+
+ Sdl_AddR(gm.t_x + gm.b_x, gm.t_y, gm.b_x - gm.t_x*2, ft->h);
+}
+
+/*
+ update time
+ return 0 if time out
+*/
+int Tm_Upd(int ms)
+{
+#ifdef SOUND
+ int old_sec = gm.c_lvl->tm / 1000;
+#endif
+
+ gm.blink_time += ms;
+
+ // if limit_type is MOVES, time is ignored //
+ if ( gm.c_l_st->limit_type == MOVES ) return 1;
+
+ gm.c_lvl->tm -= ms;
+
+ // new second ?
+#ifdef SOUND
+ if ( old_sec != gm.c_lvl->tm / 1000 && old_sec <= 30 )
+ sound_play(gm.wv_alm);
+#endif
+
+ if (gm.c_lvl->tm < 0) {
+ gm.c_lvl->tm = 0;
+ return 0;
+ }
+ return 1;
+}
+
+// level info //
+/*
+ hide level info
+*/
+void Inf_Hd()
+{
+ D_DST(sdl.scr, gm.b_x + gm.s_x, gm.s_y + gm.s_h - 20, gm.s_w, 20);
+ D_SRC(gm.s_bkgd, gm.b_x + gm.s_x, gm.s_y + gm.s_h - 20);
+ SS_Blt();
+ Sdl_AddR(gm.b_x + gm.s_x, gm.s_y + gm.s_h - 20, gm.s_w, 20);
+}
+
+/*
+ update level info
+*/
+int Inf_Upd()
+{
+ int x, y;
+
+ x = (gm.o_mx - gm.c_x - gm.b_x) / L_SIZE;
+ y = (gm.o_my - gm.c_y) / L_SIZE;
+
+ if (gm.o_mx < gm.c_x + gm.b_x || gm.o_my < gm.c_y || x >= gm.c_l_st->l_num || y >= gm.c_l_st->c_num) {
+ sprintf(gm.inf_str, "Tier %i, Puzzle %i", gm.c_ch + 1, gm.c_l_id + 1);
+ return 0;
+ }
+ if (!gm.c_s_inf->cmp[y * gm.c_s_inf->l_num + x] && !gm.c_s_inf->c_opn[y]) {
+ sprintf(gm.inf_str, "Access Denied");
+ return 0;
+ }
+ sprintf(gm.inf_str, "Tier %i, Puzzle %i", y + 1, x + 1);
+ if (gm.bttn[1]) {
+ gm.w_c = y;
+ gm.w_l = x;
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ show level info
+*/
+void Inf_Shw()
+{
+ gm.f_sml->algn = TA_X_C | TA_Y_B;
+ SF_Wrt(gm.f_sml, sdl.scr, gm.b_x + gm.brd_w / 2, gm.s_y + gm.s_h - 5, gm.inf_str, 0);
+}
+
+// cursor
+/*
+ load cursor
+*/
+void Cr_Ld(char *src, char *d, char*m)
+{
+ int w=16, h = 16;
+ int i, j, k;
+ char b_d, b_m;
+ int p;
+
+ k = 0;
+ for (j = 0; j < w * h; j += 8, k++) {
+ p = 1;
+ b_d = b_m = 0;
+ // create byte
+ for (i = 7; i >= 0; i--) {
+ switch (src[j + i]) {
+ case 2:
+ b_d += p;
+ case 1:
+ b_m += p;
+ break;
+ }
+ p *= 2;
+ }
+ // add to mask
+ d[k] = b_d;
+ m[k] = b_m;
+ }
+}
+
+/*
+ change cursors appearing
+*/
+void Cr_Cng(int x, int y)
+{
+ int mx, my, cx, cy;
+
+ if (gm.m_mv) {
+ if (x > gm.scr_w - gm.brd_w)
+ SDL_SetCursor(gm.c_n);
+ else
+ SDL_SetCursor(gm.c_w);
+ return;
+ }
+
+ mx = (x - gm.l_x) / gm.t_w;
+ my = (y - gm.l_y) / gm.t_h;
+
+ if ( mx >= 0 && my >= 0 && mx < gm.c_lvl->m_w && my < gm.c_lvl->m_h
+ && (gm.c_lvl->map[mx][my].m != - 1 || (gm.m_mx == mx && gm.m_my == my))) {
+ // on marble
+ SDL_SetCursor(gm.c_s);
+ gm.c_stat = C_SEL;
+ }
+ else
+ if (!gm.m_sel || x > gm.scr_w - gm.brd_w) {
+ // nothing selected
+ SDL_SetCursor(gm.c_n);
+ gm.c_stat = C_NONE;
+ }
+ else {
+ // up, left, right, down
+ cx = x - (gm.m_mx * gm.t_w + gm.l_x + gm.t_w / 2);
+ cy = y - (gm.m_my * gm.t_h + gm.l_y + gm.t_h / 2);
+ if (abs(cx) > abs(cy)) {
+ if (cx > 0) {
+ if (gm.m_vd & MD_R) {
+ SDL_SetCursor(gm.c_r);
+ gm.c_stat = C_R;
+ }
+ else {
+ SDL_SetCursor(gm.c_n);
+ gm.c_stat = C_NONE;
+ }
+ }
+ else {
+ if (gm.m_vd & MD_L) {
+ SDL_SetCursor(gm.c_l);
+ gm.c_stat = C_L;
+ }
+ else {
+ SDL_SetCursor(gm.c_n);
+ gm.c_stat = C_NONE;
+ }
+ }
+ }
+ else {
+ if (cy > 0) {
+ if (gm.m_vd & MD_D) {
+ SDL_SetCursor(gm.c_d);
+ gm.c_stat = C_D;
+ }
+ else {
+ SDL_SetCursor(gm.c_n);
+ gm.c_stat = C_NONE;
+ }
+ }
+ else {
+ if (gm.m_vd & MD_U) {
+ SDL_SetCursor(gm.c_u);
+ gm.c_stat = C_U;
+ }
+ else {
+ SDL_SetCursor(gm.c_n);
+ gm.c_stat = C_NONE;
+ }
+ }
+ }
+ }
+}
+
+// frame //
+/*
+ hide marble frame
+*/
+void MF_Hd()
+{
+ int x, y, w, h;
+
+ if (!gm.m_sel) return;
+
+ // get size
+ if (gm.msf_a.p == gm.msf_a.f) {
+ w = gm.mf_a.w;
+ h = gm.mf_a.h;
+ }
+ else {
+ w = gm.msf_a.w;
+ h = gm.msf_a.h;
+ }
+
+ // get position
+ x = gm.m_x + (gm.t_w - w) / 2;
+ y = gm.m_y + (gm.t_h - h) / 2;
+
+ // hide
+ D_DST(sdl.scr, x, y, w, h);
+ D_SRC(gm.s_bkgd, x, y);
+ SS_Blt();
+ Sdl_AddR(x - 1, y - 1, w + 1, h + 1);
+}
+
+/*
+ update marble frame
+*/
+void MF_Upd(int ms)
+{
+ if (!gm.m_sel) {
+ gm.mf_a.p = gm.msf_a.p = 0;
+ return;
+ }
+ if (gm.msf_a.p != gm.msf_a.f) {
+ // still select animation
+ gm.msf_a.p += gm.msf_a.c * ms;
+ if (gm.msf_a.p >= gm.msf_a.f)
+ gm.msf_a.p = gm.msf_a.f;
+ }
+ else {
+ gm.mf_a.p += gm.mf_a.c * ms;
+ if (gm.mf_a.p >= gm.mf_a.f)
+ gm.mf_a.p = 0;
+ }
+}
+
+/*
+ show marble frame
+*/
+void MF_Shw()
+{
+ int x, y;
+ AInf *a;
+ SDL_Surface *s;
+
+ if (!gm.m_sel) return;
+
+ // get animation info
+ if (gm.msf_a.p == gm.msf_a.f) {
+ a = &gm.mf_a;
+ s = gm.s_mf;
+ }
+ else {
+ a = &gm.msf_a;
+ s = gm.s_msf;
+ }
+
+ // get position
+ x = gm.m_x + (gm.t_w - a->w) / 2;
+ y = gm.m_y + (gm.t_h - a->h) / 2;
+
+ // show
+ D_DST(sdl.scr, x, y, a->w, a->h);
+ D_SRC(s, (int)a->p * a->w, 0);
+ SS_Blt();
+ Sdl_AddR(x, y, a->w, a->h);
+}
+
+// map animations //
+/*
+ get position and type of all animations
+*/
+void MA_Ini()
+{
+ int i, j;
+
+ // free and reallocate m_ani
+ if (gm.m_ani)
+ free(gm.m_ani);
+ gm.m_ani = (MAni*)malloc(sizeof(MAni) * gm.c_lvl->m_w * gm.c_lvl->m_h);
+ gm.ma_num = 0;
+
+ // parse level map
+ for (i = 0; i < gm.c_lvl->m_w; i++)
+ for (j = 0; j < gm.c_lvl->m_h; j++)
+ switch (gm.c_lvl->map[i][j].t) {
+ case M_OW_U:
+ case M_OW_D:
+ case M_OW_L:
+ case M_OW_R:
+ case M_OW_U_C:
+ case M_OW_D_C:
+ case M_OW_L_C:
+ case M_OW_R_C:
+ gm.m_ani[gm.ma_num].x = i;
+ gm.m_ani[gm.ma_num].y = j;
+ gm.m_ani[gm.ma_num].t = gm.c_lvl->map[i][j].t;
+ gm.m_ani[gm.ma_num].a = &gm.ma_ow_a;
+ gm.ma_num++;
+ break;
+ case M_TLP_0:
+ case M_TLP_1:
+ case M_TLP_2:
+ case M_TLP_3:
+ gm.m_ani[gm.ma_num].x = i;
+ gm.m_ani[gm.ma_num].y = j;
+ gm.m_ani[gm.ma_num].t = gm.c_lvl->map[i][j].t;
+ gm.m_ani[gm.ma_num].a = &gm.ma_tlp_a;
+ gm.ma_num++;
+ break;
+ default:
+ break;
+ }
+}
+
+void MA_Upd(int ms)
+{
+ if (!cfg.ani) return;
+
+ gm.ma_ow_a.p += (float)ms * gm.ma_ow_a.c;
+ if (gm.ma_ow_a.p >= gm.ma_ow_a.f)
+ gm.ma_ow_a.p = 0;
+
+ gm.ma_tlp_a.p += (float)ms * gm.ma_tlp_a.c;
+ if (gm.ma_tlp_a.p >= gm.ma_tlp_a.f)
+ gm.ma_tlp_a.p = 0;
+}
+
+/*
+ show map animations
+*/
+void MA_Shw()
+{
+ int i;
+ int x, y;
+
+ if (!cfg.ani) return;
+
+ for (i = 0; i < gm.ma_num; i++) {
+ // get position in screen
+ x = gm.l_x + gm.m_ani[i].x * gm.t_w;
+ y = gm.l_y + gm.m_ani[i].y * gm.t_h;
+
+ // draw empty floor
+ D_DST(sdl.scr, x, y, gm.t_w, gm.t_h);
+ D_SRC(gm.c_g_st->s_flr, 0, 0);
+ SS_Blt();
+
+ // oneway
+ D_DST(sdl.scr, x, y, gm.t_w, gm.t_h);
+ switch (gm.m_ani[i].t) {
+ case M_OW_R:
+ case M_OW_R_C:
+ D_SRC(gm.c_g_st->s_r_arw, (int)gm.m_ani[i].a->p * gm.t_w, 0);
+ SS_Blt();
+ break;
+ case M_OW_L:
+ case M_OW_L_C:
+ D_SRC(gm.c_g_st->s_l_arw, (int)gm.m_ani[i].a->p * gm.t_w, 0);
+ SS_Blt();
+ break;
+ case M_OW_U:
+ case M_OW_U_C:
+ D_SRC(gm.c_g_st->s_u_arw, 0, (int)gm.m_ani[i].a->p * gm.t_h);
+ SS_Blt();
+ break;
+ case M_OW_D:
+ case M_OW_D_C:
+ D_SRC(gm.c_g_st->s_d_arw, 0, (int)gm.m_ani[i].a->p * gm.t_h);
+ SS_Blt();
+ break;
+ }
+ D_DST(sdl.scr, x, y, gm.t_w, gm.t_h);
+ switch (gm.m_ani[i].t) {
+ case M_OW_U_C:
+ case M_OW_D_C:
+ D_SRC(gm.c_g_st->s_lr_bar, 0, 0);
+ SS_Blt();
+ break;
+ case M_OW_L_C:
+ case M_OW_R_C:
+ D_SRC(gm.c_g_st->s_ud_bar, 0, 0);
+ SS_Blt();
+ break;
+ }
+
+ // teleport
+ D_DST(sdl.scr, x, y, gm.t_w, gm.t_h);
+ switch (gm.m_ani[i].t) {
+ case M_TLP_0:
+ D_SRC(gm.c_g_st->s_tlp_0, (int)gm.m_ani[i].a->p * gm.t_w, 0);
+ SS_ABlt(gm.tlp_a);
+ break;
+ case M_TLP_1:
+ D_SRC(gm.c_g_st->s_tlp_1, (int)gm.m_ani[i].a->p * gm.t_w, 0);
+ SS_ABlt(gm.tlp_a);
+ break;
+ case M_TLP_2:
+ D_SRC(gm.c_g_st->s_tlp_2, (int)gm.m_ani[i].a->p * gm.t_w, 0);
+ SS_ABlt(gm.tlp_a);
+ break;
+ case M_TLP_3:
+ D_SRC(gm.c_g_st->s_tlp_3, (int)gm.m_ani[i].a->p * gm.t_w, 0);
+ SS_ABlt(gm.tlp_a);
+ break;
+ }
+
+ // marble on animation
+ if (gm.c_lvl->map[gm.m_ani[i].x][gm.m_ani[i].y].m != -1 &&
+ ( ((gm.blink_time / 250) & 1) || gm.l_done ) ) {
+ D_DST(sdl.scr, x, y, gm.t_w, gm.t_h);
+ D_SRC(gm.s_mrb, 0, gm.c_lvl->map[gm.m_ani[i].x][gm.m_ani[i].y].m * gm.t_w);
+ SS_Blt();
+ }
+
+ // refresh rect
+ Sdl_AddR(x, y, gm.t_w, gm.t_h);
+ }
+}
+
+// shrapnells //
+/*
+ add new shrapnell
+*/
+void Shr_Add(int x, int y, int w, int h, Vec d, SDL_Surface *s_shr)
+{
+ Shr *s;
+
+ s = (Shr*)malloc(sizeof(Shr));
+ s->d = d;
+ s->x = x;
+ s->y = y;
+ s->w = w;
+ s->h = h;
+ s->a = 0;
+ if ( s_shr )
+ s->s_shr = s_shr;
+ else {
+
+ s->s_shr = SS_Crt(w, h, SDL_SWSURFACE);
+ D_DST(s->s_shr, 0, 0, w, h);
+ D_SRC(sdl.scr, x, y);
+ SS_Blt();
+
+ }
+
+ DL_Add(&gm.shr, s);
+}
+
+/*
+ delete shrapnell
+*/
+void Shr_Del(void *p)
+{
+ Shr *s = (Shr*)p;
+ if ( s->s_shr ) SDL_FreeSurface(s->s_shr);
+ free(p);
+}
+
+/*
+ hide shrapnell
+*/
+void Shr_Hd()
+{
+ DL_E *e = gm.shr.hd.n;
+ Shr *s;
+
+ while ( e != &gm.shr.tl ) {
+
+ s = (Shr*)e->d;
+
+ D_DST(sdl.scr, (int)s->x, (int)s->y, s->w, s->h);
+ D_SRC(gm.s_bkgd, (int)s->x, (int)s->y);
+ SS_Blt();
+ Sdl_AddR((int)s->x, (int)s->y, s->w, s->h);
+
+ e = e->n;
+
+ }
+
+}
+
+/*
+ update shrapnell
+*/
+void Shr_Upd(int ms)
+{
+ DL_E *n, *e = gm.shr.hd.n;
+ Shr *s;
+
+ while ( e != &gm.shr.tl ) {
+
+ n = e->n;
+
+ s = (Shr*)e->d;
+
+ s->x += s->d.x * (float)ms;
+ s->y += s->d.y * (float)ms;
+ s->a += gm.shr_a_c * (float)ms;
+
+ if (s->a >= 255)
+ DL_DelE(&gm.shr, e);
+
+ e = n;
+
+ }
+}
+
+/*
+ show shrapnell
+*/
+void Shr_Shw()
+{
+ DL_E *e = gm.shr.hd.n;
+ Shr *s;
+
+ while ( e != &gm.shr.tl ) {
+
+ s = (Shr*)e->d;
+
+ D_DST(sdl.scr, (int)s->x, (int)s->y, s->w, s->h);
+ D_SRC(s->s_shr, 0, 0);
+ SS_ABlt(s->a);
+ Sdl_AddR((int)s->x, (int)s->y, s->w, s->h);
+
+ e = e->n;
+
+ }
+
+}
+
+// wall //
+/*
+ explode crumble wall into lot of pieces
+*/
+void Wl_Exp(int x, int y, int d)
+{
+ int i, j;
+ int sz = 4;
+ Vec v;
+ int x_r, x_off, y_r, y_off; // direction values
+ SDL_Surface *s_shr;
+
+ if ( !cfg.ani ) return;
+
+ x_r = y_r = 200;
+ x_off = y_off = 100;
+
+ // adjust direction values
+ switch (d) {
+
+ case 0:
+ y_r = y_off = 100;
+ break;
+
+ case 1:
+ x_r = 100;
+ x_off = 0;
+ break;
+
+ case 2:
+ y_r = 100;
+ y_off = 0;
+ break;
+
+ case 3:
+ x_r = x_off = 100;
+ break;
+
+ }
+
+ for ( i = 0; i < gm.t_w; i += sz )
+ for ( j = 0; j < gm.t_h; j += sz ) {
+
+ v.x = (float)((rand() % x_r ) - x_off) / 1000;
+ v.y = (float)((rand() % y_r ) - y_off) / 1000;
+
+ s_shr = SS_Crt(sz, sz, SDL_SWSURFACE);
+ D_DST(s_shr, 0, 0, sz, sz);
+ D_SRC(gm.c_g_st->s_crmbl, i, j);
+ SS_Blt();
+
+ Shr_Add(x + i, y + j, sz, sz, v, s_shr);
+
+ }
+}
+
+// figure animation //
+/*
+ main animation function; select and explode marbles one by one
+*/
+void FA_Run()
+{
+ int i, j, k;
+ int m_cnt = 0; // marble count
+ int m_pos[gm.c_lvl->f_w * gm.c_lvl->f_h][2], b;
+ int ms;
+ SDL_Event e;
+ int leave = 0;
+ int tm, c_tm; // time in ms
+
+ if (!cfg.ani) return;
+
+ if (gm.m_sel)
+ Mr_Ins();
+
+ // count marbles and get position
+ for ( i = 0; i < gm.c_lvl->m_w; i++ )
+ for (j = 0; j < gm.c_lvl->m_h; j++ )
+ if ( gm.c_lvl->map[i][j].m != - 1 ) {
+
+ m_pos[m_cnt][0] = i;
+ m_pos[m_cnt][1] = j;
+ m_cnt++;
+
+ }
+
+ // unsort positions
+ for ( k = 0; k < m_cnt * 5; k++) {
+
+ i = rand() % m_cnt;
+ j = rand() % m_cnt;
+
+ b = m_pos[i][0];
+ m_pos[i][0] = m_pos[j][0];
+ m_pos[j][0] = b;
+ b = m_pos[i][1];
+ m_pos[i][1] = m_pos[j][1];
+ m_pos[j][1] = b;
+
+ }
+
+ // explosions
+ MF_Hd();
+ T_Rst();
+ tm = 250;
+ c_tm = 0;
+ m_cnt--;
+ SDL_SetCursor(gm.c_w);
+ while ( (m_cnt >= 0 || gm.shr.cntr > 0) && !trm_gm && !leave ) {
+
+ // termination ?
+ if (SDL_PollEvent(&e)) {
+ switch (e.type) {
+ case SDL_QUIT:
+ trm_gm = 1;
+ break;
+ case SDL_MOUSEBUTTONUP:
+ case SDL_KEYUP:
+ if (e.key.keysym.sym == SDLK_TAB)
+ SnapShot();
+ else
+ leave = 1;
+ break;
+ }
+ }
+
+ // show shrapnells
+ Shr_Hd();
+ ms = T_Gt();
+ c_tm -= ms;
+ MA_Upd(ms);
+ Shr_Upd(ms);
+ MA_Shw();
+ Shr_Shw();
+ Tm_Shw();
+ Inf_Shw();
+ Sdl_UpdR();
+
+ //add new shrapnells
+ if (m_cnt >= 0 && c_tm <= 0) {
+
+ FA_Add(m_pos[m_cnt][0],
+ m_pos[m_cnt][1],
+ gm.c_lvl->map[m_pos[m_cnt][0]][m_pos[m_cnt][1]].m);
+ c_tm = tm;
+ m_cnt--;
+#ifdef SOUND
+ sound_play(gm.wv_exp);
+#endif
+
+ }
+
+ }
+
+}
+
+/*
+ add shrapnells at x,y with marble-id m
+*/
+void FA_Add(int mx, int my, int m)
+{
+ int x, y;
+ int i, j;
+ int sz = 4; // size
+ SDL_Surface *s_shr;
+ Vec v;
+
+ x = gm.l_x + mx * gm.t_w;
+ y = gm.l_y + my * gm.t_h;
+
+ // delete from screne
+ gm.c_lvl->map[mx][my].m = -1;
+ L_DrwMpTl(mx, my);
+ Sdl_AddR(x, y, gm.t_w, gm.t_h);
+
+ // create shrapnells
+ for ( i = 0; i < gm.t_w; i += sz )
+ for ( j = 0; j < gm.t_h; j += sz ) {
+
+ v.x = (float)((rand() % 200 ) - 100) / 1000;
+ v.y = (float)((rand() % 200 ) - 100) / 1000;
+
+ s_shr = SS_Crt(sz, sz, SDL_SWSURFACE);
+ D_DST(s_shr, 0, 0, sz, sz);
+ D_SRC(gm.s_mrb, i, gm.t_h * m + j);
+ SS_Blt();
+
+ Shr_Add(x + i, y + j, sz, sz, v, s_shr);
+
+ }
+}
+
+// credits //
+/*
+ initiate credits
+*/
+void Cr_Ini()
+{
+ gm.cr_st = 0;
+ gm.cr_a = 255;
+ gm.cr_c_tm = gm.cr_tm;
+ sprintf(gm.cr_str, "'%s' (Author: %s)", gm.c_l_st->ch[gm.c_ch].nm, gm.c_l_st->ch[gm.c_ch].authr);
+ gm.cr_w = SF_TxtW(gm.f_sml, gm.cr_str);
+ gm.cr_h = gm.f_sml->h;
+ gm.cr_x = (gm.scr_w - gm.brd_w - gm.cr_w) / 2;
+}
+
+/*
+ hide credits
+*/
+void Cr_Hd()
+{
+ if ( gm.cr_st == 3 ) return;
+
+ D_DST(sdl.scr, gm.cr_x, gm.cr_y, gm.cr_w, gm.cr_h);
+ D_SRC(gm.s_bkgd, gm.cr_x, gm.cr_y);
+ SS_Blt();
+}
+
+/*
+ update credits
+*/
+void Cr_Upd(int ms)
+{
+ if ( gm.cr_st == 3 ) return;
+
+ switch ( gm.cr_st ) {
+
+ case 0:
+ // undim
+ gm.cr_a -= gm.cr_a_c * (float)ms;
+ if ( gm.cr_a <= 0 ) {
+
+ gm.cr_a = 0;
+ gm.cr_st = 1;
+
+ }
+ break;
+
+ case 1:
+ // just show till timeout
+ gm.cr_c_tm -= ms;
+ if ( gm.cr_c_tm <= 0 )
+ gm.cr_st = 2;
+ break;
+
+ case 2:
+ // undim
+ gm.cr_a += gm.cr_a_c * (float)ms;
+ if ( gm.cr_a >= 255 ) {
+
+ gm.cr_a = 255;
+ gm.cr_st = 3;
+
+ }
+ break;
+
+ }
+}
+
+/*
+ show credits
+*/
+void Cr_Shw()
+{
+ if ( gm.cr_st == 3) return;
+
+ gm.f_sml->algn = TA_X_L | TA_Y_T;
+ SF_Wrt(gm.f_sml, sdl.scr, gm.cr_x, gm.cr_y, gm.cr_str, (int)gm.cr_a);
+ Sdl_AddR(gm.cr_x, gm.cr_y, gm.cr_w, gm.cr_h);
+}
+
+// modify score //
+void modify_score( int *b_lvl, int *b_tm )
+{
+ /* modify score according to difficulty level */
+ switch (cfg.diff) {
+ case DIFF_EASY:
+ *b_lvl /= 2;
+ *b_tm /= 2;
+ break;
+ case DIFF_NORMAL: break;
+ case DIFF_HARD:
+ *b_lvl *= 2;
+ *b_tm *= 2;
+ break;
+ case DIFF_BRAINSTORM:
+ *b_tm *= 5;
+ *b_lvl *= 5;
+ break;
+ }
+}
+
+// bonus summary //
+/*
+ give a bonus summary
+*/
+void BS_Run(float b_lvl, float b_tm)
+{
+ SDL_Surface *buf;
+ SDL_Event e;
+ int leave = 0;
+ int coff, cy; // level completed
+ int toff, ty; // time bonus
+ int soff, sy; // score
+ int ms;
+ int sw = 80, sh = gm.f_sml->h; // string width, height
+ float b_c = 1.0; // bonus change
+ float scr = gm.c_prf->scr;
+ int end_scr;
+ int old_scr;
+
+ end_scr = gm.c_prf->scr + (int)b_lvl + (int)b_tm;
+
+ // normal cursor
+ SDL_SetCursor(gm.c_n);
+
+ // darken screen
+ buf = SS_Crt(gm.scr_w, gm.scr_h, SDL_SWSURFACE);
+ SDL_SetColorKey(buf, 0, 0);
+ D_FDST(buf);
+ SS_Fill(0x0);
+ D_FDST(sdl.scr);
+ D_FSRC(buf);
+ SS_ABlt(128);
+ SDL_FreeSurface(buf);
+ D_FDST(gm.s_bkgd);
+ D_FSRC(sdl.scr);
+ SS_Blt();
+
+ // positions
+ cy = 200; coff = 200;
+ ty = 220; toff = 200;
+ sy = 250; soff = 200;
+
+ // info
+ gm.f_sml->algn = TA_X_L | TA_Y_T;
+ SF_Wrt(gm.f_sml, sdl.scr, coff, cy, "Level Bonus:", 0);
+ SF_Wrt(gm.f_sml, sdl.scr, toff, ty, "Move Bonus:", 0);
+ SF_Wrt(gm.f_sml, sdl.scr, soff, sy, "Total Score:", 0);
+ Sdl_FUpd();
+
+ // show bonus first time
+ gm.f_sml->algn = TA_X_R | TA_Y_T;
+ BS_Shw(gm.scr_w - soff, sy, (int)scr);
+ Sdl_UpdR();
+ SDL_Delay(500);
+ BS_Shw(gm.scr_w - coff, cy, (int)b_lvl);
+ Sdl_UpdR();
+#ifdef SOUND
+ sound_play(gm.wv_exp);
+#endif
+ SDL_Delay(500);
+ BS_Shw(gm.scr_w - toff, ty, (int)b_tm);
+ Sdl_UpdR();
+#ifdef SOUND
+ sound_play(gm.wv_exp);
+#endif
+ SDL_Delay(500);
+
+ T_Rst();
+ while ( !leave ) {
+
+ // break?
+ if ( SDL_PollEvent(&e) )
+ switch ( e.type ) {
+
+ case SDL_QUIT:
+ trm_gm = 1;
+ break;
+
+ case SDL_MOUSEBUTTONUP:
+ case SDL_KEYUP:
+ leave = 1;
+ break;
+
+ }
+
+ // time
+ ms = T_Gt();
+
+ // hide
+ BS_Hd(gm.scr_w - coff - sw, cy, sw, sh);
+ BS_Hd(gm.scr_w - toff - sw, ty, sw, sh);
+ BS_Hd(gm.scr_w - soff - sw, sy, sw, sh);
+
+ // update
+ old_scr = (int)scr;
+ if ( b_lvl > 0 ) {
+
+ b_lvl -= b_c * (float)ms;
+ scr += b_c * (float)ms;
+ if ( b_lvl < 0 )
+ b_lvl = 0;
+
+ }
+ if ( b_tm > 0 ) {
+
+ b_tm -= b_c * (float)ms;
+ scr += b_c * (float)ms;
+ if ( b_tm < 0 )
+ b_tm = 0;
+
+ }
+ if ( (int)scr >= end_scr)
+ scr = end_scr;
+ if (b_lvl == 0 && b_tm == 0)
+ scr = end_scr;
+#ifdef SOUND
+ if ( (old_scr / 50) != (int)scr / 50 )
+ sound_play(gm.wv_scr);
+#endif
+
+ // show
+ BS_Shw(gm.scr_w - coff, cy, (int)b_lvl);
+ BS_Shw(gm.scr_w - toff, ty, (int)b_tm);
+ BS_Shw(gm.scr_w - soff, sy, (int)scr);
+
+ Sdl_UpdR();
+ }
+}
+
+/*
+ hide number
+*/
+void BS_Hd(int x, int y, int w, int h)
+{
+ D_DST(sdl.scr, x, y, w, h);
+ D_SRC(gm.s_bkgd, x, y);
+ SS_Blt();
+ Sdl_AddR(x, y, w, h);
+}
+
+/*
+ show number
+*/
+void BS_Shw(int x, int y, int v)
+{
+ char str[10];
+
+ sprintf(str, "%i", v);
+ SF_Wrt(gm.f_sml, sdl.scr, x, y, str, 0);
+ Sdl_AddR(x - SF_TxtW(gm.f_sml, str), y, SF_TxtW(gm.f_sml, str), gm.f_sml->h);
+}
+
+// snap shot //
+/*
+ take a screenshot
+*/
+void SnapShot()
+{
+ char filename[32];
+#ifdef SOUND
+ sound_play(gm.wv_clk);
+#endif
+ sprintf(filename, "snapshot_%i.bmp", gm.snap++);
+ SDL_SaveBMP(sdl.scr, filename);
+}
diff --git a/project/jni/application/lmarbles-1.0.8/src/game.h b/project/jni/application/lmarbles-1.0.8/src/game.h
new file mode 100644
index 000000000..005016539
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/game.h
@@ -0,0 +1,279 @@
+/***************************************************************************
+ game.h - description
+ -------------------
+ begin : Mon Aug 14 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef GAME_H
+#define GAME_H
+
+#include
+#include
+#include "levels.h"
+#include "dynlist.h"
+#include "profile.h"
+#include "sdl.h"
+#include "audio.h"
+
+// gfx set //
+typedef struct {
+ char nm[16]; // name
+ int ok; // can be used
+ SDL_Surface
+ *s_bkgd, // background
+ *s_wl, // walls
+ *s_flr, // floor
+ *s_r_arw, *s_l_arw, *s_u_arw, *s_d_arw, // arrows
+ *s_ud_bar, *s_lr_bar, // barriers
+ *s_tlp_0, *s_tlp_1, *s_tlp_2, *s_tlp_3, // teleporters
+ *s_crmbl; // crumbling wall
+} GSet;
+
+// animation information //
+typedef struct {
+ int f; // frame limit //
+ float c; // change per millisecond //
+ float p; // current position //
+ int w, h; // size of one sprite //
+} AInf;
+
+// map animation //
+typedef struct {
+ int x, y; // position in map
+ int t; // type
+ AInf *a; // animation info
+} MAni;
+
+// position
+typedef struct {
+ int x, y;
+} Pos;
+
+// vector
+typedef struct {
+ float x,y;
+} Vec;
+
+// shrapnell
+typedef struct {
+ SDL_Surface *s_shr; // picture;
+ Vec d; //direction
+ float x,y; //position
+ int w, h; // size
+ float a; // alpha
+} Shr;
+
+// cursor states //
+#define C_NONE 0
+#define C_SEL 1
+#define C_U 2
+#define C_R 3
+#define C_D 4
+#define C_L 5
+
+// valid marble directions //
+#define MD_L (1<<0)
+#define MD_R (1<<1)
+#define MD_U (1<<2)
+#define MD_D (1<<3)
+
+#define L_GREEN 0
+#define L_ORANGE 1
+#define L_RED 2
+#define L_WHITE 3
+#define L_SIZE 12
+typedef struct {
+ // gfx sets //
+ DLst g_sts; // gfx sets //
+ // mouse button state //
+ int bttn[4];
+ // graphics //
+ SDL_Surface *s_lghts; // lamps displaying level progress //
+ SDL_Surface *s_brd; // side board //
+ SDL_Surface *s_mrb; // marbles //
+ SDL_Surface *s_fig; // figure //
+ SDL_Surface *s_bkgd; // background //
+ SDL_Surface *s_mf; // marble frame //
+ SDL_Surface *s_msf; // marble select frame //
+ // fonts //
+ SFnt *f_sml; // info //
+ SFnt *f_wht; // time //
+ SFnt *f_rd; // time2 - not much time left //
+ // references //
+ Prf *c_prf; // current profile //
+ SInf *c_s_inf; // current profile level set info //
+ LSet *c_l_st; // current level set //
+ GSet *c_g_st; // current gfx set //
+ Lvl *c_lvl; // current level //
+ // player //
+ int hi_scr; // last hiscore //
+ int c_l_id; // current level //
+ int c_ch; // current chapter //
+ int o_ch; // old chapter //
+ int l_done; // level finished //
+ // marble //
+ float m_v; // marble velocity per millisecond //
+ int m_sel; // selected a marble ? //
+ int m_mx, m_my; // position in map //
+ int m_o_x, m_o_y; // old position //
+ int m_o_move_count; // old move count //
+ float m_x, m_y; // position in screen //
+ int m_mv; // moving ? //
+ int m_d; // direction of moving //
+ int m_vd; // valid directions //
+ int m_tx, m_ty; // target position in screen //
+ int m_id; // current type of marble //
+ AInf m_a; // animation information //
+ int m_act; // action type //
+ int m_warp; // warp marble to destination //
+ // marble frame and marble select frame
+ AInf mf_a; // animation info
+ AInf msf_a; // animation info
+ // layout //
+ int l_x, l_y; // offset of level relative to 0,0 -- in L_Ini()
+ int f_x, f_y; // figure offset relative to b_x, 0
+ int b_x; // board x
+ int i_x, i_y; // info position relative to b_x,0
+ int t_x, t_y; // timer position relative to b_x,0
+ int s_x, s_y; // set info position relative to b_x,0
+ int c_x, c_y; // position of first chapter info relative to b_x,0 -- in L_Ini()
+ // geometry //
+ int t_w, t_h; // tile size //
+ int f_w, f_h; // figure marble size //
+ int f_fw, f_fh; // figure frame size //
+ int scr_w, scr_h; // screen size //
+ int brd_w; // board width
+ int s_w, s_h; // size of set info
+ int c_off; // offset between chapter infos //
+ // cursors //
+ int c_stat; // cursor state //
+ SDL_Cursor *c_u, *c_d, *c_l, *c_r, *c_s, *c_n, *c_w; // cursors
+ // old mouse pos //
+ int o_mx, o_my;
+ // level warp //
+ char inf_str[64]; // warp info string
+ int w_c, w_l; // warp level and chapter
+ // map animations //
+ MAni *m_ani; // animations
+ int ma_num; // animation number
+ AInf ma_ow_a; // oneway info
+ AInf ma_tlp_a; // teleport info
+ int tlp_a; // telporter alpha
+ // sounds
+#ifdef SOUND
+ Sound_Chunk *wv_tlp; // teleport
+ Sound_Chunk *wv_sel; // select
+ Sound_Chunk *wv_stp; // stop
+ Sound_Chunk *wv_clk; // click
+ Sound_Chunk *wv_exp; // explode
+ Sound_Chunk *wv_alm; // alarm
+ Sound_Chunk *wv_arw; // arrow
+ Sound_Chunk *wv_scr; // score
+#endif
+ DLst shr; // shrapnells
+ float shr_a_c; // alpha change per second
+ // credits
+ float cr_a_c; // alpha change per msecond
+ float cr_a; // current alpha
+ int cr_tm; // shown how long ?
+ int cr_c_tm; // current time
+ char cr_str[256]; // what is shown...
+ int cr_x, cr_y, cr_w, cr_h; // shown where ?
+ int cr_st; // state: 0 undim, 1 shown, 2 dim
+ // snapshot
+ int snap;
+ // blink time //
+ int blink_time;
+} Game;
+
+void G_Ini();
+void G_Trm();
+int G_Opn();
+void G_Cls();
+void G_Run();
+void G_LdGSts();
+void G_DelGSt(void *p);
+void G_Ps();
+void G_CkFgr();
+int G_CfmWrp();
+int G_CfmQut();
+int G_CfmRst();
+int G_CkLSt();
+
+// marble //
+void Mr_Hd();
+void Mr_Shw();
+int Mr_Upd(int ms);
+void Mr_Sel(int x, int y);
+void Mr_Rel(int x, int y);
+void Mr_IniMv();
+void Mr_Stp();
+void Mr_Ins();
+void Mr_CkVDir(int mx, int my);
+void Mr_Act();
+void Mr_ResPos();
+
+// timer //
+void Tm_Hd();
+void Tm_Shw();
+int Tm_Upd(int ms);
+
+// level info //
+void Inf_Hd();
+int Inf_Upd();
+void Inf_Shw();
+
+// cursor //
+void Cr_Ld(char *src, char *d, char*m);
+void Cr_Cng(int x, int y);
+
+// frame //
+void MF_Hd();
+void MF_Upd(int ms);
+void MF_Shw();
+
+// map animations //
+void MA_Ini();
+void MA_Upd(int ms);
+void MA_Shw();
+
+// shrapnells //
+void Shr_Add(int x, int y, int w, int h, Vec d, SDL_Surface *s_shr);
+void Shr_Del(void *p);
+void Shr_Hd();
+void Shr_Upd(int ms);
+void Shr_Shw();
+
+// wall //
+void Wl_Exp(int x, int y, int v);
+
+// figure animation //
+void FA_Run();
+void FA_Add(int mx, int my, int m);
+
+// credits //
+void Cr_Ini();
+void Cr_Hd();
+void Cr_Upd(int ms);
+void Cr_Shw();
+
+// bonus summary //
+void BS_Run(float b_lvl, float b_tm);
+void BS_Hd(int x, int y, int w, int h);
+void BS_Shw(int x, int y, int v);
+
+// shnapshot //
+void SnapShot();
+
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/board.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/board.bmp
new file mode 100644
index 000000000..34acc4123
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/board.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/f_red.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/f_red.bmp
new file mode 100644
index 000000000..2e8a88904
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/f_red.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/f_small.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/f_small.bmp
new file mode 100644
index 000000000..7507e3830
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/f_small.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/f_white.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/f_white.bmp
new file mode 100644
index 000000000..8805278d8
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/f_white.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/f_yellow.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/f_yellow.bmp
new file mode 100644
index 000000000..eb29e0b40
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/f_yellow.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/figure.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/figure.bmp
new file mode 100644
index 000000000..15389c7b4
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/figure.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/lights.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/lights.bmp
new file mode 100644
index 000000000..ee17dbe08
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/lights.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/logo.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/logo.bmp
new file mode 100644
index 000000000..ec2d39e7f
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/logo.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/m_frame.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/m_frame.bmp
new file mode 100644
index 000000000..c3808cd85
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/m_frame.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/m_sframe.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/m_sframe.bmp
new file mode 100644
index 000000000..4a8280de0
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/m_sframe.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/marbles.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/marbles.bmp
new file mode 100644
index 000000000..f3a686b5f
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/marbles.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_d.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_d.bmp
new file mode 100644
index 000000000..6a270d321
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_d.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_l.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_l.bmp
new file mode 100644
index 000000000..fcb1c0a59
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_l.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_r.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_r.bmp
new file mode 100644
index 000000000..746c524d7
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_r.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_u.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_u.bmp
new file mode 100644
index 000000000..96ee4e7ff
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/arrow_u.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/background.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/background.bmp
new file mode 100644
index 000000000..6999ff8ef
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/background.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/barrier_lr.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/barrier_lr.bmp
new file mode 100644
index 000000000..fbdb39dd9
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/barrier_lr.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/barrier_ud.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/barrier_ud.bmp
new file mode 100644
index 000000000..6204b7b7e
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/barrier_ud.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/floor.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/floor.bmp
new file mode 100644
index 000000000..4dd5a03e7
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/floor.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport0.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport0.bmp
new file mode 100644
index 000000000..ecbc2d67b
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport0.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport1.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport1.bmp
new file mode 100644
index 000000000..abbb65460
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport1.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport2.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport2.bmp
new file mode 100644
index 000000000..388e257cc
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport2.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport3.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport3.bmp
new file mode 100644
index 000000000..54a8ebef0
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/teleport3.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/wall.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/wall.bmp
new file mode 100644
index 000000000..70a1b73c7
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/wall.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/metal/wall_crumble.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/wall_crumble.bmp
new file mode 100644
index 000000000..77a8d429a
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/metal/wall_crumble.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_d.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_d.bmp
new file mode 100644
index 000000000..6a270d321
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_d.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_l.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_l.bmp
new file mode 100644
index 000000000..fcb1c0a59
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_l.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_r.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_r.bmp
new file mode 100644
index 000000000..746c524d7
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_r.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_u.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_u.bmp
new file mode 100644
index 000000000..96ee4e7ff
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/arrow_u.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/background.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/background.bmp
new file mode 100644
index 000000000..76de33e7a
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/background.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/barrier_lr.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/barrier_lr.bmp
new file mode 100644
index 000000000..fbdb39dd9
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/barrier_lr.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/barrier_ud.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/barrier_ud.bmp
new file mode 100644
index 000000000..6204b7b7e
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/barrier_ud.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/floor.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/floor.bmp
new file mode 100644
index 000000000..8bf7c25db
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/floor.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport0.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport0.bmp
new file mode 100644
index 000000000..ecbc2d67b
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport0.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport1.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport1.bmp
new file mode 100644
index 000000000..abbb65460
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport1.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport2.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport2.bmp
new file mode 100644
index 000000000..388e257cc
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport2.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport3.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport3.bmp
new file mode 100644
index 000000000..54a8ebef0
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/teleport3.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/wall.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/wall.bmp
new file mode 100644
index 000000000..15cf69ac7
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/wall.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/stone/wall_crumble.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/wall_crumble.bmp
new file mode 100644
index 000000000..56db4c5e5
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/stone/wall_crumble.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/tiny.sdlfnt b/project/jni/application/lmarbles-1.0.8/src/gfx/tiny.sdlfnt
new file mode 100644
index 000000000..fddff847d
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/tiny.sdlfnt differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/title.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/title.bmp
new file mode 100644
index 000000000..250bf6bc3
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/title.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/win_icon.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/win_icon.bmp
new file mode 100644
index 000000000..09a9031f8
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/win_icon.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_d.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_d.bmp
new file mode 100644
index 000000000..6a270d321
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_d.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_l.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_l.bmp
new file mode 100644
index 000000000..fcb1c0a59
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_l.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_r.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_r.bmp
new file mode 100644
index 000000000..746c524d7
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_r.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_u.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_u.bmp
new file mode 100644
index 000000000..96ee4e7ff
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/arrow_u.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/background.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/background.bmp
new file mode 100644
index 000000000..038dcea89
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/background.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/barrier_lr.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/barrier_lr.bmp
new file mode 100644
index 000000000..fbdb39dd9
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/barrier_lr.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/barrier_ud.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/barrier_ud.bmp
new file mode 100644
index 000000000..6204b7b7e
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/barrier_ud.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/floor.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/floor.bmp
new file mode 100644
index 000000000..dfe17e89b
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/floor.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport0.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport0.bmp
new file mode 100644
index 000000000..ecbc2d67b
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport0.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport1.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport1.bmp
new file mode 100644
index 000000000..abbb65460
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport1.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport2.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport2.bmp
new file mode 100644
index 000000000..388e257cc
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport2.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport3.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport3.bmp
new file mode 100644
index 000000000..54a8ebef0
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/teleport3.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/wall.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/wall.bmp
new file mode 100644
index 000000000..595d45cb8
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/wall.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/gfx/wood/wall_crumble.bmp b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/wall_crumble.bmp
new file mode 100644
index 000000000..d5b7acd6f
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/gfx/wood/wall_crumble.bmp differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/levels.c b/project/jni/application/lmarbles-1.0.8/src/levels.c
new file mode 100644
index 000000000..577c3051c
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/levels.c
@@ -0,0 +1,837 @@
+/***************************************************************************
+ levels.c - description
+ -------------------
+ begin : Mon Aug 14 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "levels.h"
+#include "dynlist.h"
+#include "game.h"
+#include "file.h"
+#include "sdl.h"
+#include "timer.h"
+#include "cfg.h"
+
+/* game struct -- game.c */
+extern Game gm;
+/* line counter -- file.c */
+extern int f_ln;
+/* Sdl -- sdl.c */
+extern Sdl sdl;
+/* profiles -- profile.c */
+extern DLst prfs;
+/* config -- cfg.c */
+extern Cfg cfg;
+
+char **ls_lst = 0;
+int ls_n = 0;
+DLst l_sts;
+
+/*
+ count and create a list with all loadable filenames found in SRC_DIR/levels
+*/
+void L_CrtLst()
+{
+ int i;
+ char d_nm[256];
+ char path[256+64];
+ DIR *dir = 0;
+ struct dirent *e;
+ struct stat s;
+
+ ls_n = 0;
+
+ // create directory string //
+ sprintf(d_nm, "%s/levels", SRC_DIR);
+
+ // find and open directory //
+ if ((dir = opendir(d_nm)) == 0) {
+ fprintf(stderr, "ERROR: can't find directory '%s'\n", d_nm);
+ exit(1);
+ }
+
+ printf("searching for level sets...\n");
+ // well, let's check the count the entries //
+ while ((e = readdir(dir)) != 0) {
+ sprintf(path, "%s/%s", d_nm, e->d_name);
+ stat(path, &s);
+ if (S_ISREG(s.st_mode)) {
+ (ls_n)++;
+ printf("'%s'\n", e->d_name);
+ }
+ }
+
+ if (ls_n == 0) {
+ fprintf(stderr, "ERROR: '%s' seems to be empty\n", d_nm);
+ closedir(dir);
+ exit(1);
+ }
+ else
+ printf("...total of %i\n", ls_n);
+
+ // now we'll create the list //
+ rewinddir(dir);
+ ls_lst = malloc(sizeof(char*) * (ls_n));
+ for (i = 0; i < ls_n; i++) {
+ do {
+ e = readdir(dir);
+ if (e == 0) continue;
+ sprintf(path, "%s/%s", d_nm, e->d_name);
+ stat(path, &s);
+ } while (!S_ISREG(s.st_mode));
+ ls_lst[i] = malloc(strlen(e->d_name) + 1);
+ strcpy(ls_lst[i], e->d_name);
+ }
+
+ // close dir //
+ closedir(dir);
+}
+
+/*
+ free list memory
+*/
+void L_DelLst()
+{
+ int i;
+ if (!ls_lst) return;
+ for (i = 0; i < ls_n; i++)
+ free(ls_lst[i]);
+ free(ls_lst);
+}
+
+/*
+ callback for dynlist l_sts to delete a level set
+*/
+void L_DelSt(void *p)
+{
+ int i;
+ LSet *st = (LSet*)p;
+ if (st->ch) {
+ for (i = 0; i < st->c_num; i++)
+ free(st->ch[i].lvls);
+ free(st->ch);
+ }
+ free(p);
+}
+
+/*
+ add an empty and invalid entry
+*/
+void L_AddInvSt(char *nm)
+{
+ LSet *st = malloc(sizeof(LSet));
+ st->c_num = 0;
+ st->ch = 0;
+ st->ok = 0;
+ strcpy(st->nm, nm);
+ DL_Add(&l_sts, st);
+}
+
+/*
+ set marble, type and id of a map tile
+*/
+void L_StMpT(MapT *tl, int m, int t, int id)
+{
+ tl->m = m;
+ tl->t = t;
+ tl->id = id;
+}
+
+/*
+ parse and add a new lset from file f
+*/
+int L_LdSt(FILE *f)
+{
+ int i, j, k, l;
+ char val[64];
+ char str[512];
+ LSet *st = malloc(sizeof(LSet));
+
+ // info section //
+ F_GetE(f, str, F_SUB | F_VAL);
+ if (!F_CkE(str, F_SUB, "", 0)) {
+ printf("ERROR: line %i: '' expected\n", f_ln);
+ free(st);
+ return 0;
+ }
+ // levels per chapter //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "levels", val)) {
+ printf("ERROR: line %i: 'levels' expected\n", f_ln);
+ free(st);
+ return 0;
+ }
+ st->l_num = atoi(val);
+ // chapters //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "chapters", val)) {
+ printf("ERROR: line %i: 'chapters' expected\n", f_ln);
+ free(st);
+ return 0;
+ }
+ st->c_num = atoi(val);
+ // limit type //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "limit", val)) {
+ printf("ERROR: line %i: 'limit' expected\n", f_ln);
+ free(st);
+ return 0;
+ }
+ if ( !strncmp( "time", val, 4 ) )
+ st->limit_type = TIME;
+ else
+ st->limit_type = MOVES;
+ // info section //
+ F_GetE(f, str, F_SUB | F_VAL);
+ if (!F_CkE(str, F_SUB, " ", 0)) {
+ printf("ERROR: line %i: ' ' expected\n", f_ln);
+ free(st);
+ return 0;
+ }
+
+ // get memory
+ st->ch = malloc( sizeof(Chptr) * st->c_num );
+ for (i = 0; i < st->c_num; i++)
+ st->ch[i].lvls = malloc( sizeof(Lvl) * st->l_num );
+
+ // chapters
+ for (i = 0; i < st->c_num; i++) {
+ // chapter start //
+ F_GetE(f, str, F_SUB | F_VAL);
+ if (!F_CkE(str, F_SUB, "", 0)) {
+ printf("ERROR: line %i: '' expected\n", f_ln);
+ goto failure;
+ }
+ // name //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "name", st->ch[i].nm)) {
+ printf("ERROR: line %i: 'name' expected\n", f_ln);
+ goto failure;
+ }
+ // author //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "author", st->ch[i].authr)) {
+ printf("ERROR: line %i: 'author' expected\n", f_ln);
+ goto failure;
+ }
+ // gset //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "gfx_set", st->ch[i].g_st)) {
+ printf("ERROR: line %i: 'gfx_set' expected\n", f_ln);
+ goto failure;
+ }
+ // open for play ? //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "open", val)) {
+ printf("ERROR: line %i: 'open' expected\n", f_ln);
+ goto failure;
+ }
+ st->ch[i].opn = atoi(val);
+
+ // levels //
+ for (j = 0; j < st->l_num; j++) {
+ // level start //
+ F_GetE(f, str, F_SUB | F_VAL);
+ if (!F_CkE(str, F_SUB, "", 0)) {
+ printf("ERROR: line %i: '' expected\n", f_ln);
+ goto failure;
+ }
+ // time //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "limit", val)) {
+ printf("ERROR: line %i: 'limit' expected\n", f_ln);
+ goto failure;
+ }
+ st->ch[i].lvls[j].tm = atoi(val);
+ // map width //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "map_w", val)) {
+ printf("ERROR: line %i: 'map_w' expected\n", f_ln);
+ goto failure;
+ }
+ if ((st->ch[i].lvls[j].m_w = atoi(val)) > L_MAX_W || atoi(val) < L_MIN_W) {
+ printf("ERROR: line %i: 'map_w' out of range (%i-%i): %i\n", f_ln, L_MIN_W, L_MAX_W, atoi(val));
+ goto failure;
+ }
+ // map height //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "map_h", val)) {
+ printf("ERROR: line %i: 'map_h' expected\n", f_ln);
+ goto failure;
+ }
+ if ((st->ch[i].lvls[j].m_h = atoi(val)) > L_MAX_H || atoi(val) < L_MIN_H) {
+ printf("ERROR: line %i: 'map_w' out of range (%i-%i): %i\n", f_ln, L_MIN_H, L_MAX_H, atoi(val));
+ goto failure;
+ }
+ // figure width //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "fig_w", val)) {
+ printf("ERROR: line %i: 'fig_w' expected\n", f_ln);
+ goto failure;
+ }
+ st->ch[i].lvls[j].f_w = atoi(val);
+ if ((st->ch[i].lvls[j].f_w = atoi(val)) > F_MAX_W || atoi(val) < F_MIN_W) {
+ printf("ERROR: line %i: 'fig_w' out of range (%i-%i): %i\n", f_ln, F_MIN_W, F_MAX_W, atoi(val));
+ goto failure;
+ }
+ // figure height //
+ F_GetE(f, str, F_VAL);
+ if (!F_CkE(str, F_VAL, "fig_h", val)) {
+ printf("ERROR: line %i: 'fig_h' expected\n", f_ln);
+ goto failure;
+ }
+ if ((st->ch[i].lvls[j].f_h = atoi(val)) > F_MAX_H || atoi(val) < F_MIN_H) {
+ printf("ERROR: line %i: 'fig_h' out of range (%i-%i): %i\n", f_ln, F_MIN_H, F_MAX_H, atoi(val));
+ goto failure;
+ }
+
+ // figure start //
+ F_GetE(f, str, F_SUB | F_VAL);
+ if (!F_CkE(str, F_SUB, "", 0)) {
+ printf("ERROR: line %i: '' expected\n", f_ln);
+ goto failure;
+ }
+ // figure //
+ for (k = 0; k < st->ch[i].lvls[j].f_h; k++) {
+ F_GetE(f, str, F_VAL);
+ for (l = 0; l < st->ch[i].lvls[j].f_w; l++) {
+ if (str[l] >= '0' && str[l] <= '9')
+ st->ch[i].lvls[j].fgr[l][k] = str[l] - 48;
+ else
+ if (str[l] != 32)
+ printf("WARNING: line %i: bad figure marble '%c'\n", f_ln, str[l]);
+ else
+ st->ch[i].lvls[j].fgr[l][k] = -1;
+ }
+ }
+ // figure end //
+ F_GetE(f, str, F_SUB | F_VAL);
+ if (!F_CkE(str, F_SUB, " ", 0)) {
+ printf("ERROR: line %i: ' ' expected\n", f_ln);
+ goto failure;
+ }
+
+ // map start //
+ F_GetE(f, str, F_SUB | F_VAL);
+ if (!F_CkE(str, F_SUB, "", 0)) {
+ printf("ERROR: line %i: '' expected\n", f_ln);
+ goto failure;
+ }
+ // map
+ for (k = 0; k < st->ch[i].lvls[j].m_h; k++) {
+ memset(str, 0, 256);
+ F_GetE(f, str, F_VAL);
+ for (l = 0; l < st->ch[i].lvls[j].m_w; l++) {
+ if (str[l] >= '0' && str[l] <= '9')
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], str[l] - 48, M_FLOOR, 0);
+ else
+ switch (str[l]) {
+ case 'a':
+ case 'b':
+ case 'c':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_WALL, str[l] - 97);
+ break;
+ case ' ':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_FLOOR, 0);
+ break;
+ case 'u':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_OW_U, 0);
+ break;
+ case 'd':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_OW_D, 0);
+ break;
+ case 'r':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_OW_R, 0);
+ break;
+ case 'l':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_OW_L, 0);
+ break;
+ case 'U':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_OW_U_C, 0);
+ break;
+ case 'D':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_OW_D_C, 0);
+ break;
+ case 'R':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_OW_R_C, 0);
+ break;
+ case 'L':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_OW_L_C, 0);
+ break;
+ case 'w':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_TLP_0, 0);
+ break;
+ case 'x':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_TLP_1, 0);
+ break;
+ case 'y':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_TLP_2, 0);
+ break;
+ case 'z':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_TLP_3, 0);
+ break;
+ case 'A':
+ case 'B':
+ case 'C':
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_CRUMBLE, str[l] - 65);
+ break;
+ default:
+ L_StMpT(&st->ch[i].lvls[j].map[l][k], -1, M_EMPTY, 0);
+ break;
+ }
+ }
+ }
+ // map end //
+ F_GetE(f, str, F_SUB | F_VAL);
+ if (!F_CkE(str, F_SUB, " ", 0)) {
+ printf("ERROR: line %i: ' ' expected\n", f_ln);
+ goto failure;
+ }
+
+ // level end //
+ F_GetE(f, str, F_SUB | F_VAL);
+ if (!F_CkE(str, F_SUB, " ", 0)) {
+ printf("ERROR: line %i: ' ' expected\n", f_ln);
+ goto failure;
+ }
+ }
+
+ // chapter end //
+ F_GetE(f, str, F_SUB);
+ if (!F_CkE(str, F_SUB, " ", 0)) {
+ printf("ERROR: line %i: ' ' expected\n", f_ln);
+ goto failure;
+ }
+ }
+
+ // return 1 in any case cuz 0 assumes that an empty set must be added
+ printf("ok\n");
+ DL_Add(&l_sts, st);
+ st->ok = 1;
+ return 1;
+
+failure:
+ DL_Add(&l_sts, st);
+// L_DelSt(st);
+ st->ok = 0;
+ return 1;
+}
+
+/*
+ initialize level l
+*/
+void L_Ini(int c, int l)
+{
+ char *nm;
+ DL_E *e;
+ int gst_ok = 0;
+ int px, py, i, j, k;
+ Lvl *lp;
+ char str[64];
+ int off;
+ char *str_num[] = {"1.", "2.", "3.", "4.", "5.", "6.", "7.", "8.", "9.", "10."};
+ float mv_mod;
+
+ // show credit when new chapter
+ if ( gm.o_ch == -1 || gm.o_ch != c )
+ Cr_Ini();
+
+ // set level & chapter index
+ gm.o_ch = c;
+ gm.c_ch = c;
+ gm.c_l_id = l;
+ gm.l_done = 0;
+
+ // set open flag
+ gm.c_s_inf->c_opn[gm.c_ch] = 1;
+
+ // copy current level
+ if (gm.c_lvl) free(gm.c_lvl);
+ gm.c_lvl = malloc(sizeof(Lvl));
+ memcpy(gm.c_lvl, &gm.c_l_st->ch[gm.c_ch].lvls[gm.c_l_id], sizeof(Lvl));
+
+ // load gfx set
+ nm = gm.c_l_st->ch[gm.c_ch].g_st;
+ e = gm.g_sts.hd.n;
+ while (e != &gm.g_sts.tl) {
+ if (!strncmp(nm, ((GSet*)e->d)->nm, strlen(nm)) && ((GSet*)e->d)->ok) {
+ gm.c_g_st = (GSet*)e->d;
+ gst_ok = 1;
+ break;
+ }
+ e = e->n;
+ }
+ if (!gst_ok) {
+ printf("WARNING: unknown or unuseable gfx set '%s';\nsearching for a good one...\n", nm);
+ // find first useable set
+ e = gm.g_sts.hd.n;
+ while (e != &gm.g_sts.tl) {
+ if (((GSet*)e->d)->ok) {
+ gm.c_g_st = (GSet*)e->d;
+ printf("'%s' used instead\n", gm.c_g_st->nm);
+ gst_ok = 1;
+ break;
+ }
+ e = e->n;
+ }
+ if (!gst_ok) {
+ printf("ERROR: no good gfx set found...\n");
+ exit(1);
+ }
+ }
+
+ // set bkgd picture
+ if (gm.c_g_st->s_bkgd) {
+ for (j = 0; j < gm.scr_w - gm.brd_w; j += gm.c_g_st->s_bkgd->w)
+ for (k = 0; k < gm.scr_h; k += gm.c_g_st->s_bkgd->h) {
+ D_DST(gm.s_bkgd, j, k, gm.c_g_st->s_bkgd->w, gm.c_g_st->s_bkgd->h);
+ D_SRC(gm.c_g_st->s_bkgd, 0, 0);
+ SS_Blt();
+ }
+ }
+ else {
+ D_DST(gm.s_bkgd, 0, 0, gm.scr_w - gm.brd_w, gm.scr_h);
+ SS_Fill(0x0);
+ }
+
+ // add board
+ D_DST(gm.s_bkgd, gm.s_bkgd->w - gm.s_brd->w, 0, gm.s_brd->w, gm.s_brd->h);
+ D_SRC(gm.s_brd, 0, 0);
+ SS_Blt();
+
+ // add static level gfx
+ lp = &gm.c_l_st->ch[gm.c_ch].lvls[gm.c_l_id];
+ gm.l_x = (gm.scr_w - gm.brd_w - lp->m_w * gm.t_w) / 2;
+ gm.l_y = (gm.scr_h - lp->m_h * gm.t_h) / 2;
+ for (i = 0; i < lp->m_w; i++)
+ for (j = 0; j < lp->m_h; j++)
+ L_DrwMpTl(i, j);
+
+ // add marbles
+ for (i = 0; i < lp->m_w; i++)
+ for (j = 0; j < lp->m_h; j++)
+ if (lp->map[i][j].m != - 1) {
+ D_DST(gm.s_bkgd, gm.l_x + i * gm.t_w, gm.l_y + j * gm.t_h, gm.t_w, gm.t_h);
+ D_SRC(gm.s_mrb, 0, lp->map[i][j].m * gm.t_h);
+ SS_Blt();
+ }
+
+ // add figure
+ px = gm.b_x + gm.f_x + (gm.f_fw - lp->f_w * gm.f_h) / 2;
+ py = gm.f_y + (gm.f_fh - lp->f_h * gm.f_h)/ 2;
+ for (i = 0; i < lp->f_w; i++)
+ for (j = 0; j < lp->f_h; j++)
+ if (lp->fgr[i][j] != -1) {
+ D_DST(gm.s_bkgd, px + i * gm.f_w, py + j * gm.f_h, gm.f_w, gm.f_h);
+ D_SRC(gm.s_fig, 0, lp->fgr[i][j] * gm.f_h);
+ SS_Blt();
+ }
+
+ // add player info
+ off = gm.f_sml->h + 2;
+ gm.f_sml->algn = TA_X_L | TA_Y_T;
+ SF_Wrt(gm.f_sml, gm.s_bkgd, gm.i_x + gm.b_x, gm.i_y, "Player:", 0);
+ gm.f_sml->algn = TA_X_R | TA_Y_T;
+ SF_Wrt(gm.f_sml, gm.s_bkgd, gm.scr_w - gm.i_x, gm.i_y, gm.c_prf->nm, 0);
+ gm.f_sml->algn = TA_X_L | TA_Y_T;
+ SF_Wrt(gm.f_sml, gm.s_bkgd, gm.i_x + gm.b_x, gm.i_y + off, "Score:", 0);
+ gm.f_sml->algn = TA_X_R | TA_Y_T;
+ sprintf(str, "%i", gm.c_prf->scr);
+ SF_Wrt(gm.f_sml, gm.s_bkgd, gm.scr_w - gm.i_x, gm.i_y + off, str, 0);
+ gm.f_sml->algn = TA_X_L | TA_Y_T;
+ SF_Wrt(gm.f_sml, gm.s_bkgd, gm.i_x + gm.b_x, gm.i_y + off*2 + 5, "HighScore:", 0);
+ gm.f_sml->algn = TA_X_R | TA_Y_T;
+ sprintf(str, "%i", gm.hi_scr);
+ SF_Wrt(gm.f_sml, gm.s_bkgd, gm.scr_w - gm.i_x, gm.i_y + off*2 + 5, str, 0);
+
+ // add name of levelset above set info
+ gm.f_sml->algn = TA_X_C | TA_Y_T;
+ SF_Wrt(gm.f_sml, gm.s_bkgd, gm.b_x + gm.brd_w / 2, gm.s_y + 5, gm.c_l_st->nm, 0);
+
+ // compute position of first chapter
+ gm.c_x = 50; // changed
+ gm.c_y = gm.s_y + (gm.s_h - gm.c_l_st->c_num * L_SIZE) / 2;
+
+ // add chapter numbers
+ gm.f_sml->algn = TA_X_L | TA_Y_T;
+ for (i = 0; i < gm.c_l_st->c_num; i++) {
+ SF_Wrt(gm.f_sml, gm.s_bkgd, gm.b_x + gm.c_x - 30, gm.c_y + i * L_SIZE, str_num[i], 0);
+ }
+
+ // draw chapter lights
+ for (j = 0; j < gm.c_l_st->c_num; j++)
+ for (i = 0; i < gm.c_l_st->l_num; i++) {
+ D_DST(gm.s_bkgd, gm.b_x + gm.c_x + i * L_SIZE, gm.c_y + j * L_SIZE, L_SIZE, L_SIZE);
+ if (!gm.c_s_inf->c_opn[j]) {
+ D_SRC(gm.s_lghts, L_RED * L_SIZE, 0);
+ }
+ else
+ if ( gm.c_s_inf->cmp[j * gm.c_l_st->l_num + i] ) {
+ D_SRC(gm.s_lghts, L_GREEN * L_SIZE, 0);
+ }
+ else {
+ D_SRC(gm.s_lghts, L_ORANGE * L_SIZE, 0);
+ }
+ SS_Blt();
+ }
+ // current level is white
+ D_DST(gm.s_bkgd, gm.b_x + gm.c_x + l * L_SIZE, gm.c_y + c * L_SIZE, L_SIZE, L_SIZE);
+ D_SRC(gm.s_lghts, L_WHITE * L_SIZE, 0);
+ SS_Blt();
+
+ // initiate animations
+
+ MA_Ini();
+
+ // undim
+ D_FDST(sdl.scr);
+ D_FSRC(gm.s_bkgd);
+ SS_Blt();
+ if (cfg.dim)
+ SDL_UNDIM();
+ else
+ Sdl_FUpd();
+
+ // reset timer
+ T_Rst();
+
+ // reset marble and frame
+ gm.m_mv = 0;
+ gm.m_sel = 0;
+ gm.mf_a.p = 0;
+ gm.msf_a.p = 0;
+ gm.m_act = M_EMPTY;
+ gm.m_mx = gm.m_my = -1;
+
+ if ( gm.c_l_st->limit_type == TIME ) {
+ /* set time from seconds to milliseconds if time used */
+ gm.c_lvl->tm *= 1000;
+ gm.c_lvl->tm+=1000;
+ }
+ else {
+ /* gm.c_lvl->tm containts the move limit. this is modified according
+ to the difficulty levels */
+ switch ( cfg.diff ) {
+ case DIFF_EASY:
+ mv_mod = (int)ceil((float)gm.c_lvl->tm * 0.2 * ( 5 - gm.c_ch ) );
+ gm.c_lvl->tm += mv_mod;
+ if ( gm.c_lvl->tm % 2 ) gm.c_lvl->tm++;
+ break;
+ case DIFF_NORMAL:
+ mv_mod = (int)ceil((float)gm.c_lvl->tm * 0.1 * ( 5 - gm.c_ch ) );
+ gm.c_lvl->tm += mv_mod;
+ if ( gm.c_lvl->tm % 2 ) gm.c_lvl->tm++;
+ break;
+ case DIFF_HARD:
+ mv_mod = (int)ceil((float)gm.c_lvl->tm * 0.05 * ( 5 - gm.c_ch ) );
+ gm.c_lvl->tm += mv_mod;
+ if ( gm.c_lvl->tm % 2 ) gm.c_lvl->tm++;
+ break;
+ case DIFF_BRAINSTORM:
+ break;
+ }
+ }
+
+ // init blink time //
+ gm.blink_time = 0;
+
+ // cursor state
+ gm.c_stat = C_NONE;
+ SDL_SetCursor(gm.c_n);
+
+ // reset shrapnells
+ DL_Clr(&gm.shr);
+}
+
+/*
+ draw a map tile to gm.s_bkgd with x,y position in the map using current map
+*/
+void L_DrwMpTl(int i, int j)
+{
+ switch (gm.c_lvl->map[i][j].t) {
+ case M_WALL:
+ // add wall shadow on right side ? //
+ if ( i + 1 >= gm.c_lvl->m_w || gm.c_lvl->map[i + 1][j].t == M_EMPTY ) {
+
+ D_DST(gm.s_bkgd, gm.l_x + (i + 1) * gm.t_w, gm.l_y + j * gm.t_h, 1, gm.t_h + 1);
+ SS_Fill(0x0);
+
+ }
+ // add wall shadow on bottom ? //
+ if ( j + 1 >= gm.c_lvl->m_h || gm.c_lvl->map[i][j + 1].t == M_EMPTY ) {
+
+ D_DST(gm.s_bkgd, gm.l_x + i * gm.t_w, gm.l_y + (j + 1) * gm.t_h, gm.t_w + 1, 1);
+ SS_Fill(0x0);
+
+ }
+ // add wall shadow on left side ? //
+ if ( (i == 0)
+ || ((i - 1 >= gm.c_lvl->m_w) || gm.c_lvl->map[i - 1][j].t == M_EMPTY )) {
+ D_DST(gm.s_bkgd, gm.l_x + i * gm.t_w - 1, gm.l_y + j * gm.t_h, 1, gm.t_h + 1);
+ SS_Fill(0x0);
+
+ }
+ // add wall shadow on top ? //
+ if ( (j == 0)
+ || ((j - 1 >= gm.c_lvl->m_h) || gm.c_lvl->map[i][j - 1].t == M_EMPTY )) {
+ D_DST(gm.s_bkgd, gm.l_x + i * gm.t_w, gm.l_y + j * gm.t_h - 1, gm.t_w + 1, 1);
+ SS_Fill(0x0);
+
+ }
+ D_DST(gm.s_bkgd, gm.l_x + i * gm.t_w, gm.l_y + j * gm.t_h, gm.t_w, gm.t_h);
+ D_SRC(gm.c_g_st->s_wl, gm.c_lvl->map[i][j].id * gm.t_w, 0);
+ SS_Blt();
+ break;
+ case M_CRUMBLE:
+
+ D_DST(gm.s_bkgd, gm.l_x + i * gm.t_w, gm.l_y + j * gm.t_h, gm.t_w, gm.t_h);
+ D_SRC(gm.c_g_st->s_flr, 0, 0);
+ SS_Blt();
+
+ D_DST(gm.s_bkgd, gm.l_x + i * gm.t_w, gm.l_y + j * gm.t_h, gm.t_w, gm.t_h);
+ D_SRC(gm.c_g_st->s_crmbl, gm.c_lvl->map[i][j].id * gm.t_w, 0);
+ SS_Blt();
+
+ gm.f_sml->algn = TA_X_R | TA_Y_B;
+ switch (gm.c_lvl->map[i][j].id) {
+ case 0:
+ SF_Wrt(gm.f_sml, gm.s_bkgd, gm.l_x + (i + 1) * gm.t_w - 1, gm.l_y + (j + 1) * gm.t_h - 1, "1", 0);
+ break;
+ case 1:
+ SF_Wrt(gm.f_sml, gm.s_bkgd, gm.l_x + (i + 1) * gm.t_w - 1, gm.l_y + (j + 1) * gm.t_h - 1, "2", 0);
+ break;
+ case 2:
+ SF_Wrt(gm.f_sml, gm.s_bkgd, gm.l_x + (i + 1) * gm.t_w - 1, gm.l_y + (j + 1) * gm.t_h - 1, "3", 0);
+ break;
+ }
+
+ break;
+ case M_EMPTY:
+ break;
+ default:
+ D_DST(gm.s_bkgd, gm.l_x + i * gm.t_w, gm.l_y + j * gm.t_h, gm.t_w, gm.t_h);
+ D_SRC(gm.c_g_st->s_flr, 0, 0);
+ SS_Blt();
+ break;
+ }
+
+ // static animations ? //
+ if (!cfg.ani) {
+ D_DST(gm.s_bkgd, gm.l_x + i * gm.t_w, gm.l_y + j * gm.t_h, gm.t_w, gm.t_h);
+ switch (gm.c_lvl->map[i][j].t) {
+ case M_OW_U:
+ case M_OW_U_C:
+ D_SRC(gm.c_g_st->s_u_arw, 0, 0);
+ SS_Blt();
+ break;
+ case M_OW_D:
+ case M_OW_D_C:
+ D_SRC(gm.c_g_st->s_d_arw, 0, 0);
+ SS_Blt();
+ break;
+ case M_OW_L:
+ case M_OW_L_C:
+ D_SRC(gm.c_g_st->s_l_arw, 0, 0);
+ SS_Blt();
+ break;
+ case M_OW_R:
+ case M_OW_R_C:
+ D_SRC(gm.c_g_st->s_r_arw, 0, 0);
+ SS_Blt();
+ break;
+ }
+ D_DST(gm.s_bkgd, gm.l_x + i * gm.t_w, gm.l_y + j * gm.t_h, gm.t_w, gm.t_h);
+ switch (gm.c_lvl->map[i][j].t) {
+ case M_OW_U_C:
+ case M_OW_D_C:
+ D_SRC(gm.c_g_st->s_lr_bar, 0, 0);
+ SS_Blt();
+ break;
+ case M_OW_L_C:
+ case M_OW_R_C:
+ D_SRC(gm.c_g_st->s_ud_bar, 0, 0);
+ SS_Blt();
+ break;
+ }
+
+ D_DST(gm.s_bkgd, gm.l_x + i * gm.t_w, gm.l_y + j * gm.t_h, gm.t_w, gm.t_h);
+ switch (gm.c_lvl->map[i][j].t) {
+ case M_TLP_0:
+ D_SRC(gm.c_g_st->s_tlp_0, 0, 0);
+ SS_ABlt(gm.tlp_a);
+ break;
+ case M_TLP_1:
+ D_SRC(gm.c_g_st->s_tlp_1, 0, 0);
+ SS_ABlt(gm.tlp_a);
+ break;
+ case M_TLP_2:
+ D_SRC(gm.c_g_st->s_tlp_2, 0, 0);
+ SS_ABlt(gm.tlp_a);
+ break;
+ case M_TLP_3:
+ D_SRC(gm.c_g_st->s_tlp_3, 0, 0);
+ SS_ABlt(gm.tlp_a);
+ break;
+ }
+ }
+}
+
+/*
+ proceed to next valid level
+*/
+int L_FndNxt()
+{
+ int i, j;
+
+ // proceed to next level
+ gm.c_l_id++;
+ if (gm.c_l_id >= gm.c_l_st->l_num) {
+ gm.c_l_id = 0;
+ gm.c_ch++;
+ // check if this chapter can be entered or if this was the last chapter if not take first unsolved level found
+ if (gm.c_ch >= gm.c_l_st->c_num || !gm.c_l_st->ch[gm.c_ch].opn) {
+ for (i = 0; i < gm.c_ch; i++)
+ for (j = 0; j < gm.c_l_st->l_num; j++)
+ if (!gm.c_s_inf->cmp[i * gm.c_l_st->l_num + j]) {
+ // not all levels completed jump back to first unsolved level
+ gm.c_ch = i;
+ gm.c_l_id = j;
+ return 1;
+ }
+ if (gm.c_ch >= gm.c_l_st->c_num)
+ return 0;
+ else
+ return 1;
+ }
+ }
+ else {
+ // check if all levels of this chapter has been solved
+ for (i = 0; i <= gm.c_ch; i++)
+ for (j = 0; j < gm.c_l_st->l_num; j++)
+ if (!gm.c_s_inf->cmp[i * gm.c_l_st->l_num + j]) {
+ return 1;
+ }
+ // yes! open next chapter
+ if ( gm.c_ch < gm.c_l_st->c_num - 1 )
+ gm.c_s_inf->c_opn[gm.c_ch + 1] = 1;
+ }
+ return 1;
+}
diff --git a/project/jni/application/lmarbles-1.0.8/src/levels.h b/project/jni/application/lmarbles-1.0.8/src/levels.h
new file mode 100644
index 000000000..b0c9f182d
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/levels.h
@@ -0,0 +1,104 @@
+/***************************************************************************
+ levels.h - description
+ -------------------
+ begin : Mon Aug 14 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef LEVELS_H
+#define LEVELS_H
+
+#include
+
+#define MAX_LVLS 10
+#define MAX_CHPTRS 10
+#define L_MAX_W 13
+#define L_MIN_W 4
+#define L_MAX_H 14
+#define L_MIN_H 4
+#define F_MAX_W 10
+#define F_MIN_W 2
+#define F_MAX_H 10
+#define F_MIN_H 1
+
+// level bonuses //
+#define LB_COMPLETED 1000
+#define LB_PER_MOVE 50
+
+// limit type //
+#define TIME 0
+#define MOVES 1
+
+// tile types //
+enum {
+ M_EMPTY = 0, // background //
+ M_FLOOR, // simple floor //
+ M_OW_U_C, // oneway directed to north (up) closed to the left and right side //
+ M_OW_D_C, // analog //
+ M_OW_L_C, // analog //
+ M_OW_R_C, // analog //
+ M_OW_U, // oneway to north not closed at the sides //
+ M_OW_D, // analog //
+ M_OW_L, // analog //
+ M_OW_R, // analog //
+ M_WALL, // impassible wall //
+ M_TLP_0, // teleporter //
+ M_TLP_1, // analog //
+ M_TLP_2, // analog //
+ M_TLP_3, // analog //
+ M_CRUMBLE, // crumbling wall //
+ M_NUM
+};
+
+typedef struct {
+ int m; // marble //
+ int t; // type //
+ int id;
+} MapT;
+
+typedef struct {
+ int tm; // time //
+ int m_w, m_h; // map size //
+ int f_w, f_h; // figure size //
+ int fgr[F_MAX_W][F_MAX_H]; // figure //
+ MapT map[L_MAX_W][L_MAX_H]; // map //
+} Lvl;
+
+typedef struct {
+ char nm[64];
+ char authr[32];
+ char g_st[32];
+ int bkgd;
+ int opn; // levels from this chapter can be played
+ Lvl *lvls;
+} Chptr;
+
+typedef struct {
+ char nm[64];
+ int c_num;
+ int l_num;
+ Chptr *ch;
+ int ok;
+ int limit_type; /* which type of limit? */
+} LSet;
+
+void L_CrtLst();
+void L_DelLst();
+void L_DelSt(void *p);
+void L_AddInvSt(char *nm);
+int L_LdSt(FILE *f);
+void L_Ini(int c, int l);
+void L_DrwMpTl(int x, int y);
+int L_FndNxt();
+
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/src/levels/Original b/project/jni/application/lmarbles-1.0.8/src/levels/Original
new file mode 100644
index 000000000..77b2ac8a2
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/levels/Original
@@ -0,0 +1,768 @@
+
+levels = 8; (per chapter)
+chapters = 4;
+limit = moves; (either moves or limit)
+
+
+
+name = Tutorial;
+author = Michael Speck;
+gfx_set = stone;
+open = 1;
+
+
+limit = 11;
+map_w = 8; map_h = 8;
+fig_w = 2; fig_h = 2;
+
+56;
+65;
+
+
+cccccccc;
+c 5 b c;
+cbb c;
+c 6 b6c;
+cccc b c;
+...c b c;
+...c 5 c;
+...ccccc;
+
+
+
+
+limit = 18;
+map_w = 10; map_h = 9;
+fig_w = 4; fig_h = 2;
+
+ 1 ;
+1898;
+
+
+aaaaaaaaaa;
+a 1 8 a;
+a bb bb a;
+a b b a;
+a 8 a;
+a aaaa a;
+a a..a a;
+a9 a..a 1a;
+aaaa..aaaa;
+
+
+
+
+limit = 22;
+map_w = 11; map_h = 9;
+fig_w = 3; fig_h = 3;
+
+ 4 ;
+6 6;
+ 4 ;
+
+
+.aaaaaaaaa.;
+.a 4a.;
+.a cc caa;
+.a 4c a;
+aac cc c a;
+a c a;
+a6 cc a;
+aaaaaaaa6 a;
+.......aaaa;
+
+
+
+
+limit = 22;
+map_w = 10; map_h = 10;
+fig_w = 3; fig_h = 1;
+
+313;
+
+
+bbbbbbbbbb;
+b 1b;
+b aab;
+ba a aa3b;
+b a a b;
+b 3a b;
+b a b;
+b a aa b;
+b a a b;
+bbbbbbbbbb;
+
+
+
+
+limit = 25;
+map_w = 9; map_h = 9;
+fig_w = 3; fig_h = 3;
+
+ 2 ;
+787;
+ 2 ;
+
+
+aaaaaaaaa;
+a2c c7 a;
+a cc a;
+acc c ca;
+a a;
+a8c c cca;
+acc c2a;
+a7 a;
+aaaaaaaaa;
+
+
+
+
+limit = 21;
+map_w = 10; map_h = 12;
+fig_w = 3; fig_h = 3;
+
+7 9;
+ 8 ;
+9 7;
+
+
+bbbbb;
+b 8 b;
+b b b;
+b b b;
+b b b;
+b bbbbbb;
+bbb b;
+b9 bbbb7b;
+bbb b;
+b bbb;
+b7b 9b;
+bbbbbbbbbb;
+
+
+
+
+limit = 31; (seconds or moves)
+map_w = 10; map_h = 10;
+fig_w = 4; fig_h = 3;
+
+ 5 ;
+2343;
+ 5 ;
+
+
+aaaaaaaaaa;
+a5 2a;
+abb b4b a;
+a3b b b a;
+a a;
+a b b b a;
+a b5 b a;
+a bbb b a;
+a 3 a;
+aaaaaaaaaa;
+
+
+
+
+limit = 63;
+map_w = 13; map_h = 12;
+fig_w = 5; fig_h = 3;
+
+ 55 5;
+5000 ;
+ 5 5;
+
+
+...ccccccccc.;
+...c a 5c.;
+...c0a c.;
+...ca aac.;
+cccc aa 5c.;
+c0a 5 ccc.;
+c c..;
+c a5a aaaaccc;
+c a 5 c;
+c5 aa 0aadc;
+cc l c;
+.cccccccccccc;
+
+
+
+
+
+
+name = A few problems;
+author = Michael Speck;
+gfx_set = wood;
+open = 0;
+
+
+limit = 16;
+map_w = 8; map_h = 7;
+fig_w = 3; fig_h = 3;
+
+1 1;
+232;
+1 1;
+
+
+bbbbbbbb;
+b1 c 2b;
+b R cb;
+bc2 1 3b;
+b L cb;
+b1 c 1b;
+bbbbbbbb;
+
+
+
+
+limit = 35;
+map_w = 12; map_h = 9;
+fig_w = 5; fig_h = 3;
+
+ 55 ;
+50015;
+ 5 ;
+
+
+bbbbbbbbbbbb;
+b 5 c 5b;
+b y ccc b;
+b5 0l y b;
+ccc cc c b;
+.c 5 c b;
+.c 0cc c1l b;
+.c 5 cbbbb;
+.ccccccc....;
+
+
+
+
+limit = 19;
+map_w = 8; map_h = 8;
+fig_w = 3; fig_h = 3;
+
+ 1;
+ 2 ;
+1 ;
+
+
+cccccccc;
+c 1 c;
+c ccc cc;
+c 2 c;
+c ccc cc;
+c 1 c;
+c c c;
+cccccccc;
+
+
+
+
+limit = 22;
+map_w = 11; map_h = 10;
+fig_w = 3; fig_h = 4;
+
+ 9 ;
+ 8 ;
+ 8 ;
+393;
+
+
+....bbb....;
+....b3b....;
+....b b....;
+bbbbb bbbbb;
+b b;
+b8bbbbbbb8b;
+b b.....b b;
+b9bbbbbbb9b;
+b 3 b;
+bbbbbbbbbbb;
+
+
+
+
+limit = 54;
+map_w = 12; map_h = 7;
+fig_w = 4; fig_h = 3;
+
+8 ;
+7997;
+ 1 ;
+
+
+bbbbbbbbbbbb;
+b7 c 9b;
+b c c1 c cb;
+b c b;
+b c c cb;
+b9 7c 8b;
+bbbbbbbbbbbb;
+
+
+
+
+limit = 30; (!)
+map_w = 13; map_h = 13;
+fig_w = 6; fig_h = 3;
+
+ 99 ;
+77 77;
+ 88 ;
+
+
+....ccccccccc;
+....c 9 c;
+....c bbbbb7c;
+....c c;
+ccc.c b b c;
+c7ccc 7b b c;
+c b b c;
+c 8c;
+c bbbb8cccccc;
+c b..b c.....;
+c7bbbb c.....;
+c 9 c.....;
+cccccccc.....;
+
+
+
+
+limit = 64;
+map_w = 13; map_h = 13;
+fig_w = 5; fig_h = 5;
+
+ 5 5 ;
+5 1 5;
+ 1 1 ;
+5 1 5;
+ 5 5 ;
+
+
+bbbbbb.......;
+b5 b.......;
+b aa5b.......;
+b 1a bbbbbbbb;
+b a a 1b;
+b 5 a5 ab;
+b aa a b;
+b 1a a b;
+b 5a5 a5b;
+bbbbbbbb 1a b;
+.......b aa b;
+.......b 5 b;
+.......bbbbbb;
+
+
+
+
+limit = 16;
+map_w = 11; map_h = 9;
+fig_w = 5; fig_h = 3;
+
+ 4 ;
+ 8 8 ;
+1 1 1;
+
+
+bbbbbbbbbbb;
+b8b b b b8b;
+b AAA b;
+bbA 1 1 Abb;
+b b;
+bb 4 bb;
+b AA AA b;
+b b b1b b b;
+bbbbbbbbbbb;
+
+
+
+
+
+
+name = Sometimes Tricky;
+author = Michael Speck;
+gfx_set = metal;
+open = 0;
+
+
+limit = 24;
+map_w = 13; map_h = 12;
+fig_w = 4; fig_h = 3;
+
+5 5;
+ 77 ;
+5 5;
+
+
+..aaaaaaaaaaa;
+..a7 5a;
+aaa b bb b a;
+a b a;
+a b a;
+a bb5b bb a;
+a b b a;
+a b 5b aa;
+aa bb bb a.;
+.a b a.;
+.aaa5 7a.;
+...aaaaaaaaa.;
+
+
+
+
+limit = 42;
+map_w = 12; map_h = 8;
+fig_w = 4; fig_h = 4;
+
+ 2 ;
+21 ;
+ 89;
+ 9 ;
+
+
+aaaaa.......;
+a a aaaaaaa.;
+a 9a x a.;
+a 98aa aaa;
+aaa aa12 a;
+.a x a2 a;
+.aaaaaaa a a;
+.......aaaaa;
+
+
+
+
+limit = 98;
+map_w = 11; map_h = 11;
+fig_w = 5; fig_h = 4;
+
+ 555 ;
+10701;
+ 232 ;
+ 9 ;
+
+
+cccccccccc.;
+c0 5c2 cc;
+c c0 c;
+c ccucccc c;
+c 3c 9c c;
+c l l lc1c;
+c 5cu c c;
+c ccc c;
+c2 c cc 5c;
+cc 1c 7 cc;
+.ccccccccc.;
+
+
+
+
+limit = 28;
+map_w = 11; map_h = 10;
+fig_w = 3; fig_h = 4;
+
+ 1 ;
+32 ;
+ 23;
+ 1 ;
+
+
+bbbbbbbbbbb;
+bx 1c c 3b;
+b c c b;
+bccc c c b;
+b xc2 b;
+b 2cy b;
+b c c cccb;
+b c c b;
+b3 c c1 yb;
+bbbbbbbbbbb;
+
+
+
+
+limit = 38;
+map_w = 9; map_h = 11;
+fig_w = 3; fig_h = 3;
+
+ 7;
+98 ;
+ 7;
+
+
+ccccccc..;
+cz 7 c..;
+cb bb ccc;
+c9 c;
+c b bbbuc;
+c b z c;
+c dc;
+c bbbbb c;
+c b 8c;
+c7 ccccc;
+ccccc....;
+
+
+
+
+limit = 20; (!)
+map_w = 12; map_h = 9;
+fig_w = 3; fig_h = 2;
+
+ 5 ;
+4 4;
+
+
+......aaaaaa;
+......a A 4a;
+aaaaaaa a;
+a a a;
+ay wauwdaa;
+a 5a a.;
+aaaaaaadyuaa;
+.....a4 a;
+.....aaaaaaa;
+
+
+
+
+limit = 42;
+map_w = 12; map_h = 9;
+fig_w = 4; fig_h = 3;
+
+ 99 ;
+7887;
+ 9 ;
+
+
+bbbbb..bbbb;
+b 9 bbbb xb;
+b a 9 d b;
+b wa a7 b;
+b a w a8b;
+b7l a8x b;
+bbb a bb;
+..bbbb r9b.;
+.....bbbbb.;
+
+
+
+
+limit = 22;
+map_w = 9; map_h = 7;
+fig_w = 4; fig_h = 2;
+
+1289;
+ 3 ;
+
+
+...aaa...;
+.aaa3aaa.;
+aa a a aa;
+a9 2 1a;
+aa a a aa;
+.a a8a a.;
+.aaaaaaa.;
+
+
+
+
+
+name = Hardcore;
+author = Michael Speck;
+gfx_set = metal;
+open = 0;
+
+
+limit = 44;
+map_w = 12; map_h = 12;
+fig_w = 5; fig_h = 3;
+
+ 8 ;
+97 79;
+ 8 ;
+
+
+.....aaaaaaa;
+.aaaaa a;
+.a 9aaa a;
+.a aaa a a;
+.a a u a a;
+aa a 8R 9 a;
+a 7 L8 a aa;
+a a d a a.;
+a a aaa a.;
+a aaa7 a.;
+a aaaaa.;
+aaaaaaa.....;
+
+
+
+
+limit = 37;
+map_w = 11; map_h = 11;
+fig_w = 3; fig_h = 5;
+
+ 7 ;
+ 7 ;
+ 3 ;
+9 9;
+ 3 ;
+
+
+aaaaaaaaaa.;
+a7 a 9a.;
+a a aa;
+a aaa ya 3a;
+a az aaa a;
+a3 xa a;
+aa zax a;
+.a aaa 7aa;
+.a ya aaa.;
+.a9 a...;
+.aaaaaaa...;
+
+
+
+
+limit = 14;
+map_w = 8; map_h = 8;
+fig_w = 3; fig_h = 2;
+
+131;
+ 2 ;
+
+
+cccccccc;
+c1 w 1c;
+c c;
+cx y xc;
+cccc 3c;
+...cy wc;
+...c2 c;
+...ccccc;
+
+
+
+
+limit = 44;
+map_w = 13; map_h = 9;
+fig_w = 3; fig_h = 3;
+
+232;
+7 7;
+232;
+
+
+..aaaaaaaaa..;
+..a2aa7aa2a..;
+cca a y a acc;
+c2 y z 2c;
+ccc z ccc;
+..cc3 a 3cc..;
+...ccU7Dcc...;
+....c c....;
+....ccccc....;
+
+
+
+
+limit = 35;
+map_w = 10; map_h = 12;
+fig_w = 3; fig_h = 4;
+
+ 6 ;
+656;
+ 6 ;
+ 4 ;
+
+
+......aaaa;
+......a 4a;
+....aaa a;
+....a6 uwa;
+..aaa l a;
+..a6 ryaaa;
+aaawl 6a..;
+a r aaa..;
+ayd 6a....;
+a aaa....;
+a5 a......;
+aaaa......;
+
+
+
+
+limit = 47;
+map_w = 9; map_h = 9;
+fig_w = 3; fig_h = 4;
+
+4 4;
+ 5 ;
+ 6 ;
+ 5 ;
+
+
+ccccccccc;
+c4 d r 5c;
+c a a a c;
+cr r d lc;
+c a6a a c;
+cu d l dc;
+c a a a c;
+c5 l u 4c;
+ccccccccc;
+
+
+
+
+limit = 43;
+map_w = 11; map_h = 11;
+fig_w = 5; fig_h = 3;
+
+ 1 1 ;
+59395;
+ 191 ;
+
+
+....bbb....;
+.bbbbybbbb.;
+.b 5 5 b.;
+.b1aa3aa1b.;
+bb ax za bb;
+bz wb;
+bb w y bb;
+.b1 a9a 1b.;
+.b 9 9 b.;
+.bbbbxbbbb.;
+....bbb....;
+
+
+
+
+limit = 23;
+map_w = 10; map_h = 9;
+fig_w = 3; fig_h = 3;
+
+ 2 ;
+1 1;
+ 2 ;
+
+
+..aaaaaaaa;
+..ax A a;
+aaa aaa;
+a2a a1a;
+ar xw la;
+a1a a2a;
+aaa aaa;
+a A wa..;
+aaaaaaaa..;
+
+
+
+
diff --git a/project/jni/application/lmarbles-1.0.8/src/lmarbles.6 b/project/jni/application/lmarbles-1.0.8/src/lmarbles.6
new file mode 100644
index 000000000..c35511566
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/lmarbles.6
@@ -0,0 +1,40 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.TH MARBLES 6 "February 14, 2001"
+.SH NAME
+marbles \- build figures out of colored marbles
+.SH SYNOPSIS
+.B marbles
+.SH DESCRIPTION
+This manual page was written for the Debian GNU/Linux distribution
+because the original program does not have a manual page.
+.PP
+You goal in the puzzle game
+.B marbles
+is to create a more or less complex figure out of single marbles within
+a time limit to reach the next level. Sounds easy? Well, there is a
+problem: If a marble starts to move, it will not stop until it hits
+a wall or another marble.
+.SH OPTIONS
+None.
+.SH FILES
+.TP
+.IP "~/.marbles.cfg"
+Automatically generated configfile. This is not meant for human editing.
+.TP
+.IP "/var/lib/games/lmarbles.prfs"
+Global preferences and score file. Not for human editing.
+.SH BUGS
+Please report any bugs you find to Michael Speck
+.SH LICENCE
+.B marbles
+is covered by the GNU General Public License(GPL).
+.SH SEE ALSO
+.BR lbreakout (1)
+.PP
+/usr/share/doc/marbles/*
+.SH AUTHOR
+Michael Speck
+.PP
+This manual page was written by Uwe Hermann ,
+for the Debian GNU/Linux system (but may be used by others).
diff --git a/project/jni/application/lmarbles-1.0.8/src/main.c b/project/jni/application/lmarbles-1.0.8/src/main.c
new file mode 100644
index 000000000..cd903c1c9
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/main.c
@@ -0,0 +1,539 @@
+/***************************************************************************
+ main.c - description
+ -------------------
+ begin : Sam Aug 5 12:36:32 MEST 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include "../config.h"
+#endif
+
+#ifdef _WIN32
+#include
+#endif
+
+#include
+#include
+#include
+#include
+#include "menu.h"
+#include "cfg.h"
+#include "levels.h"
+#include "timer.h"
+#include "sdl.h"
+#include "audio.h"
+#include "profile.h"
+#include "game.h"
+
+// timer -- timer.c //
+extern struct timeb t_c, t_lc;
+// quit game quickly ? //
+int trm_gm = 0;
+// menu config -- cfg.c //
+extern Cfg cfg;
+// menu manager -- menu.c //
+extern MMng mm;
+// sdl struct //
+extern Sdl sdl;
+// levelset list and number of entries -- levels.c //
+extern char **ls_lst;
+extern int ls_n;
+// profiles //
+extern DLst prfs;
+// string list for the menu -- profile.c //
+extern char **prf_lst;
+extern int prf_n;
+// menu entry containing the profile list //
+MEnt *me_prf, *me_del, *me_clr;
+
+// menu actions MUST BE GREATER THAN 0 //
+#define MA_NONE 0
+#define MA_QUT 1
+#define MA_PLY 2
+#define MA_HSC 3
+
+/*
+====================================================================
+Clear the SDL event key (keydown events)
+====================================================================
+*/
+int all_filter( const SDL_Event *event )
+{
+ return 0;
+}
+void event_clear_sdl_queue()
+{
+ SDL_Event event;
+ SDL_SetEventFilter( all_filter );
+ while ( SDL_PollEvent( &event ) );
+ SDL_SetEventFilter( 0 );
+}
+
+/*
+ previously defined hiscore.h but this file no longer needed
+*/
+typedef struct {
+ char nm[12];
+ int lvl;
+ int lvs;
+ int scr;
+ int pct;
+} H_E;
+
+/*
+ show hiscore and highlight rank r
+*/
+void H_Shw()
+{
+ int i, j;
+ SDL_Surface *buf = 0;
+ SFnt *ft;
+ Prf *p;
+ int e_h = mm.ft_nml->h + 2;
+ int off = 50;
+ int a_y = 100;
+ char str[12];
+ int e_num = prfs.cntr > 10 ? 10 : prfs.cntr;
+ H_E hscr[e_num];
+ DL_E *e;
+
+ // save screen //
+ buf = SS_Crt(sdl.scr->w, sdl.scr->h, SDL_SWSURFACE);
+ D_FDST(buf);
+ D_FSRC(sdl.scr);
+ SS_Blt();
+ // darken screen //
+ if (cfg.dim)
+ SDL_DIM();
+
+ // draw background //
+ D_FDST(sdl.scr);
+ D_FSRC(mm.ss_bkgd);
+ SS_Blt();
+ // brighten screen //
+ if (cfg.dim)
+ SDL_UNDIM();
+ else
+ Sdl_FUpd();
+
+ // create highscore list //
+ memset(hscr, 0, sizeof(hscr));
+ e = prfs.hd.n;
+ while (e != &prfs.tl) {
+ p = (Prf*)e->d;
+ for (i = 0; i < e_num; i++)
+ if (p->scr >= hscr[i].scr) {
+ for (j = e_num - 1; j > i; j--)
+ hscr[j] = hscr[j - 1];
+ hscr[i].scr = p->scr;
+ hscr[i].pct = p->pct;
+ hscr[i].lvl = p->lvls;
+ strcpy(hscr[i].nm, p->nm);
+ break;
+ }
+ e = e->n;
+ }
+
+ // write hiscores //
+
+ SF_Wrt(mm.ft_nml, sdl.scr, sdl.scr->w / 2, 50, "Best Profiles", 0);
+ mm.ft_nml->algn = mm.ft_sel->algn = TA_X_L | TA_Y_T;
+
+ for (i = 0; i < e_num; i++) {
+ if (0) // changed later
+ ft = mm.ft_sel;
+ else
+ ft = mm.ft_nml;
+ ft->algn = TA_X_L | TA_Y_T;
+ SF_Wrt(ft, sdl.scr, off, a_y + i * e_h, hscr[i].nm, 0);
+ ft->algn = TA_X_C | TA_Y_T;
+ sprintf(str, "%i", hscr[i].lvl);
+ SF_Wrt(ft, sdl.scr, sdl.scr->w / 2, a_y + i * e_h, str, 0);
+ sprintf(str, "%i", hscr[i].scr);
+// sprintf(str, "%i (%i.%i%%)", hscr[i].scr, hscr[i].pct / 10, hscr[i].pct % 10);
+ ft->algn = TA_X_R | TA_Y_T;
+ SF_Wrt(ft, sdl.scr, sdl.scr->w - off, a_y + i * e_h, str, 0);
+ }
+
+ mm.ft_nml->algn = mm.ft_sel->algn = TA_X_C | TA_Y_C;
+ Sdl_FUpd();
+
+ // wait for a click //
+ Sdl_WtFrClk();
+
+ //darken screen //
+ if (cfg.dim)
+ SDL_DIM();
+ // restore screen //
+ D_FDST(sdl.scr);
+ D_FSRC(buf);
+ SS_Blt();
+ // brighten screen //
+ if (cfg.dim)
+ SDL_UNDIM();
+ else
+ Sdl_FUpd();
+
+ // reset timer //
+ T_Rst();
+}
+
+// menu callbacks //
+
+/*
+ activate / deactivate sound
+*/
+void CB_Snd()
+{
+#ifdef SOUND
+ sound_enable(cfg.s_on);
+#endif
+}
+
+/*
+ set sound volume
+*/
+void CB_StV()
+{
+#ifdef SOUND
+ sound_volume(cfg.s_vol * 16);
+#endif
+}
+
+/*
+ create a profile
+*/
+void CB_CrtP()
+{
+ Prf_Crt(cfg.prf_nm);
+ Prf_CrtLst();
+ // update menu entries //
+ ME_CngSwX(me_prf, &cfg.prf, prf_lst, prf_n);
+ ME_CngSwX(me_del, &cfg.prf, prf_lst, prf_n);
+ ME_CngSwX(me_clr, &cfg.prf, prf_lst, prf_n);
+}
+
+/*
+ clear a profile
+*/
+void CB_ClrP()
+{
+ Prf *p = DL_Get(&prfs, cfg.prf);
+ DL_Clr(&p->sts);
+ p->lvls = 0;
+ p->scr = 0;
+ p->pct = 0;
+}
+
+/*
+ delete a profile
+*/
+void CB_DelP()
+{
+ if (prfs.cntr < 2) {
+ printf("WARNING: last profile cannot be deleted\n");
+ return;
+ }
+ // delete from list //
+ DL_Del(&prfs, cfg.prf);
+ Prf_CrtLst();
+ // update menu entries //
+ ME_CngSwX(me_prf, &cfg.prf, prf_lst, prf_n);
+ ME_CngSwX(me_del, &cfg.prf, prf_lst, prf_n);
+ ME_CngSwX(me_clr, &cfg.prf, prf_lst, prf_n);
+}
+
+void CB_SrtP()
+{
+// Prf_Srt();
+}
+
+/*
+ init menu
+ add all entries
+ check them
+*/
+void MM_CrtE()
+{
+ SDL_Surface *ss_bk, *ss_lg;
+ SFnt *ft_y, *ft_w, *ft_t;
+ Menu *_main, *opts, *snd, *new, *edit, *del, *clr, *crt, *c_del, *c_clr, *c_crt, *gfx, *ctrl;
+ MEnt *e;
+ char *str_diff[] = {"Easy", "Normal", "Hard", "Brainstorm"};
+
+ // load and assign gfx //
+ ss_bk = SS_Ld("gfx/title.bmp", SDL_SWSURFACE);
+ ss_lg = SS_Ld("gfx/logo.bmp", SDL_SWSURFACE);
+ ft_y = SF_LdFxd("gfx/f_yellow.bmp", 32, 96, 10);
+ ft_w = SF_LdFxd("gfx/f_white.bmp", 32, 96, 10);
+ MM_Ini(ss_bk->w / 2, ss_bk->h - 100, 50, ss_bk, ss_lg, ft_y, ft_w);
+
+ // add copyright //
+ ft_t = SF_Ld("gfx/tiny.sdlfnt");
+ ft_t->algn = TA_X_R | TA_Y_B;
+ SF_Wrt(ft_t, ss_bk, ss_bk->w-3, ss_bk->h-1, "(C) 2000 Michael Speck", 0);
+ ft_t->algn = TA_X_L | TA_Y_B;
+ SF_Wrt(ft_t, ss_bk, 0, ss_bk->h-1, "http://lgames.sourceforge.net", 0);
+ SF_Fr(ft_t);
+
+ // create and add entrys //
+ _main = M_Crt(); MM_Add(_main);
+ opts = M_Crt(); MM_Add(opts);
+ snd = M_Crt(); MM_Add(snd);
+ new = M_Crt(); MM_Add(new);
+ edit = M_Crt(); MM_Add(edit);
+ del = M_Crt(); MM_Add(del);
+ clr = M_Crt(); MM_Add(clr);
+ crt = M_Crt(); MM_Add(crt);
+ c_del = M_Crt(); MM_Add(c_del);
+ c_clr = M_Crt(); MM_Add(c_clr);
+ c_crt = M_Crt(); MM_Add(c_crt);
+ gfx = M_Crt(); MM_Add(gfx);
+ ctrl = M_Crt(); MM_Add(ctrl);
+ // main //
+ M_Add(_main, ME_CrtSub("New Game", new));
+ M_Add(_main, ME_CrtAct("Best Profiles", MA_HSC));
+ M_Add(_main, ME_CrtSub("Options", opts));
+ M_Add(_main, ME_CrtAct("Quit", MA_QUT));
+ // options //
+ M_Add(opts, ME_CrtSub("Controls", ctrl));
+ M_Add(opts, ME_CrtSub("Graphics", gfx));
+#ifdef SOUND
+ M_Add(opts, ME_CrtSub("Audio", snd));
+#else
+ M_Add(opts, ME_CrtSep("Audio"));
+#endif
+ M_Add(opts, ME_CrtSep(""));
+ M_Add(opts, ME_CrtSub("Back", _main));
+ // sound //
+ e = ME_CrtSw2("Sound: ", &cfg.s_on, "Off", "On");
+ e->cb = CB_Snd;
+ M_Add(snd, e);
+ e = ME_CrtRng("Volume: ", &cfg.s_vol, 1, 8, 1);
+ e->cb = CB_StV;
+ M_Add(snd, e);
+ M_Add(snd, ME_CrtSep(""));
+ M_Add(snd, ME_CrtSub("Back", opts));
+ // new game //
+ M_Add(new, ME_CrtAct("Start", MA_PLY));
+ M_Add(new, ME_CrtSep(""));
+ M_Add(new, ME_CrtSwX("Difficulty:", &cfg.diff, str_diff, 4));
+ if (cfg.ls >= ls_n) cfg.ls = 0; // maybe someone deleted some level sets //
+ M_Add(new, ME_CrtSwX("Levelset:", &cfg.ls, ls_lst, ls_n));
+ me_prf = ME_CrtSwX("Profile:", &cfg.prf, prf_lst, prf_n);
+ M_Add(new, me_prf);
+ M_Add(new, ME_CrtSep(""));
+ M_Add(new, ME_CrtSub("Edit Profiles", edit));
+ M_Add(new, ME_CrtSep(""));
+ M_Add(new, ME_CrtSub("Back", _main));
+ // edit //
+ M_Add(edit, ME_CrtSub("Create Profile", crt));
+ M_Add(edit, ME_CrtSub("Clear Profile", clr));
+ M_Add(edit, ME_CrtSub("Delete Profile", del));
+ M_Add(edit, ME_CrtSep(""));
+ e = ME_CrtSub("Back", new);
+ e->cb = CB_SrtP;
+ M_Add(edit, e);
+ // create //
+ M_Add(crt, ME_CrtStr("Profile Name", cfg.prf_nm, 11));
+ M_Add(crt, ME_CrtSub("Create Profile", c_crt));
+ M_Add(crt, ME_CrtSep(""));
+ M_Add(crt, ME_CrtSub("Back", edit));
+ // confirm create //
+ e = ME_CrtSub("Yes", crt);
+ e->cb = CB_CrtP;
+ M_Add(c_crt, e);
+ M_Add(c_crt, ME_CrtSub("No", crt));
+ // clear //
+ me_clr = ME_CrtSwX("Profile:", &cfg.prf, prf_lst, prf_n);
+ M_Add(clr, me_clr);
+ M_Add(clr, ME_CrtSub("Clear Profile", c_clr));
+ M_Add(clr, ME_CrtSep(""));
+ M_Add(clr, ME_CrtSub("Back", edit));
+ // confirm clear //
+ e = ME_CrtSub("Yes", clr);
+ e->cb = CB_ClrP;
+ M_Add(c_clr, e);
+ M_Add(c_clr, ME_CrtSub("No", clr));
+ // delete //
+ me_del = ME_CrtSwX("Profile:", &cfg.prf, prf_lst, prf_n);
+ M_Add(del, me_del);
+ M_Add(del, ME_CrtSub("Delete Profile", c_del));
+ M_Add(del, ME_CrtSep(""));
+ M_Add(del, ME_CrtSub("Back", edit));
+ // confirm clear //
+ e = ME_CrtSub("Yes", del);
+ e->cb = CB_DelP;
+ M_Add(c_del, e);
+ M_Add(c_del, ME_CrtSub("No", del));
+ // graphics //
+ M_Add(gfx, ME_CrtSw2("Animations:", &cfg.ani, "Off", "On"));
+// M_Add(gfx, ME_CrtSw2("Transparency:", &cfg.trp, "Off", "On"));
+ M_Add(gfx, ME_CrtSw2("Fullscreen:", &cfg.fscr, "Off", "On"));
+ M_Add(gfx, ME_CrtSw2("Dim Effect:", &cfg.dim, "Off", "On"));
+ M_Add(gfx, ME_CrtSep(""));
+ M_Add(gfx, ME_CrtSub("Back", opts));
+ // controls
+ M_Add(ctrl, ME_CrtKey("Up", &cfg.k_up));
+ M_Add(ctrl, ME_CrtKey("Down", &cfg.k_down));
+ M_Add(ctrl, ME_CrtKey("Left", &cfg.k_left));
+ M_Add(ctrl, ME_CrtKey("Right", &cfg.k_right));
+ M_Add(ctrl, ME_CrtKey("Undo", &cfg.k_undo));
+ M_Add(ctrl, ME_CrtSep(""));
+ M_Add(ctrl, ME_CrtSub("Back", opts));
+
+ // default valid keys
+ MM_DfVKys();
+
+ // adjust position of all entries in all menus //
+ MM_AdjP();
+
+ // call all callbacks //
+ MM_CB();
+
+ // check for errors
+ MM_Ck();
+}
+
+/*
+ init sound, menu, profiles, game
+ main loop for the menu
+*/
+int main(int argc, char *argv[])
+{
+ SDL_Event e;
+ int go_on = 1;
+ int ms;
+ char aux[64];
+
+#ifdef _WIN32
+ /* Get Windows to open files in binary mode instead of default text mode */
+ _fmode = _O_BINARY;
+#endif
+
+ // just query version? //
+ if ( argc > 1 && !strncmp( "--version", argv[1], 9 ) ) {
+
+ printf( "%s\n", VERSION );
+ return 0;
+
+ }
+
+ // random init
+ srand(time(NULL));
+
+ // sdl init //
+#ifdef SOUND
+ Sdl_Ini(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER);
+#else
+ Sdl_Ini(SDL_INIT_VIDEO | SDL_INIT_TIMER);
+#endif
+ sprintf( aux, "LMarbles %s", VERSION );
+ SDL_WM_SetCaption(aux, 0);
+
+ // show logo //
+ Sdl_StVdMd(512, 384, 16, SDL_SWSURFACE);
+
+ // show hardware capabilities //
+ Sdl_HwCps();
+
+ // load config //
+ C_StPth();
+ C_Ld();
+
+ // load profiles //
+ Prf_Ini();
+ if (!Prf_Ld())
+ cfg.prf = 0;
+
+ // create levelset list and reset config's levelset index if nescessary //
+ L_CrtLst();
+ if (cfg.ls >= ls_n)
+ cfg.ls = 0;
+
+#ifdef SOUND
+ audio_open();
+ sound_enable( cfg.s_on );
+ sound_volume( cfg.s_vol * 16 );
+#endif
+
+ // game init //
+ G_Ini();
+
+ // init and show menu//
+ MM_CrtE();
+ MM_Shw(MM_RSZ);
+
+ event_clear_sdl_queue();
+ //menu loop
+ T_Rst(); // reset time //
+ while (go_on && !trm_gm) {
+ M_Hd(mm.c_mn);
+ if (SDL_PollEvent(&e)) {
+ if (e.type == SDL_QUIT)
+ trm_gm = 1;
+ if (e.type == SDL_KEYUP && e.key.keysym.sym == SDLK_ESCAPE)
+ go_on = 0;
+ switch (MM_Evt(&e)) {
+ case MA_QUT:
+ go_on = 0;
+ break;
+ case MA_PLY:
+ if (G_Opn()) {
+ G_Run();
+ G_Cls();
+ }
+ break;
+ case MA_HSC:
+ M_Shw(mm.c_mn);
+ Sdl_UpdR();
+ H_Shw(); // defined in main.c //
+ break;
+ }
+ }
+ ms = T_Gt();
+ M_CmA(mm.c_mn, ms);
+ M_Shw(mm.c_mn);
+ Sdl_UpdR();
+ SDL_Delay( 5 );
+ }
+
+ // terminate menu //
+ MM_Trm();
+
+ // terminate game //
+ G_Trm();
+
+ // close soundserver //
+#ifdef SOUND
+ audio_close();
+#endif
+
+ // save config //
+ C_Sv();
+
+ // free levelset list //
+ L_DelLst();
+
+ // save profiles //
+ Prf_Sv();
+ Prf_Trm();
+
+ // free screen //
+ Sdl_Qut();
+
+ printf("Bye, bye!\n");
+
+ return 0;
+}
diff --git a/project/jni/application/lmarbles-1.0.8/src/manual/arrow.jpg b/project/jni/application/lmarbles-1.0.8/src/manual/arrow.jpg
new file mode 100644
index 000000000..4df01e62d
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/manual/arrow.jpg differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/manual/arrow2.jpg b/project/jni/application/lmarbles-1.0.8/src/manual/arrow2.jpg
new file mode 100644
index 000000000..af2ce74b7
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/manual/arrow2.jpg differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/manual/crumble.jpg b/project/jni/application/lmarbles-1.0.8/src/manual/crumble.jpg
new file mode 100644
index 000000000..9ccc5d16a
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/manual/crumble.jpg differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/manual/manual.html b/project/jni/application/lmarbles-1.0.8/src/manual/manual.html
new file mode 100644
index 000000000..97f9f271c
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/manual/manual.html
@@ -0,0 +1,359 @@
+
+
+
+
+
+
+LMarbles Manual Page
+
+
+
+
+
+
+LMarbles
+
+Copyright 2000 Michael Speck
+Released under GPL
+
+
+
+
+
+
+
+Menu
+How To Play
+Controls
+Creating Your Own Levels
+
+
+
+
+
+
+
+
+[New Game] (submenu)
+
+ [Start]
+ Starts a game.
+ [Difficulty]
+
+ Brainstorm: You play against my solution made after some time passed.
+ I had to play the levels for real so this is a fair move limit.
+ Easy: You play against my solution +100% (-20% per chapter).
+ Normal: You play against my solution +50%moves (-10%per chapter).
+ Hard: You play against my solution +25% moves (-5% per chapter).
+
+ Hard gives you twice the score and Brainstorm five times
+ the score of a Normal game. Easy cuts your score in half.
+
+ [Levelset]
+ Set of levels you want to play (e.g. 'Original').
+ [Profile]
+ Profile you want to play with (e.g. 'Michael'). Any progress and score will be written to this profile.
+ [Edit Profiles] (submenu)
+
+ [Create Profile] (submenu)
+ Enter a profile name (eg your own name) and simply create it. Now choose this new profile at [New Game]/[Profile]
+ and start the game.
+
+ [Clear Profile] (submenu)
+ This will clear score and any level progress of the choosen profile.
+
+ [Delete Profile] (submenu)
+ This will remove a profile. Of course, a new one using the same name can be recreated (which would be same
+ like simply clear it).
+
+
+
+
+
+
+[Best Profiles]
+A list of the ten best players with the following information: name (left side), number of levels finished (middle),
+score (right side), average time needed in percent (in brackets; 100%-not even one second needed(impossible); 0%-every single second has been used).
+
+[Options] (submenu)
+
+ [Graphics] (submenu)
+
+ [Animations] Enables/Disables animations.
+ [Fullscreen] Switches between windowed and fullscreen mode.
+ [Dim Effect] Enables/Disables dim effect. ('Disabled' is recommended when using SDL older than version 1.1.4.)
+
+ [Audio] (submenu)
+
+ [Sound] Enables/Disables sound.
+ [Volume] Sets volume of sound.
+
+
+
+[Quit]
+Quits the game!
+
+
+
+ToC
+
+
+
+
+
+
+Marbles is very similiar to Atomix and was heavily inspired by it. Goal is to create a more or less
+complex figure out of single marbles within a time limit to reach the next level.
+Sounds easy? Well, there is a problem: If a marble starts to move it will not stop until it hits a
+wall or marble.
+
+
+There are also some obstacles:
+
+If a marble moves on such an arrow it will change its direction to the direction the arrow points at.
+If a marble comes from the direction the arrow points at it will stop before the arrow.
+
+These yellow and black stripes mean this tile can neither be accessed from these sides nor from the side the
+arrow points at. So there is only one way to get past this obstacle.
+
+If a marble encounters such a teleport it will teleport to the second one of the same color and keep on moving
+in the same direction.
+
+Such a crumbling wall takes one, two or three hits before it vanishes completely. The number of hits left is
+displayed by a small digit in the lower right corner of the crumbling wall.
+
+
+You play against a move limit and you'll gain the following score when you finished
+a level:
+
+Difficulty Level Bonus Bonus per remaining move
+ Easy 500 25
+Normal 1000 50
+Hard 2000 100
+Brainstorm 5000 250
+
+You will not gain points twice for the same level!
+
+
+If you run Marbles the very first time only one profile (named 'Michael') exists. You probably want to play with
+a profile named like you. How to create and use a new profile is described in Menu .
+Levels are grouped in chapters and chapters are grouped in levelsets. Right now, Marbles comes with just one
+levelset called 'Original' containing three chapters with ten levels each. Of course, you can create your own levelsets .
+You have unlimited tries to solve a level! The order in which you solve levels of one chapter does not matter! There are small lights in the right lower
+corner of the screen of one of the following colors: red(cannot be accessed), orange(can be accessed, not solved yet) and
+green (already solved, you will not gain any score for solving it again). Just click on a light and confirm
+to change the level. To enter a new chapter ALL previous levels have to be solved.
+
+Although the interface is quite intuitive you should take a look at the controls .
+
+ToC
+
+
+
+
+
+Use your mouse to:
+Select a marble: Left-click on it. (You can simply change selection by clicking on another marble)
+Release a marble: Right-click anywhere.
+Move a marble: When you selected a marble move the mouse pointer into the wanted direction. If movement is
+possible the mouse pointer will change into a big arrow pointing into the direction. Then simply left-click.
+Change the level: As written in 'How To Play' these lights in the right lower corner
+represent the levels. Simply left-click on a green or orange one and confirm the change. (If you choose the
+current level (white frame) this will be the same as restarting this level.)
+Confirm: When you quit, restart or change the level you will be asked to confirm first by pressing 'y' or
+'n'. You can do this with left-click(yes) or right-click(no) as well.
+
+
+Important keys:
+[Escape]: Quits the game after confirmation.
+[r]: Restarts level after confirmation.
+[p]: Pauses game.
+[Space]: If you think your last movement was wrong you can restore the old position by pressing Space as
+long as the marble did not hit a crumbling wall (can be redefined in options/controls).
+
+You can use the cursor keys to move a marble (can also be redefined)!
+
+
+If your difficulty is 'Training' press a movement key or left mouse button while a marble is moving to 'warp' it to its destination!
+
+
+ToC
+
+
+
+
+
+As described in 'How To Play' levels are grouped in chapters and chapters are grouped in
+levelsets. A levelset is a file in Marbles' subdirectory 'levels' without any extension. When finished with the
+creation you must become root and copy it to the install directory usually
+/usr/local/share/games/marbles/levels (if you installed marbles). That's it. Of course, you must test and change
+a lot while developing so you should extract Marbles' source somewhere temporary, run configure with the option
+--disable-install which allows you to work in Marbles' temporary 'levels' directory where you can simply edit and test
+your levelset. (the 'levels' directory should already contain a file called 'Original').
+
+
+Once again step by step:
+
+temporarily extract the source somewhere (e.g. /tmp)
+change to this source directory
+run './configure --disable-install'; 'make' (do not type 'make install'!!!)
+change to ./marbles/levels
+create an empty file without any extension (e.g. 'Brainstorm')
+edit this file properly (as described below)
+test it by running Marbles (binary can be found in the parent directory of 'levels')
+when everything works fine, become root and install it to Marbles' install directory (usually
+/usr/local/share/games/marbles/levels - of course, you must have installed Marbles before doing this )
+
+
+
+When testing your levelsets you should use a separate profile (e.g. called 'Testing').
+If you start creating a new levelset with, say, ten levels per chapter but you have made only one level so
+far Marbles will stop parsing the file and ask for confirmation if you try to start this levelset (press 'y' or
+left-click). All levels before the error can be played without problems but because Marbles stopped parsing
+further levels does not exist. Changing to such a non-existing level might result in an infinite loop. But when
+you are finished with creating your levelset no errors or warnings should occur! (If you run Marbles in an xterm
+errors and warnings will be displayed.)
+
+
+If you have problems writing the file, take a look at 'Original'.
+
+
+How to write the file:
+
+
+Syntax:
+<subsection> starts a subsection (e.g. <level>)
+</subsection> ends a subsection (e.g. </level>)
+(comment) such a comment must not contain any '<' or '>' or ';'
+normal entry; (e.g. in subsection map of a level: ...a 1 aa...;)
+variable = value; (e.g. author = Michael Speck;)
+
+
+Normal entries and initializations have to end with a semicolon! Subsections and comments must not end with a semicolon!
+
+
+Each levelset starts with a subsection called 'info' containing information about the number of levels per
+chapter and the number of chapters.
+
+<info>
+levels = levels_per_chapter; (maximum is 10)
+chapters = chapter_number; (maximum is 10)
+</info>
+
+
+
+It follows the definition of each chapter containing information about name, author, used graphics set, whether this
+chapter is open from the very beginning and definition of each level (number of levels as you defined in
+<info>). Usually only the first chapter is open for playing from the very beginning.
+
+<chapter>
+name = Name Of The Chapter;
+author = Your Name;
+gfx_set = GfxSet; (either 'stone' or 'metal' or 'wood'; e.g. gfx_set = stone)
+open = Open?; (1 = open; 0 = all previous levels have to be completed first)
+
+...levels
+
+</chapter>
+
+
+
+A level is defined as follows. It contains information about the time (in seconds), size of the map, size of
+the figure and two subsections with the figure and the map.
+
+<level>
+time = time_in_seconds; (e.g. time = 90;)
+map_w = map_width; (ranges between 4 and 13)
+map_h = map_height; (ranges between 4 and 14)
+fig_w = figure_width; (ranges between 2 and 10)
+fig_h = figure_height; (ranges between 1 and 10)
+<figure>
+...
+</figure>
+<map>
+...
+</map>
+</level>
+
+
+
+A figure tile is either a marble ID from 0 to 9 or [Space] for no marble.
+
+
+Example:
+<figure>
+ 1 2 ;
+23454;
+ 1 2 ;
+</figure>
+
+
+
+Valid map tiles are:
+'a', 'b', 'c' - different walls
+'A', 'B', 'C' - crumbling walls ('C' three, 'B' two, 'A' one hit)
+[Space] - floor
+'.' - background
+'u','d','r','l' - arrows without barriers (up, down, right, left)
+'U','D','R','L' - arrows with barriers (up, down, right, left)
+'w','x','y','z' - teleports of different colors
+'0'..'9' - marbles
+
+Example:
+<map>
+....aaaa;
+..aaa 2a;
+.aa1 xa;
+aa u aa;
+a 2 xa.;
+aaaaaaa.;
+</map>
+
+
+
+So this is the structure of a levelset:
+
+<info>
+...
+</info>
+
+<chapter>
+...
+
+<level>
+...
+<figure>
+...
+</figure>
+<map>
+...
+</map>
+</level>
+
+...(more levels)
+
+</chapter>
+
+...(more chapters)
+
+
+
+Once again: Taking a look at 'Original' might help you a lot...
+
+ToC
+
+
+
+
+
Contact
+
+
+
+Last Update: December 9th 2000
+
+
+
+
+
+
+
diff --git a/project/jni/application/lmarbles-1.0.8/src/manual/marbles.jpg b/project/jni/application/lmarbles-1.0.8/src/manual/marbles.jpg
new file mode 100644
index 000000000..83aa600ae
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/manual/marbles.jpg differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/manual/teleport.jpg b/project/jni/application/lmarbles-1.0.8/src/manual/teleport.jpg
new file mode 100644
index 000000000..5f90c63fb
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/manual/teleport.jpg differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/menu.c b/project/jni/application/lmarbles-1.0.8/src/menu.c
new file mode 100644
index 000000000..9537ecfde
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/menu.c
@@ -0,0 +1,763 @@
+/***************************************************************************
+ menu.c - description
+ -------------------
+ begin : Sat Aug 5 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "menu.h"
+#include
+#include
+#include "cfg.h"
+
+extern Sdl sdl;
+MMng mm;
+extern Cfg cfg;
+
+// menu entry //
+/*
+ free entry
+*/
+void ME_Fr(void *e)
+{
+ DL_Clr(&((MEnt*)e)->sw);
+ free(e);
+}
+
+/*
+ all entries have these init steps in common
+*/
+void ME_Ini(MEnt *e, int t, char *n)
+{
+ DL_Ini(&e->sw);
+ e->sw.flgs = DL_NOCB | DL_AUTODEL;
+ e->a = 255;
+ strcpy(e->nm, n);
+ e->t = t;
+ e->dx = e->dy = e->dw = e->dh = 0;
+ e->x = e->y = 0;
+ e->cb = 0;
+}
+
+/*
+ set range
+*/
+void ME_StRng(MEnt* e, int *p, int min, int max, int stp)
+{
+ e->p = p;
+ e->min = min;
+ e->max = max;
+ e->stp = stp;
+}
+
+/*
+ create an empty entry
+*/
+MEnt* ME_Crt()
+{
+ MEnt *e;
+ e = malloc(sizeof(MEnt));
+ if (e == 0) {
+ printf("ME_Crt: Ups... not enough memory to create menu entry...\n");
+ exit(1);
+ }
+ return e;
+}
+
+/*
+ create separator
+*/
+MEnt* ME_CrtSep(char *s)
+{
+ MEnt *e = ME_Crt();
+
+ ME_Ini(e, ME_SEP, s);
+
+ return e;
+}
+
+/*
+ create two switches group
+*/
+MEnt* ME_CrtSw2(char *n, int *p, char *cap1, char *cap2)
+{
+ char *sw;
+ MEnt *e = ME_Crt();
+
+ ME_Ini(e, ME_SWT, n);
+ ME_StRng(e, p, 0, 1, 1);
+
+ sw = malloc(32);
+ strcpy(sw, cap1);
+ DL_Add(&e->sw, sw);
+ sw = malloc(32);
+ strcpy(sw, cap2);
+ DL_Add(&e->sw, sw);
+
+ return e;
+}
+
+/*
+ create multi switches group
+*/
+MEnt* ME_CrtSwX(char *n, int *p, char **caps, int num)
+{
+ int i;
+ char *sw;
+ MEnt *e = ME_Crt();
+
+ ME_Ini(e, ME_SWT, n);
+ ME_StRng(e, p, 0, num - 1, 1);
+
+ for (i = 0; i < num; i++) {
+ sw = malloc(32);
+ strcpy(sw, caps[i]);
+ DL_Add(&e->sw, sw);
+ }
+
+ return e;
+}
+
+/*
+ create range
+*/
+MEnt* ME_CrtRng(char *n, int *p, int min, int max, int stp)
+{
+ MEnt *e = ME_Crt();
+
+ ME_Ini(e, ME_RNG, n);
+ ME_StRng(e, p, min, max, stp);
+
+ return e;
+}
+
+/*
+ create action
+*/
+MEnt* ME_CrtAct(char *n, int a_id)
+{
+ MEnt *e = ME_Crt();
+
+ ME_Ini(e, ME_ACT, n);
+ e->act = a_id;
+
+ return e;
+}
+
+/*
+ create an edit
+ min is the current length
+ max the max length
+ and p the char pointer
+*/
+MEnt* ME_CrtStr(char *n, char *p, int m)
+{
+ MEnt *e = ME_Crt();
+
+ ME_Ini(e, ME_STR, n);
+
+ e->max = m;
+ e->min = strlen(p);
+ e->p = (int*)p;
+
+ return e;
+}
+
+/*
+ create a submenu
+*/
+MEnt* ME_CrtSub(char *n, void *m)
+{
+ MEnt *e = ME_Crt();
+
+ ME_Ini(e, ME_SUB, n);
+
+ e->smn = m;
+
+ return e;
+}
+
+/*
+ create a key
+*/
+MEnt* ME_CrtKey(char *n, int *p)
+{
+ MEnt *e = ME_Crt();
+
+ ME_Ini(e, ME_KEY, n);
+ e->p = p;
+
+ return e;
+}
+
+/*
+ update the string and compute size
+*/
+void ME_SUpd(MEnt* e)
+{
+ char c;
+ switch (e->t) {
+ case ME_STR:
+ sprintf(e->str, "%s: %s", e->nm, (char*)e->p);
+ break;
+ case ME_SWT:
+ sprintf(e->str, "%s %s", e->nm, (char*)DL_Get(&e->sw, *e->p));
+ break;
+ case ME_RNG:
+ sprintf(e->str, "%s %i", e->nm, *e->p);
+ break;
+ case ME_KEY:
+ c = *((char*)e->p);
+ if (c > 32 && c < 127)
+ sprintf(e->str, "%s: '%c'", e->nm, c);
+ else
+ if (*e->p == 0)
+ sprintf(e->str, "%s: ???", e->nm);
+ else
+ switch (*e->p){
+ case SDLK_UP:
+ sprintf(e->str, "%s: Up", e->nm);
+ break;
+ case SDLK_DOWN:
+ sprintf(e->str, "%s: Down", e->nm);
+ break;
+ case SDLK_LEFT:
+ sprintf(e->str, "%s: Left", e->nm);
+ break;
+ case SDLK_RIGHT:
+ sprintf(e->str, "%s: Right", e->nm);
+ break;
+ case SDLK_SPACE:
+ sprintf(e->str, "%s: Space", e->nm);
+ break;
+ default:
+ sprintf(e->str, "%s: %i", e->nm, c);
+ }
+ break;
+ default:
+ strcpy(e->str, e->nm);
+ break;
+ }
+
+ e->dw = SF_TxtW(mm.ft_nml, e->str);
+ e->dh = mm.ft_nml->h;
+ e->dx = e->x - (e->dw >> 1);
+ e->dy = e->y - (e->dh >> 1);
+}
+
+/*
+ edit string
+*/
+void ME_Edt(MEnt *e, int c, int u)
+{
+ if (e->t != ME_STR) return;
+ if (c == SDLK_BACKSPACE && e->min > 0) {
+ //clear last char
+ ((char*)e->p)[--e->min] = 0;
+ }
+ else
+ if (c >= 32 && c < 128 && e->min < e->max) {
+ //letter
+ ((char*)e->p)[e->min++] = u;
+ }
+}
+
+/*
+ change multi switches group
+*/
+void ME_CngSwX(MEnt *e, int *p, char **caps, int num)
+{
+ int i;
+ char *sw;
+
+ DL_Clr(&e->sw);
+ ME_StRng(e, p, 0, num - 1, 1);
+ for (i = 0; i < num; i++) {
+ sw = malloc(32);
+ strcpy(sw, caps[i]);
+ DL_Add(&e->sw, sw);
+ }
+ *e->p = 0;
+}
+
+// menu //
+/*
+ create an empty menu
+*/
+Menu* M_Crt()
+{
+ Menu *m;
+ m = malloc(sizeof(Menu));
+ if (m == 0) {
+ printf("M_Crt(): Ups... not enough memory to create a menu\n");
+ exit(1);
+ }
+ m->c_e = 0;
+ DL_Ini(&m->ent);
+ m->ent.flgs = DL_AUTODEL;
+ m->ent.cb = ME_Fr;
+ return m;
+}
+
+/*
+ clear a menu
+*/
+void M_Fr(void *m)
+{
+ DL_Clr(&((Menu*)m)->ent);
+ free(m);
+}
+
+/*
+ add an entry and select first entry as current
+*/
+void M_Add(Menu *m, MEnt *e)
+{
+ DL_Add(&m->ent, e);
+ if (m->c_e == 0 && e->t != ME_SEP) {
+ m->c_e = e;
+ m->c_e->a = 0;
+ }
+}
+
+/*
+ hide a menu
+*/
+void M_Hd(Menu *m)
+{
+ DL_E *e = m->ent.hd.n;
+ MEnt *me;
+
+ while (e != &m->ent.tl) {
+ me = (MEnt*)e->d;
+ D_DST(sdl.scr, me->dx, me->dy, me->dw, me->dh);
+ D_SRC(mm.ss_bkgd, me->dx, me->dy);
+ SS_Blt();
+ Sdl_AddR(me->dx, me->dy, me->dw, me->dh);
+ e = e->n;
+ }
+}
+
+/*
+ show a menu by drawing each entry
+*/
+void M_Shw(Menu *m)
+{
+ DL_E *e = m->ent.hd.n;
+ MEnt *me;
+
+ M_SUpd(m);
+
+ while (e != &m->ent.tl) {
+ me = (MEnt*)e->d;
+ if (me == m->c_e) {
+ if (me->a > 0) {
+ SF_Wrt(mm.ft_nml, sdl.scr, me->x, me->y, me->str, 0);
+ SF_Wrt(mm.ft_sel, sdl.scr, me->x, me->y, me->str, (int)me->a);
+ }
+ else
+ SF_Wrt(mm.ft_sel, sdl.scr, me->x, me->y, me->str, 0);
+ }
+ else {
+ SF_Wrt(mm.ft_nml, sdl.scr, me->x, me->y, me->str, 0);
+ if (me->a < 255)
+ SF_Wrt(mm.ft_sel, sdl.scr, me->x, me->y, me->str, (int)me->a);
+ }
+ Sdl_AddR(me->dx, me->dy, me->dw, me->dh);
+ e = e->n;
+ }
+}
+
+/*
+ do an ME_SUpd() for all entries
+*/
+void M_SUpd(Menu *m)
+{
+ DL_E *e = m->ent.hd.n;
+
+ while (e != &m->ent.tl) {
+ ME_SUpd((MEnt*)e->d);
+ e = e->n;
+ }
+}
+
+/*
+ compute new alpha value for all entries
+*/
+void M_CmA(Menu *m, int ms)
+{
+ DL_E *e = m->ent.hd.n;
+ MEnt *me;
+
+ while (e != &m->ent.tl) {
+ me = (MEnt*)e->d;
+ if (me->a < 255 && me != m->c_e) {
+ me->a += mm.a_c * ms;
+ if (me->a > 255)
+ me->a = 255;
+ }
+ e = e->n;
+ }
+}
+
+// menu manager //
+/*
+ initialize graphics, menu and positions of menu and logo
+*/
+void MM_Ini(int x, int y, int ly, SDL_Surface *ss_bk, SDL_Surface *ss_lg, SFnt *fn, SFnt *fs)
+{
+ mm.ss_bkgd = ss_bk;
+ mm.ss_logo = ss_lg;
+ mm.ft_nml = fn;
+ mm.ft_sel = fs;
+ mm.ft_nml->algn = mm.ft_sel->algn = TA_X_C | TA_Y_C;
+ mm.x = x;
+ mm.y = y;
+ mm.ly = ly;
+ mm.lx = (ss_bk->w - ss_lg->w) / 2;
+ DL_Ini(&mm.mn);
+ mm.mn.flgs = DL_AUTODEL;
+ mm.mn.cb = M_Fr;
+ mm.c_mn = 0;
+ mm.a_c = 0.28;
+#ifdef SOUND
+ mm.s_clk = sound_chunk_load("click.wav");
+#endif
+}
+
+/*
+ show the menu
+ sets a new video mode if wanted
+*/
+void MM_Shw(int rsz)
+{
+ if (rsz)
+ Sdl_StVdMd(mm.ss_bkgd->w, mm.ss_bkgd->h, 16, SDL_SWSURFACE);
+ D_FDST(sdl.scr);
+ D_FSRC(mm.ss_bkgd);
+ SS_Blt();
+ D_DST(sdl.scr, mm.lx, mm.ly, mm.ss_logo->w, mm.ss_logo->h);
+ D_SRC(mm.ss_logo, 0, 0);
+ SS_Blt();
+ if (cfg.dim)
+ SDL_UNDIM();
+ else
+ Sdl_FUpd();
+ if (mm.c_mn == 0 || mm.c_mn->ent.cntr == 0) {
+ fprintf(stderr, "MM_Shw(): Ups... no current or empty menu defined!\n");
+ exit(1);
+ }
+ mm.c_mn->c_e->a = 0;
+ M_Shw(mm.c_mn);
+ Sdl_UpdR();
+}
+
+/*
+ free memory used
+*/
+void MM_Trm()
+{
+ if (mm.ss_bkgd) SDL_FreeSurface(mm.ss_bkgd);
+ if (mm.ss_logo) SDL_FreeSurface(mm.ss_logo);
+ if (mm.ft_nml) SF_Fr(mm.ft_nml);
+ if (mm.ft_sel) SF_Fr(mm.ft_sel);
+ DL_Clr(&mm.mn);
+#ifdef SOUND
+ if (mm.s_clk) sound_chunk_free(&mm.s_clk);
+#endif
+}
+
+/*
+ add a menu
+*/
+void MM_Add(Menu *m)
+{
+ DL_Add(&mm.mn, m);
+ if (mm.mn.cntr == 1)
+ mm.c_mn = m;
+}
+
+/*
+ adjust position of all entries in all menus relative to mm.x | mm.y as centre
+*/
+void MM_AdjP()
+{
+ DL_E *m = mm.mn.hd.n;
+ DL_E *e;
+ MEnt *me;
+ int i;
+
+ while (m != &mm.mn.tl) {
+ e = ((Menu*)m->d)->ent.hd.n;
+ i = 0;
+ while (e != &((Menu*)m->d)->ent.tl) {
+ me = (MEnt*)e->d;
+ me->x = mm.x;
+ me->y = (mm.y - (((Menu*)m->d)->ent.cntr * mm.ft_nml->h) / 2) + i * mm.ft_nml->h + mm.ft_nml->h / 2;
+ i++;
+ e = e->n;
+ }
+ m = m->n;
+ }
+}
+
+/*
+ allow default keys: alphanumerical and arrows
+*/
+void MM_DfVKys()
+{
+ int i;
+ memset(mm.vkys, 0, sizeof(mm.vkys));
+ for (i = 32; i < 128; i++)
+ mm.vkys[i] = 1;
+ mm.vkys[SDLK_UP] = 1;
+ mm.vkys[SDLK_DOWN] = 1;
+ mm.vkys[SDLK_RIGHT] = 1;
+ mm.vkys[SDLK_LEFT] = 1;
+ mm.vkys[SDLK_p] = 0;
+ mm.vkys[SDLK_f] = 0;
+ mm.vkys[SDLK_r] = 0;
+}
+
+/*
+ checks if all menus contain at least one entry
+ and if every menu has an current entry selected
+
+ stuff like submenu in an entry is not checked
+*/
+void MM_Ck()
+{
+#ifdef DEBUG
+ DL_E *e = mm.mn.hd.n;
+ Menu *m;
+
+ printf("checking menu... ");
+
+ // no menu at all? //
+ if (mm.mn.cntr == 0) {
+ printf("NOT ONE MENU FOUND!\n");
+ exit(1);
+ }
+ if (mm.c_mn == 0) {
+ printf("NO CURRENT MENU SELECTED!\n");
+ exit(1);
+ }
+
+ while (e != &mm.mn.tl) {
+ m = (Menu*)e->d;
+ if (m->ent.cntr == 0) {
+ printf("YOU'VE ADDED AN EMPTY MENU!\n");
+ exit(1);
+ }
+ if (m->c_e == 0) {
+ printf("NO CURRENT ENTRY SELECTED!\n");
+ exit(1);
+ }
+ e = e->n;
+ }
+ printf("OK\n");
+#endif
+}
+
+/*
+ process incoming events
+*/
+int MM_Evt(SDL_Event *e)
+{
+ DL_E *m, *le;
+ MEnt *me;
+ int ex = 0;
+
+ // waiting for a key ? //
+ if (mm.c_mn->c_e->t == ME_KEY && *mm.c_mn->c_e->p == 0) {
+ if (e->type == SDL_KEYUP && mm.vkys[e->key.keysym.sym]) {
+ // check other key entries for their value //
+ m = mm.mn.hd.n;
+ while (!ex && m != &mm.mn.tl) {
+ le = ((Menu*)m->d)->ent.hd.n;
+ while (!ex && le != &((Menu*)m->d)->ent.tl) {
+ me = (MEnt*)le->d;
+ if (me->t == ME_KEY && *me->p == e->key.keysym.sym)
+ ex = 1;
+ le = le->n;
+ }
+ m = m->n;
+ }
+ // set key
+ if (!ex) {
+ *mm.c_mn->c_e->p = e->key.keysym.sym;
+ if (mm.c_mn->c_e->cb != 0)
+ mm.c_mn->c_e->cb();
+ }
+ }
+ return MM_NONE;
+ }
+ // normal event
+ switch (e->type) {
+ case SDL_MOUSEMOTION:
+ return MM_SelE(e->motion.x, e->motion.y);
+ case SDL_MOUSEBUTTONUP:
+ if (e->button.button == 1)
+ return MM_UseE(MM_INC);
+ else
+ return MM_UseE(MM_DEC);
+ case SDL_KEYDOWN:
+ switch (e->key.keysym.sym) {
+ case SDLK_RETURN:
+ return MM_UseE(MM_NONE);
+ case SDLK_UP:
+ return MM_PrvE();
+ case SDLK_DOWN:
+ return MM_NxtE();
+ case SDLK_LEFT:
+ return MM_UseE(MM_DEC);
+ case SDLK_RIGHT:
+ return MM_UseE(MM_INC);
+ default:
+ if (mm.c_mn->c_e->t == ME_STR)
+ ME_Edt(mm.c_mn->c_e, e->key.keysym.sym, e->key.keysym.unicode);
+ return MM_NONE;
+ }
+ return MM_NONE;
+ }
+ return MM_NONE;
+}
+
+/*
+ use an entry
+ submenu: set submenu
+ action: return action
+ range: change pos due to c (inc or dec)
+ str: add or delete char
+*/
+int MM_UseE(int c)
+{
+ MEnt *me = mm.c_mn->c_e;
+ switch (me->t) {
+ case ME_SUB:
+#ifdef SOUND
+ sound_play(mm.s_clk);
+#endif
+ if (mm.c_mn->c_e->cb != 0)
+ mm.c_mn->c_e->cb();
+ mm.c_mn = (Menu*)me->smn;
+ break;
+ case ME_ACT:
+#ifdef SOUND
+ sound_play(mm.s_clk);
+#endif
+ if (mm.c_mn->c_e->cb != 0)
+ mm.c_mn->c_e->cb();
+ return me->act;
+ case ME_SWT:
+ case ME_RNG:
+#ifdef SOUND
+ sound_play(mm.s_clk);
+#endif
+ if (c == MM_DEC) {
+ *me->p -= me->stp;
+ if (*me->p < me->min)
+ *me->p = me->max - ((me->max - me->min) % me->stp);
+ }
+ else
+ if (c == MM_INC) {
+ *me->p += me->stp;
+ if (*me->p > me->max)
+ *me->p = me->min;
+ }
+ if (mm.c_mn->c_e->cb != 0)
+ mm.c_mn->c_e->cb();
+ break;
+ case ME_KEY:
+ *me->p = 0;
+ if (mm.c_mn->c_e->cb != 0)
+ mm.c_mn->c_e->cb();
+ break;
+ }
+ return MM_NONE;
+}
+
+/*
+ select prev entry
+*/
+int MM_PrvE()
+{
+ DL_E *e = DL_GetE(&mm.c_mn->ent, mm.c_mn->c_e)->p;
+
+ while (e != &mm.c_mn->ent.hd && ((MEnt*)e->d)->t == ME_SEP) e = e->p;
+ if (e != &mm.c_mn->ent.hd) {
+ mm.c_mn->c_e = (MEnt*)e->d;
+ mm.c_mn->c_e->a = 0;
+ }
+
+#ifdef SOUND
+ sound_play(mm.s_clk);
+#endif
+ return MM_NONE;
+}
+
+/*
+ select next entry
+*/
+int MM_NxtE()
+{
+ DL_E *e = DL_GetE(&mm.c_mn->ent, mm.c_mn->c_e)->n;
+
+ while (e != &mm.c_mn->ent.tl && ((MEnt*)e->d)->t == ME_SEP) e = e->n;
+ if (e != &mm.c_mn->ent.tl) {
+ mm.c_mn->c_e = (MEnt*)e->d;
+ mm.c_mn->c_e->a = 0;
+ }
+
+#ifdef SOUND
+ sound_play(mm.s_clk);
+#endif
+ return MM_NONE;
+}
+
+/*
+ select an entry at pos x,y if valid
+*/
+int MM_SelE(int x, int y)
+{
+ DL_E *e = mm.c_mn->ent.hd.n;
+ MEnt *me, *old = mm.c_mn->c_e;
+
+ while (e != &mm.c_mn->ent.tl) {
+ me = (MEnt*)e->d;
+ if (me->t != ME_SEP && x >= me->dx && x < me->dx + me->dw && y >= me->dy && y < me->dy + me->dh) {
+ mm.c_mn->c_e = me;
+ mm.c_mn->c_e->a = 0;
+#ifdef SOUND
+ if (mm.c_mn->c_e != old)
+ sound_play(mm.s_clk);
+#endif
+ return MM_NONE;
+ }
+ e = e->n;
+ }
+ return MM_NONE;
+}
+
+void MM_CB()
+{
+ DL_E *e = mm.c_mn->ent.hd.n;
+ MEnt *me;
+
+ while (e != &mm.c_mn->ent.tl) {
+ me = (MEnt*)e->d;
+ if (me->cb != 0)
+ me->cb();
+ e = e->n;
+ }
+}
diff --git a/project/jni/application/lmarbles-1.0.8/src/menu.h b/project/jni/application/lmarbles-1.0.8/src/menu.h
new file mode 100644
index 000000000..f2a942736
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/menu.h
@@ -0,0 +1,120 @@
+/***************************************************************************
+ menu.h - description
+ -------------------
+ begin : Sat Aug 5 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef MENU_H
+#define MENU_H
+
+#include "sdl.h"
+#include "dynlist.h"
+#include "audio.h"
+
+// menu entry //
+// entry types //
+#define ME_SEP 0
+#define ME_SUB 1
+#define ME_SWT 2
+#define ME_RNG 3
+#define ME_ACT 4
+#define ME_KEY 5
+#define ME_STR 6
+typedef struct {
+ char nm[32];
+ char str[64];
+ DLst sw;
+ int t;
+ int *p;
+ int min;
+ int max;
+ int stp;
+ int act;
+ void *smn;
+ int x, y;
+ int dx;
+ int dy;
+ int dw;
+ int dh;
+ float a;
+ void (*cb)(void);
+} MEnt;
+void ME_Fr(void *e);
+void ME_Ini(MEnt *e, int t, char *n);
+MEnt* ME_CrtSep(char *s);
+MEnt* ME_CrtSw2(char *n, int *p, char *cap1, char *cap2);
+MEnt* ME_CrtSwX(char *n, int *p, char **caps, int num);
+MEnt* ME_CrtRng(char *n, int *p, int min, int max, int stp);
+MEnt* ME_CrtAct(char *n, int a_id);
+MEnt* ME_CrtStr(char *n, char *p, int m);
+MEnt* ME_CrtSub(char *n, void *m);
+MEnt* ME_CrtKey(char *n, int *p);
+void ME_SUpd(MEnt *e);
+void ME_Edt(MEnt *e, int c, int u);
+void ME_CngSwX(MEnt *e, int *p, char **caps, int num);
+
+// menu //
+typedef struct {
+ DLst ent;
+ MEnt *c_e;
+} Menu;
+Menu* M_Crt();
+void M_Fr(void *m);
+void M_Add(Menu *m, MEnt *e);
+void M_Hd(Menu *m);
+void M_Shw(Menu *m);
+void M_SUpd(Menu *m);
+void M_CmA(Menu *m, int ms);
+
+// menu manager //
+// resize or keep resolution ? //
+#define MM_KP 0
+#define MM_RSZ 1
+// return values for MM_Evt(..) //
+#define MM_TRMGM -1
+#define MM_NONE 0
+// increase or decrease a value when use entry ? //
+#define MM_INC 0
+#define MM_DEC 1
+typedef struct {
+ SDL_Surface *ss_bkgd;
+ SDL_Surface *ss_logo;
+ SFnt *ft_nml;
+ SFnt *ft_sel;
+ int x, y; // centre of menu in ss_bkgnd //
+ int lx, ly; // position of logo //
+ float a_c; // alpha change per ms used for enlightning //
+ int d; // delay per loop //
+ DLst mn;
+ Menu *c_mn;
+ char vkys[SDLK_LAST];
+#ifdef SOUND
+ Sound_Chunk *s_clk;
+#endif
+} MMng;
+void MM_Ini(int x, int y, int ly, SDL_Surface *ss_bk, SDL_Surface *ss_lg, SFnt *fn, SFnt *fs);
+void MM_Shw(int rsz);
+void MM_Trm();
+void MM_Add(Menu *m);
+void MM_AdjP();
+void MM_DfVKys();
+void MM_Ck();
+int MM_Evt(SDL_Event *e);
+int MM_UseE(int c);
+int MM_PrvE();
+int MM_NxtE();
+int MM_SelE(int x, int y);
+void MM_CB();
+
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/src/profile.c b/project/jni/application/lmarbles-1.0.8/src/profile.c
new file mode 100644
index 000000000..218c8567a
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/profile.c
@@ -0,0 +1,422 @@
+/***************************************************************************
+ profile.c - description
+ -------------------
+ begin : Sun Sep 17 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "profile.h"
+#include
+#include
+#include
+#include "cfg.h"
+#include "file.h"
+
+// profiles //
+DLst prfs;
+// string list for the menu //
+char **prf_lst = 0;
+int prf_n = 0;
+// profile source path //
+char prf_pth[256];
+// configuration //
+extern Cfg cfg;
+
+/* initialize dyn list and source path */
+void Prf_Ini()
+{
+ DL_Ini(&prfs);
+ prfs.flgs = DL_AUTODEL;
+ prfs.cb = Prf_Del;
+
+ sprintf(prf_pth, "%s/lmarbles.prfs", PRF_DIR);
+}
+
+/* terminate profiles; must be saved first */
+void Prf_Trm()
+{
+ Prf_DelLst();
+ DL_Clr(&prfs);
+}
+
+/* load profiles */
+int Prf_Ld()
+{
+ Prf *p;
+ SInf *st;
+ int s_num = 0, p_num = 0;
+ FILE *f = 0;
+ int not_f = 0;
+ char str[256];
+#ifdef ASCII
+ int i;
+#endif
+
+ printf("loading profiles... ");
+
+ // read access ? //
+ if ((f = fopen(prf_pth, "r")) == 0) {
+ printf("\nWARNING: file %s does not exist; cannot read profiles\n", prf_pth);
+ Prf_Crt("Michael");
+ not_f = 1;
+ }
+ else {
+ /* load ascii identification */
+#ifdef ASCII
+ F_GetE(f, str, F_VAL); str[strlen(str) - 1] = 0;
+ if (strncmp(str,"ascii",5)) {
+ printf("\nWARNING: trying to load raw binary data in ascii; cannot read profiles\n", prf_pth);
+ Prf_Crt("Michael");
+ not_f = 1;
+ }
+ else {
+#else
+ fread(str, 5, 1, f);
+ if (!strncmp(str,"ascii",5)) {
+ printf("\nWARNING: trying to load in ascii instead of raw binary format; cannot read profiles\n");
+ Prf_Crt("Michael");
+ not_f = 1;
+ }
+ else {
+ fseek(f, SEEK_SET, 0);
+#endif
+ /* load numbers of profiles */
+#ifdef ASCII
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &p_num);
+#else
+ fread((void*)&p_num, sizeof(int), 1, f);
+#endif
+ if (p_num <= 0) {
+ printf("WARNING: bad profile counter: %i\n", p_num);
+ Prf_Crt("Michael");
+ not_f = 1;
+ }
+ else {
+ while (p_num--) {
+ p = malloc(sizeof(Prf));
+#ifdef ASCII
+ /* name */
+ F_GetE(f, p->nm, F_VAL); p->nm[strlen(p->nm) - 1] = 0;
+ /* levels played */
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &p->lvls);
+ /* score */
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &p->scr);
+ /* percentage */
+ F_GetE(f, str, F_VAL); F_ValToFloat(str, &p->pct);
+ /* number of levelsets */
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &s_num);
+#else
+ /* name */
+ fread(p->nm, sizeof(p->nm), 1, f);
+ /* levels played */
+ fread(&p->lvls, sizeof(p->lvls), 1, f);
+ /* score */
+ fread(&p->scr, sizeof(p->scr), 1, f);
+ /* percentage */
+ fread(&p->pct, sizeof(p->pct), 1, f);
+ /* number of levelsets */
+ fread(&s_num, sizeof(int), 1, f);
+#endif
+ DL_Ini(&p->sts);
+ p->sts.flgs = DL_AUTODEL | DL_NOCB;
+ if (s_num >= 0)
+ while (s_num--) {
+ /* level sets */
+ st = malloc(sizeof(SInf));
+#ifdef ASCII
+ F_GetE(f, st->nm, F_VAL); st->nm[strlen(st->nm) - 1] = 0;
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &st->num);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &st->l_num);
+ F_GetE(f, str, F_VAL); F_ValToInt(str, &st->c_num);
+ for ( i = 0; i < st->c_num; i++) {
+ F_GetE(f, str, F_VAL); F_ValToChar(str, &st->c_opn[i]);
+ }
+ for ( i = 0; i < st->num; i++) {
+ F_GetE(f, str, F_VAL); F_ValToChar(str, &st->cmp[i]);
+ }
+#else
+ fread(st->nm, sizeof(st->nm), 1, f);
+ fread(&st->num, sizeof(int), 1, f);
+ fread(&st->l_num, sizeof(int), 1, f);
+ fread(&st->c_num, sizeof(int), 1, f);
+ fread(st->c_opn, sizeof(char), st->c_num, f);
+ fread(st->cmp, sizeof(char), st->num, f);
+#endif
+ DL_Add(&p->sts, st);
+ }
+ DL_Add(&prfs, p);
+ }
+ }
+ printf("ok\n");
+#ifdef ASCII
+ }
+#else
+ }
+#endif
+ fclose(f);
+ }
+
+ Prf_CrtLst();
+ return !not_f;
+}
+
+/* save profiles */
+void Prf_Sv()
+{
+ DL_E *e = prfs.hd.n, *le = 0;
+ Prf *p;
+ SInf *st;
+ FILE *f;
+#ifdef ASCII
+ int i;
+ char str[256];
+#endif
+
+ printf("saving profiles... ");
+ if ((f = fopen(prf_pth, "w")) == 0) {
+ printf("WARNING: no write access to %s\n", prf_pth);
+ }
+ else {
+ /* save ascii identification */
+#ifdef ASCII
+ F_WrtE(f, "ascii");
+#endif
+ /* save numbers of profiles */
+#ifdef ASCII
+ F_IntToStr(str, prfs.cntr); F_WrtE(f, str);
+#else
+ fwrite((void*)&prfs.cntr, sizeof(int), 1, f);
+#endif
+ while (e != &prfs.tl) {
+ p = (Prf*)e->d;
+#ifdef ASCII
+ /* save name -- 12 chars */
+ F_WrtE(f, p->nm);
+ /* levels played */
+ F_IntToStr(str, p->lvls); F_WrtE(f, str);
+ /* score */
+ F_IntToStr(str, p->scr); F_WrtE(f, str);
+ /* percentage */
+ F_FloatToStr(str, p->pct); F_WrtE(f, str);
+ /* save number of levelsets */
+ F_IntToStr(str, p->sts.cntr); F_WrtE(f, str);
+#else
+ /* save name -- 12 chars */
+ fwrite(p->nm, sizeof(p->nm), 1, f);
+ /* levels played */
+ fwrite(&p->lvls, sizeof(p->lvls), 1, f);
+ /* score */
+ fwrite(&p->scr, sizeof(p->scr), 1, f);
+ /* percentage */
+ fwrite(&p->pct, sizeof(p->pct), 1, f);
+ /* save number of levelsets */
+ fwrite(&p->sts.cntr, sizeof(int), 1, f);
+#endif
+ /* save all levelsets */
+ le = p->sts.hd.n;
+ while (le != &p->sts.tl) {
+ st = (SInf*)le->d;
+#ifdef ASCII
+ /* save name -- 32 chars */
+ F_WrtE(f, st->nm);
+ /* save number of flags */
+ F_IntToStr(str, st->num); F_WrtE(f, str);
+ /* save level peer chapter number */
+ F_IntToStr(str, st->l_num); F_WrtE(f, str);
+ /* save chapter number */
+ F_IntToStr(str, st->c_num); F_WrtE(f, str);
+ /* save chapter open flags */
+ for ( i = 0; i < st->c_num; i++ ) {
+ F_IntToStr(str, st->c_opn[i]); F_WrtE(f, str);
+ }
+ /* save flags */
+ for ( i = 0; i < st->num; i++ ) {
+ F_IntToStr(str, st->cmp[i]); F_WrtE(f, str);
+ }
+#else
+ /* save name -- 32 chars */
+ fwrite(st->nm, sizeof(st->nm), 1, f);
+ /* save number of flags */
+ fwrite(&st->num, sizeof(int), 1, f);
+ /* save level peer chapter number */
+ fwrite(&st->l_num, sizeof(int), 1, f);
+ /* save chapter number */
+ fwrite(&st->c_num, sizeof(int), 1, f);
+ /* save chapter open flags */
+ fwrite(st->c_opn, sizeof(char), st->c_num, f);
+ /* save flags */
+ fwrite(st->cmp, sizeof(char), st->num, f);
+#endif
+ le = le->n;
+ }
+ e = e->n;
+ }
+ printf("ok\n");
+ fclose(f);
+ }
+}
+
+/* create a new profile */
+void Prf_Crt(char *nm)
+{
+ Prf *p;
+ DL_E *e = prfs.hd.n;
+ // if the name already exists the profile is not created //
+ while (e != &prfs.tl) {
+ if (!strcmp(((Prf*)e->d)->nm, nm)) {
+ printf("WARNING: profile '%s' already exists\n", nm);
+ return;
+ }
+ e = e->n;
+ }
+
+ p = malloc(sizeof(Prf));
+ strcpy(p->nm, nm);
+ p->scr = 0;
+ p->pct = 0;
+ p->lvls = 0;
+ DL_Ini(&p->sts);
+ p->sts.flgs = DL_AUTODEL | DL_NOCB;
+ DL_Add(&prfs, p);
+}
+
+/* delete an existing profile by pointer */
+void Prf_Del(void *p)
+{
+ DL_Clr(&((Prf*)p)->sts);
+ free(p);
+}
+
+/* register or find a levelset with name nm */
+SInf* Prf_RegLS(Prf *p, LSet *l_st)
+{
+ int i;
+ DL_E *e = p->sts.hd.n;
+ SInf *s;
+ /* maybe it already exists */
+ while (e != &p->sts.tl) {
+ s = (SInf*)e->d;
+ if (!strcmp(s->nm, l_st->nm)) {
+ if (l_st->c_num != s->c_num || l_st->l_num != s->l_num) {
+ // seems to be changed; clear it //
+ s->num = l_st->c_num * l_st->l_num;
+ s->l_num = l_st->l_num;
+ s->c_num = l_st->c_num;
+ for (i = 0; i < s->c_num; i++)
+ s->c_opn[i] = l_st->ch[i].opn;
+ memset(s->cmp, 0, sizeof(s->cmp));
+ printf("WARNING: profile '%s': set info '%s' seems to be out of date\n", p->nm, l_st->nm);
+ }
+ return s;
+ }
+ e = e->n;
+ }
+ /* must be registered */
+ s = malloc(sizeof(SInf));
+ strcpy(s->nm, l_st->nm);
+ s->num = l_st->c_num * l_st->l_num;
+ s->l_num = l_st->l_num;
+ s->c_num = l_st->c_num;
+ for (i = 0; i < s->c_num; i++)
+ s->c_opn[i] = l_st->ch[i].opn;
+ memset(s->cmp, 0, sizeof(s->cmp));
+ DL_Add(&p->sts, s);
+ return s;
+}
+
+/* create profile name list */
+void Prf_CrtLst()
+{
+ int i = 0;
+ DL_E *e = prfs.hd.n;
+ Prf *p;
+ Prf_DelLst();
+ prf_lst = malloc(sizeof(char*) * prfs.cntr);
+ while (e != &prfs.tl) {
+ p = (Prf*)e->d;
+ prf_lst[i] = malloc(sizeof(p->nm) + 1);
+ strcpy(prf_lst[i], p->nm);
+ i++;
+ e = e->n;
+ }
+ prf_n = i;
+}
+
+/* delete profile name list */
+void Prf_DelLst()
+{
+ int i;
+ if (prf_lst == 0) return;
+ for (i = 0; i < prf_n; i++)
+ free(prf_lst[i]);
+ free(prf_lst);
+}
+
+/*
+ sort all profiles best profile comes first
+*/
+void Prf_Srt()
+{
+ void *p;
+ DL_E *e = prfs.hd.n, *e2;
+
+ if (prfs.cntr == 0) return;
+
+ while (e != prfs.tl.p) {
+ e2 = e->n;
+ while (e2 != &prfs.tl) {
+ if (((Prf*)e2->d)->scr > ((Prf*)e->d)->scr) {
+ p = e2->d;
+ e2->d = e->d;
+ e->d = p;
+ }
+ e2 = e2->n;
+ }
+ e = e->n;
+ }
+}
+
+/*
+ update Profile p's score and info
+ s is rem_time / max_time of that level
+*/
+void Prf_Upd(Prf *p, SInf *inf, int l_id, float pct, int scr)
+{
+ float new_p;
+#ifdef DEBUG
+ float old_p = p->pct;
+ printf("level %i...", l_id);
+#endif
+ if (!inf->cmp[l_id]) {
+ /* mark as completed */
+ inf->cmp[l_id] = 1;
+ /* update percentage */
+ if (p->lvls == 0)
+ p->pct = pct;
+ else {
+ new_p = (p->pct * p->lvls + pct) / (p->lvls + 1);
+ p->pct = new_p;
+ }
+ p->lvls++;
+ p->scr += scr;
+#ifdef DEBUG
+ printf("marked as completed\n");
+ printf("added %4.2f: percentage changed from %4.2f to %4.2f\n", pct, old_p, p->pct);
+ printf("score added: %i\n", scr);
+#endif
+ }
+#ifdef DEBUG
+ else
+ printf("already finished\n");
+#endif
+}
diff --git a/project/jni/application/lmarbles-1.0.8/src/profile.h b/project/jni/application/lmarbles-1.0.8/src/profile.h
new file mode 100644
index 000000000..f2ec949d8
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/profile.h
@@ -0,0 +1,53 @@
+/***************************************************************************
+ profile.h - description
+ -------------------
+ begin : Sun Sep 17 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef PROFILE_H
+#define PROFILE_H
+
+#include "levels.h"
+#include "dynlist.h"
+
+typedef struct {
+ char nm[32];
+ int num;
+ int l_num; // levels per chapter //
+ int c_num;
+ char c_opn[MAX_CHPTRS];
+ char cmp[MAX_LVLS * MAX_CHPTRS];
+} SInf;
+
+typedef struct {
+ char nm[12];
+ int lvls;
+ int scr; // total score gained
+ float pct; // percentage of time needed to complete a level
+ DLst sts;
+} Prf;
+
+void Prf_Ini();
+void Prf_Trm();
+int Prf_Ld();
+void Prf_Sv();
+void Prf_Crt(char *nm);
+void Prf_Del(void *p);
+SInf* Prf_RegLS(Prf *p, LSet *l_st);
+void Prf_CrtLst();
+void Prf_DelLst();
+void Prf_Srt();
+void Prf_Upd(Prf *p, SInf *inf, int l_id, float pct, int scr);
+
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/src/sdl.c b/project/jni/application/lmarbles-1.0.8/src/sdl.c
new file mode 100644
index 000000000..ff8a0de6e
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/sdl.c
@@ -0,0 +1,628 @@
+/***************************************************************************
+ sdl.c - description
+ -------------------
+ begin : Thu Apr 20 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "sdl.h"
+#include
+#include
+
+extern int trm_gm;
+
+Sdl sdl;
+
+// sdl surface //
+
+/*
+ load a surface from file putting it in soft or hardware mem
+*/
+SDL_Surface* SS_Ld(char *fname, int f)
+{
+ SDL_Surface *buf;
+ SDL_Surface *new_sur;
+ char path[strlen(SRC_DIR)+ strlen(fname) + 2];
+ sprintf(path, "%s/%s", SRC_DIR, fname);
+ buf = SDL_LoadBMP(path);
+ if (buf == 0) {
+ fprintf(stderr, "ERR: ssur_load: file '%s' not found or not enough memory\n", path);
+ if (f & SDL_NONFATAL)
+ return 0;
+ else
+ exit(1);
+ }
+ new_sur = SS_Crt(buf->w, buf->h, f);
+ SDL_BlitSurface(buf, 0, new_sur, 0);
+ SDL_FreeSurface(buf);
+ return new_sur;
+}
+
+/*
+ create an surface
+ MUST NOT BE USED IF NO SDLSCREEN IS SET
+*/
+SDL_Surface* SS_Crt(int w, int h, int f)
+{
+ SDL_Surface *sur;
+ SDL_PixelFormat *spf = SDL_GetVideoSurface()->format;
+ if ((sur = SDL_CreateRGBSurface(f, w, h, spf->BitsPerPixel, spf->Rmask, spf->Gmask, spf->Bmask, spf->Amask)) == 0) {
+ fprintf(stderr, "ERR: ssur_create: not enough memory to create surface...\n");
+ exit(1);
+ }
+ SDL_SetColorKey(sur, SDL_SRCCOLORKEY, SDL_MapRGB(sur->format,0,0,0));
+ SDL_SetAlpha(sur, 0, 0); // no alpha //
+ return sur;
+}
+
+/*
+ return display format
+*/
+int SS_DpyFmt(SDL_Surface *sur)
+{
+ if ((sur = SDL_DisplayFormat(sur)) == 0) {
+ fprintf(stderr, "ERR: ssur_displayformat: convertion failed\n");
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ lock surface
+*/
+void SS_Bgn(SDL_Surface *sur)
+{
+ if (SDL_MUSTLOCK(sur))
+ SDL_LockSurface(sur);
+}
+
+/*
+ unlock surface
+*/
+void SS_End(SDL_Surface *sur)
+{
+ if (SDL_MUSTLOCK(sur))
+ SDL_UnlockSurface(sur);
+}
+
+/*
+ blit surface with destination D_DST and source D_SRC using it's actual alpha and color key settings
+*/
+void SS_Blt(void)
+{
+#ifdef SDL_1_1_5
+ if (sdl.s.s->flags & SDL_SRCALPHA)
+ SDL_SetAlpha(sdl.s.s, SDL_SRCALPHA, 255 - sdl.s.s->format->alpha);
+#endif
+ SDL_BlitSurface(sdl.s.s, &sdl.s.r, sdl.d.s, &sdl.d.r);
+#ifdef SDL_1_1_5
+ if (sdl.s.s->flags & SDL_SRCALPHA)
+ SDL_SetAlpha(sdl.s.s, SDL_SRCALPHA, 255 - sdl.s.s->format->alpha);
+#endif
+}
+
+/*
+ do an alpha blit
+*/
+void SS_ABlt(int alpha)
+{
+ #ifdef SDL_1_1_5
+ SDL_SetAlpha(sdl.s.s, SDL_SRCALPHA, 255 - alpha);
+#else
+ SDL_SetAlpha(sdl.s.s, SDL_SRCALPHA, alpha);
+#endif
+ SDL_BlitSurface(sdl.s.s, &sdl.s.r, sdl.d.s, &sdl.d.r);
+ SDL_SetAlpha(sdl.s.s, 0, 0);
+}
+
+/*
+ fill surface with color c
+*/
+void SS_Fill(int c)
+{
+ SDL_FillRect(sdl.d.s, &sdl.d.r, SDL_MapRGB(sdl.d.s->format, c >> 16, (c >> 8) & 0xFF, c & 0xFF));
+}
+
+/* get pixel */
+Uint32 get_pixel( SDL_Surface *surf, int x, int y )
+{
+ int pos = 0;
+ Uint32 pixel = 0;
+
+ pos = y * surf->pitch + x * surf->format->BytesPerPixel;
+ memcpy( &pixel, surf->pixels + pos, surf->format->BytesPerPixel );
+ return pixel;
+}
+
+// sdl font //
+
+/*
+ load a font using the width values in the file
+*/
+SFnt* SF_Ld(char *fname)
+{
+ SFnt *fnt = 0;
+ FILE *file = 0;
+ char path[strlen(SRC_DIR)+ strlen(fname) + 2];
+ int i;
+
+ sprintf(path, "%s/%s", SRC_DIR, fname);
+
+ fnt = malloc(sizeof(SFnt));
+ if (fnt == 0) {
+ fprintf(stderr, "ERR: sfnt_load: not enough memory\n");
+ exit(1);
+ }
+
+ if ((fnt->ss = SS_Ld(fname, SDL_SWSURFACE)) == 0)
+ exit(1);
+
+ fnt->algn = TA_X_L | TA_Y_T;
+ fnt->clr = 0x00FFFFFF;
+ fnt->h = fnt->ss->h;
+
+ //table
+ file = fopen(path, "r");
+ fseek(file, -1, SEEK_END);
+ fread(&fnt->off, 1, 1, file);
+#ifdef DEBUG
+ printf("offset: %i\n", fnt->off);
+#endif
+ fseek(file, -2, SEEK_END);
+ fread(&fnt->len, 1, 1, file);
+#ifdef DEBUG
+ printf("number: %i\n", fnt->len);
+#endif
+ fseek(file, -2 - fnt->len, SEEK_END);
+ fread(fnt->lw, 1, fnt->len, file);
+#ifdef DEBUG
+ printf("letter width: %i\n", fnt->len);
+ for (i = 0; i < fnt->len; i++)
+ printf("%i ", fnt->lw[i]);
+ printf("\n");
+#endif
+ fclose(file);
+
+ //letter offsets
+ fnt->loff[0] = 0;
+ for (i = 1; i < fnt->len; i++)
+ fnt->loff[i] = fnt->loff[i - 1] + fnt->lw[i - 1];
+
+ //allowed keys
+ memset(fnt->keys, 0, 256);
+ for (i = 0; i < fnt->len; i++) {
+ fnt->keys[i + fnt->off] = 1;
+ }
+
+ fnt->lX = fnt->lY = fnt->lW = fnt->lH = 0;
+ return fnt;
+}
+
+/*
+ load a font with fixed size
+*/
+SFnt* SF_LdFxd(char *f, int off, int len, int w)
+{
+ int i;
+ SFnt *fnt;
+ char path[strlen(SRC_DIR)+ strlen(f) + 2];
+
+ sprintf(path, "%s/%s", SRC_DIR, f);
+
+ fnt = malloc(sizeof(SFnt));
+ if (fnt == 0) {
+ fprintf(stderr, "ERR: sfnt_load: not enough memory\n");
+ exit(1);
+ }
+
+ if ((fnt->ss = SS_Ld(f, SDL_SWSURFACE)) == 0)
+ exit(1);
+
+ fnt->algn = TA_X_L | TA_Y_T;
+ fnt->clr = 0x00FFFFFF;
+ fnt->h = fnt->ss->h;
+
+ fnt->off = off;
+ fnt->len = len;
+
+ for (i = 0; i < len; i++)
+ fnt->lw[i] = w;
+
+ //letter offsets
+ fnt->loff[0] = 0;
+ for (i = 1; i < fnt->len; i++)
+ fnt->loff[i] = fnt->loff[i - 1] + w;
+
+ //allowed keys
+ memset(fnt->keys, 0, 256);
+ for (i = 0; i < fnt->len; i++) {
+ fnt->keys[i + fnt->off] = 1;
+ }
+
+ fnt->lX = fnt->lY = fnt->lW = fnt->lH = 0;
+ return fnt;
+}
+
+/*
+ free memory
+*/
+void SF_Fr(SFnt *fnt)
+{
+ if (fnt->ss) SDL_FreeSurface(fnt->ss);
+ free(fnt);
+}
+
+/*
+ write something with transparency
+*/
+int SF_Wrt(SFnt *fnt, SDL_Surface *dest, int x, int y, char *str, int alpha)
+{
+ int c_abs;
+ int len = strlen(str);
+ int pix_len = 0;
+ int px = x, py = y;
+ int i;
+ SDL_Surface *spf = SDL_GetVideoSurface();
+
+ pix_len = SF_TxtW(fnt, str);
+ for (i = 0; i < len; i++)
+ if (!fnt->keys[(int)str[i]])
+ str[i] = ' ';
+
+ //alignment
+ if (fnt->algn & TA_X_C)
+ px -= pix_len >> 1;
+ else
+ if (fnt->algn & TA_X_R)
+ px -= pix_len;
+ if (fnt->algn & TA_Y_C)
+ py -= fnt->h >> 1;
+ else
+ if (fnt->algn & TA_Y_B)
+ py -= fnt->h;
+
+ fnt->lX = px; if (fnt->lX < 0) fnt->lX = 0;
+ fnt->lY = py; if (fnt->lY < 0) fnt->lY = 0;
+ fnt->lW = pix_len; if (fnt->lX + fnt->lW >= spf->w) fnt->lW = spf->w - fnt->lX;
+ fnt->lH = fnt->h; if (fnt->lY + fnt->lH >= spf->h) fnt->lH = spf->h - fnt->lY;
+
+ if (alpha != 0)
+ SDL_SetAlpha(fnt->ss, SDL_SRCALPHA, alpha);
+ else
+ SDL_SetAlpha(fnt->ss, 0, 0);
+ for (i = 0; i < len; i++) {
+ c_abs = str[i] - fnt->off;
+ D_DST(dest, px, py, fnt->lw[c_abs], fnt->h);
+ D_SRC(fnt->ss, fnt->loff[c_abs], 0);
+ SS_Blt();
+ px += fnt->lw[c_abs];
+ }
+
+ return 0;
+}
+
+/*
+ lock font surface
+*/
+void SF_Bgn(SFnt *fnt)
+{
+ SS_Bgn(fnt->ss);
+}
+
+/*
+ unlock font surface
+*/
+void SF_End(SFnt *fnt)
+{
+ SS_End(fnt->ss);
+}
+
+/*
+ return last update region
+*/
+SDL_Rect SF_LstR(SFnt *fnt)
+{
+ SDL_Rect rect={fnt->lX, fnt->lY, fnt->lW, fnt->lH};
+ return rect;
+}
+
+/*
+ return the text width in pixels
+*/
+int SF_TxtW(SFnt *fnt, char *str)
+{
+ unsigned int i;
+ int pix_len = 0;
+ for (i = 0; i < strlen(str); i++)
+ pix_len += fnt->lw[str[i] - fnt->off];
+ return pix_len;
+}
+
+// sdl //
+
+/*
+ initialize sdl
+*/
+void Sdl_Ini(int f)
+{
+ sdl.scr = 0;
+ if (SDL_Init(f) < 0) {
+ fprintf(stderr, "ERR: sdl_init: %s", SDL_GetError());
+ exit(1);
+ }
+ SDL_EnableUNICODE(1);
+ atexit(SDL_Quit);
+}
+
+/*
+ free screen
+*/
+void Sdl_Qut()
+{
+ if (sdl.scr) SDL_FreeSurface(sdl.scr);
+}
+
+/*
+ set video mode and give information about hardware capabilities
+*/
+int Sdl_StVdMd(int w, int h, int d, int f)
+{
+ int depth;
+
+#ifdef DEBUG
+ SDL_PixelFormat *fmt;
+#endif
+ if (sdl.scr) {
+ SDL_FreeSurface(sdl.scr);
+ }
+ else { /* load window icon on first time setup */
+ SDL_Surface *icon;
+ if ((icon = SDL_LoadBMP(SRC_DIR "/gfx/win_icon.bmp")) != NULL) {
+ SDL_SetColorKey(icon, SDL_SRCCOLORKEY, SDL_MapRGB(icon->format,255,255,255));
+ SDL_WM_SetIcon(icon, NULL);
+ }
+ }
+
+ // is this mode is supported
+ depth = SDL_VideoModeOK(w, h, d, f);
+ if ( depth == 0 ) {
+ fprintf(stderr, "ERR: SDL_VideoModeOK says mode %ix%ix%i is invalid...\ntrying to emulate with 16 bits depth\n", w, h, d);
+ depth = 16;
+ }
+
+ // set video mode
+ if ((sdl.scr = SDL_SetVideoMode(w, h, depth, f)) == 0) {
+ fprintf(stderr, "ERR: sdl_setvideomode: %s", SDL_GetError());
+ return 1;
+ }
+
+#ifdef DEBUG
+ if (f & SDL_HWSURFACE && !(sdl.scr->flags & SDL_HWSURFACE))
+ fprintf(stderr, "unable to create screen in hardware memory...\n");
+ if (f & SDL_DOUBLEBUF && !(sdl.scr->flags & SDL_DOUBLEBUF))
+ fprintf(stderr, "unable to create double buffered screen...\n");
+ if (f & SDL_FULLSCREEN && !(sdl.scr->flags & SDL_FULLSCREEN))
+ fprintf(stderr, "unable to switch to fullscreen...\n");
+
+ fmt = sdl.scr->format;
+ printf("video mode format:\n");
+ printf("Masks: R=%i, G=%i, B=%i\n", fmt->Rmask, fmt->Gmask, fmt->Bmask);
+ printf("LShft: R=%i, G=%i, B=%i\n", fmt->Rshift, fmt->Gshift, fmt->Bshift);
+ printf("RShft: R=%i, G=%i, B=%i\n", fmt->Rloss, fmt->Gloss, fmt->Bloss);
+ printf("BBP: %i\n", fmt->BitsPerPixel);
+ printf("-----\n");
+#endif
+
+ return 0;
+}
+
+/*
+ show hardware capabilities
+*/
+void Sdl_HwCps()
+{
+ const SDL_VideoInfo *vi = SDL_GetVideoInfo();
+ char *ny[2] = {"No", "Yes"};
+
+ printf("video hardware capabilities:\n");
+ printf("Hardware Surfaces: %s\n", ny[vi->hw_available]);
+ printf("HW_Blit (CC, A): %s (%s, %s)\n", ny[vi->blit_hw], ny[vi->blit_hw_CC], ny[vi->blit_hw_A]);
+ printf("SW_Blit (CC, A): %s (%s, %s)\n", ny[vi->blit_sw], ny[vi->blit_sw_CC], ny[vi->blit_sw_A]);
+ printf("HW_Fill: %s\n", ny[vi->blit_fill]);
+ printf("Video Memory: %i\n", vi->video_mem);
+ printf("------\n");
+}
+
+/*
+ update just one rect
+*/
+void Sdl_Upd(int x, int y, int w, int h)
+{
+ SDL_UpdateRect(sdl.scr, x, y, w, h);
+}
+
+/*
+ do a full update
+*/
+void Sdl_FUpd()
+{
+ SDL_UpdateRect(sdl.scr, 0, 0, 0 ,0);
+}
+
+/*
+ draw all update regions
+*/
+void Sdl_UpdR()
+{
+ if (sdl.rnum == SDL_MAX_RGNS)
+ SDL_UpdateRect(sdl.scr, 0, 0, sdl.scr->w, sdl.scr->h);
+ else
+ SDL_UpdateRects(sdl.scr, sdl.rnum, sdl.rgns);
+ sdl.rnum = 0;
+}
+
+/*
+ add update region
+*/
+void Sdl_AddR(int x, int y, int w, int h)
+{
+ if (sdl.rnum == SDL_MAX_RGNS) return;
+ if (x < 0) {
+ w += x;
+ x = 0;
+ }
+ if (y < 0) {
+ h += y;
+ y = 0;
+ }
+ if (x + w > sdl.scr->w)
+ w = sdl.scr->w - x;
+ if (y + h > sdl.scr->h)
+ h = sdl.scr->h - y;
+ if (w <= 0 || h <= 0)
+ return;
+ sdl.rgns[sdl.rnum].x = x;
+ sdl.rgns[sdl.rnum].y = y;
+ sdl.rgns[sdl.rnum].w = w;
+ sdl.rgns[sdl.rnum].h = h;
+ sdl.rnum++;
+}
+
+/*
+ fade screen to black
+*/
+void Sdl_Dim(int steps, int delay, int trp)
+{
+#ifndef NODIM
+ SDL_Surface *buffer;
+ int per_step = trp / steps;
+ int i;
+ if (trm_gm) return;
+ buffer = SS_Crt(sdl.scr->w, sdl.scr->h, SDL_SWSURFACE);
+ SDL_SetColorKey(buffer, 0, 0);
+ D_FDST(buffer);
+ D_FSRC(sdl.scr);
+ SS_Blt();
+ for (i = 0; i <= trp; i += per_step) {
+ D_FDST(sdl.scr);
+ SS_Fill(0x0);
+ D_FSRC(buffer);
+ SS_ABlt(i);
+ Sdl_FUpd();
+ SDL_Delay(delay);
+ }
+ if (trp == 255) {
+ D_FDST(sdl.scr);
+ SS_Fill(0x0);
+ Sdl_FUpd();
+ }
+ SDL_FreeSurface(buffer);
+#else
+ Sdl_FUpd();
+#endif
+}
+
+/*
+ undim screen
+*/
+void Sdl_UnDim(int steps, int delay, int trp)
+{
+#ifndef NODIM
+ SDL_Surface *buffer;
+ int per_step = trp / steps;
+ int i;
+ if (trm_gm) return;
+ buffer = SS_Crt(sdl.scr->w, sdl.scr->h, SDL_SWSURFACE);
+ SDL_SetColorKey(buffer, 0, 0);
+ D_FDST(buffer);
+ D_FSRC(sdl.scr);
+ SS_Blt();
+ for (i = trp; i >= 0; i -= per_step) {
+ D_FDST(sdl.scr);
+ SS_Fill(0x0);
+ D_FSRC(buffer);
+ SS_ABlt(i);
+ Sdl_FUpd();
+ SDL_Delay(delay);
+ }
+ D_FDST(sdl.scr);
+ D_FSRC(buffer);
+ SS_Blt();
+ Sdl_FUpd();
+ SDL_FreeSurface(buffer);
+#else
+ Sdl_FUpd();
+#endif
+}
+
+/*
+ wait for a key
+*/
+int Sdl_WtFrKy()
+{
+ //wait for key
+ SDL_Event event;
+ while (1) {
+ SDL_WaitEvent(&event);
+ if (event.type == SDL_QUIT) {
+ trm_gm = 1;
+ return 0;
+ }
+ if (event.type == SDL_KEYUP)
+ return event.key.keysym.sym;
+ }
+}
+
+/*
+ wait for a key or mouse click
+*/
+void Sdl_WtFrClk()
+{
+ //wait for key or button
+ SDL_Event event;
+ while (1) {
+ SDL_WaitEvent(&event);
+ if (event.type == SDL_QUIT) {
+ trm_gm = 1;
+ return;
+ }
+ if (event.type == SDL_KEYUP || event.type == SDL_MOUSEBUTTONUP)
+ return;
+ }
+}
+
+/*
+ lock surface
+*/
+void Sdl_Bgn()
+{
+ if (SDL_MUSTLOCK(sdl.scr))
+ SDL_LockSurface(sdl.scr);
+}
+
+/*
+ unlock surface
+*/
+void Sdl_End()
+{
+ if (SDL_MUSTLOCK(sdl.scr))
+ SDL_UnlockSurface(sdl.scr);
+}
+
+/*
+ flip hardware screens (double buffer)
+*/
+void Sdl_Flp()
+{
+ SDL_Flip(sdl.scr);
+}
diff --git a/project/jni/application/lmarbles-1.0.8/src/sdl.h b/project/jni/application/lmarbles-1.0.8/src/sdl.h
new file mode 100644
index 000000000..35c4dca4d
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/sdl.h
@@ -0,0 +1,115 @@
+/***************************************************************************
+ sdl.h - description
+ -------------------
+ begin : Thu Apr 20 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef SDL_H
+#define SDL_H
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// draw region //
+#define D_SRC(p, i, j) {sdl.s.s = p; sdl.s.r.x = i; sdl.s.r.y = j; sdl.s.r.w = sdl.d.r.w; sdl.s.r.h = sdl.d.r.h;}
+#define D_DST(p, i, j, k, l) {sdl.d.s = p; sdl.d.r.x = i; sdl.d.r.y = j; sdl.d.r.w = k; sdl.d.r.h = l;}
+#define D_FSRC(p) {sdl.s.s = p; sdl.s.r.x = 0; sdl.s.r.y = 0; sdl.s.r.w = sdl.d.r.w; sdl.s.r.h = sdl.d.r.h;}
+#define D_FDST(p) {sdl.d.s = p; sdl.d.r.x = 0; sdl.d.r.y = 0; sdl.d.r.w = (p)->w; sdl.d.r.h = (p)->h;}
+typedef struct {
+ SDL_Surface *s;
+ SDL_Rect r;
+} DrawRgn;
+
+// Sdl Surface //
+#define SDL_NONFATAL 0x10000000
+SDL_Surface* SS_Ld(char *fname, int f);
+SDL_Surface* SS_Crt(int w, int h, int f);
+int SS_DpyFmt(SDL_Surface *sur);
+void SS_Bgn(SDL_Surface *sur);
+void SS_End(SDL_Surface *sur);
+void SS_Blt(void);
+void SS_ABlt(int alpha);
+void SS_Fill(int c);
+Uint32 get_pixel( SDL_Surface *surf, int x, int y );
+
+// Sdl Font //
+#define TA_X_L (1L<<1)
+#define TA_X_C (1L<<2)
+#define TA_X_R (1L<<3)
+#define TA_Y_T (1L<<4)
+#define TA_Y_C (1L<<5)
+#define TA_Y_B (1L<<6)
+typedef struct {
+ SDL_Surface *ss;
+ int algn;
+ int clr;
+ int h;
+ char lw[256];
+ int loff[256];
+ char keys[256];
+ char off;
+ char len;
+ //last written rect
+ int lX;
+ int lY;
+ int lW;
+ int lH;
+} SFnt;
+SFnt* SF_Ld(char *fname);
+SFnt* SF_LdFxd(char *fname, int off, int len, int w);
+void SF_Fr(SFnt *sfnt);
+int SF_Wrt(SFnt *sfnt, SDL_Surface *dest, int x, int y, char *str, int alpha);
+void SF_Bgn(SFnt *sfnt);
+void SF_End(SFnt *sfnt);
+SDL_Rect SF_LstR(SFnt *fnt);
+int SF_TxtW(SFnt *fnt, char *str);
+
+// Sdl //
+#define SDL_MAX_RGNS 200
+#define SDL_DIM_STEPS 8
+#define SDL_DIM_DELAY 20
+#define SDL_DIM() Sdl_Dim(SDL_DIM_STEPS, SDL_DIM_DELAY, 255)
+#define SDL_UNDIM() Sdl_UnDim(SDL_DIM_STEPS, SDL_DIM_DELAY, 255)
+typedef struct {
+ SDL_Surface *scr;
+ DrawRgn d, s;
+ int rnum;
+ SDL_Rect rgns[SDL_MAX_RGNS];
+} Sdl;
+void Sdl_Ini(int f);
+void Sdl_Qut();
+int Sdl_StVdMd(int w, int h, int d, int f);
+void Sdl_HwCps();
+void Sdl_Upd(int x, int y, int w, int h);
+void Sdl_FUpd();
+void Sdl_UpdR();
+void Sdl_AddR(int x, int y, int w, int h);
+void Sdl_Dim(int steps, int delay, int trp);
+void Sdl_UnDim(int steps, int delay, int trp);
+int Sdl_WtFrKy();
+void Sdl_WtFrClk();
+// hardware funcs //
+void Sdl_Bgn();
+void Sdl_End();
+void Sdl_Flp();
+
+#ifdef __cplusplus
+};
+#endif
+
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/src/sounds/alarm.wav b/project/jni/application/lmarbles-1.0.8/src/sounds/alarm.wav
new file mode 100644
index 000000000..ae675528a
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/sounds/alarm.wav differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/sounds/arrow.wav b/project/jni/application/lmarbles-1.0.8/src/sounds/arrow.wav
new file mode 100644
index 000000000..44b88ec18
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/sounds/arrow.wav differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/sounds/click.wav b/project/jni/application/lmarbles-1.0.8/src/sounds/click.wav
new file mode 100644
index 000000000..de3907514
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/sounds/click.wav differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/sounds/explode.wav b/project/jni/application/lmarbles-1.0.8/src/sounds/explode.wav
new file mode 100644
index 000000000..a40d2a686
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/sounds/explode.wav differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/sounds/score.wav b/project/jni/application/lmarbles-1.0.8/src/sounds/score.wav
new file mode 100644
index 000000000..7e6e77bf6
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/sounds/score.wav differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/sounds/select.wav b/project/jni/application/lmarbles-1.0.8/src/sounds/select.wav
new file mode 100644
index 000000000..7393d5691
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/sounds/select.wav differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/sounds/stop.wav b/project/jni/application/lmarbles-1.0.8/src/sounds/stop.wav
new file mode 100644
index 000000000..cbf04f6c2
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/sounds/stop.wav differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/sounds/teleport.wav b/project/jni/application/lmarbles-1.0.8/src/sounds/teleport.wav
new file mode 100644
index 000000000..b47cc53f4
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/sounds/teleport.wav differ
diff --git a/project/jni/application/lmarbles-1.0.8/src/timer.c b/project/jni/application/lmarbles-1.0.8/src/timer.c
new file mode 100644
index 000000000..8fc396090
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/timer.c
@@ -0,0 +1,47 @@
+/***************************************************************************
+ timer.c - description
+ -------------------
+ begin : Mon Aug 14 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include
+#include
+#include "timer.h"
+#include "sdl.h"
+
+int t_c, t_lc;
+
+/*
+ get milliseconds since last call
+*/
+int T_Gt()
+{
+ int ms;
+ t_c = SDL_GetTicks();
+ ms = t_c - t_lc;
+ t_lc = t_c;
+ if (ms == 0) {
+ ms = 1;
+ SDL_Delay(1);
+ }
+ return ms;
+}
+
+/*
+ reset timer
+*/
+void T_Rst()
+{
+ t_lc = SDL_GetTicks();
+}
diff --git a/project/jni/application/lmarbles-1.0.8/src/timer.h b/project/jni/application/lmarbles-1.0.8/src/timer.h
new file mode 100644
index 000000000..37ce5c15d
--- /dev/null
+++ b/project/jni/application/lmarbles-1.0.8/src/timer.h
@@ -0,0 +1,24 @@
+/***************************************************************************
+ timer.h - description
+ -------------------
+ begin : Mon Aug 14 2000
+ copyright : (C) 2000 by Michael Speck
+ email : kulkanie@gmx.net
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef TIMER_H
+#define TIMER_H
+
+int T_Gt();
+void T_Rst();
+
+#endif
diff --git a/project/jni/application/lmarbles-1.0.8/src/win32.ico b/project/jni/application/lmarbles-1.0.8/src/win32.ico
new file mode 100644
index 000000000..68485b44d
Binary files /dev/null and b/project/jni/application/lmarbles-1.0.8/src/win32.ico differ