diff --git a/.classpath b/.classpath
new file mode 100755
index 0000000..a662f00
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100755
index 0000000..8b0d49b
--- /dev/null
+++ b/.project
@@ -0,0 +1,33 @@
+
+
+ ds4droid
+
+
+
+
+
+ com.android.ide.eclipse.adt.ResourceManagerBuilder
+
+
+
+
+ com.android.ide.eclipse.adt.PreCompilerBuilder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ com.android.ide.eclipse.adt.ApkBuilder
+
+
+
+
+
+ com.android.ide.eclipse.adt.AndroidNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100755
index 0000000..96b92b5
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dscontrols.psd b/dscontrols.psd
new file mode 100755
index 0000000..f1ab195
Binary files /dev/null and b/dscontrols.psd differ
diff --git a/icon.fw.png b/icon.fw.png
new file mode 100755
index 0000000..c36af69
Binary files /dev/null and b/icon.fw.png differ
diff --git a/jni/Android.mk b/jni/Android.mk
new file mode 100755
index 0000000..772cf1b
--- /dev/null
+++ b/jni/Android.mk
@@ -0,0 +1,9 @@
+# Android ndk makefile for ds4droid
+
+LOCAL_BUILD_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+include $(LOCAL_BUILD_PATH)/cpudetect/cpudetect.mk
+include $(LOCAL_BUILD_PATH)/desmume_neon.mk
+include $(LOCAL_BUILD_PATH)/desmume_compat.mk
diff --git a/jni/Application.mk b/jni/Application.mk
new file mode 100755
index 0000000..06b1701
--- /dev/null
+++ b/jni/Application.mk
@@ -0,0 +1,6 @@
+# Android ndk makefile for ds4droid
+
+APP_STL := gnustl_static
+APP_ABI := armeabi-v7a
+APP_CFLAGS := -O3 -ffast-math -funroll-loops -fno-strict-aliasing -Wno-psabi
+APP_PLATFORM := android-9
\ No newline at end of file
diff --git a/jni/cpudetect/cpu.cpp b/jni/cpudetect/cpu.cpp
new file mode 100755
index 0000000..4d48ef5
--- /dev/null
+++ b/jni/cpudetect/cpu.cpp
@@ -0,0 +1,39 @@
+/*
+ Copyright (C) 2012 Jeffrey Quesnelle
+
+ 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 file 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 the this software. If not, see .
+*/
+
+#include
+#include
+
+#define JNI_NOARGS(X) Java_com_opendoorstudios_ds4droid_DeSmuME_##X(JNIEnv* env, jclass* clazz)
+
+extern "C"
+{
+
+jboolean JNI_NOARGS(useNeon)
+{
+ if (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM &&
+ (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0)
+ {
+ return JNI_TRUE;
+ }
+ else
+ {
+ return JNI_FALSE;
+ }
+}
+
+}
\ No newline at end of file
diff --git a/jni/cpudetect/cpudetect.mk b/jni/cpudetect/cpudetect.mk
new file mode 100755
index 0000000..472925f
--- /dev/null
+++ b/jni/cpudetect/cpudetect.mk
@@ -0,0 +1,19 @@
+# Android ndk makefile for cpudetect
+
+LOCAL_PATH := $(call my-dir)
+
+MY_LOCAL_PATH := $(LOCAL_PATH)
+
+include $(CLEAR_VARS)
+
+
+LOCAL_MODULE := libcpudetect
+LOCAL_SRC_FILES := cpu.cpp
+LOCAL_ARM_MODE := thumb
+LOCAL_ARM_NEON := false
+LOCAL_CFLAGS := -fexceptions
+LOCAL_STATIC_LIBRARIES := cpufeatures
+
+include $(BUILD_SHARED_LIBRARY)
+
+$(call import-module,cpufeatures)
\ No newline at end of file
diff --git a/jni/desmume/AUTHORS b/jni/desmume/AUTHORS
new file mode 100755
index 0000000..4699773
--- /dev/null
+++ b/jni/desmume/AUTHORS
@@ -0,0 +1,48 @@
+Original author
+---------------
+yopyop
+
+Current team
+------------
+Guillaume Duhamel
+Normmatt
+Bernat Muņoz (shash)
+Riccardo Magliocchetti
+Max Tabachenko (CrazyMax)
+zeromus
+rogerman
+Luigi__
+
+Contributors
+------------
+Allustar
+amponzi
+Anthony Molinaro
+ape
+Damien Nozay (damdoum)
+delfare
+Romain Vallet
+snkmad
+Theo Berkau
+thoduv
+Tim Seidel (Mighty Max)
+Pascal Giard (evilynux)
+Ben Jaques (masscat)
+Jeff Bland
+Bernat Muņoz (shash)
+matusz
+nitsuja
+gocha
+pa__
+adelikat
+hi-coder
+WinterMute
+pengvado
+dormito
+ldesnogue
+
+Thanks to our super testers for this release
+------------
+nash679
+pokefan999
+dottorleo
diff --git a/jni/desmume/COPYING b/jni/desmume/COPYING
new file mode 100755
index 0000000..d60c31a
--- /dev/null
+++ b/jni/desmume/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/jni/desmume/ChangeLog b/jni/desmume/ChangeLog
new file mode 100755
index 0000000..44b8345
--- /dev/null
+++ b/jni/desmume/ChangeLog
@@ -0,0 +1,720 @@
+0.9.7 -> 0.9.8 (r3812-r4228)
+
+Yes, it's been a while since the last release, but we haven't been completely idle. There's a brand new top shelf Cocoa frontend to make life far more pleasant for OSX users, and a host of compatibility fixes.
+
+General/Core:
+ bug: fix more IPC FIFO errors
+ bug: import more save files correctly
+ bug: don't autopatch already-patched roms
+ bug: fix bugs in piano and guitar grip
+ bug: fix ARM7's VRAMSTAT register
+ bug: fix memory leaks on compact flash emulation
+ bug: fix reading of rom from low header area
+ bug: spu: fix some poppy interpolation audio quality issues
+ bug: improve timing of dma operations by running through normal mem cycle accounting; fixes an annoying number of games and graphical glitches
+ bug: fix opcode MRC and fake bios CRC16
+ enh: jitter some related register and irq events to simulate pipeline effects and stimulate some race conditions to other outcomes
+ enh: fake (deterministic) some tiny jitter from human's hand holding stylus; some games were accidentally depending on this
+ enh: support nocash-stylep rints from arm
+ enh: add lua apis for accessing vram
+ enh: platforms other than windows receive threading optimizations
+ enh: provide diagnostics when system powers off (useful for homebrewers returning from main())
+ enh: clarify handling of different console types within the family (ds,dslite,debug)
+ enh: vfat support for slot-1 devices
+ enh: emulate temperature register
+ enh: add paddle emulation
+
+Graphics:
+ bug: fix occasional crash from uninitialized blending table
+ bug: fix some 2d alpha blending cases resulting in white screens
+ bug: fix VRAM_I B_OBJ mirroring and fix sprites rendering across the end of vram
+ bug: fix rotoscaled sprites wrapping around screen
+ bug: dont fix rotscaled bitmap sprites with alpha==0
+ bug: opengl: fix degradation of toon rendering during loadstate
+ bug: opengl: alpha blending fixes
+ bug: many refinements to opengl renderer
+ bug: opengl: support rear-plane/ClearImage emulation (fixes many graphics)
+ bug: rasterizer: fix some rare alpha blending cases
+ bug: fix bug in environment mapping introduced after 0.9.6
+ bug: fix totally glitched out 3d graphics with several improvements involving matrix stack
+ bug: fix memory overflows in epx filter
+ bug: prevent backdrop from blending with ???
+ enh: opengl: better depth buffering emulation
+ enh: better support for line segment "polys" by detection and special rendering logic
+ enh: opengl: support quad primitives directly
+ enh: add hq4x filter
+
+Windows:
+ bug: fix a long-standing loadstate crash
+ bug: fix lag frame accounting
+ bug: fix glitches in cheat entry menu
+ bug: stop compact flash emulation from accidentally scanning c:\ sometimes
+ enh: add support for game database for improved save type detection
+ enh: hotkey for limit framerate toggle
+ enh: remove stop and reset toolbar buttons which were accidentally getting used
+ enh: additional complexification to desmume's behaviour run from a console prompt. whether it's better is uncertain.
+ enh: add support for cheats databases
+ enh: improvements to ram search tool
+ enh: preliminary support for varying stylus pressure
+ enh: add [Display] Show Console=1 to ini file
+ enh: more graceful cheat parsing and add some hotkeys
+ enh: add 5x window size
+ enh: add big endian and 20.12 toggle to memview and ramwatch
+ enh: improve FPS throttle feedback and granularity
+ enh: add lua menu API
+ enh: hud font switching
+ enh: add optional file association for .nds to path config dialog
+
+Cocoa:
+ enh: Big update to cocoa frontend. Pretty much entirely new. (rogerman)
+
+Linux:
+ bug: gtk: glitches in rom and recent rom loading
+ bug: glade: normalize savestate slot to hotkey mapping
+ enh: support soundtouch for use by metaspu
+ enh: gtk: add SPU mode selection (Tobias Jakobi)
+ enh: cli: better fps limiting (Thomas Jones)
+
+Wx:
+ bug: some small fixes here and there (Jan Bücken)
+ enh: lot of code cleanup (Jan Bücken)
+
+0.9.6 -> 0.9.7 (r3493-r3812)
+
+General/Core:
+ bug: fix a ton of old, broken cpu opcodes and CP15 logic
+ bug: return Z1 and Z2 from TSC (fixes some touch logic)
+ bug: gba slot save type detection improved
+ bug: handle unusual rom headers more correctly
+ bug: dont confuse motion pack commands with save memory commands
+ bug: make cheat system a little less flaky and add AR 1.54 support
+ bug: fix nondeterministic backup memory behaviour while rerecording
+ bug: correct emulation of register accesses of wrong size and during powerdown
+ bug: rewrite --cflash-path emulation
+ bug: rewrite IPC/GX FIFO, IRQ flag generation, and wait-for-IRQ logics
+ bug: rewrite RTC calendar handling; now supports years > 2038
+ enh: auto-DLDI patching for homebrew
+ enh: --gbaslot-rom=self mounts self.nds in slot2
+ enh: more realistic exception handling
+ enh: piano controller emulation
+ enh: modular slot-1 system for exact emulation of homebrew cards
+
+Graphics:
+ bug: edge marking colors were wrong
+ bug: handle some "invalid" vram configurations correctly
+ bug: convert half of geometry engine to fixed point
+ bug: fix sprite blend+fadein/fadeout
+ bug: improve rasterizer shadows
+ bug: fix main memory display DMA
+ bug: fix some raster fx timing bugs
+ enh: add a hack for improving some non-stencil shadows
+
+Windows:
+ bug: misc fixes and improvements to gpu viewer tools
+ bug: sub screen layer display toggling fixed
+ bug: fixes and improvements to ram watch, ram search, cheats list
+ bug: fix start-paused commandline
+ bug: fix memory leaks when sound disabled
+ bug: improve load average calculators and add arm7 load average
+ enh: background input support
+ enh: add vsync option
+ enh: support more knobs on joysticks
+ enh: import cheats from R4 database
+ enh: add xinput rumble for 360 pads
+
+Linux/OSX:
+ bug: crash less in recent roms list
+ enh: Add horizontal screen layout and swap screen ability to gtk frontend (noodlebox)
+ enh: Big improvement to joystick support, support complex configurations and multiple devices (noodlebox)
+
+
+0.9.5 -> 0.9.6 (r3075-r3493)
+
+Users of gtk, cli and gtk-glade frontends please note that now we
+have a common directory in ~/.config/desmume for config file,
+saves and savestates. The old .desmume.ini will be moved
+automatically with the name config but you have to move your saves
+manually.
+
+Some save files may be invalidated due to use of broken crc logic.
+Back up your DSV files before using this version of the emulator or else
+the game might wipe it.
+
+General/Core:
+ bug: emulate keypad interrupt
+ bug: spu overhaul, add capture support
+ bug: fix dma address reloading
+ bug: fix rom close memory corruption
+ bug: fix div and sqrt busy flag bug
+ bug: fix vectest
+ bug: fix lid savestate desync
+ bug: fix texcache memory GB explosion when games use tons of tiny 3d sprites
+ bug: fix huge rerecording movie file handle leak
+ bug: fix EXXXXXXX cheat codes and some add/edit/save/load bugs
+ bug: add 8MBit - 512MBit flash emulation
+ bug: fix firmware booted-from-card flag
+ bug: fix some failures to wake
+ bug: fix some rtc calendar logic
+ bug: op_bkpt emulation
+ bug: correctly emulate POWCNT1 and POWCNT2 and SPI power device
+ bug: corrections to bootup stack configuration
+ bug: protect bios from being overwritten
+ bug: initialize save data to 0xFF instead of 0x00
+ bug: handle relocated irq vectors
+ bug: support patched firmwares
+ bug: handle 8bit auxspidata, 32bit BLDY, 32bit div regs
+ bug: fix some divide by zero cases
+ bug: don't print \n in ideas debug message
+ bug: don't let games read off end of cart and crash emulator
+ bug: fix SWI 0x0E crc16 ; some save files using wrong crc may be invalidated
+ bug: fix many big endian bugs
+ bug: fix CPSR.I idle wakeup
+ bug: fix loadstate crashes, mostly when sound is enabled
+ enh: support devkitpro argv
+ enh: add gbaslot-rom commandline
+ enh: add no$gba debug message
+ enh: add rtc start to dsm header
+
+Graphics:
+ bug: fix a mistakenly rendered OBJ window and 3d blend effects
+ bug: fixes to matrix stacks, fixing lots of garbled geometry
+ bug: fix fog density registers
+ bug: fix hblank dma to run also on scanline 262
+ bug: fix w/z depth flags for broken GUIs in dual screen 3d games
+ bug: fixes to poly sorting
+ bug: block 8bit vram writes
+ enh: improve accuracy of opengl shaders
+
+Windows:
+ bug: fix 16bpp display
+ bug: more fixes to multi-gamepads
+ bug: cheat windows robustification
+ bug: fix that sticky pause state when resetting and loading roms
+ bug: dont crash when no sound device is available
+ bug: change F10 to be save slot 0
+ bug: fix --start-paused
+ enh: try not to screensave while using gamepad
+ enh: add EPX and EPX1.5X resize filters
+ enh: add a japanese translation which will soon be stale like the others
+ enh: add fancy ctrl+printscreen with emulator info on it
+ enh: add "lockdown" window mode to keep window safe from fast stylus action
+ enh: add alt+enter fullscreen command
+ enh: add card eject command
+ enh: add ddraw software mode forcer
+ enh: improve oam viewer
+ enh: default 3d to rasterizer so we dont have to suggest it 1000 times a day
+ enh: add dump-all-memory tool
+ enh: add reload rom menu/hotkey
+
+Linux/OSX:
+ bug: fix building for nosse2 systems
+ bug: fix --num-cores
+ bug: fix occasional touchscreen failures
+ bug: fix crash starting dsm record
+ enh: add --nojoy=1 to fix laptops with accelerometers
+ enh: add simple auto frameskip mode in the gtk frontend
+ enh: add gui for configuring joystick in the gtk frontend
+ enh: make the cli frontend read the ini config file too
+ enh: additional OpenAL microphone backend (ncalexan)
+ enh: common place for config and saves (Jan Steffens)
+ enh: libagg is now optional if you don't need the hud
+
+0.9.4 -> 0.9.5 (r2437-r3075)
+
+0.9.5 introduces an entirely rewritten main emulation loop
+This totally changes the timing, and totally breaks old savestates.
+The OSX build is now based on the GTK port which is more up-to-date.
+
+Assorted Highlights:
+ * synchronous SPU mode to fix streaming sounds
+ * win32: lua engine, path configuration, 7z dearchiving support
+
+General/Core:
+ bug: rewrite main emulation loop and cycle accounting, fixes a lot of timings
+ bug: add more detailed timing emulation, removes much bogus lag
+ bug: rewrite DMA,gxfifo,gxstat; fix many games and no more alternate flush mode
+ bug: fix cflash directory support for non-windows and sector-writing
+ bug: fix freeze in cart irq
+ bug: correctly emulate dma to/from tcm
+ bug: fix in thumb LSR carryflag
+ bug: fix thumb BX PC switch to arm state
+ bug: fix adpcm looping, remove adpcm caching (no longer necessary)
+ bug: fixes to swi 3,4,5,8,0x10
+ bug: fixes to exmemstat and ipc sync registers
+ bug: support new backup commands
+ bug: improve bootup bios/firmware emulation steps
+ enh: gbaslot: add guitar grip, gbagame flash support, expansion memory pak
+ enh: add more powerful antigrain-based drawing library and rewrite OSD system
+ enh: ideas-style debugging prints
+ enh: most optimizations now SSE instead of SSE2
+ enh: more improvements to frameskipping and frame advance/speed controls
+
+Graphics:
+ bug: fix backdrop blending with garbage
+ bug: fix 256B granularity sprite addressing for sub gpu
+ bug: fix obj blending, bmp obj rendering, and some obj window cases
+ bug: fix 128-wide captures
+ bug: fix 16color BG line buffer overflow
+ bug: fix color overflow in capture blending
+ bug: fix disp fifo capture
+ bug: fix simultaneous vram display and capture via same bank
+ bug: fix 3d overflow acknowledge registers
+ bug: fix 32bit toon table writes
+ bug: change 3d cores to use 18bit color
+ bug: fix boxtest (addition overflow!), move clipper to main graphics engine
+ bug: fix failure in some cases of polygon clipping
+ bug: fix disp3dcnt emulations
+ bug: fixes to poly sorting
+ bug: fix ogl renderer wireframe support
+ bug: swrast: fix backface culling of nonconvex polys
+ bug: swrast: add clear image and scroll emulation
+ bug: swrast: add fog emulation
+ bug: swrast: fixes to shadow rendering
+ bug: swrast: preliminary edge marking, works decent
+ enh: swrast: multicore optimization for a few fps speedup
+
+Windows:
+ bug: fix support for multiple gamepads and gamepad hotkeys
+ bug: fix mic noise code and load wav instead of raw; effective in more cases
+ bug: fix for several sticky and broken hotkeys, and f10 hotkeys
+ bug: fixes in ram search, add DTCM and ITCM searching, ...
+ bug: fix sound settings vol slider
+ bug: recover from missing window -32000 problem
+ bug: don't turn on mic unless mic input is enabled
+ enh: x64 build type now supported
+ enh: side-by-side and single screen view modes, many fixes to window resizing
+ enh: choose any gap size by dragging bottom window edge (must be enabled)
+ enh: choose a gap color
+ enh: import/export no$GBA savefiles directly
+ enh: multicore optimization for filters, rotation, OSD
+ enh: soundview can now mute channels
+ enh: new ioregview
+ enh: common commandline system, many arguments shared with linux
+ enh: improve map view tool to support more modes
+ enh: add "FORCE AS CURRENT" recovery tool for mis-sized savefiles
+ enh: add some kind of very small savestate rewinding buffer
+ enh: autoframeskip works better
+ enh: add Italian translation
+ enh: added 2x resizing filters (hq2x, hq2xs, lq2x, lq2xs, 2xsai, supereagle)
+ (scanlines, nearest2x, bilinear)
+
+Linux:
+ enh: alsa microphone support
+ enh: hud and osd notification for gtk and cli frontends
+ enh: add support for the SSE optimizations
+
+0.9.2 -> 0.9.4 (r1844->r2352->r2437)
+
+0.9.3 was skipped due to emu news sites sneaking it out of our staging area and
+releasing it prematurely while it still had bugs. I was going to curse them
+individually, but then I decided that they would just like the publicity.
+
+Highlights:
+ * New save autodetection and save file format
+ * Full rerecording support
+
+General/Core:
+ bug: fix many 64 bit and endian issues
+ bug: fix mic input, which was nearly useless before
+ bug: fix failures of large dmas
+ bug: fix in ipc sync which broke devkitpro touch
+ bug: screenshots now exclude hud and rotation
+ bug: rewritten vram mapping (fixes corrupted or missing BG)
+ enh: add universal commandline system (same commandline options on every port)
+ enh: cheats: added Action Replay code parser
+ enh: more reliable and useful frameskipping
+ enh: SPU: speedup: add adpcm caching
+ enh: SPU: speedup: interpolation is now optional
+ enh: print svn build number so we can identify people's svn builds from screenshots
+
+Graphics:
+ bug: add polygon y-sorting (fixes 3d guis)
+ bug: fix texcoordgen mode 3; fixes some ortho sprites and some entirely broken games
+ bug: display capture fixes
+ bug: fix a number of OBJ modes
+ bug: fixes to affine BG modes
+ bug: better emulate some translucent OBJ
+ bug: more correct handling of color effect windows and backdrop colors
+ bug: fix matrix stack overrun which crashed emulator
+ bug: swrast: add clear depth image emulation and other fixes to depth buffering
+ bug: swrast: fix some toon and highlight cases
+ bug: fix bug in matrix stack, fixes some broken models
+ enh: add alternate flush mode HACK 3d config toggle, fixes some entirely broken 3d games
+
+Windows:
+ bug: more robust cheats engine and dialog
+ enh: more solid avi and wav recording
+ enh: improved tools: memory viewer
+ enh: added tools: spu viewer, ram watch, ram search
+ enh: change build configuration system
+ enh: speedup: add gpu core disabling to hide useless screens
+ enh: add background pause feature (for when emulator loses focus)
+ enh: add missing autohold for L and R
+ enh: add chinese translation
+
+Gtk frontend:
+ enh: switch all of menu/toolbar system to GtkAction + GtkUIManager
+ enh: remove the gtglext 3d code
+ enh: improve/speedup screen resize and final presentation logic in gtk frontend
+ enh: minimal rerecording hookups
+
+Cli frontend:
+ enh: hooked the frameskip (szigor)
+ enh: misc usability improvements: auto pause switch for pausing when focus is lost and exit on escape pressing (szigor)
+ enh: hook the fake noise mic; use m to toggle
+
+0.9.1 -> 0.9.2
+General/Core:
+ bug: fix error in SBCS/RSCS flags; fixes many odd behaviors and crashes [zeromus]
+ bug: add support for sleep mode and power registers [luigi__]
+ bug: important fixes to RTC so correct time is actually told [luigi__]
+ bug: fix card reads below 0x8000; fixes some game freezes [normatt]
+ bug: fix 4 mbit save type; fix non-autodetect savefile dumping [zeromus, matusz]
+ enh: add sram to GBA game addon emulation for importing savefiles [zeromus]
+ enh: many improvements and feature hookups in linux ports [matusz, luigi__]
+
+Graphics:
+ bug: fix specular texture mapping mode [luigi__]
+ bug: repairs to some capture modes and vram mapping [zeromus, CrazyMax]
+ bug: viewports finally correctly handled [zeromus]
+ enh: add software rasterizer. quirky, but on par with opengl [zeromus]
+
+Windows:
+ bug: mitigate bad frameskipper; default to old frameskipping mode [zeromus]
+ bug: fixes with recent roms and zipfile loading [zeromus]
+ bug: fix window position memory [zeromus]
+ enh: bios and firmware may now be used and booted [luigi__]
+ enh: many display, OSD, and input enhancements [luigi__]
+ enh: brand new hotkey and controls binding system [zeromus]
+ enh: configurable screen separation [luigi__]
+ enh: fast forward key [pa__]
+ enh: improvements to mic [luigi__]
+ enh: faster updates in debug tools, up to once per frame [pa__]
+
+Mac OS X Port:
+ enh: added Italian translation thanks to Paolo Bernini [jeff]
+ enh: resurrection of GDB stub [sigmaris]
+
+0.9 -> 0.9.1
+General/Core:
+ enh: GBA slot emulation [CrazyMax]
+ - Rumble support (windows only)
+ - GBA game
+ enh: Mic support (windows only?) [luigi__]
+ enh: Preliminary cheats system [CrazyMax]
+ enh: Savestates invalidated, as more variables have been added.
+ bug: Added PSG white noise [luigi__]
+ bug: fix arm/thumb ROR [zeromus]
+ bug: [ 2550645 ] Super Princess Peach: crash when starting a puzzle [zeromus]
+ bug: win32: fix spu wav file writer (regression from 0.8) [zeromus,luigi__]
+ bug: Much work on FIFOs, still not finished [CrazyMax]
+ bug: Many fixes to dma [zeromus, CrazyMax]
+ bug: bios WaitForVblank and WaitForInterrupt fixed [luigi__]
+
+Graphics:
+ bug: Added sprite blending [luigi__]
+ bug: more correct mosaic effects, still imperfect [zeromus]
+ bug: Many fixes to tile rendering; all graphics tests now pass [luigi__]
+ bug: fix crashes in some affine BG [zeromus]
+ bug: Implement some pos test function [luigi__]
+ bug: fix texture mapping across texture and palette banks and to unmapped banks [zeromus]
+ bug: fix texture handling for texels with MSB set (fixes some texture corruption) [zeromus]
+ bug: fix texture coordinate generation, including environment mapping [zeromus]
+ bug: texture cache invalidates when palettes change, prevents some texture corruption [zeromus]
+ bug: fix display capturing from 2d+3d source when display mode is display-vram [zeromus]
+ bug: [ 2488334 ].1 fixes to layer compositing [luigi__]
+ bug: [ 2488334 ].3 fix bug in support for hdma affine bg parameters [zeromus]
+ bug: Improvements to 3d h-scrolling [luigi__]
+ bug: Fix some errors in rendering 512 tall BG [zeromus,CrazyMax] (still not fully resolved)
+ bug: Add optional fragment shading pipeline (more precision) [luigi__]
+ bug: Fix bug where some sprites got cut of on x=255 [zeromus]
+ bug: Implement GXSTAT register [CrazyMax]
+
+Windows:
+ bug: resizing and rotating work in vista [luigi__]
+ enh: 0 frameskip now lets emulator run at excess speed [zeromus]
+
+Mac OS X Port:
+ bug: left key setting no longer gets confused with the right key [jeff]
+ enh: more keys can be mapped
+
+0.8 -> 0.9
+ There have been so many changes that this list can hardly be considered complete.
+ For this release, we have formatted the list into a high level overview of big changes and bad bugs relative to the previous release. Hopefully what you're interested in.
+ This list does not include items which are solely performance boosts, for let us just say that virtually every system has been speeded up.
+
+ * The savestate system is totally changed and incompatible with old savestates.
+ * The 3d system should be considered rewritten.
+
+General/Core:
+ enh: Convert to c++
+ enh: Add functions for a lid open/close. Holding key (default "Backspace" in Windows port) while game is freeze/non freeze. [CrazyMax]
+ enh: Add secure area decryption from ndstool [zeromus]
+ enh: Change savestate code to support loosely bound chunks and more easily other parts of the emu (GE, GPU).
+ The savestate format is changed, but from now on it is in principle more resilient
+ (though it will continue to break as we tinker with the internals) [zeromus]
+ enh: Added SSE2 optimizations for matrices. Since we now make an SSE2 build, more optimizations can be made. [CrazyMax]
+ enh: Add a preliminary GUI hud system [CrazyMax,zeromus]
+
+CPU/MMU:
+ bug: Many fixes in IPC and GE FIFOs. Fixes freezes in NSMB, dsracing, and others. [CrazyMax,luigi__,shash]
+ bug: Fix ARM instructions SBC and RSC (likewise SBC in thumb) [normatt]
+ bug: Fixed Thumb LDMIA (fixes ingame Dead'n'Furious) [shash]
+ bug: Fix repeating DMA (fixes NSMB parallax BG) [zeromus]
+ bug: Proper handling for unaligned CPU accesses [luigi__]
+ bug: Proper handling for undefined instruction exceptions [Salva Peirķ]
+ bug: correctly return vram control register values (fixes homebrew 3d games) [zeromus]
+ enh: Remove 16MB of WRAM at 0x01****** from arm9. Mapped to unused instead. Nobody knows what this was. [zeromus]
+ enh: Changed instruction execution to 16 at a time blocks (tested and stable) [shash]
+
+Hardware:
+ bug: Newer and better sqrt and div emulation; makes SM64DS playable [luigi__,shash,zeromus]
+ bug: Add preliminary RTC implementations [CrazyMax]
+ enh: Add cosine interpolation in the SPU (conditionally compiled) [zeromus,luigi__]
+ enh: Experimental: always one silent non-mixing SPU core at 44.1khz synched with emu, for more precision.
+ The audible core runs with the host, causing music to slow down but not tear or pitch bend. [zeromus]
+
+Graphics:
+ - Overhaul 3d:
+ . Move entire GE to core emu.
+ . Move OpenGL renderer to emu core for optional use by platforms, removing ogl_collector. Now every platform shares the same 3d code.
+ . Reorganize 3d code to defer rendering to after 3d vblank. Eliminates tearing, and texturing artifacts. [zeromus]
+ . Add optional fragment shading pipeline (more precision) [luigi__]
+ . Move lighting model to software instead of using opengl's fixed function model [zeromus]
+ . Render shadow volumes; toon shading and highlight table [zeromus, luigi__]
+ . Added texture caching! big speed up. [CrazyMax]
+
+ bug: Many assorted tweaks and improvements to 3d and 2d precision [zeromus,CrazyMax,luigi__]
+ bug: Fixes to GE: command unpacking, projection and pos-vector mode matrix handling, mult and load commands [zeromus]
+ bug: Fix a bug in texture transformation mode 1 [zeromus]
+ bug: Fixed GPU rendering bugs in sprites and BG [CrazyMax]
+ bug: Fixes to texture conversion [CrazyMax,zeromus]
+ bug: Fixes in capture display (no blinking in many games with dual 3D) [CrazyMax]
+ bug: Fixes in master brightness (this fixes some games with black screens) [CrazyMax]
+ bug: Fixes in screen, backdrop, and sprite blending [luigi__]
+ bug: Changed clear depths and how depth initial values are calculated (fixes SM64DS skybox, Castlevania) [shash,lugi__]
+ bug: Add 3d layer h-scrolling [zeromus]
+ bug: Added transparency and fixed material alpha support and alpha testing on the 3D core [shash]
+ bug: Rewrite VRAM mapping control and rendering (more accurate) [CrazyMax,luigi__]
+
+ bug: convert colors to opengl better to prevent alpha=31 polys from being ever so slightly transparent [zeromus]
+ enh: Add MMU->GPU signal for when vram mappings change to function as a texture cache invalidate signal [zeromus]
+ enh: Make matrix 4x4 multiply routines use W-coordinate; carry w coord through pipeline [zeromus]
+
+Mac OS X port:
+ bug: Fixed: Filenames and paths with unicode characters now work. [Jeff]
+ bug: Fixed: Load state from file button works again. [Jeff]
+ enh: Save State panel now pauses emulation while the file selection box is open. [Jeff]
+ bug: Fixed: Frozen video output (and/or messed 3d emulation) after loading a state. [Jeff]
+ bug: Added option to load the most recent file upon launching the program. [Jeff]
+ enh: Added French translation (thanks to Pierre Rudloff). [Jeff]
+ enh: Added basic key mapping configuration to application preferences (thanks to Julio Gorg). [Jeff]
+ enh: Added keyboard shortcuts for Execute, Pause and Reset command (thanks to Julio Gorg). [Jeff]
+ enh: Default key mappings are no longer case sensitive. [Jeff]
+ enh: Added ability to limit speed. [Jeff]
+ enh: Fixed: Video output should work on software-only 3D renderers. [Jeff]
+
+Windows port:
+ bug: Fix a race condition in NDS_3D_Reset and NDS_glInit [zeromus]
+ bug: Fix the buggy auto frameskip logic which made the emu slow to a crawl. Now it runs fast! [zeromus]
+ bug: Fix resizing, rotate & aspect ration of main window. [CrazyMax,_zeromus]
+ bug: Remove multithreading from user interface after finding several synchronization issues [zeromus]
+ enh: recent roms menu [luigi_]
+ enh: Changed graphics render core to DirectDraw (work faster) [CrazyMax]
+ enh: Add an arm9 cpu load average calculator similar to no$. but I dont think it works right. [zeromus]
+ enh: Rewrite all debug tools (autoupdate works now) [CrazyMax]
+ enh: Rewrite input core & replace config input dialog [CrazyMax]
+ enh: Add AVI output [zeromus]
+ enh: Add pause toggle and frame advance hotkeys [adelikat]
+ enh: Add frame counter display and hud messages framework [adelikat]
+ enh: Main window remembers position, size, and a few other emu preferences [adelikat]
+ enh: Removed directx sdk dependency for easier building. [zeromus]
+ enh: Savestate doesnt unpause emu if it is already paused [adelikat]
+
+0.7.3 -> 0.8
+ Cocoa:
+ - Save State As function now works. [Jeff B]
+ - Recent Items menu now works. [Jeff B]
+ - Opening NDS files from Finder now works. [Jeff B]
+ - Added screenshot feature. [Jeff B]
+ - Added preferences. [Jeff B]
+ - Many more strings are translatable now. [Jeff B]
+ - Default screen color is black (better represents being "off" and easier on eyes at night). [Jeff B]
+ - Added sound. [Jeff B]
+ - Now is a universal binary. [Jeff B]
+ - Leopard resolution icon added. [Jeff B]
+ - Added a Japanese translation. [Jeff B]
+ - Added an optional status bar (resize handle no longer overlaps screen). [Jeff B]
+ - New ROM Info and About DeSmuME windows have been added. [Jeff B]
+ - Fixed several bugs in window resizing. [Jeff B]
+ - Added FAT image support for homebrew games (thanks to TypeError). [Jeff B]
+ - Key config can be changed on the command line. Save/load hotkeys changed (so expose doesn't override). [Jeff B]
+ - Key bindings may work better on non-US keyboards now (needs testing). [Jeff B]
+ general:
+ - Encapsulate GDB debug stub to avoid certain problems [shash]
+ - Fixed CPU LD*/ST* bugs [shash]
+ - Fixed New SMB mini-games freeze [shash]
+ - Fixed possible segfault in ROMReader on ia64 and amd64. [evilynux]
+ - Fixed a crash bug with 2D background corrupting memory [shash]
+ - Flag check optimization [carlo_bramini]
+ - Applied some endian fixes in GPU (thanks to Phazz) [Jeff B]
+ gtk-glade:
+ - Added DeSmuME version in about dialog. [evilynux]
+ - Updated website url in about dialog. [evilynux]
+ - Added Brazilian Portuguese translation by Dreampeppers99. [evilynux]
+ - Better desktop menu entry following FreeDesktop specifications. [evilynux]
+ gtk:
+ - Updated website url in about dialog. [evilynux]
+ - Better desktop menu entry following FreeDesktop specifications. [evilynux]
+ windows port:
+ - Added an "about" box [shash]
+ - DirectInput control interface with joystick support [CrazyMax]
+ - Matrix and Light viewer [Acid Burn]
+
+0.7.2 -> 0.7.3
+ gtk-glade:
+ - Full localization using intltool/gettext. [evilynux]
+ general:
+ - Added a README.TRANSLATION documenting the localization process. [evilynux]
+ MacOS X:
+ - Initial version of the Mac interface added. [Jeff B]
+
+0.7.1 -> 0.7.2
+ spu:
+ - big endian fixes. [cyberwarriorx]
+ gpu:
+ - big endian fixes. [marcus_c]
+ gtk-glade:
+ - opengl improvements. [masscat]
+ general:
+ - Added support for setting NDS firmware language value. [masscat]
+ - Function added for setting firmware language. [masscat]
+ - Mac/msys compilation fixes. [cyberwarriorx]
+ - Fix compilation when pkg-config macros are not available [evilynux]
+
+0.7.0 -> 0.7.1
+ general:
+ - Added GDB debugger stub [masscat]
+ - Added new/different GBAMP CFlash image reader/writer [masscat]
+ gpu:
+ - Major speedup to the 2D core [shash]
+ gtk-glade:
+ - Added command line options. [masscat]
+ - Added FPS limiter [masscat]
+ cli:
+ - Added command line options. [masscat]
+ - Added FPS limiter [masscat]
+ - Added option to use OpenGl to render window (allows resizing). [masscat]
+ windows port:
+ - Added command line options. [masscat]
+ - Added multiple language support [cyberwarriorx]
+ - Added Danish language translation [thomas-2007]
+
+0.6.0 -> 0.7.0
+ general:
+ - Added support for *.duc files [cyberwarriorx]
+ gpu:
+ - Added support for sprite rotation/scaling [shash]
+ - Added support for the 3D core (openGL and null plugins) [shash]
+ windows port:
+ - A bunch of fixes [Dmitry Krutskih]
+ - Fixed a bug in sound that was causing it to still not work for some
+ people [cyberwarriorx]
+ gtk:
+ - Added 3D emulation
+ - Added command line options.
+ - Added option to use OpenGL to render window (allows resizing).
+ gtk-glade:
+ - Added 3D emulation
+
+0.5.0 -> 0.6.0
+ general:
+ - Added zipped (based on zziplib) and gzipped (based on zlib) rom support.
+ arm:
+ - Added relocation interrupt vector.
+ - Added region access right checks.
+ - Enabled LDC/STC instructions.
+ - Fixed powersave (cp15) IRQ wait.
+ - Fixed MOV instructions
+ gpu:
+ - Added special color effects.
+ - Added windowing feature.
+ - Fixed transparent direct color backgrounds.
+ - Fixed disabled sprites showing.
+ - Fixed 8/32 bit access to gpu registers.
+ - Fixed missing backgrounds
+ - Support for master brightness
+ wifi:
+ - Added RF chip interface.
+ - Added BB chip interface.
+ windows port:
+ - Fixed address calculation in disassembler.
+ - Added Force Maintain Ratio option for window stretching
+ linux port (cli, gtk and gtk-glade):
+ all:
+ - Added joystick support.
+ - Fixed X and Y buttons.
+ gtk-glade:
+ - Added joystick configuration.
+ - Improved I/O registers viewer tool.
+ - Added save and load states support.
+
+0.3.3 -> 0.5.0
+ arm:
+ - Fixed MSR with immediate value opcode.
+ - Fixed LSR_0 thumb opcode (C flag is correctly set now).
+ - Fixed LDR*/STR* opcodes.
+ - Fixed unaligned memory access on THUMB Core.
+ - Added relocating SWI routines.
+ bios:
+ - Added decompression functions.
+ - Added GetPitchTable function.
+ - Added GetVolumeTable function.
+ - Added GetCRC16 function.
+ - Added experimental SoundBias function.
+ - Added GetSineTable function.
+ cart:
+ - Added CompactFlash/FAT emulation.
+ - Added Get ROM chip ID Cartridge command.
+ gpu:
+ - Added framebuffer emulation.
+ - Fixed a bug in GPU (xfin could be greater than LG causing a segfault).
+ - Added support for Display Mode 0(Display Off).
+ - Added the basic framework for Display Mode 3(Display from Main RAM).
+ spu:
+ - Added sound emulation.
+ - Added sound core system.
+ - Added WAV write core.
+ - Added dummy core.
+ - Added Direct Sound core.
+ linux port:
+ - Added GTK+ GUI.
+ - Added command line interface.
+ - Added stylus and arm9 keypad support in CLI version.
+ - Added FPS display.
+ - Added basic frameskip.
+ windows port:
+ - Fixed a bug when displaying a ROM's information.
+ - Added key configuration.
+ - Removed the debug key.
+ - Added new experimental auto frameskip/frame limit code.
+ - Added sound settings dialog.
+ - Added a few menu options for accessing the website, forums, and for
+ submitting bugs.
+ general:
+ - Rewrote code in C.
+ - Fixed warnings.
+ - Used defines and typedef's to make things more portable and easier to
+ read.
+ - Added autotools stuff.
+ - Changes to logging system.
+ - Added screenshot function.
+ - Translated most french to english.
+ - Added savestate support.
+ - Added firmware reading support(needs work).
+ - Added Backup Memory support with autodetection.
+ - Fixed some endianess issues.
+ - Fixed things so Visual C++ can compile code.
+ - Added bsd support.
+ - Reworked ROM loading so you can load a different rom without any problems.
+ - Finished NDS_Reset. Now the emulation can be reset even while running.
diff --git a/jni/desmume/INSTALL b/jni/desmume/INSTALL
new file mode 100755
index 0000000..a1e89e1
--- /dev/null
+++ b/jni/desmume/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use 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 `..'. This
+is known as a "VPATH" build.
+
+ With a non-GNU `make', it is safer 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.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+ 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'.
+
+ 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.
+
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved. Use GNU `make'
+instead.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/jni/desmume/Makefile.am b/jni/desmume/Makefile.am
new file mode 100755
index 0000000..c059490
--- /dev/null
+++ b/jni/desmume/Makefile.am
@@ -0,0 +1,5 @@
+EXTRA_DIST = README.LIN README.MAC README.WIN dsm.txt dsv.txt autogen.sh \
+ $(PO_FILES_IN)
+DISTCLEANFILES = $(PO_FILES)
+SUBDIRS = $(PO_DIR) src
+
diff --git a/jni/desmume/Makefile.in b/jni/desmume/Makefile.in
new file mode 100755
index 0000000..93397d8
--- /dev/null
+++ b/jni/desmume/Makefile.in
@@ -0,0 +1,801 @@
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+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@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in \
+ $(top_srcdir)/autopackage/default.apspec.in \
+ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+ compile config.guess config.sub depcomp install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/wxwin.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = autopackage/default.apspec
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+ALSA_CFLAGS = @ALSA_CFLAGS@
+ALSA_LIBS = @ALSA_LIBS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GLADEUI_UNINSTALLED_DIR = @GLADEUI_UNINSTALLED_DIR@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
+GTHREAD_LIBS = @GTHREAD_LIBS@
+GTKGLEXT_CFLAGS = @GTKGLEXT_CFLAGS@
+GTKGLEXT_LIBS = @GTKGLEXT_LIBS@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+HAVE_PKG = @HAVE_PKG@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
+INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
+INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
+INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
+LDFLAGS = @LDFLAGS@
+LIBAGG_CFLAGS = @LIBAGG_CFLAGS@
+LIBAGG_LIBS = @LIBAGG_LIBS@
+LIBGLADE_CFLAGS = @LIBGLADE_CFLAGS@
+LIBGLADE_LIBS = @LIBGLADE_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBSOUNDTOUCH_CFLAGS = @LIBSOUNDTOUCH_CFLAGS@
+LIBSOUNDTOUCH_LIBS = @LIBSOUNDTOUCH_LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+LUA_CFLAGS = @LUA_CFLAGS@
+LUA_LIBS = @LUA_LIBS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+OSMESA_LIBS = @OSMESA_LIBS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_DIR = @PO_DIR@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+SDLCONFIG = @SDLCONFIG@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_LIBS = @SDL_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UI_DIR = @UI_DIR@
+UPDATEDESKTOP = @UPDATEDESKTOP@
+USE_MAINTAINER_MODE = @USE_MAINTAINER_MODE@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WX_CFLAGS = @WX_CFLAGS@
+WX_CFLAGS_ONLY = @WX_CFLAGS_ONLY@
+WX_CONFIG_PATH = @WX_CONFIG_PATH@
+WX_CPPFLAGS = @WX_CPPFLAGS@
+WX_CXXFLAGS = @WX_CXXFLAGS@
+WX_CXXFLAGS_ONLY = @WX_CXXFLAGS_ONLY@
+WX_LIBS = @WX_LIBS@
+WX_LIBS_STATIC = @WX_LIBS_STATIC@
+WX_RESCOMP = @WX_RESCOMP@
+WX_VERSION = @WX_VERSION@
+XGETTEXT = @XGETTEXT@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+desmume_arch = @desmume_arch@
+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@
+install_sh = @install_sh@
+intltool__v_merge_options_ = @intltool__v_merge_options_@
+intltool__v_merge_options_0 = @intltool__v_merge_options_0@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = README.LIN README.MAC README.WIN dsm.txt dsv.txt autogen.sh \
+ $(PO_FILES_IN)
+
+DISTCLEANFILES = $(PO_FILES)
+SUBDIRS = $(PO_DIR) src
+all: all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+autopackage/default.apspec: $(top_builddir)/config.status $(top_srcdir)/autopackage/default.apspec.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+# 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):
+ @fail= 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; \
+ ($(am__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"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= 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; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ 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 || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ 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; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$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 \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -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 $(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=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(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)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(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 \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+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-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+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:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+ dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+ distcheck distclean distclean-generic distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
+
+
+# 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/jni/desmume/NEWS b/jni/desmume/NEWS
new file mode 100755
index 0000000..e69de29
diff --git a/jni/desmume/README b/jni/desmume/README
new file mode 100755
index 0000000..5634b89
--- /dev/null
+++ b/jni/desmume/README
@@ -0,0 +1,97 @@
+ DeSmuME
+ _________________________________________
+ Copyright (C) 2006 yopyop
+ Copyright (C) 2006-2012 DeSmuME team
+ Last Updated: March 31, 2012
+
+Contents:
+1) About ................................................................... 14
+2) Credits ................................................................. 59
+3) Contact Information ..................................................... 72
+4) License ................................................................. 82
+
+
+1) About ______________________________________________________________________
+
+DeSmuME is software that allows you to emulate a Nintendo DS system. Think of
+it as a Swiss-Army knife for Nintendo DS emulation, giving you access to many
+powerful tools for testing DS features, from viewing ROM properties to managing
+Action Replay cheats. And best of all, this software is completely free and
+open-source.
+
+For information on how to install or operate DeSmuME for your operating system,
+please see the README file that should be present with your installation.
+
+Port-specific README files:
+ * README.LIN for the Linux port
+ * README.WIN for the Windows port
+ * README.MAC for the Macintosh port
+
+Note that each DeSmuME port may have a different feature set from another port.
+You may see more feature parity between ports over time as we continue
+developing DeSmuME.
+
+You can find our documentation on our online Wiki page. The major pages of
+interest are:
+
+* Official Documentation: http://wiki.desmume.org/index.php?title=Main_Page
+
+This is the main Wiki page that contains all of our official documentation.
+
+* Manuals: http://wiki.desmume.org/index.php?title=Manual
+
+The manuals contain detailed information about how to operate DeSmuME for each
+port.
+
+* FAQ: http://wiki.desmume.org/index.php?title=Faq
+
+The Frequently Asked Questions (FAQ) page has a lot of useful general
+information about DeSmuME. Do note that some of the information may be platform
+specific, and may not directly apply to your version of DeSmuME.
+
+* Build Instructions:
+http://wiki.desmume.org/index.php?title=Installing_DeSmuME_from_source
+
+This page contains detailed port-specific instructions about how to make your
+own build of DeSmuME directly from the source code.
+
+
+2) Credits ____________________________________________________________________
+
+See the AUTHORS file for list of DeSmuME team members.
+
+Special thanks go to:
+
+ * yopyop (original author of DeSmuME),
+ for releasing the source code of this great emulator.
+
+ * Martin Korth (author of GBATEK),
+ for his well-written Gameboy Advance and Nintendo DS documentation.
+
+
+3) Contact Information ________________________________________________________
+
+Official Website: http://desmume.org
+Public Forum: http://forum.desmume.org
+Developer Chat: irc://irc.freenode.net/desmume
+Bug Reports: http://sourceforge.net/tracker/?group_id=164579&atid=832291
+
+Please don't ask for ROMs, BIOS files, or any other copyrighted stuff.
+
+
+4) License ____________________________________________________________________
+
+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 file 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 software. If not, see .
+
+
+ * See the GNU General Public License details in COPYING.
diff --git a/jni/desmume/README.LIN b/jni/desmume/README.LIN
new file mode 100755
index 0000000..e3ea8a0
--- /dev/null
+++ b/jni/desmume/README.LIN
@@ -0,0 +1,177 @@
+ DeSmuME
+ _________________________________________
+ Copyright (C) 2006 yopyop
+ Copyright (C) 2006-2007 DeSmuME team
+
+
+1) Compiling instructions...................................13
+2) How to use DeSmuME.......................................53
+3) Contact information......................................142
+4) Disclaimer...............................................160
+
+
+1 Compiling instructions______________________________________
+
+DeSmuME is written in C using the gtk+ and SDL libraries.
+So you need a working C compiler, such as gcc and
+the above libraries runtime and development packages:
+
+ * http://www.gtk.org
+
+ * http://www.libsdl.org/
+
+Once these libraries are installed, you should be ready to
+install DeSmuME.
+
+DeSmuME provides another interface based on libglade, to use
+it, you'll need glade:
+
+ * http://glade.gnome.org/
+
+1.1 From a release archive____________________________________
+
+Uncompress the DeSmuME archive, move to the newly created
+directory, type "./configure", then "make".
+It will generate three programs:
+1) "desmume" in the "src/gtk" directory;
+2) "desmume-cli" in the "src/cli" directory.
+If glade is installed on your system, you'll get a third
+binary:
+3) "desmume-glade" in the "src/gtk-glade" directory.
+
+You can even type "make install" to install those programs on
+your system (in /usr/local/ by default), then uninstalling is
+done by typing "make uninstall".
+
+1.2 From a CVS copy___________________________________________
+
+Move to the toplevel directory (the one that contains the
+configure.ac file). Type "./autogen.sh" to generate the
+configure/install scripts and needed Makefiles. Then you can follow the
+same procedure as in 1.1 .
+
+2 How to use DeSmuME__________________________________________
+
+There are three versions of DeSmuME under Linux. These are a
+Gtk+ build, a Glade build and a CLI SDL build. All these builds
+have some common command line options:
+
+--disable-limiter Disables the 60 fps limiter
+--soft-convert Use software colour conversion during OpenGL
+ screen rendering. May produce better or worse
+ frame rates depending on hardware.
+
+--arm9gdb=PORT_NUM Enable the ARM9 GDB stub on the given port
+--arm7gdb=PORT_NUM Enable the ARM7 GDB stub on the given port
+
+--cflash=PATH_TO_DISK_IMAGE
+ Enable disk image GBAMP compact flash emulation
+
+--help Display this message
+
+
+NOTE:
+The Gtk+ and Glade builds use gtkGLext to handle the OpenGL
+rendering and contexts. You may get improved performance by
+also passing the argument --gdk-gl-force-indirect. This has
+been seen to improve things for Nvidia based graphics cards
+under Linux.
+
+
+GDB Debugger Stubs:
+Source level debugging of ARM9 and/or ARM7 code is supported
+using a GDB/Insight debugger.
+The GDB stubs are enabled from the command line using the
+following options:
+
+--arm9gdb= (for the ARM9)
+--arm7gdb= (for the ARM7)
+
+The PORT_NUM is the TCP port upon which the stub will listen for
+connections. Once enabled you can connect to the stub using the
+following command at the GDB debugger prompt (assuming GDB and
+DeSmuME are running on the same machine):
+
+target remote :
+
+NOTE: there are problems with the ARM support when stepping code
+with GDB versions prior to version 6.6. It is recommended that
+you use at least version 6.6 if possible.
+
+
+GBAMP compact flash emulation:
+
+The default behaviour of DeSmumME is to attempt to emulate the
+FAT image for the contents of the directory where the running
+.nds file was located.
+This behaviour can be altered using the
+--cflash= command line option. Using this
+option DeSmuME will emulation a GBAMP and read and write sectors
+from/to the disk image file.
+The disk image file must be created and populated with files
+using some external tool.
+NOTE: currently if desmume fails to open the disk image file it
+will silently continue minus a working GBAMP emulation.
+
+
+2.1 Gtk+ version______________________________________________
+
+Type "desmume" in a shell, a window should appear, then open
+a rom file using the "open" button, next use the "run" button
+to start emulation.
+
+The following command line options are specific to the Gtk+
+build:
+
+--opengl-2d Enables using OpenGL for screen rendering
+--disable-sound Disables the sound emulation
+--disable-3d Disables the 3D emulation
+
+
+2.2 CLI SDL version_______________________________________________
+
+Just type "desmume-cli path-to-a-rom" in a shell.
+
+The following command line options are specific to the CLI
+build:
+
+--opengl-2d Enables using OpenGL for screen rendering
+--disable-sound Disables the sound emulation
+
+
+3 Contact information_________________________________________
+
+General inquiries should go to:
+E-mail: guillaume@desmume.org
+
+Linux Port-related inquiries should go to:
+E-mail: guillaume@desmume.org
+
+Web: http://desmume.org
+
+Please don't ask for roms, bios files or any other copyrighted
+stuff.
+
+If you want to submit a bug report, please run desmume, go into
+the "Help" menu, and click on "Submit a bug report". If you're
+having trouble with it, please feel free to email.
+
+
+4 Disclaimer__________________________________________________
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of
+the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be
+useful,but WITHOUT ANY WARRANTY; without even the implied
+warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public
+License along with this program; if not, write to the Free
+Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+MA 02111-1307 USA
+
+See the GNU General Public License details in COPYING.
diff --git a/jni/desmume/README.MAC b/jni/desmume/README.MAC
new file mode 100755
index 0000000..e0af928
--- /dev/null
+++ b/jni/desmume/README.MAC
@@ -0,0 +1,272 @@
+ DeSmuME
+ _________________________________________
+ Copyright (C) 2006 yopyop
+ Copyright (C) 2006-2012 DeSmuME team
+ Last Updated: March 31, 2012
+
+Contents:
+1) System Requirements ..................................................... 15
+2) Quick Start Guide for Using DeSmuME for OS X ............................ 36
+3) Additional Documentation ............................................... 108
+4) Contact Information .................................................... 138
+5) License ................................................................ 257
+
+
+1) System Requirements ________________________________________________________
+
+DeSmuME is a very demanding app, especially for CPU usage. Before you begin,
+make sure that your Mac meets the listed system requirements.
+
+If your Mac meets only the minimum requirements, then you should expect to run
+most simple 2D-only games with some frameskip, but you will be unable to run
+complex 2D games or any 3D-heavy games. However, if your Mac meets the
+recommended requirements, then you should expect to run almost every game,
+including very complex 3D-heavy games, with minimal to no frameskip.
+
+Operating System: OS X v10.5 (Leopard) or later
+
+CPU: Can run on any PowerPC G4, G5, or Intel processor
+ 2.1 GHz Intel Core 2 Duo (minimum)
+ 3.0 GHz Intel Core 2 Duo or faster (recommended)
+
+RAM: 512 MB (minimum)
+ 2 GB (recommended)
+
+
+2) Quick Start Guide for Using DeSmuME for OS X _______________________________
+
+Installing DeSmuME is as easy as copying DeSmuME.app to your Applications
+folder (or other folder of your choice). Double-click the app to start DeSmuME.
+
+Note that DeSmuME for OS X may have a different feature set than DeSmuME for
+Windows and DeSmuME for Linux. As of this writing, some features that are
+present in DeSmuME for Windows are not present in DeSmuME for OS X.
+
+The rest of this section will be a guide to help you quickly get started using
+DeSmuME for OS X.
+
+Loading a ROM and Starting the Emulator:
+Simply double-click the desired ROM from the Finder to play the game. By
+default, DeSmuME will load the ROM and start emulation. Also, there are
+additional ROM loading options that you can change in DeSmuME > Preferences if
+you need them.
+
+Using the DS Controller:
+Each DS controller button can be mapped to a button of your choice on your
+keyboard, gamepad, or joystick. You can view the mappings by clicking on Input
+in DeSmuME > Preferences, and then clicking the Controller tab on the Input
+page. To change a mapping, click on the DS control that you want to change,
+then press the button on your input device to map it.
+
+By default, the DS controller is mapped to the following keys on your keyboard:
+ Up - Up Arrow
+ Down - Down Arrow
+ Left - Left Arrow
+ Right - Right Arrow
+ A Button - X
+ B Button - Z
+ X Button - S
+ Y Button - A
+ L Trigger - Q
+ R Trigger - W
+ Start - Return
+ Select - Tab
+ Lid - Delete (Backspace)
+ Debug - \
+ Microphone - `
+
+Using the DS Touch Pad:
+Touch pad input is emulated using the left mouse button. Simply click in the
+touch pad area of the DS display window to use the DS touch pad.
+
+Rotating the DS Display:
+Some games require that the DS display be at a certain rotation in order to
+look correct. Rotation options can be found by choosing
+View > Display Rotation. You can also use the toolbar buttons Rotate Left and
+Rotate Right to rotate the display by 90 degrees counterclockwise or clockwise,
+respectively.
+
+Freezing and Restoring the Emulation State:
+Save states are a powerful feature that allows you to freeze the emulation
+state and restore it later. However, note that save states are only a
+temporary means of saving -- more permanent saves must be done using the
+in-game save (or ROM save).
+
+- To freeze the emulation state, choose File > Save State File.
+- To restore the emulation state, choose File > Open State File.
+
+You can also freeze/restore emulation states without having to manage the
+Open/Save dialogs. There are ten available save state "slots" that you can
+use to quickly freeze/restore the emulation state.
+
+- To quick freeze the emulation state, choose File > Save State Slot > Slot #.
+ The default hotkey for this is (Shift-#).
+- To quick restore the emulation state, choose File > Load State Slot > Slot #.
+ The default hotkey for this is (#).
+
+
+3) Additional Documentation ___________________________________________________
+
+The quick start guide in this Read Me is by no means a complete reference to
+everything that DeSmuME can do! If you need any additional information about
+DeSmuME, then you can reference our online Wiki pages for up-to-date
+information.
+
+* Official Documentation: http://wiki.desmume.org/index.php?title=Main_Page
+
+This is the main Wiki page that contains all of our official documentation.
+
+* FAQ: http://wiki.desmume.org/index.php?title=Faq
+
+The Frequently Asked Questions (FAQ) page has a lot of useful general
+information about DeSmuME. Do note that some of the information may be platform
+specific, and may not directly apply to the OS X version of DeSmuME.
+
+* DeSmuME Manual for OS X:
+http://wiki.desmume.org/index.php?title=DeSmuME_Manual_for_the_Macintosh_port
+
+This page contains complete and detailed information about how to operate
+DeSmuME for OS X.
+
+* DeSmuME Build Instructions for OS X:
+http://wiki.desmume.org/index.php?title=Installing_DeSmuME_from_source_on_OS_X
+
+This page contains complete and detailed instructions about how to make your
+own build of DeSmuME for OS X directly from the source code.
+
+
+4) Contact Information ________________________________________________________
+
+Thank you for you interest in DeSmuME! If you want to tell us how useful
+DeSmuME is in your life, your love (or hate) of certain NDS games, your passion
+for NDS homebrew development, or anything else related to DeSmuME or NDS
+emulation, then there are various ways for you to contact us!
+
+However, keep in mind that there are a few of rules that you need to follow:
+- Do not ask us to provide ROMs, BIOS files, or any other copyrighted stuff.
+ We don't want to have to deal with any legal issues that could get us in
+ trouble, or worse, completely shut down.
+
+- When contacting us, please use the appropriate means to do it. For example,
+ if you simply want to tell us how much you love or hate us, then use the
+ comments on the official webpage. Another example: If you want to post on the
+ forum, be sure to keep the topic focused on DeSmuME; questions that ask for
+ things like us providing you the latest Pokemon cheats are not DeSmuME
+ related, and we will instead refer you to a Pokemon cheaters forum. Finally,
+ our developer chat channel is intended for furthering the development work of
+ DeSmuME; questions about how to use DeSmuME should not come here, but instead
+ go to the Support forum. In short, use the appropriate contact method. That's
+ why the different methods exist!
+
+* Official Website: http://desmume.org
+
+Our official website has the latest news on DeSmuME releases, and also has a
+lot of other useful information about DeSmuME. You can comment on different
+posts telling us how you feel about DeSmuME. Is DeSmuME the best thing in your
+life? Is it making you cry? Or is it a bunch of blah? Let us know here!
+
+* Public Forum: http://forum.desmume.org
+
+If you have a question about DeSmuME, then this is the place to ask it. But
+before you ask it, be aware that your question may have already been
+answered before, so try the following things first:
+
+- Read the manual and the FAQ. A lot of questions people have are usually
+ already answered in our documentation.
+- Do a forum search about your question.
+
+If you still need to ask a question, then be sure to provide us the following
+information:
+
+- DeSmuME app version
+- Your operating system and OS version
+- The name of the ROM (if a ROM is involved)
+- The serial code of the ROM (if a ROM is involved)
+
+The app version can be found by choosing DeSmuME > About DeSmuME in the DeSmuME
+app. Alternatively, you can select the DeSmuME app in the Finder and choose
+File > Get Info.
+
+You can find your operating system and OS version by choosing About This Mac in
+the Apple menu.
+
+The ROM name and serial can be found by choosing File > ROM Info in the DeSmuME
+application.
+
+It is very important that you provide us with this information! If you don't,
+then it will take much longer for us to respond to your question.
+
+* Live Developer Chat Channel: irc://irc.freenode.net/desmume
+
+We have a live developer chatline on Freenode IRC at #desmume. This channel
+is meant for discussing the development of DeSmuME, and shows the real work
+that goes on behind the scenes. If you are interested in doing any sort of
+software programming, software testing, documentation, or graphics work, then
+please join our chat channel! We would love for you to join us!
+
+* Bug Reports: http://sourceforge.net/tracker/?group_id=164579&atid=832291
+
+If you believe that you have found a bug, you may submit a bug report by
+choosing Help > Submit a Bug Report in the DeSmuME application, or by
+following the above link. This will take you to our bug tracker on SourceForge.
+Do note that you will need a SourceForge account in order to submit a bug
+report.
+
+Bug submissions are very welcome and encouraged. However, when you submit a bug
+to us, you MUST provide the following information, or else your bug submission
+may be rejected:
+
+- DeSmuME app version
+- Your operating system and OS version
+- Your Mac model identifier
+- The name of the running ROM when the bug was observed (or "None", if no ROM
+ was running)
+- The serial code of the running ROM when the bug was observed (or "None", if
+ no ROM was running)
+- A description of the exact behavior you observed
+- A description of the behavior you expected
+
+You can find your Mac model identifier in the System Profiler app. The app is
+located in the Applications/Utilities folder.
+
+When you write your description, make sure that they are as detailed as
+possible. The better your descriptions are, the faster we can test and fix
+bugs.
+
+For example, if you observed a bug in the game Golden Sun: Dark Dawn, then the
+bug report could look something like this:
+
+ App Version: v0.9.8
+ Operating System: OS X v10.6.8
+ Mac Model Identifier: iMac 11,2
+ ROM Name: GOLDENSUN_DD
+ ROM Serial: NTR-BO5E-USA
+ Observed Behavior: I tried to load a save state using the
+ File > Load State > Slot 3 menu option, but the game froze. If I reset, I
+ can get the game working again.
+ Expected Behavior: The game should continue running from the point where I
+ made the save state.
+
+We will try to get your bug tested as soon as possible, but any fixes may take
+longer, depending on the complexity of the bug. Also, some bugs may require us
+to ask you for certain files, such as your ROM saves, save states, or console
+logs. For the above example, we would probably ask you for your save states to
+help us track down the bug.
+
+
+5) License ____________________________________________________________________
+
+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 file 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 software. If not, see .
+
+
+ * See the GNU General Public License details in COPYING.
diff --git a/jni/desmume/README.WIN b/jni/desmume/README.WIN
new file mode 100755
index 0000000..50dc7f4
--- /dev/null
+++ b/jni/desmume/README.WIN
@@ -0,0 +1,1092 @@
+Manual
+From DeSmuME
+Jump to: navigation, search
+Contents
+[hide]
+
+ * 1 DeSmuME Platform Specific Manuals
+ * 2 DeSmuME Common command line arguments
+ o 2.1 --load-slot=NUM [gtk,win]
+ o 2.2 --play-movie=PATH_TO_PLAY_MOVIE [gtk,win]
+ o 2.3 --record-movie=PATH_TO_RECORD_MOVIE [gtk,win]
+ o 2.4 --start-paused=START_PAUSED [gtk,win]
+ o 2.5 --cflash-image=PATH_TO_DISK_IMAGE [gtk,win]
+ o 2.6 --cflash-path=PATH_TO_DISK_DIRECTORY [gtk,win]
+ o 2.7 --bios-arm9=BIOS_ARM9_PATH [gtk,win]
+ o 2.8 --bios-arm7=BIOS_ARM9_PATH [gtk,win]
+ o 2.9 --bios-swi=BIOS_SWI [gtk,win]
+ o 2.10 --num-cores=NUM [win]
+ o 2.11 --scanline-filter-a=NUM [win]
+ o 2.12 --scanline-filter-b=NUM [win]
+ o 2.13 --arm9gdb=PORT_NUM [gtk,win]
+ o 2.14 --arm7gdb=PORT_NUM [gtk,win]
+ o 2.15 -h, --help [gtk,win]
+ o 2.16 --opengl-2d [gtk]
+ o 2.17 --soft-convert [gtk]
+ o 2.18 --3d-engine=ENGINE [gtk]
+ o 2.19 --disable-sound [gtk]
+ o 2.20 --disable-limiter [gtk]
+ o 2.21 --save-type=TYPE [gtk]
+ o 2.22 --fwlang=LANG [gtk]
+ o 2.23 --timeout=SECONDS [gtk]
+ o 2.24 --display=DISPLAY [gtk]
+ o 2.25 -v, --version [gtk]
+
+[edit] DeSmuME Platform Specific Manuals
+
+DeSmuME places responsibility on the developers of each port to expose emulation features in a way that is tuned to the needs of that platform. As a consequence, some ports are able to move well ahead of the others. Conversely, some ports are far behind some others. As a consequence, some behaviours and menu structures are different in each port. Therefore, the decision was made to create separate manuals for each port as well: when a specific port is changed, only the manual for that specific port needs to be altered.
+
+
+
+DeSmuME Manual for the Windows port
+
+DeSmuME Manual for the Linux GTK+ port
+
+DeSmuME Manual for the Linux Glade port
+
+DeSmuME Manual for the Linux command line port
+
+DeSmuME Manual for the Macintosh port
+[edit] DeSmuME Common command line arguments
+
+The GTK+ and windows ports share common command line arguments. We are trying slowly to move over to a common command line handling engine. The commandline arguments for these platforms are described here:
+[edit] --load-slot=NUM [gtk,win]
+
+Loads savegame from slot NUM
+[edit] --play-movie=PATH_TO_PLAY_MOVIE [gtk,win]
+
+Specifies a dsm format movie to play
+[edit] --record-movie=PATH_TO_RECORD_MOVIE [gtk,win]
+
+Specifies a path to a new dsm format movie
+[edit] --start-paused=START_PAUSED [gtk,win]
+
+Indicates that emulation should start paused
+[edit] --cflash-image=PATH_TO_DISK_IMAGE [gtk,win]
+
+Requests cflash in gbaslot with fat image at this path
+[edit] --cflash-path=PATH_TO_DISK_DIRECTORY [gtk,win]
+
+Requests cflash in gbaslot with filesystem rooted at this path
+[edit] --bios-arm9=BIOS_ARM9_PATH [gtk,win]
+
+Specifies a path to an arm9 bios which will be used
+[edit] --bios-arm7=BIOS_ARM9_PATH [gtk,win]
+
+Specifies a path to an arm7 bios which will be used
+[edit] --bios-swi=BIOS_SWI [gtk,win]
+
+Set to 1 to enable the emulation of SWI via the provided bios files, which I hope you have provided with the above options. (default 0)
+[edit] --num-cores=NUM [win]
+
+Overrides the emulator's autodetection for number of processors. Presently, any system with more than one core (this may inadvertantly include singlecore systems with hyperthreading, but I can't test it) will operate with somewhat reduced OSD functionality, with lower quality and no asynchronous composition. In the future, other optimizations will require higher numbers of cores (optimizations for quad-core are planned, but it won't be too impressive)
+[edit] --scanline-filter-a=NUM [win]
+
+Intensity of fadeout for scanlines filter (edge) (default 2)
+[edit] --scanline-filter-b=NUM [win]
+
+Intensity of fadeout for scanlines filter (corner) (default 4)
+[edit] --arm9gdb=PORT_NUM [gtk,win]
+
+Enable the ARM9 GDB stub on the given port
+[edit] --arm7gdb=PORT_NUM [gtk,win]
+
+Enable the ARM7 GDB stub on the given port
+[edit] -h, --help [gtk,win]
+
+Show summary of options.
+[edit] --opengl-2d [gtk]
+
+Enables using OpenGL for screen rendering
+[edit] --soft-convert [gtk]
+
+Use software colour conversion during OpenGL screen rendering. May produce better or worse frame rates depending on hardware.
+[edit] --3d-engine=ENGINE [gtk]
+
+Select available 3d emulation:
+
+ 0 = 3d disabled
+ 1 = internal desmume software rasterizer (default)
+ 2 = osmesa or gtkglext opengl (if available, depending on compilation options, see desmume --help)
+
+[edit] --disable-sound [gtk]
+
+Disables the sound emulation
+[edit] --disable-limiter [gtk]
+
+Disables the 60 fps limiter
+[edit] --save-type=TYPE [gtk]
+
+Select savetype from the following:
+
+ 0 = Autodetect
+ 1 = EEPROM 4kbit
+ 2 = EEPROM 64kbit
+ 3 = EEPROM 512kbit
+ 4 = FRAM 256kbit
+ 5 = FLASH 2mbit
+ 6 = FLASH 4mbit
+
+[edit] --fwlang=LANG [gtk]
+
+Set the language in the firmware, LANG as follows:
+
+ 0 = Japanese
+ 1 = English
+ 2 = French
+ 3 = German
+ 4 = Italian
+ 5 = Spanish
+
+[edit] --timeout=SECONDS [gtk]
+
+Quit desmume after the specified seconds for testing purpose.
+[edit] --display=DISPLAY [gtk]
+
+X display to use.
+[edit] -v, --version [gtk]
+
+Show version of program.
+
+Retrieved from http://wiki.desmume.org/index.php?title=Manual
+This page was last modified on 22 November 2009, at 18:17.
+
+====================================================================
+
+DeSmuME Manual for the Windows port
+From DeSmuME
+Jump to: navigation, search
+
+NOTE: This refers to the 0.9.5 revision of desmume, and may or may not accurately reflect any other revision.
+
+
+Contents
+[hide]
+
+ * 1 Quick Getting Started Guide
+ o 1.1 Menu Layout
+ + 1.1.1 File Menu
+ # 1.1.1.1 File | Open ROM
+ # 1.1.1.2 File | Recent ROM
+ # 1.1.1.3 File | ROM Info
+ # 1.1.1.4 File | Close ROM
+ # 1.1.1.5 File | Save State As...
+ # 1.1.1.6 File | Load State As...
+ # 1.1.1.7 File | Save State
+ # 1.1.1.8 File | Load State
+ # 1.1.1.9 File | Import Backup Memory
+ # 1.1.1.10 File | Export Backup Memory
+ # 1.1.1.11 File | Save Screenshot As...
+ # 1.1.1.12 File | Quick Screenshot
+ # 1.1.1.13 File | Record AVI
+ # 1.1.1.14 File | Stop AVI
+ # 1.1.1.15 File | Record WAV
+ # 1.1.1.16 File | Record Movie
+ # 1.1.1.17 File | Play Movie
+ # 1.1.1.18 File | Stop Movie
+ # 1.1.1.19 File | Lua Scripting | New Lua Script Window
+ # 1.1.1.20 File | Lua Scripting | Close All Script Windows
+ # 1.1.1.21 File | Quit
+ + 1.1.2 Emulation Menu
+ # 1.1.2.1 Emulation | Pause
+ # 1.1.2.2 Emulation | Reset
+ # 1.1.2.3 Emulation | Shut Up
+ # 1.1.2.4 Emulation | GBA Slot
+ # 1.1.2.5 Emulation | Cheats
+ # 1.1.2.6 Emulation | Cheats | List
+ # 1.1.2.7 Emulation | Cheats | Search
+ # 1.1.2.8 Emulation | Cheats | Disable
+ + 1.1.3 View Menu
+ # 1.1.3.1 View | LCDs layout
+ # 1.1.3.2 View | Rotation
+ # 1.1.3.3 View | Window size
+ # 1.1.3.4 View | Window size | Always On Top
+ # 1.1.3.5 View | Screen Separation
+ # 1.1.3.6 View | Screen Separation | White,Gray,Black
+ # 1.1.3.7 View | Screen Separation | Editable via border dragging
+ # 1.1.3.8 View | Render
+ # 1.1.3.9 View | Force Maintain Ratio
+ # 1.1.3.10 View | Display Frame Counter
+ # 1.1.3.11 View | Display FPS
+ # 1.1.3.12 View | Display Input
+ # 1.1.3.13 View | Display Graphical Input
+ # 1.1.3.14 View | Display Lag Counter
+ # 1.1.3.15 View | Display Microphone
+ # 1.1.3.16 View | HUD Editing Mode
+ + 1.1.4 Config Menu
+ # 1.1.4.1 Config | Save Type
+ # 1.1.4.2 Config | 3D Settings
+ # 1.1.4.3 Config | Control Config
+ # 1.1.4.4 Config | Control Config | Allow Left+Rt/Up+Dn
+ # 1.1.4.5 Config | Hotkey Config
+ # 1.1.4.6 Config | Sound Settings
+ # 1.1.4.7 Config | WIFI Settings
+ # 1.1.4.8 Config | Firmware Settings
+ # 1.1.4.9 Config | Emulation Settings
+ # 1.1.4.10 Config | Microphone Settings
+ # 1.1.4.11 Config | Path Settings
+ # 1.1.4.12 Config | Frame Skip
+ # 1.1.4.13 Config | Language
+ # 1.1.4.14 Config | Background Pause
+ # 1.1.4.15 Config | Enable State Rewinding
+ + 1.1.5 Tools Menu
+ # 1.1.5.1 Tools | Disassembler
+ # 1.1.5.2 Tools | View Memory
+ # 1.1.5.3 Tools | View Registers
+ # 1.1.5.4 Tools | View Palette
+ # 1.1.5.5 Tools | View Tiles
+ # 1.1.5.6 Tools | View Maps
+ # 1.1.5.7 Tools | View OAM
+ # 1.1.5.8 Tools | View Matrices
+ # 1.1.5.9 Tools | View Lights
+ # 1.1.5.10 Tools | View Sound State
+ # 1.1.5.11 View | RAM Watch
+ # 1.1.5.12 View | RAM Search
+ # 1.1.5.13 Tools | View Layers
+ + 1.1.6 Help Menu
+ # 1.1.6.1 Help | Website
+ # 1.1.6.2 Help | Forums
+ # 1.1.6.3 Help | Submit a bug report
+ # 1.1.6.4 Help | About
+
+[edit] Quick Getting Started Guide
+
+When you start the emulator for the first time, you probably just want to play a certain game. You can do this by going to 'File' in the menu, and selecting 'Open Rom'. This will open up an explorer window, within which you can browse to the rom (nds file) that you wish to play. Once the game has finished loading (and this should only take a few seconds at most), your game will automatically start running. But if you want, you can also compile from source. See the article Installing DeSmuME from source on Windows for details.
+[edit] Menu Layout
+
+The rest of this manual will be spend on explaining all the other options in the menu.
+
+
+[edit] File Menu
+[edit] File | Open ROM
+
+This option is for loading games. A game is typically called a rom file. Just use the explorer window to browse to the file, and click on open. The game should just load and start. The desmume windows port is also able to load some compressed formats, like zip, rar, and 7z. Just as long as there is a valid game (rom) file in the compressed archive ending with an .nds extension, it should load fine.
+[edit] File | Recent ROM
+
+This menu option contains a list of the roms that you have most recently loaded. You can quickly access a game that way, without having browse to the right directory with the 'Open Rom' option.
+[edit] File | ROM Info
+
+This option offers some information about the internals of the rom file, like name, code, manufacturer, and size. This should not concern the casual gamer, but may come in handy for developers.
+[edit] File | Close ROM
+
+Just ends the current game and leaves the emulator more or less how it was when you first launched it.
+[edit] File | Save State As...
+
+Imagine you have gotten to a certian point in a game, and you need to do something else. The emulator let's you save the current state of the game, so that you can continue the game later at precisely the same point somewhere in the future.
+
+Please note that the use of SAVESTATES is discouraged, as these are likely to break between emulator versions. Instead use SAVE FILES. These are likely to survive between emulator versions. This means that you will have to use save points within the game. SAVE FILES are stored in .dsv files.
+[edit] File | Load State As...
+
+Once you have saved a game's position, or 'state', you can load it again with this option.
+[edit] File | Save State
+
+This option works fairly similair to the 'Save As' option, altough it let's you save numbers instead os specifying a chosen name. Also, All the states saved via this option end up with a pre-determined name of 'game (rom) name'.dsx. So if the game is called MyGame, the first savefile will be called MyGame.ds0, the second one MyGame.ds1, etc.
+[edit] File | Load State
+
+This option let's you load the states that you saved via the 'File | Save State' option
+[edit] File | Import Backup Memory
+
+Backup Memory is the data the game uses to remember its own state. It is stored on the cart in a normal game. Desmume uses the .dsv extension and file format; other formats which can be imported are .duc and raw .sav, as well as no$gba savefiles (also using the .sav extension). People use pro action replays to capture duc files from their card and post it online without using emulators. These are frequently found on gamefaqs.com. See the faq for details on how to use this function, where it has been documented better.
+[edit] File | Export Backup Memory
+
+This lets you export the game's state for use in other Nintendo DS Emulators. It will write a 'raw' sav file or a no$gba savefile.
+[edit] File | Save Screenshot As...
+
+This lets you take a screenshot of the current view of the emulator, and specify it's name to save as a bitmap (.bmp) file.
+[edit] File | Quick Screenshot
+
+This option also dumps a screencapture, but it has a pre-determined filename and location. The name will be based on the name of the rom and somehow sequentially numbered, and placed in the directory specified in the Path Settings.
+[edit] File | Record AVI
+
+This option lets you capture what's going on in the emulator, and save it in an avi file.
+[edit] File | Stop AVI
+
+The 'Record AVI' option continues to record the game, untill you press the 'Stop Avi' option.
+[edit] File | Record WAV
+
+This option lets you capture the sound played in the emulator, and save it in a wav file. In contrast to the other option, this records, as faithfully as possible, the exact emulated audio output (which is not necessarily what you hear), although it will use the interpolation you have specified in the sound config.
+[edit] File | Record Movie
+
+This option lets you record the gameplay in TAS format, see http://tasvideos.org for details on TAS (tool-assisted speedruns).
+[edit] File | Play Movie
+
+This option lets you playback a pre-recorded TAS movie.
+[edit] File | Stop Movie
+
+This options lets you stop a movie which is playing or recording.
+[edit] File | Lua Scripting | New Lua Script Window
+
+Launches a lua scripting dashboard. Reference the FAQ for more information on lua in emulators.
+[edit] File | Lua Scripting | Close All Script Windows
+
+Closes all the lua dashboards.
+[edit] File | Quit
+
+Choosing this option exits the emulator.
+[edit] Emulation Menu
+[edit] Emulation | Pause
+
+This option will pause the emulation, freezing it at the current moment of execution. Selecting it again will resume the execution of the ROM at the exact moment where you paused it.
+[edit] Emulation | Reset
+
+This option will reset the ROM that is currently loaded to the very start of the ROM, just as if you chose 'File | Open Rom' again.
+[edit] Emulation | Shut Up
+
+This option turns off all the currently-running sounds, effectively killing streams and decoded music and voiceovers. Sequenced music and sound effects will continue to play, and when you enter a new area in the game or someone else speaks, the sounds will play again. Use this to Shut Up an annoying sound.
+[edit] Emulation | GBA Slot
+
+This menu option pop-ups a new window, which lets you specirfy what to do with the GBA slot of the Nintendo DS. It has the following choices : NONE, Compact Flash, Rumble Pack, GBA Game, Guitar Grip. Rumble pack allows some games to use vibration. Memory extension... Extends memory, as introduced by the NDS Opera browser. And some DS games can have bonuses, unlockable by GBA cart. For example in Megaman ZX you can fight some Megaman Zero Bosses when correct cartridge is inserted. This is also commonly used by pokemon players for finding some pokemons from older GBA games. There are some GBA slot extensions which are not yet emulated by desmume. Compact Flash is is used for homebrew software emulation, for example that uses DLDI (Dynamically Linked Device Interface). As usual, see the FAQ for more up-to-date information on that.
+[edit] Emulation | Cheats
+
+This option pulls down a drop-down menu, and presents the options list and search. Be aware though, that cheats are sort of half baked right now. If you are not having luck, wait for some news on an improved cheat system. Also, it is impossible yet to use "commercial" codes, such as Action Replay and Codebreaker, so what you'll have to do is manually search for, and alter the memory positions to your advantage. They are called 'raw' or 'internal' cheats. There's an excellent article in the wiki on Using Cheats in DeSmuMe . In post-0.9.2 development builds, there is also the support for Action Replay cheat codes.
+[edit] Emulation | Cheats | List
+
+Choosing 'list' will list all the currently known cheats. Please refer to the article Using Cheats in DeSmuMe for further details on how to use the cheat mechanism in desmume.
+[edit] Emulation | Cheats | Search
+
+Choosing 'search' will let you search for cheats. Please refer to the article Using Cheats in DeSmuMe for further details on how to use the cheat mechanism in desmume.
+[edit] Emulation | Cheats | Disable
+
+Disables the cheat engine, and all active cheats.
+[edit] View Menu
+[edit] View | LCDs layout
+
+This powerful menu controls how the NDS screens will be arranged into the window. Vertical and Horizontal will choose to stack them in the specified manner (vertical being traditional and default and horizontal being wide-screen). One LCD shows just one screen--whichever one is "first" (top) as described below. "Top First" means that the top screen is First and will be displayed on top. "Bottom first" means that the bottom screen is First and will be displayed on top (effectively switching the usual ordering of the screens for this game). "Main screen first" selects the main graphics engine (the one with 3d on it) to consider as first. This option will help you track the action and discard the useless status screen in many games. "Sub screen first" is added for the sake of completeness and you may occasionally find it helpful. Please note that these last two options may not work well in the case of dual screen 3d games, as the screens are always toggling around.
+[edit] View | Rotation
+
+This option will let you rotate the screen a pre-determined amount of degrees clockwise in order to adjust the angle of the display. Some programs require that you normally turn the DS on its side. You can set it up in that manner using this. The options are 0 (no rotation), 90, 180, and 270.
+[edit] View | Window size
+
+This option will let you enlarge the windows a pre-determined size. The resize options are: 1x, 1.5x, 2x, 3x, and 4x the default size. You can also adjust the window size by resizing the window as usual in Windows apps.
+[edit] View | Window size | Always On Top
+
+As featured in media players and IM programs and other emulators, etc., this will prevent other apps from displaying on top of desmume.
+[edit] View | Screen Separation
+
+This option controls how far the two windows should be apart of each other, in other words: how big the border between them should be. Valid choices are: None (which is the default), narrow border (which is slightly larger), DS (which is about the same amount of room there is on a real Nintendo DS).
+[edit] View | Screen Separation | White,Gray,Black
+
+Changes the colour of the gap. Savvy users may discover that they can edit this in the ini file to be any color they want.
+[edit] View | Screen Separation | Editable via border dragging
+
+When enabled, you can pick any gap size you want by dragging the bottom edge (not a corner) of the main window.
+[edit] View | Render
+
+These options will apply different resizing filters to the emulator screen display.
+[edit] View | Force Maintain Ratio
+
+Here you can choose, when re-sizing the windows, if you wan to maintain the ratio of the windows. Sometimes when the window size is changed it doesn't look correct on the screen. This option forces the window to maintain a correct ratio so it looks correct.
+[edit] View | Display Frame Counter
+
+Selecting this option will display the emulation frame number. This way you can tell how long you have been playing the game. It is also useful for timestamping emulation events (for example, you can tell if you made it out of a level faster than last time)
+[edit] View | Display FPS
+
+Selecting this option causes the 'frames-per-second' (or 'fps', for short) to be displayed. It also displays an additional '3D' counter, which tells how frequently the game is updating its 3d graphics. But unlike the fps counter, the 3d counter has nothing to do with the power of your system. If it is low, then the game is running slow on a retail cart, and so it runs slow in an emulator. The last number in parentheses is the arm9 load average, which indicates how hard the emulated CPU is working. This has nothing to do with the power of your system either.
+[edit] View | Display Input
+
+Selecting this option displays the emulated input that the emulator is recognizing and sending to the game software.
+[edit] View | Display Graphical Input
+
+Same as Display Input but it is a super-spiffy graphical version.
+[edit] View | Display Lag Counter
+
+This option displays the lag counter, which records frames where the game does not poll input.
+[edit] View | Display Microphone
+
+This option is somewhat less exciting than it sounds, but it displays some numbers which may help you diagnose whether your microphone is hooked up correctly.
+[edit] View | HUD Editing Mode
+
+This option will let you drag around hud elements to pick their position.
+[edit] Config Menu
+[edit] Config | Save Type
+
+This option lets you specify the save type of a particular game. The default is 'automatic'. However, this is not fail-safe in all cases, so you might need to manually select one of the other savetypes. You may also need to set this before important a savefile from some other source, as they do not always contain sufficient information to guess the correct size.
+[edit] Config | 3D Settings
+
+This option lets you select the method that is used to draw the screen. You can choose between OpenGL (hardware accelerated) or SoftRasterizer (desmume's custom-crafted software renderer). Note that however hardware accelerated it may be, oftentimes SoftRasterizer will run faster.
+
+Furthermore, you have three toggles for SoftRasterizer:
+
+ * Unrealistically High-Precision Color Interpolation - this affects how material colors get handled when polygons are clipped.
+ * Enable Edge Marking / Enable Fog - Using these you can prohibit emulation of these hardware features to gain a minor speedup.
+
+Desmume 0.9.4 had an option called "Alternate Flush Mode" which fixed some games with flickering graphics, but this was removed in 0.9.5.
+[edit] Config | Control Config
+
+This option lets you configure keyboard keys or a joystick. The joystick support is implemented using a DirectInput control interface.
+
+Here are the default control mappings (they may be subject to change):
+
+ Up arrow - Up
+ Left arrow - Left
+ Down arrow - Down
+ Right arrow - Right
+ x - A button
+ z - B button
+ s - X button
+ a - Y button
+ q - Left Trigger
+ w - Right Trigger
+ Enter - Start button
+ Right Shift - Select button
+ Backspace - Lid fold/unfold
+
+[edit] Config | Control Config | Allow Left+Rt/Up+Dn
+
+It is nearly impossible on an actual console to press left and right at the same time. You may accidentally (or on purpose!) be glitching games by sending input they did not expect if you enable this option. Most casual users can emulate the hardware better by leaving this unchecked.
+[edit] Config | Hotkey Config
+
+This menu option lets you define keys, that can be used to quickly select other options without having to go through the entire menu structure. Some examples are a hotkey for 'pause', or a hotkey for loading a specific savestate.
+
+Here are the default hotkey mappings (they may be subject to change):
+
+ n - Frame advance
+ Space - Pause/Unpause
+ p - Load current state
+ 1,2,3,4,5,6,7,8,9,0 - Select current state
+ F1-F10 - Load relevant state
+ Shift+F1-F10 - Save relevant state
+
+[edit] Config | Sound Settings
+
+This option lets you configure the way sound is generated.
+The sync/async modes and sync methods give you different output:
+
+ * Dual sync/async: the traditional mode, which generates more sound when the game slows down. Gives clear sound in most cases but can cause streamed sounds to be garbled sometimes.
+ * Sync: always generates the same amount of sound, and uses one of the three available methods to compensate for too low or too high framerates. This mode shouldn't make streamed sounds garbled.
+ o Sync method 'N': created by Nitsuja. Basically stretches the sound. Sounds like No$GBA (without the crackling).
+ o Sync method 'Z': created by Zeromus. Stretches the sound to compensate for slowdowns, and resamples it to compensate for too high framerates. That resampling causes latency and can behave weird sometimes.
+ o Sync method 'P': taken from SPU2-X, an SPU2 plugin for PCSX2. Stretches the sound intelligently, giving clear sound in most cases, but also latency.
+
+
+The sound core setting allows you to choose between the DirectX sound core and the dummy one which produces no sound. The WAV write core has been removed since the new "Record WAV" option made it useless.
+The buffer size setting should be kept to its original value. However, if your sound isn't clear even at 60 fps, you can try increasing it.
+The interpolation setting allows you to choose between three interpolation methods:
+
+ * None: Fast, but may sound bad.
+ * Linear: typical, sounds good
+ * Cosine: maybe slower than linear, but doesn't sound much better
+
+Note that the DS has no interpolation method. While sometimes interpolation can make a noticeable improvement, it can also be unnoticeable or distort some sounds.
+
+The ADPCM caching has been removed. It was needed due to a bug in ADPCM decoding which has been fixed. If you are still using 0.9.4, then enabling this can speed up some games while breaking the sound in others.
+[edit] Config | WIFI Settings
+
+WIFI support is currently under heavy development, but it is not useful yet. Therefore, you may find this option missing, or simply 'greyed-out' for now. Even if you can fiddle with it, it won't do anything useful.
+[edit] Config | Firmware Settings
+
+This option provides you with the same set of options that a real Nintendo DS firmware does. The most important here is the language, because multi-lingual games will often look at how this option is set.
+[edit] Config | Emulation Settings
+
+These options let you boot from the extracted BIOS and Firmware of a real Nintendo DS. unless you have extracted/downloaded the firmware or bios from a Nintendo DS that you actually own yourself, these settings have no value for you as desmume does not generally require them to run correctly. Occasionally, however, a game may require them in order to work.
+[edit] Config | Microphone Settings
+
+You can choose one of four modes. The first will attempt to use the windows default recording device (it is up to you to make your microphone take this role) and feed its input to the emulator. This works, but not perfectly, and it suffers from some unresolved conceptual issues, similar in nature to the emulator audio synchronization problem. The remainder of the options are triggered when using the mic hotkey. You can "Use internal noise sample" which works for many games that want you to blow on the mic; you can "Use rand() whitenoise" which will work for games that require blowing, but which don't work with the internal noise sample (note that this is NONDETERMINISTIC and not tas-safe); and finally you can supply your own microphone sample, which may be noise, or your nintendog's name, or any other thing. It has even been tested with bangai-o spirits level loading. This must be an 8bit mono pcm wav file.
+[edit] Config | Path Settings
+
+Use this dialog to configure the default paths for roms, savestates, screenshots, etc. Some people like everything in one directory and some people like using 50 directories; you can have it your way.
+[edit] Config | Frame Skip
+
+The first option, "Limit framerate" engages the throttler and prohibits the emulator from running more than 60fps. With this disabled, a fast computer may run the game doubly or triply fast.
+
+The fixed skip options allow you to specify how many frames should be skipped, constantly. It is generally safe to choose 1 or 2 if you don't mind a slightly choppier game, in order to get a speedup. You may get accustomed to the degraded game performance and not notice. Note, however, that frameskipping can sometimes entirely fail in dual-screen 3d games or games that use capture.
+
+The auto skip options will try engaging the frameskipping when the emulator is running slow, to keep the game from slowing down, but render all the frames when possible to maintain 60fps. This can make a game look sort of like a modern console 3d game which slows down when the action gets intense or too much of the world is visible.
+
+Note that you can use the fast-forward hotkey to engage a special mode which disables the throttler and skips some large number of frames in order to run the game as quickly as possible. This may help you speed through cutscenes or other slow grinding in games and is easier to use than constantly fiddling with these menu options.
+[edit] Config | Language
+
+This lets you set the language the emulator displays its menus and options in. This won't change everything in the emulator, as due to the way it is coded, some things aren't translateable through this system, and it may very well be the case that your desired translation is incomplete.
+[edit] Config | Background Pause
+
+Selecting this option will pause the emulation whenever you put desmume in the background, or the window loses focus.
+[edit] Config | Enable State Rewinding
+
+This is a bit of an experimental option which will suck up a ton of your cpu power taking secret savestates every 0.25 seconds or so. With this enabled, the use of a rewind hotkey will permit you to rewind time a little bit in case you die.
+[edit] Tools Menu
+[edit] Tools | Disassembler
+
+This option displays the ARM9 and ARM7 disassembler. Be aware though, that the windows are drawn exactly on top of each other, so that you have to move (drag n drop) the first windows before the second window shows.
+[edit] Tools | View Memory
+
+This tool displays the ARM7 and ARM9 memory. Be aware though, that the windows are drawn exactly on top of each other, so that you have to move (drag n drop) the first windows before the second window shows.
+
+The "View mode" radio buttons allow you to choose how the memory will be shown:
+
+ * 8-bit : shows the memory as bytes
+ * 16-bit : shows the memory as words
+ * 32-bit : shows the memory as dwords
+
+The "View address" textbox and button allow you to jump to a different address:
+
+ * Enter an hexadecimal address without 0x prefix, with up to 8 digits
+ * Click "Go" to jump to the entered address
+
+The "View dump" buttons allow you to dump the current view:
+
+ * Text dump : dumps the view to a text file, in an human-readable form
+ * Raw dump : dumps the memory directly to a binary file which can be read with an hex editor
+
+Note that if you dump memory to a file already containing (a) dump(s), the new dump will be appended to the existing one(s).
+
+The scrollbar... well, you surely know how a scrollbar works.
+
+The viewers additionally allow to edit the memory. For it, click on the value you want to edit, then type the new value. The new value is applied only once you've entirely entered it.
+[edit] Tools | View Registers
+
+This option lets you view the ARM7 and ARM9 I/O registers.
+[edit] Tools | View Palette
+
+This option lets you view the palette in detail.
+[edit] Tools | View Tiles
+
+This option lets you view the tiles in detail.
+[edit] Tools | View Maps
+
+This option lets you view the maps in detail.
+[edit] Tools | View OAM
+
+This option lets you view the OAM layer in detail.
+[edit] Tools | View Matrices
+
+This option lets you view the matrices in detail.
+[edit] Tools | View Lights
+
+This option lets you view the lights in detail.
+[edit] Tools | View Sound State
+
+This option displays the sound output.
+[edit] View | RAM Watch
+
+This option will pop-up a new window, with extensive and advanced features to watch the emulated RAM memory.
+[edit] View | RAM Search
+
+This option will pop-up a new window, with extensive and advanced features to search through the emulated RAM memory.
+[edit] Tools | View Layers
+
+This option lets you toggle BG layer visibility one by one. You can also toggle the rendering for an entire GPU engine, which can help your framerate in games where one screen is pointless.
+[edit] Help Menu
+[edit] Help | Website
+
+This option directs your browser to the desmume homepage.
+[edit] Help | Forums
+
+This option directs your browser to the desmume forums.
+[edit] Help | Submit a bug report
+
+This option directs your browser to the SourceForge bugtracker for desmume.
+[edit] Help | About
+
+This option displays the authors of the emulator.
+
+Retrieved from "http://wiki.desmume.org/index.php?title=DeSmuME_Manual_for_the_Windows_port"
+This page was last modified on 22 November 2009, at 22:09.
+
+====================================================================
+
+Faq
+From DeSmuME
+Jump to: navigation, search
+
+DesMuMe FAQ
+
+This FAQ holds a list of many commonly asked questions about DeSmuME.
+
+If the FAQ is unable to answer any questions you have, then please make sure that you also consult the manual. If this doesn't help, either, post your question on the forums.
+Contents
+[hide]
+
+ * 1 Release 0.9.4 Topics
+ o 1.1 Using old DeSmuME save files in 0.9.4
+ o 1.2 What is this NOSSE and dev stuff? / Why does desmume.exe crash when it loads? / Which EXE do I use?
+ * 2 Savegames and Savestates
+ o 2.1 Why does this game fail to save? / I get the error "Data could not be accessed. Turn off the power and reinsert the DS card." or "Unable to write data. Please turn off the power and reinsert the game card."
+ o 2.2 Why was the save file format and extension changed from .sav to .dsv ?
+ o 2.3 Can I use my save states across versions?
+ o 2.4 Can I convert an ideas or no$gba nocash .sav savefile to DeSmuME .dsv?
+ o 2.5 How do I make Pokemon saves?
+ o 2.6 Why can't Pokemon save after beating the elite 4?
+ * 3 Wi-Fi and WFC
+ o 3.1 Does DeSmuME support wifi?
+ o 3.2 Why do I get an assert in wifi.cpp which keeps me from playing a game?
+ o 3.3 If DeSmuME doesn't support wifi, then why does it make my firewall alert since 0.9.2?
+ o 3.4 Why did my build come with winpcap.dll? / Why do I get crashes when I run DeSmuME on vista which mention something about winpcap?
+ o 3.5 What is WFC / Nintendo WiFi Connection?
+ * 4 Troubleshooting and Errors
+ o 4.1 Help! My desmume window disappeared! Maybe I can hear sound and it is in the taskbar but I can't see the window
+ o 4.2 Does Scribblenauts work?
+ o 4.3 How do I use external BIOS files or firmware?
+ o 4.4 Why does my touch screen not work? Oh yes you did read my mind, I was using external firmware
+ o 4.5 I have a gameplay related question
+ o 4.6 Why doesn't my DeSmuME play this game?
+ o 4.7 Why doesn't my game boot or progress into the main game engine?
+ o 4.8 Why does the emulator take a long time to start up and/or devastate my system or unarchiver when I run it?
+ o 4.9 Why doesn't OpenGL 3D work in Linux?
+ o 4.10 Why doesn't OpenGL 3D work in windows?
+ o 4.11 My display is incorrect or corrupted or something is missing
+ o 4.12 My display has flickering graphics in a certain game
+ o 4.13 Why does music and FMV sound bad/distorted sometimes?
+ * 5 Performance
+ o 5.1 Why is the emulator slow?
+ o 5.2 Does DeSmuME make use of multiple CPU's or multiple cores?
+ o 5.3 In 0.9.4, what does the number/percentage in the DeSmuME title bar mean
+ o 5.4 In 0.9.5, what does the percentage in the FPS display mean
+ o 5.5 Why are there Two/Numbers in the FPS display?
+ * 6 Using The Emulator
+ o 6.1 What are the minimum hardware requirements for DeSmuME ?
+ o 6.2 What are the recommended hardware requirements for DeSmuME?
+ o 6.3 It is hard to zoom in on a widescreen display due to the unusual aspect ratio of the DS
+ o 6.4 But will you please add screen splitting / window tearing apart / fullscreen modes?
+ o 6.5 How do I enter 'cheat codes' in DeSmuME?
+ o 6.6 I entered a 'cheat code', and now the emulator freezes.
+ o 6.7 Does DeSmuME support the microphone?
+ o 6.8 Does the 'GBA slot' option let me play GBA games?
+ o 6.9 How do I "Close the DS"?
+ o 6.10 How do I use the stylus (pen) to 'touch' the screen?
+ o 6.11 How can I touch two points on the screen at once, as required by Hotel Dusk?
+ * 7 General Questions
+ o 7.1 What does DeSmuME emulate and on what systems?
+ o 7.2 What does DeSmuME mean?
+ o 7.3 Under what license is DeSmuME distributed ?
+ o 7.4 Can I freely copy DeSmuME ?
+ o 7.5 Where can I report bugs?
+ o 7.6 Can I attach files to bug reports I did not create myself ?
+ o 7.7 What is 'TAS' ?
+ o 7.8 What hardware features are emulated?
+ o 7.9 Does the GDB stub still work?
+ o 7.10 How do I enable the GDB stub on the Windows port ?
+ o 7.11 Does compact flash works?
+ o 7.12 Where/what is IRC?
+ o 7.13 Where is the manual?
+ o 7.14 Where is release 0.9.3?
+ o 7.15 What is DLDI?
+ o 7.16 How can I post a save file or AVI capture on the DeSmuME forum?
+ o 7.17 How can I record an AVI with a gap between the screens?
+ o 7.18 How can I post a large log or other text file on the DeSmuME IRC chat room?
+ o 7.19 What are the origins of DeSmuME?
+ * 8 SVN and Compiling
+ o 8.1 Why doesn't the DeSmuME team release pre-build SVN binaries ?
+ o 8.2 How do I get the latest svn code and build DeSmuME myself?
+ o 8.3 What is 'SVN' ?
+ o 8.4 What compilers are supported for building DeSmuME from source?
+ o 8.5 I'm Compiling using MSVC Express On Windows, and I get the error : "ml.exe" not found.
+ * 9 Development and Technical Questions
+ o 9.1 I have a patch, modification or other code addition
+ o 9.2 I'm a developer, and would like to contribute to the codebase. What can I do?
+ o 9.3 Im not a developer, but would like to help out anyway. What can I do?
+ o 9.4 What is this Lua stuff I see?
+ o 9.5 How do I easily capture the ASM code for troubleshooting purposes?
+ o 9.6 Where can I find technical details on the Nintendo DS and GBA?
+ * 10 Mac Users
+ o 10.1 Why can't I find a Mac binary?
+ o 10.2 Why does my Mac binary say something about being unsupported?
+ o 10.3 Why doesn't a menu option or tool exist in my Linux or Mac build?
+
+[edit] Release 0.9.4 Topics
+[edit] Using old DeSmuME save files in 0.9.4
+
+DeSmuME will first try to load a dsv file. If the dsv is missing, it will try to load a sav and then it will immediately dump the dsv. The conversion process is supposed to be seamless.
+[edit] What is this NOSSE and dev stuff? / Why does desmume.exe crash when it loads? / Which EXE do I use?
+
+Use dev if you are a developer and want the gdb stub. Use nosse if the regular exe crashes for you because you are on an old computer. desmume.exe uses some SSE2 optimizations for 3D matrix calculations which have been disabled in desmume_nosse.exe. Any modern Intel CPU (AMD or intel) will support SSE2.
+[edit] Savegames and Savestates
+[edit] Why does this game fail to save? / I get the error "Data could not be accessed. Turn off the power and reinsert the DS card." or "Unable to write data. Please turn off the power and reinsert the game card."
+
+Until version 0.9.4 DeSmuME's save size autodetection was poor. With 0.9.4, autodetection should work almost all the time. In fact, here is the entire list of games we currently know of that fail to autodetect correctly:
+
+ * Spider-Man 3 (should be autodetect_size=1, detected as 3)
+ * Over The Hedge (should be autodetect_size=1, detected as 3; same failure mechanism)
+
+If you find any other game for which automatic savetype detection does not work, please let the developers know by posting on the forum or submitting a bug. If you want to fix it yourself, you may need to manually specify the correct save type for your game. Consult the manual for details on how to do this for your platform. You may also consult http://www.advanscene.com/ to easily identify the save type for your game.
+[edit] Why was the save file format and extension changed from .sav to .dsv ?
+
+Because it is better now. These raw save files that everyone uses aren't good enough and were causing problems with autodetection. See our bug tracker or forum for more details; the dsv format has been documented in the svn source tree as dsv.txt and if you don't like the degree of interoperability with other emulators, then go tell the other emulators to support our format.
+[edit] Can I use my save states across versions?
+
+Maybe, maybe not. Due to constant internal changes in DeSmuME, it is possible that a save state created with one version may not work with another version of DeSmuME. Savestate compatibility is preserved wherever possible, but it is not always possible. Please note that for easily confused gamers, the use of SAVESTATES is discouraged, as these are likely to break between emulator versions. Instead use SAVE FILES. These are likely to survive between emulator versions. This means that you will have to use save points within the game. SAVE FILES are stored in .dsv files. Also, see this article for further details : Savefile or savestate
+[edit] Can I convert an ideas or no$gba nocash .sav savefile to DeSmuME .dsv?
+
+1. Convert the save file using http://shunyweb.info/convert.php ; the target format should be "Acekard RPG | EZFlash V | RAW Format [Autodetection] (.sav)" 2. Load the game. Let it get to the main menu 3. Select the correct backup size*, as specified by advanscene.com (which is not always right, by the way) 4. Use File > Import Backup Memory and pick the converted save file 5. Reset the game
+
+ * Step 3 is not always necessary, if you are smart, however, it will never hurt to do it.
+
+[edit] How do I make Pokemon saves?
+
+Update to 0.9.4, which ensures the save type is detected automatically and correctly.
+[edit] Why can't Pokemon save after beating the elite 4?
+
+Your save file is 9KB. It should be 513KB. Your save file is broken due to you never having established the right savefile size. That means you made it all the way through the game without saving and then testing it by loading (which would not have worked, if you had tried it). See the above discussion for why that was a very bad idea. In 0.9.5+ or post-0.9.4 svn or 0.9.4+ rr builds you may see an option in the savetypes menu called FORCE AS CURRENT which, when used after picking the correct pokemon savefile size (4mbit) will hopefully permit subsequent saves to create a correct savefile.
+
+
+In order to do that youll have to load your savestate first. If you have been using 0.9.4, since savestate compatibility between versions is not warranted, and definitely won't work between 0.9.4 and 0.9.5, you'll have to use Gocha's 0.9.4+ build which is located at http://tasvideos.org/forum/viewtopic.php?p=210670 which will be able to load an 0.9.4 savestate.
+
+
+These instructions were not explicit enough for one user. In an effort to tailor this information to the intellectual capacity of the audience for this question, I will paste the instructions which apparently were simple enough for him to follow: go to the faq. follow the link to gocha's build. download gocha's build. load the savestate. set the size (4Mbit). use force as current. save the game. exit the emulator and verify that you can load the game from the savefile. if you can, then load it and play through to complete the game.
+[edit] Wi-Fi and WFC
+[edit] Does DeSmuME support wifi?
+
+Wifi is not supported. It is currently under slow and incomplete development. Therefore, you may find this option missing, or simply 'greyed-out' for now. Also, since WIFI support does not work yet, don't ask any questions about it's functioning because it still is unfinished and does not work yet. Furthermore, current development activities focus mainly on the Windows build.
+[edit] Why do I get an assert in wifi.cpp which keeps me from playing a game?
+
+This was a glitch in 0.9.2 release which was fixed in 0.9.4.
+[edit] If DeSmuME doesn't support wifi, then why does it make my firewall alert since 0.9.2?
+
+Your firewall is stupid, or winsock is stupid, (I am not sure which yet) for alerting just when winsock gets initialized. The emulator hasnt actually tried to connect to the internet yet. How could it? There isn't any wifi. All we are doing is some network initialization code. For those of you who are still not satisfied, then I will admit that there is actually some wifi code--but it doesn't actually do anything yet! Except alert your firewall. Sorry. Also, maybe that is actually a good, unobtrusive time for firewalls to alert. But I am not sorry for calling them stupid. They are hyperactive crybabies.
+[edit] Why did my build come with winpcap.dll? / Why do I get crashes when I run DeSmuME on vista which mention something about winpcap?
+
+Because you are running an unofficial build, from dubious origins, made by unknown people. The DeSmuME team cannot support builds it did not create itself. Therefore, you are advised to stop using unofficial builds, as you can expect no support from the DeSmuME team or on the DeSmuME forums. Only use builds you downloaded from the DeSmuME website.
+[edit] What is WFC / Nintendo WiFi Connection?
+
+See the article Nintendo wifi config utility for more information.
+[edit] Troubleshooting and Errors
+[edit] Help! My desmume window disappeared! Maybe I can hear sound and it is in the taskbar but I can't see the window
+
+Delete your ini file. This is caused by exiting the app while you have executed win+d show desktop mode. Desmume tries to remember the window position, but windows implements show desktop by setting the window position to something like x=-32000 and so that gets saved. There is supposed to be some code to handle that case, but I guess it is not working well. This is a problem in many windows apps and this solution will usually fix it. If you don't want to lose all the other settings in your ini file, poke around in it and find the offending items which should look like this:
+
+[Video]
+Window Size=0
+Window width=0
+Window height=0
+WindowPosX=-32000
+WindowPosY=-32000
+
+Delete the -32000 items
+[edit] Does Scribblenauts work?
+
+It works in 0.9.4 but you must use external bios files and "emulate swi's with bios images". Speaking of work, it has come to my attention that several people worked for some years making this game. If that means anything to you people.
+[edit] How do I use external BIOS files or firmware?
+
+Config > emulation settings and supply the path. Do not ask us for BIOS files as we don't have them. It is only my psychic skills which enable me to know that this fixes Scribblenauts.
+
+Since the menu option doesn't exist in the OS X port, it is impossible to play scribblenauts on it.
+
+Like to MAC/OSX port, the Linux port(s) don't allow you to use external BIOS or Firmware files either.
+[edit] Why does my touch screen not work? Oh yes you did read my mind, I was using external firmware
+
+It's a bug. It is not a high priority since nobody yet has proven that they actually need the external firmware. If there was a way around it, I wouldve just told you.
+[edit] I have a gameplay related question
+
+Please check a site like http://www.gamefaqs.com, and don't post gameplay related questions on the forum or IRC *unless* you believe there is a bug in the emulation of DeSmuME.
+[edit] Why doesn't my DeSmuME play this game?
+
+Go to desmume.org and make sure you are using the latest version. The latest version is 0.9.4. Hint: DeSmuME 0.8 and 0.3.4 are very old, being numbers smaller than the latest version. Older versions will not be supported, under any circumstances.
+[edit] Why doesn't my game boot or progress into the main game engine?
+
+DeSmuME is not perfect yet. Some games may fail due to wifi emulation. You might find ways to patch the games to work better on emulators by searching on the internet, but that is not something you should seek help with on the DeSmuME forums. If it really doesn't boot up, you can submit a bug report for the game on the sourceforge bugtracker.
+[edit] Why does the emulator take a long time to start up and/or devastate my system or unarchiver when I run it?
+
+This is a problem with the DeSmuME 0.9.2 that some people impolitely distribute themselves. Redownload 0.9.2 from sourceforge.net or get a newer version. It isn't a virus or anything, it is a bug in the application that can just bring a system to its knees. It tries to allocate 1GB of virtual memory. This also crashes or freezes some virus scanners (I've seen it on AVG).
+[edit] Why doesn't OpenGL 3D work in Linux?
+
+Blame NVIDIA and ATI for putting out shoddy and/or closed source drivers. Then switch to software rasterizer.
+[edit] Why doesn't OpenGL 3D work in windows?
+
+You are probably using an ATI video card. ATI driver support of OpenGL is known to be poor. NVIDIA cards have a much more robust support of OpenGL, so getting one of those will help. Alternatively, you can switch to software rasterizer.
+[edit] My display is incorrect or corrupted or something is missing
+
+Try switching the 3D Renderer from OpenGL or SoftRasterizer, or vice versa, to see if that resolves the bug. In Windows, the default hotkey to do this quickly is numpad minus.
+[edit] My display has flickering graphics in a certain game
+
+In the 0.9.4 Windows port, you can choose 'Alternate Flush Mode' in the 'Config | 3D Settings' menu. This fixes some games with flickering graphics. This option is no longer necessary in 0.9.5. If you still have flickering graphics, find the discussion about frameskipping in this doc (try turning it off.)
+[edit] Why does music and FMV sound bad/distorted sometimes?
+
+Most DS music is sequenced music, loaded from the cart entirely when the level loads. This works mostly fine, but bonus points for you if your ears are good enough to spot the bugs. Your music that doesn't work well at all is probably streaming music, which loads from the cart on the fly and goes straight to the speakers, and possibly decoded along the way. This includes FMVs. This is much harder to emulate as it requires correct timing, which is not one of DeSmuME's strengths right now. At any rate, in 0.9.5 support for a synchronized SPU was added for the windows builds which can be optionally enabled to make these streaming sounds work correctly. Synchronizing audio is a hard problem to solve, and we're not finished solving it. The synchronous SPU comes with some other issues, which is why it is optional. Also available, if you are using the windows build, is a command from the menu Emulation > Shut Up to make the offending music go away.
+[edit] Performance
+[edit] Why is the emulator slow?
+
+Because nobody pays us to work on it full time and it runs fast enough for us to be happy. Well, almost.
+
+New releases may always be a step backwards in some (or many) cases from earlier releases in terms of speed. There is a delicate balance between compatibility and speed and sometimes one advances further than the other. At any rate, we have introduced a few speed hacks and toggles which you may find helpful:
+
+ * (0.9.4) If you are in Windows, make sure you're not using the NOSSE build. That one is slower.
+ * (0.9.5) If you are in Windows, try using the SSE2 build. It may be a little faster.
+ * (0.9.5) If you are in linux, try making a build with SSE and SSE2 extensions enabled because the code is ready to handle it. Someone should provide details on how to do this.
+ * If you are using someone else's unofficial "SVN" build, it probably is not fully optimized, since we make our Windows releases using some profiler-guided optimization, which helps by several FPS. For all I know, they are also carriers of viruses, and lately they tend to crash on Vista.
+ * If you can handle it, turn off the sound.
+ * Use frame skip. Even frameskipping by 1 will help and many games will stay playable. Frameskipping is continually tweaked in each release to get more bang for the buck, but beware that dual screen 3d games still may not work well under frameskip. If screens seem stuck, pick a different frameskip value.
+ * (0.9.4+) In the sound options, set interpolation to none which should help a little bit.
+ * (0.9.4 only) Turn on the sound option "ADPCM Caching"; this is new and experimental, and will break some things, but it should offer a substantial speedup in some cases.
+ * (0.9.5+) Use dual/asynch SPU mode -- even if you turn off the sound. Try alternate synch methods if you must use synch spu mode.
+ * (0.9.4+) There is now the option of disabling an entire screen. (Tools > View Layers > Main GPU, etc) Consider disabling a screen which is useless in the game you are playing.
+ * Try the software rasterizer. In many cases, especially games which make only light use of the 3d hardware, this will actually run faster, by as many as 10 FPS. But it might also run slower, again, by as many as 10 FPS.
+ * (0.9.5+) If you are using the software rasterizer, disable edge marking and fog if you feel like they aren't needed. If the game isn't using those features then this won't help.
+ * Buying a newer, faster computer is somewhat more expensive, but it has other side benefits.
+ * A faster CPU is more helpful than a bleeding edge graphics card. DeSmuME is more CPU intensive than it is GPU intensive. It just needs a graphics card that is glitch-free, and currently the NVIDIA cards have a better track record. A newer graphics card has a slim possibility of increasing speed.
+ * The cheapest way to get 60fps is to buy the cart. You may find that this is not enough, and you need to buy a console as well. Here are some steps that have worked well for me in the past:
+ o Look for neighbors that are mowing their own lawns. Ask them if they would like for you to do it instead.
+ o Borrow your daddy's lawn mower and mow the neighbor's lawn.
+ o After this, they will generally give you cash. As you repeat the above steps, this cash can accumulate to large values.
+ o Once the accumulated cash is sufficient, it can be taken to a merchant where it can be exchanged for games and consoles.
+ * My lawn needs mowing. It wont make your game run any faster if you mow it for me, but I am less likely to get evicted, which would be bad for my productivity.
+
+[edit] Does DeSmuME make use of multiple CPU's or multiple cores?
+
+Currently, the Windows port has two particular multicore optimizations (in 0.9.5+): first, the display logic runs in its own thread independent from the emulator. This is used to make the OSD run frame-rate independent from emulation. This thread performs color conversion, filtering, and directdraw presentation. The net result is a speedup by a few FPS. This codepath is disabled on single core systems, and may be disabled forcefully by the user with the --num-cores=1 command line argument. Second, the software rasterizer will run in a SLI mode using as many cores as you have specified (or have been detected) up to four. Still, DeSmuMe benefits MUCH more from a single CPU with a higher GHz than from multiple cores or from multiple CPUs.
+[edit] In 0.9.4, what does the number/percentage in the DeSmuME title bar mean
+
+ * For the Windows port, the percentage is the emulated ARM9 CPU load average. The CPU in an actual Nintendo DS is an ARM9 CPU. The percentage shows us how busy the emulated CPU is. This number isnt really for you. You are far too curious. But go ahead and brag about how emulated games run at 99% on your system, it makes us laugh.
+ * For the Linux GTK and Glade ports, it's frames per second (fps).
+
+[edit] In 0.9.5, what does the percentage in the FPS display mean
+
+See above, it was moved here to save 915 million people from asking what it means in the title bar.
+[edit] Why are there Two/Numbers in the FPS display?
+
+The first is your actual FPS which is how fast the emu is running on your system. If it is less than 60 then you need speed hacks or more a more powerful CPU. The second is the 3d FPS, which is a rough gauge of how fast the game is supposed to be running. If you are seeing 60/15 then the game will feel slow because it is sloppily coded but theres NOTHING YOU CAN DO ABOUT IT short of turning off speed throttling and playing at 100fps.
+[edit] Using The Emulator
+[edit] What are the minimum hardware requirements for DeSmuME ?
+
+From a purely technical viewpoint, there are no minimum requirements. However, for 'real-world' playable speeds, you would need at least the following :
+
+ * Windows OS: Windows XP or Vista
+ * Linux OS: Any recent Linux distribution with a 2.6 kernel.
+ * 2 GHz Processor
+ * 512 MB Available System Memory
+ * Available Hard Drive Space: A few MB for the emulator
+ * 128 MB 3D Video Card (Nvidia GeForce 6800 or better), ATI cards are not recommended.
+ * Optional: Sound Card, if you want sound support
+ * Optional: Microphone, if you wish to make use the Windows Microphone feature
+
+[edit] What are the recommended hardware requirements for DeSmuME?
+
+From a purely technical viewpoint, there are no recommended requirements. However, for 'real-world' playable speeds, the following gives you good performance:
+
+ * Windows OS: Windows XP or Vista
+ * Linux OS: Any recent Linux distribution with a 2.6 kernel.
+ * 3 GHz Processor
+ * 1 GB Available System Memory
+ * Available Hard Drive Space: A few MB for DeSmuME, 100MB or so for a bunch of savestates and savefiles.
+ * 512 MB 3D Video Card (Nvidia GeForce), ATI cards are not recommended.
+ * Sound Card.
+ * Microphone.
+
+In general, the more GHz, the better. The faster memory, the better. DeSmuME 0.9.4 won't benefit from multiple cores. DeSmuME is at the moment, unfortunately, slower than no$gba.
+[edit] It is hard to zoom in on a widescreen display due to the unusual aspect ratio of the DS
+
+In fact it is hard to zoom in on a 4:3 screen, too. In 0.9.5, you can configure the screens to be side-by-side, so maybe this will make you happy. Additionally you can choose to display only one screen. I don't think anyone wants to add tear-apart windows, though.
+[edit] But will you please add screen splitting / window tearing apart / fullscreen modes?
+
+You think youre the first person to have thought of this? The answer is no. Of all the things in the world to code, we hate this the most.
+[edit] How do I enter 'cheat codes' in DeSmuME?
+
+As of 0.9.4, there are two types of cheat codes: Action Replay and 'raw' or 'internal' cheats. The 'raw' or 'internal' cheats include cheat-finding facilities where you may manually search for and alter the memory positions which work to your advantage. There's an excellent article on 'raw' or 'internal' cheats in the wiki on Using Cheats in DeSmuMe . For Action Replay Cheats, You can find codes for the NTSC games at http://us.codejunkies.com/Departments/DS-and-GBA.aspx and for the PAL at http://uk.codejunkies.com/Departments/DS-and-GBA.aspx.
+[edit] I entered a 'cheat code', and now the emulator freezes.
+
+Most likely it's a problem from the (Action Replay) cheat code you used. Using codes modify the game and can make it crash/freeze if it comes to an unexpected situation. It just depends on the code you use and what it's used for in the game. Find the .dct file in your emulator's folder that matches the game's filename, and then erase it to solve the 'freezing' problem.
+[edit] Does DeSmuME support the microphone?
+
+Yes, but only on the Windows and GNU/Linux ports. You do need to have an actual microphone attached to your PC, though. In 0.9.2 the microphone in Windows really only works for noise, but this was fixed in 0.9.4; it was fixed even further in 0.9.5. Linux support will exist in 0.9.5+ -- please note that it requires libasound.
+
+When in windows, if it seems that the microphone is not working, bear in mind that it has no idea what kind of how many microphones you have. You will need to use the windows control panel to specify the correct microphone as the default audio input device, and then make sure in the recording level properties (volume control) that it is selected and at an appropriate volume.
+[edit] Does the 'GBA slot' option let me play GBA games?
+
+No. A 'real' DS can use the gba slot to play gba games, but DeSmuME does not emulate this. But a 'real' DS can also use the gba slot to access gba roms and sram so that ds games can import savefiles, and that part is emulated by DeSmuME. (please note that in 0.9.4 this is reportedly buggy for some games, including pokemon; this is supposed to have been fixed in 0.9.5) If you are looking for a Game Boy Advance (GBA) emulator, perhaps you can try mednafen or VisualBoy Advance.
+[edit] How do I "Close the DS"?
+
+This can be done using the 'lid' command or BACKSPACE key (this can be changed in the control configuration).
+[edit] How do I use the stylus (pen) to 'touch' the screen?
+
+You can use your mouse to emulate the stylus. Move the mouse cursor to the desired position, and then press the left mouse button in order to 'touch' the screen at the position the mouse cursor is located. Yes, we have really been asked this question before.
+[edit] How can I touch two points on the screen at once, as required by Hotel Dusk?
+
+One user got past this by first switching on one of the switches, then pausing the game, and sort of switching on an imaginary switch in the middle of the two switches while manipulating the frame advance hotkey. See, gbatek says that when two points are touched, that the hardware appears as if the average of the two points is actually pressed. But the game expects you to touch them at not-exactly-the-same-time.
+[edit] General Questions
+[edit] What does DeSmuME emulate and on what systems?
+
+DeSmuME attempts to emulate, as faithfully as possible, the Nintendo DS and Nintendo DS Lite handheld game consoles (NDS). It currently runs on Windows, Linux, and mac OSX. DSi is not supported.
+[edit] What does DeSmuME mean?
+
+DeSmuME is a Nintendo DS emulator and the name is a play of words - DS Emu + ME (like FlashMe - firmware hack and PassMe mod-chip for DS) The name DeSmuME derives from the popular use of ME in Nintendo DS products by homebrew developers. So DeSmuME would equal DSemuMe. Other popular uses of ME include:
+
+ * LoadMe - a generic patcher for commercial DS roms that works with any GBA Flash Card
+ * PassMe - "mod-chip" using which takes authentication from an original DS card an allows execution of unauthenticated DS rom code - from the GBA cartridge slot / GBA flash card.
+ * FlashMe - a hacked firmware for DS that allows you to start code in DS mode from a flash card in the GBA slot.
+ * WifiMe - are a set of a custom drivers and software by FireFly for RALink based wireless network cards enabling to boot homebrew code on DS via Nintendo Wireless Multiboot method.
+
+Its name is derived from emu which is short for emulator, DS and me. It's possibly supposed to mean "DS emulator for me".
+[edit] Under what license is DeSmuME distributed ?
+
+DeSmuME is distributed under the GNU General Public License, or GPL: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+[edit] Can I freely copy DeSmuME ?
+
+Yes you can, as long as you adhere to the license as specified in the GNU GPL.
+[edit] Where can I report bugs?
+
+In the official bug tracker. Feel free to post to the bug tracker as long as you are willing to take ownership of testing that bug and letting the developers know when it is resolved to your satisfaction. Just don't submit a bug report and run. You may also request features around the same location, too, but in the other trackers.
+[edit] Can I attach files to bug reports I did not create myself ?
+
+SourceForge likes for folks to only respond on items they submit. If you see a ticket that represents something you are encountering, SourceForge doesn't necessarily want you commenting on that. The reasoning for this given by SourceForge is that they feel it is best to open your own ticket, which helps appreciate the extent of issues in many cases. The authors of DeSmuME may or may not agree with this point of view from SourceForge.
+[edit] What is 'TAS' ?
+
+TAS lets you record the gameplay in TAS format, see http://tasvideos.org for details on TAS (tool-assisted speedruns).
+[edit] What hardware features are emulated?
+
+ * All known 2D graphics features are correct. Mosaics work but are imperfect. There may be small issues with colors as the correct color bit depths are not used at all points in the pipeline.
+
+ * All 3D features are emulated, except the following: wireframes and antialising. In 0.9.5, support for fog is added, as well as edge marking which mostly-works but is not perfect. In 0.9.5 the box test was significantly improved (dare I say perfected?) which fixed a number of games. The OpenGL engine is near its limit and renders some things incorrectly. Eventually the software rasterizer will support more features and be far more precise in the basic features. Both engines have trouble with some shadows, but software rasterizer is better. Software rasterizer has some noticeable texturing issues right now, especially in 2d games. Software rasterizer supports more correct lighting interpolation than opengl ever will (e.g. glitches at the edge of the screen while scrolling.) In software rasterizer, there are issues similar to 2d with incorrect bit depth being used in the pipeline. There are unfavorable edge conditions in each renderer; in OpenGL, textures tend to get overdrawn; in software rasterizer, edges of textures tend to be jittery (like the real DS)
+
+One last thing -- if buttons and labels and menus rendering on the 3d screen are obscured (for example, a button but no label is on it) then you may need to use the software rasterizer. Or you may need to use OpenGL instead. Each renderer has strengths and weaknesses, which is why both are provided.
+
+ * All sound features are emulated. The microphone support is new and the manual should be consulted, where you will find out, among other things, that it is only supported in windows right now.
+
+ * Wifi is not supported. It is currently under slow and incomplete development. Therefore, you may find this option missing, or simply 'greyed-out' for now. Also, since WIFI support does not work yet, please don't ask any questions regarding it, because it still is unfinished and does not work yet.
+
+ * We are unaware of any outstanding issues in the core system hardware (CPU, DMA, MMU) but there are certainly still some. The instruction and memory timings are quite incorrect; however, this seems not to hurt most titles.
+
+ * DLDI - Dynamically Linked Driver Interface, commonly known as DLDI, is a driver framework that allows NDS and GBA homebrew to easily read and write to any number of different devices, just by substituting a driver file. The MPCF driver (GBA MoviePlayer CF-version) is the only one that is supported, so you will need to install it into your application before using it in desmume. You will find that a directory or fat image must be mounted via the commandline or UI for the "gbaslot" configuration. Right now, our codebase really only has libfat support for SLOT-2 devices and CF devices so more thorough support for other DLDI drivers is unlikely at this time.
+
+ * RTC (real-time clock) works; If it didn't, then the time in your games stays at 00:00:00, and your random number values always come up the same.
+
+[edit] Does the GDB stub still work?
+
+It seems as if it works in 0.9.4, tested with the Insight GDB variant on windows with a recent devKitPro. This support has been compiled into the dev+ build.
+[edit] How do I enable the GDB stub on the Windows port ?
+
+Add #define GDB_STUB to src/windows/userconfig/userconfig.h which you have created according to the instructions in src/windows/defaultconfig/userconfig.h ; sorry for this confusing system, but that's how it is for now.
+[edit] Does compact flash works?
+
+In 0.9.2+ it works, somewhat buggily, at least for directory scanning (i.e. not fat16 image) in windows via the gba slot. There is a bug that breaks it in linux, which has been fixed for 0.9.5+ along with some other work on that system.
+[edit] Where/what is IRC?
+
+IRC is an on-line communication system.
+
+data you need:
+
+ * server: irc.freenode.net
+ * port: 6667
+ * channel: #desmume
+
+what to use:
+
+ * mIRC - Windows
+ * ChatZilla - FireFox add-on
+ * xchat - X
+ * plenty other, see wikipedia
+
+Language:
+
+ * Most of the people on the channel speak, or try to speak the English language.
+
+[edit] Where is the manual?
+
+A manual for DeSmuME is over at http://wiki.desmume.org/index.php?title=Manual. It may not have the information that other entries in this FAQ promised that it would.
+[edit] Where is release 0.9.3?
+
+Who cares? 0.9.4 is out now. DeSmuME 0.9.3 does not exist. It was sneaked out of our staging area. It has bugs, which is why we hadn't released it yet. So we decided not to release it at all. Any release claiming to be 0.9.3 won't be supported.
+[edit] What is DLDI?
+
+DLDI is a patching system for homebrew ROMs using libfat which makes DS homebrew much easier to write and much more user friendly. As you may know, there are many various flash cartridges for DS. These 'flashcarts' use different hardware, so to make a program run on all cards, youd have to write support for each and every card into the program. But no-one needs support for any other cards than their own. So a libfat developer, chism, developed DLDI. The program itself knows nothing about the hardware. However, when a DLDI patch is applied, libfat can use this patch to know how to write to the flashcart. So, if one user has an M3 flashcart, and downloads a program, they could patch it with the M3 DLDI patch and the program would work with it. Then, another user with a Supercart could download it, apply the Supercard DLDI patch, and it would work on their flashcart, too. The same patch should let the flashcart work with any libfat based program.
+[edit] How can I post a save file or AVI capture on the DeSmuME forum?
+
+After you created it, you can upload it to a free external service provider like MediaFire (http://www.mediafire.com/), and then put the provided links to the page in the message you post on the forum.
+[edit] How can I record an AVI with a gap between the screens?
+
+Learn how to use virtualdub and avisynth. Then use the following avisynth script which we have developed for this purpose:
+
+####configuration####
+gap = 64
+#color = $aaaaaa
+#color = $000000
+color = $ffffff
+##################
+A = AviSource("c:\ds.avi", pixel_type="RGB32")
+B = AviSource("c:\ds.avi", pixel_type="RGB32")
+C = blankclip(fps=A.FrameRate, width=256, height=192+gap+192, color=color, length=A.FrameCount)
+A = A.crop(0,0,256,192)
+B = B.crop(0,192,256,192)
+D = overlay(C,A)
+D = overlay(D,B,0,192+gap)
+return AudioDub(D,A)
+
+We really don't want to put any smarts into the desmume avi dumper, preferring to do it with avisynth instead. It is a slippery slope, as there are about 50 things that people want avi dumpers to do and theyre better off learning how to do it outside the emu with other tools. To that end, if you have any particular needs regarding this do not hesitate to post in our forum and maybe we'll help you make a new avisynth script.
+[edit] How can I post a large log or other text file on the DeSmuME IRC chat room?
+
+Make use of an external text storage site, such as 'pastebin' (http://pastebin.com/), and post the url to it on the IRC channel.
+[edit] What are the origins of DeSmuME?
+
+DeSmuME is a freeware emulator for the Nintendo DS originally created by YopYop156. The original website was http://yopyop156.ifrance.com
+
+Due to change in French laws regarding emulation YopYop decided to stop development of DeSmuME. However, he released the source under the GPL, and other programmers have picked it up and kept it under active development.
+
+Yopyop said:
+
+ Its release under GPL. I have just removed the new 3D engine because its too much bugged. Hopefully it will be helpful for some of you.
+
+
+The latest statement heard from yopyop was:
+
+ DeSmuME project is over.
+ You may dont know but there are a new law in France that could put me in big trouble.
+ With DeSmuME, I have closed the doors of game company but I can not offer to pay for it.
+
+ The worst thing is that I have found the bad coded instructions.
+ For those how have download the sources you have to look in sbc, rsbc instructions the Carry flag updating is wrong.
+ Sorry for the home brew programmers.
+
+ For the illegality the demonstration seemed to me convincing thus without proof clarify I prefer to stick to this decision.
+
+ It is also the fact that few people seem interested by the project. Put besides some people who sent demonstrations to me which did not go, I received only malls to wonder to make function such or such plays or to ask me why moved is in French .
+ Thus I will not do something of useless and illegal.
+
+ For the site it would not obstruct me if there were not the bond on the left which does nothing but add to confusion on the goal of the project.
+
+ And for the sources it is the same problem as for the project.
+
+ good week end
+
+ yopyop
+
+ edit the law relates to the royalties and the rights close, not?
+
+[edit] SVN and Compiling
+[edit] Why doesn't the DeSmuME team release pre-build SVN binaries ?
+
+Because the DeSmuME team doesn't have trusted people to make the builds, and don't want to get involved on builds that could include whatever the author wants. Every newbie coder could do a version that, after 10 minutes of gameplay, for example, starts corrupting stuff from the hard disk. Also, anyone incapable of building it's own builds, probably isn't very helpful for submitting bug reports or helping the development team on SVN releases, so there isn't much point on them getting a SVN build.
+[edit] How do I get the latest svn code and build DeSmuME myself?
+
+Please check out the instructions related to your platform, over at Installing DeSmuME from source
+[edit] What is 'SVN' ?
+
+svn is a developers tool. It's used to let multiple developers work on the same codebase without conflicts. If youre an end-user, don't worry about it. And if you're a developer, see the question on how to get the latest svn code and build DeSmuME yourself. See wikipedia for more info
+[edit] What compilers are supported for building DeSmuME from source?
+
+ * At the moment, for Windows Microsoft Visual C++ 2005 and 2008 are the only supported compilers. Dev-C++ is not supported. Microsoft's Visual C++ Express is free to install and use, so there's no reason not to use it.
+ * For Linux, any recent version of GCC and toolchain should work.
+
+[edit] I'm Compiling using MSVC Express On Windows, and I get the error : "ml.exe" not found.
+
+ml.exe was not included in earlier downloads of MSVC++ 2008 Express Edition. Uninstall, redownload and install again. 'ml.exe' shoud be located in the "Microsoft Visual Studio 9.0\VC\bin" directory.
+[edit] Development and Technical Questions
+[edit] I have a patch, modification or other code addition
+
+Please add them to the appropriate sourceforge tracker. Patches go to the 'Patches' tracker : http://sourceforge.net/tracker/?group_id=164579&atid=832293
+[edit] I'm a developer, and would like to contribute to the codebase. What can I do?
+
+To start you off in the right direction, the best thing you can do is join the developer team on IRC and discuss your intentions with the developers.
+[edit] Im not a developer, but would like to help out anyway. What can I do?
+
+The most helpful thing you can do is use DeSmuME, learn its ins and outs, and learn how to compile svn builds. Then monitor it for regressions and report bugs. You can patrol the bug tracker for bugs which could use elucidation or which, based on your awareness of how the emulator is changing, might be fixed without us having specifically addressed the bug. Basically, be a super user. And hang out on irc. Also, adding to or perfecting the documentation in the wiki is useful. You could also watch for and answer questions placed on the DeSmuME forum.
+[edit] What is this Lua stuff I see?
+
+It is sort of a macro language for interacting with the running game software. Here is an example of it working with an NES game in another emulator, and youtubing for "fceux lua" should suffice to explain it if you don't get the picture from this url: http://www.youtube.com/watch?v=1XNTjVScm_8
+[edit] How do I easily capture the ASM code for troubleshooting purposes?
+
+Savestate during the problem or just before your problem occurs, and #define WANTASMLISTING in armcpu.cpp. Recompile. Then redirect stdout to a file. I know it isn't easy but its what we have for now.
+
+A newer, and possibly better way, is to search for LOG_ARM9 in ndssystem.cpp and uncomment it. You will also need to trigger the condition for logging by setting dolog=true. Beware that this is very verbose, and can dump around 100MBytes of logs per frame.
+[edit] Where can I find technical details on the Nintendo DS and GBA?
+
+http://nocash.emubase.de/gbatek.htm
+[edit] Mac Users
+[edit] Why can't I find a Mac binary?
+
+Maybe we haven't made it yet. There aren't a lot of people willing to compile Mac software. Just to be sure, go to https://sourceforge.net/project/showfiles.php?group_id=164579&package_id=186413
+[edit] Why does my Mac binary say something about being unsupported?
+
+You have probably downloaded the i386 version of DeSmuME for MAC, and are running on the PPC platform (or the other way around). Please verify if you're running on Intel (i386) hardware, or on PPC (G4, G5) hardware, and download the appropriate binary.
+[edit] Why doesn't a menu option or tool exist in my Linux or Mac build?
+
+Because making portable tools and platform harnesses are not our cup of tea and so a developer puts a feature into whichever ports he cares about. This policy is never going to change, although some features might migrate to other platforms over time. Better check the manual.
+
+Retrieved from "http://wiki.desmume.org/index.php?title=Faq"
+This page was last modified on 21 November 2009, at 21:55.
diff --git a/jni/desmume/aclocal.m4 b/jni/desmume/aclocal.m4
new file mode 100755
index 0000000..08229c8
--- /dev/null
+++ b/jni/desmume/aclocal.m4
@@ -0,0 +1,1856 @@
+# generated automatically by aclocal 1.11.5 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003,2004 Red Hat, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+#
+# Macro to add for using GNU gettext.
+# Ulrich Drepper , 1995, 1996
+#
+# Modified to never use included libintl.
+# Owen Taylor , 12/15/1998
+#
+# Major rework to remove unused code
+# Owen Taylor , 12/11/2002
+#
+# Added better handling of ALL_LINGUAS from GNU gettext version
+# written by Bruno Haible, Owen Taylor 5/30/3002
+#
+# Modified to require ngettext
+# Matthias Clasen 08/06/2004
+#
+# We need this here as well, since someone might use autoconf-2.5x
+# to configure GLib then an older version to configure a package
+# using AM_GLIB_GNU_GETTEXT
+AC_PREREQ(2.53)
+
+dnl
+dnl We go to great lengths to make sure that aclocal won't
+dnl try to pull in the installed version of these macros
+dnl when running aclocal in the glib directory.
+dnl
+m4_copy([AC_DEFUN],[glib_DEFUN])
+m4_copy([AC_REQUIRE],[glib_REQUIRE])
+dnl
+dnl At the end, if we're not within glib, we'll define the public
+dnl definitions in terms of our private definitions.
+dnl
+
+# GLIB_LC_MESSAGES
+#--------------------
+glib_DEFUN([GLIB_LC_MESSAGES],
+ [AC_CHECK_HEADERS([locale.h])
+ if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include ], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your file defines LC_MESSAGES.])
+ fi
+ fi])
+
+# GLIB_PATH_PROG_WITH_TEST
+#----------------------------
+dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# GLIB_WITH_NLS
+#-----------------
+glib_DEFUN([GLIB_WITH_NLS],
+ dnl NLS is obligatory
+ [USE_NLS=yes
+ AC_SUBST(USE_NLS)
+
+ gt_cv_have_gettext=no
+
+ CATOBJEXT=NONE
+ XGETTEXT=:
+ INTLLIBS=
+
+ AC_CHECK_HEADER(libintl.h,
+ [gt_cv_func_dgettext_libintl="no"
+ libintl_extra_libs=""
+
+ #
+ # First check in libc
+ #
+ AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
+ [AC_TRY_LINK([
+#include
+],
+ [return !ngettext ("","", 1)],
+ gt_cv_func_ngettext_libc=yes,
+ gt_cv_func_ngettext_libc=no)
+ ])
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
+ [AC_TRY_LINK([
+#include
+],
+ [return !dgettext ("","")],
+ gt_cv_func_dgettext_libc=yes,
+ gt_cv_func_dgettext_libc=no)
+ ])
+ fi
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
+ fi
+
+ #
+ # If we don't have everything we want, check in libintl
+ #
+ if test "$gt_cv_func_dgettext_libc" != "yes" \
+ || test "$gt_cv_func_ngettext_libc" != "yes" \
+ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CHECK_LIB(intl, ngettext,
+ [AC_CHECK_LIB(intl, dgettext,
+ gt_cv_func_dgettext_libintl=yes)])])
+
+ if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+ AC_MSG_CHECKING([if -liconv is needed to use gettext])
+ AC_MSG_RESULT([])
+ AC_CHECK_LIB(intl, ngettext,
+ [AC_CHECK_LIB(intl, dcgettext,
+ [gt_cv_func_dgettext_libintl=yes
+ libintl_extra_libs=-liconv],
+ :,-liconv)],
+ :,-liconv)
+ fi
+
+ #
+ # If we found libintl, then check in it for bind_textdomain_codeset();
+ # we'll prefer libc if neither have bind_textdomain_codeset(),
+ # and both have dgettext and ngettext
+ #
+ if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS -lintl $libintl_extra_libs"
+ unset ac_cv_func_bind_textdomain_codeset
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
+ LIBS="$glib_save_LIBS"
+
+ if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+ gt_cv_func_dgettext_libc=no
+ else
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ && test "$gt_cv_func_ngettext_libc" = "yes"; then
+ gt_cv_func_dgettext_libintl=no
+ fi
+ fi
+ fi
+ fi
+
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ || test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ gt_cv_have_gettext=yes
+ fi
+
+ if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ INTLLIBS="-lintl $libintl_extra_libs"
+ fi
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT,1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS $INTLLIBS"
+ AC_CHECK_FUNCS(dcgettext)
+ MSGFMT_OPTS=
+ AC_MSG_CHECKING([if msgfmt accepts -c])
+ GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test \n"
+"Language-Team: C \n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
+ AC_SUBST(MSGFMT_OPTS)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [case $host in
+ *-*-solaris*)
+ dnl On Solaris, if bind_textdomain_codeset is in libc,
+ dnl GNU format message catalog is always supported,
+ dnl since both are added to the libc all together.
+ dnl Hence, we'd like to go with DATADIRNAME=share and
+ dnl and CATOBJEXT=.gmo in this case.
+ AC_CHECK_FUNC(bind_textdomain_codeset,
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ ;;
+ *-*-openbsd*)
+ CATOBJEXT=.mo
+ DATADIRNAME=share
+ ;;
+ *)
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+ ;;
+ esac])
+ LIBS="$glib_save_LIBS"
+ INSTOBJEXT=.mo
+ else
+ gt_cv_have_gettext=no
+ fi
+ fi
+ ])
+
+ if test "$gt_cv_have_gettext" = "yes" ; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [always defined to indicate that i18n is enabled])
+ fi
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is not GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.ac.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(PO_IN_DATADIR_TRUE)
+ AC_SUBST(PO_IN_DATADIR_FALSE)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+# AM_GLIB_GNU_GETTEXT
+# -------------------
+# Do checks necessary for use of gettext. If a suitable implementation
+# of gettext is found in either in libintl or in the C library,
+# it will set INTLLIBS to the libraries needed for use of gettext
+# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
+# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
+# on various variables needed by the Makefile.in.in installed by
+# glib-gettextize.
+dnl
+glib_DEFUN([GLIB_GNU_GETTEXT],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+
+ GLIB_LC_MESSAGES
+ GLIB_WITH_NLS
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+ fi
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile.
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ ])
+
+# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+# -------------------------------
+# Define VARIABLE to the location where catalog files will
+# be installed by po/Makefile.
+glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
+[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
+glib_save_prefix="$prefix"
+glib_save_exec_prefix="$exec_prefix"
+glib_save_datarootdir="$datarootdir"
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+datarootdir=`eval echo "${datarootdir}"`
+if test "x$CATOBJEXT" = "x.mo" ; then
+ localedir=`eval echo "${libdir}/locale"`
+else
+ localedir=`eval echo "${datadir}/locale"`
+fi
+prefix="$glib_save_prefix"
+exec_prefix="$glib_save_exec_prefix"
+datarootdir="$glib_save_datarootdir"
+AC_DEFINE_UNQUOTED($1, "$localedir",
+ [Define the location where the catalogs will be installed])
+])
+
+dnl
+dnl Now the definitions that aclocal will find
+dnl
+ifdef(glib_configure_ac,[],[
+AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
+AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
+])dnl
+
+# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
+#
+# Create a temporary file with TEST-FILE as its contents and pass the
+# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
+# 0 and perform ACTION-IF-FAIL for any other exit status.
+AC_DEFUN([GLIB_RUN_PROG],
+[cat >conftest.foo <<_ACEOF
+$2
+_ACEOF
+if AC_RUN_LOG([$1 conftest.foo]); then
+ m4_ifval([$3], [$3], [:])
+m4_ifvaln([$4], [else $4])dnl
+echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
+sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
+fi])
+
+
+
+dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
+# serial 42 IT_PROG_INTLTOOL
+AC_DEFUN([IT_PROG_INTLTOOL], [
+AC_PREREQ([2.50])dnl
+AC_REQUIRE([AM_NLS])dnl
+
+case "$am__api_version" in
+ 1.[01234])
+ AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
+ ;;
+ *)
+ ;;
+esac
+
+INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+if test -n "$1"; then
+ AC_MSG_CHECKING([for intltool >= $1])
+ AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
+ test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+ AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
+fi
+
+AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
+AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
+AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+ AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
+fi
+
+if test -z "$AM_DEFAULT_VERBOSITY"; then
+ AM_DEFAULT_VERBOSITY=1
+fi
+AC_SUBST([AM_DEFAULT_VERBOSITY])
+
+INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
+INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
+INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
+AC_SUBST(INTLTOOL_V_MERGE)
+AC_SUBST(INTLTOOL__v_MERGE_)
+AC_SUBST(INTLTOOL__v_MERGE_0)
+
+INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
+intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
+intltool__v_merge_options_0='-q'
+AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
+AC_SUBST(intltool__v_merge_options_)
+AC_SUBST(intltool__v_merge_options_0)
+
+ INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
+ INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
+ INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
+else
+ INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
+fi
+ INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+ INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
+
+_IT_SUBST(INTLTOOL_DESKTOP_RULE)
+_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
+_IT_SUBST(INTLTOOL_KEYS_RULE)
+_IT_SUBST(INTLTOOL_PROP_RULE)
+_IT_SUBST(INTLTOOL_OAF_RULE)
+_IT_SUBST(INTLTOOL_PONG_RULE)
+_IT_SUBST(INTLTOOL_SERVER_RULE)
+_IT_SUBST(INTLTOOL_SHEET_RULE)
+_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
+_IT_SUBST(INTLTOOL_UI_RULE)
+_IT_SUBST(INTLTOOL_XAM_RULE)
+_IT_SUBST(INTLTOOL_KBD_RULE)
+_IT_SUBST(INTLTOOL_XML_RULE)
+_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
+_IT_SUBST(INTLTOOL_CAVES_RULE)
+_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
+_IT_SUBST(INTLTOOL_THEME_RULE)
+_IT_SUBST(INTLTOOL_SERVICE_RULE)
+_IT_SUBST(INTLTOOL_POLICY_RULE)
+
+# Check the gettext tools to make sure they are GNU
+AC_PATH_PROG(XGETTEXT, xgettext)
+AC_PATH_PROG(MSGMERGE, msgmerge)
+AC_PATH_PROG(MSGFMT, msgfmt)
+AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+ AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+ AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+
+AC_PATH_PROG(INTLTOOL_PERL, perl)
+if test -z "$INTLTOOL_PERL"; then
+ AC_MSG_ERROR([perl not found])
+fi
+AC_MSG_CHECKING([for perl >= 5.8.1])
+$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
+if test $? -ne 0; then
+ AC_MSG_ERROR([perl 5.8.1 is required for intltool])
+else
+ IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
+ AC_MSG_RESULT([$IT_PERL_VERSION])
+fi
+if test "x$2" != "xno-xml"; then
+ AC_MSG_CHECKING([for XML::Parser])
+ if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_ERROR([XML::Parser perl module is required for intltool])
+ fi
+fi
+
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
+AC_SUBST(ALL_LINGUAS)
+
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]],
+ [[extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr]])],
+ [DATADIRNAME=share],
+ [case $host in
+ *-*-solaris*)
+ dnl On Solaris, if bind_textdomain_codeset is in libc,
+ dnl GNU format message catalog is always supported,
+ dnl since both are added to the libc all together.
+ dnl Hence, we'd like to go with DATADIRNAME=share
+ dnl in this case.
+ AC_CHECK_FUNC(bind_textdomain_codeset,
+ [DATADIRNAME=share], [DATADIRNAME=lib])
+ ;;
+ *)
+ [DATADIRNAME=lib]
+ ;;
+ esac])
+fi
+AC_SUBST(DATADIRNAME)
+
+IT_PO_SUBDIR([po])
+
+])
+
+
+# IT_PO_SUBDIR(DIRNAME)
+# ---------------------
+# All po subdirs have to be declared with this macro; the subdir "po" is
+# declared by IT_PROG_INTLTOOL.
+#
+AC_DEFUN([IT_PO_SUBDIR],
+[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
+dnl
+dnl The following CONFIG_COMMANDS should be executed at the very end
+dnl of config.status.
+AC_CONFIG_COMMANDS_PRE([
+ AC_CONFIG_COMMANDS([$1/stamp-it], [
+ if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
+ AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
+ fi
+ rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
+ >"$1/stamp-it.tmp"
+ [sed '/^#/d
+ s/^[[].*] *//
+ /^[ ]*$/d
+ '"s|^| $ac_top_srcdir/|" \
+ "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
+ ]
+ [sed '/^POTFILES =/,/[^\\]$/ {
+ /^POTFILES =/!d
+ r $1/POTFILES
+ }
+ ' "$1/Makefile.in" >"$1/Makefile"]
+ rm -f "$1/Makefile.tmp"
+ mv "$1/stamp-it.tmp" "$1/stamp-it"
+ ])
+])dnl
+])
+
+# _IT_SUBST(VARIABLE)
+# -------------------
+# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
+#
+AC_DEFUN([_IT_SUBST],
+[
+AC_SUBST([$1])
+m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
+]
+)
+
+# deprecated macros
+AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
+# A hint is needed for aclocal from Automake <= 1.9.4:
+# AC_DEFUN([AC_PROG_INTLTOOL], ...)
+
+
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper , 1995-2000.
+dnl Bruno Haible , 2000-2003.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE([nls],
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT([$USE_NLS])
+ AC_SUBST([USE_NLS])
+])
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+#
+# Copyright Š 2004 Scott James Remnant .
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# 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.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see .])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 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 1
+
+# 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.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.5], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.5])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 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 1
+
+# 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, 2006, 2008
+# 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 9
+
+# 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])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+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, 2006, 2009,
+# 2010, 2011 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
+
+# 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], UPC, [depcc="$UPC" am_compiler_list=],
+ [$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'.
+ rm -rf conftest.dir
+ 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
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ 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
+
+ # 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. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ 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
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj 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='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# 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 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ 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.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/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"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 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 16
+
+# 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.62])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
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+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
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])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)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+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
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# 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_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 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 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+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])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 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 5
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless `enable' is passed literally.
+# For symmetry, `disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 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_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.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
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+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, 2004, 2005, 2008
+# 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 6
+
+# 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
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# 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, 2006, 2011 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 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 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 5
+
+# _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],
+[m4_foreach_w([_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, 2008
+# 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 5
+
+# 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
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# 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, 2011 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 1
+
+# 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="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 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_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 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. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} 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
+
diff --git a/jni/desmume/autogen.sh b/jni/desmume/autogen.sh
new file mode 100755
index 0000000..56c493b
--- /dev/null
+++ b/jni/desmume/autogen.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# intltoolize is optionnal as it's only required for the gtk-glade UI.
+
+if test ! "x$(which intltoolize)" = "x"; then
+ echo "Running intltoolize"
+ intltoolize --copy --force --automake
+else
+ if test ! "x$(which gintltoolize)" = "x"; then
+ echo "Running gintltoolize"
+ gintltoolize --copy --force --automake
+ fi
+fi
+
+autoreconf --install --force --verbose
diff --git a/jni/desmume/compile b/jni/desmume/compile
new file mode 100755
index 0000000..1b1d232
--- /dev/null
+++ b/jni/desmume/compile
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey .
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to or send patches to
+# .
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to .
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/jni/desmume/config.guess b/jni/desmume/config.guess
new file mode 100755
index 0000000..d622a44
--- /dev/null
+++ b/jni/desmume/config.guess
@@ -0,0 +1,1530 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-02-10'
+
+# 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, see .
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+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, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include
+ #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 -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes .
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <
+# 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\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 < 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/jni/desmume/config.sub b/jni/desmume/config.sub
new file mode 100755
index 0000000..c894da4
--- /dev/null
+++ b/jni/desmume/config.sub
@@ -0,0 +1,1773 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-02-10'
+
+# 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, see .
+#
+# 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 . Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# 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.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# 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, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ 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* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ 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 | -knuth | -cray | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -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
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -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/'`
+ ;;
+ -sco5v6*)
+ # 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 \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | open8 \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*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-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # 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
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ 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
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ 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
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ 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 | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ 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*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
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ 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
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ 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
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ 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
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-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
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ 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=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ 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
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-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
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ 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
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ 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
+ ;;
+ *-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.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -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* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -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
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -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
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -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
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ 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
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-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
+ ;;
+ -cnk*|-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
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ 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
+
+# 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/jni/desmume/configure b/jni/desmume/configure
new file mode 100755
index 0000000..b9298ef
--- /dev/null
+++ b/jni/desmume/configure
@@ -0,0 +1,10423 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for desmume 0.9.8.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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=:
+ # Pre-4.2 versions of Zsh do 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_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+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.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+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
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do 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_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_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 ||
+$as_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" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# 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
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # 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" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_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
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+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 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ 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
+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='mkdir -p "$as_dir"'
+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'"
+
+
+test -n "$DJDIR" || exec 7<&0 &1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/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=
+
+# Identity of this package.
+PACKAGE_NAME='desmume'
+PACKAGE_TARNAME='desmume'
+PACKAGE_VERSION='0.9.8'
+PACKAGE_STRING='desmume 0.9.8'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+# 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='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+USE_MAINTAINER_MODE
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+HAVE_GDB_STUB_FALSE
+HAVE_GDB_STUB_TRUE
+PO_DIR
+UI_DIR
+X_EXTRA_LIBS
+X_LIBS
+X_PRE_LIBS
+X_CFLAGS
+XMKMF
+MKINSTALLDIRS
+POSUB
+POFILES
+PO_IN_DATADIR_FALSE
+PO_IN_DATADIR_TRUE
+INTLLIBS
+INSTOBJEXT
+GMOFILES
+CATOBJEXT
+CATALOGS
+MSGFMT_OPTS
+GETTEXT_PACKAGE
+HAVE_WX_FALSE
+HAVE_WX_TRUE
+WX_RESCOMP
+WX_VERSION
+WX_LIBS_STATIC
+WX_LIBS
+WX_CXXFLAGS_ONLY
+WX_CFLAGS_ONLY
+WX_CXXFLAGS
+WX_CFLAGS
+WX_CPPFLAGS
+WX_CONFIG_PATH
+HAVE_LIBSOUNDTOUCH_FALSE
+HAVE_LIBSOUNDTOUCH_TRUE
+LIBSOUNDTOUCH_LIBS
+LIBSOUNDTOUCH_CFLAGS
+HAVE_LIBAGG_FALSE
+HAVE_LIBAGG_TRUE
+LIBAGG_LIBS
+LIBAGG_CFLAGS
+HAVE_ALSA_FALSE
+HAVE_ALSA_TRUE
+ALSA_LIBS
+ALSA_CFLAGS
+HAVE_LUA_FALSE
+HAVE_LUA_TRUE
+LUA_LIBS
+LUA_CFLAGS
+UPDATEDESKTOP
+GTKGLEXT_LIBS
+GTKGLEXT_CFLAGS
+GLADEUI_UNINSTALLED_DIR
+LIBGLADE_LIBS
+LIBGLADE_CFLAGS
+GTHREAD_LIBS
+GTHREAD_CFLAGS
+GTK_LIBS
+GTK_CFLAGS
+GLIB_LIBS
+GLIB_CFLAGS
+HAVE_OPENAL_FALSE
+HAVE_OPENAL_TRUE
+HAVE_LIBOSMESA_FALSE
+HAVE_LIBOSMESA_TRUE
+OSMESA_LIBS
+HAVE_GL_FALSE
+HAVE_GL_TRUE
+SDL_LIBS
+SDL_CFLAGS
+SDLCONFIG
+HAVE_PKG
+DATADIRNAME
+ALL_LINGUAS
+INTLTOOL_PERL
+GMSGFMT
+MSGFMT
+MSGMERGE
+XGETTEXT
+INTLTOOL_POLICY_RULE
+INTLTOOL_SERVICE_RULE
+INTLTOOL_THEME_RULE
+INTLTOOL_SCHEMAS_RULE
+INTLTOOL_CAVES_RULE
+INTLTOOL_XML_NOMERGE_RULE
+INTLTOOL_XML_RULE
+INTLTOOL_KBD_RULE
+INTLTOOL_XAM_RULE
+INTLTOOL_UI_RULE
+INTLTOOL_SOUNDLIST_RULE
+INTLTOOL_SHEET_RULE
+INTLTOOL_SERVER_RULE
+INTLTOOL_PONG_RULE
+INTLTOOL_OAF_RULE
+INTLTOOL_PROP_RULE
+INTLTOOL_KEYS_RULE
+INTLTOOL_DIRECTORY_RULE
+INTLTOOL_DESKTOP_RULE
+intltool__v_merge_options_0
+intltool__v_merge_options_
+INTLTOOL_V_MERGE_OPTIONS
+INTLTOOL__v_MERGE_0
+INTLTOOL__v_MERGE_
+INTLTOOL_V_MERGE
+AM_DEFAULT_VERBOSITY
+INTLTOOL_EXTRACT
+INTLTOOL_MERGE
+INTLTOOL_UPDATE
+USE_NLS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+ac_ct_CC
+CFLAGS
+CC
+RANLIB
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CXX
+CPPFLAGS
+LDFLAGS
+CXXFLAGS
+CXX
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+desmume_arch
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+enable_nls
+enable_osmesa
+enable_hud
+enable_macosxhack
+enable_openal
+enable_glade
+enable_wxwidgets
+enable_wifi
+with_x
+enable_gdb_stub
+enable_hardcore
+enable_debug
+enable_gpu_debug
+enable_div_debug
+enable_sqrt_debug
+enable_dma_debug
+enable_maintainer_mode
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CXX
+CXXFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CCC
+CC
+CFLAGS
+CPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+GLIB_CFLAGS
+GLIB_LIBS
+GTK_CFLAGS
+GTK_LIBS
+GTHREAD_CFLAGS
+GTHREAD_LIBS
+LIBGLADE_CFLAGS
+LIBGLADE_LIBS
+GTKGLEXT_CFLAGS
+GTKGLEXT_LIBS
+LUA_CFLAGS
+LUA_LIBS
+ALSA_CFLAGS
+ALSA_LIBS
+LIBAGG_CFLAGS
+LIBAGG_LIBS
+LIBSOUNDTOUCH_CFLAGS
+LIBSOUNDTOUCH_LIBS
+XMKMF'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# 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_TARNAME}'
+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= ;;
+ *) 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_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=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_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=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 ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_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'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+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
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+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
+ $as_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 .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# 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 -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ 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 .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ 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 desmume 0.9.8 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/desmume]
+ --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
+
+X features:
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of desmume 0.9.8:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --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-nls do not use Native Language Support
+ --enable-osmesa use off-screen mesa
+ --enable-hud Enable HUD rendering, requires libagg
+ --enable-macosxhack hack to build MacOSX package
+ --enable-openal enable experimental OpenAL microphone input
+ --enable-glade enable glade frontend
+ --enable-wxwidgets Enable cross platform wx widgets frontend
+ --enable-wifi enable experimental wifi comm support
+ --enable-gdb-stub enable gdb stub
+ --enable-hardcore turn on -W -Wall -Werror
+ --enable-debug enable debug information
+ --enable-gpu-debug enable gpu debug information
+ --enable-div-debug enable div debug information
+ --enable-sqrt-debug enable sqrt debug information
+ --enable-dma-debug enable dma debug information
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-x use the X Window System
+
+Some influential environment variables:
+ CXX C++ compiler command
+ CXXFLAGS 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 (Objective) C/C++ preprocessor flags, e.g. -I if
+ you have headers in a nonstandard directory
+ CC C compiler command
+ CFLAGS C compiler flags
+ CPP C preprocessor
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+ GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
+ GLIB_LIBS linker flags for GLIB, overriding pkg-config
+ GTK_CFLAGS C compiler flags for GTK, overriding pkg-config
+ GTK_LIBS linker flags for GTK, overriding pkg-config
+ GTHREAD_CFLAGS
+ C compiler flags for GTHREAD, overriding pkg-config
+ GTHREAD_LIBS
+ linker flags for GTHREAD, overriding pkg-config
+ LIBGLADE_CFLAGS
+ C compiler flags for LIBGLADE, overriding pkg-config
+ LIBGLADE_LIBS
+ linker flags for LIBGLADE, overriding pkg-config
+ GTKGLEXT_CFLAGS
+ C compiler flags for GTKGLEXT, overriding pkg-config
+ GTKGLEXT_LIBS
+ linker flags for GTKGLEXT, overriding pkg-config
+ LUA_CFLAGS C compiler flags for LUA, overriding pkg-config
+ LUA_LIBS linker flags for LUA, overriding pkg-config
+ ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
+ ALSA_LIBS linker flags for ALSA, overriding pkg-config
+ LIBAGG_CFLAGS
+ C compiler flags for LIBAGG, overriding pkg-config
+ LIBAGG_LIBS linker flags for LIBAGG, overriding pkg-config
+ LIBSOUNDTOUCH_CFLAGS
+ C compiler flags for LIBSOUNDTOUCH, overriding pkg-config
+ LIBSOUNDTOUCH_LIBS
+ linker flags for LIBSOUNDTOUCH, overriding pkg-config
+ XMKMF Path to xmkmf, Makefile generator for X Window System
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_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" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_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
+ $as_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
+desmume configure 0.9.8
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 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
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case declares $2.
+ For example, HP-UX 11i declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer to if __STDC__ is defined, since
+ exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+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 desmume $as_me 0.9.8, which was
+generated by GNU Autoconf 2.68. 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=.
+ $as_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append 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
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset 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
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; 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
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_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'; as_fn_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
+
+$as_echo "/* confdefs.h */" > 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
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ 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. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_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,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_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
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_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.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+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
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+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 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&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 &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+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
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&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` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+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
+
+
+case $host in
+ *linux*) desmume_arch=linux;;
+ *mingw*) desmume_arch=windows;;
+ *darwin*) desmume_arch=linux;;
+ *bsd*) desmume_arch=linux;;
+esac
+
+
+am__api_version='1.11'
+
+# 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.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&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
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$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'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# 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".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "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 $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P 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.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+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='desmume'
+ VERSION='0.9.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"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
+$as_echo_n "checking whether the C++ compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; 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 | *.dSYM | *.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
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C++ compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5
+$as_echo_n "checking for C++ compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; 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 | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C++ compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; 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 | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GXX=yes
+else
+ GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+else
+ CXXFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_prog_cxx_g=yes
+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_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+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
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_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='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+depcc="$CXX" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&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'.
+ rm -rf conftest.dir
+ 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_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ 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
+
+ # 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. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ 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
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj 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_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&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"
+ $as_echo "$as_me:${as_lineno-$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+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)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&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'.
+ rm -rf conftest.dir
+ 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
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ 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
+
+ # 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. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ 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
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include
+#else
+# include
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ 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
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_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
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ 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
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ 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
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_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
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ 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
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+#include
+#include
+#include
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+ #include
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+ #include
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+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
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+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
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+ no)
+ ;; #(
+ universal)
+
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
+# took this from geany, hope it works
+REVISION="r0"
+SVN=`which svn 2>/dev/null`
+if test -d ".svn" -a "x${SVN}" != "x" -a -x "${SVN}" ; then
+ REVISION=r`$SVN info|grep 'Last Changed Rev'|cut -d' ' -f4`
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define SVN_REV "$REVISION"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_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_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_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_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+ # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then :
+ enableval=$enable_nls; USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+case "$am__api_version" in
+ 1.01234)
+ as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5
+ ;;
+ *)
+ ;;
+esac
+
+INTLTOOL_REQUIRED_VERSION_AS_INT=`echo | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
+INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+if test -n ""; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= " >&5
+$as_echo_n "checking for intltool >= ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
+$as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
+ test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+ as_fn_error $? "Your intltool is too old. You need intltool or later." "$LINENO" 5
+fi
+
+# Extract the first word of "intltool-update", so it can be a program name with args.
+set dummy intltool-update; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $INTLTOOL_UPDATE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # 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_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
+if test -n "$INTLTOOL_UPDATE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5
+$as_echo "$INTLTOOL_UPDATE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "intltool-merge", so it can be a program name with args.
+set dummy intltool-merge; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_INTLTOOL_MERGE+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $INTLTOOL_MERGE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # 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_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
+if test -n "$INTLTOOL_MERGE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5
+$as_echo "$INTLTOOL_MERGE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "intltool-extract", so it can be a program name with args.
+set dummy intltool-extract; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $INTLTOOL_EXTRACT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # 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_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
+if test -n "$INTLTOOL_EXTRACT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5
+$as_echo "$INTLTOOL_EXTRACT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+ as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
+fi
+
+if test -z "$AM_DEFAULT_VERBOSITY"; then
+ AM_DEFAULT_VERBOSITY=1
+fi
+
+
+INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
+INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
+INTLTOOL__v_MERGE_0='@echo " ITMRG " $@;'
+
+
+
+
+INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
+intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
+intltool__v_merge_options_0='-q'
+
+
+
+
+ INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< $@'
+ INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
+ INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< $@'
+else
+ INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.$$RANDOM && mkdir $$_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u $$_it_tmp_dir $< $@ && rmdir $$_it_tmp_dir'
+fi
+ INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+ INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check the gettext tools to make sure they are GNU
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_XGETTEXT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $XGETTEXT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # 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_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+XGETTEXT=$ac_cv_path_XGETTEXT
+if test -n "$XGETTEXT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_MSGMERGE+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MSGMERGE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # 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_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+MSGMERGE=$ac_cv_path_MSGMERGE
+if test -n "$MSGMERGE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_MSGFMT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # 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_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+MSGFMT=$ac_cv_path_MSGFMT
+if test -n "$MSGFMT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GMSGFMT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # 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_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+ as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+ as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
+fi
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_INTLTOOL_PERL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $INTLTOOL_PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # 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_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
+if test -n "$INTLTOOL_PERL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5
+$as_echo "$INTLTOOL_PERL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test -z "$INTLTOOL_PERL"; then
+ as_fn_error $? "perl not found" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5
+$as_echo_n "checking for perl >= 5.8.1... " >&6; }
+$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
+if test $? -ne 0; then
+ as_fn_error $? "perl 5.8.1 is required for intltool" "$LINENO" 5
+else
+ IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5
+$as_echo "$IT_PERL_VERSION" >&6; }
+fi
+if test "x" != "xno-xml"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5
+$as_echo_n "checking for XML::Parser... " >&6; }
+ if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+ else
+ as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5
+ fi
+fi
+
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
+
+
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ DATADIRNAME=share
+else
+ case $host in
+ *-*-solaris*)
+ ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
+if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
+ DATADIRNAME=share
+else
+ DATADIRNAME=lib
+fi
+
+ ;;
+ *)
+ DATADIRNAME=lib
+ ;;
+ esac
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_HAVE_PKG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$HAVE_PKG"; then
+ ac_cv_prog_HAVE_PKG="$HAVE_PKG" # 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_HAVE_PKG="${ac_tool_prefix}pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+HAVE_PKG=$ac_cv_prog_HAVE_PKG
+if test -n "$HAVE_PKG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_PKG" >&5
+$as_echo "$HAVE_PKG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_HAVE_PKG"; then
+ ac_ct_HAVE_PKG=$HAVE_PKG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_HAVE_PKG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_HAVE_PKG"; then
+ ac_cv_prog_ac_ct_HAVE_PKG="$ac_ct_HAVE_PKG" # 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_HAVE_PKG="pkg-config"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_HAVE_PKG=$ac_cv_prog_ac_ct_HAVE_PKG
+if test -n "$ac_ct_HAVE_PKG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_HAVE_PKG" >&5
+$as_echo "$ac_ct_HAVE_PKG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_HAVE_PKG" = x; then
+ HAVE_PKG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ HAVE_PKG=$ac_ct_HAVE_PKG
+ fi
+else
+ HAVE_PKG="$ac_cv_prog_HAVE_PKG"
+fi
+
+if test "xHAVE_PKG" = "x" ; then
+ as_fn_error $? "pkg-config is required to build desmume" "$LINENO" 5
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5
+$as_echo_n "checking for gzopen in -lz... " >&6; }
+if ${ac_cv_lib_z_gzopen+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gzopen ();
+int
+main ()
+{
+return gzopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_z_gzopen=yes
+else
+ ac_cv_lib_z_gzopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzopen" >&5
+$as_echo "$ac_cv_lib_z_gzopen" >&6; }
+if test "x$ac_cv_lib_z_gzopen" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+ LIBS="-lz $LIBS"
+
+else
+ as_fn_error $? "zlib was not found, we can't go further. Please install it or specify the location where it's installed." "$LINENO" 5
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zzip_open in -lzzip" >&5
+$as_echo_n "checking for zzip_open in -lzzip... " >&6; }
+if ${ac_cv_lib_zzip_zzip_open+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lzzip $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char zzip_open ();
+int
+main ()
+{
+return zzip_open ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_zzip_zzip_open=yes
+else
+ ac_cv_lib_zzip_zzip_open=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zzip_zzip_open" >&5
+$as_echo "$ac_cv_lib_zzip_zzip_open" >&6; }
+if test "x$ac_cv_lib_zzip_zzip_open" = xyes; then :
+
+ LIBS="-lzzip $LIBS"
+ $as_echo "#define HAVE_LIBZZIP 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether zzip use void * as second parameter" >&5
+$as_echo_n "checking whether zzip use void * as second parameter... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+int
+main ()
+{
+
+ void * v;
+ zzip_read(NULL, v, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ $as_echo "#define ZZIP_OLD_READ 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+
+for ac_prog in sdl-config sdl11-config
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SDLCONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SDLCONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SDLCONFIG="$SDLCONFIG" # 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_SDLCONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SDLCONFIG=$ac_cv_path_SDLCONFIG
+if test -n "$SDLCONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDLCONFIG" >&5
+$as_echo "$SDLCONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$SDLCONFIG" && break
+done
+
+if test ! "x$SDLCONFIG" = "x" ; then
+ SDL_CFLAGS=`$SDLCONFIG --cflags`
+ SDL_LIBS=`$SDLCONFIG --libs`
+
+
+else
+ as_fn_error $? "sdl is required to build desmume" "$LINENO" 5
+fi
+
+for ac_header in GL/gl.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
+if test "x$ac_cv_header_GL_gl_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GL_GL_H 1
+_ACEOF
+ for ac_header in GL/glu.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "GL/glu.h" "ac_cv_header_GL_glu_h" "$ac_includes_default"
+if test "x$ac_cv_header_GL_glu_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GL_GLU_H 1
+_ACEOF
+ have_gl_h=yes LIBS="$LIBS -lGLU"
+else
+ have_gl_h=no
+fi
+
+done
+
+else
+ have_gl_h=no
+fi
+
+done
+
+if test "have_gl_h" = "no" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building without GL support because of missing headers." >&5
+$as_echo "$as_me: WARNING: Building without GL support because of missing headers." >&2;}
+fi
+ if test "${have_gl_h}" = "yes"; then
+ HAVE_GL_TRUE=
+ HAVE_GL_FALSE='#'
+else
+ HAVE_GL_TRUE='#'
+ HAVE_GL_FALSE=
+fi
+
+
+# Check whether --enable-osmesa was given.
+if test "${enable_osmesa+set}" = set; then :
+ enableval=$enable_osmesa; osmesa=$enableval
+else
+ osmesa=yes
+fi
+
+
+if test "x$osmesa" = "xyes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5
+$as_echo_n "checking for main in -ldl... " >&6; }
+if ${ac_cv_lib_dl_main+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_main=yes
+else
+ ac_cv_lib_dl_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_main" >&5
+$as_echo "$ac_cv_lib_dl_main" >&6; }
+if test "x$ac_cv_lib_dl_main" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+ LIBS="-ldl $LIBS"
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lGL" >&5
+$as_echo_n "checking for main in -lGL... " >&6; }
+if ${ac_cv_lib_GL_main+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGL $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_GL_main=yes
+else
+ ac_cv_lib_GL_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_main" >&5
+$as_echo "$ac_cv_lib_GL_main" >&6; }
+if test "x$ac_cv_lib_GL_main" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGL 1
+_ACEOF
+
+ LIBS="-lGL $LIBS"
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOSMesa" >&5
+$as_echo_n "checking for main in -lOSMesa... " >&6; }
+if ${ac_cv_lib_OSMesa_main+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lOSMesa $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_OSMesa_main=yes
+else
+ ac_cv_lib_OSMesa_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OSMesa_main" >&5
+$as_echo "$ac_cv_lib_OSMesa_main" >&6; }
+if test "x$ac_cv_lib_OSMesa_main" = xyes; then :
+
+ useosmesa=yes
+ $as_echo "#define HAVE_LIBOSMESA 1" >>confdefs.h
+
+ OSMESA_LIBS="-lOSMesa"
+
+
+fi
+
+fi
+ if test "${useosmesa}" = "yes"; then
+ HAVE_LIBOSMESA_TRUE=
+ HAVE_LIBOSMESA_FALSE='#'
+else
+ HAVE_LIBOSMESA_TRUE='#'
+ HAVE_LIBOSMESA_FALSE=
+fi
+
+
+# Check whether --enable-hud was given.
+if test "${enable_hud+set}" = set; then :
+ enableval=$enable_hud; libagg=yes
+fi
+
+
+# Check whether --enable-macosxhack was given.
+if test "${enable_macosxhack+set}" = set; then :
+ enableval=$enable_macosxhack; GTK_MACOSX_HACK=yes
+fi
+
+
+HAVE_OPENAL=no
+# Check whether --enable-openal was given.
+if test "${enable_openal+set}" = set; then :
+ enableval=$enable_openal; openal=yes
+fi
+
+
+if test "x$openal" = "xyes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lopenal" >&5
+$as_echo_n "checking for main in -lopenal... " >&6; }
+if ${ac_cv_lib_openal_main+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lopenal $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_openal_main=yes
+else
+ ac_cv_lib_openal_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openal_main" >&5
+$as_echo "$ac_cv_lib_openal_main" >&6; }
+if test "x$ac_cv_lib_openal_main" = xyes; then :
+
+ HAVE_OPENAL=yes
+ LIBS="$LIBS -lopenal"
+
+fi
+
+fi
+ if test "${HAVE_OPENAL}" = "yes"; then
+ HAVE_OPENAL_TRUE=
+ HAVE_OPENAL_FALSE='#'
+else
+ HAVE_OPENAL_TRUE='#'
+ HAVE_OPENAL_FALSE=
+fi
+
+
+FOUND_GLIB=no
+HAVE_ALSA=no
+GLIB_VER=2.8
+GTK_VER=2.14
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
+$as_echo_n "checking for GLIB... " >&6; }
+
+if test -n "$GLIB_CFLAGS"; then
+ pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_VER\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_VER") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_VER" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$GLIB_LIBS"; then
+ pkg_cv_GLIB_LIBS="$GLIB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_VER\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_VER") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_VER" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= $GLIB_VER" 2>&1`
+ else
+ GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= $GLIB_VER" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GLIB_PKG_ERRORS" >&5
+
+ FOUND_GLIB=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ FOUND_GLIB=no
+else
+ GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
+ GLIB_LIBS=$pkg_cv_GLIB_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ FOUND_GLIB=yes
+fi
+if test "x$FOUND_GLIB" = "xno"; then
+ if test ! "x$GTK_MACOSX_HACK" = "xyes"; then
+ as_fn_error $? "Glib is required to build desmume" "$LINENO" 5
+ fi
+fi
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
+$as_echo_n "checking for GTK... " >&6; }
+
+if test -n "$GTK_CFLAGS"; then
+ pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_VER\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_VER") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK_VER" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$GTK_LIBS"; then
+ pkg_cv_GTK_LIBS="$GTK_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_VER\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_VER") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= $GTK_VER" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-2.0 >= $GTK_VER" 2>&1`
+ else
+ GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-2.0 >= $GTK_VER" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GTK_PKG_ERRORS" >&5
+
+ HAVE_GTK=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ HAVE_GTK=no
+else
+ GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
+ GTK_LIBS=$pkg_cv_GTK_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_GTK=yes
+fi
+
+
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTHREAD" >&5
+$as_echo_n "checking for GTHREAD... " >&6; }
+
+if test -n "$GTHREAD_CFLAGS"; then
+ pkg_cv_GTHREAD_CFLAGS="$GTHREAD_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"gthread-2.0\"\""; } >&5
+ ($PKG_CONFIG --exists --print-errors ""gthread-2.0"") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTHREAD_CFLAGS=`$PKG_CONFIG --cflags ""gthread-2.0"" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$GTHREAD_LIBS"; then
+ pkg_cv_GTHREAD_LIBS="$GTHREAD_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"gthread-2.0\"\""; } >&5
+ ($PKG_CONFIG --exists --print-errors ""gthread-2.0"") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTHREAD_LIBS=`$PKG_CONFIG --libs ""gthread-2.0"" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GTHREAD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs ""gthread-2.0"" 2>&1`
+ else
+ GTHREAD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs ""gthread-2.0"" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GTHREAD_PKG_ERRORS" >&5
+
+ HAVE_GTHREAD=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ HAVE_GTHREAD=no
+else
+ GTHREAD_CFLAGS=$pkg_cv_GTHREAD_CFLAGS
+ GTHREAD_LIBS=$pkg_cv_GTHREAD_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_GTHREAD=yes
+fi
+
+
+
+# Check whether --enable-glade was given.
+if test "${enable_glade+set}" = set; then :
+ enableval=$enable_glade; glade=$enableval
+else
+ glade=yes
+fi
+
+
+if test "x$glade" = "xyes" ; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGLADE" >&5
+$as_echo_n "checking for LIBGLADE... " >&6; }
+
+if test -n "$LIBGLADE_CFLAGS"; then
+ pkg_cv_LIBGLADE_CFLAGS="$LIBGLADE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"libglade-2.0\"\""; } >&5
+ ($PKG_CONFIG --exists --print-errors ""libglade-2.0"") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBGLADE_CFLAGS=`$PKG_CONFIG --cflags ""libglade-2.0"" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBGLADE_LIBS"; then
+ pkg_cv_LIBGLADE_LIBS="$LIBGLADE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"libglade-2.0\"\""; } >&5
+ ($PKG_CONFIG --exists --print-errors ""libglade-2.0"") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBGLADE_LIBS=`$PKG_CONFIG --libs ""libglade-2.0"" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBGLADE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs ""libglade-2.0"" 2>&1`
+ else
+ LIBGLADE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs ""libglade-2.0"" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBGLADE_PKG_ERRORS" >&5
+
+ HAVE_LIBGLADE=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ HAVE_LIBGLADE=no
+else
+ LIBGLADE_CFLAGS=$pkg_cv_LIBGLADE_CFLAGS
+ LIBGLADE_LIBS=$pkg_cv_LIBGLADE_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_LIBGLADE=yes
+fi
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GLADEUI_UNINSTALLED_DIR "`pwd`/src/gtk-glade/glade/"
+_ACEOF
+
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKGLEXT" >&5
+$as_echo_n "checking for GTKGLEXT... " >&6; }
+
+if test -n "$GTKGLEXT_CFLAGS"; then
+ pkg_cv_GTKGLEXT_CFLAGS="$GTKGLEXT_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"gtkglext-1.0\"\""; } >&5
+ ($PKG_CONFIG --exists --print-errors ""gtkglext-1.0"") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTKGLEXT_CFLAGS=`$PKG_CONFIG --cflags ""gtkglext-1.0"" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$GTKGLEXT_LIBS"; then
+ pkg_cv_GTKGLEXT_LIBS="$GTKGLEXT_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"gtkglext-1.0\"\""; } >&5
+ ($PKG_CONFIG --exists --print-errors ""gtkglext-1.0"") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTKGLEXT_LIBS=`$PKG_CONFIG --libs ""gtkglext-1.0"" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ GTKGLEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs ""gtkglext-1.0"" 2>&1`
+ else
+ GTKGLEXT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs ""gtkglext-1.0"" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GTKGLEXT_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (\"gtkglext-1.0\") were not met:
+
+$GTKGLEXT_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GTKGLEXT_CFLAGS
+and GTKGLEXT_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GTKGLEXT_CFLAGS
+and GTKGLEXT_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see .
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ GTKGLEXT_CFLAGS=$pkg_cv_GTKGLEXT_CFLAGS
+ GTKGLEXT_LIBS=$pkg_cv_GTKGLEXT_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ $as_echo "#define GTKGLEXT_AVAILABLE 1" >>confdefs.h
+
+
+fi
+
+
+fi
+
+# Extract the first word of "update-desktop-database", so it can be a program name with args.
+set dummy update-desktop-database; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_UPDATEDESKTOP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $UPDATEDESKTOP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_UPDATEDESKTOP="$UPDATEDESKTOP" # 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_UPDATEDESKTOP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+UPDATEDESKTOP=$ac_cv_path_UPDATEDESKTOP
+if test -n "$UPDATEDESKTOP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATEDESKTOP" >&5
+$as_echo "$UPDATEDESKTOP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+# Need check for both lua and lua5.1 to run on debian, see mysql bug #29945
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
+$as_echo_n "checking for LUA... " >&6; }
+
+if test -n "$LUA_CFLAGS"; then
+ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lua >= 5.1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua >= 5.1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LUA_LIBS"; then
+ pkg_cv_LUA_LIBS="$LUA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua >= 5.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lua >= 5.1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua >= 5.1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lua >= 5.1" 2>&1`
+ else
+ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lua >= 5.1" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LUA_PKG_ERRORS" >&5
+
+ HAVE_LUA=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ HAVE_LUA=no
+else
+ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
+ LUA_LIBS=$pkg_cv_LUA_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_LUA=yes
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
+$as_echo_n "checking for LUA... " >&6; }
+
+if test -n "$LUA_CFLAGS"; then
+ pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "lua5.1 >= 5.1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LUA_LIBS"; then
+ pkg_cv_LUA_LIBS="$LUA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.1 >= 5.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "lua5.1 >= 5.1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "lua5.1 >= 5.1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lua5.1 >= 5.1" 2>&1`
+ else
+ LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lua5.1 >= 5.1" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LUA_PKG_ERRORS" >&5
+
+ HAVE_LUA=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ HAVE_LUA=no
+else
+ LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
+ LUA_LIBS=$pkg_cv_LUA_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_LUA=yes
+fi
+
+
+ if test "${HAVE_LUA}x" = "yes"; then
+ HAVE_LUA_TRUE=
+ HAVE_LUA_FALSE='#'
+else
+ HAVE_LUA_TRUE='#'
+ HAVE_LUA_FALSE=
+fi
+
+
+if test ! "x$HAVE_OPENAL" = "xyes" ; then
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
+$as_echo_n "checking for ALSA... " >&6; }
+
+if test -n "$ALSA_CFLAGS"; then
+ pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa >= 1.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "alsa >= 1.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa >= 1.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$ALSA_LIBS"; then
+ pkg_cv_ALSA_LIBS="$ALSA_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa >= 1.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "alsa >= 1.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa >= 1.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "alsa >= 1.0" 2>&1`
+ else
+ ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "alsa >= 1.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ALSA_PKG_ERRORS" >&5
+
+ HAVE_ALSA=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ HAVE_ALSA=no
+else
+ ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
+ ALSA_LIBS=$pkg_cv_ALSA_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_ALSA=yes
+fi
+
+
+fi
+ if test "${HAVE_ALSA}" = "yes"; then
+ HAVE_ALSA_TRUE=
+ HAVE_ALSA_FALSE='#'
+else
+ HAVE_ALSA_TRUE='#'
+ HAVE_ALSA_FALSE=
+fi
+
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBAGG" >&5
+$as_echo_n "checking for LIBAGG... " >&6; }
+
+if test -n "$LIBAGG_CFLAGS"; then
+ pkg_cv_LIBAGG_CFLAGS="$LIBAGG_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libagg >= 2.5.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libagg >= 2.5.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBAGG_CFLAGS=`$PKG_CONFIG --cflags "libagg >= 2.5.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBAGG_LIBS"; then
+ pkg_cv_LIBAGG_LIBS="$LIBAGG_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libagg >= 2.5.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libagg >= 2.5.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBAGG_LIBS=`$PKG_CONFIG --libs "libagg >= 2.5.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBAGG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libagg >= 2.5.0" 2>&1`
+ else
+ LIBAGG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libagg >= 2.5.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBAGG_PKG_ERRORS" >&5
+
+ FOUND_LIBAGG=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ FOUND_LIBAGG=no
+else
+ LIBAGG_CFLAGS=$pkg_cv_LIBAGG_CFLAGS
+ LIBAGG_LIBS=$pkg_cv_LIBAGG_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ FOUND_LIBAGG=yes
+fi
+ if test "x$libagg" = "xyes" -a "${FOUND_LIBAGG}" = "yes"; then
+ HAVE_LIBAGG_TRUE=
+ HAVE_LIBAGG_FALSE='#'
+else
+ HAVE_LIBAGG_TRUE='#'
+ HAVE_LIBAGG_FALSE=
+fi
+
+if test "x$libagg" = "xyes" ; then
+ if test "x$FOUND_LIBAGG" = "xyes" ; then
+
+
+ $as_echo "#define HAVE_LIBAGG 1" >>confdefs.h
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HUD rendering enabled, but libagg not found" >&5
+$as_echo "$as_me: WARNING: HUD rendering enabled, but libagg not found" >&2;}
+ fi
+fi
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSOUNDTOUCH" >&5
+$as_echo_n "checking for LIBSOUNDTOUCH... " >&6; }
+
+if test -n "$LIBSOUNDTOUCH_CFLAGS"; then
+ pkg_cv_LIBSOUNDTOUCH_CFLAGS="$LIBSOUNDTOUCH_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"soundtouch >= 1.5.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "soundtouch >= 1.5.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBSOUNDTOUCH_CFLAGS=`$PKG_CONFIG --cflags "soundtouch >= 1.5.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$LIBSOUNDTOUCH_LIBS"; then
+ pkg_cv_LIBSOUNDTOUCH_LIBS="$LIBSOUNDTOUCH_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"soundtouch >= 1.5.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "soundtouch >= 1.5.0") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBSOUNDTOUCH_LIBS=`$PKG_CONFIG --libs "soundtouch >= 1.5.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ LIBSOUNDTOUCH_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "soundtouch >= 1.5.0" 2>&1`
+ else
+ LIBSOUNDTOUCH_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "soundtouch >= 1.5.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBSOUNDTOUCH_PKG_ERRORS" >&5
+
+ HAVE_LIBSOUNDTOUCH=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ HAVE_LIBSOUNDTOUCH=no
+else
+ LIBSOUNDTOUCH_CFLAGS=$pkg_cv_LIBSOUNDTOUCH_CFLAGS
+ LIBSOUNDTOUCH_LIBS=$pkg_cv_LIBSOUNDTOUCH_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_LIBSOUNDTOUCH=yes
+fi
+
+
+ if test "${HAVE_LIBSOUNDTOUCH}" = "yes"; then
+ HAVE_LIBSOUNDTOUCH_TRUE=
+ HAVE_LIBSOUNDTOUCH_FALSE='#'
+else
+ HAVE_LIBSOUNDTOUCH_TRUE='#'
+ HAVE_LIBSOUNDTOUCH_FALSE=
+fi
+
+if test "x$HAVE_LIBSOUNDTOUCH" = "xyes"; then
+ $as_echo "#define HAVE_LIBSOUNDTOUCH 1" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SoundTouch library not found, pcsx2 resampler will be disabled" >&5
+$as_echo "$as_me: WARNING: SoundTouch library not found, pcsx2 resampler will be disabled" >&2;}
+fi
+
+if test "x$HAVE_ALSA" = "xno"; then
+ if test "x$HAVE_OPENAL" = "xno"; then
+ $as_echo "#define FAKE_MIC 1" >>confdefs.h
+
+ fi
+fi
+
+
+# Check whether --enable-wxwidgets was given.
+if test "${enable_wxwidgets+set}" = set; then :
+ enableval=$enable_wxwidgets; wxwidgets=$enableval
+else
+ wxwidgets=no
+fi
+
+if test "x$wxwidgets" = "xyes" ; then
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test x${WX_CONFIG_NAME+set} != xset ; then
+ WX_CONFIG_NAME=wx-config
+ fi
+
+ if test "x$wx_config_name" != x ; then
+ WX_CONFIG_NAME="$wx_config_name"
+ fi
+
+ if test x$wx_config_exec_prefix != x ; then
+ wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix"
+ WX_LOOKUP_PATH="$wx_config_exec_prefix/bin"
+ fi
+ if test x$wx_config_prefix != x ; then
+ wx_config_args="$wx_config_args --prefix=$wx_config_prefix"
+ WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin"
+ fi
+ if test "$cross_compiling" = "yes"; then
+ wx_config_args="$wx_config_args --host=$host_alias"
+ fi
+
+ if test -x "$WX_CONFIG_NAME" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wx-config" >&5
+$as_echo_n "checking for wx-config... " >&6; }
+ WX_CONFIG_PATH="$WX_CONFIG_NAME"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WX_CONFIG_PATH" >&5
+$as_echo "$WX_CONFIG_PATH" >&6; }
+ else
+ # Extract the first word of "$WX_CONFIG_NAME", so it can be a program name with args.
+set dummy $WX_CONFIG_NAME; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_WX_CONFIG_PATH+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $WX_CONFIG_PATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_WX_CONFIG_PATH="$WX_CONFIG_PATH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy=""$WX_LOOKUP_PATH:$PATH""
+for as_dir in $as_dummy
+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_WX_CONFIG_PATH="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_WX_CONFIG_PATH" && ac_cv_path_WX_CONFIG_PATH="no"
+ ;;
+esac
+fi
+WX_CONFIG_PATH=$ac_cv_path_WX_CONFIG_PATH
+if test -n "$WX_CONFIG_PATH"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WX_CONFIG_PATH" >&5
+$as_echo "$WX_CONFIG_PATH" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+
+ if test "$WX_CONFIG_PATH" != "no" ; then
+ WX_VERSION=""
+
+ min_wx_version=2.4.0
+ if test -z "" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version" >&5
+$as_echo_n "checking for wxWidgets version >= $min_wx_version... " >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version ()" >&5
+$as_echo_n "checking for wxWidgets version >= $min_wx_version ()... " >&6; }
+ fi
+
+ WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args "
+
+ WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null`
+ wx_config_major_version=`echo $WX_VERSION | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+ wx_config_minor_version=`echo $WX_VERSION | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+ wx_config_micro_version=`echo $WX_VERSION | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+
+ wx_requested_major_version=`echo $min_wx_version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+ wx_requested_minor_version=`echo $min_wx_version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+ wx_requested_micro_version=`echo $min_wx_version | \
+ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+
+
+ wx_ver_ok=""
+ if test "x$WX_VERSION" != x ; then
+ if test $wx_config_major_version -gt $wx_requested_major_version; then
+ wx_ver_ok=yes
+ else
+ if test $wx_config_major_version -eq $wx_requested_major_version; then
+ if test $wx_config_minor_version -gt $wx_requested_minor_version; then
+ wx_ver_ok=yes
+ else
+ if test $wx_config_minor_version -eq $wx_requested_minor_version; then
+ if test $wx_config_micro_version -ge $wx_requested_micro_version; then
+ wx_ver_ok=yes
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+
+
+ if test -n "$wx_ver_ok"; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $WX_VERSION)" >&5
+$as_echo "yes (version $WX_VERSION)" >&6; }
+ WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs`
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wxWidgets static library" >&5
+$as_echo_n "checking for wxWidgets static library... " >&6; }
+ WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs 2>/dev/null`
+ if test "x$WX_LIBS_STATIC" = "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+
+ wx_has_cppflags=""
+ if test $wx_config_major_version -gt 2; then
+ wx_has_cppflags=yes
+ else
+ if test $wx_config_major_version -eq 2; then
+ if test $wx_config_minor_version -gt 2; then
+ wx_has_cppflags=yes
+ else
+ if test $wx_config_minor_version -eq 2; then
+ if test $wx_config_micro_version -ge 6; then
+ wx_has_cppflags=yes
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ wx_has_rescomp=""
+ if test $wx_config_major_version -gt 2; then
+ wx_has_rescomp=yes
+ else
+ if test $wx_config_major_version -eq 2; then
+ if test $wx_config_minor_version -ge 7; then
+ wx_has_rescomp=yes
+ fi
+ fi
+ fi
+ if test "x$wx_has_rescomp" = x ; then
+ WX_RESCOMP=
+ else
+ WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp`
+ fi
+
+ if test "x$wx_has_cppflags" = x ; then
+ WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags`
+ WX_CPPFLAGS=$WX_CFLAGS
+ WX_CXXFLAGS=$WX_CFLAGS
+
+ WX_CFLAGS_ONLY=$WX_CFLAGS
+ WX_CXXFLAGS_ONLY=$WX_CFLAGS
+ else
+ WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags`
+ WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags`
+ WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags`
+
+ WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"`
+ WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"`
+ fi
+
+ wxwin=yes
+
+ else
+
+ if test "x$WX_VERSION" = x; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (version $WX_VERSION is not new enough)" >&5
+$as_echo "no (version $WX_VERSION is not new enough)" >&6; }
+ fi
+
+ WX_CFLAGS=""
+ WX_CPPFLAGS=""
+ WX_CXXFLAGS=""
+ WX_LIBS=""
+ WX_LIBS_STATIC=""
+ WX_RESCOMP=""
+ :
+
+ fi
+ else
+
+ WX_CFLAGS=""
+ WX_CPPFLAGS=""
+ WX_CXXFLAGS=""
+ WX_LIBS=""
+ WX_LIBS_STATIC=""
+ WX_RESCOMP=""
+
+ :
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ if test "x$wxwin" = "xyes"; then
+
+
+ $as_echo "#define WANT_WX 1" >>confdefs.h
+
+ fi
+fi
+
+ if test "x$wxwidgets" = "xyes"; then
+ HAVE_WX_TRUE=
+ HAVE_WX_FALSE='#'
+else
+ HAVE_WX_TRUE='#'
+ HAVE_WX_FALSE=
+fi
+
+
+PO_DIR=""
+UI_DIR="cli $UI_DIR"
+if test "x$HAVE_GTK" = "xyes"; then
+ UI_DIR="gtk $UI_DIR"
+fi
+if test "x$wxwin" = "xyes"; then
+ UI_DIR="wx $UI_DIR"
+fi
+
+if test "x$HAVE_LIBGLADE" = "xyes"; then
+
+ UI_DIR="gtk-glade $UI_DIR"
+
+ GETTEXT_PACKAGE=desmume
+
+cat >>confdefs.h <<_ACEOF
+#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
+_ACEOF
+
+
+ ALL_LINGUAS="fr nb pt_BR sv zh_CN zh_TW"
+
+ for ac_header in locale.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
+if test "x$ac_cv_header_locale_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LOCALE_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_locale_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
+if ${am_cv_val_LC_MESSAGES+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+int
+main ()
+{
+return LC_MESSAGES
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_val_LC_MESSAGES=yes
+else
+ am_cv_val_LC_MESSAGES=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
+$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
+ if test $am_cv_val_LC_MESSAGES = yes; then
+
+$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
+
+ fi
+ fi
+ USE_NLS=yes
+
+
+ gt_cv_have_gettext=no
+
+ CATOBJEXT=NONE
+ XGETTEXT=:
+ INTLLIBS=
+
+ ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = xyes; then :
+ gt_cv_func_dgettext_libintl="no"
+ libintl_extra_libs=""
+
+ #
+ # First check in libc
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
+$as_echo_n "checking for ngettext in libc... " >&6; }
+if ${gt_cv_func_ngettext_libc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include
+
+int
+main ()
+{
+return !ngettext ("","", 1)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gt_cv_func_ngettext_libc=yes
+else
+ gt_cv_func_ngettext_libc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
+$as_echo "$gt_cv_func_ngettext_libc" >&6; }
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
+$as_echo_n "checking for dgettext in libc... " >&6; }
+if ${gt_cv_func_dgettext_libc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include
+
+int
+main ()
+{
+return !dgettext ("","")
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gt_cv_func_dgettext_libc=yes
+else
+ gt_cv_func_dgettext_libc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
+$as_echo "$gt_cv_func_dgettext_libc" >&6; }
+ fi
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ for ac_func in bind_textdomain_codeset
+do :
+ ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
+if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_BIND_TEXTDOMAIN_CODESET 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+ #
+ # If we don't have everything we want, check in libintl
+ #
+ if test "$gt_cv_func_dgettext_libc" != "yes" \
+ || test "$gt_cv_func_ngettext_libc" != "yes" \
+ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
+$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
+if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bindtextdomain ();
+int
+main ()
+{
+return bindtextdomain ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_bindtextdomain=yes
+else
+ ac_cv_lib_intl_bindtextdomain=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
+$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
+if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_ngettext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_ngettext=yes
+else
+ ac_cv_lib_intl_ngettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
+$as_echo_n "checking for dgettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_dgettext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dgettext ();
+int
+main ()
+{
+return dgettext ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_dgettext=yes
+else
+ ac_cv_lib_intl_dgettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
+$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
+if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
+ gt_cv_func_dgettext_libintl=yes
+fi
+
+fi
+
+fi
+
+
+ if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
+$as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_ngettext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_ngettext=yes
+else
+ ac_cv_lib_intl_ngettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
+$as_echo_n "checking for dcgettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_dcgettext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dcgettext ();
+int
+main ()
+{
+return dcgettext ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_dcgettext=yes
+else
+ ac_cv_lib_intl_dcgettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
+$as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
+if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
+ gt_cv_func_dgettext_libintl=yes
+ libintl_extra_libs=-liconv
+else
+ :
+fi
+
+else
+ :
+fi
+
+ fi
+
+ #
+ # If we found libintl, then check in it for bind_textdomain_codeset();
+ # we'll prefer libc if neither have bind_textdomain_codeset(),
+ # and both have dgettext and ngettext
+ #
+ if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS -lintl $libintl_extra_libs"
+ unset ac_cv_func_bind_textdomain_codeset
+ for ac_func in bind_textdomain_codeset
+do :
+ ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
+if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_BIND_TEXTDOMAIN_CODESET 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$glib_save_LIBS"
+
+ if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+ gt_cv_func_dgettext_libc=no
+ else
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ && test "$gt_cv_func_ngettext_libc" = "yes"; then
+ gt_cv_func_dgettext_libintl=no
+ fi
+ fi
+ fi
+ fi
+
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ || test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ gt_cv_have_gettext=yes
+ fi
+
+ if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ INTLLIBS="-lintl $libintl_extra_libs"
+ fi
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+
+$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_MSGFMT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != "no"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+ if test "$MSGFMT" != "no"; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS $INTLLIBS"
+ for ac_func in dcgettext
+do :
+ ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
+if test "x$ac_cv_func_dcgettext" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DCGETTEXT 1
+_ACEOF
+
+fi
+done
+
+ MSGFMT_OPTS=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
+$as_echo_n "checking if msgfmt accepts -c... " >&6; }
+ cat >conftest.foo <<_ACEOF
+
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test \n"
+"Language-Team: C \n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+_ACEOF
+if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
+ ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+echo "$as_me: failed input was:" >&5
+sed 's/^/| /' conftest.foo >&5
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GMSGFMT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # 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_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_XGETTEXT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ case $host in
+ *-*-solaris*)
+ ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
+if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+
+ ;;
+ *-*-openbsd*)
+ CATOBJEXT=.mo
+ DATADIRNAME=share
+ ;;
+ *)
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+ ;;
+ esac
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$glib_save_LIBS"
+ INSTOBJEXT=.mo
+ else
+ gt_cv_have_gettext=no
+ fi
+ fi
+
+fi
+
+
+
+ if test "$gt_cv_have_gettext" = "yes" ; then
+
+$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+
+ fi
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
+$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+
+ ac_config_commands="$ac_config_commands default-1"
+
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
+$as_echo_n "checking for catalogs to be installed... " >&6; }
+ NEW_LINGUAS=
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+ fi
+ done
+ LINGUAS=$NEW_LINGUAS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
+$as_echo "$LINGUAS" >&6; }
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+
+ PO_DIR="po"
+ PO_MAKEFILE="po/Makefile.in"
+
+fi
+
+# Check whether --enable-wifi was given.
+if test "${enable_wifi+set}" = set; then :
+ enableval=$enable_wifi;
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5
+$as_echo_n "checking for main in -lpcap... " >&6; }
+if ${ac_cv_lib_pcap_main+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpcap $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pcap_main=yes
+else
+ ac_cv_lib_pcap_main=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_main" >&5
+$as_echo "$ac_cv_lib_pcap_main" >&6; }
+if test "x$ac_cv_lib_pcap_main" = xyes; then :
+
+ $as_echo "#define EXPERIMENTAL_WIFI_COMM 1" >>confdefs.h
+
+ LIBS="$LIBS -lpcap"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pcap library not found, wifi will not work" >&5
+$as_echo "$as_me: WARNING: pcap library not found, wifi will not work" >&2;}
+fi
+
+
+fi
+
+
+case $host in
+ *mingw*)
+ LIBS="$LIBS -ldxguid -ldxerr8 -ldsound -lopengl32 -lws2_32 -mwindows"
+ UI_DIR="windows"
+ ;;
+ *darwin*)
+ if test "x$GTK_MACOSX_HACK" = "xyes" ; then
+ LIBS="$LIBS -framework Gtk -framework GLib"
+ CPPFLAGS="$CPPFLAGS -I/Library/Frameworks/Cairo.framework/Headers -I/Library/Frameworks/Gtk.framework/Headers -I/Library/Frameworks/GLib.framework/Headers"
+ GLIB_LIBS=""
+
+ fi
+ $as_echo "#define HAVE_OPENAL 1" >>confdefs.h
+
+ LIBS="$LIBS -framework OpenGL -framework OpenAL"
+ CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/OpenAL.framework/Headers"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
+
+
+# Check whether --with-x was given.
+if test "${with_x+set}" = set; then :
+ withval=$with_x;
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+ # The user explicitly disabled X.
+ have_x=disabled
+else
+ case $x_includes,$x_libraries in #(
+ *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
+ *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -f -r conftest.dir
+if mkdir conftest.dir; then
+ cd conftest.dir
+ cat >Imakefile <<'_ACEOF'
+incroot:
+ @echo incroot='${INCROOT}'
+usrlibdir:
+ @echo usrlibdir='${USRLIBDIR}'
+libdir:
+ @echo libdir='${LIBDIR}'
+_ACEOF
+ if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+ for ac_var in incroot usrlibdir libdir; do
+ eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+ done
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in a so sl dylib la dll; do
+ if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+ test -f "$ac_im_libdir/libX11.$ac_extension"; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case $ac_im_incroot in
+ /usr/include) ac_x_includes= ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+ esac
+ case $ac_im_usrlibdir in
+ /usr/lib | /usr/lib64 | /lib | /lib64) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+ esac
+ fi
+ cd ..
+ rm -f -r conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R7/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R7
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R7/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R7
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+ # Guess where to find include files, by looking for Xlib.h.
+ # First, try using that file with no special directory specified.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ for ac_dir in $ac_x_header_dirs; do
+ if test -r "$ac_dir/X11/Xlib.h"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+done
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+ # Check for the libraries.
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS=$LIBS
+ LIBS="-lX11 $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+int
+main ()
+{
+XrmInitialize ()
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ LIBS=$ac_save_LIBS
+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+ # Don't even attempt the hair of trying to link an X program!
+ for ac_extension in a so sl dylib la dll; do
+ if test -r "$ac_dir/libX11.$ac_extension"; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+case $ac_x_includes,$ac_x_libraries in #(
+ no,* | *,no | *\'*)
+ # Didn't find X, or a directory has "'" in its name.
+ ac_cv_have_x="have_x=no";; #(
+ *)
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$ac_x_includes'\
+ ac_x_libraries='$ac_x_libraries'"
+esac
+fi
+;; #(
+ *) have_x=yes;;
+ esac
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
+$as_echo "$have_x" >&6; }
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$x_includes'\
+ ac_x_libraries='$x_libraries'"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
+$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
+fi
+
+if test "$no_x" = yes; then
+ # Not all programs may use this symbol, but it does not hurt to define it.
+
+$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
+
+ X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+ if test -n "$x_includes"; then
+ X_CFLAGS="$X_CFLAGS -I$x_includes"
+ fi
+
+ # It would also be nice to do this for all -L options, not just this one.
+ if test -n "$x_libraries"; then
+ X_LIBS="$X_LIBS -L$x_libraries"
+ # For Solaris; some versions of Sun CC require a space after -R and
+ # others require no space. Words are not sufficient . . . .
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
+$as_echo_n "checking whether -R must be followed by a space... " >&6; }
+ ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+ ac_xsave_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ X_LIBS="$X_LIBS -R$x_libraries"
+else
+ LIBS="$ac_xsave_LIBS -R $x_libraries"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ X_LIBS="$X_LIBS -R $x_libraries"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
+$as_echo "neither works" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_c_werror_flag=$ac_xsave_c_werror_flag
+ LIBS=$ac_xsave_LIBS
+ fi
+
+ # Check for system-dependent libraries X programs must link with.
+ # Do this before checking for the system-independent R6 libraries
+ # (-lICE), since we may need -lsocket or whatever for X linking.
+
+ if test "$ISC" = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+ else
+ # Martyn Johnson says this is needed for Ultrix, if the X
+ # libraries were built with DECnet support. And Karl Berry says
+ # the Alpha needs dnet_stub (dnet does not exist).
+ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XOpenDisplay ();
+int
+main ()
+{
+return XOpenDisplay ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
+if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dnet_dnet_ntoa=yes
+else
+ ac_cv_lib_dnet_dnet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+fi
+
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
+if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dnet_stub_dnet_ntoa=yes
+else
+ ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+fi
+
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$ac_xsave_LIBS"
+
+ # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+ # to get the SysV transport functions.
+ # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
+ # needs -lnsl.
+ # The nsl library prevents programs from opening the X display
+ # on Irix 5.2, according to T.E. Dickey.
+ # The functions gethostbyname, getservbyname, and inet_addr are
+ # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+ ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
+
+fi
+
+ if test $ac_cv_func_gethostbyname = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_nsl_gethostbyname=yes
+else
+ ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+fi
+
+ if test $ac_cv_lib_nsl_gethostbyname = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
+$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
+if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_bsd_gethostbyname=yes
+else
+ ac_cv_lib_bsd_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
+$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
+if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+fi
+
+ fi
+ fi
+
+ # lieder@skyler.mavd.honeywell.com says without -lsocket,
+ # socket/setsockopt and other routines are undefined under SCO ODT
+ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
+ # on later versions), says Simon Leinen: it contains gethostby*
+ # variants that don't use the name server (or something). -lsocket
+ # must be given before -lnsl if both are needed. We assume that
+ # if connect needs -lnsl, so does gethostbyname.
+ ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
+if test "x$ac_cv_func_connect" = xyes; then :
+
+fi
+
+ if test $ac_cv_func_connect = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
+$as_echo_n "checking for connect in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_connect+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+int
+main ()
+{
+return connect ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_socket_connect=yes
+else
+ ac_cv_lib_socket_connect=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
+$as_echo "$ac_cv_lib_socket_connect" >&6; }
+if test "x$ac_cv_lib_socket_connect" = xyes; then :
+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+fi
+
+ fi
+
+ # Guillermo Gomez says -lposix is necessary on A/UX.
+ ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
+if test "x$ac_cv_func_remove" = xyes; then :
+
+fi
+
+ if test $ac_cv_func_remove = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
+$as_echo_n "checking for remove in -lposix... " >&6; }
+if ${ac_cv_lib_posix_remove+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char remove ();
+int
+main ()
+{
+return remove ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_posix_remove=yes
+else
+ ac_cv_lib_posix_remove=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
+$as_echo "$ac_cv_lib_posix_remove" >&6; }
+if test "x$ac_cv_lib_posix_remove" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+fi
+
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
+if test "x$ac_cv_func_shmat" = xyes; then :
+
+fi
+
+ if test $ac_cv_func_shmat = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
+$as_echo_n "checking for shmat in -lipc... " >&6; }
+if ${ac_cv_lib_ipc_shmat+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shmat ();
+int
+main ()
+{
+return shmat ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ipc_shmat=yes
+else
+ ac_cv_lib_ipc_shmat=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
+$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
+if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+fi
+
+ fi
+ fi
+
+ # Check for libraries that X11R6 Xt/Xaw programs need.
+ ac_save_LDFLAGS=$LDFLAGS
+ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+ # check for ICE first), but we must link in the order -lSM -lICE or
+ # we get undefined symbols. So assume we have SM if we have ICE.
+ # These have to be linked with before -lX11, unlike the other
+ # libraries we check for below, so use a different variable.
+ # John Interrante, Karl Berry
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
+$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
+if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char IceConnectionNumber ();
+int
+main ()
+{
+return IceConnectionNumber ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+ ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+fi
+
+ LDFLAGS=$ac_save_LDFLAGS
+
+fi
+
+ ;;
+esac
+
+
+
+
+# Check whether --enable-gdb-stub was given.
+if test "${enable_gdb_stub+set}" = set; then :
+ enableval=$enable_gdb_stub;
+ $as_echo "#define GDB_STUB 1" >>confdefs.h
+
+ wantgdbstub=yes
+
+fi
+
+ if test "${wantgdbstub}" = "yes"; then
+ HAVE_GDB_STUB_TRUE=
+ HAVE_GDB_STUB_FALSE='#'
+else
+ HAVE_GDB_STUB_TRUE='#'
+ HAVE_GDB_STUB_FALSE=
+fi
+
+
+
+# for developer use, enable lots of compile warnings,
+# but don't require this generally, because some system's
+# header files (BSD) can't handle it
+#
+# NB: must add -Werror after AC_PROG_CC, etc., so do this last
+# Check whether --enable-hardcore was given.
+if test "${enable_hardcore+set}" = set; then :
+ enableval=$enable_hardcore; case "${enableval}" in
+ yes) ENABLE_HARDCORE=1 ;;
+ no) ENABLE_HARDCORE=0 ;;
+ *) as_fn_error $? "bad value ${enableval} for --enable-hardcore" "$LINENO" 5 ;; esac
+else
+ ENABLE_HARDCORE=0
+fi
+
+
+if test "x$ENABLE_HARDCORE" = "x1"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: enable hardcore compile warnings" >&5
+$as_echo "$as_me: WARNING: enable hardcore compile warnings" >&2;}
+ if test "x$CXX" = "x"; then
+ CPPFLAGS="$CPPFLAGS -Wmissing-prototypes"
+ fi
+ CPPFLAGS="$CPPFLAGS -Wall -Wextra -D_FORTIFY_SOURCE=2 -Wno-missing-field-initializers -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-unused-parameter -Wmissing-declarations -Wundef -Wmissing-noreturn -Wredundant-decls -Wformat-nonliteral -Wformat-security -Winit-self -Wno-reorder"
+fi
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+ enableval=$enable_debug; $as_echo "#define DEBUG 1" >>confdefs.h
+
+fi
+
+# Check whether --enable-gpu-debug was given.
+if test "${enable_gpu_debug+set}" = set; then :
+ enableval=$enable_gpu_debug; $as_echo "#define GPUDEBUG 1" >>confdefs.h
+
+fi
+
+# Check whether --enable-div-debug was given.
+if test "${enable_div_debug+set}" = set; then :
+ enableval=$enable_div_debug; $as_echo "#define DIVDEBUG 1" >>confdefs.h
+
+fi
+
+# Check whether --enable-sqrt-debug was given.
+if test "${enable_sqrt_debug+set}" = set; then :
+ enableval=$enable_sqrt_debug; $as_echo "#define SQRTDEBUG 1" >>confdefs.h
+
+fi
+
+# Check whether --enable-dma-debug was given.
+if test "${enable_dma_debug+set}" = set; then :
+ enableval=$enable_dma_debug; $as_echo "#define DMADEBUG 1" >>confdefs.h
+
+fi
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile ${PO_MAKEFILE} src/Makefile src/cli/Makefile src/cli/doc/Makefile src/gtk/Makefile src/gtk/doc/Makefile src/gtk-glade/Makefile src/gtk-glade/doc/Makefile src/wx/Makefile src/gdbstub/Makefile autopackage/default.apspec"
+
+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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; 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
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_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}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+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=`$as_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.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+
+ ac_config_commands="$ac_config_commands po/stamp-it"
+
+
+if test -z "${HAVE_GL_TRUE}" && test -z "${HAVE_GL_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_GL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LIBOSMESA_TRUE}" && test -z "${HAVE_LIBOSMESA_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_LIBOSMESA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_OPENAL_TRUE}" && test -z "${HAVE_OPENAL_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_OPENAL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LUA_TRUE}" && test -z "${HAVE_LUA_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_LUA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_ALSA_TRUE}" && test -z "${HAVE_ALSA_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_ALSA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LIBAGG_TRUE}" && test -z "${HAVE_LIBAGG_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_LIBAGG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LIBSOUNDTOUCH_TRUE}" && test -z "${HAVE_LIBSOUNDTOUCH_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_LIBSOUNDTOUCH\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_WX_TRUE}" && test -z "${HAVE_WX_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_WX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_GDB_STUB_TRUE}" && test -z "${HAVE_GDB_STUB_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_GDB_STUB\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $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}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## 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=:
+ # Pre-4.2 versions of Zsh do 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_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+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.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+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
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# 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
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+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 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ 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
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_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 ||
+$as_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" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+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
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 desmume $as_me 0.9.8, which was
+generated by GNU Autoconf 2.68. 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
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ 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
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+desmume config.status 0.9.8
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 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'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+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=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ 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 )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_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.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append 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 || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "${PO_MAKEFILE}") CONFIG_FILES="$CONFIG_FILES ${PO_MAKEFILE}" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "src/cli/Makefile") CONFIG_FILES="$CONFIG_FILES src/cli/Makefile" ;;
+ "src/cli/doc/Makefile") CONFIG_FILES="$CONFIG_FILES src/cli/doc/Makefile" ;;
+ "src/gtk/Makefile") CONFIG_FILES="$CONFIG_FILES src/gtk/Makefile" ;;
+ "src/gtk/doc/Makefile") CONFIG_FILES="$CONFIG_FILES src/gtk/doc/Makefile" ;;
+ "src/gtk-glade/Makefile") CONFIG_FILES="$CONFIG_FILES src/gtk-glade/Makefile" ;;
+ "src/gtk-glade/doc/Makefile") CONFIG_FILES="$CONFIG_FILES src/gtk-glade/doc/Makefile" ;;
+ "src/wx/Makefile") CONFIG_FILES="$CONFIG_FILES src/wx/Makefile" ;;
+ "src/gdbstub/Makefile") CONFIG_FILES="$CONFIG_FILES src/gdbstub/Makefile" ;;
+ "autopackage/default.apspec") CONFIG_FILES="$CONFIG_FILES autopackage/default.apspec" ;;
+ "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ 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_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= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' >$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[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="$ac_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 ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append 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 '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ 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 ||
+$as_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"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_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
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# 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=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ 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 || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;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
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_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 "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ 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.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/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 ||
+$as_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 ||
+$as_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; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac ;;
+ "po/stamp-it":C)
+ if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
+ as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
+ fi
+ rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
+ >"po/stamp-it.tmp"
+ sed '/^#/d
+ s/^[[].*] *//
+ /^[ ]*$/d
+ '"s|^| $ac_top_srcdir/|" \
+ "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
+
+ sed '/^POTFILES =/,/[^\\]$/ {
+ /^POTFILES =/!d
+ r po/POTFILES
+ }
+ ' "po/Makefile.in" >"po/Makefile"
+ rm -f "po/Makefile.tmp"
+ mv "po/stamp-it.tmp" "po/stamp-it"
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# 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 || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/jni/desmume/configure.ac b/jni/desmume/configure.ac
new file mode 100755
index 0000000..acce114
--- /dev/null
+++ b/jni/desmume/configure.ac
@@ -0,0 +1,389 @@
+dnl --- Package name is first argument to AC_INIT
+dnl --- Release version is second argument to AC_INIT
+
+AC_INIT(desmume, [0.9.8])
+
+dnl -- find host architecture for some os specific libraries
+AC_CANONICAL_HOST
+case $host in
+ *linux*) desmume_arch=linux;;
+ *mingw*) desmume_arch=windows;;
+ *darwin*) desmume_arch=linux;;
+ *bsd*) desmume_arch=linux;;
+esac
+AC_SUBST(desmume_arch)
+
+AM_INIT_AUTOMAKE([1.10])
+
+dnl -- make sure we have a c++ compiler
+AC_PROG_CXX
+
+dnl -- use ranlib for libraries
+AC_PROG_RANLIB
+
+dnl -- check for endianess
+AC_C_BIGENDIAN
+
+# took this from geany, hope it works
+REVISION="r0"
+SVN=`which svn 2>/dev/null`
+if test -d ".svn" -a "x${SVN}" != "x" -a -x "${SVN}" ; then
+ REVISION=r`$SVN info|grep 'Last Changed Rev'|cut -d' ' -f4`
+fi
+AC_DEFINE_UNQUOTED([SVN_REV], "$REVISION", [subversion revision number])
+
+
+dnl --- Other prerequisites ---
+dnl - Check for pkg-config macros
+m4_ifdef([PKG_PROG_PKG_CONFIG], [PKG_PROG_PKG_CONFIG])
+dnl - Check for intltool/gettext macros
+m4_ifdef([IT_PROG_INTLTOOL],[IT_PROG_INTLTOOL])
+
+AC_CHECK_TOOL(HAVE_PKG, pkg-config, [])
+if test "xHAVE_PKG" = "x" ; then
+ AC_MSG_ERROR([pkg-config is required to build desmume])
+fi
+
+dnl - Check for zlib
+AC_CHECK_LIB(z, gzopen, [], [AC_MSG_ERROR([zlib was not found, we can't go further. Please install it or specify the location where it's installed.])])
+
+dnl - Check for zziplib
+AC_CHECK_LIB(zzip, zzip_open, [
+ LIBS="-lzzip $LIBS"
+ AC_DEFINE([HAVE_LIBZZIP])
+ AC_MSG_CHECKING([[whether zzip use void * as second parameter]])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[
+ void * v;
+ zzip_read(NULL, v, 0);]])],
+ AC_MSG_RESULT(yes),
+ AC_DEFINE([ZZIP_OLD_READ])
+ AC_MSG_RESULT(no))
+])
+
+dnl - Check for SDL
+AC_PATH_PROGS(SDLCONFIG, [sdl-config sdl11-config])
+if test ! "x$SDLCONFIG" = "x" ; then
+ SDL_CFLAGS=`$SDLCONFIG --cflags`
+ SDL_LIBS=`$SDLCONFIG --libs`
+ AC_SUBST(SDL_CFLAGS)
+ AC_SUBST(SDL_LIBS)
+else
+ AC_MSG_ERROR([sdl is required to build desmume])
+fi
+
+dnl - Check for the OpenGL includes
+AC_CHECK_HEADERS([GL/gl.h],
+ [AC_CHECK_HEADERS([GL/glu.h], [have_gl_h=yes LIBS="$LIBS -lGLU"], [have_gl_h=no])],
+ [have_gl_h=no])
+if test "have_gl_h" = "no" ; then
+ AC_MSG_WARN([Building without GL support because of missing headers.])
+fi
+AM_CONDITIONAL([HAVE_GL], [test "${have_gl_h}" = "yes"])
+
+dnl - if --enable-osmesa is used, check for it
+AC_ARG_ENABLE([osmesa],
+ [AC_HELP_STRING([--enable-osmesa], [use off-screen mesa])],
+ [osmesa=$enableval],
+ [osmesa=yes])
+
+if test "x$osmesa" = "xyes" ; then
+ AC_CHECK_LIB(dl, main)
+ AC_CHECK_LIB([GL], main)
+ AC_CHECK_LIB(OSMesa, main,[
+ useosmesa=yes
+ AC_DEFINE(HAVE_LIBOSMESA)
+ OSMESA_LIBS="-lOSMesa"
+ AC_SUBST(OSMESA_LIBS)
+ ])
+fi
+AM_CONDITIONAL([HAVE_LIBOSMESA], [test "${useosmesa}" = "yes"])
+
+dnl - make the usage of libagg for HUD rendering configurable
+AC_ARG_ENABLE([hud],
+ [AC_HELP_STRING([--enable-hud], [Enable HUD rendering, requires libagg])],
+ [libagg=yes])
+
+dnl - hack to help zero build gtk frontend macos x package
+AC_ARG_ENABLE(macosxhack,
+ [AC_HELP_STRING(--enable-macosxhack, hack to build MacOSX package)],
+ [GTK_MACOSX_HACK=yes])
+
+HAVE_OPENAL=no
+dnl - openal support
+AC_ARG_ENABLE(openal,
+ [AC_HELP_STRING(--enable-openal, enable experimental OpenAL microphone input)],
+ [openal=yes])
+
+if test "x$openal" = "xyes" ; then
+ AC_CHECK_LIB([openal], [main],[
+ HAVE_OPENAL=yes
+ LIBS="$LIBS -lopenal"
+ ])
+fi
+AM_CONDITIONAL([HAVE_OPENAL], [test "${HAVE_OPENAL}" = "yes"])
+
+dnl - Check for GTK and/or libglade
+FOUND_GLIB=no
+HAVE_ALSA=no
+GLIB_VER=2.8
+GTK_VER=2.14
+
+PKG_CHECK_MODULES(GLIB,
+ glib-2.0 >= $GLIB_VER,
+ FOUND_GLIB=yes,
+ FOUND_GLIB=no)
+if test "x$FOUND_GLIB" = "xno"; then
+ if test ! "x$GTK_MACOSX_HACK" = "xyes"; then
+ AC_MSG_ERROR([Glib is required to build desmume])
+ fi
+fi
+
+PKG_CHECK_MODULES(GTK,
+ gtk+-2.0 >= $GTK_VER,
+ HAVE_GTK=yes,
+ HAVE_GTK=no)
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_LIBS)
+
+
+PKG_CHECK_MODULES(GTHREAD,
+ "gthread-2.0",
+ HAVE_GTHREAD=yes,
+ HAVE_GTHREAD=no)
+AC_SUBST(GTHREAD_CFLAGS)
+AC_SUBST(GTHREAD_LIBS)
+
+AC_ARG_ENABLE([glade],
+ [AC_HELP_STRING([--enable-glade], [enable glade frontend])],
+ [glade=$enableval],
+ [glade=yes])
+
+if test "x$glade" = "xyes" ; then
+ PKG_CHECK_MODULES(LIBGLADE,
+ "libglade-2.0",
+ HAVE_LIBGLADE=yes,
+ HAVE_LIBGLADE=no)
+ AC_SUBST(LIBGLADE_CFLAGS)
+ AC_SUBST(LIBGLADE_LIBS)
+
+ dnl uninstalled glade ui dir
+ AC_DEFINE_UNQUOTED(GLADEUI_UNINSTALLED_DIR,"`pwd`/src/gtk-glade/glade/",[path to glade ui dir])
+ AC_SUBST(GLADEUI_UNINSTALLED_DIR)
+
+ PKG_CHECK_MODULES(GTKGLEXT,
+ "gtkglext-1.0",
+ AC_DEFINE([GTKGLEXT_AVAILABLE], [1])
+ [])
+ AC_SUBST(GTKGLEXT_CFLAGS)
+ AC_SUBST(GTKGLEXT_LIBS)
+fi
+
+AC_PATH_PROG(UPDATEDESKTOP, [update-desktop-database])
+
+# Need check for both lua and lua5.1 to run on debian, see mysql bug #29945
+PKG_CHECK_MODULES(LUA,
+ lua >= 5.1,
+ HAVE_LUA=yes,
+ HAVE_LUA=no)
+PKG_CHECK_MODULES(LUA,
+ lua5.1 >= 5.1,
+ HAVE_LUA=yes,
+ HAVE_LUA=no)
+AC_SUBST(LUA_CFLAGS)
+AC_SUBST(LUA_LIBS)
+dnl -- force lua disabled
+AM_CONDITIONAL([HAVE_LUA], [test "${HAVE_LUA}x" = "yes"])
+
+if test ! "x$HAVE_OPENAL" = "xyes" ; then
+ PKG_CHECK_MODULES(ALSA, alsa >= 1.0, HAVE_ALSA=yes, HAVE_ALSA=no)
+ AC_SUBST(ALSA_CFLAGS)
+ AC_SUBST(ALSA_LIBS)
+fi
+AM_CONDITIONAL([HAVE_ALSA], [test "${HAVE_ALSA}" = "yes"])
+
+PKG_CHECK_MODULES(LIBAGG, libagg >= 2.5.0, FOUND_LIBAGG=yes, FOUND_LIBAGG=no)
+AM_CONDITIONAL([HAVE_LIBAGG], [test "x$libagg" = "xyes" -a "${FOUND_LIBAGG}" = "yes"])
+if test "x$libagg" = "xyes" ; then
+ if test "x$FOUND_LIBAGG" = "xyes" ; then
+ AC_SUBST(LIBAGG_CFLAGS)
+ AC_SUBST(LIBAGG_LIBS)
+ AC_DEFINE([HAVE_LIBAGG])
+ else
+ AC_MSG_WARN([HUD rendering enabled, but libagg not found])
+ fi
+fi
+
+PKG_CHECK_MODULES(LIBSOUNDTOUCH, soundtouch >= 1.5.0, HAVE_LIBSOUNDTOUCH=yes, HAVE_LIBSOUNDTOUCH=no)
+AC_SUBST(LIBSOUNDTOUCH_CFLAGS)
+AC_SUBST(LIBSOUNDTOUCH_LIBS)
+AM_CONDITIONAL([HAVE_LIBSOUNDTOUCH], [test "${HAVE_LIBSOUNDTOUCH}" = "yes"])
+if test "x$HAVE_LIBSOUNDTOUCH" = "xyes"; then
+ AC_DEFINE([HAVE_LIBSOUNDTOUCH])
+else
+ AC_MSG_WARN([SoundTouch library not found, pcsx2 resampler will be disabled])
+fi
+
+if test "x$HAVE_ALSA" = "xno"; then
+ if test "x$HAVE_OPENAL" = "xno"; then
+ AC_DEFINE([FAKE_MIC])
+ fi
+fi
+
+dnl - Check for wxWidgets
+
+dnl - if --enable-wxwidgets is used, check for it
+AC_ARG_ENABLE([wxwidgets],
+ [AC_HELP_STRING([--enable-wxwidgets], [Enable cross platform wx widgets frontend])],
+ [wxwidgets=$enableval],
+ [wxwidgets=no])
+if test "x$wxwidgets" = "xyes" ; then
+ m4_include(wxwin.m4)
+ AM_PATH_WXCONFIG([2.4.0], wxwin=yes)
+ if test "x$wxwin" = "xyes"; then
+ AC_SUBST(WX_CPPFLAGS)
+ AC_SUBST(WX_LIBS)
+ AC_DEFINE([WANT_WX])
+ fi
+fi
+
+AM_CONDITIONAL([HAVE_WX], [test "x$wxwidgets" = "xyes"])
+
+dnl - Determine which UIs to build and if po/ should be included
+PO_DIR=""
+UI_DIR="cli $UI_DIR"
+if test "x$HAVE_GTK" = "xyes"; then
+ UI_DIR="gtk $UI_DIR"
+fi
+if test "x$wxwin" = "xyes"; then
+ UI_DIR="wx $UI_DIR"
+fi
+
+if test "x$HAVE_LIBGLADE" = "xyes"; then
+ AC_PROVIDE_IFELSE([IT_PROG_INTLTOOL],[
+ UI_DIR="gtk-glade $UI_DIR"
+
+ dnl -- localization for gtk-glade UI
+ GETTEXT_PACKAGE=desmume
+ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the gettext package name])
+ AC_SUBST(GETTEXT_PACKAGE)
+ ALL_LINGUAS="fr nb pt_BR sv zh_CN zh_TW"
+ AM_GLIB_GNU_GETTEXT
+ PO_DIR="po"
+ PO_MAKEFILE="po/Makefile.in"
+ ],[
+ echo "WARNING: intltool and/or gettext are not available therefore the gtk-glade interface won't be installed."
+ ])
+fi
+
+dnl - wifi support
+AC_ARG_ENABLE(wifi,
+ [AC_HELP_STRING(--enable-wifi, enable experimental wifi comm support)],
+ [
+ AC_CHECK_LIB(pcap, main,[
+ AC_DEFINE(EXPERIMENTAL_WIFI_COMM)
+ LIBS="$LIBS -lpcap"],
+ [AC_MSG_WARN([pcap library not found, wifi will not work])])
+ ])
+
+dnl Set compiler library flags per host architecture
+case $host in
+ *mingw*)
+ LIBS="$LIBS -ldxguid -ldxerr8 -ldsound -lopengl32 -lws2_32 -mwindows"
+ UI_DIR="windows"
+ ;;
+ *darwin*)
+ if test "x$GTK_MACOSX_HACK" = "xyes" ; then
+ LIBS="$LIBS -framework Gtk -framework GLib"
+ CPPFLAGS="$CPPFLAGS -I/Library/Frameworks/Cairo.framework/Headers -I/Library/Frameworks/Gtk.framework/Headers -I/Library/Frameworks/GLib.framework/Headers"
+ GLIB_LIBS=""
+ AC_SUBST(GLIB_LIBS)
+ fi
+ dnl - openal is required on mac os x and we are not able to figure out if it's installed or not
+ AC_DEFINE(HAVE_OPENAL)
+ LIBS="$LIBS -framework OpenGL -framework OpenAL"
+ CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/OpenAL.framework/Headers"
+ AC_SUBST(CPPFLAGS)
+ dnl - extra hackery needed for X includes
+ AC_PATH_XTRA
+ ;;
+esac
+
+AC_SUBST(UI_DIR)
+AC_SUBST(PO_DIR)
+
+dnl - Gdb stub
+AC_ARG_ENABLE(gdb-stub,
+ [AC_HELP_STRING(--enable-gdb-stub, enable gdb stub)],
+ [
+ AC_DEFINE(GDB_STUB)
+ wantgdbstub=yes
+ ])
+AM_CONDITIONAL([HAVE_GDB_STUB], [test "${wantgdbstub}" = "yes"])
+
+dnl - Compiler warnings
+
+# for developer use, enable lots of compile warnings,
+# but don't require this generally, because some system's
+# header files (BSD) can't handle it
+#
+# NB: must add -Werror after AC_PROG_CC, etc., so do this last
+AC_ARG_ENABLE(hardcore,
+ [AC_HELP_STRING(--enable-hardcore, turn on -W -Wall -Werror)],
+ [case "${enableval}" in
+ yes) ENABLE_HARDCORE=1 ;;
+ no) ENABLE_HARDCORE=0 ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-hardcore) ;; esac],
+ [ENABLE_HARDCORE=0])
+
+if test "x[$]ENABLE_HARDCORE" = "x1"; then
+ AC_MSG_WARN(enable hardcore compile warnings)
+ if test "x$CXX" = "x"; then
+ dnl - only valid for C with newer gcc's
+ CPPFLAGS="[$]CPPFLAGS -Wmissing-prototypes"
+ fi
+ dnl - -Wshadow
+ CPPFLAGS="[$]CPPFLAGS -Wall -Wextra -D_FORTIFY_SOURCE=2 -Wno-missing-field-initializers -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-unused-parameter -Wmissing-declarations -Wundef -Wmissing-noreturn -Wredundant-decls -Wformat-nonliteral -Wformat-security -Winit-self -Wno-reorder"
+fi
+
+dnl - Enable debug mode
+AC_ARG_ENABLE(debug,
+ AC_HELP_STRING(--enable-debug, enable debug information),
+ AC_DEFINE(DEBUG))
+AC_ARG_ENABLE(gpu-debug,
+ AC_HELP_STRING(--enable-gpu-debug, enable gpu debug information),
+ AC_DEFINE(GPUDEBUG))
+AC_ARG_ENABLE(div-debug,
+ AC_HELP_STRING(--enable-div-debug, enable div debug information),
+ AC_DEFINE(DIVDEBUG))
+AC_ARG_ENABLE(sqrt-debug,
+ AC_HELP_STRING(--enable-sqrt-debug, enable sqrt debug information),
+ AC_DEFINE(SQRTDEBUG))
+AC_ARG_ENABLE(dma-debug,
+ AC_HELP_STRING(--enable-dma-debug, enable dma debug information),
+ AC_DEFINE(DMADEBUG))
+
+dnl - Enable memory profiling (disabled)
+dnl - AC_ARG_ENABLE(memory-profiling,
+dnl - AC_HELP_STRING(--enable-memory-profiling, enable memory profiling information),
+dnl - AC_DEFINE(PROFILE_MEMORY_ACCESS))
+
+dnl -- set maintainer mode
+AM_MAINTAINER_MODE
+AC_SUBST(USE_MAINTAINER_MODE)
+
+
+dnl --- Finally, output all the makefiles
+AC_CONFIG_FILES([Makefile
+ ${PO_MAKEFILE}
+ src/Makefile
+ src/cli/Makefile
+ src/cli/doc/Makefile
+ src/gtk/Makefile
+ src/gtk/doc/Makefile
+ src/gtk-glade/Makefile
+ src/gtk-glade/doc/Makefile
+ src/wx/Makefile
+ src/gdbstub/Makefile
+ autopackage/default.apspec
+])
+AC_OUTPUT
diff --git a/jni/desmume/depcomp b/jni/desmume/depcomp
new file mode 100755
index 0000000..25a39e6
--- /dev/null
+++ b/jni/desmume/depcomp
@@ -0,0 +1,708 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2012-03-27.16; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011, 2012 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, see .
+
+# 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 outputting dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to .
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+
+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
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
+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.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ 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 ' ' "$nl" < "$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. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
+## 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 "s|.*$object$||" -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 ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr "$nl" ' ' >> "$depfile"
+ echo >> "$depfile"
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' "$nl" < "$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"
+ ;;
+
+xlc)
+ # 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
+ ;;
+
+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.
+ 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
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ # 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$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 anf tcc (Tiny C Compiler) understand '-MD -MF file'.
+ # However on
+ # $CC -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 ... \
+ # ...
+ # tcc 0.9.26 (FIXME still under development at the moment of writing)
+ # will emit a similar output, but also prepend the continuation lines
+ # with horizontal tabulation characters.
+ "$@" -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 -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
+ < "$tmpdepfile" > "$depfile"
+ sed '
+ s/[ '"$tab"'][ '"$tab"']*/ /g
+ s/^ *//
+ s/ *\\*$//
+ s/^[^:]*: *//
+ /^$/d
+ /:$/d
+ s/$/ :/
+ ' < "$tmpdepfile" >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ 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
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+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
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test "$stat" = 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/'"$tab"'/
+ G
+ p
+}' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # 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
+ ;;
+
+#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 "X$1" != 'X--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:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' "$nl" < "$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 "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ 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.
+ -arch)
+ eat=yes ;;
+ -*|$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"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
+## 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 "X$1" != 'X--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 -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [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.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # 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
+ ;;
+
+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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/jni/desmume/dsm.txt b/jni/desmume/dsm.txt
new file mode 100755
index 0000000..2942abb
--- /dev/null
+++ b/jni/desmume/dsm.txt
@@ -0,0 +1,74 @@
+DSM is ascii plain text. It is derived from the FCEUX FM2 format.
+It consists of several key-value pairs followed by an inputlog section.
+The inputlog section can be identified by its starting with a | (pipe).
+The inputlog section terminates at eof.
+Newlines may be \r\n or \n
+
+Key-value pairs consist of a key identifier, followed by a space separator, followed by the value text.
+Value text is always terminated by a newline, which the value text will not include.
+The value text is parsed differently depending on the type of the key.
+The key-value pairs may be in any order, except that the first key must be version.
+
+Integer keys (also used for booleans, with a 1 or 0) will have a value that is a simple integer not to exceed 32bits
+ - version (required) - the version of the movie file format; for now it is always 3
+ - emuVersion (required) - the version of the emulator used to produce the movie
+ - rerecordCount (optional) - the rerecord count
+ - romChecksum (optional) - the CRC32 of the rom used to make the movie. should match values specified on advanscene.com
+ - romSerial (optional) - a concatenation of other uniquely identifying information about the rom (name,gamecode,makercode)
+ - useExtBios (optional) - were bios files was used? defaults to false.
+ - swiFromBios (optional) - were swi emulated by ExtBios? (alternative is internal HLE bios). defaults to false.
+
+The rom identification information may be used at a later point to warn about mismatches between movies and roms, but is not right now.
+
+String keys have values that consist of the remainder of the key-value pair line. As a consequence, string values cannot contain newlines.
+ - romFilename (required) - the name of the file used to record the movie
+ - comment (optional) - simply a memo.
+ by convention, the first token in the comment value is the subject of the comment.
+ by convention, subsequent comments with the same subject will have their ordering preserved and may be used to approximate multiline comments.
+ by convention, the author of the movie should be stored in comment(s) with a subject of: author
+
+Hex string keys (used for binary blobs) will have a value that is like 0x0123456789ABCDEF...
+ - romChecksum (required) - this is currently unused.
+
+GUID keys have a value which is in the standard guid format: 452DE2C3-EF43-2FA9-77AC-0677FC51543B
+ - guid (required) a unique identifier for a movie, generated when the movie is created, which is used when loading a savestate to make sure it belongs to the current movie.
+
+The inputlog section consists of lines beginning and ending with a | (pipe).
+The fields are as follows, except as noted in note C.
+|c|.............XXX YYY Z|
+
+'R','L','D','U','T','S','B','A','Y','X','W','E','G'
+
+field c is a variable length decimal integer which is a bitfield corresponding to miscellaneous input states which are valid at the start of the frame.
+Therefore, no miscellaneous commands is represented by a value of 0.
+Here are the currently defined bit values:
+0x01 - Microphone Noise (hardcoded noise sample; to be held through duration of frame)
+0x02 - Reset
+0x04 - Lid
+
+
+the format of the main section is as follows:
+
+ the field begins with 13 characters which constitute a bitfield.
+ any character other than ' ' or '.' means that the button was pressed.
+ by convention, the following mnemonics will be used in a column to remind us of which button corresponds to which column:
+ RLDUTSBAYXWEG (Right,Left,Down,Up,sTart,Select,B,A,Y,X,lshoulder,rshoulder,debuG)
+ This ordering is based on FCEUX to a certain extent, and arbitrary after that.
+ W and E were chosen for shoulders to suggest West and East for Left and Right.
+ While the emulator supports a 'lid' button, and to some extent a 'blow' button, these are not supported in the movies.
+
+ XXX: %03d, the x position of the stylus (0,0 topleft, 255,191 bottomright)
+ YYY: %03d, the y position of the stylus
+ Z: %1d, 1 if the stylus is pressed pressed; 0 if not
+
+Additional fields after this main section may be added later without breaking the file format.
+
+* Notes *
+A. There is no key-value pair that indicates the length of the movie. This must be read by scanning the inputlog and counting the number of lines.
+
+B. All movies start from power-on.
+
+C. The emulator uses these framerate constants
+ arm7_cycles_per_frame = 560190
+ frames_per_second = 59.8261
+
diff --git a/jni/desmume/dsv.txt b/jni/desmume/dsv.txt
new file mode 100755
index 0000000..2f5b63b
--- /dev/null
+++ b/jni/desmume/dsv.txt
@@ -0,0 +1,39 @@
+The desmume save file format is merely a raw save file with a FOOTER.
+
+This was chosen in order to maximize compatibility with other emulators,
+which tend load the savefile as-is and let the game read out of whatever range
+it is expecting. To assist with this, before writing the save file, desmume
+will pad the raw save file out to the next highest known length. Note that this
+may sometimes be incorrect if the savefile hasnt been written through to the end
+during initialization. This could cause other emulators to fail to recognize the
+save file.
+
+Additionally, the footer makes it easier to analyze save files, because the
+game's data will be at the correct addresses starting at offset 0x0000.
+
+The footer format can be identified by locating the 16Byte ascii string
+"|-DESMUME SAVE-|"
+at the end of the file. This corresponds with the following save structure:
+
+struct Footer {
+ u32 actually_written_size;
+ u32 padded_size;
+ u32 save_type; //(not currently used)
+ u32 address_size; //address bus size
+ u32 save_size; //size parameter of the save type (not currently used)
+ u32 version_number; //should be 0
+ char cookie[16];
+};
+
+note that padded_size should be where you see the end of the raw save data
+and the beginning of desmume-specific information, including some junk before
+the actual footer.
+
+actually_written_size is the highest address (plus one) written to by the game.
+
+The new desmume savefile system tries to make as few decisions as possible,
+which is the reason for the behavior of actually_written_size and the disuse
+of save_type and save_size. If few decisions are made, then few mistakes can
+be made. That is the idea, anyway. We'll make decisions later if we need to.
+save_type and save_size are reserved in case we do.
+
diff --git a/jni/desmume/install-sh b/jni/desmume/install-sh
new file mode 100755
index 0000000..a9244eb
--- /dev/null
+++ b/jni/desmume/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-01-19.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# 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.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for `test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # 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 $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/jni/desmume/missing b/jni/desmume/missing
new file mode 100755
index 0000000..86a8fc3
--- /dev/null
+++ b/jni/desmume/missing
@@ -0,0 +1,331 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2012-01-06.13; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+# Originally by Fran,cois 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, see .
+
+# 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.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -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
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
+ 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
+ help2man touch the output file
+ 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]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to ."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. 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 $msg. You should only need it if
+ you modified \`${configure_ac}'. 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 $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. 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_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case $f in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ 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$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te*)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison*|yacc*)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. 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 test $# -ne 1; then
+ eval LASTARG=\${$#}
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex*|flex*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. 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 test $# -ne 1; then
+ eval LASTARG=\${$#}
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit $?
+ fi
+ ;;
+
+ makeinfo*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. 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."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ 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 prerequisites 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
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/jni/desmume/src/Disassembler.cpp b/jni/desmume/src/Disassembler.cpp
new file mode 100755
index 0000000..49f18c4
--- /dev/null
+++ b/jni/desmume/src/Disassembler.cpp
@@ -0,0 +1,3782 @@
+/*
+ Copyright (C) 2006 yopyop
+ Copyright (C) 2006-2012 DeSmuME team
+
+ 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 file 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 the this software. If not, see .
+*/
+
+#include
+#include
+#include "Disassembler.h"
+#include "bits.h"
+
+#define ROR(i, j) ((((u32)(i))>>(j)) | (((u32)(i))<<(32-(j))))
+
+const char Condition[16][3] = {
+ "EQ",
+ "NE",
+ "CS",
+ "CC",
+ "MI",
+ "PL",
+ "VS",
+ "VC",
+ "HI",
+ "LS",
+ "GE",
+ "LT",
+ "GT",
+ "LE",
+ "",
+ ""
+ };
+
+const char Registre[16][4] = {
+ "R0",
+ "R1",
+ "R2",
+ "R3",
+ "R4",
+ "R5",
+ "R6",
+ "R7",
+ "R8",
+ "R9",
+ "R10",
+ "R11",
+ "R12",
+ "SP",
+ "LR",
+ "PC",
+ };
+
+const char MSR_FIELD[16][5] = {
+ "",
+ "c",
+ "x",
+ "xc",
+ "s",
+ "sc",
+ "sx",
+ "sxc",
+ "f",
+ "fc",
+ "fx",
+ "fxc",
+ "fs",
+ "fsc",
+ "fsx",
+ "fsxc"
+ };
+
+#define DATAPROC_LSL_IMM(nom, s) char tmp[10] = "";\
+ if(((i>>7)&0x1F)!=0)\
+ sprintf(tmp, ", LSL #%X", (int)((i>>7)&0x1F));\
+ sprintf(txt, "%s%s%s %s, %s, %s%s",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ s,\
+ Registre[REG_POS(i,12)],\
+ Registre[REG_POS(i,16)],\
+ Registre[REG_POS(i,0)],\
+ tmp);
+#define DATAPROC_ROR_IMM(nom, s) char tmp[10] = "";\
+ if(((i>>7)&0x1F)!=0)\
+ sprintf(tmp, ", RRX");\
+ sprintf(txt, "%s%s%s %s, %s, %s%s",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ s,\
+ Registre[REG_POS(i,12)],\
+ Registre[REG_POS(i,16)],\
+ Registre[REG_POS(i,0)],\
+ tmp\
+ );
+
+#define DATAPROC_REG_SHIFT(nom, shift,s) sprintf(txt, "%s%s%s %s, %s, %s, %s %s",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ s,\
+ Registre[REG_POS(i,12)],\
+ Registre[REG_POS(i,16)],\
+ Registre[REG_POS(i,0)],\
+ #shift,\
+ Registre[REG_POS(i,8)]\
+ );
+
+#define DATAPROC_IMM_SHIFT(nom, shift, s) sprintf(txt, "%s%s%s %s, %s, %s, %s #%X",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ s,\
+ Registre[REG_POS(i,12)],\
+ Registre[REG_POS(i,16)],\
+ Registre[REG_POS(i,0)],\
+ #shift,\
+ (int)((i>>7)&0x1F)\
+ );
+
+#define DATAPROC_IMM_VALUE(nom,s) u32 shift_op = ROR((i&0xFF), (i>>7)&0x1E);\
+ sprintf(txt, "%s%s%s %s, %s, #%X",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ s,\
+ Registre[REG_POS(i,12)],\
+ Registre[REG_POS(i,16)],\
+ (int)shift_op\
+ );
+
+#define DATAPROC_ONE_OP_LSL_IMM(nom, s, v) char tmp[10] = "";\
+ if(((i>>7)&0x1F)!=0)\
+ sprintf(tmp, ", LSL #%X", (int)((i>>7)&0x1F));\
+ sprintf(txt, "%s%s%s %s, %s%s",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ s,\
+ Registre[REG_POS(i,v)],\
+ Registre[REG_POS(i,0)],\
+ tmp);
+
+#define DATAPROC_ONE_OP_ROR_IMM(nom, s, v) char tmp[10] = "";\
+ if(((i>>7)&0x1F)==0)\
+ sprintf(tmp, ", RRX");\
+ else\
+ sprintf(tmp, ", ROR %d", (int)((i>>7)&0x1F));\
+ sprintf(txt, "%s%s%s %s, %s%s",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ s,\
+ Registre[REG_POS(i,v)],\
+ Registre[REG_POS(i,0)],\
+ tmp\
+ );
+
+#define DATAPROC_ONE_OP_REG_SHIFT(nom, shift,s, v) sprintf(txt, "%s%s%s %s, %s, %s %s",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ s,\
+ Registre[REG_POS(i,v)],\
+ Registre[REG_POS(i,0)],\
+ #shift,\
+ Registre[REG_POS(i,8)]\
+ );
+
+#define DATAPROC_ONE_OP_IMM_SHIFT(nom, shift, s, v) sprintf(txt, "%s%s%s %s, %s, %s #%X",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ s,\
+ Registre[REG_POS(i,v)],\
+ Registre[REG_POS(i,0)],\
+ #shift,\
+ (int)((i>>7)&0x1F)\
+ );
+
+#define DATAPROC_ONE_OP_IMM_VALUE(nom, s, v)\
+ u32 shift_op = ROR((i&0xFF), (i>>7)&0x1E);\
+ sprintf(txt, "%s%s%s %s, #%X",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ s,\
+ Registre[REG_POS(i,v)],\
+ (int)shift_op\
+ );
+
+#define SIGNEXTEND_24(i) (((i)&0xFFFFFF)|(0xFF000000*BIT23(i)))
+
+#define LDRSTR_LSL_IMM(nom, op, op2, op3) char tmp[10] = "";\
+ if(((i>>7)&0x1F)!=0)\
+ sprintf(tmp, ", LSL #%X", (int)((i>>7)&0x1F));\
+ sprintf(txt, "%s%s %s, [%s%s, %s%s%s%s",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ Registre[REG_POS(i,12)],\
+ Registre[REG_POS(i,16)],\
+ op2,\
+ op,\
+ Registre[REG_POS(i,0)],\
+ tmp,\
+ op3);
+#define LDRSTR_ROR_IMM(nom, op, op2, op3) char tmp[10] = "";\
+ if(((i>>7)&0x1F)!=0)\
+ sprintf(tmp, ", RRX");\
+ sprintf(txt, "%s%s %s, [%s%s, %s%s%s%s",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ Registre[REG_POS(i,12)],\
+ Registre[REG_POS(i,16)],\
+ op2,\
+ op,\
+ Registre[REG_POS(i,0)],\
+ tmp,\
+ op3\
+ );
+
+#define LDRSTR_IMM_SHIFT(nom, shift, op, op2, op3)\
+ sprintf(txt, "%s%s %s, [%s%s, %s%s, %s #%X%s",\
+ #nom,\
+ Condition[CONDITION(i)],\
+ Registre[REG_POS(i,12)],\
+ Registre[REG_POS(i,16)],\
+ op2,\
+ op,\
+ Registre[REG_POS(i,0)],\
+ #shift,\
+ (int)((i>>7)&0x1F),\
+ op3\
+ );
+
+#define RegList(nb) char lreg[100] = "";\
+ int prec = 0;\
+ int j;\
+ for(j = 0; j < nb; j++)\
+ {\
+ if(prec)\
+ {\
+ if((!BIT_N(i, j+1))||(j==nb-1))\
+ {\
+ sprintf(lreg + strlen(lreg), "%s,", Registre[j]);\
+ prec = 0;\
+ }\
+ }\
+ else\
+ {\
+ if(BIT_N(i, j))\
+ {\
+ if((BIT_N(i, j+1))&&(j!=nb-1))\
+ {\
+ sprintf(lreg + strlen(lreg), "%s-", Registre[j]);\
+ prec = 1;\
+ }\
+ else\
+ sprintf(lreg + strlen(lreg), "%s,", Registre[j]);\
+ }\
+ }\
+ }\
+ if(*lreg) lreg[strlen(lreg)-1]='\0';
+
+static char * OP_UND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "----");
+ return txt;
+}
+
+//-----------------------AND------------------------------------
+static char * OP_AND_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(AND, "");
+ return txt;
+}
+
+static char * OP_AND_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(AND, LSL, "");
+ return txt;
+}
+
+static char * OP_AND_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(AND, LSR, "");
+ return txt;
+}
+
+static char * OP_AND_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(AND, LSR, "");
+ return txt;
+}
+
+static char * OP_AND_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(AND, ASR, "");
+ return txt;
+}
+
+static char * OP_AND_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(AND, ASR, "");
+ return txt;
+}
+
+static char * OP_AND_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(AND, "");
+ return txt;
+}
+
+static char * OP_AND_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(AND, ROR, "");
+ return txt;
+}
+
+static char * OP_AND_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(AND, "");
+ return txt;
+}
+
+static char * OP_AND_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(AND, "S");
+ return txt;
+}
+
+static char * OP_AND_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(AND, LSL, "S");
+ return txt;
+}
+
+static char * OP_AND_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(AND, LSR, "S");
+ return txt;
+}
+
+static char * OP_AND_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(AND, LSR, "S");
+ return txt;
+}
+
+static char * OP_AND_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(AND, ASR, "S");
+ return txt;
+}
+
+static char * OP_AND_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(AND, ASR, "S");
+ return txt;
+}
+
+static char * OP_AND_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(AND, "S");
+ return txt;
+}
+
+static char * OP_AND_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(AND, ROR, "S");
+ return txt;
+}
+
+static char * OP_AND_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(AND, "S");
+ return txt;
+}
+
+//--------------EOR------------------------------
+static char * OP_EOR_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(EOR, "");
+ return txt;
+}
+
+static char * OP_EOR_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(EOR, LSL, "");
+ return txt;
+}
+
+static char * OP_EOR_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(EOR, LSR, "");
+ return txt;
+}
+
+static char * OP_EOR_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(EOR, LSR, "");
+ return txt;
+}
+
+static char * OP_EOR_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(EOR, ASR, "");
+ return txt;
+}
+
+static char * OP_EOR_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(EOR, ASR, "");
+ return txt;
+}
+
+static char * OP_EOR_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(EOR, "");
+ return txt;
+}
+
+static char * OP_EOR_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(EOR, ROR, "");
+ return txt;
+}
+
+static char * OP_EOR_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(EOR, "");
+ return txt;
+}
+
+static char * OP_EOR_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(EOR, "S");
+ return txt;
+}
+
+static char * OP_EOR_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(EOR, LSL, "S");
+ return txt;
+}
+
+static char * OP_EOR_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(EOR, LSR, "S");
+ return txt;
+}
+
+static char * OP_EOR_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(EOR, LSR, "S");
+ return txt;
+}
+
+static char * OP_EOR_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(EOR, ASR, "S");
+ return txt;
+}
+
+static char * OP_EOR_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(EOR, ASR, "S");
+ return txt;
+}
+
+static char * OP_EOR_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(EOR, "S");
+ return txt;
+}
+
+static char * OP_EOR_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(EOR, ROR, "S");
+ return txt;
+}
+
+static char * OP_EOR_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(EOR, "S");
+ return txt;
+}
+
+//-------------SUB-------------------------------------
+
+static char * OP_SUB_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(SUB, "");
+ return txt;
+}
+
+static char * OP_SUB_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SUB, LSL, "");
+ return txt;
+}
+
+static char * OP_SUB_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(SUB, LSR, "");
+ return txt;
+}
+
+static char * OP_SUB_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SUB, LSR, "");
+ return txt;
+}
+
+static char * OP_SUB_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(SUB, ASR, "");
+ return txt;
+}
+
+static char * OP_SUB_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SUB, ASR, "");
+return txt;}
+
+static char * OP_SUB_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(SUB, "");
+return txt;}
+
+static char * OP_SUB_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SUB, ROR, "");
+return txt;}
+
+static char * OP_SUB_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(SUB, "");
+return txt;}
+
+static char * OP_SUB_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(SUB, "S");
+return txt;}
+
+static char * OP_SUB_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SUB, LSL, "S");
+return txt;}
+
+static char * OP_SUB_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(SUB, LSR, "S");
+return txt;}
+
+static char * OP_SUB_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SUB, LSR, "S");
+return txt;}
+
+static char * OP_SUB_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(SUB, ASR, "S");
+return txt;}
+
+static char * OP_SUB_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SUB, ASR, "S");
+return txt;}
+
+static char * OP_SUB_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(SUB, "S");
+return txt;}
+
+static char * OP_SUB_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SUB, ROR, "S");
+return txt;}
+
+static char * OP_SUB_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(SUB, "S");
+return txt;}
+
+//------------------RSB------------------------
+
+static char * OP_RSB_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(RSB, "");
+return txt;}
+
+static char * OP_RSB_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSB, LSL, "");
+return txt;}
+
+static char * OP_RSB_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(RSB, LSR, "");
+return txt;}
+
+static char * OP_RSB_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSB, LSR, "");
+return txt;}
+
+static char * OP_RSB_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(RSB, ASR, "");
+return txt;}
+
+static char * OP_RSB_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSB, ASR, "");
+return txt;}
+
+static char * OP_RSB_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(RSB, "");
+return txt;}
+
+static char * OP_RSB_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSB, ROR, "");
+return txt;}
+
+static char * OP_RSB_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(RSB, "");
+return txt;}
+
+static char * OP_RSB_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(RSB, "S");
+return txt;}
+
+static char * OP_RSB_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSB, LSL, "S");
+return txt;}
+
+static char * OP_RSB_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(RSB, LSR, "S");
+return txt;}
+
+static char * OP_RSB_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSB, LSR, "S");
+return txt;}
+
+static char * OP_RSB_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(RSB, ASR, "S");
+return txt;}
+
+static char * OP_RSB_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSB, ASR, "S");
+return txt;}
+
+static char * OP_RSB_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(RSB, "S");
+return txt;}
+
+static char * OP_RSB_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSB, ROR, "S");
+return txt;}
+
+static char * OP_RSB_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(RSB, "S");
+return txt;}
+
+//------------------ADD-----------------------------------
+
+static char * OP_ADD_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(ADD, "");
+return txt;}
+
+static char * OP_ADD_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADD, LSL, "");
+return txt;}
+
+static char * OP_ADD_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ADD, LSR, "");
+return txt;}
+
+static char * OP_ADD_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADD, LSR, "");
+return txt;}
+
+static char * OP_ADD_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ADD, ASR, "");
+return txt;}
+
+static char * OP_ADD_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADD, ASR, "");
+return txt;}
+
+static char * OP_ADD_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(ADD, "");
+return txt;}
+
+static char * OP_ADD_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADD, ROR, "");
+return txt;}
+
+static char * OP_ADD_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(ADD, "");
+return txt;}
+
+static char * OP_ADD_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(ADD, "S");
+return txt;}
+
+static char * OP_ADD_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADD, LSL, "S");
+return txt;}
+
+static char * OP_ADD_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ADD, LSR, "S");
+return txt;}
+
+static char * OP_ADD_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADD, LSR, "S");
+return txt;}
+
+static char * OP_ADD_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ADD, ASR, "S");
+return txt;}
+
+static char * OP_ADD_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADD, ASR, "S");
+return txt;}
+
+static char * OP_ADD_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(ADD, "S");
+return txt;}
+
+static char * OP_ADD_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADD, ROR, "S");
+return txt;}
+
+static char * OP_ADD_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(ADD, "S");
+return txt;}
+
+//------------------ADC-----------------------------------
+
+static char * OP_ADC_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(ADC, "");
+return txt;}
+
+static char * OP_ADC_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADC, LSL, "");
+return txt;}
+
+static char * OP_ADC_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ADC, LSR, "");
+return txt;}
+
+static char * OP_ADC_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADC, LSR, "");
+return txt;}
+
+static char * OP_ADC_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ADC, ASR, "");
+return txt;}
+
+static char * OP_ADC_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADC, ASR, "");
+return txt;}
+
+static char * OP_ADC_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(ADC, "");
+return txt;}
+
+static char * OP_ADC_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADC, ROR, "");
+return txt;}
+
+static char * OP_ADC_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(ADC, "");
+return txt;}
+
+static char * OP_ADC_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(ADC, "S");
+return txt;}
+
+static char * OP_ADC_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADC, LSL, "S");
+return txt;}
+
+static char * OP_ADC_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ADC, LSR, "S");
+return txt;}
+
+static char * OP_ADC_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADC, LSR, "S");
+return txt;}
+
+static char * OP_ADC_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ADC, ASR, "S");
+return txt;}
+
+static char * OP_ADC_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADC, ASR, "S");
+return txt;}
+
+static char * OP_ADC_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(ADC, "S");
+return txt;}
+
+static char * OP_ADC_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ADC, ROR, "S");
+return txt;}
+
+static char * OP_ADC_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(ADC, "S");
+return txt;}
+
+//-------------SBC-------------------------------------
+
+static char * OP_SBC_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(SBC, "");
+return txt;}
+
+static char * OP_SBC_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SBC, LSL, "");
+return txt;}
+
+static char * OP_SBC_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(SBC, LSR, "");
+return txt;}
+
+static char * OP_SBC_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SBC, LSR, "");
+return txt;}
+
+static char * OP_SBC_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(SBC, ASR, "");
+return txt;}
+
+static char * OP_SBC_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SBC, ASR, "");
+return txt;}
+
+static char * OP_SBC_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(SBC, "");
+return txt;}
+
+static char * OP_SBC_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SBC, ROR, "");
+return txt;}
+
+static char * OP_SBC_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(SBC, "");
+return txt;}
+
+static char * OP_SBC_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(SBC, "S");
+return txt;}
+
+static char * OP_SBC_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SBC, LSL, "S");
+return txt;}
+
+static char * OP_SBC_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(SBC, LSR, "S");
+return txt;}
+
+static char * OP_SBC_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SBC, LSR, "S");
+return txt;}
+
+static char * OP_SBC_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(SBC, ASR, "S");
+return txt;}
+
+static char * OP_SBC_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SBC, ASR, "S");
+return txt;}
+
+static char * OP_SBC_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(SBC, "S");
+return txt;}
+
+static char * OP_SBC_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(SBC, ROR, "S");
+return txt;}
+
+static char * OP_SBC_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(SBC, "S");
+return txt;}
+
+//---------------RSC----------------------------------
+
+static char * OP_RSC_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(RSC, "");
+return txt;}
+
+static char * OP_RSC_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSC, LSL, "");
+return txt;}
+
+static char * OP_RSC_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(RSC, LSR, "");
+return txt;}
+
+static char * OP_RSC_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSC, LSR, "");
+return txt;}
+
+static char * OP_RSC_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(RSC, ASR, "");
+return txt;}
+
+static char * OP_RSC_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSC, ASR, "");
+return txt;}
+
+static char * OP_RSC_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(RSC, "");
+return txt;}
+
+static char * OP_RSC_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSC, ROR, "");
+return txt;}
+
+static char * OP_RSC_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(RSC, "");
+return txt;}
+
+static char * OP_RSC_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(RSC, "S");
+return txt;}
+
+static char * OP_RSC_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSC, LSL, "S");
+return txt;}
+
+static char * OP_RSC_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(RSC, LSR, "S");
+return txt;}
+
+static char * OP_RSC_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSC, LSR, "S");
+return txt;}
+
+static char * OP_RSC_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(RSC, ASR, "S");
+return txt;}
+
+static char * OP_RSC_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSC, ASR, "S");
+return txt;}
+
+static char * OP_RSC_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(RSC, "S");
+return txt;}
+
+static char * OP_RSC_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(RSC, ROR, "S");
+return txt;}
+
+static char * OP_RSC_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(RSC, "S");
+return txt;}
+
+//-------------------TST----------------------------
+
+static char * OP_TST_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_LSL_IMM(TST, "", 16);
+return txt;}
+
+static char * OP_TST_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(TST, LSL, "", 16);
+return txt;}
+
+static char * OP_TST_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(TST, LSR, "", 16);
+return txt;}
+
+static char * OP_TST_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(TST, LSR, "", 16);
+return txt;}
+
+static char * OP_TST_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(TST, ASR, "", 16);
+return txt;}
+
+static char * OP_TST_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(TST, ASR, "", 16);
+return txt;}
+
+static char * OP_TST_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_ROR_IMM(TST, "", 16);
+return txt;}
+
+static char * OP_TST_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(TST, ROR, "", 16);
+return txt;}
+
+static char * OP_TST_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_VALUE(TST, "", 16);
+return txt;}
+
+//-------------------TEQ----------------------------
+
+static char * OP_TEQ_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_LSL_IMM(TEQ, "", 16);
+return txt;}
+
+static char * OP_TEQ_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(TEQ, LSL, "", 16);
+return txt;}
+
+static char * OP_TEQ_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(TEQ, LSR, "", 16);
+return txt;}
+
+static char * OP_TEQ_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(TEQ, LSR, "", 16);
+return txt;}
+
+static char * OP_TEQ_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(TEQ, ASR, "", 16);
+return txt;}
+
+static char * OP_TEQ_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(TEQ, ASR, "", 16);
+return txt;}
+
+static char * OP_TEQ_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_ROR_IMM(TEQ, "", 16);
+return txt;}
+
+static char * OP_TEQ_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(TEQ, ROR, "", 16);
+return txt;}
+
+static char * OP_TEQ_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_VALUE(TEQ, "", 16);
+return txt;}
+
+//-------------CMP-------------------------------------
+
+static char * OP_CMP_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_LSL_IMM(CMP, "", 16);
+return txt;}
+
+static char * OP_CMP_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(CMP, LSL, "", 16);
+return txt;}
+
+static char * OP_CMP_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(CMP, LSR, "", 16);
+return txt;}
+
+static char * OP_CMP_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(CMP, LSR, "", 16);
+return txt;}
+
+static char * OP_CMP_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(CMP, ASR, "", 16);
+return txt;}
+
+static char * OP_CMP_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(CMP, ASR, "", 16);
+return txt;}
+
+static char * OP_CMP_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_ROR_IMM(CMP, "", 16);
+return txt;}
+
+static char * OP_CMP_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(CMP, ROR, "", 16);
+return txt;}
+
+static char * OP_CMP_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_VALUE(CMP, "", 16);
+return txt;}
+
+//---------------CMN---------------------------
+
+static char * OP_CMN_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_LSL_IMM(CMN, "", 16);
+return txt;}
+
+static char * OP_CMN_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(CMN, LSL, "", 16);
+return txt;}
+
+static char * OP_CMN_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(CMP, ASR, "", 16);
+return txt;}
+
+static char * OP_CMN_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(CMN, LSR, "", 16);
+return txt;}
+
+static char * OP_CMN_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(CMN, ASR, "", 16);
+return txt;}
+
+static char * OP_CMN_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(CMN, ASR, "", 16);
+return txt;}
+
+static char * OP_CMN_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_ROR_IMM(CMN, "", 16);
+return txt;}
+
+static char * OP_CMN_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(CMN, ROR, "", 16);
+return txt;}
+
+static char * OP_CMN_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_VALUE(CMN, "", 16);
+return txt;}
+
+//------------------ORR-------------------
+
+static char * OP_ORR_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(ORR, "");
+return txt;}
+
+static char * OP_ORR_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ORR, LSL, "");
+return txt;}
+
+static char * OP_ORR_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ORR, LSR, "");
+return txt;}
+
+static char * OP_ORR_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ORR, LSR, "");
+return txt;}
+
+static char * OP_ORR_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ORR, ASR, "");
+return txt;}
+
+static char * OP_ORR_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ORR, ASR, "");
+return txt;}
+
+static char * OP_ORR_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(ORR, "");
+return txt;}
+
+static char * OP_ORR_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ORR, ROR, "");
+return txt;}
+
+static char * OP_ORR_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(ORR, "");
+return txt;}
+
+static char * OP_ORR_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(ORR, "S");
+return txt;}
+
+static char * OP_ORR_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ORR, LSL, "S");
+return txt;}
+
+static char * OP_ORR_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ORR, LSR, "S");
+return txt;}
+
+static char * OP_ORR_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ORR, LSR, "S");
+return txt;}
+
+static char * OP_ORR_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(ORR, ASR, "S");
+return txt;}
+
+static char * OP_ORR_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ORR, ASR, "S");
+return txt;}
+
+static char * OP_ORR_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(ORR, "S");
+return txt;}
+
+static char * OP_ORR_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(ORR, ROR, "S");
+return txt;}
+
+static char * OP_ORR_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(ORR, "S");
+return txt;}
+
+//------------------MOV-------------------
+
+static char * OP_MOV_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_LSL_IMM(MOV, "", 12);
+return txt;}
+
+static char * OP_MOV_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MOV, LSL, "", 12);
+return txt;}
+
+static char * OP_MOV_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(MOV, LSR, "", 12);
+return txt;}
+
+static char * OP_MOV_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MOV, LSR, "", 12);
+return txt;}
+
+static char * OP_MOV_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(MOV, ASR, "", 12);
+return txt;}
+
+static char * OP_MOV_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MOV, ASR, "", 12);
+return txt;}
+
+static char * OP_MOV_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_ROR_IMM(MOV, "", 12);
+return txt;}
+
+static char * OP_MOV_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MOV, ROR, "", 12);
+return txt;}
+
+static char * OP_MOV_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_VALUE(MOV, "", 12);
+return txt;}
+
+static char * OP_MOV_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_LSL_IMM(MOV, "S", 12);
+return txt;}
+
+static char * OP_MOV_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MOV, LSL, "S", 12);
+return txt;}
+
+static char * OP_MOV_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(MOV, LSR, "S", 12);
+return txt;}
+
+static char * OP_MOV_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MOV, LSR, "S", 12);
+return txt;}
+
+static char * OP_MOV_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(MOV, ASR, "S", 12);
+return txt;}
+
+static char * OP_MOV_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MOV, ASR, "S", 12);
+return txt;}
+
+static char * OP_MOV_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_ROR_IMM(MOV, "S", 12);
+return txt;}
+
+static char * OP_MOV_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MOV, ROR, "S", 12);
+return txt;}
+
+static char * OP_MOV_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_VALUE(MOV, "S", 12);
+return txt;}
+
+//------------------BIC-------------------
+
+static char * OP_BIC_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(BIC, "");
+return txt;}
+
+static char * OP_BIC_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(BIC, LSL, "");
+return txt;}
+
+static char * OP_BIC_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(BIC, LSR, "");
+return txt;}
+
+static char * OP_BIC_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(BIC, LSR, "");
+return txt;}
+
+static char * OP_BIC_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(BIC, ASR, "");
+return txt;}
+
+static char * OP_BIC_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(BIC, ASR, "");
+return txt;}
+
+static char * OP_BIC_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(BIC, "");
+return txt;}
+
+static char * OP_BIC_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(BIC, ROR, "");
+return txt;}
+
+static char * OP_BIC_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(BIC, "");
+return txt;}
+
+static char * OP_BIC_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_LSL_IMM(BIC, "S");
+return txt;}
+
+static char * OP_BIC_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(BIC, LSL, "S");
+return txt;}
+
+static char * OP_BIC_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(BIC, LSR, "S");
+return txt;}
+
+static char * OP_BIC_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(BIC, LSR, "S");
+return txt;}
+
+static char * OP_BIC_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_SHIFT(BIC, ASR, "S");
+return txt;}
+
+static char * OP_BIC_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(BIC, ASR, "S");
+return txt;}
+
+static char * OP_BIC_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ROR_IMM(BIC, "S");
+return txt;}
+
+static char * OP_BIC_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_REG_SHIFT(BIC, ROR, "S");
+return txt;}
+
+static char * OP_BIC_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_IMM_VALUE(BIC, "S");
+return txt;}
+
+//------------------MVN-------------------
+
+static char * OP_MVN_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_LSL_IMM(MVN, "", 12);
+return txt;}
+
+static char * OP_MVN_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MVN, LSL, "", 12);
+return txt;}
+
+static char * OP_MVN_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(MVN, LSR, "", 12);
+return txt;}
+
+static char * OP_MVN_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MVN, LSR, "", 12);
+return txt;}
+
+static char * OP_MVN_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(MVN, ASR, "", 12);
+return txt;}
+
+static char * OP_MVN_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MVN, ASR, "", 12);
+return txt;}
+
+static char * OP_MVN_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_ROR_IMM(MVN, "", 12);
+return txt;}
+
+static char * OP_MVN_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MVN, ROR, "", 12);
+return txt;}
+
+static char * OP_MVN_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_VALUE(MVN, "", 12);
+return txt;}
+
+static char * OP_MVN_S_LSL_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_LSL_IMM(MVN, "S", 12);
+return txt;}
+
+static char * OP_MVN_S_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MVN, LSL, "S", 12);
+return txt;}
+
+static char * OP_MVN_S_LSR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(MVN, LSR, "S", 12);
+return txt;}
+
+static char * OP_MVN_S_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MVN, LSR, "S", 12);
+return txt;}
+
+static char * OP_MVN_S_ASR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_SHIFT(MOV, ASR, "S", 12);
+return txt;}
+
+static char * OP_MVN_S_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MVN, ASR, "S", 12);
+return txt;}
+
+static char * OP_MVN_S_ROR_IMM(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_ROR_IMM(MVN, "S", 12);
+return txt;}
+
+static char * OP_MVN_S_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_REG_SHIFT(MVN, ROR, "S", 12);
+return txt;}
+
+static char * OP_MVN_S_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ DATAPROC_ONE_OP_IMM_VALUE(MVN, "S", 12);
+return txt;}
+
+
+//-------------MUL------------------------
+
+static char * OP_MUL(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MUL%s %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_MLA(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MLA%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)], Registre[REG_POS(i,12)]);
+return txt;}
+
+static char * OP_MUL_S(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MUL%sS %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_MLA_S(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MLA%sS %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)], Registre[REG_POS(i,12)]);
+return txt;}
+
+
+//----------UMUL--------------------------
+
+static char * OP_UMULL(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "UMULL%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_UMLAL(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "UMLAL%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_UMULL_S(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "UMULL%sS %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_UMLAL_S(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "UMLAL%sS %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+//----------SMUL--------------------------
+
+static char * OP_SMULL(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMULL%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_SMLAL(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLAL%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_SMULL_S(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMULL%sS %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_SMLAL_S(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLAL%sS %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+//---------------SWP------------------------------
+
+static char * OP_SWP(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SWP%s %s, %s, [%s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,0)], Registre[REG_POS(i,16)]);
+return txt;}
+
+static char * OP_SWPB(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SWPB%s %s, %s, [%s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,0)], Registre[REG_POS(i,16)]);
+return txt;}
+
+//------------LDRH-----------------------------
+
+static char * OP_LDRH_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s, #%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRH_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s, -#%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRH_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s, %s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRH_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s, -%s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRH_PRE_INDE_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s, #%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRH_PRE_INDE_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s, -#%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRH_PRE_INDE_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s, %s]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRH_PRE_INDE_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s, -%s]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRH_POS_INDE_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s], #%X", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRH_POS_INDE_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s], -#%X", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRH_POS_INDE_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s], %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRH_POS_INDE_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH%s %s, [%s], -%s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+//------------STRH-----------------------------
+
+static char * OP_STRH_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s, #%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_STRH_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s, -#%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_STRH_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s, %s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_STRH_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s, -%s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_STRH_PRE_INDE_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s, #%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_STRH_PRE_INDE_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s, -#%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_STRH_PRE_INDE_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s, %s]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_STRH_PRE_INDE_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s, -%s]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_STRH_POS_INDE_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s], #%X", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_STRH_POS_INDE_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s], -#%X", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_STRH_POS_INDE_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s], %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_STRH_POS_INDE_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH%s %s, [%s], -%s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+//----------------LDRSH--------------------------
+
+static char * OP_LDRSH_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s, #%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSH_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s, -#%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSH_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s, %s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRSH_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s, -%s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRSH_PRE_INDE_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s, #%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSH_PRE_INDE_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s, -#%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSH_PRE_INDE_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s, %s]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRSH_PRE_INDE_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s, -%s]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRSH_POS_INDE_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s], #%X", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSH_POS_INDE_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s], -#%X", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSH_POS_INDE_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s], %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRSH_POS_INDE_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH%s %s, [%s], -%s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+//----------------------LDRSB----------------------
+
+static char * OP_LDRSB_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s, #%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSB_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s, -#%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSB_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s, %s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRSB_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s, -%s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRSB_PRE_INDE_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s, #%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSB_PRE_INDE_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s, -#%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSB_PRE_INDE_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s, %s]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRSB_PRE_INDE_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s, -%s]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRSB_POS_INDE_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s], #%X", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSB_POS_INDE_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s], -#%X", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(((i>>4)&0xF0)|(i&0xF)));
+return txt;}
+
+static char * OP_LDRSB_POS_INDE_P_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s], %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_LDRSB_POS_INDE_M_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB%s %s, [%s], -%s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+//--------------MRS--------------------------------
+
+static char * OP_MRS_CPSR(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MRS%s %s, CPSR", Condition[CONDITION(i)], Registre[REG_POS(i,12)]);
+return txt;}
+
+static char * OP_MRS_SPSR(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MRS%s %s, SPSR", Condition[CONDITION(i)], Registre[REG_POS(i,12)]);
+return txt;}
+
+//--------------MSR--------------------------------
+
+static char * OP_MSR_CPSR(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MSR%s CPSR_%s, %s", Condition[CONDITION(i)], MSR_FIELD[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_MSR_SPSR(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MSR%s SPSR_%s, %s", Condition[CONDITION(i)], MSR_FIELD[REG_POS(i,16)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_MSR_CPSR_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MSR%s CPSR_%s, #%X", Condition[CONDITION(i)], MSR_FIELD[REG_POS(i,16)], (int)ROR((i&0xFF), ((i>>7)&0x1E)));
+return txt;}
+
+static char * OP_MSR_SPSR_IMM_VAL(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MSR%s SPSR_%s, #%X", Condition[CONDITION(i)], MSR_FIELD[REG_POS(i,16)], (int)ROR((i&0xFF), (i>>7)&0x1E));
+return txt;}
+
+//-----------------BRANCH--------------------------
+
+static char * OP_BX(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "BX%s %s", Condition[CONDITION(i)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_BLX_REG(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "BLX%s %s", Condition[CONDITION(i)], Registre[REG_POS(i,0)]);
+return txt;}
+
+static char * OP_B(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "BLX%s %08X", Condition[CONDITION(i)], (int)(adr+(SIGNEXTEND_24(i)<<2)+8));
+ return txt;}
+ sprintf(txt, "B%s %08X", Condition[CONDITION(i)], (int)(adr+(SIGNEXTEND_24(i)<<2)+8));
+return txt;}
+
+static char * OP_BL(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "BLX%s %08X", Condition[CONDITION(i)], (int)(adr+(SIGNEXTEND_24(i)<<2)+10));
+ return txt;}
+ sprintf(txt, "BL%s %08X", Condition[CONDITION(i)], (int)(adr+(SIGNEXTEND_24(i)<<2)+8));
+return txt;}
+
+//----------------CLZ-------------------------------
+
+static char * OP_CLZ(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "CLZ%s %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,0)]);
+return txt;}
+
+
+//--------------------QADD--QSUB------------------------------
+
+static char * OP_QADD(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "QADD%s %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,0)], Registre[REG_POS(i,16)]);
+return txt;}
+
+static char * OP_QSUB(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "QSUB%s %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,0)], Registre[REG_POS(i,16)]);
+return txt;}
+
+static char * OP_QDADD(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "QDADD%s %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,0)], Registre[REG_POS(i,16)]);
+return txt;}
+
+static char * OP_QDSUB(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "QDSUB%s %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,0)], Registre[REG_POS(i,16)]);
+return txt;}
+
+//-----------------SMUL-------------------------------
+
+static char * OP_SMUL_B_B(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMULBB%s %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_SMUL_B_T(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMULBT%s %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_SMUL_T_B(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMULTB%s %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_SMUL_T_T(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMULTT%s %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+//-----------SMLA----------------------------
+
+static char * OP_SMLA_B_B(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLABB%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)], Registre[REG_POS(i,12)]);
+return txt;}
+
+static char * OP_SMLA_B_T(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLABT%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)], Registre[REG_POS(i,12)]);
+return txt;}
+
+static char * OP_SMLA_T_B(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLATB%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)], Registre[REG_POS(i,12)]);
+return txt;}
+
+static char * OP_SMLA_T_T(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLATT%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)], Registre[REG_POS(i,12)]);
+return txt;}
+
+//--------------SMLAL---------------------------------------
+
+static char * OP_SMLAL_B_B(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLABB%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_SMLAL_B_T(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLABT%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_SMLAL_T_B(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLATB%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_SMLAL_T_T(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLATT%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+//--------------SMULW--------------------
+
+static char * OP_SMULW_B(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMULWB%s %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+static char * OP_SMULW_T(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMULWT%s %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)]);
+return txt;}
+
+//--------------SMLAW-------------------
+static char * OP_SMLAW_B(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLAWB%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)], Registre[REG_POS(i,12)]);
+return txt;}
+
+static char * OP_SMLAW_T(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SMLAWT%s %s, %s, %s, %s", Condition[CONDITION(i)], Registre[REG_POS(i,16)], Registre[REG_POS(i,0)], Registre[REG_POS(i,8)], Registre[REG_POS(i,12)]);
+return txt;}
+
+//------------LDR---------------------------
+
+static char * OP_LDR_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ if(REG_POS(i,16) == 15)
+ sprintf(txt, "LDR%s %s, [%08X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], (adr + 8 + (int)(i&0x7FF)));
+ else
+ sprintf(txt, "LDR%s %s, [%s, #%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDR_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ if(REG_POS(i,16) == 15)
+ sprintf(txt, "LDR%s %s, [%08X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], (adr + 8 - (int)(i&0x7FF)));
+ else
+ sprintf(txt, "LDR%s %s, [%s, -#%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDREX(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDREX%s %s, [%s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)]);
+return txt;}
+
+static char * OP_LDR_P_LSL_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDR, "", "", "]");
+return txt;}
+
+static char * OP_LDR_M_LSL_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDR, "-", "", "]");
+return txt;}
+
+static char * OP_LDR_P_LSR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, LSR, "", "", "]");
+return txt;}
+
+static char * OP_LDR_M_LSR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, LSR, "M", "", "]");
+return txt;}
+
+static char * OP_LDR_P_ASR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, ASR, "", "", "]");
+return txt;}
+
+static char * OP_LDR_M_ASR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, ASR, "-", "", "]");
+return txt;}
+
+static char * OP_LDR_P_ROR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDR, "", "", "]");
+return txt;}
+
+static char * OP_LDR_M_ROR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDR, "-", "", "]");
+return txt;}
+
+static char * OP_LDR_P_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDR%s %s, [%s, #%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDR_M_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDR%s %s, [%s, -#%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDR_P_LSL_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDR, "", "", "]!");
+return txt;}
+
+static char * OP_LDR_M_LSL_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDR, "-", "", "]!");
+return txt;}
+
+static char * OP_LDR_P_LSR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, LSR, "", "", "]!");
+return txt;}
+
+static char * OP_LDR_M_LSR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, LSR, "-", "", "]!");
+return txt;}
+
+static char * OP_LDR_P_ASR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, ASR, "", "", "]!");
+return txt;}
+
+static char * OP_LDR_M_ASR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, ASR, "-", "", "]!");
+return txt;}
+
+static char * OP_LDR_P_ROR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDR, "", "", "]!");
+return txt;}
+
+static char * OP_LDR_M_ROR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDR, "-", "", "]!");
+return txt;}
+
+static char * OP_LDR_P_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDR%s %s, [%s], #%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDR_P_IMM_OFF_POSTIND2(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDR%s %s, [%s], #%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDR_M_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDR%s %s, [%s], -#%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDR_P_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDR, "", "]", "");
+return txt;}
+
+static char * OP_LDR_M_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDR, "-", "]", "");
+return txt;}
+
+static char * OP_LDR_P_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, LSR, "", "]", "");
+return txt;}
+
+static char * OP_LDR_M_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, LSR, "-", "]", "");
+return txt;}
+
+static char * OP_LDR_P_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, ASR, "", "]", "");
+return txt;}
+
+static char * OP_LDR_M_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDR, ASR, "-", "]", "");
+return txt;}
+
+static char * OP_LDR_P_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDR, "", "]", "");
+return txt;}
+
+static char * OP_LDR_M_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDR, "-", "]", "");
+return txt;}
+
+//-----------------LDRB-------------------------------------------
+
+static char * OP_LDRB_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRB%s %s, [%s, #%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDRB_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRB%s %s, [%s, -#%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDRB_P_LSL_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDRB, "", "", "]");
+return txt;}
+
+static char * OP_LDRB_M_LSL_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDRB, "-", "", "]");
+return txt;}
+
+static char * OP_LDRB_P_LSR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, LSR, "", "", "]");
+return txt;}
+
+static char * OP_LDRB_M_LSR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, LSR, "M", "", "]");
+return txt;}
+
+static char * OP_LDRB_P_ASR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, ASR, "", "", "]");
+return txt;}
+
+static char * OP_LDRB_M_ASR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, ASR, "-", "", "]");
+return txt;}
+
+static char * OP_LDRB_P_ROR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDRB, "", "", "]");
+return txt;}
+
+static char * OP_LDRB_M_ROR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDRB, "-", "", "]");
+return txt;}
+
+static char * OP_LDRB_P_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRB%s %s, [%s, #%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDRB_M_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRB%s %s, [%s, -#%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDRB_P_LSL_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDRB, "", "", "]!");
+return txt;}
+
+static char * OP_LDRB_M_LSL_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDRB, "-", "", "]!");
+return txt;}
+
+static char * OP_LDRB_P_LSR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, LSR, "", "", "]!");
+return txt;}
+
+static char * OP_LDRB_M_LSR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, LSR, "-", "", "]!");
+return txt;}
+
+static char * OP_LDRB_P_ASR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, ASR, "", "", "]!");
+return txt;}
+
+static char * OP_LDRB_M_ASR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, ASR, "-", "", "]!");
+return txt;}
+
+static char * OP_LDRB_P_ROR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDRB, "", "", "]!");
+return txt;}
+
+static char * OP_LDRB_M_ROR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDRB, "-", "", "]!");
+return txt;}
+
+static char * OP_LDRB_P_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRB%s %s, [%s], #%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDRB_M_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRB%s %s, [%s], -#%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDRB_P_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDRB, "", "]", "");
+return txt;}
+
+static char * OP_LDRB_M_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDRB, "-", "]", "");
+return txt;}
+
+static char * OP_LDRB_P_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, LSR, "", "]", "");
+return txt;}
+
+static char * OP_LDRB_M_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, LSR, "-", "]", "");
+return txt;}
+
+static char * OP_LDRB_P_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, ASR, "", "]", "");
+return txt;}
+
+static char * OP_LDRB_M_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRB, ASR, "-", "]", "");
+return txt;}
+
+static char * OP_LDRB_P_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDRB, "", "]", "");
+return txt;}
+
+static char * OP_LDRB_M_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDRB, "-", "]", "");
+return txt;}
+
+//----------------------STR--------------------------------
+
+static char * OP_STR_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STR%s %s, [%s, #%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STR_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STR%s %s, [%s, -#%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STREX(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STREX%s %s, %s, [%s]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,0)], Registre[REG_POS(i,16)]);
+return txt;}
+
+static char * OP_STR_P_LSL_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STR, "", "", "]");
+return txt;}
+
+static char * OP_STR_M_LSL_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STR, "-", "", "]");
+return txt;}
+
+static char * OP_STR_P_LSR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, LSR, "", "", "]");
+return txt;}
+
+static char * OP_STR_M_LSR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, LSR, "M", "", "]");
+return txt;}
+
+static char * OP_STR_P_ASR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, ASR, "", "", "]");
+return txt;}
+
+static char * OP_STR_M_ASR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, ASR, "-", "", "]");
+return txt;}
+
+static char * OP_STR_P_ROR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STR, "", "", "]");
+return txt;}
+
+static char * OP_STR_M_ROR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STR, "-", "", "]");
+return txt;}
+
+static char * OP_STR_P_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STR%s %s, [%s, #%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STR_M_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STR%s %s, [%s, -#%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STR_P_LSL_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STR, "", "", "]!");
+return txt;}
+
+static char * OP_STR_M_LSL_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STR, "-", "", "]!");
+return txt;}
+
+static char * OP_STR_P_LSR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, LSR, "", "", "]!");
+return txt;}
+
+static char * OP_STR_M_LSR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, LSR, "-", "", "]!");
+return txt;}
+
+static char * OP_STR_P_ASR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, ASR, "", "", "]!");
+return txt;}
+
+static char * OP_STR_M_ASR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, ASR, "-", "", "]!");
+return txt;}
+
+static char * OP_STR_P_ROR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STR, "", "", "]!");
+return txt;}
+
+static char * OP_STR_M_ROR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STR, "-", "", "]!");
+return txt;}
+
+static char * OP_STR_P_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STR%s %s, [%s], #%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STR_M_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STR%s %s, [%s], -#%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STR_P_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STR, "", "]", "");
+return txt;}
+
+static char * OP_STR_M_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STR, "-", "]", "");
+return txt;}
+
+static char * OP_STR_P_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, LSR, "", "]", "");
+return txt;}
+
+static char * OP_STR_M_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, LSR, "-", "]", "");
+return txt;}
+
+static char * OP_STR_P_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, ASR, "", "]", "");
+return txt;}
+
+static char * OP_STR_M_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STR, ASR, "-", "]", "");
+return txt;}
+
+static char * OP_STR_P_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STR, "", "]", "");
+return txt;}
+
+static char * OP_STR_M_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STR, "-", "]", "");
+return txt;}
+
+//-----------------------STRB-------------------------------------
+
+static char * OP_STRB_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRB%s %s, [%s, #%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STRB_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRB%s %s, [%s, -#%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STRB_P_LSL_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STRB, "", "", "]");
+return txt;}
+
+static char * OP_STRB_M_LSL_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STRB, "-", "", "]");
+return txt;}
+
+static char * OP_STRB_P_LSR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, LSR, "", "", "]");
+return txt;}
+
+static char * OP_STRB_M_LSR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, LSR, "M", "", "]");
+return txt;}
+
+static char * OP_STRB_P_ASR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, ASR, "", "", "]");
+return txt;}
+
+static char * OP_STRB_M_ASR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, ASR, "-", "", "]");
+return txt;}
+
+static char * OP_STRB_P_ROR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STRB, "", "", "]");
+return txt;}
+
+static char * OP_STRB_M_ROR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STRB, "-", "", "]");
+return txt;}
+
+static char * OP_STRB_P_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRB%s %s, [%s, #%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STRB_M_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRB%s %s, [%s, -#%X]!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STRB_P_LSL_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STRB, "", "", "]!");
+return txt;}
+
+static char * OP_STRB_M_LSL_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STRB, "-", "", "]!");
+return txt;}
+
+static char * OP_STRB_P_LSR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, LSR, "", "", "]!");
+return txt;}
+
+static char * OP_STRB_M_LSR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, LSR, "-", "", "]!");
+return txt;}
+
+static char * OP_STRB_P_ASR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, ASR, "", "", "]!");
+return txt;}
+
+static char * OP_STRB_M_ASR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, ASR, "-", "", "]!");
+return txt;}
+
+static char * OP_STRB_P_ROR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STRB, "", "", "]!");
+return txt;}
+
+static char * OP_STRB_M_ROR_IMM_OFF_PREIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STRB, "-", "", "]!");
+return txt;}
+
+static char * OP_STRB_P_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRB%s %s, [%s], #%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STRB_M_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRB%s %s, [%s], -#%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STRB_P_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STRB, "", "]", "");
+return txt;}
+
+static char * OP_STRB_M_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STRB, "-", "]", "");
+return txt;}
+
+static char * OP_STRB_P_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, LSR, "", "]", "");
+return txt;}
+
+static char * OP_STRB_M_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, LSR, "-", "]", "");
+return txt;}
+
+static char * OP_STRB_P_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, ASR, "", "]", "");
+return txt;}
+
+static char * OP_STRB_M_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRB, ASR, "-", "]", "");
+return txt;}
+
+static char * OP_STRB_P_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STRB, "", "]", "");
+return txt;}
+
+static char * OP_STRB_M_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STRB, "-", "]", "");
+return txt;}
+
+//-----------------------LDRBT-------------------------------------
+
+#if 0
+static char * OP_LDRBT_P_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRBT%s %s, [%s], #%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDRBT_M_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRBT%s %s, [%s], -#%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_LDRBT_P_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDRBT, "", "]", "");
+return txt;}
+
+static char * OP_LDRBT_M_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(LDRBT, "-", "]", "");
+return txt;}
+
+static char * OP_LDRBT_P_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRBT, LSR, "", "]", "");
+return txt;}
+
+static char * OP_LDRBT_M_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRBT, LSR, "-", "]", "");
+return txt;}
+
+static char * OP_LDRBT_P_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRBT, ASR, "", "]", "");
+return txt;}
+
+static char * OP_LDRBT_M_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(LDRBT, ASR, "-", "]", "");
+return txt;}
+
+static char * OP_LDRBT_P_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDRBT, "", "]", "");
+return txt;}
+
+static char * OP_LDRBT_M_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(LDRBT, "-", "]", "");
+return txt;}
+
+//----------------------STRBT----------------------------
+
+static char * OP_STRBT_P_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRBT%s %s, [%s], #%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STRBT_M_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRBT%s %s, [%s], -#%X!", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
+return txt;}
+
+static char * OP_STRBT_P_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STRBT, "", "]", "");
+return txt;}
+
+static char * OP_STRBT_M_LSL_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_LSL_IMM(STRBT, "-", "]", "");
+return txt;}
+
+static char * OP_STRBT_P_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRBT, LSR, "", "]", "");
+return txt;}
+
+static char * OP_STRBT_M_LSR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRBT, LSR, "-", "]", "");
+return txt;}
+
+static char * OP_STRBT_P_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRBT, ASR, "", "]", "");
+return txt;}
+
+static char * OP_STRBT_M_ASR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_IMM_SHIFT(STRBT, ASR, "-", "]", "");
+return txt;}
+
+static char * OP_STRBT_P_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STRBT, "", "]", "");
+return txt;}
+
+static char * OP_STRBT_M_ROR_IMM_OFF_POSTIND(u32 adr, u32 i, char * txt)
+{
+ LDRSTR_ROR_IMM(STRBT, "-", "]", "");
+return txt;}
+#endif
+
+//---------------------LDM-----------------------------
+
+static char * OP_LDMIA(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMIA%s %s, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMIB(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMIB%s %s, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMDA(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMDA%s %s, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMDB(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMDB%s %s, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMIA_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMIA%s %s!, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMIB_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMIB%s %s!, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMDA_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMDA%s %s!, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMDB_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMDB%s %s!, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMIA2(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMIA%s %s, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMIB2(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMIB%s %s, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMDA2(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMDA%s %s, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMDB2(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMDB%s %s, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_LDMIA2_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMIA%s %s!, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+ if(BIT15(i)==0) sprintf(txt, "%s ?????", txt);
+return txt;}
+
+static char * OP_LDMIB2_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMIB%s %s!, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+ if(BIT15(i)==0) sprintf(txt, "%s ?????", txt);
+return txt;}
+
+static char * OP_LDMDA2_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMDA%s %s!, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+ if(BIT15(i)==0) sprintf(txt, "%s ?????", txt);
+return txt;}
+
+static char * OP_LDMDB2_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "LDMDB%s %s!, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+ if(BIT15(i)==0) sprintf(txt, "%s ?????", txt);
+return txt;}
+
+//------------------------------STM----------------------------------
+
+static char * OP_STMIA(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMIA%s %s, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMIB(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMIB%s %s, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMDA(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMDA%s %s, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMDB(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMDB%s %s, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMIA_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMIA%s %s!, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMIB_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMIB%s %s!, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMDA_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMDA%s %s!, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMDB_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMDB%s %s!, {%s}", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMIA2(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMIA%s %s, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMIB2(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMIB%s %s, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMDA2(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMDA%s %s, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMDB2(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMDB%s %s, {%s}^", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMIA2_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMIA%s %s!, {%s}^ ?????", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMIB2_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMIB%s %s!, {%s}^ ?????", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+return txt;}
+
+static char * OP_STMDA2_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMDA%s %s!, {%s}^ ?????", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+ return txt;
+}
+
+static char * OP_STMDB2_W(u32 adr, u32 i, char * txt)
+{
+ RegList(16);
+ sprintf(txt, "STMDB%s %s!, {%s}^ ?????", Condition[CONDITION(i)], Registre[REG_POS(i,16)], lreg);
+ return txt;
+}
+
+//---------------------STC----------------------------------
+
+static char * OP_STC_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "STC2 CP%X, CR%X, [%s, #%X]", (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)],(int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "STC%s %X, CP%X, [%s, #%X]",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)],(int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_STC_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "STC2 CP%X, CR%X, [%s, #-%X]",(int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)],(int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "STC%s CP%X, CR%X, [%s, #-%X]",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_STC_P_PREIND(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "STC2 CP%X, CR%X, [%s, #%X]!",(int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "STC%s CP%X, CR%X, [%s, #%X]!",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_STC_M_PREIND(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "STC2 CP%X, CR%X, [%s, #-%X]!",(int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "STC%s CP%X, CR%X, [%s, #-%X]!",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_STC_P_POSTIND(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "STC2 CP%X, CR%X, [%s], #%X",(int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "STC%s CP%X, CR%X, [%s], #%X",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_STC_M_POSTIND(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "STC2 CP%X, CR%X, [%s], #-%X",(int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "STC%s CP%X, CR%X, [%s], #-%X",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_STC_OPTION(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "STC2 CP%X, CR%X, [%s], {%X}",(int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)(i&0xFF));
+ return txt;
+ }
+ sprintf(txt, "STC%s CP%X, CR%X, [%s], {%X}",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)(i&0xFF));
+ return txt;
+}
+
+//---------------------LDC----------------------------------
+
+static char * OP_LDC_P_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "LDC2 CP%X, CR%X, [%s, #%X]",(int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "LDC%s CP%X, CR%X, [%s, #%X]",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_LDC_M_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "LDC2 CP%X, CR%X, [%s, #-%X]",(int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "LDC%s CP%X, CR%X, [%s, #-%X]",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_LDC_P_PREIND(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "LDC2 CP%X, CR%X, [%s, #%X]!",(int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "LDC%s CP%X, CR%X, [%s, #%X]!",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_LDC_M_PREIND(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "LDC2 CP%X, CR%X, [%s, #-%X]!",(int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "LDC%s CP%X, CR%X, [%s, #-%X]!",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_LDC_P_POSTIND(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "LDC2 CP%X, CR%X, [%s], #%X",(int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "LDC%s CP%X, CR%X, [%s], #%X",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_LDC_M_POSTIND(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "LDC2 CP%X, CR%X, [%s], #-%X", (int)REG_POS(i, 8), (int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+ }
+ sprintf(txt, "LDC%s CP%X, CR%X, [%s], #-%X",Condition[CONDITION(i)], (int)REG_POS(i, 8),(int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_LDC_OPTION(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "LDC2 CP%X, CR%X, [%s], {%X}", (int)REG_POS(i, 8), (int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)(i&0xFF));
+ return txt;
+ }
+ sprintf(txt, "LDC%s CP%X, CR%X, [%s], {%X}",Condition[CONDITION(i)], (int)REG_POS(i, 8), (int)REG_POS(i, 12), Registre[REG_POS(i, 16)], (int)(i&0xFF));
+ return txt;
+}
+
+
+/*
+ *
+ * The Enhanced DSP Extension LDRD and STRD instructions.
+ *
+ */
+static char *
+OP_LDRD_STRD_POST_INDEX(u32 adr, u32 i, char * txt) {
+ const char *direction =
+ BIT5(i) ? "STR" : "LDR";
+ /* U bit - set = add, clear = sub */
+ char sign = BIT23(i) ? '+' : '-';
+ int txt_index = 0;
+
+ txt_index += sprintf( &txt[txt_index], "%s%sD R%d, [R%d], ",
+ direction, Condition[CONDITION(i)],
+ (int)REG_POS(i, 12),
+ (int)REG_POS(i, 16));
+
+ /* I bit - set = immediate, clear = reg */
+ if ( BIT22(i)) {
+ sprintf( &txt[txt_index], "#%c%d",
+ sign, (int)(((i>>4) & 0xF0) | (i&0xF)) );
+ }
+ else {
+ sprintf( &txt[txt_index], "%cR%d",
+ sign, (int)REG_POS(i, 0));
+ }
+ return txt;
+}
+static char *
+OP_LDRD_STRD_OFFSET_PRE_INDEX(u32 adr, u32 i, char * txt) {
+ const char *direction =
+ BIT5(i) ? "STR" : "LDR";
+ /* U bit - set = add, clear = sub */
+ char sign = BIT23(i) ? '+' : '-';
+ int txt_index = 0;
+
+ txt_index += sprintf( &txt[txt_index], "%s%sD R%d, [R%d, ",
+ direction, Condition[CONDITION(i)],
+ (int)REG_POS(i, 12),
+ (int)REG_POS(i, 16));
+
+ /* I bit - set = immediate, clear = reg */
+ if ( BIT22(i)) {
+ if ( BIT21(i)) {
+ /* pre-index */
+ sprintf( &txt[txt_index], "#%c%d]!",
+ sign, (int)(((i>>4)&0xF0)|(i&0xF)));
+ }
+ else {
+ /* offset */
+ sprintf( &txt[txt_index], "#%c%d]",
+ sign, (int)(((i>>4)&0xF0)|(i&0xF)));
+ }
+ }
+ else {
+ if ( BIT21(i)) {
+ /* pre-index */
+ sprintf( &txt[txt_index], "%c%d]!",
+ sign, (int)REG_POS(i, 0));
+ }
+ else {
+ /* offset */
+ sprintf( &txt[txt_index], "%c%d]",
+ sign, (int)REG_POS(i, 0));
+ }
+ }
+
+ return txt;
+}
+
+
+//----------------MCR-----------------------
+
+static char * OP_MCR(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "MCR2 CP%d, %X, %s, CR%d, CR%d, %X",(int)REG_POS(i, 8), (int)((i>>21)&7), Registre[REG_POS(i, 12)], (int)REG_POS(i, 16), (int)REG_POS(i, 0), (int)((i>>5)&0x7));
+ return txt;
+ }
+ sprintf(txt, "MCR%s CP%d, %X, %s, CR%d, CR%d, %X",Condition[CONDITION(i)], (int)REG_POS(i, 8), (int)((i>>21)&7), Registre[REG_POS(i, 12)], (int)REG_POS(i, 16), (int)REG_POS(i, 0), (int)((i>>5)&0x7));
+ return txt;
+}
+
+//----------------MRC-----------------------
+
+static char * OP_MRC(u32 adr, u32 i, char * txt)
+{
+ if(CONDITION(i)==0xF)
+ {
+ sprintf(txt, "MRC2 CP%d, %X, %s, CR%d, CR%d, %X",(int)REG_POS(i, 8), (int)((i>>21)&7), Registre[REG_POS(i, 12)], (int)REG_POS(i, 16), (int)REG_POS(i, 0), (int)((i>>5)&0x7));
+ return txt;
+ }
+ sprintf(txt, "MRC%s CP%d, %X, %s, CR%d, CR%d, %X",Condition[CONDITION(i)], (int)REG_POS(i, 8), (int)((i>>21)&7), Registre[REG_POS(i, 12)], (int)REG_POS(i, 16), (int)REG_POS(i, 0), (int)((i>>5)&0x7));
+ return txt;
+}
+
+//--------------SWI--------------------------
+
+static char * OP_SWI(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SWI%s %X",Condition[CONDITION(i)], (int)((i&0xFFFFFF)>>16));
+ return txt;
+}
+
+//----------------BKPT-------------------------
+static char * OP_BKPT(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "BKPT #%X",(int)(((i>>4)&0xFFF)|(i&0xF)));
+ return txt;
+}
+
+//----------------CDP-----------------------
+
+static char * OP_CDP(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "CDP-------------------------------");
+ return txt;
+}
+
+//------------------------------------------------------------
+// THUMB
+//------------------------------------------------------------
+#define REG_NUM(i, n) (((i)>>n)&0x7)
+
+static char * OP_UND_THUMB(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "----");
+ return txt;
+}
+
+static char * OP_LSL_0(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LSL %s, %s, #0", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_LSL(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LSL %s, %s, #%X", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], (int)((i>>6) & 0x1F));
+ return txt;
+}
+
+static char * OP_LSR_0(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LSR %s, %s, #0", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_LSR(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LSR %s, %s, #%X", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], (int)((i>>6) & 0x1F));
+ return txt;
+}
+
+static char * OP_ASR_0(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ASR %s, %s, #0", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_ASR(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ASR %s, %s, #%X", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], (int)((i>>6) & 0x1F));
+ return txt;
+}
+
+static char * OP_ADD_REG(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ADD %s, %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], Registre[REG_NUM(i, 6)]);
+ return txt;
+}
+
+static char * OP_SUB_REG(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SUB %s, %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], Registre[REG_NUM(i, 6)]);
+ return txt;
+}
+
+static char * OP_ADD_IMM3(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ADD %s, %s, #%X", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], (int)REG_NUM(i, 6));
+ return txt;
+}
+
+static char * OP_SUB_IMM3(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SUB %s, %s, #%X", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], (int)REG_NUM(i, 6));
+ return txt;
+}
+
+static char * OP_MOV_IMM8(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MOV %s, #%X", Registre[REG_NUM(i, 8)], (int)(i&0xFF));
+ return txt;
+}
+
+static char * OP_CMP_IMM8(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "CMP %s, #%X", Registre[REG_NUM(i, 8)], (int)(i&0xFF));
+ return txt;
+}
+
+static char * OP_ADD_IMM8(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ADD %s, #%X", Registre[REG_NUM(i, 8)], (int)(i&0xFF));
+ return txt;
+}
+
+static char * OP_SUB_IMM8(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SUB %s, #%X", Registre[REG_NUM(i, 8)], (int)(i&0xFF));
+ return txt;
+}
+
+static char * OP_AND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "AND %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_EOR(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "EOR %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_LSL_REG(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LSL %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_LSR_REG(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LSR %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_ASR_REG(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ASR %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_ADC_REG(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ADC %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_SBC_REG(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SBC %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_ROR_REG(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ROR %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_TST(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "TST %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_NEG(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "NEG %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_CMP(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "CMP %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_CMN(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "CMN %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_ORR(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ORR %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_MUL_REG(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MUL %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_BIC(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "BIC %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_MVN(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "MVN %s, %s", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)]);
+ return txt;
+}
+
+static char * OP_ADD_SPE(u32 adr, u32 i, char * txt)
+{
+ u8 Rd = (i&7) | ((i>>4)&8);
+ sprintf(txt, "ADD %s, %s", Registre[Rd], Registre[REG_POS(i, 3)]);
+ return txt;
+}
+
+static char * OP_CMP_SPE(u32 adr, u32 i, char * txt)
+{
+ u8 Rd = (i&7) | ((i>>4)&8);
+ sprintf(txt, "CMP %s, %s", Registre[Rd], Registre[REG_POS(i, 3)]);
+ return txt;
+}
+
+static char * OP_MOV_SPE(u32 adr, u32 i, char * txt)
+{
+ u8 Rd = (i&7) | ((i>>4)&8);
+ sprintf(txt, "MOV %s, %s", Registre[Rd], Registre[REG_POS(i, 3)]);
+ return txt;
+}
+
+static char * OP_BX_THUMB(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "BX %s", Registre[REG_POS(i, 3)]);
+ return txt;
+}
+
+static char * OP_BLX_THUMB(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "BLX %s", Registre[REG_POS(i, 3)]);
+ return txt;
+}
+
+static char * OP_LDR_PCREL(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDR %s, [PC, #%X]", Registre[REG_NUM(i, 8)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_STR_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STR %s, [%s, %s]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], Registre[REG_NUM(i, 6)]);
+ return txt;
+}
+
+static char * OP_STRH_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH %s, [%s, %s]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], Registre[REG_NUM(i, 6)]);
+ return txt;
+}
+
+static char * OP_STRB_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRB %s, [%s, %s]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], Registre[REG_NUM(i, 6)]);
+ return txt;
+}
+
+static char * OP_LDRSB_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSB %s, [%s, %s]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], Registre[REG_NUM(i, 6)]);
+ return txt;
+}
+
+static char * OP_LDR_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDR %s, [%s, %s]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], Registre[REG_NUM(i, 6)]);
+ return txt;
+}
+
+static char * OP_LDRH_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH %s, [%s, %s]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], Registre[REG_NUM(i, 6)]);
+ return txt;
+}
+
+static char * OP_LDRB_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRB %s, [%s, %s]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], Registre[REG_NUM(i, 6)]);
+ return txt;
+}
+
+static char * OP_LDRSH_REG_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRSH %s, [%s, %s]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], Registre[REG_NUM(i, 6)]);
+ return txt;
+}
+
+static char * OP_STR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STR %s, [%s, #%X]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], (int)((i>>4)&0x7C));
+ return txt;
+}
+
+static char * OP_LDR_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDR %s, [%s, #%X]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], (int)((i>>4)&0x7C));
+ return txt;
+}
+
+static char * OP_STRB_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRB %s, [%s, #%X]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], (int)((i>>6)&0x1F));
+ return txt;
+}
+
+static char * OP_LDRB_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRB %s, [%s, #%X]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], (int)((i>>6)&0x1F));
+ return txt;
+}
+
+static char * OP_STRH_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STRH %s, [%s, #%X]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], (int)((i>>5)&0x3E));
+ return txt;
+}
+
+static char * OP_LDRH_IMM_OFF(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDRH %s, [%s, #%X]", Registre[REG_NUM(i, 0)], Registre[REG_NUM(i, 3)], (int)((i>>5)&0x3E));
+ return txt;
+}
+
+static char * OP_STR_SPREL(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "STR %s, [SP, #%X]", Registre[REG_NUM(i, 8)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_LDR_SPREL(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "LDR %s, [SP, #%X]", Registre[REG_NUM(i, 8)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_ADD_2PC(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ADD %s, PC, #%X", Registre[REG_NUM(i, 8)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_ADD_2SP(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ADD %s, SP, #%X", Registre[REG_NUM(i, 8)], (int)((i&0xFF)<<2));
+ return txt;
+}
+
+static char * OP_ADJUST_P_SP(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "ADD SP, #%X", (int)((i&0x7F)<<2));
+ return txt;
+}
+
+static char * OP_ADJUST_M_SP(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SUB SP, #%X", (int)((i&0x7F)<<2));
+ return txt;
+}
+
+static char * OP_PUSH(u32 adr, u32 i, char * txt)
+{
+ RegList(8);
+ sprintf(txt, "PUSH {%s}", lreg);
+ return txt;
+}
+
+static char * OP_PUSH_LR(u32 adr, u32 i, char * txt)
+{
+ RegList(8);
+ sprintf(txt, "PUSH {%s, LR}", lreg);
+ return txt;
+}
+
+static char * OP_POP(u32 adr, u32 i, char * txt)
+{
+ RegList(8);
+ sprintf(txt, "POP {%s}", lreg);
+ return txt;
+}
+
+static char * OP_POP_PC(u32 adr, u32 i, char * txt)
+{
+ RegList(8);
+ sprintf(txt, "POP {%s, PC}", lreg);
+ return txt;
+}
+
+static char * OP_BKPT_THUMB(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "BKPT");
+ return txt;
+}
+
+static char * OP_STMIA_THUMB(u32 adr, u32 i, char * txt)
+{
+ RegList(8);
+ sprintf(txt, "STMIA %s!, {%s}", Registre[REG_NUM(i, 8)], lreg);
+ return txt;
+}
+
+static char * OP_LDMIA_THUMB(u32 adr, u32 i, char * txt)
+{
+ RegList(8);
+ sprintf(txt, "LDMIA %s!, {%s}", Registre[REG_NUM(i, 8)], lreg);
+ return txt;
+}
+
+static char * OP_B_COND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "B%s #%X", Condition[(i>>8)&0xF], (int)(adr+(((s32)((signed char)(i&0xFF)))<<1)+4));
+ return txt;
+}
+
+static char * OP_SWI_THUMB(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "SWI #%X", (int)(i & 0xFF));
+ return txt;
+}
+
+#define SIGNEEXT_IMM11(i) (((i)&0x7FF) | (BIT10(i) * 0xFFFFF800))
+
+static char * OP_B_UNCOND(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "B #%X", (int)(adr+(SIGNEEXT_IMM11(i)<<1)+4));
+ return txt;
+}
+
+u32 part = 0;
+
+static char * OP_BLX(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "BLX #%X", (int)(part + ((i&0x7FF)<<1))&0xFFFFFFFC);
+ return txt;
+}
+
+static char * OP_BL_10(u32 adr, u32 i, char * txt)
+{
+ part = adr+4 + (SIGNEEXT_IMM11(i)<<12);
+ sprintf(txt, "calculating high part of the address");
+ return txt;
+
+}
+
+static char * OP_BL_11(u32 adr, u32 i, char * txt)
+{
+ sprintf(txt, "BL #%X", (int)(part + ((i&0x7FF)<<1))&0xFFFFFFFC);
+ return txt;
+}
+
+
+
+#define TABDECL(x) x
+
+const DisasmOpFunc des_arm_instructions_set[4096] = {
+#include "instruction_tabdef.inc"
+};
+
+const DisasmOpFunc des_thumb_instructions_set[1024] = {
+#include "thumb_tabdef.inc"
+};
diff --git a/jni/desmume/src/Disassembler.h b/jni/desmume/src/Disassembler.h
new file mode 100755
index 0000000..752df76
--- /dev/null
+++ b/jni/desmume/src/Disassembler.h
@@ -0,0 +1,31 @@
+/*
+ Copyright (C) 2006 yopyop
+ Copyright (C) 2006-2009 DeSmuME team
+
+ 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 file 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 the this software. If not, see .
+*/
+
+#ifndef DISASSEMBLER_H
+#define DISASSEMBLER_H
+
+#include "types.h"
+
+typedef char* (* DisasmOpFunc)(u32 adr, u32 i, char * txt);
+
+extern const DisasmOpFunc des_arm_instructions_set[4096];
+extern const DisasmOpFunc des_thumb_instructions_set[1024];
+
+#endif
+
+
diff --git a/jni/desmume/src/FIFO.cpp b/jni/desmume/src/FIFO.cpp
new file mode 100755
index 0000000..0f24cf0
--- /dev/null
+++ b/jni/desmume/src/FIFO.cpp
@@ -0,0 +1,323 @@
+/*
+ Copyright 2006 yopyop
+ Copyright 2007 shash
+ Copyright 2007-2012 DeSmuME team
+
+ 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 file 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 the this software. If not, see .
+*/
+
+#include "FIFO.h"
+#include
+#include "armcpu.h"
+#include "debug.h"
+#include "mem.h"
+#include "MMU.h"
+#include "NDSSystem.h"
+#include "gfx3d.h"
+
+// ========================================================= IPC FIFO
+IPC_FIFO ipc_fifo[2];
+
+void IPC_FIFOinit(u8 proc)
+{
+ memset(&ipc_fifo[proc], 0, sizeof(IPC_FIFO));
+ T1WriteWord(MMU.MMU_MEM[proc][0x40], 0x184, 0x00000101);
+}
+
+void IPC_FIFOsend(u8 proc, u32 val)
+{
+ u16 cnt_l = T1ReadWord(MMU.MMU_MEM[proc][0x40], 0x184);
+ if (!(cnt_l & IPCFIFOCNT_FIFOENABLE)) return; // FIFO disabled
+ u8 proc_remote = proc ^ 1;
+
+ if (ipc_fifo[proc].size > 15)
+ {
+ cnt_l |= IPCFIFOCNT_FIFOERROR;
+ T1WriteWord(MMU.MMU_MEM[proc][0x40], 0x184, cnt_l);
+ return;
+ }
+
+ u16 cnt_r = T1ReadWord(MMU.MMU_MEM[proc_remote][0x40], 0x184);
+
+ //LOG("IPC%s send FIFO 0x%08X size %03i (l 0x%X, tail %02i) (r 0x%X, tail %02i)\n",
+ // proc?"7":"9", val, ipc_fifo[proc].size, cnt_l, ipc_fifo[proc].tail, cnt_r, ipc_fifo[proc^1].tail);
+
+ cnt_l &= 0xBFFC; // clear send empty bit & full
+ cnt_r &= 0xBCFF; // set recv empty bit & full
+ ipc_fifo[proc].buf[ipc_fifo[proc].tail] = val;
+ ipc_fifo[proc].tail++;
+ ipc_fifo[proc].size++;
+ if (ipc_fifo[proc].tail > 15) ipc_fifo[proc].tail = 0;
+
+ if (ipc_fifo[proc].size > 15)
+ {
+ cnt_l |= IPCFIFOCNT_SENDFULL; // set send full bit
+ cnt_r |= IPCFIFOCNT_RECVFULL; // set recv full bit
+ }
+
+ T1WriteWord(MMU.MMU_MEM[proc][0x40], 0x184, cnt_l);
+ T1WriteWord(MMU.MMU_MEM[proc_remote][0x40], 0x184, cnt_r);
+
+ if(cnt_r&IPCFIFOCNT_RECVIRQEN)
+ NDS_makeIrq(proc_remote, IRQ_BIT_IPCFIFO_RECVNONEMPTY);
+
+ NDS_Reschedule();
+}
+
+u32 IPC_FIFOrecv(u8 proc)
+{
+ u16 cnt_l = T1ReadWord(MMU.MMU_MEM[proc][0x40], 0x184);
+ if (!(cnt_l & IPCFIFOCNT_FIFOENABLE)) return (0); // FIFO disabled
+ u8 proc_remote = proc ^ 1;
+
+ u32 val = 0;
+
+ if ( ipc_fifo[proc_remote].size == 0 ) // remote FIFO error
+ {
+ cnt_l |= IPCFIFOCNT_FIFOERROR;
+ T1WriteWord(MMU.MMU_MEM[proc][0x40], 0x184, cnt_l);
+ return (0);
+ }
+
+ u16 cnt_r = T1ReadWord(MMU.MMU_MEM[proc_remote][0x40], 0x184);
+
+ cnt_l &= 0xBCFF; // clear send full bit & empty
+ cnt_r &= 0xBFFC; // set recv full bit & empty
+
+ val = ipc_fifo[proc_remote].buf[ipc_fifo[proc_remote].head];
+ ipc_fifo[proc_remote].head++;
+ ipc_fifo[proc_remote].size--;
+ if (ipc_fifo[proc_remote].head > 15) ipc_fifo[proc_remote].head = 0;
+
+ //LOG("IPC%s recv FIFO 0x%08X size %03i (l 0x%X, tail %02i) (r 0x%X, tail %02i)\n",
+ // proc?"7":"9", val, ipc_fifo[proc].size, cnt_l, ipc_fifo[proc].tail, cnt_r, ipc_fifo[proc^1].tail);
+
+ if ( ipc_fifo[proc_remote].size == 0 ) // FIFO empty
+ {
+ cnt_l |= IPCFIFOCNT_RECVEMPTY;
+ cnt_r |= IPCFIFOCNT_SENDEMPTY;
+
+ if(cnt_r&IPCFIFOCNT_SENDIRQEN)
+ NDS_makeIrq(proc_remote, IRQ_BIT_IPCFIFO_SENDEMPTY);
+ }
+
+ T1WriteWord(MMU.MMU_MEM[proc][0x40], 0x184, cnt_l);
+ T1WriteWord(MMU.MMU_MEM[proc_remote][0x40], 0x184, cnt_r);
+
+ NDS_Reschedule();
+
+ return (val);
+}
+
+void IPC_FIFOcnt(u8 proc, u16 val)
+{
+ u16 cnt_l = T1ReadWord(MMU.MMU_MEM[proc][0x40], 0x184);
+ u16 cnt_r = T1ReadWord(MMU.MMU_MEM[proc^1][0x40], 0x184);
+
+ if (val & IPCFIFOCNT_FIFOERROR)
+ {
+ //at least SPP uses this, maybe every retail game
+ cnt_l &= ~IPCFIFOCNT_FIFOERROR;
+ }
+
+ if (val & IPCFIFOCNT_SENDCLEAR)
+ {
+ ipc_fifo[proc].head = 0; ipc_fifo[proc].tail = 0; ipc_fifo[proc].size = 0;
+
+ cnt_l |= IPCFIFOCNT_SENDEMPTY;
+ cnt_r |= IPCFIFOCNT_RECVEMPTY;
+
+ cnt_l &= ~IPCFIFOCNT_SENDFULL;
+ cnt_r &= ~IPCFIFOCNT_RECVFULL;
+
+ }
+ cnt_l &= ~IPCFIFOCNT_WRITEABLE;
+ cnt_l |= val & IPCFIFOCNT_WRITEABLE;
+
+ //IPCFIFOCNT_SENDIRQEN may have been set (and/or the fifo may have been cleared) so we may need to trigger this irq
+ //(this approach is used by libnds fifo system on occasion in fifoInternalSend, and began happening frequently for value32 with r4326)
+ if(cnt_l&IPCFIFOCNT_SENDIRQEN) if(cnt_l & IPCFIFOCNT_SENDEMPTY)
+ NDS_makeIrq(proc, IRQ_BIT_IPCFIFO_SENDEMPTY);
+
+ //IPCFIFOCNT_RECVIRQEN may have been set so we may need to trigger this irq
+ if(cnt_l&IPCFIFOCNT_RECVIRQEN) if(!(cnt_l & IPCFIFOCNT_RECVEMPTY))
+ NDS_makeIrq(proc, IRQ_BIT_IPCFIFO_RECVNONEMPTY);
+
+ T1WriteWord(MMU.MMU_MEM[proc][0x40], 0x184, cnt_l);
+ T1WriteWord(MMU.MMU_MEM[proc^1][0x40], 0x184, cnt_r);
+
+ NDS_Reschedule();
+}
+
+// ========================================================= GFX FIFO
+GFX_PIPE gxPIPE;
+GFX_FIFO gxFIFO;
+
+void GFX_PIPEclear()
+{
+ gxPIPE.head = 0;
+ gxPIPE.tail = 0;
+ gxPIPE.size = 0;
+ gxFIFO.matrix_stack_op_size = 0;
+}
+
+void GFX_FIFOclear()
+{
+ gxFIFO.head = 0;
+ gxFIFO.tail = 0;
+ gxFIFO.size = 0;
+ gxFIFO.matrix_stack_op_size = 0;
+}
+
+static void GXF_FIFO_handleEvents()
+{
+ bool low = gxFIFO.size <= 127;
+ bool lowchange = MMU_new.gxstat.fifo_low ^ low;
+ MMU_new.gxstat.fifo_low = low;
+ if(low) triggerDma(EDMAMode_GXFifo);
+
+ bool empty = gxFIFO.size == 0;
+ bool emptychange = MMU_new.gxstat.fifo_empty ^ empty;
+ MMU_new.gxstat.fifo_empty = empty;
+
+
+ MMU_new.gxstat.sb = gxFIFO.matrix_stack_op_size != 0;
+
+ if(emptychange||lowchange) NDS_Reschedule();
+}
+
+static bool IsMatrixStackCommand(u8 cmd)
+{
+ return cmd == 0x11 || cmd == 0x12;
+}
+
+void GFX_FIFOsend(u8 cmd, u32 param)
+{
+ //INFO("gxFIFO: send 0x%02X = 0x%08X (size %03i/0x%02X) gxstat 0x%08X\n", cmd, param, gxFIFO.size, gxFIFO.size, gxstat);
+ //printf("fifo recv: %02X: %08X upto:%d\n",cmd,param,gxFIFO.size+1);
+
+ //TODO - WOAH ! NOT HANDLING A TOO-BIG FIFO RIGHT NOW!
+ //if (gxFIFO.size > 255)
+ //{
+ // GXF_FIFO_handleEvents();
+ // //NEED TO HANDLE THIS!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ // //gxstat |= 0x08000000; // busy
+ // NDS_RescheduleGXFIFO(1);
+ // //INFO("ERROR: gxFIFO is full (cmd 0x%02X = 0x%08X) (prev cmd 0x%02X = 0x%08X)\n", cmd, param, gxFIFO.cmd[255], gxFIFO.param[255]);
+ // return;
+ //}
+
+
+ gxFIFO.cmd[gxFIFO.tail] = cmd;
+ gxFIFO.param[gxFIFO.tail] = param;
+ gxFIFO.tail++;
+ gxFIFO.size++;
+ if (gxFIFO.tail > HACK_GXIFO_SIZE-1) gxFIFO.tail = 0;
+
+ //if a matrix op is entering the pipeline, do accounting for it
+ //(this is tested by wild west, which will jam a few ops in the fifo and then wait for the matrix stack to be
+ //un-busy so it can read back the current matrix stack position)
+ if(IsMatrixStackCommand(cmd))
+ gxFIFO.matrix_stack_op_size++;
+
+ if(gxFIFO.size>=HACK_GXIFO_SIZE) {
+ printf("--FIFO FULL-- : %d\n",gxFIFO.size);
+ }
+
+ //gxstat |= 0x08000000; // set busy flag
+
+ GXF_FIFO_handleEvents();
+
+ NDS_RescheduleGXFIFO(1);
+}
+
+// this function used ONLY in gxFIFO
+BOOL GFX_PIPErecv(u8 *cmd, u32 *param)
+{
+ //gxstat &= 0xF7FFFFFF; // clear busy flag
+
+ if (gxFIFO.size == 0)
+ {
+ GXF_FIFO_handleEvents();
+ return FALSE;
+ }
+
+ *cmd = gxFIFO.cmd[gxFIFO.head];
+ *param = gxFIFO.param[gxFIFO.head];
+
+ //see the associated increment in another function
+ if(IsMatrixStackCommand(*cmd))
+ {
+ gxFIFO.matrix_stack_op_size--;
+ if(gxFIFO.matrix_stack_op_size>0x10000000)
+ printf("bad news disaster in matrix_stack_op_size\n");
+ }
+
+ gxFIFO.head++;
+ gxFIFO.size--;
+ if (gxFIFO.head > HACK_GXIFO_SIZE-1) gxFIFO.head = 0;
+
+ GXF_FIFO_handleEvents();
+
+ return (TRUE);
+}
+
+void GFX_FIFOcnt(u32 val)
+{
+ ////INFO("gxFIFO: write cnt 0x%08X (prev 0x%08X) FIFO size %03i PIPE size %03i\n", val, gxstat, gxFIFO.size, gxPIPE.size);
+
+ if (val & (1<<29)) // clear? (only in homebrew?)
+ {
+ GFX_PIPEclear();
+ GFX_FIFOclear();
+ return;
+ }
+
+ //zeromus says: what happened to clear stack?
+ //if (val & (1<<15)) // projection stack pointer reset
+ //{
+ // gfx3d_ClearStack();
+ // val &= 0xFFFF5FFF; // clear reset (bit15) & stack level (bit13)
+ //}
+
+ T1WriteLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x600, val);
+}
+
+// ========================================================= DISP FIFO
+DISP_FIFO disp_fifo;
+
+void DISP_FIFOinit()
+{
+ memset(&disp_fifo, 0, sizeof(DISP_FIFO));
+}
+
+void DISP_FIFOsend(u32 val)
+{
+ //INFO("DISP_FIFO send value 0x%08X (head 0x%06X, tail 0x%06X)\n", val, disp_fifo.head, disp_fifo.tail);
+ disp_fifo.buf[disp_fifo.tail] = val;
+ disp_fifo.tail++;
+ if (disp_fifo.tail > 0x5FFF)
+ disp_fifo.tail = 0;
+}
+
+u32 DISP_FIFOrecv()
+{
+ //if (disp_fifo.tail == disp_fifo.head) return (0); // FIFO is empty
+ u32 val = disp_fifo.buf[disp_fifo.head];
+ disp_fifo.head++;
+ if (disp_fifo.head > 0x5FFF)
+ disp_fifo.head = 0;
+ return (val);
+}
diff --git a/jni/desmume/src/FIFO.h b/jni/desmume/src/FIFO.h
new file mode 100755
index 0000000..f96c4fa
--- /dev/null
+++ b/jni/desmume/src/FIFO.h
@@ -0,0 +1,91 @@
+/*
+ Copyright 2006 yopyop
+ Copyright 2007 shash
+ Copyright 2007-2011 DeSmuME team
+
+ 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 file 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 the this software. If not, see .
+*/
+
+
+#ifndef FIFO_H
+#define FIFO_H
+
+#include "types.h"
+
+//=================================================== IPC FIFO
+typedef struct
+{
+ u32 buf[16];
+
+ u8 head;
+ u8 tail;
+ u8 size;
+} IPC_FIFO;
+
+extern IPC_FIFO ipc_fifo[2];
+extern void IPC_FIFOinit(u8 proc);
+extern void IPC_FIFOsend(u8 proc, u32 val);
+extern u32 IPC_FIFOrecv(u8 proc);
+extern void IPC_FIFOcnt(u8 proc, u16 val);
+
+//=================================================== GFX FIFO
+
+//yeah, its oversize for now. thats a simpler solution
+//moon seems to overdrive the fifo with immediate dmas
+//i think this might be nintendo code too
+#define HACK_GXIFO_SIZE 200000
+
+typedef struct
+{
+ u8 cmd[HACK_GXIFO_SIZE];
+ u32 param[HACK_GXIFO_SIZE];
+
+ u32 head; // start position
+ u32 tail; // tail
+ u32 size; // size FIFO buffer
+ u32 matrix_stack_op_size; //number of matrix stack items in the fifo (stack is busy when this is nonzero)
+} GFX_FIFO;
+
+typedef struct
+{
+ u8 cmd[4];
+ u32 param[4];
+
+ u8 head;
+ u8 tail;
+ u8 size;
+} GFX_PIPE;
+
+extern GFX_PIPE gxPIPE;
+extern GFX_FIFO gxFIFO;
+extern void GFX_PIPEclear();
+extern void GFX_FIFOclear();
+extern void GFX_FIFOsend(u8 cmd, u32 param);
+extern BOOL GFX_PIPErecv(u8 *cmd, u32 *param);
+extern void GFX_FIFOcnt(u32 val);
+
+//=================================================== Display memory FIFO
+typedef struct
+{
+ u32 buf[0x6000]; // 256x192 32K color
+ u32 head; // head
+ u32 tail; // tail
+} DISP_FIFO;
+
+extern DISP_FIFO disp_fifo;
+extern void DISP_FIFOinit();
+extern void DISP_FIFOsend(u32 val);
+extern u32 DISP_FIFOrecv();
+
+#endif
diff --git a/jni/desmume/src/GPU.cpp b/jni/desmume/src/GPU.cpp
new file mode 100755
index 0000000..4c771a7
--- /dev/null
+++ b/jni/desmume/src/GPU.cpp
@@ -0,0 +1,2780 @@
+/*
+ Copyright (C) 2006 yopyop
+ Copyright (C) 2006-2007 Theo Berkau
+ Copyright (C) 2007 shash
+ Copyright (C) 2008-2012 DeSmuME team
+
+ 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 file 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 the this software. If not, see .
+*/
+
+
+#include
+#include
+#include
+#include
+#include
+#include "MMU.h"
+#include "GPU.h"
+#include "debug.h"
+#include "render3D.h"
+#include "gfx3d.h"
+#include "debug.h"
+#include "GPU_osd.h"
+#include "NDSSystem.h"
+#include "readwrite.h"
+
+#ifdef FASTBUILD
+ #undef FORCEINLINE
+ #define FORCEINLINE
+ //compilation speed hack (cuts time exactly in half by cutting out permutations)
+ #define DISABLE_MOSAIC
+#endif
+
+extern BOOL click;
+NDS_Screen MainScreen;
+NDS_Screen SubScreen;
+
+//instantiate static instance
+GPU::MosaicLookup GPU::mosaicLookup;
+
+//#define DEBUG_TRI
+
+CACHE_ALIGN u8 GPU_screen[4*256*192];
+CACHE_ALIGN u8 sprWin[256];
+
+
+u16 gpu_angle = 0;
+
+const size sprSizeTab[4][4] =
+{
+ {{8, 8}, {16, 8}, {8, 16}, {8, 8}},
+ {{16, 16}, {32, 8}, {8, 32}, {8, 8}},
+ {{32, 32}, {32, 16}, {16, 32}, {8, 8}},
+ {{64, 64}, {64, 32}, {32, 64}, {8, 8}},
+};
+
+
+
+const BGType GPU_mode2type[8][4] =
+{
+ {BGType_Text, BGType_Text, BGType_Text, BGType_Text},
+ {BGType_Text, BGType_Text, BGType_Text, BGType_Affine},
+ {BGType_Text, BGType_Text, BGType_Affine, BGType_Affine},
+ {BGType_Text, BGType_Text, BGType_Text, BGType_AffineExt},
+ {BGType_Text, BGType_Text, BGType_Affine, BGType_AffineExt},
+ {BGType_Text, BGType_Text, BGType_AffineExt, BGType_AffineExt},
+ {BGType_Invalid, BGType_Invalid, BGType_Large8bpp, BGType_Invalid},
+ {BGType_Invalid, BGType_Invalid, BGType_Invalid, BGType_Invalid}
+};
+
+//dont ever think of changing these to bits because you could avoid the multiplies in the main tile blitter.
+//it doesnt really help any
+const short sizeTab[8][4][2] =
+{
+ {{0, 0}, {0, 0}, {0, 0}, {0, 0}}, //Invalid
+ {{256,256}, {512,256}, {256,512}, {512,512}}, //text
+ {{128,128}, {256,256}, {512,512}, {1024,1024}}, //affine
+ {{512,1024}, {1024,512}, {0,0}, {0,0}}, //large 8bpp
+ {{0, 0}, {0, 0}, {0, 0}, {0, 0}}, //affine ext (to be elaborated with another value)
+ {{128,128}, {256,256}, {512,512}, {1024,1024}}, //affine ext 256x16
+ {{128,128}, {256,256}, {512,256}, {512,512}}, //affine ext 256x1
+ {{128,128}, {256,256}, {512,256}, {512,512}}, //affine ext direct
+};
+
+static GraphicsInterface_struct *GFXCore=NULL;
+
+// This should eventually be moved to the port specific code
+GraphicsInterface_struct *GFXCoreList[] = {
+&GFXDummy,
+NULL
+};
+
+static const CACHE_ALIGN u8 win_empty[256] = {
+ 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,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,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,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,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,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,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};
+static CACHE_ALIGN u16 fadeInColors[17][0x8000];
+CACHE_ALIGN u16 fadeOutColors[17][0x8000];
+
+//this should be public, because it gets used somewhere else
+CACHE_ALIGN u8 gpuBlendTable555[17][17][32][32];
+
+
+/*****************************************************************************/
+// INITIALIZATION
+/*****************************************************************************/
+
+
+static void GPU_InitFadeColors()
+{
+ /*
+ NOTE: gbatek (in the reference above) seems to expect 6bit values
+ per component, but as desmume works with 5bit per component,
+ we use 31 as top, instead of 63. Testing it on a few games,
+ using 63 seems to give severe color wraping, and 31 works
+ nicely, so for now we'll just that, until proven wrong.
+
+ i have seen pics of pokemon ranger getting white with 31, with 63 it is nice.
+ it could be pb of alpha or blending or...
+
+ MightyMax> created a test NDS to check how the brightness values work,
+ and 31 seems to be correct. FactorEx is a override for max brighten/darken
+ See: http://mightymax.org/gfx_test_brightness.nds
+ The Pokemon Problem could be a problem with 8/32 bit writes not recognized yet,
+ i'll add that so you can check back.
+
+ */
+
+ for(int i = 0; i <= 16; i++)
+ {
+ for(int j = 0x8000; j < 0x10000; j++)
+ {
+ COLOR cur;
+
+ cur.val = j;
+ cur.bits.red = (cur.bits.red + ((31 - cur.bits.red) * i / 16));
+ cur.bits.green = (cur.bits.green + ((31 - cur.bits.green) * i / 16));
+ cur.bits.blue = (cur.bits.blue + ((31 - cur.bits.blue) * i / 16));
+ cur.bits.alpha = 0;
+ fadeInColors[i][j & 0x7FFF] = cur.val;
+
+ cur.val = j;
+ cur.bits.red = (cur.bits.red - (cur.bits.red * i / 16));
+ cur.bits.green = (cur.bits.green - (cur.bits.green * i / 16));
+ cur.bits.blue = (cur.bits.blue - (cur.bits.blue * i / 16));
+ cur.bits.alpha = 0;
+ fadeOutColors[i][j & 0x7FFF] = cur.val;
+ }
+ }
+
+
+ for(int c0=0;c0<=31;c0++)
+ for(int c1=0;c1<=31;c1++)
+ for(int eva=0;eva<=16;eva++)
+ for(int evb=0;evb<=16;evb++)
+ {
+ int blend = ((c0 * eva) + (c1 * evb) ) / 16;
+ int final = std::min(31,blend);
+ gpuBlendTable555[eva][evb][c0][c1] = final;
+ }
+}
+
+static CACHE_ALIGN GPU GPU_main, GPU_sub;
+
+GPU * GPU_Init(u8 l)
+{
+ GPU * g;
+
+ if(l==0) g = &GPU_main;
+ else g = &GPU_sub;
+
+ GPU_Reset(g, l);
+ GPU_InitFadeColors();
+
+ g->curr_win[0] = win_empty;
+ g->curr_win[1] = win_empty;
+ g->need_update_winh[0] = true;
+ g->need_update_winh[1] = true;
+ g->setFinalColorBck_funcNum = 0;
+ g->setFinalColor3d_funcNum = 0;
+ g->setFinalColorSpr_funcNum = 0;
+
+ return g;
+}
+
+void GPU_Reset(GPU *g, u8 l)
+{
+ memset(g, 0, sizeof(GPU));
+
+ //important for emulator stability for this to initialize, since we have to setup a table based on it
+ g->BLDALPHA_EVA = 0;
+ g->BLDALPHA_EVB = 0;
+ //make sure we have our blend table setup even if the game blends without setting the blend variables
+ g->updateBLDALPHA();
+
+ g->setFinalColorBck_funcNum = 0;
+ g->setFinalColor3d_funcNum = 0;
+ g->setFinalColorSpr_funcNum = 0;
+ g->core = l;
+ g->BGSize[0][0] = g->BGSize[1][0] = g->BGSize[2][0] = g->BGSize[3][0] = 256;
+ g->BGSize[0][1] = g->BGSize[1][1] = g->BGSize[2][1] = g->BGSize[3][1] = 256;
+
+ g->spriteRenderMode = GPU::SPRITE_1D;
+
+ g->bgPrio[4] = 0xFF;
+
+ g->bg0HasHighestPrio = TRUE;
+
+ if(g->core == GPU_SUB)
+ {
+ g->oam = (OAM *)(MMU.ARM9_OAM + ADDRESS_STEP_1KB);
+ g->sprMem = MMU_BOBJ;
+ // GPU core B
+ g->dispx_st = (REG_DISPx*)(&MMU.ARM9_REG[REG_DISPB]);
+ }
+ else
+ {
+ g->oam = (OAM *)(MMU.ARM9_OAM);
+ g->sprMem = MMU_AOBJ;
+ // GPU core A
+ g->dispx_st = (REG_DISPx*)(&MMU.ARM9_REG[0]);
+ }
+}
+
+void GPU_DeInit(GPU * gpu)
+{
+ if(gpu==&GPU_main || gpu==&GPU_sub) return;
+ free(gpu);
+}
+
+static void GPU_resortBGs(GPU *gpu)
+{
+ int i, prio;
+ struct _DISPCNT * cnt = &gpu->dispx_st->dispx_DISPCNT.bits;
+ itemsForPriority_t * item;
+
+ // we don't need to check for windows here...
+// if we tick boxes, invisible layers become invisible & vice versa
+#define OP ^ !
+// if we untick boxes, layers become invisible
+//#define OP &&
+ gpu->LayersEnable[0] = CommonSettings.dispLayers[gpu->core][0] OP(cnt->BG0_Enable/* && !(cnt->BG0_3D && (gpu->core==0))*/);
+ gpu->LayersEnable[1] = CommonSettings.dispLayers[gpu->core][1] OP(cnt->BG1_Enable);
+ gpu->LayersEnable[2] = CommonSettings.dispLayers[gpu->core][2] OP(cnt->BG2_Enable);
+ gpu->LayersEnable[3] = CommonSettings.dispLayers[gpu->core][3] OP(cnt->BG3_Enable);
+ gpu->LayersEnable[4] = CommonSettings.dispLayers[gpu->core][4] OP(cnt->OBJ_Enable);
+
+ // KISS ! lower priority first, if same then lower num
+ for (i=0;iitemsForPriority[i]);
+ item->nbBGs=0;
+ item->nbPixelsX=0;
+ }
+ for (i=NB_BG; i>0; ) {
+ i--;
+ if (!gpu->LayersEnable[i]) continue;
+ prio = (gpu->dispx_st)->dispx_BGxCNT[i].bits.Priority;
+ item = &(gpu->itemsForPriority[prio]);
+ item->BGs[item->nbBGs]=i;
+ item->nbBGs++;
+ }
+
+ int bg0Prio = gpu->dispx_st->dispx_BGxCNT[0].bits.Priority;
+ gpu->bg0HasHighestPrio = TRUE;
+ for(i = 1; i < 4; i++)
+ {
+ if(gpu->LayersEnable[i])
+ {
+ if(gpu->dispx_st->dispx_BGxCNT[i].bits.Priority < bg0Prio)
+ {
+ gpu->bg0HasHighestPrio = FALSE;
+ break;
+ }
+ }
+ }
+
+#if 0
+//debug
+ for (i=0;iitemsForPriority[i]);
+ printf("%d : ", i);
+ for (j=0; jnbBGs)
+ printf("BG%d ", item->BGs[j]);
+ else
+ printf("... ", item->BGs[j]);
+ }
+ }
+ printf("\n");
+#endif
+}
+
+static FORCEINLINE u16 _blend(u16 colA, u16 colB, GPU::TBlendTable* blendTable)
+{
+ u8 r = (*blendTable)[colA&0x1F][colB&0x1F];
+ u8 g = (*blendTable)[(colA>>5)&0x1F][(colB>>5)&0x1F];
+ u8 b = (*blendTable)[(colA>>10)&0x1F][(colB>>10)&0x1F];
+
+ return r|(g<<5)|(b<<10);
+}
+
+FORCEINLINE u16 GPU::blend(u16 colA, u16 colB)
+{
+ return _blend(colA, colB, blendTable);
+}
+
+
+void GPU_setMasterBrightness (GPU *gpu, u16 val)
+{
+ if(!nds.isInVblank()) {
+ PROGINFO("Changing master brightness outside of vblank\n");
+ }
+ gpu->MasterBrightFactor = (val & 0x1F);
+ gpu->MasterBrightMode = (val>>14);
+ //printf("MASTER BRIGHTNESS %d to %d at %d\n",gpu->core,gpu->MasterBrightFactor,nds.VCount);
+
+}
+
+void SetupFinalPixelBlitter (GPU *gpu)
+{
+ u8 windowUsed = (gpu->WIN0_ENABLED | gpu->WIN1_ENABLED | gpu->WINOBJ_ENABLED);
+ u8 blendMode = (gpu->BLDCNT >> 6)&3;
+
+ gpu->setFinalColorSpr_funcNum = windowUsed*4 + blendMode;
+ gpu->setFinalColorBck_funcNum = windowUsed*4 + blendMode;
+ gpu->setFinalColor3d_funcNum = windowUsed*4 + blendMode;
+
+}
+
+//Sets up LCD control variables for Display Engines A and B for quick reading
+void GPU_setVideoProp(GPU * gpu, u32 p)
+{
+ struct _DISPCNT * cnt;
+ cnt = &(gpu->dispx_st)->dispx_DISPCNT.bits;
+
+ T1WriteLong((u8 *)&(gpu->dispx_st)->dispx_DISPCNT.val, 0, p);
+
+ gpu->WIN0_ENABLED = cnt->Win0_Enable;
+ gpu->WIN1_ENABLED = cnt->Win1_Enable;
+ gpu->WINOBJ_ENABLED = cnt->WinOBJ_Enable;
+
+ SetupFinalPixelBlitter (gpu);
+
+ gpu->dispMode = cnt->DisplayMode & ((gpu->core)?1:3);
+
+ gpu->vramBlock = cnt->VRAM_Block;
+
+ switch (gpu->dispMode)
+ {
+ case 0: // Display Off
+ break;
+ case 1: // Display BG and OBJ layers
+ break;
+ case 2: // Display framebuffer
+ gpu->VRAMaddr = (u8 *)MMU.ARM9_LCD + (gpu->vramBlock * 0x20000);
+ break;
+ case 3: // Display from Main RAM
+ // nothing to be done here
+ // see GPU_RenderLine who gets data from FIFO.
+ break;
+ }
+
+ if(cnt->OBJ_Tile_mapping)
+ {
+ //1-d sprite mapping boundaries:
+ //32k, 64k, 128k, 256k
+ gpu->sprBoundary = 5 + cnt->OBJ_Tile_1D_Bound ;
+
+ //do not be deceived: even though a sprBoundary==8 (256KB region) is impossible to fully address
+ //in GPU_SUB, it is still fully legal to address it with that granularity.
+ //so don't do this: //if((gpu->core == GPU_SUB) && (cnt->OBJ_Tile_1D_Bound == 3)) gpu->sprBoundary = 7;
+
+ gpu->spriteRenderMode = GPU::SPRITE_1D;
+ } else {
+ //2d sprite mapping
+ //boundary : 32k
+ gpu->sprBoundary = 5;
+ gpu->spriteRenderMode = GPU::SPRITE_2D;
+ }
+
+ if(cnt->OBJ_BMP_1D_Bound && (gpu->core == GPU_MAIN))
+ gpu->sprBMPBoundary = 8;
+ else
+ gpu->sprBMPBoundary = 7;
+
+ gpu->sprEnable = cnt->OBJ_Enable;
+
+ GPU_setBGProp(gpu, 3, T1ReadWord(MMU.ARM9_REG, gpu->core * ADDRESS_STEP_4KB + 14));
+ GPU_setBGProp(gpu, 2, T1ReadWord(MMU.ARM9_REG, gpu->core * ADDRESS_STEP_4KB + 12));
+ GPU_setBGProp(gpu, 1, T1ReadWord(MMU.ARM9_REG, gpu->core * ADDRESS_STEP_4KB + 10));
+ GPU_setBGProp(gpu, 0, T1ReadWord(MMU.ARM9_REG, gpu->core * ADDRESS_STEP_4KB + 8));
+
+ //GPU_resortBGs(gpu);
+}
+
+//this handles writing in BGxCNT
+void GPU_setBGProp(GPU * gpu, u16 num, u16 p)
+{
+ struct _BGxCNT * cnt = &((gpu->dispx_st)->dispx_BGxCNT[num].bits);
+ struct _DISPCNT * dispCnt = &(gpu->dispx_st)->dispx_DISPCNT.bits;
+
+ T1WriteWord((u8 *)&(gpu->dispx_st)->dispx_BGxCNT[num].val, 0, p);
+
+ GPU_resortBGs(gpu);
+
+ if(gpu->core == GPU_SUB)
+ {
+ gpu->BG_tile_ram[num] = MMU_BBG;
+ gpu->BG_bmp_ram[num] = MMU_BBG;
+ gpu->BG_bmp_large_ram[num] = MMU_BBG;
+ gpu->BG_map_ram[num] = MMU_BBG;
+ }
+ else
+ {
+ gpu->BG_tile_ram[num] = MMU_ABG + dispCnt->CharacBase_Block * ADDRESS_STEP_64KB ;
+ gpu->BG_bmp_ram[num] = MMU_ABG;
+ gpu->BG_bmp_large_ram[num] = MMU_ABG;
+ gpu->BG_map_ram[num] = MMU_ABG + dispCnt->ScreenBase_Block * ADDRESS_STEP_64KB;
+ }
+
+ gpu->BG_tile_ram[num] += (cnt->CharacBase_Block * ADDRESS_STEP_16KB);
+ gpu->BG_bmp_ram[num] += (cnt->ScreenBase_Block * ADDRESS_STEP_16KB);
+ gpu->BG_map_ram[num] += (cnt->ScreenBase_Block * ADDRESS_STEP_2KB);
+
+ switch(num)
+ {
+ case 0:
+ case 1:
+ gpu->BGExtPalSlot[num] = cnt->PaletteSet_Wrap * 2 + num ;
+ break;
+
+ default:
+ gpu->BGExtPalSlot[num] = (u8)num;
+ break;
+ }
+
+ BGType mode = GPU_mode2type[dispCnt->BG_Mode][num];
+
+ //clarify affine ext modes
+ if(mode == BGType_AffineExt)
+ {
+ //see: http://nocash.emubase.de/gbatek.htm#dsvideobgmodescontrol
+ u8 affineModeSelection = (cnt->Palette_256 << 1) | (cnt->CharacBase_Block & 1) ;
+ switch(affineModeSelection)
+ {
+ case 0:
+ case 1:
+ mode = BGType_AffineExt_256x16;
+ break;
+ case 2:
+ mode = BGType_AffineExt_256x1;
+ break;
+ case 3:
+ mode = BGType_AffineExt_Direct;
+ break;
+ }
+ }
+
+ gpu->BGTypes[num] = mode;
+
+ gpu->BGSize[num][0] = sizeTab[mode][cnt->ScreenSize][0];
+ gpu->BGSize[num][1] = sizeTab[mode][cnt->ScreenSize][1];
+
+ gpu->bgPrio[num] = (p & 0x3);
+}
+
+/*****************************************************************************/
+// ENABLING / DISABLING LAYERS
+/*****************************************************************************/
+
+void GPU_remove(GPU * gpu, u8 num)
+{
+ CommonSettings.dispLayers[gpu->core][num] = false;
+ GPU_resortBGs(gpu);
+}
+void GPU_addBack(GPU * gpu, u8 num)
+{
+ CommonSettings.dispLayers[gpu->core][num] = true;
+ GPU_resortBGs(gpu);
+}
+
+
+/*****************************************************************************/
+// ROUTINES FOR INSIDE / OUTSIDE WINDOW CHECKS
+/*****************************************************************************/
+
+template
+FORCEINLINE u8 GPU::withinRect(u16 x) const
+{
+ assert(x<256); //only way to be >256 is in debug views, and mosaic shouldnt be enabled for those
+ return curr_win[WIN_NUM][x];
+}
+
+
+
+// Now assumes that *draw and *effect are different from 0 when called, so we can avoid
+// setting some values twice
+FORCEINLINE void GPU::renderline_checkWindows(u16 x, bool &draw, bool &effect) const
+{
+ // Check if win0 if enabled, and only check if it is
+ // howevever, this has already been taken care of by the window precalculation
+ //if (WIN0_ENABLED)
+ {
+ // it is in win0, do we display ?
+ // high priority
+ if (withinRect<0>(x))
+ {
+ //INFO("bg%i passed win0 : (%i %i) was within (%i %i)(%i %i)\n", bgnum, x, gpu->currLine, gpu->WIN0H0, gpu->WIN0V0, gpu->WIN0H1, gpu->WIN0V1);
+ draw = (WININ0 >> currBgNum)&1;
+ effect = (WININ0_SPECIAL);
+ return;
+ }
+ }
+
+ // Check if win1 if enabled, and only check if it is
+ //if (WIN1_ENABLED)
+ // howevever, this has already been taken care of by the window precalculation
+ {
+ // it is in win1, do we display ?
+ // mid priority
+ if(withinRect<1>(x))
+ {
+ //INFO("bg%i passed win1 : (%i %i) was within (%i %i)(%i %i)\n", bgnum, x, gpu->currLine, gpu->WIN1H0, gpu->WIN1V0, gpu->WIN1H1, gpu->WIN1V1);
+ draw = (WININ1 >> currBgNum)&1;
+ effect = (WININ1_SPECIAL);
+ return;
+ }
+ }
+
+ //if(true) //sprwin test hack
+ if (WINOBJ_ENABLED)
+ {
+ // it is in winOBJ, do we display ?
+ // low priority
+ if (sprWin[x])
+ {
+ draw = (WINOBJ >> currBgNum)&1;
+ effect = (WINOBJ_SPECIAL);
+ return;
+ }
+ }
+
+ if (WINOBJ_ENABLED | WIN1_ENABLED | WIN0_ENABLED)
+ {
+ draw = (WINOUT >> currBgNum) & 1;
+ effect = (WINOUT_SPECIAL);
+ }
+}
+
+/*****************************************************************************/
+// PIXEL RENDERING
+/*****************************************************************************/
+
+template
+FORCEINLINE FASTCALL void GPU::_master_setFinal3dColor(int dstX, int srcX)
+{
+ int x = dstX;
+ int passing = dstX<<1;
+ u8* color = &_3dColorLine[srcX<<2];
+ u8 red = color[0];
+ u8 green = color[1];
+ u8 blue = color[2];
+ u8 alpha = color[3];
+ u8* dst = currDst;
+ u16 final;
+
+ bool windowEffect = blend1; //bomberman land touch dialogbox will fail without setting to blend1
+
+ //TODO - should we do an alpha==0 -> bail out entirely check here?
+
+ if(WINDOW)
+ {
+ bool windowDraw = false;
+ renderline_checkWindows(dstX, windowDraw, windowEffect);
+
+ //we never have anything more to do if the window rejected us
+ if(!windowDraw) return;
+ }
+
+ int bg_under = bgPixels[dstX];
+ if(blend2[bg_under])
+ {
+ alpha++;
+ if(alpha<32)
+ {
+ //if the layer underneath is a blend bottom layer, then 3d always alpha blends with it
+ COLOR c2, cfinal;
+
+ c2.val = HostReadWord(dst, passing);
+
+ cfinal.bits.red = ((red * alpha) + ((c2.bits.red<<1) * (32 - alpha)))>>6;
+ cfinal.bits.green = ((green * alpha) + ((c2.bits.green<<1) * (32 - alpha)))>>6;
+ cfinal.bits.blue = ((blue * alpha) + ((c2.bits.blue<<1) * (32 - alpha)))>>6;
+
+ final = cfinal.val;
+ }
+ else final = R6G6B6TORGB15(red,green,blue);
+ }
+ else
+ {
+ final = R6G6B6TORGB15(red,green,blue);
+ //perform the special effect
+ if(windowEffect)
+ switch(FUNC) {
+ case Increase: final = currentFadeInColors[final&0x7FFF]; break;
+ case Decrease: final = currentFadeOutColors[final&0x7FFF]; break;
+ case None:
+ case Blend:
+ break;
+ }
+ }
+
+ HostWriteWord(dst, passing, (final | 0x8000));
+ bgPixels[x] = 0;
+}
+
+
+template
+FORCEINLINE FASTCALL bool GPU::_master_setFinalBGColor(u16 &color, const u32 x)
+{
+ //no further analysis for no special effects. on backdrops. just draw it.
+ if(FUNC==None && BACKDROP) return true;
+
+ //blend backdrop with what?? this doesn't make sense
+ if(FUNC==Blend && BACKDROP) return true;
+
+ bool windowEffect = true;
+
+ if(WINDOW)
+ {
+ bool windowDraw = false;
+ renderline_checkWindows(x, windowDraw, windowEffect);
+
+ //backdrop must always be drawn
+ if(BACKDROP) windowDraw = true;
+
+ //we never have anything more to do if the window rejected us
+ if(!windowDraw) return false;
+ }
+
+ //special effects rejected. just draw it.
+ if(!(blend1 && windowEffect))
+ return true;
+
+ const u8 bg_under = bgPixels[x];
+
+ //perform the special effect
+ switch(FUNC) {
+ case Blend: if(blend2[bg_under]) color = blend(color,HostReadWord(currDst, x<<1)); break;
+ case Increase: color = currentFadeInColors[color]; break;
+ case Decrease: color = currentFadeOutColors[color]; break;
+ case None: break;
+ }
+ return true;
+}
+
+template
+static FORCEINLINE void _master_setFinalOBJColor(GPU *gpu, u8 *dst, u16 color, u8 alpha, u8 type, u16 x)
+{
+ bool windowDraw = true, windowEffect = true;
+
+ if(WINDOW)
+ {
+ gpu->renderline_checkWindows(x, windowDraw, windowEffect);
+ if(!windowDraw)
+ return;
+ }
+
+ const bool sourceEffectSelected = gpu->blend1;
+
+ //note that the fadein and fadeout is done here before blending,
+ //so that a fade and blending can be applied at the same time (actually, I don't think that is legal..)
+ bool forceBlendingForNormal = false;
+ if(windowEffect && sourceEffectSelected)
+ switch(FUNC)
+ {
+ //zero 13-jun-2010 : if(allowBlend) was removed from these;
+ //it should be possible to increase/decrease and also blend
+ //(the effect would be increase, but the obj properties permit blending and the target layers are configured correctly)
+ case Increase: color = gpu->currentFadeInColors[color&0x7FFF]; break;
+ case Decrease: color = gpu->currentFadeOutColors[color&0x7FFF]; break;
+
+ //only when blend color effect is selected, ordinarily opaque sprites are blended with the color effect params
+ case Blend: forceBlendingForNormal = true; break;
+ case None: break;
+ }
+
+ //this inspects the layer beneath the sprite to see if the current blend flags make it a candidate for blending
+ const int bg_under = gpu->bgPixels[x];
+ const bool allowBlend = (bg_under != 4) && gpu->blend2[bg_under];
+
+ if(allowBlend)
+ {
+ u16 backColor = HostReadWord(dst,x<<1);
+ //this hasn't been tested: this blending occurs without regard to the color effect,
+ //but rather purely from the sprite's alpha
+ if(type == GPU_OBJ_MODE_Bitmap)
+ color = _blend(color,backColor,&gpuBlendTable555[alpha+1][15-alpha]);
+ else if(type == GPU_OBJ_MODE_Transparent || forceBlendingForNormal)
+ color = gpu->blend(color,backColor);
+ }
+
+ HostWriteWord(dst, x<<1, (color | 0x8000));
+ gpu->bgPixels[x] = 4;
+}
+
+//FUNCNUM is only set for backdrop, for an optimization of looking it up early
+template
+FORCEINLINE void GPU::setFinalColorBG(u16 color, const u32 x)
+{
+ //It is not safe to assert this here.
+ //This is probably the best place to enforce it, since almost every single color that comes in here
+ //will be pulled from a palette that needs the top bit stripped off anyway.
+ //assert((color&0x8000)==0);
+ if(!BACKDROP) color &= 0x7FFF; //but for the backdrop we can easily guarantee earlier that theres no bit here
+
+ bool draw;
+
+ const int test = BACKDROP?FUNCNUM:setFinalColorBck_funcNum;
+ switch(test)
+ {
+ case 0: draw = _master_setFinalBGColor(color,x); break;
+ case 1: draw = _master_setFinalBGColor(color,x); break;
+ case 2: draw = _master_setFinalBGColor(color,x); break;
+ case 3: draw = _master_setFinalBGColor(color,x); break;
+ case 4: draw = _master_setFinalBGColor(color,x); break;
+ case 5: draw = _master_setFinalBGColor(color,x); break;
+ case 6: draw = _master_setFinalBGColor(color,x); break;
+ case 7: draw = _master_setFinalBGColor(color,x); break;
+ default: draw = false; break;
+ };
+
+ if(BACKDROP || draw) //backdrop must always be drawn
+ {
+ HostWriteWord(currDst, x<<1, color | 0x8000);
+ if(!BACKDROP) bgPixels[x] = currBgNum; //lets do this in the backdrop drawing loop, should be faster
+ }
+}
+
+
+FORCEINLINE void GPU::setFinalColor3d(int dstX, int srcX)
+{
+ switch(setFinalColor3d_funcNum)
+ {
+ case 0x0: _master_setFinal3dColor(dstX,srcX); break;
+ case 0x1: _master_setFinal3dColor(dstX,srcX); break;
+ case 0x2: _master_setFinal3dColor(dstX,srcX); break;
+ case 0x3: _master_setFinal3dColor(dstX,srcX); break;
+ case 0x4: _master_setFinal3dColor(dstX,srcX); break;
+ case 0x5: _master_setFinal3dColor(dstX,srcX); break;
+ case 0x6: _master_setFinal3dColor(dstX,srcX); break;
+ case 0x7: _master_setFinal3dColor(dstX,srcX); break;
+ };
+}
+
+FORCEINLINE void setFinalColorSpr(GPU* gpu, u8 *dst, u16 color, u8 alpha, u8 type, u16 x)
+{
+ switch(gpu->setFinalColorSpr_funcNum)
+ {
+ case 0x0: _master_setFinalOBJColor(gpu, dst, color, alpha, type, x); break;
+ case 0x1: _master_setFinalOBJColor(gpu, dst, color, alpha, type, x); break;
+ case 0x2: _master_setFinalOBJColor(gpu, dst, color, alpha, type, x); break;
+ case 0x3: _master_setFinalOBJColor(gpu, dst, color, alpha, type, x); break;
+ case 0x4: _master_setFinalOBJColor(gpu, dst, color, alpha, type, x); break;
+ case 0x5: _master_setFinalOBJColor(gpu, dst, color, alpha, type, x); break;
+ case 0x6: _master_setFinalOBJColor(gpu, dst, color, alpha, type, x); break;
+ case 0x7: _master_setFinalOBJColor(gpu, dst, color, alpha, type, x); break;
+ };
+}
+
+template
+FORCEINLINE void GPU::__setFinalColorBck(u16 color, const u32 x, const int opaque)
+{
+ return ___setFinalColorBck(color,x,opaque);
+}
+
+//this was forced inline because most of the time it just falls through to setFinalColorBck() and the function call
+//overhead was ridiculous and terrible
+template
+FORCEINLINE void GPU::___setFinalColorBck(u16 color, const u32 x, const int opaque)
+{
+ //under ordinary circumstances, nobody should pass in something >=256
+ //but in fact, someone is going to try. specifically, that is the map viewer debug tools
+ //which try to render the enter BG. in cases where that is large, it could be up to 1024 wide.
+ assert(debug || x<256);
+
+ int x_int;
+
+ //due to this early out, we will get incorrect behavior in cases where
+ //we enable mosaic in the middle of a frame. this is deemed unlikely.
+ if(!MOSAIC) {
+ if(opaque) goto finish;
+ else return;
+ }
+
+ if(!opaque) color = 0xFFFF;
+ else color &= 0x7FFF;
+
+ //due to the early out, enabled must always be true
+ //x_int = enabled ? GPU::mosaicLookup.width[x].trunc : x;
+ x_int = GPU::mosaicLookup.width[x].trunc;
+
+ if(GPU::mosaicLookup.width[x].begin && GPU::mosaicLookup.height[currLine].begin) {}
+ else color = mosaicColors.bg[currBgNum][x_int];
+ mosaicColors.bg[currBgNum][x] = color;
+
+ if(color != 0xFFFF)
+ {
+finish:
+ setFinalColorBG(color,x);
+ }
+}
+
+//this is fantastically inaccurate.
+//we do the early return even though it reduces the resulting accuracy
+//because we need the speed, and because it is inaccurate anyway
+static void mosaicSpriteLinePixel(GPU * gpu, int x, u16 l, u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab)
+{
+ int x_int;
+ int y = l;
+
+ _OAM_ * spriteInfo = (_OAM_ *)(gpu->oam + gpu->sprNum[x]);
+ bool enabled = spriteInfo->Mosaic;
+ if(!enabled)
+ return;
+
+ bool opaque = prioTab[x] <= 4;
+
+ GPU::MosaicColor::Obj objColor;
+ objColor.color = T1ReadWord(dst,x<<1);
+ objColor.alpha = dst_alpha[x];
+ objColor.opaque = opaque;
+
+ x_int = enabled ? GPU::mosaicLookup.width[x].trunc : x;
+
+ if(enabled)
+ {
+ if(GPU::mosaicLookup.width[x].begin && GPU::mosaicLookup.height[y].begin) {}
+ else objColor = gpu->mosaicColors.obj[x_int];
+ }
+ gpu->mosaicColors.obj[x] = objColor;
+
+ T1WriteWord(dst,x<<1,objColor.color);
+ dst_alpha[x] = objColor.alpha;
+ if(!objColor.opaque) prioTab[x] = 0xFF;
+}
+
+FORCEINLINE static void mosaicSpriteLine(GPU * gpu, u16 l, u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab)
+{
+ //don't even try this unless the mosaic is effective
+ if(gpu->mosaicLookup.widthValue != 0 || gpu->mosaicLookup.heightValue != 0)
+ for(int i=0;i<256;i++)
+ mosaicSpriteLinePixel(gpu,i,l,dst,dst_alpha,typeTab,prioTab);
+}
+
+template void lineLarge8bpp(GPU * gpu)
+{
+ if(gpu->core == 1) {
+ PROGINFO("Cannot use large 8bpp screen on sub core\n");
+ return;
+ }
+
+ u8 num = gpu->currBgNum;
+ u16 XBG = gpu->getHOFS(gpu->currBgNum);
+ u16 YBG = gpu->currLine + gpu->getVOFS(gpu->currBgNum);
+ u16 lg = gpu->BGSize[num][0];
+ u16 ht = gpu->BGSize[num][1];
+ u16 wmask = (lg-1);
+ u16 hmask = (ht-1);
+ YBG &= hmask;
+
+ //TODO - handle wrapping / out of bounds correctly from rot_scale_op?
+
+ u32 tmp_map = gpu->BG_bmp_large_ram[num] + lg * YBG;
+ u8* map = (u8 *)MMU_gpu_map(tmp_map);
+
+ u8* pal = MMU.ARM9_VMEM + gpu->core * ADDRESS_STEP_1KB;
+
+ for(int x = 0; x < lg; ++x, ++XBG)
+ {
+ XBG &= wmask;
+ u8 pixel = map[XBG];
+ u16 color = T1ReadWord(pal, pixel<<1);
+ gpu->__setFinalColorBck(color,x,color);
+ }
+
+}
+
+/*****************************************************************************/
+// BACKGROUND RENDERING -TEXT-
+/*****************************************************************************/
+// render a text background to the combined pixelbuffer
+template INLINE void renderline_textBG(GPU * gpu, u16 XBG, u16 YBG, u16 LG)
+{
+ u8 num = gpu->currBgNum;
+ struct _BGxCNT *bgCnt = &(gpu->dispx_st)->dispx_BGxCNT[num].bits;
+ struct _DISPCNT *dispCnt = &(gpu->dispx_st)->dispx_DISPCNT.bits;
+ u16 lg = gpu->BGSize[num][0];
+ u16 ht = gpu->BGSize[num][1];
+ u16 wmask = (lg-1);
+ u16 hmask = (ht-1);
+ u16 tmp = ((YBG & hmask) >> 3);
+ u32 map;
+ u8 *pal, *line;
+ u32 tile;
+ u16 color;
+ u16 xoff;
+ u16 yoff;
+ u32 x = 0;
+ u32 xfin;
+
+ s8 line_dir = 1;
+ u32 mapinfo;
+ TILEENTRY tileentry;
+
+ u32 tmp_map = gpu->BG_map_ram[num] + (tmp&31) * 64;
+ if(tmp>31)
+ tmp_map+= ADDRESS_STEP_512B << bgCnt->ScreenSize ;
+
+ map = tmp_map;
+ tile = gpu->BG_tile_ram[num];
+
+ xoff = XBG;
+ pal = MMU.ARM9_VMEM + gpu->core * ADDRESS_STEP_1KB;
+
+ if(!bgCnt->Palette_256) // color: 16 palette entries
+ {
+ yoff = ((YBG&7)<<2);
+ xfin = 8 - (xoff&7);
+ for(x = 0; x < LG; xfin = std::min(x+8, LG))
+ {
+ u16 tilePalette = 0;
+ tmp = ((xoff&wmask)>>3);
+ mapinfo = map + (tmp&0x1F) * 2;
+ if(tmp>31) mapinfo += 32*32*2;
+ tileentry.val = T1ReadWord(MMU_gpu_map(mapinfo), 0);
+
+ tilePalette = (tileentry.bits.Palette*16);
+
+ line = (u8*)MMU_gpu_map(tile + (tileentry.bits.TileNum * 0x20) + ((tileentry.bits.VFlip) ? (7*4)-yoff : yoff));
+
+ if(tileentry.bits.HFlip)
+ {
+ line += (3 - ((xoff&7)>>1));
+ for(; x < xfin; line --)
+ {
+ u8 currLine = *line;
+
+ if(!(xoff&1))
+ {
+ color = T1ReadWord(pal, ((currLine>>4) + tilePalette) << 1);
+ gpu->__setFinalColorBck(color,x,currLine>>4);
+ x++; xoff++;
+ }
+
+ if(x__setFinalColorBck(color,x,currLine&0xF);
+ x++; xoff++;
+ }
+ }
+ } else {
+ line += ((xoff&7)>>1);
+ for(; x < xfin; line ++)
+ {
+ u8 currLine = *line;
+
+ if(!(xoff&1))
+ {
+ color = T1ReadWord(pal, ((currLine&0xF) + tilePalette) << 1);
+ gpu->__setFinalColorBck(color,x,currLine&0xF);
+ x++; xoff++;
+ }
+
+ if(x>4) + tilePalette) << 1);
+ gpu->__setFinalColorBck(color,x,currLine>>4);
+ x++; xoff++;
+ }
+ }
+ }
+ }
+ return;
+ }
+
+ //256-color BG
+
+ if(dispCnt->ExBGxPalette_Enable) // color: extended palette
+ {
+ pal = MMU.ExtPal[gpu->core][gpu->BGExtPalSlot[num]];
+ if(!pal) return;
+ }
+
+ yoff = ((YBG&7)<<3);
+ u8* tilePal;
+ xfin = 8 - (xoff&7);
+ u32 extPalMask = -dispCnt->ExBGxPalette_Enable;
+ for(x = 0; x < LG; xfin = std::min(x+8, LG))
+ {
+ tmp = (xoff & (lg-1))>>3;
+ mapinfo = map + (tmp & 31) * 2;
+ if(tmp > 31) mapinfo += 32*32*2;
+ tileentry.val = T1ReadWord(MMU_gpu_map(mapinfo), 0);
+ tilePal = pal + ((tileentry.bits.Palette<<9)&extPalMask);
+ line = (u8*)MMU_gpu_map(tile + (tileentry.bits.TileNum*0x40) + ((tileentry.bits.VFlip) ? (7*8)-yoff : yoff));
+
+ if(tileentry.bits.HFlip)
+ {
+ line += (7 - (xoff&7));
+ line_dir = -1;
+ } else {
+ line += (xoff&7);
+ line_dir = 1;
+ }
+ for(; x < xfin; )
+ {
+ color = T1ReadWord(tilePal, (*line) << 1);
+
+ gpu->__setFinalColorBck(color,x,*line);
+
+ x++; xoff++;
+
+ line += line_dir;
+ }
+ }
+}
+
+/*****************************************************************************/
+// BACKGROUND RENDERING -ROTOSCALE-
+/*****************************************************************************/
+
+template FORCEINLINE void rot_tiled_8bit_entry(GPU * gpu, s32 auxX, s32 auxY, int lg, u32 map, u32 tile, u8 * pal, int i) {
+ u8 palette_entry;
+ u16 tileindex, x, y, color;
+
+ tileindex = *(u8*)MMU_gpu_map(map + ((auxX>>3) + (auxY>>3) * (lg>>3)));
+
+ x = (auxX&7);
+ y = (auxY&7);
+
+ palette_entry = *(u8*)MMU_gpu_map(tile + ((tileindex<<6)+(y<<3)+x));
+ color = T1ReadWord(pal, palette_entry << 1);
+ gpu->__setFinalColorBck(color,i,palette_entry);
+}
+
+template FORCEINLINE void rot_tiled_16bit_entry(GPU * gpu, s32 auxX, s32 auxY, int lg, u32 map, u32 tile, u8 * pal, int i) {
+ void* const map_addr = MMU_gpu_map(map + (((auxX>>3) + (auxY>>3) * (lg>>3))<<1));
+
+ TILEENTRY tileentry;
+ tileentry.val = T1ReadWord(map_addr, 0);
+
+ const u16 x = ((tileentry.bits.HFlip) ? 7 - (auxX) : (auxX))&7;
+ const u16 y = ((tileentry.bits.VFlip) ? 7 - (auxY) : (auxY))&7;
+
+ const u8 palette_entry = *(u8*)MMU_gpu_map(tile + ((tileentry.bits.TileNum<<6)+(y<<3)+x));
+ const u16 color = T1ReadWord(pal, (palette_entry + (extPal ? (tileentry.bits.Palette<<8) : 0)) << 1);
+ gpu->__setFinalColorBck(color, i, palette_entry);
+}
+
+template FORCEINLINE void rot_256_map(GPU * gpu, s32 auxX, s32 auxY, int lg, u32 map, u32 tile, u8 * pal, int i) {
+ u8 palette_entry;
+ u16 color;
+
+ u8* adr = (u8*)MMU_gpu_map((map) + ((auxX + auxY * lg)));
+
+ palette_entry = *adr;
+ color = T1ReadWord(pal, palette_entry << 1);
+ gpu->__setFinalColorBck(color, i, palette_entry);
+}
+
+template FORCEINLINE void rot_BMP_map(GPU * gpu, s32 auxX, s32 auxY, int lg, u32 map, u32 tile, u8 * pal, int i) {
+ u16 color;
+ void* adr = MMU_gpu_map((map) + ((auxX + auxY * lg) << 1));
+ color = T1ReadWord(adr, 0);
+ gpu->__setFinalColorBck(color, i, color&0x8000);
+}
+
+typedef void (*rot_fun)(GPU * gpu, s32 auxX, s32 auxY, int lg, u32 map, u32 tile, u8 * pal, int i);
+
+template
+FORCEINLINE void rot_scale_op(GPU * gpu, s32 X, s32 Y, s16 PA, s16 PB, s16 PC, s16 PD, u16 LG, s32 wh, s32 ht, u32 map, u32 tile, u8 * pal)
+{
+ ROTOCOORD x, y;
+ x.val = X;
+ y.val = Y;
+
+ const s32 dx = (s32)PA;
+ const s32 dy = (s32)PC;
+
+ // as an optimization, specially handle the fairly common case of
+ // "unrotated + unscaled + no boundary checking required"
+ if(dx==0x100 && dy==0)
+ {
+ s32 auxX = x.bits.Integer;
+ s32 auxY = y.bits.Integer;
+ if(WRAP || (auxX + LG < wh && auxX >= 0 && auxY < ht && auxY >= 0))
+ {
+ if(WRAP)
+ {
+ auxY = auxY & (ht-1);
+ auxX = auxX & (wh-1);
+ }
+ for(int i = 0; i < LG; ++i)
+ {
+ fun(gpu, auxX, auxY, wh, map, tile, pal, i);
+ auxX++;
+ if(WRAP)
+ auxX = auxX & (wh-1);
+ }
+ return;
+ }
+ }
+
+ for(int i = 0; i < LG; ++i)
+ {
+ s32 auxX, auxY;
+ auxX = x.bits.Integer;
+ auxY = y.bits.Integer;
+
+ if(WRAP)
+ {
+ auxX = auxX & (wh-1);
+ auxY = auxY & (ht-1);
+ }
+
+ if(WRAP || ((auxX >= 0) && (auxX < wh) && (auxY >= 0) && (auxY < ht)))
+ fun(gpu, auxX, auxY, wh, map, tile, pal, i);
+
+ x.val += dx;
+ y.val += dy;
+ }
+}
+
+template
+FORCEINLINE void apply_rot_fun(GPU * gpu, s32 X, s32 Y, s16 PA, s16 PB, s16 PC, s16 PD, u16 LG, u32 map, u32 tile, u8 * pal)
+{
+ struct _BGxCNT * bgCnt = &(gpu->dispx_st)->dispx_BGxCNT[gpu->currBgNum].bits;
+ s32 wh = gpu->BGSize[gpu->currBgNum][0];
+ s32 ht = gpu->BGSize[gpu->currBgNum][1];
+ if(bgCnt->PaletteSet_Wrap)
+ rot_scale_op(gpu, X, Y, PA, PB, PC, PD, LG, wh, ht, map, tile, pal);
+ else rot_scale_op(gpu, X, Y, PA, PB, PC, PD, LG, wh, ht, map, tile, pal);
+}
+
+
+template FORCEINLINE void rotBG2(GPU * gpu, s32 X, s32 Y, s16 PA, s16 PB, s16 PC, s16 PD, u16 LG)
+{
+ u8 num = gpu->currBgNum;
+ u8 * pal = MMU.ARM9_VMEM + gpu->core * 0x400;
+// printf("rot mode\n");
+ apply_rot_fun >(gpu,X,Y,PA,PB,PC,PD,LG, gpu->BG_map_ram[num], gpu->BG_tile_ram[num], pal);
+}
+
+template FORCEINLINE void extRotBG2(GPU * gpu, s32 X, s32 Y, s16 PA, s16 PB, s16 PC, s16 PD, s16 LG)
+{
+ u8 num = gpu->currBgNum;
+ struct _DISPCNT * dispCnt = &(gpu->dispx_st)->dispx_DISPCNT.bits;
+
+ u8 *pal;
+
+ switch(gpu->BGTypes[num])
+ {
+ case BGType_AffineExt_256x16:
+ if(dispCnt->ExBGxPalette_Enable)
+ pal = MMU.ExtPal[gpu->core][gpu->BGExtPalSlot[num]];
+ else
+ pal = MMU.ARM9_VMEM + gpu->core * 0x400;
+ if (!pal) return;
+ // 16 bit bgmap entries
+ if(dispCnt->ExBGxPalette_Enable)
+ apply_rot_fun >(gpu,X,Y,PA,PB,PC,PD,LG, gpu->BG_map_ram[num], gpu->BG_tile_ram[num], pal);
+ else apply_rot_fun >(gpu,X,Y,PA,PB,PC,PD,LG, gpu->BG_map_ram[num], gpu->BG_tile_ram[num], pal);
+ return;
+ case BGType_AffineExt_256x1:
+ // 256 colors
+ pal = MMU.ARM9_VMEM + gpu->core * 0x400;
+ apply_rot_fun >(gpu,X,Y,PA,PB,PC,PD,LG, gpu->BG_bmp_ram[num], 0, pal);
+ return;
+ case BGType_AffineExt_Direct:
+ // direct colors / BMP
+ apply_rot_fun >(gpu,X,Y,PA,PB,PC,PD,LG, gpu->BG_bmp_ram[num], 0, NULL);
+ return;
+ case BGType_Large8bpp:
+ // large screen 256 colors
+ pal = MMU.ARM9_VMEM + gpu->core * 0x400;
+ apply_rot_fun >(gpu,X,Y,PA,PB,PC,PD,LG, gpu->BG_bmp_large_ram[num], 0, pal);
+ return;
+ default: break;
+ }
+}
+
+/*****************************************************************************/
+// BACKGROUND RENDERING -HELPER FUNCTIONS-
+/*****************************************************************************/
+
+#if 0
+static void lineNull(GPU * gpu)
+{
+}
+#endif
+
+template void lineText(GPU * gpu)
+{
+ if(gpu->debug)
+ {
+ const s32 wh = gpu->BGSize[gpu->currBgNum][0];
+ renderline_textBG(gpu, 0, gpu->currLine, wh);
+ }
+ else
+ {
+ const u16 vofs = gpu->getVOFS(gpu->currBgNum);
+ const u16 hofs = gpu->getHOFS(gpu->currBgNum);
+ renderline_textBG(gpu, hofs, gpu->currLine + vofs, 256);
+ }
+}
+
+template void lineRot(GPU * gpu)
+{
+ BGxPARMS * parms;
+ if (gpu->currBgNum==2) {
+ parms = &(gpu->dispx_st)->dispx_BG2PARMS;
+ } else {
+ parms = &(gpu->dispx_st)->dispx_BG3PARMS;
+ }
+
+ if(gpu->debug)
+ {
+ s32 wh = gpu->BGSize[gpu->currBgNum][0];
+ rotBG2(gpu, 0, (s16)gpu->currLine*256, 256,0, 0,-77, wh);
+ }
+ else
+ {
+ rotBG2(gpu,
+ parms->BGxX,
+ parms->BGxY,
+ parms->BGxPA,
+ parms->BGxPB,
+ parms->BGxPC,
+ parms->BGxPD,
+ 256);
+ parms->BGxX += parms->BGxPB;
+ parms->BGxY += parms->BGxPD;
+ }
+}
+
+template void lineExtRot(GPU * gpu)
+{
+ BGxPARMS * parms;
+ if (gpu->currBgNum==2) {
+ parms = &(gpu->dispx_st)->dispx_BG2PARMS;
+ } else {
+ parms = &(gpu->dispx_st)->dispx_BG3PARMS;
+ }
+
+ if(gpu->debug)
+ {
+ s32 wh = gpu->BGSize[gpu->currBgNum][0];
+ extRotBG2(gpu, 0, (s16)gpu->currLine*256, 256,0, 0,-77, wh);
+ }
+ else
+ {
+ extRotBG2(gpu,
+ parms->BGxX,
+ parms->BGxY,
+ parms->BGxPA,
+ parms->BGxPB,
+ parms->BGxPC,
+ parms->BGxPD,
+ 256);
+ parms->BGxX += parms->BGxPB;
+ parms->BGxY += parms->BGxPD;
+ }
+}
+
+/*****************************************************************************/
+// SPRITE RENDERING -HELPER FUNCTIONS-
+/*****************************************************************************/
+
+#define nbShow 128
+
+/* if i understand it correct, and it fixes some sprite problems in chameleon shot */
+/* we have a 15 bit color, and should use the pal entry bits as alpha ?*/
+/* http://nocash.emubase.de/gbatek.htm#dsvideoobjs */
+INLINE void render_sprite_BMP (GPU * gpu, u8 spriteNum, u16 l, u8 * dst, u32 srcadr, u8 * dst_alpha, u8 * typeTab, u8 * prioTab, u8 prio, int lg, int sprX, int x, int xdir, u8 alpha)
+{
+ int i; u16 color;
+ for(i = 0; i < lg; i++, ++sprX, x+=xdir)
+ {
+ u16* src = (u16*)MMU_gpu_map(srcadr+(x<<1));
+ color = LE_TO_LOCAL_16(*src);
+
+ // alpha bit = invisible
+ if ((color&0x8000)&&(priosprNum[sprX] = spriteNum;
+ }
+ }
+}
+
+INLINE void render_sprite_256(GPU * gpu, u8 spriteNum, u16 l, u8 * dst, u32 srcadr, u16 * pal, u8 * dst_alpha, u8 * typeTab, u8 * prioTab, u8 prio, int lg, int sprX, int x, int xdir, u8 alpha)
+{
+ int i;
+ u8 palette_entry;
+ u16 color;
+
+ for(i = 0; i < lg; i++, ++sprX, x+=xdir)
+ {
+ u32 adr = srcadr + (x&0x7) + ((x&0xFFF8)<<3);
+ u8* src = (u8 *)MMU_gpu_map(adr);
+ palette_entry = *src;
+ color = LE_TO_LOCAL_16(pal[palette_entry]);
+
+ // palette entry = 0 means backdrop
+ if ((palette_entry>0)&&(priosprNum[sprX] = spriteNum;
+ }
+ }
+}
+
+INLINE void render_sprite_16 ( GPU * gpu, u16 l, u8 * dst, u32 srcadr, u16 * pal, u8 * dst_alpha, u8 * typeTab, u8 * prioTab, u8 prio, int lg, int sprX, int x, int xdir, u8 alpha)
+{
+ int i;
+ u8 palette, palette_entry;
+ u16 color, x1;
+
+ for(i = 0; i < lg; i++, ++sprX, x+=xdir)
+ {
+ x1 = x>>1;
+
+ u32 adr = srcadr + (x1&0x3) + ((x1&0xFFFC)<<3);
+ u8* src = (u8 *)MMU_gpu_map(adr);//
+ palette = *src;
+
+ if (x & 1) palette_entry = palette >> 4;
+ else palette_entry = palette & 0xF;
+ color = LE_TO_LOCAL_16(pal[palette_entry]);
+
+ // palette entry = 0 means backdrop
+ if ((palette_entry>0)&&(prio>1;
+ palette = src[(x1&0x3) + ((x1&0xFFFC)<<3)];
+ if (x & 1) palette_entry = palette >> 4;
+ else palette_entry = palette & 0xF;
+ //sprWin[sprX] = (palette_entry)?1:0;
+ if(palette_entry)
+ sprWin[sprX] = 1;
+ }
+ }
+}
+
+// return val means if the sprite is to be drawn or not
+FORCEINLINE BOOL compute_sprite_vars(_OAM_ * spriteInfo, u16 l,
+ size &sprSize, s32 &sprX, s32 &sprY, s32 &x, s32 &y, s32 &lg, int &xdir) {
+
+ x = 0;
+ // get sprite location and size
+ sprX = (spriteInfo->X/*<<23*/)/*>>23*/;
+ sprY = spriteInfo->Y;
+ sprSize = sprSizeTab[spriteInfo->Size][spriteInfo->Shape];
+
+ lg = sprSize.x;
+
+ if (sprY>=192)
+ sprY = (s32)((s8)(spriteInfo->Y));
+
+// FIXME: for rot/scale, a list of entries into the sprite should be maintained,
+// that tells us where the first pixel of a screenline starts in the sprite,
+// and how a step to the right in a screenline translates within the sprite
+
+ //this wasn't really tested by anything. very unlikely to get triggered
+ y = (l - sprY)&255; /* get the y line within sprite coords */
+ if(y >= sprSize.y)
+ return FALSE;
+
+ if((sprX==256)||(sprX+sprSize.x<=0)) /* sprite pixels outside of line */
+ return FALSE; /* not to be drawn */
+
+ // sprite portion out of the screen (LEFT)
+ if(sprX<0)
+ {
+ lg += sprX;
+ x = -(sprX);
+ sprX = 0;
+ }
+ // sprite portion out of the screen (RIGHT)
+ if (sprX+sprSize.x >= 256)
+ lg = 256 - sprX;
+
+ // switch TOP<-->BOTTOM
+ if (spriteInfo->VFlip)
+ y = sprSize.y - y -1;
+
+ // switch LEFT<-->RIGHT
+ if (spriteInfo->HFlip) {
+ x = sprSize.x - x -1;
+ xdir = -1;
+ } else {
+ xdir = 1;
+ }
+ return TRUE;
+}
+
+/*****************************************************************************/
+// SPRITE RENDERING
+/*****************************************************************************/
+
+
+//TODO - refactor this so there isnt as much duped code between rotozoomed and non-rotozoomed versions
+
+static u32 bmp_sprite_address(GPU* gpu, _OAM_ * spriteInfo, size sprSize, s32 y)
+{
+ if (gpu->dispCnt().OBJ_BMP_mapping)
+ {
+ //tested by buffy sacrifice damage blood splatters in corner
+ return gpu->sprMem + (spriteInfo->TileIndex<sprBMPBoundary) + (y*sprSize.x*2);
+ }
+ else
+ {
+ //2d mapping:
+ //verified in rotozoomed mode by knights in the nightmare intro
+
+ if (gpu->dispCnt().OBJ_BMP_2D_dim)
+ //256*256, verified by heroes of mana FMV intro
+ return gpu->sprMem + (((spriteInfo->TileIndex&0x3E0) * 64 + (spriteInfo->TileIndex&0x1F) *8 + ( y << 8)) << 1);
+ else
+ //128*512, verified by harry potter and the order of the phoenix conversation portraits
+ return gpu->sprMem + (((spriteInfo->TileIndex&0x3F0) * 64 + (spriteInfo->TileIndex&0x0F) *8 + ( y << 7)) << 1);
+ }
+}
+
+
+template
+void GPU::_spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab)
+{
+ u16 l = currLine;
+ GPU *gpu = this;
+
+ int cost = 0;
+
+ struct _DISPCNT * dispCnt = &(gpu->dispx_st)->dispx_DISPCNT.bits;
+ _OAM_ * spriteInfo = (_OAM_ *)(gpu->oam);
+ u8 block = gpu->sprBoundary;
+ u8 i;
+
+ //what the hell? why is all this here? the #ifdefs in the bitfields definition should take care of this.
+ //this needs to be fixed anyway since i changed the sprite render order
+ //better yet, just dont do it this way at all. _OAM_ is so small, why not just copy it and then twiddle it?
+
+//#ifdef WORDS_BIGENDIAN
+// *(((u16*)spriteInfo)+1) = (*(((u16*)spriteInfo)+1) >> 1) | *(((u16*)spriteInfo)+1) << 15;
+// *(((u16*)spriteInfo)+2) = (*(((u16*)spriteInfo)+2) >> 2) | *(((u16*)spriteInfo)+2) << 14;
+//#endif
+
+ for(i = 0; i> 15
+// ,*(((u16*)(spriteInfo+1))+2) = (*(((u16*)(spriteInfo+1))+2) << 2) | *(((u16*)(spriteInfo+1))+2) >> 14
+// ,*(((u16*)spriteInfo)+1) = (*(((u16*)spriteInfo)+1) >> 1) | *(((u16*)spriteInfo)+1) << 15
+// ,*(((u16*)spriteInfo)+2) = (*(((u16*)spriteInfo)+2) >> 2) | *(((u16*)spriteInfo)+2) << 14
+//#endif
+ )
+ {
+ //for each sprite:
+ if(cost>=2130)
+ {
+ //out of sprite rendering time
+ //printf("sprite overflow!\n");
+ //return;
+ }
+
+ //do we incur a cost if a sprite is disabled?? we guess so.
+ cost += 2;
+
+ size sprSize;
+ s32 sprX, sprY, x, y, lg;
+ int xdir;
+ u8 prio, * src;
+ u32 srcadr;
+ u16 j;
+
+ // Check if sprite is disabled before everything
+ if (spriteInfo->RotScale == 2)
+ continue;
+
+ prio = spriteInfo->Priority;
+
+
+ if (spriteInfo->RotScale & 1)
+ {
+ s32 fieldX, fieldY, auxX, auxY, realX, realY, offset;
+ u8 blockparameter, *pal;
+ s16 dx, dmx, dy, dmy;
+ u16 colour;
+
+ // Get sprite positions and size
+ sprX = (spriteInfo->X<<23)>>23;
+ sprY = spriteInfo->Y;
+ sprSize = sprSizeTab[spriteInfo->Size][spriteInfo->Shape];
+
+ lg = sprSize.x;
+
+ if (sprY>=192)
+ sprY = (s32)((s8)(spriteInfo->Y));
+
+ // Copy sprite size, to check change it if needed
+ fieldX = sprSize.x;
+ fieldY = sprSize.y;
+
+ // If we are using double size mode, double our control vars
+ if (spriteInfo->RotScale & 2)
+ {
+ fieldX <<= 1;
+ fieldY <<= 1;
+ lg <<= 1;
+ }
+
+ //check if the sprite is visible y-wise. unfortunately our logic for x and y is different due to our scanline based rendering
+ //tested thoroughly by many large sprites in Super Robot Wars K which wrap around the screen
+ y = (l - sprY)&255;
+ if(y >= fieldY)
+ continue;
+
+ //check if sprite is visible x-wise.
+ if((sprX==256) || (sprX+fieldX<=0))
+ continue;
+
+ cost += sprSize.x*2 + 10;
+
+ // Get which four parameter block is assigned to this sprite
+ blockparameter = (spriteInfo->RotScalIndex + (spriteInfo->HFlip<< 3) + (spriteInfo->VFlip << 4))*4;
+
+ // Get rotation/scale parameters
+#ifdef WORDS_BIGENDIAN
+ dx = ((s16)(gpu->oam + blockparameter+0)->attr31 << 8) | ((s16)(gpu->oam + blockparameter+0)->attr30);
+ dmx = ((s16)(gpu->oam + blockparameter+1)->attr31 << 8) | ((s16)(gpu->oam + blockparameter+1)->attr30);
+ dy = ((s16)(gpu->oam + blockparameter+2)->attr31 << 8) | ((s16)(gpu->oam + blockparameter+2)->attr30);
+ dmy = ((s16)(gpu->oam + blockparameter+3)->attr31 << 8) | ((s16)(gpu->oam + blockparameter+3)->attr30);
+#else
+ dx = (s16)(gpu->oam + blockparameter+0)->attr3;
+ dmx = (s16)(gpu->oam + blockparameter+1)->attr3;
+ dy = (s16)(gpu->oam + blockparameter+2)->attr3;
+ dmy = (s16)(gpu->oam + blockparameter+3)->attr3;
+#endif
+
+ // Calculate fixed poitn 8.8 start offsets
+ realX = ((sprSize.x) << 7) - (fieldX >> 1)*dx - (fieldY>>1)*dmx + y * dmx;
+ realY = ((sprSize.y) << 7) - (fieldX >> 1)*dy - (fieldY>>1)*dmy + y * dmy;
+
+ if(sprX<0)
+ {
+ // If sprite is not in the window
+ if(sprX + fieldX <= 0)
+ continue;
+
+ // Otherwise, is partially visible
+ lg += sprX;
+ realX -= sprX*dx;
+ realY -= sprX*dy;
+ sprX = 0;
+ }
+ else
+ {
+ if(sprX+fieldX>256)
+ lg = 256 - sprX;
+ }
+
+ // If we are using 1 palette of 256 colours
+ if(spriteInfo->Depth)
+ {
+ src = (u8 *)MMU_gpu_map(gpu->sprMem + (spriteInfo->TileIndex << block));
+
+ // If extended palettes are set, use them
+ if (dispCnt->ExOBJPalette_Enable)
+ pal = (MMU.ObjExtPal[gpu->core][0]+(spriteInfo->PaletteIndex*0x200));
+ else
+ pal = (MMU.ARM9_VMEM + 0x200 + gpu->core *0x400);
+
+ for(j = 0; j < lg; ++j, ++sprX)
+ {
+ // Get the integer part of the fixed point 8.8, and check if it lies inside the sprite data
+ auxX = (realX>>8);
+ auxY = (realY>>8);
+
+ if (auxX >= 0 && auxY >= 0 && auxX < sprSize.x && auxY < sprSize.y)
+ {
+ if(MODE == SPRITE_2D)
+ offset = (auxX&0x7) + ((auxX&0xFFF8)<<3) + ((auxY>>3)<<10) + ((auxY&0x7)*8);
+ else
+ offset = (auxX&0x7) + ((auxX&0xFFF8)<<3) + ((auxY>>3)*sprSize.x*8) + ((auxY&0x7)*8);
+
+ colour = src[offset];
+
+ if (colour && (prioMode;
+ prioTab[sprX] = prio;
+ }
+ }
+
+ // Add the rotation/scale coeficients, here the rotation/scaling
+ // is performed
+ realX += dx;
+ realY += dy;
+ }
+
+ continue;
+ }
+ // Rotozoomed direct color
+ else if(spriteInfo->Mode == 3)
+ {
+ //transparent (i think, dont bother to render?) if alpha is 0
+ if(spriteInfo->PaletteIndex == 0)
+ continue;
+
+ srcadr = bmp_sprite_address(this,spriteInfo,sprSize,0);
+
+ for(j = 0; j < lg; ++j, ++sprX)
+ {
+ // Get the integer part of the fixed point 8.8, and check if it lies inside the sprite data
+ auxX = (realX>>8);
+ auxY = (realY>>8);
+
+ //this is all very slow, and so much dup code with other rotozoomed modes.
+ //dont bother fixing speed until this whole thing gets reworked
+
+ if (auxX >= 0 && auxY >= 0 && auxX < sprSize.x && auxY < sprSize.y)
+ {
+ if(dispCnt->OBJ_BMP_2D_dim)
+ //tested by knights in the nightmare
+ offset = (bmp_sprite_address(this,spriteInfo,sprSize,auxY)-srcadr)/2+auxX;
+ else //tested by lego indiana jones (somehow?)
+ //tested by buffy sacrifice damage blood splatters in corner
+ offset = auxX + (auxY*sprSize.x);
+
+
+ u16* mem = (u16*)MMU_gpu_map(srcadr + (offset<<1));
+
+ colour = T1ReadWord(mem,0);
+
+ if((colour&0x8000) && (prioPaletteIndex;
+ typeTab[sprX] = spriteInfo->Mode;
+ prioTab[sprX] = prio;
+ }
+ }
+
+ // Add the rotation/scale coeficients, here the rotation/scaling
+ // is performed
+ realX += dx;
+ realY += dy;
+ }
+
+ continue;
+ }
+ // Rotozoomed 16/16 palette
+ else
+ {
+ if(MODE == SPRITE_2D)
+ {
+ src = (u8 *)MMU_gpu_map(gpu->sprMem + (spriteInfo->TileIndex<<5));
+ pal = MMU.ARM9_VMEM + 0x200 + (gpu->core*0x400 + (spriteInfo->PaletteIndex*32));
+ }
+ else
+ {
+ src = (u8 *)MMU_gpu_map(gpu->sprMem + (spriteInfo->TileIndex<sprBoundary));
+ pal = MMU.ARM9_VMEM + 0x200 + gpu->core*0x400 + (spriteInfo->PaletteIndex*32);
+ }
+
+ for(j = 0; j < lg; ++j, ++sprX)
+ {
+ // Get the integer part of the fixed point 8.8, and check if it lies inside the sprite data
+ auxX = (realX>>8);
+ auxY = (realY>>8);
+
+ if (auxX >= 0 && auxY >= 0 && auxX < sprSize.x && auxY < sprSize.y)
+ {
+ if(MODE == SPRITE_2D)
+ offset = ((auxX>>1)&0x3) + (((auxX>>1)&0xFFFC)<<3) + ((auxY>>3)<<10) + ((auxY&0x7)*4);
+ else
+ offset = ((auxX>>1)&0x3) + (((auxX>>1)&0xFFFC)<<3) + ((auxY>>3)*sprSize.x)*4 + ((auxY&0x7)*4);
+
+ colour = src[offset];
+
+ // Get 4bits value from the readed 8bits
+ if (auxX&1) colour >>= 4;
+ else colour &= 0xF;
+
+ if(colour && (prioMode==2)
+ sprWin[sprX] = 1;
+ else
+ {
+ HostWriteWord(dst, (sprX<<1), LE_TO_LOCAL_16(HostReadWord(pal, colour << 1)));
+ dst_alpha[sprX] = 16;
+ typeTab[sprX] = spriteInfo->Mode;
+ prioTab[sprX] = prio;
+ }
+ }
+ }
+
+ // Add the rotation/scale coeficients, here the rotation/scaling
+ // is performed
+ realX += dx;
+ realY += dy;
+ }
+
+ continue;
+ }
+ }
+ else //NOT rotozoomed
+ {
+ u16 * pal;
+
+ if (!compute_sprite_vars(spriteInfo, l, sprSize, sprX, sprY, x, y, lg, xdir))
+ continue;
+
+ cost += sprSize.x;
+
+ if (spriteInfo->Mode == 2)
+ {
+ if(MODE == SPRITE_2D)
+ {
+ if (spriteInfo->Depth)
+ src = (u8 *)MMU_gpu_map(gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*8));
+ else
+ src = (u8 *)MMU_gpu_map(gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*4));
+ }
+ else
+ {
+ if (spriteInfo->Depth)
+ src = (u8 *)MMU_gpu_map(gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*8) + ((y&0x7)*8));
+ else
+ src = (u8 *)MMU_gpu_map(gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*4) + ((y&0x7)*4));
+ }
+
+ render_sprite_Win (gpu, l, src, spriteInfo->Depth, lg, sprX, x, xdir);
+ continue;
+ }
+
+ if (spriteInfo->Mode == 3) //sprite is in BMP format
+ {
+ srcadr = bmp_sprite_address(this,spriteInfo,sprSize, y);
+
+ //transparent (i think, dont bother to render?) if alpha is 0
+ if(spriteInfo->PaletteIndex == 0)
+ continue;
+
+ render_sprite_BMP (gpu, i, l, dst, srcadr, dst_alpha, typeTab, prioTab, prio, lg, sprX, x, xdir, spriteInfo->PaletteIndex);
+ continue;
+ }
+
+ if(spriteInfo->Depth) //256 colors
+ {
+ if(MODE == SPRITE_2D)
+ srcadr = gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*8);
+ else
+ srcadr = gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*8) + ((y&0x7)*8);
+
+ if (dispCnt->ExOBJPalette_Enable)
+ pal = (u16*)(MMU.ObjExtPal[gpu->core][0]+(spriteInfo->PaletteIndex*0x200));
+ else
+ pal = (u16*)(MMU.ARM9_VMEM + 0x200 + gpu->core *0x400);
+
+ render_sprite_256(gpu, i, l, dst, srcadr, pal, dst_alpha, typeTab, prioTab, prio, lg, sprX, x, xdir, spriteInfo->Mode == 1);
+
+ continue;
+ }
+
+ // 16 colors
+ if(MODE == SPRITE_2D)
+ {
+ srcadr = gpu->sprMem + ((spriteInfo->TileIndex)<<5) + ((y>>3)<<10) + ((y&0x7)*4);
+ }
+ else
+ {
+ srcadr = gpu->sprMem + (spriteInfo->TileIndex<>3)*sprSize.x*4) + ((y&0x7)*4);
+ }
+
+ pal = (u16*)(MMU.ARM9_VMEM + 0x200 + gpu->core * 0x400);
+
+ pal += (spriteInfo->PaletteIndex<<4);
+
+ render_sprite_16 (gpu, l, dst, srcadr, pal, dst_alpha, typeTab, prioTab, prio, lg, sprX, x, xdir, spriteInfo->Mode == 1);
+ }
+ }
+
+//#ifdef WORDS_BIGENDIAN
+// *(((u16*)spriteInfo)+1) = (*(((u16*)spriteInfo)+1) << 1) | *(((u16*)spriteInfo)+1) >> 15;
+// *(((u16*)spriteInfo)+2) = (*(((u16*)spriteInfo)+2) << 2) | *(((u16*)spriteInfo)+2) >> 14;
+//#endif
+
+}
+
+
+/*****************************************************************************/
+// SCREEN FUNCTIONS
+/*****************************************************************************/
+
+int Screen_Init(int coreid)
+{
+ MainScreen.gpu = GPU_Init(0);
+ SubScreen.gpu = GPU_Init(1);
+
+ memset(GPU_screen, 0, sizeof(GPU_screen));
+ for(int i = 0; i < (256*192*2); i++)
+ ((u16*)GPU_screen)[i] = 0x7FFF;
+ disp_fifo.head = disp_fifo.tail = 0;
+
+ if (osd) {delete osd; osd =NULL; }
+ osd = new OSDCLASS(-1);
+
+ return GPU_ChangeGraphicsCore(coreid);
+}
+
+void Screen_Reset(void)
+{
+ GPU_Reset(MainScreen.gpu, 0);
+ GPU_Reset(SubScreen.gpu, 1);
+
+ memset(GPU_screen, 0, sizeof(GPU_screen));
+ for(int i = 0; i < (256*192*2); i++)
+ ((u16*)GPU_screen)[i] = 0x7FFF;
+
+ disp_fifo.head = disp_fifo.tail = 0;
+ osd->clear();
+}
+
+void Screen_DeInit(void)
+{
+ GPU_DeInit(MainScreen.gpu);
+ GPU_DeInit(SubScreen.gpu);
+
+ if (GFXCore)
+ GFXCore->DeInit();
+
+ if (osd) {delete osd; osd =NULL; }
+}
+
+/*****************************************************************************/
+// GRAPHICS CORE
+/*****************************************************************************/
+
+// This is for future graphics core switching. This is by no means set in stone
+
+int GPU_ChangeGraphicsCore(int coreid)
+{
+ int i;
+
+ // Make sure the old core is freed
+ if (GFXCore)
+ GFXCore->DeInit();
+
+ // So which core do we want?
+ if (coreid == GFXCORE_DEFAULT)
+ coreid = 0; // Assume we want the first one
+
+ // Go through core list and find the id
+ for (i = 0; GFXCoreList[i] != NULL; i++)
+ {
+ if (GFXCoreList[i]->id == coreid)
+ {
+ // Set to current core
+ GFXCore = GFXCoreList[i];
+ break;
+ }
+ }
+
+ if (GFXCore == NULL)
+ {
+ GFXCore = &GFXDummy;
+ return -1;
+ }
+
+ if (GFXCore->Init() == -1)
+ {
+ // Since it failed, instead of it being fatal, we'll just use the dummy
+ // core instead
+ GFXCore = &GFXDummy;
+ }
+
+ return 0;
+}
+
+int GFXDummyInit();
+void GFXDummyDeInit();
+void GFXDummyResize(int width, int height, BOOL fullscreen);
+void GFXDummyOnScreenText(char *string, ...);
+
+GraphicsInterface_struct GFXDummy = {
+GFXCORE_DUMMY,
+"Dummy Graphics Interface",
+0,
+GFXDummyInit,
+GFXDummyDeInit,
+GFXDummyResize,
+GFXDummyOnScreenText
+};
+
+int GFXDummyInit()
+{
+ return 0;
+}
+
+void GFXDummyDeInit()
+{
+}
+
+void GFXDummyResize(int width, int height, BOOL fullscreen)
+{
+}
+
+void GFXDummyOnScreenText(char *string, ...)
+{
+}
+
+
+/*****************************************************************************/
+// GPU_RenderLine
+/*****************************************************************************/
+
+void GPU_set_DISPCAPCNT(u32 val)
+{
+ GPU * gpu = MainScreen.gpu;
+ struct _DISPCNT * dispCnt = &(gpu->dispx_st)->dispx_DISPCNT.bits;
+
+ gpu->dispCapCnt.val = val;
+ gpu->dispCapCnt.EVA = std::min((u32)16, (val & 0x1F));
+ gpu->dispCapCnt.EVB = std::min((u32)16, ((val >> 8) & 0x1F));
+ gpu->dispCapCnt.writeBlock = (val >> 16) & 0x03;
+ gpu->dispCapCnt.writeOffset = (val >> 18) & 0x03;
+ gpu->dispCapCnt.readBlock = dispCnt->VRAM_Block;
+
+ if (dispCnt->DisplayMode == 2)
+ gpu->dispCapCnt.readOffset = 0;
+ else
+ gpu->dispCapCnt.readOffset = (val >> 26) & 0x03;
+
+ gpu->dispCapCnt.srcA = (val >> 24) & 0x01;
+ gpu->dispCapCnt.srcB = (val >> 25) & 0x01;
+ gpu->dispCapCnt.capSrc = (val >> 29) & 0x03;
+
+ switch((val >> 20) & 0x03)
+ {
+ case 0:
+ gpu->dispCapCnt.capx = DISPCAPCNT::_128;
+ gpu->dispCapCnt.capy = 128;
+ break;
+ case 1:
+ gpu->dispCapCnt.capx = DISPCAPCNT::_256;
+ gpu->dispCapCnt.capy = 64;
+ break;
+ case 2:
+ gpu->dispCapCnt.capx = DISPCAPCNT::_256;
+ gpu->dispCapCnt.capy = 128;
+ break;
+ case 3:
+ gpu->dispCapCnt.capx = DISPCAPCNT::_256;
+ gpu->dispCapCnt.capy = 192;
+ break;
+ }
+
+ /*INFO("Capture 0x%X:\n EVA=%i, EVB=%i, wBlock=%i, wOffset=%i, capX=%i, capY=%i\n rBlock=%i, rOffset=%i, srcCap=%i, dst=0x%X, src=0x%X\n srcA=%i, srcB=%i\n\n",
+ val, gpu->dispCapCnt.EVA, gpu->dispCapCnt.EVB, gpu->dispCapCnt.writeBlock, gpu->dispCapCnt.writeOffset,
+ gpu->dispCapCnt.capx, gpu->dispCapCnt.capy, gpu->dispCapCnt.readBlock, gpu->dispCapCnt.readOffset,
+ gpu->dispCapCnt.capSrc, gpu->dispCapCnt.dst - MMU.ARM9_LCD, gpu->dispCapCnt.src - MMU.ARM9_LCD,
+ gpu->dispCapCnt.srcA, gpu->dispCapCnt.srcB);*/
+}
+
+static void GPU_RenderLine_layer(NDS_Screen * screen, u16 l)
+{
+ CACHE_ALIGN u8 spr[512];
+ CACHE_ALIGN u8 sprAlpha[256];
+ CACHE_ALIGN u8 sprType[256];
+ CACHE_ALIGN u8 sprPrio[256];
+
+ GPU * gpu = screen->gpu;
+ struct _DISPCNT * dispCnt = &(gpu->dispx_st)->dispx_DISPCNT.bits;
+ itemsForPriority_t * item;
+ u16 i16;
+ BOOL BG_enabled = TRUE;
+
+ gpu->currentFadeInColors = &fadeInColors[gpu->BLDY_EVY][0];
+ gpu->currentFadeOutColors = &fadeOutColors[gpu->BLDY_EVY][0];
+
+ u16 backdrop_color = T1ReadWord(MMU.ARM9_VMEM, gpu->core * 0x400) & 0x7FFF;
+
+ //we need to write backdrop colors in the same way as we do BG pixels in order to do correct window processing
+ //this is currently eating up 2fps or so. it is a reasonable candidate for optimization.
+ gpu->currBgNum = 5;
+ switch(gpu->setFinalColorBck_funcNum)
+ {
+ //for backdrops, blend isnt applied (it's illogical, isnt it?)
+ case 0:
+ case 1:
+ memset_u16_le<256>(gpu->currDst,backdrop_color);
+ break;
+
+ //for backdrops, fade in and fade out can be applied if it's a 1st target screen
+ case 2:
+ if(gpu->BLDCNT & 0x20) //backdrop is selected for color effect
+ memset_u16_le<256>(gpu->currDst,gpu->currentFadeInColors[backdrop_color]);
+ break;
+ case 3:
+ if(gpu->BLDCNT & 0x20) //backdrop is selected for color effect
+ memset_u16_le<256>(gpu->currDst,gpu->currentFadeOutColors[backdrop_color]);
+ break;
+
+ //windowed cases apparently need special treatment? why? can we not render the backdrop? how would that even work?
+ case 4: for(int x=0;x<256;x++) gpu->___setFinalColorBck(backdrop_color,x,1); break;
+ case 5: for(int x=0;x<256;x++) gpu->___setFinalColorBck(backdrop_color,x,1); break;
+ case 6: for(int x=0;x<256;x++) gpu->___setFinalColorBck(backdrop_color,x,1); break;
+ case 7: for(int x=0;x<256;x++) gpu->___setFinalColorBck(backdrop_color,x,1); break;
+ }
+
+ memset(gpu->bgPixels,5,256);
+
+ // init background color & priorities
+ memset(sprAlpha, 0, 256);
+ memset(sprType, 0, 256);
+ memset(sprPrio, 0xFF, 256);
+ memset(sprWin, 0, 256);
+
+ // init pixels priorities
+ assert(NB_PRIORITIES==4);
+ gpu->itemsForPriority[0].nbPixelsX = 0;
+ gpu->itemsForPriority[1].nbPixelsX = 0;
+ gpu->itemsForPriority[2].nbPixelsX = 0;
+ gpu->itemsForPriority[3].nbPixelsX = 0;
+
+ // for all the pixels in the line
+ if (gpu->LayersEnable[4])
+ {
+ //n.b. - this is clearing the sprite line buffer to the background color,
+ //but it has been changed to write u32 instead of u16 for a little speedup
+ for(int i = 0; i< 128; ++i) HostWriteTwoWords(spr, i << 2, backdrop_color | (backdrop_color<<16));
+ //zero 06-may-09: I properly supported window color effects for backdrop, but I am not sure
+ //how it interacts with this. I wish we knew why we needed this
+
+ gpu->spriteRender(spr, sprAlpha, sprType, sprPrio);
+ mosaicSpriteLine(gpu, l, spr, sprAlpha, sprType, sprPrio);
+
+ for(int i = 0; i<256; i++)
+ {
+ // assign them to the good priority item
+ int prio = sprPrio[i];
+ if (prio >=4) continue;
+
+ item = &(gpu->itemsForPriority[prio]);
+ item->PixelsX[item->nbPixelsX]=i;
+ item->nbPixelsX++;
+ }
+ }
+
+
+ if (!gpu->LayersEnable[0] && !gpu->LayersEnable[1] && !gpu->LayersEnable[2] && !gpu->LayersEnable[3])
+ BG_enabled = FALSE;
+
+ for(int j=0;j<8;j++)
+ gpu->blend2[j] = (gpu->BLDCNT & (0x100 << j))!=0;
+
+ // paint lower priorities first
+ // then higher priorities on top
+ for(int prio=NB_PRIORITIES; prio > 0; )
+ {
+ prio--;
+ item = &(gpu->itemsForPriority[prio]);
+ // render BGs
+ if (BG_enabled)
+ {
+ for (int i=0; i < item->nbBGs; i++)
+ {
+ i16 = item->BGs[i];
+ if (gpu->LayersEnable[i16])
+ {
+ gpu->currBgNum = (u8)i16;
+ gpu->blend1 = (gpu->BLDCNT & (1 << gpu->currBgNum))!=0;
+
+ struct _BGxCNT *bgCnt = &(gpu->dispx_st)->dispx_BGxCNT[i16].bits;
+ gpu->curr_mosaic_enabled = bgCnt->Mosaic_Enable;
+
+ if (gpu->core == GPU_MAIN)
+ {
+ if (i16 == 0 && dispCnt->BG0_3D)
+ {
+ gpu->currBgNum = 0;
+
+ const u16 hofs = gpu->getHOFS(i16);
+
+ gfx3d_GetLineData(l, &gpu->_3dColorLine);
+ u8* colorLine = gpu->_3dColorLine;
+
+ for(int k = 0; k < 256; k++)
+ {
+ int q = ((k + hofs) & 0x1FF);
+
+ if((q < 0) || (q > 255))
+ continue;
+
+ if(colorLine[(q<<2)+3])
+ gpu->setFinalColor3d(k, q);
+ }
+
+ continue;
+ }
+ }
+
+ //useful for debugging individual layers
+ //if(gpu->core == 1 || i16 != 2) continue;
+
+
+
+
+#ifndef DISABLE_MOSAIC
+ if(gpu->curr_mosaic_enabled)
+ gpu->modeRender(i16);
+ else
+#endif
+ gpu->modeRender(i16);
+ } //layer enabled
+ }
+ }
+
+ // render sprite Pixels
+ if (gpu->LayersEnable[4])
+ {
+ gpu->currBgNum = 4;
+ gpu->blend1 = (gpu->BLDCNT & (1 << gpu->currBgNum))!=0;
+
+ for (int i=0; i < item->nbPixelsX; i++)
+ {
+ i16=item->PixelsX[i];
+ setFinalColorSpr(gpu, gpu->currDst, HostReadWord(spr, (i16<<1)), sprAlpha[i16], sprType[i16], i16);
+ }
+ }
+ }
+}
+
+template static void GPU_RenderLine_DispCapture(u16 l)
+{
+ //this macro takes advantage of the fact that there are only two possible values for capx
+ #define CAPCOPY(SRC,DST,SETALPHABIT) \
+ switch(gpu->dispCapCnt.capx) { \
+ case DISPCAPCNT::_128: \
+ for (int i = 0; i < 128; i++) \
+ HostWriteWord(DST, i << 1, HostReadWord(SRC, i << 1) | (SETALPHABIT?(1<<15):0)); \
+ break; \
+ case DISPCAPCNT::_256: \
+ for (int i = 0; i < 256; i++) \
+ HostWriteWord(DST, i << 1, HostReadWord(SRC, i << 1) | (SETALPHABIT?(1<<15):0)); \
+ break; \
+ default: assert(false); \
+ }
+
+ GPU * gpu = MainScreen.gpu;
+
+ if (l == 0)
+ {
+ if (gpu->dispCapCnt.val & 0x80000000)
+ {
+ gpu->dispCapCnt.enabled = TRUE;
+ T1WriteLong(MMU.ARM9_REG, 0x64, gpu->dispCapCnt.val);
+ }
+ }
+
+ bool skip = SKIP;
+
+ if (gpu->dispCapCnt.enabled)
+ {
+ //128-wide captures should write linearly into memory, with no gaps
+ //this is tested by hotel dusk
+ u32 ofsmul = gpu->dispCapCnt.capx==DISPCAPCNT::_128?256:512;
+ u32 cap_src_adr = gpu->dispCapCnt.readOffset * 0x8000 + (l * 512);
+ u32 cap_dst_adr = gpu->dispCapCnt.writeOffset * 0x8000 + (l * ofsmul);
+
+ //Read/Write block wrap to 00000h when exceeding 1FFFFh (128k)
+ //this has not been tested yet (I thought I needed it for hotel dusk, but it was fixed by the above)
+ cap_src_adr &= 0x1FFFF;
+ cap_dst_adr &= 0x1FFFF;
+
+ cap_src_adr += gpu->dispCapCnt.readBlock * 0x20000;
+ cap_dst_adr += gpu->dispCapCnt.writeBlock * 0x20000;
+
+ u8* cap_src = MMU.ARM9_LCD + cap_src_adr;
+ u8* cap_dst = MMU.ARM9_LCD + cap_dst_adr;
+
+ //we must block captures when the capture dest is not mapped to LCDC
+ if(vramConfiguration.banks[gpu->dispCapCnt.writeBlock].purpose != VramConfiguration::LCDC)
+ skip = true;
+
+ //we must return zero from reads from memory not mapped to lcdc
+ if(vramConfiguration.banks[gpu->dispCapCnt.readBlock].purpose != VramConfiguration::LCDC)
+ cap_src = MMU.blank_memory;
+
+ if(!skip)
+ if (l < gpu->dispCapCnt.capy)
+ {
+ switch (gpu->dispCapCnt.capSrc)
+ {
+ case 0: // Capture source is SourceA
+ {
+ //INFO("Capture source is SourceA\n");
+ switch (gpu->dispCapCnt.srcA)
+ {
+ case 0: // Capture screen (BG + OBJ + 3D)
+ {
+ //INFO("Capture screen (BG + OBJ + 3D)\n");
+
+ u8 *src;
+ src = (u8*)(gpu->tempScanline);
+ CAPCOPY(src,cap_dst,true);
+ }
+ break;
+ case 1: // Capture 3D
+ {
+ //INFO("Capture 3D\n");
+ u16* colorLine;
+ gfx3d_GetLineData15bpp(l, &colorLine);
+ CAPCOPY(((u8*)colorLine),cap_dst,false);
+ }
+ break;
+ }
+ }
+ break;
+ case 1: // Capture source is SourceB
+ {
+ //INFO("Capture source is SourceB\n");
+ switch (gpu->dispCapCnt.srcB)
+ {
+ case 0:
+ //Capture VRAM
+ CAPCOPY(cap_src,cap_dst,true);
+ break;
+ case 1:
+ //capture dispfifo
+ //(not yet tested)
+ for(int i=0; i < 128; i++)
+ T1WriteLong(cap_dst, i << 2, DISP_FIFOrecv());
+ break;
+ }
+ }
+ break;
+ default: // Capture source is SourceA+B blended
+ {
+ //INFO("Capture source is SourceA+B blended\n");
+ u16 *srcA = NULL;
+ u16 *srcB = NULL;
+
+ if (gpu->dispCapCnt.srcA == 0)
+ {
+ // Capture screen (BG + OBJ + 3D)
+ srcA = (u16*)(gpu->tempScanline);
+ }
+ else
+ {
+ gfx3d_GetLineData15bpp(l, &srcA);
+ }
+
+ static u16 fifoLine[256];
+
+ if (gpu->dispCapCnt.srcB == 0) // VRAM screen
+ srcB = (u16 *)cap_src;
+ else
+ {
+ //fifo - tested by splinter cell chaos theory thermal view
+ srcB = fifoLine;
+ for (int i=0; i < 128; i++)
+ T1WriteLong((u8*)srcB, i << 2, DISP_FIFOrecv());
+ }
+
+
+ const int todo = (gpu->dispCapCnt.capx==DISPCAPCNT::_128?128:256);
+
+ for(u16 i = 0; i < todo; i++)
+ {
+ u16 a,r,g,b;
+
+ u16 a_alpha = srcA[i] & 0x8000;
+ u16 b_alpha = srcB[i] & 0x8000;
+
+ if(a_alpha)
+ {
+ a = 0x8000;
+ r = ((srcA[i] & 0x1F) * gpu->dispCapCnt.EVA);
+ g = (((srcA[i] >> 5) & 0x1F) * gpu->dispCapCnt.EVA);
+ b = (((srcA[i] >> 10) & 0x1F) * gpu->dispCapCnt.EVA);
+ }
+ else
+ a = r = g = b = 0;
+
+ if(b_alpha)
+ {
+ a = 0x8000;
+ r += ((srcB[i] & 0x1F) * gpu->dispCapCnt.EVB);
+ g += (((srcB[i] >> 5) & 0x1F) * gpu->dispCapCnt.EVB);
+ b += (((srcB[i] >> 10) & 0x1F) * gpu->dispCapCnt.EVB);
+ }
+
+ r >>= 4;
+ g >>= 4;
+ b >>= 4;
+
+ //freedom wings sky will overflow while doing some fsaa/motionblur effect without this
+ r = std::min((u16)31,r);
+ g = std::min((u16)31,g);
+ b = std::min((u16)31,b);
+
+ HostWriteWord(cap_dst, i << 1, a | (b << 10) | (g << 5) | r);
+ }
+ }
+ break;
+ }
+ }
+
+ if (l>=191)
+ {
+ gpu->dispCapCnt.enabled = FALSE;
+ gpu->dispCapCnt.val &= 0x7FFFFFFF;
+ T1WriteLong(MMU.ARM9_REG, 0x64, gpu->dispCapCnt.val);
+ return;
+ }
+ }
+}
+
+static INLINE void GPU_RenderLine_MasterBrightness(NDS_Screen * screen, u16 l)
+{
+ GPU * gpu = screen->gpu;
+
+ u8 * dst = GPU_screen + (screen->offset + l) * 512;
+ u16 i16;
+
+ //isn't it odd that we can set uselessly high factors here?
+ //factors above 16 change nothing. curious.
+ int factor = gpu->MasterBrightFactor;
+ if(factor==0) return;
+ if(factor>16) factor=16;
+
+
+ //Apply final brightness adjust (MASTER_BRIGHT)
+ //http://nocash.emubase.de/gbatek.htm#dsvideo (Under MASTER_BRIGHTNESS)
+
+ switch (gpu->MasterBrightMode)
+ {
+ // Disabled
+ case 0:
+ break;
+
+ // Bright up
+ case 1:
+ {
+ if(factor != 16)
+ {
+ for(i16 = 0; i16 < 256; ++i16)
+ {
+ ((u16*)dst)[i16] = fadeInColors[factor][((u16*)dst)[i16]&0x7FFF];
+ }
+ }
+ else
+ {
+ // all white (optimization)
+ for(i16 = 0; i16 < 256; ++i16)
+ ((u16*)dst)[i16] = 0x7FFF;
+ }
+ break;
+ }
+
+ // Bright down
+ case 2:
+ {
+ if(factor != 16)
+ {
+ for(i16 = 0; i16 < 256; ++i16)
+ {
+ ((u16*)dst)[i16] = fadeOutColors[factor][((u16*)dst)[i16]&0x7FFF];
+ }
+ }
+ else
+ {
+ // all black (optimization)
+ memset(dst, 0, 512);
+ }
+ break;
+ }
+
+ // Reserved
+ case 3:
+ break;
+ }
+
+}
+
+template
+FORCEINLINE void GPU::setup_windows()
+{
+ u8 y = currLine;
+ u16 startY,endY;
+
+ if(WIN_NUM==0)
+ {
+ startY = WIN0V0;
+ endY = WIN0V1;
+ }
+ else
+ {
+ startY = WIN1V0;
+ endY = WIN1V1;
+ }
+
+ if(WIN_NUM == 0 && !WIN0_ENABLED) goto allout;
+ if(WIN_NUM == 1 && !WIN1_ENABLED) goto allout;
+
+ if(startY > endY)
+ {
+ if((y < startY) && (y > endY)) goto allout;
+ }
+ else
+ {
+ if((y < startY) || (y >= endY)) goto allout;
+ }
+
+ //the x windows will apply for this scanline
+ curr_win[WIN_NUM] = h_win[WIN_NUM];
+ return;
+
+allout:
+ curr_win[WIN_NUM] = win_empty;
+}
+
+void GPU::update_winh(int WIN_NUM)
+{
+ //dont even waste any time in here if the window isnt enabled
+ if(WIN_NUM==0 && !WIN0_ENABLED) return;
+ if(WIN_NUM==1 && !WIN1_ENABLED) return;
+
+ need_update_winh[WIN_NUM] = false;
+ u16 startX,endX;
+
+ if(WIN_NUM==0)
+ {
+ startX = WIN0H0;
+ endX = WIN0H1;
+ }
+ else
+ {
+ startX = WIN1H0;
+ endX = WIN1H1;
+ }
+
+ //the original logic: if you doubt the window code, please check it against the newer implementation below
+ //if(startX > endX)
+ //{
+ // if((x < startX) && (x > endX)) return false;
+ //}
+ //else
+ //{
+ // if((x < startX) || (x >= endX)) return false;
+ //}
+
+ if(startX > endX)
+ {
+ for(int i=0;i<=endX;i++)
+ h_win[WIN_NUM][i] = 1;
+ for(int i=endX+1;igpu;
+
+ //here is some setup which is only done on line 0
+ if(l == 0) {
+ //this is speculative. the idea is as follows:
+ //whenever the user updates the affine start position regs, it goes into the active regs immediately
+ //(this is handled on the set event from MMU)
+ //maybe it shouldnt take effect until the next hblank or something..
+ //this is a based on a combination of:
+ //heroes of mana intro FMV
+ //SPP level 3-8 rotoscale room
+ //NSMB raster fx backdrops
+ //bubble bobble revolution classic mode
+ //NOTE:
+ //I am REALLY unsatisfied with this logic now. But it seems to be working..
+ gpu->refreshAffineStartRegs(-1,-1);
+ }
+
+ if(skip)
+ {
+ gpu->currLine = l;
+ if (gpu->core == GPU_MAIN)
+ {
+ GPU_RenderLine_DispCapture(l);
+ if (l == 191) { disp_fifo.head = disp_fifo.tail = 0; }
+ }
+ return;
+ }
+
+ //blacken the screen if it is turned off by the user
+ if(!CommonSettings.showGpu.screens[gpu->core])
+ {
+ u8 * dst = GPU_screen + (screen->offset + l) * 512;
+ memset(dst,0,512);
+ return;
+ }
+
+ // skip some work if master brightness makes the screen completely white or completely black
+ if(gpu->MasterBrightFactor >= 16 && (gpu->MasterBrightMode == 1 || gpu->MasterBrightMode == 2))
+ {
+ // except if it could cause any side effects (for example if we're capturing), then don't skip anything
+ if(!(gpu->core == GPU_MAIN && (gpu->dispCapCnt.enabled || l == 0 || l == 191)))
+ {
+ gpu->currLine = l;
+ GPU_RenderLine_MasterBrightness(screen, l);
+ return;
+ }
+ }
+
+ //cache some parameters which are assumed to be stable throughout the rendering of the entire line
+ gpu->currLine = l;
+ u16 mosaic_control = T1ReadWord((u8 *)&gpu->dispx_st->dispx_MISC.MOSAIC, 0);
+ u16 mosaic_width = (mosaic_control & 0xF);
+ u16 mosaic_height = ((mosaic_control>>4) & 0xF);
+
+ //mosaic test hacks
+ //mosaic_width = mosaic_height = 3;
+
+ GPU::mosaicLookup.widthValue = mosaic_width;
+ GPU::mosaicLookup.heightValue = mosaic_height;
+ GPU::mosaicLookup.width = &GPU::mosaicLookup.table[mosaic_width][0];
+ GPU::mosaicLookup.height = &GPU::mosaicLookup.table[mosaic_height][0];
+
+ if(gpu->need_update_winh[0]) gpu->update_winh(0);
+ if(gpu->need_update_winh[1]) gpu->update_winh(1);
+
+ gpu->setup_windows<0>();
+ gpu->setup_windows<1>();
+
+ //generate the 2d engine output
+ if(gpu->dispMode == 1) {
+ //optimization: render straight to the output buffer when thats what we are going to end up displaying anyway
+ gpu->tempScanline = screen->gpu->currDst = (u8 *)(GPU_screen) + (screen->offset + l) * 512;
+ } else {
+ //otherwise, we need to go to a temp buffer
+ gpu->tempScanline = screen->gpu->currDst = (u8 *)gpu->tempScanlineBuffer;
+ }
+
+ GPU_RenderLine_layer(screen, l);
+
+ switch (gpu->dispMode)
+ {
+ case 0: // Display Off(Display white)
+ {
+ u8 * dst = GPU_screen + (screen->offset + l) * 512;
+
+ for (int i=0; i<256; i++)
+ HostWriteWord(dst, i << 1, 0x7FFF);
+ }
+ break;
+
+ case 1: // Display BG and OBJ layers
+ //do nothing: it has already been generated into the right place
+ break;
+
+ case 2: // Display vram framebuffer
+ {
+ u8 * dst = GPU_screen + (screen->offset + l) * 512;
+ u8 * src = gpu->VRAMaddr + (l*512);
+ memcpy (dst, src, 512);
+ }
+ break;
+ case 3: // Display memory FIFO
+ {
+ //this has not been tested since the dma timing for dispfifo was changed around the time of
+ //newemuloop. it may not work.
+ u8 * dst = GPU_screen + (screen->offset + l) * 512;
+ for (int i=0; i < 128; i++)
+ T1WriteLong(dst, i << 2, DISP_FIFOrecv() & 0x7FFF7FFF);
+ }
+ break;
+ }
+
+ //capture after displaying so that we can safely display vram before overwriting it here
+ if (gpu->core == GPU_MAIN)
+ {
+ //BUG!!! if someone is capturing and displaying both from the fifo, then it will have been
+ //consumed above by the display before we get here
+ //(is that even legal? i think so)
+ GPU_RenderLine_DispCapture(l);
+ if (l == 191) { disp_fifo.head = disp_fifo.tail = 0; }
+ }
+
+
+ GPU_RenderLine_MasterBrightness(screen, l);
+}
+
+void gpu_savestate(EMUFILE* os)
+{
+ //version
+ write32le(1,os);
+
+ os->fwrite((char*)GPU_screen,sizeof(GPU_screen));
+
+ write32le(MainScreen.gpu->affineInfo[0].x,os);
+ write32le(MainScreen.gpu->affineInfo[0].y,os);
+ write32le(MainScreen.gpu->affineInfo[1].x,os);
+ write32le(MainScreen.gpu->affineInfo[1].y,os);
+ write32le(SubScreen.gpu->affineInfo[0].x,os);
+ write32le(SubScreen.gpu->affineInfo[0].y,os);
+ write32le(SubScreen.gpu->affineInfo[1].x,os);
+ write32le(SubScreen.gpu->affineInfo[1].y,os);
+}
+
+bool gpu_loadstate(EMUFILE* is, int size)
+{
+ //read version
+ u32 version;
+
+ //sigh.. shouldve used a new version number
+ if(size == 256*192*2*2)
+ version = 0;
+ else if(size== 0x30024)
+ {
+ read32le(&version,is);
+ version = 1;
+ }
+ else
+ if(read32le(&version,is) != 1) return false;
+
+
+ if(version<0||version>1) return false;
+
+ is->fread((char*)GPU_screen,sizeof(GPU_screen));
+
+ if(version==1)
+ {
+ read32le(&MainScreen.gpu->affineInfo[0].x,is);
+ read32le(&MainScreen.gpu->affineInfo[0].y,is);
+ read32le(&MainScreen.gpu->affineInfo[1].x,is);
+ read32le(&MainScreen.gpu->affineInfo[1].y,is);
+ read32le(&SubScreen.gpu->affineInfo[0].x,is);
+ read32le(&SubScreen.gpu->affineInfo[0].y,is);
+ read32le(&SubScreen.gpu->affineInfo[1].x,is);
+ read32le(&SubScreen.gpu->affineInfo[1].y,is);
+ //removed per nitsuja feedback. anyway, this same thing will happen almost immediately in gpu line=0
+ //MainScreen.gpu->refreshAffineStartRegs(-1,-1);
+ //SubScreen.gpu->refreshAffineStartRegs(-1,-1);
+ }
+
+ MainScreen.gpu->updateBLDALPHA();
+ SubScreen.gpu->updateBLDALPHA();
+ return !is->fail();
+}
+
+u32 GPU::getAffineStart(int layer, int xy)
+{
+ if(xy==0) return affineInfo[layer-2].x;
+ else return affineInfo[layer-2].y;
+}
+
+void GPU::setAffineStartWord(int layer, int xy, u16 val, int word)
+{
+ u32 curr = getAffineStart(layer,xy);
+ if(word==0) curr = (curr&0xFFFF0000)|val;
+ else curr = (curr&0x0000FFFF)|(((u32)val)<<16);
+ setAffineStart(layer,xy,curr);
+}
+
+void GPU::setAffineStart(int layer, int xy, u32 val)
+{
+ if(xy==0) affineInfo[layer-2].x = val;
+ else affineInfo[layer-2].y = val;
+ refreshAffineStartRegs(layer,xy);
+}
+
+void GPU::refreshAffineStartRegs(const int num, const int xy)
+{
+ if(num==-1)
+ {
+ refreshAffineStartRegs(2,xy);
+ refreshAffineStartRegs(3,xy);
+ return;
+ }
+
+ if(xy==-1)
+ {
+ refreshAffineStartRegs(num,0);
+ refreshAffineStartRegs(num,1);
+ return;
+ }
+
+ BGxPARMS * parms;
+ if (num==2)
+ parms = &(dispx_st)->dispx_BG2PARMS;
+ else
+ parms = &(dispx_st)->dispx_BG3PARMS;
+
+ if(xy==0)
+ parms->BGxX = affineInfo[num-2].x;
+ else
+ parms->BGxY = affineInfo[num-2].y;
+}
+
+template void GPU::modeRender(int layer)
+{
+ switch(GPU_mode2type[dispCnt().BG_Mode][layer])
+ {
+ case BGType_Text: lineText(this); break;
+ case BGType_Affine: lineRot(this); break;
+ case BGType_AffineExt: lineExtRot(this); break;
+ case BGType_Large8bpp: lineExtRot(this); break;
+ case BGType_Invalid:
+ PROGINFO("Attempting to render an invalid BG type\n");
+ break;
+ default:
+ break;
+ }
+}
+
+void gpu_SetRotateScreen(u16 angle)
+{
+ gpu_angle = angle;
+}
diff --git a/jni/desmume/src/GPU.h b/jni/desmume/src/GPU.h
new file mode 100755
index 0000000..11638df
--- /dev/null
+++ b/jni/desmume/src/GPU.h
@@ -0,0 +1,996 @@
+/*
+ Copyright (C) 2006 yopyop
+ Copyright (C) 2006-2007 Theo Berkau
+ Copyright (C) 2007 shash
+ Copyright (C) 2009-2010 DeSmuME team
+
+ 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 file 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 the this software. If not, see .
+*/
+
+#ifndef GPU_H
+#define GPU_H
+
+#include
+#include "mem.h"
+#include "common.h"
+#include "registers.h"
+#include "FIFO.h"
+#include "MMU.h"
+#include
+
+//#undef FORCEINLINE
+//#define FORCEINLINE
+
+void gpu_savestate(EMUFILE* os);
+bool gpu_loadstate(EMUFILE* is, int size);
+
+/*******************************************************************************
+ this structure is for display control,
+ it holds flags for general display
+*******************************************************************************/
+
+#ifdef WORDS_BIGENDIAN
+struct _DISPCNT
+{
+/* 7*/ u8 ForceBlank:1; // A+B:
+/* 6*/ u8 OBJ_BMP_mapping:1; // A+B: 0=2D (128KB), 1=1D (128..256KB)
+/* 5*/ u8 OBJ_BMP_2D_dim:1; // A+B: 0=128x512, 1=256x256 pixels
+/* 4*/ u8 OBJ_Tile_mapping:1;// A+B: 0=2D (32KB), 1=1D (32..256KB)
+/* 3*/ u8 BG0_3D:1; // A : 0=2D, 1=3D
+/* 0*/ u8 BG_Mode:3; // A+B:
+/*15*/ u8 WinOBJ_Enable:1; // A+B: 0=disable, 1=Enable
+/*14*/ u8 Win1_Enable:1; // A+B: 0=disable, 1=Enable
+/*13*/ u8 Win0_Enable:1; // A+B: 0=disable, 1=Enable
+/*12*/ u8 OBJ_Enable:1; // A+B: 0=disable, 1=Enable
+/*11*/ u8 BG3_Enable:1; // A+B: 0=disable, 1=Enable
+/*10*/ u8 BG2_Enable:1; // A+B: 0=disable, 1=Enable
+/* 9*/ u8 BG1_Enable:1; // A+B: 0=disable, 1=Enable
+/* 8*/ u8 BG0_Enable:1; // A+B: 0=disable, 1=Enable
+/*23*/ u8 OBJ_HBlank_process:1; // A+B: OBJ processed during HBlank (GBA bit5)
+/*22*/ u8 OBJ_BMP_1D_Bound:1; // A :
+/*20*/ u8 OBJ_Tile_1D_Bound:2; // A+B:
+/*18*/ u8 VRAM_Block:2; // A : VRAM block (0..3=A..D)
+
+/*16*/ u8 DisplayMode:2; // A+B: coreA(0..3) coreB(0..1) GBA(Green Swap)
+ // 0=off (white screen)
+ // 1=on (normal BG & OBJ layers)
+ // 2=VRAM display (coreA only)
+ // 3=RAM display (coreA only, DMA transfers)
+
+/*31*/ u8 ExOBJPalette_Enable:1; // A+B: 0=disable, 1=Enable OBJ extended Palette
+/*30*/ u8 ExBGxPalette_Enable:1; // A+B: 0=disable, 1=Enable BG extended Palette
+/*27*/ u8 ScreenBase_Block:3; // A : Screen Base (64K step)
+/*24*/ u8 CharacBase_Block:3; // A : Character Base (64K step)
+};
+#else
+struct _DISPCNT
+{
+/* 0*/ u8 BG_Mode:3; // A+B:
+/* 3*/ u8 BG0_3D:1; // A : 0=2D, 1=3D
+/* 4*/ u8 OBJ_Tile_mapping:1; // A+B: 0=2D (32KB), 1=1D (32..256KB)
+/* 5*/ u8 OBJ_BMP_2D_dim:1; // A+B: 0=128x512, 1=256x256 pixels
+/* 6*/ u8 OBJ_BMP_mapping:1; // A+B: 0=2D (128KB), 1=1D (128..256KB)
+
+ // 7-15 same as GBA
+/* 7*/ u8 ForceBlank:1; // A+B:
+/* 8*/ u8 BG0_Enable:1; // A+B: 0=disable, 1=Enable
+/* 9*/ u8 BG1_Enable:1; // A+B: 0=disable, 1=Enable
+/*10*/ u8 BG2_Enable:1; // A+B: 0=disable, 1=Enable
+/*11*/ u8 BG3_Enable:1; // A+B: 0=disable, 1=Enable
+/*12*/ u8 OBJ_Enable:1; // A+B: 0=disable, 1=Enable
+/*13*/ u8 Win0_Enable:1; // A+B: 0=disable, 1=Enable
+/*14*/ u8 Win1_Enable:1; // A+B: 0=disable, 1=Enable
+/*15*/ u8 WinOBJ_Enable:1; // A+B: 0=disable, 1=Enable
+
+/*16*/ u8 DisplayMode:2; // A+B: coreA(0..3) coreB(0..1) GBA(Green Swap)
+ // 0=off (white screen)
+ // 1=on (normal BG & OBJ layers)
+ // 2=VRAM display (coreA only)
+ // 3=RAM display (coreA only, DMA transfers)
+
+/*18*/ u8 VRAM_Block:2; // A : VRAM block (0..3=A..D)
+/*20*/ u8 OBJ_Tile_1D_Bound:2; // A+B:
+/*22*/ u8 OBJ_BMP_1D_Bound:1; // A :
+/*23*/ u8 OBJ_HBlank_process:1; // A+B: OBJ processed during HBlank (GBA bit5)
+/*24*/ u8 CharacBase_Block:3; // A : Character Base (64K step)
+/*27*/ u8 ScreenBase_Block:3; // A : Screen Base (64K step)
+/*30*/ u8 ExBGxPalette_Enable:1; // A+B: 0=disable, 1=Enable BG extended Palette
+/*31*/ u8 ExOBJPalette_Enable:1; // A+B: 0=disable, 1=Enable OBJ extended Palette
+};
+#endif
+
+typedef union
+{
+ struct _DISPCNT bits;
+ u32 val;
+} DISPCNT;
+#define BGxENABLED(cnt,num) ((num<8)? ((cnt.val>>8) & num):0)
+
+
+enum BlendFunc
+{
+ None, Blend, Increase, Decrease
+};
+
+
+/*******************************************************************************
+ this structure is for display control of a specific layer,
+ there are 4 background layers
+ their priority indicate which one to draw on top of the other
+ some flags indicate special drawing mode, size, FX
+*******************************************************************************/
+
+#ifdef WORDS_BIGENDIAN
+struct _BGxCNT
+{
+/* 7*/ u8 Palette_256:1; // 0=16x16, 1=1*256 palette
+/* 6*/ u8 Mosaic_Enable:1; // 0=disable, 1=Enable mosaic
+/* 2*/ u8 CharacBase_Block:4; // individual character base offset (n*16KB)
+/* 0*/ u8 Priority:2; // 0..3=high..low
+/*14*/ u8 ScreenSize:2; // text : 256x256 512x256 256x512 512x512
+ // x/rot/s : 128x128 256x256 512x512 1024x1024
+ // bmp : 128x128 256x256 512x256 512x512
+ // large : 512x1024 1024x512 - -
+/*13*/ u8 PaletteSet_Wrap:1; // BG0 extended palette set 0=set0, 1=set2
+ // BG1 extended palette set 0=set1, 1=set3
+ // BG2 overflow area wraparound 0=off, 1=wrap
+ // BG3 overflow area wraparound 0=off, 1=wrap
+/* 8*/ u8 ScreenBase_Block:5; // individual screen base offset (text n*2KB, BMP n*16KB)
+};
+#else
+struct _BGxCNT
+{
+/* 0*/ u8 Priority:2; // 0..3=high..low
+/* 2*/ u8 CharacBase_Block:4; // individual character base offset (n*16KB)
+/* 6*/ u8 Mosaic_Enable:1; // 0=disable, 1=Enable mosaic
+/* 7*/ u8 Palette_256:1; // 0=16x16, 1=1*256 palette
+/* 8*/ u8 ScreenBase_Block:5; // individual screen base offset (text n*2KB, BMP n*16KB)
+/*13*/ u8 PaletteSet_Wrap:1; // BG0 extended palette set 0=set0, 1=set2
+ // BG1 extended palette set 0=set1, 1=set3
+ // BG2 overflow area wraparound 0=off, 1=wrap
+ // BG3 overflow area wraparound 0=off, 1=wrap
+/*14*/ u8 ScreenSize:2; // text : 256x256 512x256 256x512 512x512
+ // x/rot/s : 128x128 256x256 512x512 1024x1024
+ // bmp : 128x128 256x256 512x256 512x512
+ // large : 512x1024 1024x512 - -
+};
+#endif
+
+
+typedef union
+{
+ struct _BGxCNT bits;
+ u16 val;
+} BGxCNT;
+
+/*******************************************************************************
+ this structure is for background offset
+*******************************************************************************/
+
+typedef struct {
+ u16 BGxHOFS;
+ u16 BGxVOFS;
+} BGxOFS;
+
+/*******************************************************************************
+ this structure is for rotoscale parameters
+*******************************************************************************/
+
+typedef struct {
+ s16 BGxPA;
+ s16 BGxPB;
+ s16 BGxPC;
+ s16 BGxPD;
+ s32 BGxX;
+ s32 BGxY;
+} BGxPARMS;
+
+
+/*******************************************************************************
+ these structures are for window description,
+ windows are square regions and can "subclass"
+ background layers or object layers (i.e window controls the layers)
+
+ screen
+ |
+ +-- Window0/Window1/OBJwindow/OutOfWindows
+ |
+ +-- BG0/BG1/BG2/BG3/OBJ
+*******************************************************************************/
+
+typedef union {
+ struct {
+ u8 end:8;
+ u8 start:8;
+ } bits ;
+ u16 val;
+} WINxDIM;
+
+#ifdef WORDS_BIGENDIAN
+typedef struct {
+/* 6*/ u8 :2;
+/* 5*/ u8 WINx_Effect_Enable:1;
+/* 4*/ u8 WINx_OBJ_Enable:1;
+/* 3*/ u8 WINx_BG3_Enable:1;
+/* 2*/ u8 WINx_BG2_Enable:1;
+/* 1*/ u8 WINx_BG1_Enable:1;
+/* 0*/ u8 WINx_BG0_Enable:1;
+} WINxBIT;
+#else
+typedef struct {
+/* 0*/ u8 WINx_BG0_Enable:1;
+/* 1*/ u8 WINx_BG1_Enable:1;
+/* 2*/ u8 WINx_BG2_Enable:1;
+/* 3*/ u8 WINx_BG3_Enable:1;
+/* 4*/ u8 WINx_OBJ_Enable:1;
+/* 5*/ u8 WINx_Effect_Enable:1;
+/* 6*/ u8 :2;
+} WINxBIT;
+#endif
+
+#ifdef WORDS_BIGENDIAN
+typedef union {
+ struct {
+ WINxBIT win0;
+ WINxBIT win1;
+ } bits;
+ struct {
+ u8 :3;
+ u8 win0_en:5;
+ u8 :3;
+ u8 win1_en:5;
+ } packed_bits;
+ struct {
+ u8 low;
+ u8 high;
+ } bytes;
+ u16 val ;
+} WINxCNT ;
+#else
+typedef union {
+ struct {
+ WINxBIT win0;
+ WINxBIT win1;
+ } bits;
+ struct {
+ u8 win0_en:5;
+ u8 :3;
+ u8 win1_en:5;
+ u8 :3;
+ } packed_bits;
+ struct {
+ u8 low;
+ u8 high;
+ } bytes;
+ u16 val ;
+} WINxCNT ;
+#endif
+
+/*
+typedef struct {
+ WINxDIM WIN0H;
+ WINxDIM WIN1H;
+ WINxDIM WIN0V;
+ WINxDIM WIN1V;
+ WINxCNT WININ;
+ WINxCNT WINOUT;
+} WINCNT;
+*/
+
+/*******************************************************************************
+ this structure is for miscellanous settings
+ //TODO: needs further description
+*******************************************************************************/
+
+typedef struct {
+ u16 MOSAIC;
+ u16 unused1;
+ u16 unused2;//BLDCNT;
+ u16 unused3;//BLDALPHA;
+ u16 unused4;//BLDY;
+ u16 unused5;
+ /*
+ u16 unused6;
+ u16 unused7;
+ u16 unused8;
+ u16 unused9;
+ */
+} MISCCNT;
+
+
+/*******************************************************************************
+ this structure is for 3D settings
+*******************************************************************************/
+
+struct _DISP3DCNT
+{
+/* 0*/ u8 EnableTexMapping:1; //
+/* 1*/ u8 PolygonShading:1; // 0=Toon Shading, 1=Highlight Shading
+/* 2*/ u8 EnableAlphaTest:1; // see ALPHA_TEST_REF
+/* 3*/ u8 EnableAlphaBlending:1; // see various Alpha values
+/* 4*/ u8 EnableAntiAliasing:1; //
+/* 5*/ u8 EnableEdgeMarking:1; // see EDGE_COLOR
+/* 6*/ u8 FogOnlyAlpha:1; // 0=Alpha and Color, 1=Only Alpha (see FOG_COLOR)
+/* 7*/ u8 EnableFog:1; // Fog Master Enable
+/* 8*/ u8 FogShiftSHR:4; // 0..10 SHR-Divider (see FOG_OFFSET)
+/*12*/ u8 AckColorBufferUnderflow:1; // Color Buffer RDLINES Underflow (0=None, 1=Underflow/Acknowledge)
+/*13*/ u8 AckVertexRAMOverflow:1; // Polygon/Vertex RAM Overflow (0=None, 1=Overflow/Acknowledge)
+/*14*/ u8 RearPlaneMode:1; // 0=Blank, 1=Bitmap
+/*15*/ u8 :1;
+/*16*/ u16 :16;
+};
+
+typedef union
+{
+ struct _DISP3DCNT bits;
+ u32 val;
+} DISP3DCNT;
+
+/*******************************************************************************
+ this structure is for capture control (core A only)
+
+ source:
+ http://nocash.emubase.de/gbatek.htm#dsvideocaptureandmainmemorydisplaymode
+*******************************************************************************/
+struct DISPCAPCNT
+{
+ enum CAPX {
+ _128, _256
+ } capx;
+ u32 val;
+ BOOL enabled;
+ u8 EVA;
+ u8 EVB;
+ u8 writeBlock;
+ u8 writeOffset;
+ u16 capy;
+ u8 srcA;
+ u8 srcB;
+ u8 readBlock;
+ u8 readOffset;
+ u8 capSrc;
+} ;
+
+/*******************************************************************************
+ this structure holds everything and should be mapped to
+ * core A : 0x04000000
+ * core B : 0x04001000
+*******************************************************************************/
+
+typedef struct _reg_dispx {
+ DISPCNT dispx_DISPCNT; // 0x0400x000
+ u16 dispA_DISPSTAT; // 0x04000004
+ u16 dispx_VCOUNT; // 0x0400x006
+ BGxCNT dispx_BGxCNT[4]; // 0x0400x008
+ BGxOFS dispx_BGxOFS[4]; // 0x0400x010
+ BGxPARMS dispx_BG2PARMS; // 0x0400x020
+ BGxPARMS dispx_BG3PARMS; // 0x0400x030
+ u8 filler[12]; // 0x0400x040
+ MISCCNT dispx_MISC; // 0x0400x04C
+ DISP3DCNT dispA_DISP3DCNT; // 0x04000060
+ DISPCAPCNT dispA_DISPCAPCNT; // 0x04000064
+ u32 dispA_DISPMMEMFIFO; // 0x04000068
+} REG_DISPx ;
+
+
+typedef BOOL (*fun_gl_Begin) (int screen);
+typedef void (*fun_gl_End) (int screen);
+// the GUI should use this function prior to all gl calls
+// if call to beg succeeds opengl draw
+void register_gl_fun(fun_gl_Begin beg,fun_gl_End end);
+
+#define GPU_MAIN 0
+#define GPU_SUB 1
+
+/* human readable bitmask names */
+#define ADDRESS_STEP_512B 0x00200
+#define ADDRESS_STEP_1KB 0x00400
+#define ADDRESS_STEP_2KB 0x00800
+#define ADDRESS_STEP_4KB 0x01000
+#define ADDRESS_STEP_8KB 0x02000
+#define ADDRESS_STEP_16KB 0x04000
+#define ADDRESS_STEP_32KB 0x08000
+#define ADDRESS_STEP_64KB 0x10000
+#define ADDRESS_STEP_128KB 0x20000
+#define ADDRESS_STEP_256KB 0x40000
+#define ADDRESS_STEP_512KB 0x80000
+#define ADDRESS_MASK_256KB (ADDRESS_STEP_256KB-1)
+
+#ifdef WORDS_BIGENDIAN
+struct _TILEENTRY
+{
+/*14*/ unsigned Palette:4;
+/*13*/ unsigned VFlip:1; // VERTICAL FLIP (top<-->bottom)
+/*12*/ unsigned HFlip:1; // HORIZONTAL FLIP (left<-->right)
+/* 0*/ unsigned TileNum:10;
+};
+#else
+struct _TILEENTRY
+{
+/* 0*/ unsigned TileNum:10;
+/*12*/ unsigned HFlip:1; // HORIZONTAL FLIP (left<-->right)
+/*13*/ unsigned VFlip:1; // VERTICAL FLIP (top<-->bottom)
+/*14*/ unsigned Palette:4;
+};
+#endif
+typedef union
+{
+ struct _TILEENTRY bits;
+ u16 val;
+} TILEENTRY;
+
+struct _ROTOCOORD
+{
+ u32 Fraction:8;
+ s32 Integer:20;
+ u32 pad:4;
+};
+typedef union
+{
+ struct _ROTOCOORD bits;
+ s32 val;
+} ROTOCOORD;
+
+
+/*
+ this structure is for color representation,
+ it holds 5 meaningful bits per color channel (red,green,blue)
+ and 1 meaningful bit for alpha representation
+ this bit can be unused or used for special FX
+*/
+
+struct _COLOR { // abgr x555
+#ifdef WORDS_BIGENDIAN
+ unsigned alpha:1; // sometimes it is unused (pad)
+ unsigned blue:5;
+ unsigned green:5;
+ unsigned red:5;
+#else
+ unsigned red:5;
+ unsigned green:5;
+ unsigned blue:5;
+ unsigned alpha:1; // sometimes it is unused (pad)
+#endif
+};
+struct _COLORx { // abgr x555
+ unsigned bgr:15;
+ unsigned alpha:1; // sometimes it is unused (pad)
+};
+
+typedef union
+{
+ struct _COLOR bits;
+ struct _COLORx bitx;
+ u16 val;
+} COLOR;
+
+struct _COLOR32 { // ARGB
+ unsigned :3;
+ unsigned blue:5;
+ unsigned :3;
+ unsigned green:5;
+ unsigned :3;
+ unsigned red:5;
+ unsigned :7;
+ unsigned alpha:1; // sometimes it is unused (pad)
+};
+
+typedef union
+{
+ struct _COLOR32 bits;
+ u32 val;
+} COLOR32;
+
+#define COLOR_16_32(w,i) \
+ /* doesnt matter who's 16bit who's 32bit */ \
+ i.bits.red = w.bits.red; \
+ i.bits.green = w.bits.green; \
+ i.bits.blue = w.bits.blue; \
+ i.bits.alpha = w.bits.alpha;
+
+
+
+ // (00: Normal, 01: Transparent, 10: Object window, 11: Bitmap)
+enum GPU_OBJ_MODE
+{
+ GPU_OBJ_MODE_Normal = 0,
+ GPU_OBJ_MODE_Transparent = 1,
+ GPU_OBJ_MODE_Window = 2,
+ GPU_OBJ_MODE_Bitmap = 3
+};
+
+/*
+ this structure is for Sprite description,
+ it holds flags & transformations for 1 sprite
+ (max 128 OBJs / screen)
+ref: http://www.bottledlight.com/ds/index.php/Video/Sprites
+*/
+
+struct _OAM_
+{
+#ifdef WORDS_BIGENDIAN
+// attr0
+/* 0*/ unsigned Y:8;
+/*14*/ unsigned Shape:2; // (00: Square, 01: Wide, 10: Tall, 11: Illegal)
+/*13*/ unsigned Depth:1; // (0: 16, 1: 256)
+/*12*/ unsigned Mosaic:1; // (1: Enabled)
+/*10*/ unsigned Mode:2; // (00: Normal, 01: Transparent, 10: Object window, 11: Bitmap)
+/* 8*/ unsigned RotScale:2; // (00: Normal, 01: Rot/scale, 10: Disabled, 11: Double-size rot/scale)
+// attr1
+/* 0*/ signed X:9;
+/*14*/ unsigned Size:2;
+/*13*/ unsigned VFlip:1;
+/*12*/ unsigned HFlip:1;
+/* 9*/ unsigned RotScalIndex:3; // Rot/scale matrix index
+// attr2
+/* 0*/ unsigned TileIndex:10;
+/*12*/ unsigned PaletteIndex:4;
+/*10*/ unsigned Priority:2;
+// attr3
+ unsigned attr3:16;
+#else
+// attr0
+/* 0*/ unsigned Y:8;
+/* 8*/ unsigned RotScale:2; // (00: Normal, 01: Rot/scale, 10: Disabled, 11: Double-size rot/scale)
+/*10*/ unsigned Mode:2; // (00: Normal, 01: Transparent, 10: Object window, 11: Bitmap)
+/*12*/ unsigned Mosaic:1; // (1: Enabled)
+/*13*/ unsigned Depth:1; // (0: 16, 1: 256)
+/*14*/ unsigned Shape:2; // (00: Square, 01: Wide, 10: Tall, 11: Illegal)
+// attr1
+/* 0*/ signed X:9;
+/* 9*/ unsigned RotScalIndex:3; // Rot/scale matrix index
+/*12*/ unsigned HFlip:1;
+/*13*/ unsigned VFlip:1;
+/*14*/ unsigned Size:2;
+// attr2
+/* 0*/ unsigned TileIndex:10;
+/*10*/ unsigned Priority:2;
+/*12*/ unsigned PaletteIndex:4;
+// attr3
+ unsigned attr3:16;
+#endif
+};
+
+typedef struct
+{
+#ifdef WORDS_BIGENDIAN
+ u8 attr00;
+ u8 attr01;
+ u8 attr10;
+ u8 attr11;
+ u8 attr20;
+ u8 attr21;
+ u8 attr30;
+ u8 attr31;
+#else
+ u16 attr0;
+ u16 attr1;
+ u16 attr2;
+ u16 attr3;
+#endif
+} OAM;
+
+
+typedef struct
+{
+ s16 x;
+ s16 y;
+} size;
+
+
+
+
+/*
+ this structure holds information
+ for rendering.
+*/
+
+#define NB_PRIORITIES 4
+#define NB_BG 4
+typedef struct
+{
+ u8 PixelsX[256];
+ u8 BGs[NB_BG], nbBGs;
+ u8 pad[1];
+ u16 nbPixelsX;
+ //256+8:
+ u8 pad2[248];
+
+ //things were slower when i organized this struct this way. whatever.
+ //u8 PixelsX[256];
+ //int BGs[NB_BG], nbBGs;
+ //int nbPixelsX;
+ ////<-- 256 + 24
+ //u8 pad2[256-24];
+} itemsForPriority_t;
+#define MMU_ABG 0x06000000
+#define MMU_BBG 0x06200000
+#define MMU_AOBJ 0x06400000
+#define MMU_BOBJ 0x06600000
+#define MMU_LCDC 0x06800000
+
+extern CACHE_ALIGN u8 gpuBlendTable555[17][17][32][32];
+
+enum BGType {
+ BGType_Invalid=0, BGType_Text=1, BGType_Affine=2, BGType_Large8bpp=3,
+ BGType_AffineExt=4, BGType_AffineExt_256x16=5, BGType_AffineExt_256x1=6, BGType_AffineExt_Direct=7
+};
+
+extern const BGType GPU_mode2type[8][4];
+
+struct GPU
+{
+ GPU()
+ : debug(false)
+ {}
+
+ // some structs are becoming redundant
+ // some functions too (no need to recopy some vars as it is done by MMU)
+ REG_DISPx * dispx_st;
+
+ //this indicates whether this gpu is handling debug tools
+ bool debug;
+
+ _BGxCNT & bgcnt(int num) { return (dispx_st)->dispx_BGxCNT[num].bits; }
+ _DISPCNT & dispCnt() { return dispx_st->dispx_DISPCNT.bits; }
+ template void modeRender(int layer);
+
+ DISPCAPCNT dispCapCnt;
+ BOOL LayersEnable[5];
+ itemsForPriority_t itemsForPriority[NB_PRIORITIES];
+
+#define BGBmpBB BG_bmp_ram
+#define BGChBB BG_tile_ram
+
+ u32 BG_bmp_large_ram[4];
+ u32 BG_bmp_ram[4];
+ u32 BG_tile_ram[4];
+ u32 BG_map_ram[4];
+
+ u8 BGExtPalSlot[4];
+ u32 BGSize[4][2];
+ BGType BGTypes[4];
+
+ struct MosaicColor {
+ u16 bg[4][256];
+ struct Obj {
+ u16 color;
+ u8 alpha, opaque;
+ } obj[256];
+ } mosaicColors;
+
+ u8 sprNum[256];
+ u8 h_win[2][256];
+ const u8 *curr_win[2];
+ void update_winh(int WIN_NUM);
+ bool need_update_winh[2];
+
+ template void setup_windows();
+
+ u8 core;
+
+ u8 dispMode;
+ u8 vramBlock;
+ u8 *VRAMaddr;
+
+ //FIFO fifo;
+
+ u8 bgPrio[5];
+
+ BOOL bg0HasHighestPrio;
+
+ OAM * oam;
+ u32 sprMem;
+ u8 sprBoundary;
+ u8 sprBMPBoundary;
+ u8 sprBMPMode;
+ u32 sprEnable;
+
+ u8 WIN0H0;
+ u8 WIN0H1;
+ u8 WIN0V0;
+ u8 WIN0V1;
+
+ u8 WIN1H0;
+ u8 WIN1H1;
+ u8 WIN1V0;
+ u8 WIN1V1;
+
+ u8 WININ0;
+ bool WININ0_SPECIAL;
+ u8 WININ1;
+ bool WININ1_SPECIAL;
+
+ u8 WINOUT;
+ bool WINOUT_SPECIAL;
+ u8 WINOBJ;
+ bool WINOBJ_SPECIAL;
+
+ u8 WIN0_ENABLED;
+ u8 WIN1_ENABLED;
+ u8 WINOBJ_ENABLED;
+
+ u16 BLDCNT;
+ u8 BLDALPHA_EVA;
+ u8 BLDALPHA_EVB;
+ u8 BLDY_EVY;
+ u16 *currentFadeInColors, *currentFadeOutColors;
+ bool blend2[8];
+
+ CACHE_ALIGN u16 tempScanlineBuffer[256];
+ u8 *tempScanline;
+
+ u8 MasterBrightMode;
+ u32 MasterBrightFactor;
+
+ CACHE_ALIGN u8 bgPixels[1024]; //yes indeed, this is oversized. map debug tools try to write to it
+
+ u32 currLine;
+ u8 currBgNum;
+ bool blend1;
+ u8* currDst;
+
+ u8* _3dColorLine;
+
+
+ static struct MosaicLookup {
+
+ struct TableEntry {
+ u8 begin, trunc;
+ } table[16][256];
+
+ MosaicLookup() {
+ for(int m=0;m<16;m++)
+ for(int i=0;i<256;i++) {
+ int mosaic = m+1;
+ TableEntry &te = table[m][i];
+ te.begin = (i%mosaic==0);
+ te.trunc = i/mosaic*mosaic;
+ }
+ }
+
+ TableEntry *width, *height;
+ int widthValue, heightValue;
+
+ } mosaicLookup;
+ bool curr_mosaic_enabled;
+
+ u16 blend(u16 colA, u16 colB);
+
+ template
+ FORCEINLINE FASTCALL bool _master_setFinalBGColor(u16 &color, const u32 x);
+
+ template
+ FORCEINLINE FASTCALL void _master_setFinal3dColor(int dstX, int srcX);
+
+ int setFinalColorBck_funcNum;
+ int bgFunc;
+ int setFinalColor3d_funcNum;
+ int setFinalColorSpr_funcNum;
+ //Final3DColFunct setFinalColor3D;
+ enum SpriteRenderMode {
+ SPRITE_1D, SPRITE_2D
+ } spriteRenderMode;
+
+ template
+ void _spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab);
+
+ inline void spriteRender(u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab)
+ {
+ if(spriteRenderMode == SPRITE_1D)
+ _spriteRender(dst,dst_alpha,typeTab, prioTab);
+ else
+ _spriteRender(dst,dst_alpha,typeTab, prioTab);
+ }
+
+
+ void setFinalColor3d(int dstX, int srcX);
+
+ template void setFinalColorBG(u16 color, const u32 x);
+ template FORCEINLINE void __setFinalColorBck(u16 color, const u32 x, const int opaque);
+ template FORCEINLINE void ___setFinalColorBck(u16 color, const u32 x, const int opaque);
+
+ void setAffineStart(int layer, int xy, u32 val);
+ void setAffineStartWord(int layer, int xy, u16 val, int word);
+ u32 getAffineStart(int layer, int xy);
+ void refreshAffineStartRegs(const int num, const int xy);
+
+ struct AffineInfo {
+ AffineInfo() : x(0), y(0) {}
+ u32 x, y;
+ } affineInfo[2];
+
+ void renderline_checkWindows(u16 x, bool &draw, bool &effect) const;
+
+ // check whether (x,y) is within the rectangle (including wraparounds)
+ template
+ u8 withinRect(u16 x) const;
+
+ void setBLDALPHA(u16 val)
+ {
+ BLDALPHA_EVA = (val&0x1f) > 16 ? 16 : (val&0x1f);
+ BLDALPHA_EVB = ((val>>8)&0x1f) > 16 ? 16 : ((val>>8)&0x1f);
+ updateBLDALPHA();
+ }
+
+ void setBLDALPHA_EVA(u8 val)
+ {
+ BLDALPHA_EVA = (val&0x1f) > 16 ? 16 : (val&0x1f);
+ updateBLDALPHA();
+ }
+
+ void setBLDALPHA_EVB(u8 val)
+ {
+ BLDALPHA_EVB = (val&0x1f) > 16 ? 16 : (val&0x1f);
+ updateBLDALPHA();
+ }
+
+ u32 getHOFS(int bg) { return T1ReadWord(&dispx_st->dispx_BGxOFS[bg].BGxHOFS,0) & 0x1FF; }
+ u32 getVOFS(int bg) { return T1ReadWord(&dispx_st->dispx_BGxOFS[bg].BGxVOFS,0) & 0x1FF; }
+
+ typedef u8 TBlendTable[32][32];
+ TBlendTable *blendTable;
+
+ void updateBLDALPHA()
+ {
+ blendTable = (TBlendTable*)&gpuBlendTable555[BLDALPHA_EVA][BLDALPHA_EVB][0][0];
+ }
+
+};
+#if 0
+// normally should have same addresses
+static void REG_DISPx_pack_test(GPU * gpu)
+{
+ REG_DISPx * r = gpu->dispx_st;
+ printf ("%08x %02x\n", (u32)r, (u32)(&r->dispx_DISPCNT) - (u32)r);
+ printf ("\t%02x\n", (u32)(&r->dispA_DISPSTAT) - (u32)r);
+ printf ("\t%02x\n", (u32)(&r->dispx_VCOUNT) - (u32)r);
+ printf ("\t%02x\n", (u32)(&r->dispx_BGxCNT[0]) - (u32)r);
+ printf ("\t%02x\n", (u32)(&r->dispx_BGxOFS[0]) - (u32)r);
+ printf ("\t%02x\n", (u32)(&r->dispx_BG2PARMS) - (u32)r);
+ printf ("\t%02x\n", (u32)(&r->dispx_BG3PARMS) - (u32)r);
+// printf ("\t%02x\n", (u32)(&r->dispx_WINCNT) - (u32)r);
+ printf ("\t%02x\n", (u32)(&r->dispx_MISC) - (u32)r);
+ printf ("\t%02x\n", (u32)(&r->dispA_DISP3DCNT) - (u32)r);
+ printf ("\t%02x\n", (u32)(&r->dispA_DISPCAPCNT) - (u32)r);
+ printf ("\t%02x\n", (u32)(&r->dispA_DISPMMEMFIFO) - (u32)r);
+}
+#endif
+
+CACHE_ALIGN extern u8 GPU_screen[4*256*192];
+
+
+GPU * GPU_Init(u8 l);
+void GPU_Reset(GPU *g, u8 l);
+void GPU_DeInit(GPU *);
+
+//these are functions used by debug tools which want to render layers etc outside the context of the emulation
+namespace GPU_EXT
+{
+ void textBG(GPU * gpu, u8 num, u8 * DST); //Draw text based background
+ void rotBG(GPU * gpu, u8 num, u8 * DST);
+ void extRotBG(GPU * gpu, u8 num, u8 * DST);
+};
+void sprite1D(GPU * gpu, u16 l, u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab);
+void sprite2D(GPU * gpu, u16 l, u8 * dst, u8 * dst_alpha, u8 * typeTab, u8 * prioTab);
+
+extern const size sprSizeTab[4][4];
+
+typedef struct {
+ GPU * gpu;
+ u16 offset;
+} NDS_Screen;
+
+extern NDS_Screen MainScreen;
+extern NDS_Screen SubScreen;
+
+int Screen_Init(int coreid);
+void Screen_Reset(void);
+void Screen_DeInit(void);
+
+extern MMU_struct MMU;
+
+
+
+#define GFXCORE_DEFAULT -1
+#define GFXCORE_DUMMY 0
+
+#define GFXCORE_FULLSCREEN (1 << 0)
+
+struct GraphicsInterface_struct
+{
+ int id; // ID number for core(see above defines)
+ const char *Name; // Name of core
+ int flags; // What features the core supports(full screen, etc.)
+ int (*Init)(); // Initializes stuff related to core
+ void (*DeInit)(); // Deinitializes stuff related to core
+ void (*Resize)(int width, int height, BOOL fullscreen); // Resizes window or fullscreen
+ void (*OnScreenText)(char *string, ...); // For handling save state messages, etc.
+} ;
+
+extern GraphicsInterface_struct GFXDummy;
+
+void GPU_setVideoProp(GPU *, u32 p);
+void GPU_setBGProp(GPU *, u16 num, u16 p);
+
+void GPU_setBLDCNT(GPU *gpu, u16 v) ;
+void GPU_setBLDY(GPU *gpu, u16 v) ;
+void GPU_setMOSAIC(GPU *gpu, u16 v) ;
+
+
+void GPU_remove(GPU *, u8 num);
+void GPU_addBack(GPU *, u8 num);
+
+int GPU_ChangeGraphicsCore(int coreid);
+
+void GPU_set_DISPCAPCNT(u32 val) ;
+void GPU_RenderLine(NDS_Screen * screen, u16 l, bool skip = false) ;
+void GPU_setMasterBrightness (GPU *gpu, u16 val);
+
+inline void GPU_setWIN0_H(GPU* gpu, u16 val) { gpu->WIN0H0 = val >> 8; gpu->WIN0H1 = val&0xFF; gpu->need_update_winh[0] = true; }
+inline void GPU_setWIN0_H0(GPU* gpu, u8 val) { gpu->WIN0H0 = val; gpu->need_update_winh[0] = true; }
+inline void GPU_setWIN0_H1(GPU* gpu, u8 val) { gpu->WIN0H1 = val; gpu->need_update_winh[0] = true; }
+
+inline void GPU_setWIN0_V(GPU* gpu, u16 val) { gpu->WIN0V0 = val >> 8; gpu->WIN0V1 = val&0xFF;}
+inline void GPU_setWIN0_V0(GPU* gpu, u8 val) { gpu->WIN0V0 = val; }
+inline void GPU_setWIN0_V1(GPU* gpu, u8 val) { gpu->WIN0V1 = val; }
+
+inline void GPU_setWIN1_H(GPU* gpu, u16 val) {gpu->WIN1H0 = val >> 8; gpu->WIN1H1 = val&0xFF; gpu->need_update_winh[1] = true; }
+inline void GPU_setWIN1_H0(GPU* gpu, u8 val) { gpu->WIN1H0 = val; gpu->need_update_winh[1] = true; }
+inline void GPU_setWIN1_H1(GPU* gpu, u8 val) { gpu->WIN1H1 = val; gpu->need_update_winh[1] = true; }
+
+inline void GPU_setWIN1_V(GPU* gpu, u16 val) { gpu->WIN1V0 = val >> 8; gpu->WIN1V1 = val&0xFF; }
+inline void GPU_setWIN1_V0(GPU* gpu, u8 val) { gpu->WIN1V0 = val; }
+inline void GPU_setWIN1_V1(GPU* gpu, u8 val) { gpu->WIN1V1 = val; }
+
+inline void GPU_setWININ(GPU* gpu, u16 val) {
+ gpu->WININ0=val&0x1F;
+ gpu->WININ0_SPECIAL=((val>>5)&1)!=0;
+ gpu->WININ1=(val>>8)&0x1F;
+ gpu->WININ1_SPECIAL=((val>>13)&1)!=0;
+}
+
+inline void GPU_setWININ0(GPU* gpu, u8 val) { gpu->WININ0 = val&0x1F; gpu->WININ0_SPECIAL = (val>>5)&1; }
+inline void GPU_setWININ1(GPU* gpu, u8 val) { gpu->WININ1 = val&0x1F; gpu->WININ1_SPECIAL = (val>>5)&1; }
+
+inline void GPU_setWINOUT16(GPU* gpu, u16 val) {
+ gpu->WINOUT=val&0x1F;
+ gpu->WINOUT_SPECIAL=((val>>5)&1)!=0;
+ gpu->WINOBJ=(val>>8)&0x1F;
+ gpu->WINOBJ_SPECIAL=((val>>13)&1)!=0;
+}
+inline void GPU_setWINOUT(GPU* gpu, u8 val) { gpu->WINOUT = val&0x1F; gpu->WINOUT_SPECIAL = (val>>5)&1; }
+inline void GPU_setWINOBJ(GPU* gpu, u8 val) { gpu->WINOBJ = val&0x1F; gpu->WINOBJ_SPECIAL = (val>>5)&1; }
+
+// Blending
+void SetupFinalPixelBlitter (GPU *gpu);
+#define GPU_setBLDCNT_LOW(gpu, val) {gpu->BLDCNT = (gpu->BLDCNT&0xFF00) | (val); SetupFinalPixelBlitter (gpu);}
+#define GPU_setBLDCNT_HIGH(gpu, val) {gpu->BLDCNT = (gpu->BLDCNT&0xFF) | (val<<8); SetupFinalPixelBlitter (gpu);}
+#define GPU_setBLDCNT(gpu, val) {gpu->BLDCNT = (val); SetupFinalPixelBlitter (gpu);}
+
+
+
+#define GPU_setBLDY_EVY(gpu, val) {gpu->BLDY_EVY = ((val)&0x1f) > 16 ? 16 : ((val)&0x1f);}
+
+//these arent needed right now since the values get poked into memory via default mmu handling and dispx_st
+//#define GPU_setBGxHOFS(bg, gpu, val) gpu->dispx_st->dispx_BGxOFS[bg].BGxHOFS = ((val) & 0x1FF)
+//#define GPU_setBGxVOFS(bg, gpu, val) gpu->dispx_st->dispx_BGxOFS[bg].BGxVOFS = ((val) & 0x1FF)
+
+void gpu_SetRotateScreen(u16 angle);
+
+//#undef FORCEINLINE
+//#define FORCEINLINE __forceinline
+
+#endif
+
diff --git a/jni/desmume/src/GPU_osd.cpp b/jni/desmume/src/GPU_osd.cpp
new file mode 100755
index 0000000..201b180
--- /dev/null
+++ b/jni/desmume/src/GPU_osd.cpp
@@ -0,0 +1,757 @@
+/*
+ Copyright (C) 2006 yopyop
+ Copyright (C) 2006-2011 DeSmuME team
+
+ 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 file 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 the this software. If not, see .
+*/
+
+#include "GPU_osd.h"
+#include "GPU.h"
+#include "mem.h"
+#include //mem funcs
+#include //va_start, etc
+#include
+#include
+#include
+#ifndef ANDROID
+#include
+#else
+#include
+#endif
+#include "debug.h"
+
+#include "aggdraw.h"
+#include "movie.h"
+#include "rtc.h"
+#include "NDSSystem.h"
+#include "mic.h"
+#include "saves.h"
+
+bool HudEditorMode = false;
+OSDCLASS *osd = NULL;
+HudStruct Hud;
+
+//contains a timer to be used for well-timed hud components
+static s64 hudTimer;
+
+static void SetHudDummy (HudCoordinates *hud)
+{
+ hud->x=666;
+ hud->y=666;
+}
+
+static bool IsHudDummy (HudCoordinates *hud)
+{
+ return (hud->x == 666 && hud->y == 666);
+}
+
+template